ETH Price: $3,274.48 (-4.14%)
Gas: 12 Gwei

Contract

0x7fbb661e4117463c9321A5F23eCa0cCB17aE5D89
 

Overview

ETH Balance

0.474224 ETH

Eth Value

$1,552.84 (@ $3,274.48/ETH)

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Value
Withdraw130345572021-08-16 6:09:321052 days ago1629094172IN
0x7fbb661e...B17aE5D89
0 ETH0.0008053833.68952276
Land No Longer F...126579642021-06-18 10:44:061111 days ago1624013046IN
0x7fbb661e...B17aE5D89
0 ETH0.0008158719
Land No Longer F...126579562021-06-18 10:42:191111 days ago1624012939IN
0x7fbb661e...B17aE5D89
0 ETH0.0003155213
Withdraw Bid For...126543772021-06-17 21:31:231111 days ago1623965483IN
0x7fbb661e...B17aE5D89
0 ETH0.0004244214.3
Withdraw Bid For...126528692021-06-17 16:02:041112 days ago1623945724IN
0x7fbb661e...B17aE5D89
0 ETH0.0010383835
Enter Bid For La...126335122021-06-14 15:59:151115 days ago1623686355IN
0x7fbb661e...B17aE5D89
0.02 ETH0.0012960718
Land No Longer F...126286092021-06-13 21:42:581115 days ago1623620578IN
0x7fbb661e...B17aE5D89
0 ETH0.0005582323
Send Balance To ...126149472021-06-11 18:48:441118 days ago1623437324IN
0x7fbb661e...B17aE5D89
0 ETH0.0030360632
Enter Bid For La...126136422021-06-11 13:52:471118 days ago1623419567IN
0x7fbb661e...B17aE5D89
0.012 ETH0.001658816.00000145
Withdraw Bid For...126095352021-06-10 22:37:271118 days ago1623364647IN
0x7fbb661e...B17aE5D89
0 ETH0.000296810
Withdraw Bid For...126095322021-06-10 22:37:071118 days ago1623364627IN
0x7fbb661e...B17aE5D89
0 ETH0.000296810
Withdraw Bid For...126094352021-06-10 22:15:251118 days ago1623363325IN
0x7fbb661e...B17aE5D89
0 ETH0.000296810.0001
Enter Bid For La...126076982021-06-10 15:55:151119 days ago1623340515IN
0x7fbb661e...B17aE5D89
0.4 ETH0.0034607728.00000156
Withdraw126076232021-06-10 15:40:271119 days ago1623339627IN
0x7fbb661e...B17aE5D89
0 ETH0.0004859126.4
Enter Bid For La...126076062021-06-10 15:36:421119 days ago1623339402IN
0x7fbb661e...B17aE5D89
0.22 ETH0.0032630126.4
Buy Land126069172021-06-10 12:59:201119 days ago1623329960IN
0x7fbb661e...B17aE5D89
0.2 ETH0.0012439610.00000145
Buy Land126068892021-06-10 12:53:491119 days ago1623329629IN
0x7fbb661e...B17aE5D89
0.2 ETH0.001657511.05
Withdraw126063792021-06-10 11:03:511119 days ago1623323031IN
0x7fbb661e...B17aE5D89
0 ETH0.0003681220
Enter Bid For La...126063202021-06-10 10:51:481119 days ago1623322308IN
0x7fbb661e...B17aE5D89
0.1 ETH0.0013595811
Land No Longer F...126062462021-06-10 10:35:331119 days ago1623321333IN
0x7fbb661e...B17aE5D89
0 ETH0.0004005716.5
Withdraw126062392021-06-10 10:33:571119 days ago1623321237IN
0x7fbb661e...B17aE5D89
0 ETH0.0003681220
Withdraw126062352021-06-10 10:32:521119 days ago1623321172IN
0x7fbb661e...B17aE5D89
0 ETH0.0004214
Withdraw126062192021-06-10 10:28:211119 days ago1623320901IN
0x7fbb661e...B17aE5D89
0 ETH0.00050421
Withdraw Bid For...126062002021-06-10 10:25:411119 days ago1623320741IN
0x7fbb661e...B17aE5D89
0 ETH0.000593620
Enter Bid For La...126061912021-06-10 10:23:591119 days ago1623320639IN
0x7fbb661e...B17aE5D89
0.05 ETH0.0024719820
View all transactions

Latest 17 internal transactions

Advanced mode:
Parent Transaction Hash Block From To Value
126543772021-06-17 21:31:231111 days ago1623965483
0x7fbb661e...B17aE5D89
0.3 ETH
126528692021-06-17 16:02:041112 days ago1623945724
0x7fbb661e...B17aE5D89
0.02 ETH
126149472021-06-11 18:48:441118 days ago1623437324
0x7fbb661e...B17aE5D89
0.012 ETH
126095352021-06-10 22:37:271118 days ago1623364647
0x7fbb661e...B17aE5D89
0.35 ETH
126095322021-06-10 22:37:071118 days ago1623364627
0x7fbb661e...B17aE5D89
0.22 ETH
126094352021-06-10 22:15:251118 days ago1623363325
0x7fbb661e...B17aE5D89
0.4 ETH
126076232021-06-10 15:40:271119 days ago1623339627
0x7fbb661e...B17aE5D89
0.19 ETH
126063792021-06-10 11:03:511119 days ago1623323031
0x7fbb661e...B17aE5D89
0.095 ETH
126062392021-06-10 10:33:571119 days ago1623321237
0x7fbb661e...B17aE5D89
0.000095 ETH
126062002021-06-10 10:25:411119 days ago1623320741
0x7fbb661e...B17aE5D89
0.05 ETH
126055042021-06-10 7:45:111119 days ago1623311111
0x7fbb661e...B17aE5D89
0.015 ETH
126004742021-06-09 13:01:371120 days ago1623243697
0x7fbb661e...B17aE5D89
0.855 ETH
125998582021-06-09 10:37:591120 days ago1623235079
0x7fbb661e...B17aE5D89
0.006531 ETH
125995292021-06-09 9:21:321120 days ago1623230492
0x7fbb661e...B17aE5D89
0.2375 ETH
125877112021-06-07 13:43:041122 days ago1623073384
0x7fbb661e...B17aE5D89
0.38 ETH
125769892021-06-05 21:55:501123 days ago1622930150
0x7fbb661e...B17aE5D89
0.0019 ETH
125768622021-06-05 21:29:071123 days ago1622928547
0x7fbb661e...B17aE5D89
0.00095 ETH
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
MarsGenesisAuction

Compiler Version
v0.8.4+commit.c7e474f2

Optimization Enabled:
No with 200 runs

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

import "./MarsGenesisAuctionBase.sol";


/// @title MarsGenesis Auction Contract
/// @author MarsGenesis
/// @notice You can use this contract to buy, sell and bid on MarsGenesis lands
contract MarsGenesisAuction is MarsGenesisAuctionBase {

    /// @notice Inits the contract 
    /// @param _erc721Address The address of the main MarsGenesis contract
    /// @param _walletAddress The address of the wallet of MarsGenesis contract
    /// @param _cut The contract owner tax on sales
    constructor (address _erc721Address, address payable _walletAddress, uint256 _cut) MarsGenesisAuctionBase(_erc721Address, _walletAddress, _cut) {}

    /*** EXTERNAL ***/

    /// @notice Enters a bid for a specific land (payable)
    /// @dev If there was a previous (lower) bid, it removes it and adds its amount to pending withdrawals. 
    /// On success, it emits the LandBidEntered event.
    /// @param tokenId The id of the land to bet upon
    function enterBidForLand(uint tokenId) external payable {
        require(nonFungibleContract.ownerOf(tokenId) != address(0), "Land not yet owned");
        require(nonFungibleContract.ownerOf(tokenId) != msg.sender, "You already own the land");
        require(msg.value > 0, "Amount must be > 0");
        
        Bid memory existing = landIdToBids[tokenId];
        require(msg.value > existing.value, "Amount must be > than existing bid");

        if (existing.value > 0) {
            // Refund the previous bid
            addressToPendingWithdrawal[existing.bidder] += existing.value;
        }
        landIdToBids[tokenId] = Bid(true, tokenId, msg.sender, msg.value);
        emit LandBidEntered(tokenId, msg.value, msg.sender);
    }

    /// @notice Buys a land for a specific price (payable)
    /// @dev The land must be for sale before other user calls this method. If the same user had the higher bid before, it gets refunded into the pending withdrawals. On success, emits the LandBought event. Executes a ERC721 safeTransferFrom
    /// @param tokenId The id of the land to be bought
    function buyLand(uint tokenId) external payable {
        require(msg.sender != nonFungibleContract.ownerOf(tokenId), "You cant buy your own land");
        
        Offer memory offer = landIdToOfferForSale[tokenId];
        require(offer.isForSale, "Item is not for sale");
        require(offer.seller == nonFungibleContract.ownerOf(tokenId), "Seller is no longer the owner of the item");
        require(msg.value >= offer.minValue, "Not enough balance");

        address seller = offer.seller;

        nonFungibleContract.safeTransferFrom(seller, msg.sender, tokenId);

        uint taxAmount = msg.value * ownerCut / 100;
        uint netAmount = msg.value - taxAmount;

        addressToPendingWithdrawal[seller] += netAmount;

        // 80% goes to non-profit
        uint npoAmount = taxAmount * 80 / 100;
        npoBalance += npoAmount;
        ownerBalance += taxAmount - npoAmount;

        emit LandBought(tokenId, msg.value, seller, msg.sender);

        // Check for the case where there is a bid from the new owner and refund it.
        // Any other bid can stay in place.
        Bid memory bid = landIdToBids[tokenId];
        if (bid.bidder == msg.sender) {
            addressToPendingWithdrawal[msg.sender] += bid.value;
            landIdToBids[tokenId] = Bid(false, tokenId, address(0), 0);
        }
    }

    /// @notice Offers a land that ones own for sale for a min price
    /// @dev On success, emits the event LandOffered
    /// @param tokenId The id of the land to put for sale
    /// @param minSalePriceInWei The minimum price of the land (Wei)
    function offerLandForSale(uint tokenId, uint minSalePriceInWei) external {
        require(msg.sender == address(nonFungibleContract), "Use MarsContractBase:offerLandForSale instead");
        require(nonFungibleContract.ownerOf(tokenId) == msg.sender || nonFungibleContract.getApproved(tokenId) == address(this), "Only owner can add item from sale");

        landIdToOfferForSale[tokenId] = Offer(true, tokenId, nonFungibleContract.ownerOf(tokenId), minSalePriceInWei);

        emit LandOffered(tokenId, minSalePriceInWei, nonFungibleContract.ownerOf(tokenId));
    }

    /// @notice Sends free balance to the main wallet 
    /// @dev Only callable by the deployer
    function sendBalanceToWallet() external { 
        require(msg.sender == _deployerAddress, "INVALID_ROLE");
        require(ownerBalance > 0, "No Balance to send");
        uint amount = ownerBalance;
        ownerBalance = 0;
        
        (bool success,) = address(walletContract).call{value: amount}("");
        require(success);
    }

    /// @notice Sends donation balance to the npo addresses
    /// @dev Only callable by the deployer
    function sendDonations() external { 
        require(msg.sender == _deployerAddress, "INVALID_ROLE");
        require(npoBalance > 0, "No Balance to send");
        
        uint amount = npoBalance;
        npoBalance = 0;

        uint donation1 = amount / 2;        
        (bool success1,) = NPOaddress1.call{value: donation1}("");
        require(success1);

        uint donation2 = amount - donation1;
        (bool success2,) = NPOaddress2.call{value: donation2}("");
        require(success2);
    }

    /// @notice Users can withdraw their available balance
    /// @dev Avoids reentrancy
    function withdraw() external { 
        uint amount = addressToPendingWithdrawal[msg.sender];
        addressToPendingWithdrawal[msg.sender] = 0;
        payable(msg.sender).transfer(amount);
    }

    /// @notice Owner of a land can accept a bid for its land
    /// @dev Only callable by the main contract. On success, emits the event LandBought. Disccounts the contract tax (cut) from the final price. Executes a ERC721 safeTransferFrom
    /// @param tokenId The id of the land
    /// @param minPrice The minimum price of the land
    function acceptBidForLand(uint tokenId, uint minPrice) external {
        require(msg.sender == address(nonFungibleContract), "Use MarsContractBase:acceptBidForLand instead");
        require(nonFungibleContract.ownerOf(tokenId) == msg.sender || nonFungibleContract.getApproved(tokenId) == address(this), "Sender is not owner");
        
        address seller = nonFungibleContract.ownerOf(tokenId);
        Bid memory bid = landIdToBids[tokenId];

        require(bid.value > 0, "Value must be > 0");
        require(bid.value >= minPrice, "Value < minPrice");

        nonFungibleContract.safeTransferFrom(seller, bid.bidder, tokenId);

        uint amount = bid.value;
        landIdToBids[tokenId] = Bid(false, tokenId, address(0), 0);

        uint taxAmount = amount * ownerCut / 100;
        uint netAmount = amount - taxAmount;

        addressToPendingWithdrawal[seller] += netAmount;
        
        // 80% goes to non-profit
        uint npoAmount = taxAmount * 80 / 100;
        npoBalance += npoAmount;
        ownerBalance += taxAmount - npoAmount;

        emit LandBought(tokenId, bid.value, seller, bid.bidder);
    }

    /// @notice Users can withdraw their own bid for a specific land
    /// @dev The bid amount is automatically transfered back to the user. Emits LandBidWithdrawn event. Avoids reentrancy.
    /// @param tokenId The id of the land that had the bid on
    function withdrawBidForLand(uint tokenId) external {
        require(nonFungibleContract.ownerOf(tokenId) != address(0), "Sender cant be 0x0");
        require(nonFungibleContract.ownerOf(tokenId) != msg.sender, "Sender cant be the owner");
        
        Bid memory bid = landIdToBids[tokenId];
        require(bid.bidder == msg.sender, "Only bidder can withdraw their bid");

        uint amount = bid.value;

        landIdToBids[tokenId] = Bid(false, tokenId, address(0), 0);
        payable(msg.sender).transfer(amount);
        emit LandBidWithdrawn(tokenId, bid.value, msg.sender);
    }

    /// @notice Updates the wallet contract address    
    /// @param _address The address of the wallet contract
    /// @dev Only callable by deployer
    function setWalletAddress(address payable _address) external {
        require(msg.sender == _deployerAddress, "INVALID_ROLE");
        MarsGenesisWallet candidateContract = MarsGenesisWallet(_address);
        walletContract = candidateContract;
    }

    /// @notice Updates the nonprofit addresses    
    /// @param _address1 The address of the NPO 1
    /// @param _address2 The address of the NPO 2
    /// @dev Only callable by deployer
    function setNonProfitAddresses(address payable _address1, address payable _address2) external {
        require(msg.sender == _deployerAddress, "INVALID_ROLE");
        NPOaddress1 = _address1;
        NPOaddress2 = _address2;
    }

    /*** PUBLIC ***/

    /// @notice Checks if a land is for sale
    /// @param tokenId The id of the land to check
    /// @return boolean, true if the land is for sale
    function landIdIsForSale(uint256 tokenId) public view returns(bool) {
        return landIdToOfferForSale[tokenId].isForSale;
    }

    /// @notice Puts a land no longer for sale
    /// @dev Callable only by the main contract or the owner of a land. Emits the event LandNoLongerForSale
    /// @param tokenId The id of the land
    function landNoLongerForSale(uint tokenId) public {
        require(nonFungibleContract.ownerOf(tokenId) == msg.sender || nonFungibleContract.getApproved(tokenId) == address(this), "Only owner can remove item from sale");
        landIdToOfferForSale[tokenId] = Offer(false, tokenId, msg.sender, 0);
        emit LandNoLongerForSale(tokenId, nonFungibleContract.ownerOf(tokenId));
    }
}

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

import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Pausable.sol";
import "@openzeppelin/contracts/utils/Context.sol";
import "@openzeppelin/contracts/access/AccessControlEnumerable.sol";

contract ERC721Full is Context, AccessControlEnumerable, ERC721, ERC721Enumerable, ERC721Pausable {

  /*** INIT ***/

  constructor(string memory name, string memory symbol) ERC721(name, symbol) {
      _setupRole(DEFAULT_ADMIN_ROLE, _msgSender());
  }

  /*** METHODS ***/

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

  function pause() public {
      require(hasRole(DEFAULT_ADMIN_ROLE, _msgSender()), "INVALID_ROLE");
      _pause();
  }

  function unpause() public {
      require(hasRole(DEFAULT_ADMIN_ROLE, _msgSender()), "INVALID_ROLE");
      _unpause();
  }

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

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

import "@openzeppelin/contracts/utils/introspection/ERC165.sol";
import "./ERC721Full.sol";
import "./MarsGenesisWallet.sol";

/// @title MarsGenesis Auction Base Contract
/// @author MarsGenesis
/// @notice Serves as the base for MarsGenesisAuction contract
contract MarsGenesisAuctionBase is ERC165 {

    /// @dev Interface signatures
    bytes4 constant InterfaceSignature_ERC721 = bytes4(0x80ac58cd);
    bytes4 constant InterfaceSignature_ERC721_Metadata = bytes4(0x5b5e139f);
    bytes4 constant InterfaceSignature_ERC721_Enumerable = bytes4(0x780e9d63);
    bytes4 constant InterfaceSignature_MarsGenesisAuction =
        bytes4(keccak256('landIdIsForSale(uint256 tokenId)')) ^
        bytes4(keccak256('landNoLongerForSale(uint256)'));

    /// @dev Contract owner balance
    uint public ownerBalance;

    /// @dev Contract non-profits balance
    uint public npoBalance;

    /// @dev Contract owner tax on sales
    uint256 public ownerCut;

    /// @dev Reference to main contract that implements ERC721
    ERC721Full nonFungibleContract; 

    /// @dev Auction contract address
    MarsGenesisWallet walletContract;

    /// @dev Address of the deployer account
    address _deployerAddress;

    /// @dev Address of the Non Profit Organization 1
    address public NPOaddress1;

    /// @dev Address of the Non Profit Organization 2
    address public NPOaddress2;

    /// @notice Inits the contract 
    /// @dev The main contract should support specific interfaces
    /// @param _erc721Address The address of the main MarsGenesis contract
    /// @param _walletAddress The address of the wallet of MarsGenesis contract
    /// @param _cut The contract owner tax on sales
    constructor (address _erc721Address, address payable _walletAddress, uint256 _cut) {
        require(_cut <= 100, "INVALID_OWNER_CUT");
        ownerCut = _cut;

        _deployerAddress = msg.sender;

        ERC721Full candidateContract = ERC721Full(_erc721Address);
        
        require(candidateContract.supportsInterface(InterfaceSignature_ERC721), "ERC721 not supported");
        require(candidateContract.supportsInterface(InterfaceSignature_ERC721_Metadata), "ERC721Metadata not supported");
        require(candidateContract.supportsInterface(InterfaceSignature_ERC721_Enumerable), "ERC721Enumerable not supported");

        nonFungibleContract = candidateContract;
        walletContract = MarsGenesisWallet(_walletAddress);
    }
    

    /*** EVENTS ***/

    /// @dev Event fired when a land is offered for sale
    event LandOffered(uint indexed tokenId, uint minValue, address indexed from);

    /// @dev Event fired when a user bids on a land
    event LandBidEntered(uint indexed tokenId, uint value, address indexed from);

    /// @dev Event fired when a bid is withdrawn
    event LandBidWithdrawn(uint indexed tokenId, uint value, address indexed from);

    /// @dev Event fired when a land is bought via auctioning or direct sale
    event LandBought(uint indexed tokenId, uint value, address indexed from, address indexed to);

    /// @dev Event fired when a land is no longer for sale
    event LandNoLongerForSale(uint indexed tokenId, address indexed from);
    

    /*** STORAGE ***/

    /// @dev The main Offer struct for auctioning
    struct Offer {
        bool isForSale;
        uint tokenId;
        address seller;
        uint minValue; 
    }

    /// @dev The main Bid struct for auctioning
    struct Bid {
        bool hasBid;
        uint tokenId;
        address bidder;
        uint value;
    }

    /// @dev A mapping of lands that are offered for sale at a specific minimum value
    mapping (uint => Offer) public landIdToOfferForSale;

    /// @dev A mapping of the landId to its highest bid
    mapping (uint => Bid) public landIdToBids;

    /// @dev A mapping of address to their pending withdrawal
    mapping (address => uint) public addressToPendingWithdrawal;

    /*** ERC165 ***/

    /// @notice Checks for interface support
    /// @param interfaceId The interfaceId bytes
    /// @return bool, true or false for the support
    function supportsInterface(bytes4 interfaceId) public override pure returns (bool) {
        return interfaceId == InterfaceSignature_MarsGenesisAuction;
    }
}

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

// import "./MarsGenesisCore.sol";
import "@openzeppelin/contracts/access/AccessControlEnumerable.sol";


/// @title MarsGenesis wallet contract
/// @author MarsGenesis
/// @dev Equity values are 0 to 10000 (representing 0 to 100 with decimals). So an equity of 3000 means 30%
/// @notice Encapsulates the wallet and cap table management
contract MarsGenesisWallet is AccessControlEnumerable {

    /// @dev Address of the deployer account
    address private _deployerAddress;

    
    /*** CAP TABLE ***/

    address[] private _founders;
    mapping(address => uint) public founderToEquity;
    mapping(address => FounderAuthorization[]) private _addressToFounderAuthorization;

    /// @dev A mapping of cxo address to their pending withdrawal
    mapping (address => uint) public addressToPendingWithdrawal;
    
    /// @dev The max shares being 100 represented by 10000 (to accept decimal positions)
    uint private constant TOTAL_CAP = 10000;


    struct FounderAuthorization {      
        address founder;
        uint equity;
        bool approved;
        bool isRemoval;
    }


    /*** INIT ***/
    /// @notice Inits the wallet
    /// @dev defines a initial cap table with specific equity per founder. Equity values 0 - 10000 representing 0-100% equity
    /// @param cxo1 founder 1     
    /// @param cxo2 founder 2
    /// @param cxo3 founder 3
    /// @param cdo1 founder 4
    /// @param cdo2 founder 5
    /// @param cdo3 founder 6
    constructor (address cxo1, address cxo2, address cxo3, address cdo1, address cdo2, address cdo3) {
        _deployerAddress = msg.sender;
        _setupRole(DEFAULT_ADMIN_ROLE, msg.sender);

        // Initial cap table
        createInitialFounder(cxo1, 3000);
        createInitialFounder(cxo2, 3000);
        createInitialFounder(cxo3, 3000);
        createInitialFounder(cdo1, 500);
        createInitialFounder(cdo2, 300);
        createInitialFounder(cdo3, 200);
    }

    /// @notice Inits the a initial founder.
    /// @dev Only callable once on contract construction
    /// @param founderAddress The address of a initial founder 
    /// @param equity The equity of the initial founder. Equity values 0 - 10000 representing 0-100% equity
    function createInitialFounder(address founderAddress, uint equity) private {
        require(msg.sender == _deployerAddress, "ONLY_DEPLOYER");
        require(equity <= TOTAL_CAP, "INVALID EQUITY (0-10000)");

        _founders.push(founderAddress);
        _setupRole(DEFAULT_ADMIN_ROLE, founderAddress);
        founderToEquity[founderAddress] = equity;
    }


    /*** PUBLIC ***/

    /// @notice Wallet should receive ether from MarsGenesisCore and MarsGenesisAuction
    /// @dev Ether received is splitted by equity among wallet founders
    receive() external payable {
        require(msg.value > 0, "INVALID_AMOUNT");
        _updatePendingWithdrawals(msg.value);
    }

    function authorize(bool approved, uint equity, address who) public {
        require(hasRole(DEFAULT_ADMIN_ROLE, _msgSender()), "INVALID_ROLE");
        require(equity <= TOTAL_CAP, "INVALID EQUITY (0-10000)");
        require(equity >= 0, "INVALID EQUITY (0-10000)");

        FounderAuthorization[] storage auths = _addressToFounderAuthorization[who];
        bool exists = false;
        for (uint i = 0; i < auths.length; i++) {
            if (auths[i].founder == msg.sender) {
                exists = true;
                auths[i].equity = equity;
                auths[i].approved = approved;
                auths[i].isRemoval = false;
            }
        }

        if (!exists) {
            auths.push(FounderAuthorization({founder: msg.sender, equity: equity, approved: approved, isRemoval: false}));
        }
    }

    function revoke(bool approved, address who) public {
        require(hasRole(DEFAULT_ADMIN_ROLE, _msgSender()), "INVALID_ROLE");

        FounderAuthorization[] storage auths = _addressToFounderAuthorization[who];
        bool exists = false;
        for (uint i = 0; i < auths.length; i++) {
            if (auths[i].founder == msg.sender) {
                exists = true;
                auths[i].equity = 0;
                auths[i].approved = approved;
                auths[i].isRemoval = true;
            }
        }

        if (!exists) {
            auths.push(FounderAuthorization({founder: msg.sender, equity: 0, approved: approved, isRemoval: true}));
        }
    }

    function updateCapTable(address who, uint equity, bool isRemoval) public {
        require(hasRole(DEFAULT_ADMIN_ROLE, _msgSender()), "INVALID_ROLE");
        require(equity <= TOTAL_CAP, "INVALID EQUITY (0-10000)");
        require(equity >= 0, "INVALID EQUITY (0-10000)");

        FounderAuthorization[] storage auths = _addressToFounderAuthorization[who];
        uint equityYes = 0;

        for (uint i = 0; i < auths.length; i++) {
            if (equity == auths[i].equity && auths[i].approved == true && isRemoval == auths[i].isRemoval) {
                equityYes += founderToEquity[auths[i].founder];
            } 
        }

        if (equityYes >= 7000) {
            if (isRemoval) {
                _removeFounder(who);
            } else {
                _addFounder(who, equity);
            }  
            delete _addressToFounderAuthorization[who];
        } 
    }

    function withdraw() external {
        require(hasRole(DEFAULT_ADMIN_ROLE, _msgSender()), "INVALID_ROLE");
        
        uint amount = addressToPendingWithdrawal[_msgSender()];
        addressToPendingWithdrawal[_msgSender()] = 0;
        
        payable(_msgSender()).transfer(amount);
    }

    /*** PRIVATE ***/

    function _addFounder(address who, uint equity) private {
        require(!_founderExists(who), "FOUNDER ALREADY EXISTS");

        for (uint i = 0; i < _founders.length; i++) {
            founderToEquity[_founders[i]] = founderToEquity[_founders[i]] * (TOTAL_CAP - equity) / TOTAL_CAP;
        }

        _founders.push(who);
        grantRole(DEFAULT_ADMIN_ROLE, who);
        founderToEquity[who] = equity;
    }

    function _removeFounder(address who) private {
        require(_founderExists(who), "FOUNDER DOESNT EXIST");

        uint equityToSplit = founderToEquity[who];
        uint indexToRemove;
        for (uint i = 0; i < _founders.length; i++) {
            if (_founders[i] == who) {
                indexToRemove = i;
                founderToEquity[who] = 0;
            } else {
               founderToEquity[_founders[i]] =  TOTAL_CAP * founderToEquity[_founders[i]] / (TOTAL_CAP - equityToSplit);
            }
        }

        delete _founders[indexToRemove];
        revokeRole(DEFAULT_ADMIN_ROLE, who);
    }

    function _founderExists(address who) private view returns(bool) {
        bool exists = false;
        for (uint i = 0; i < _founders.length; i++) {
            if (_founders[i] == who) {
                exists = true;
            }
        }
        return exists;
    }

    function _updatePendingWithdrawals(uint amount) private {
        for (uint i = 0; i < _founders.length; i++) {
            addressToPendingWithdrawal[_founders[i]] = addressToPendingWithdrawal[_founders[i]] + (amount * founderToEquity[_founders[i]] / TOTAL_CAP);
        }
    }
}

File 5 of 20 : AccessControl.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

/**
 * @dev External interface of AccessControl declared to support ERC165 detection.
 */
interface IAccessControl {
    function hasRole(bytes32 role, address account) external view returns (bool);
    function getRoleAdmin(bytes32 role) external view returns (bytes32);
    function grantRole(bytes32 role, address account) external;
    function revokeRole(bytes32 role, address account) external;
    function renounceRole(bytes32 role, address account) external;
}

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

    mapping (bytes32 => RoleData) private _roles;

    bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;

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

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

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

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

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

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

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

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

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

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

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

        _revokeRole(role, account);
    }

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

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

    function _grantRole(bytes32 role, address account) private {
        if (!hasRole(role, account)) {
            _roles[role].members[account] = true;
            emit RoleGranted(role, account, _msgSender());
        }
    }

    function _revokeRole(bytes32 role, address account) private {
        if (hasRole(role, account)) {
            _roles[role].members[account] = false;
            emit RoleRevoked(role, account, _msgSender());
        }
    }
}

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

pragma solidity ^0.8.0;

import "./AccessControl.sol";
import "../utils/structs/EnumerableSet.sol";

/**
 * @dev External interface of AccessControlEnumerable declared to support ERC165 detection.
 */
interface IAccessControlEnumerable {
    function getRoleMember(bytes32 role, uint256 index) external view returns (address);
    function getRoleMemberCount(bytes32 role) external view returns (uint256);
}

/**
 * @dev Extension of {AccessControl} that allows enumerating the members of each role.
 */
abstract contract AccessControlEnumerable is IAccessControlEnumerable, AccessControl {
    using EnumerableSet for EnumerableSet.AddressSet;

    mapping (bytes32 => EnumerableSet.AddressSet) private _roleMembers;

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

    /**
     * @dev Returns one of the accounts that have `role`. `index` must be a
     * value between 0 and {getRoleMemberCount}, non-inclusive.
     *
     * Role bearers are not sorted in any particular way, and their ordering may
     * change at any point.
     *
     * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure
     * you perform all queries on the same block. See the following
     * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post]
     * for more information.
     */
    function getRoleMember(bytes32 role, uint256 index) public view override returns (address) {
        return _roleMembers[role].at(index);
    }

    /**
     * @dev Returns the number of accounts that have `role`. Can be used
     * together with {getRoleMember} to enumerate all bearers of a role.
     */
    function getRoleMemberCount(bytes32 role) public view override returns (uint256) {
        return _roleMembers[role].length();
    }

    /**
     * @dev Overload {grantRole} to track enumerable memberships
     */
    function grantRole(bytes32 role, address account) public virtual override {
        super.grantRole(role, account);
        _roleMembers[role].add(account);
    }

    /**
     * @dev Overload {revokeRole} to track enumerable memberships
     */
    function revokeRole(bytes32 role, address account) public virtual override {
        super.revokeRole(role, account);
        _roleMembers[role].remove(account);
    }

    /**
     * @dev Overload {renounceRole} to track enumerable memberships
     */
    function renounceRole(bytes32 role, address account) public virtual override {
        super.renounceRole(role, account);
        _roleMembers[role].remove(account);
    }

    /**
     * @dev Overload {_setupRole} to track enumerable memberships
     */
    function _setupRole(bytes32 role, address account) internal virtual override {
        super._setupRole(role, account);
        _roleMembers[role].add(account);
    }
}

File 7 of 20 : Pausable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

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

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

    bool private _paused;

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

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

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

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

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

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

File 8 of 20 : 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 9 of 20 : 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 10 of 20 : 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 11 of 20 : 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 12 of 20 : ERC721Pausable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

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

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

File 13 of 20 : 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 14 of 20 : 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 15 of 20 : 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 16 of 20 : 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 17 of 20 : 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 18 of 20 : 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 19 of 20 : 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 20 of 20 : EnumerableSet.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev Library for managing
 * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
 * types.
 *
 * Sets have the following properties:
 *
 * - Elements are added, removed, and checked for existence in constant time
 * (O(1)).
 * - Elements are enumerated in O(n). No guarantees are made on the ordering.
 *
 * ```
 * contract Example {
 *     // Add the library methods
 *     using EnumerableSet for EnumerableSet.AddressSet;
 *
 *     // Declare a set state variable
 *     EnumerableSet.AddressSet private mySet;
 * }
 * ```
 *
 * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)
 * and `uint256` (`UintSet`) are supported.
 */
library EnumerableSet {
    // To implement this library for multiple types with as little code
    // repetition as possible, we write it in terms of a generic Set type with
    // bytes32 values.
    // The Set implementation uses private functions, and user-facing
    // implementations (such as AddressSet) are just wrappers around the
    // underlying Set.
    // This means that we can only create new EnumerableSets for types that fit
    // in bytes32.

    struct Set {
        // Storage of set values
        bytes32[] _values;

        // Position of the value in the `values` array, plus 1 because index 0
        // means a value is not in the set.
        mapping (bytes32 => uint256) _indexes;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function _add(Set storage set, bytes32 value) private returns (bool) {
        if (!_contains(set, value)) {
            set._values.push(value);
            // The value is stored at length-1, but we add 1 to all indexes
            // and use 0 as a sentinel value
            set._indexes[value] = set._values.length;
            return true;
        } else {
            return false;
        }
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function _remove(Set storage set, bytes32 value) private returns (bool) {
        // We read and store the value's index to prevent multiple reads from the same storage slot
        uint256 valueIndex = set._indexes[value];

        if (valueIndex != 0) { // Equivalent to contains(set, value)
            // To delete an element from the _values array in O(1), we swap the element to delete with the last one in
            // the array, and then remove the last element (sometimes called as 'swap and pop').
            // This modifies the order of the array, as noted in {at}.

            uint256 toDeleteIndex = valueIndex - 1;
            uint256 lastIndex = set._values.length - 1;

            // When the value to delete is the last one, the swap operation is unnecessary. However, since this occurs
            // so rarely, we still do the swap anyway to avoid the gas cost of adding an 'if' statement.

            bytes32 lastvalue = set._values[lastIndex];

            // Move the last value to the index where the value to delete is
            set._values[toDeleteIndex] = lastvalue;
            // Update the index for the moved value
            set._indexes[lastvalue] = valueIndex; // Replace lastvalue's index to valueIndex

            // Delete the slot where the moved value was stored
            set._values.pop();

            // Delete the index for the deleted slot
            delete set._indexes[value];

            return true;
        } else {
            return false;
        }
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function _contains(Set storage set, bytes32 value) private view returns (bool) {
        return set._indexes[value] != 0;
    }

    /**
     * @dev Returns the number of values on the set. O(1).
     */
    function _length(Set storage set) private view returns (uint256) {
        return set._values.length;
    }

   /**
    * @dev Returns the value stored at position `index` in the set. O(1).
    *
    * Note that there are no guarantees on the ordering of values inside the
    * array, and it may change when more values are added or removed.
    *
    * Requirements:
    *
    * - `index` must be strictly less than {length}.
    */
    function _at(Set storage set, uint256 index) private view returns (bytes32) {
        require(set._values.length > index, "EnumerableSet: index out of bounds");
        return set._values[index];
    }

    // Bytes32Set

    struct Bytes32Set {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {
        return _add(set._inner, value);
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {
        return _remove(set._inner, value);
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {
        return _contains(set._inner, value);
    }

    /**
     * @dev Returns the number of values in the set. O(1).
     */
    function length(Bytes32Set storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

   /**
    * @dev Returns the value stored at position `index` in the set. O(1).
    *
    * Note that there are no guarantees on the ordering of values inside the
    * array, and it may change when more values are added or removed.
    *
    * Requirements:
    *
    * - `index` must be strictly less than {length}.
    */
    function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {
        return _at(set._inner, index);
    }

    // AddressSet

    struct AddressSet {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(AddressSet storage set, address value) internal returns (bool) {
        return _add(set._inner, bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(AddressSet storage set, address value) internal returns (bool) {
        return _remove(set._inner, bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(AddressSet storage set, address value) internal view returns (bool) {
        return _contains(set._inner, bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Returns the number of values in the set. O(1).
     */
    function length(AddressSet storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

   /**
    * @dev Returns the value stored at position `index` in the set. O(1).
    *
    * Note that there are no guarantees on the ordering of values inside the
    * array, and it may change when more values are added or removed.
    *
    * Requirements:
    *
    * - `index` must be strictly less than {length}.
    */
    function at(AddressSet storage set, uint256 index) internal view returns (address) {
        return address(uint160(uint256(_at(set._inner, index))));
    }


    // UintSet

    struct UintSet {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(UintSet storage set, uint256 value) internal returns (bool) {
        return _add(set._inner, bytes32(value));
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(UintSet storage set, uint256 value) internal returns (bool) {
        return _remove(set._inner, bytes32(value));
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(UintSet storage set, uint256 value) internal view returns (bool) {
        return _contains(set._inner, bytes32(value));
    }

    /**
     * @dev Returns the number of values on the set. O(1).
     */
    function length(UintSet storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

   /**
    * @dev Returns the value stored at position `index` in the set. O(1).
    *
    * Note that there are no guarantees on the ordering of values inside the
    * array, and it may change when more values are added or removed.
    *
    * Requirements:
    *
    * - `index` must be strictly less than {length}.
    */
    function at(UintSet storage set, uint256 index) internal view returns (uint256) {
        return uint256(_at(set._inner, index));
    }
}

Settings
{
  "remappings": [],
  "optimizer": {
    "enabled": false,
    "runs": 200
  },
  "evmVersion": "istanbul",
  "libraries": {},
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "abi"
      ]
    }
  }
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_erc721Address","type":"address"},{"internalType":"address payable","name":"_walletAddress","type":"address"},{"internalType":"uint256","name":"_cut","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"},{"indexed":true,"internalType":"address","name":"from","type":"address"}],"name":"LandBidEntered","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"},{"indexed":true,"internalType":"address","name":"from","type":"address"}],"name":"LandBidWithdrawn","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"}],"name":"LandBought","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":true,"internalType":"address","name":"from","type":"address"}],"name":"LandNoLongerForSale","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"minValue","type":"uint256"},{"indexed":true,"internalType":"address","name":"from","type":"address"}],"name":"LandOffered","type":"event"},{"inputs":[],"name":"NPOaddress1","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"NPOaddress2","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"minPrice","type":"uint256"}],"name":"acceptBidForLand","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"addressToPendingWithdrawal","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"buyLand","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"enterBidForLand","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"landIdIsForSale","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"landIdToBids","outputs":[{"internalType":"bool","name":"hasBid","type":"bool"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"address","name":"bidder","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"landIdToOfferForSale","outputs":[{"internalType":"bool","name":"isForSale","type":"bool"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"address","name":"seller","type":"address"},{"internalType":"uint256","name":"minValue","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"landNoLongerForSale","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"npoBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"minSalePriceInWei","type":"uint256"}],"name":"offerLandForSale","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"ownerBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ownerCut","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"sendBalanceToWallet","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"sendDonations","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"_address1","type":"address"},{"internalType":"address payable","name":"_address2","type":"address"}],"name":"setNonProfitAddresses","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"_address","type":"address"}],"name":"setWalletAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"withdrawBidForLand","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60806040523480156200001157600080fd5b50604051620044c2380380620044c2833981810160405281019062000037919062000441565b828282606481111562000081576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040162000078906200058d565b60405180910390fd5b8060028190555033600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060008390508073ffffffffffffffffffffffffffffffffffffffff166301ffc9a76380ac58cd60e01b6040518263ffffffff1660e01b815260040162000110919062000570565b60206040518083038186803b1580156200012957600080fd5b505afa1580156200013e573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000164919062000497565b620001a6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016200019d90620005d1565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166301ffc9a7635b5e139f60e01b6040518263ffffffff1660e01b8152600401620001e8919062000570565b60206040518083038186803b1580156200020157600080fd5b505afa15801562000216573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200023c919062000497565b6200027e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016200027590620005af565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166301ffc9a763780e9d6360e01b6040518263ffffffff1660e01b8152600401620002c0919062000570565b60206040518083038186803b158015620002d957600080fd5b505afa158015620002ee573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000314919062000497565b62000356576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016200034d90620005f3565b60405180910390fd5b80600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555082600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050505050505050620007bc565b600081519050620003f68162000754565b92915050565b6000815190506200040d816200076e565b92915050565b600081519050620004248162000788565b92915050565b6000815190506200043b81620007a2565b92915050565b6000806000606084860312156200045757600080fd5b60006200046786828701620003e5565b93505060206200047a86828701620003fc565b92505060406200048d868287016200042a565b9150509250925092565b600060208284031215620004aa57600080fd5b6000620004ba8482850162000413565b91505092915050565b620004ce816200065a565b82525050565b6000620004e360118362000615565b9150620004f082620006b0565b602082019050919050565b60006200050a601c8362000615565b91506200051782620006d9565b602082019050919050565b60006200053160148362000615565b91506200053e8262000702565b602082019050919050565b600062000558601e8362000615565b915062000565826200072b565b602082019050919050565b6000602082019050620005876000830184620004c3565b92915050565b60006020820190508181036000830152620005a881620004d4565b9050919050565b60006020820190508181036000830152620005ca81620004fb565b9050919050565b60006020820190508181036000830152620005ec8162000522565b9050919050565b600060208201905081810360008301526200060e8162000549565b9050919050565b600082825260208201905092915050565b6000620006338262000686565b9050919050565b6000620006478262000686565b9050919050565b60008115159050919050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b7f494e56414c49445f4f574e45525f435554000000000000000000000000000000600082015250565b7f4552433732314d65746164617461206e6f7420737570706f7274656400000000600082015250565b7f455243373231206e6f7420737570706f72746564000000000000000000000000600082015250565b7f455243373231456e756d657261626c65206e6f7420737570706f727465640000600082015250565b6200075f8162000626565b81146200076b57600080fd5b50565b62000779816200063a565b81146200078557600080fd5b50565b62000793816200064e565b81146200079f57600080fd5b50565b620007ad81620006a6565b8114620007b957600080fd5b50565b613cf680620007cc6000396000f3fe60806040526004361061012a5760003560e01c80637d63dbb9116100ab578063ac8e49661161006f578063ac8e4966146103e9578063bedcf00314610412578063cad65b701461043d578063ced3955814610454578063df96ab4414610470578063fada3dee146104995761012a565b80637d63dbb91461031057806383b5ff8b1461035057806398373d2c1461037b578063997c16b014610397578063ac1a386a146103c05761012a565b80634c5e5f8f116100f25780634c5e5f8f1461021457806358d63b94146102515780635c73f0251461027c578063661877d2146102a75780636b40a593146102e75761012a565b806301ffc9a71461012f578063272d47d31461016c5780632c93f92e146101955780633ccfd60b146101c057806348e05b54146101d7575b600080fd5b34801561013b57600080fd5b5061015660048036038101906101519190612f12565b6104b0565b6040516101639190613313565b60405180910390f35b34801561017857600080fd5b50610193600480360381019061018e9190612f64565b61053c565b005b3480156101a157600080fd5b506101aa610c68565b6040516101b791906132c1565b60405180910390f35b3480156101cc57600080fd5b506101d5610c8e565b005b3480156101e357600080fd5b506101fe60048036038101906101f99190612f3b565b610d61565b60405161020b9190613313565b60405180910390f35b34801561022057600080fd5b5061023b60048036038101906102369190612e5b565b610d8e565b60405161024891906135f3565b60405180910390f35b34801561025d57600080fd5b50610266610da6565b60405161027391906132c1565b60405180910390f35b34801561028857600080fd5b50610291610dcc565b60405161029e91906135f3565b60405180910390f35b3480156102b357600080fd5b506102ce60048036038101906102c99190612f3b565b610dd2565b6040516102de949392919061332e565b60405180910390f35b3480156102f357600080fd5b5061030e60048036038101906103099190612f3b565b610e2f565b005b34801561031c57600080fd5b5061033760048036038101906103329190612f3b565b6112f0565b604051610347949392919061332e565b60405180910390f35b34801561035c57600080fd5b5061036561134d565b60405161037291906135f3565b60405180910390f35b61039560048036038101906103909190612f3b565b611353565b005b3480156103a357600080fd5b506103be60048036038101906103b99190612ed6565b611840565b005b3480156103cc57600080fd5b506103e760048036038101906103e29190612ead565b611956565b005b3480156103f557600080fd5b50610410600480360381019061040b9190612f3b565b611a30565b005b34801561041e57600080fd5b50610427611de5565b60405161043491906135f3565b60405180910390f35b34801561044957600080fd5b50610452611deb565b005b61046e60048036038101906104699190612f3b565b612027565b005b34801561047c57600080fd5b5061049760048036038101906104929190612f64565b61277b565b005b3480156104a557600080fd5b506104ae612c75565b005b60007fac8e4966e9c2ae151463907194fec3da37f4197fa797e33fb866aff060dcbea97f5a23eda13058d8963a7181770d6ab6c1c74b835e25f8dc388f28723e277fe9e4187bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146105cc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105c3906134f3565b60405180910390fd5b3373ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16636352211e846040518263ffffffff1660e01b815260040161063e91906135f3565b60206040518083038186803b15801561065657600080fd5b505afa15801561066a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061068e9190612e84565b73ffffffffffffffffffffffffffffffffffffffff16148061078557503073ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663081812fc846040518263ffffffff1660e01b815260040161071d91906135f3565b60206040518083038186803b15801561073557600080fd5b505afa158015610749573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061076d9190612e84565b73ffffffffffffffffffffffffffffffffffffffff16145b6107c4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107bb90613533565b60405180910390fd5b6000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16636352211e846040518263ffffffff1660e01b815260040161082191906135f3565b60206040518083038186803b15801561083957600080fd5b505afa15801561084d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108719190612e84565b90506000600960008581526020019081526020016000206040518060800160405290816000820160009054906101000a900460ff16151515158152602001600182015481526020016002820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200160038201548152505090506000816060015111610961576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161095890613453565b60405180910390fd5b82816060015110156109a8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161099f906134d3565b60405180910390fd5b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166342842e0e838360400151876040518463ffffffff1660e01b8152600401610a0b939291906132dc565b600060405180830381600087803b158015610a2557600080fd5b505af1158015610a39573d6000803e3d6000fd5b505050506000816060015190506040518060800160405280600015158152602001868152602001600073ffffffffffffffffffffffffffffffffffffffff16815260200160008152506009600087815260200190815260200160002060008201518160000160006101000a81548160ff0219169083151502179055506020820151816001015560408201518160020160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550606082015181600301559050506000606460025483610b2591906136b1565b610b2f9190613680565b905060008183610b3f919061370b565b905080600a60008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254610b90919061362a565b9250508190555060006064605084610ba891906136b1565b610bb29190613680565b90508060016000828254610bc6919061362a565b925050819055508083610bd9919061370b565b600080828254610be9919061362a565b92505081905550846040015173ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff16897fb2979fc0a58f29d0d68edbb6e025ad22d178bc8e70918cf06b8c258575c9650b8860600151604051610c5691906135f3565b60405180910390a45050505050505050565b600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000600a60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490506000600a60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055503373ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050158015610d5d573d6000803e3d6000fd5b5050565b60006008600083815260200190815260200160002060000160009054906101000a900460ff169050919050565b600a6020528060005260406000206000915090505481565b600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60015481565b60086020528060005260406000206000915090508060000160009054906101000a900460ff16908060010154908060020160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060030154905084565b600073ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16636352211e836040518263ffffffff1660e01b8152600401610ea291906135f3565b60206040518083038186803b158015610eba57600080fd5b505afa158015610ece573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ef29190612e84565b73ffffffffffffffffffffffffffffffffffffffff161415610f49576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f40906133d3565b60405180910390fd5b3373ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16636352211e836040518263ffffffff1660e01b8152600401610fbb91906135f3565b60206040518083038186803b158015610fd357600080fd5b505afa158015610fe7573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061100b9190612e84565b73ffffffffffffffffffffffffffffffffffffffff161415611062576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161105990613593565b60405180910390fd5b6000600960008381526020019081526020016000206040518060800160405290816000820160009054906101000a900460ff16151515158152602001600182015481526020016002820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200160038201548152505090503373ffffffffffffffffffffffffffffffffffffffff16816040015173ffffffffffffffffffffffffffffffffffffffff161461117b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611172906133f3565b60405180910390fd5b6000816060015190506040518060800160405280600015158152602001848152602001600073ffffffffffffffffffffffffffffffffffffffff16815260200160008152506009600085815260200190815260200160002060008201518160000160006101000a81548160ff0219169083151502179055506020820151816001015560408201518160020160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550606082015181600301559050503373ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050158015611297573d6000803e3d6000fd5b503373ffffffffffffffffffffffffffffffffffffffff16837fff5845ffef2184f7e6e00a0c9adec993bd1c799d0acaf87db14f90e2e1540bff84606001516040516112e391906135f3565b60405180910390a3505050565b60096020528060005260406000206000915090508060000160009054906101000a900460ff16908060010154908060020160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060030154905084565b60025481565b600073ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16636352211e836040518263ffffffff1660e01b81526004016113c691906135f3565b60206040518083038186803b1580156113de57600080fd5b505afa1580156113f2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114169190612e84565b73ffffffffffffffffffffffffffffffffffffffff16141561146d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611464906135d3565b60405180910390fd5b3373ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16636352211e836040518263ffffffff1660e01b81526004016114df91906135f3565b60206040518083038186803b1580156114f757600080fd5b505afa15801561150b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061152f9190612e84565b73ffffffffffffffffffffffffffffffffffffffff161415611586576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161157d90613553565b60405180910390fd5b600034116115c9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016115c090613373565b60405180910390fd5b6000600960008381526020019081526020016000206040518060800160405290816000820160009054906101000a900460ff16151515158152602001600182015481526020016002820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016003820154815250509050806060015134116116b6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116ad90613573565b60405180910390fd5b600081606001511115611722578060600151600a6000836040015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825461171a919061362a565b925050819055505b60405180608001604052806001151581526020018381526020013373ffffffffffffffffffffffffffffffffffffffff168152602001348152506009600084815260200190815260200160002060008201518160000160006101000a81548160ff0219169083151502179055506020820151816001015560408201518160020160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550606082015181600301559050503373ffffffffffffffffffffffffffffffffffffffff16827f9d0e95d43deb504aea78ea1851bcfdbc424f62b2f3b78e13dba385185afa61c03460405161183491906135f3565b60405180910390a35050565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146118d0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016118c7906135b3565b60405180910390fd5b81600660006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600760006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146119e6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119dd906135b3565b60405180910390fd5b600081905080600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050565b3373ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16636352211e836040518263ffffffff1660e01b8152600401611aa291906135f3565b60206040518083038186803b158015611aba57600080fd5b505afa158015611ace573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611af29190612e84565b73ffffffffffffffffffffffffffffffffffffffff161480611be957503073ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663081812fc836040518263ffffffff1660e01b8152600401611b8191906135f3565b60206040518083038186803b158015611b9957600080fd5b505afa158015611bad573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611bd19190612e84565b73ffffffffffffffffffffffffffffffffffffffff16145b611c28576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c1f90613473565b60405180910390fd5b60405180608001604052806000151581526020018281526020013373ffffffffffffffffffffffffffffffffffffffff16815260200160008152506008600083815260200190815260200160002060008201518160000160006101000a81548160ff0219169083151502179055506020820151816001015560408201518160020160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060608201518160030155905050600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16636352211e826040518263ffffffff1660e01b8152600401611d4f91906135f3565b60206040518083038186803b158015611d6757600080fd5b505afa158015611d7b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d9f9190612e84565b73ffffffffffffffffffffffffffffffffffffffff16817f27dfd15738fda72de82847031f1cb897fae699bc144fcf44a88a422fdcabbcca60405160405180910390a350565b60005481565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611e7b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611e72906135b3565b60405180910390fd5b600060015411611ec0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611eb790613513565b60405180910390fd5b6000600154905060006001819055506000600282611ede9190613680565b90506000600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1682604051611f28906132ac565b60006040518083038185875af1925050503d8060008114611f65576040519150601f19603f3d011682016040523d82523d6000602084013e611f6a565b606091505b5050905080611f7857600080fd5b60008284611f86919061370b565b90506000600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1682604051611fd0906132ac565b60006040518083038185875af1925050503d806000811461200d576040519150601f19603f3d011682016040523d82523d6000602084013e612012565b606091505b505090508061202057600080fd5b5050505050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16636352211e826040518263ffffffff1660e01b815260040161208291906135f3565b60206040518083038186803b15801561209a57600080fd5b505afa1580156120ae573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120d29190612e84565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415612140576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161213790613393565b60405180910390fd5b6000600860008381526020019081526020016000206040518060800160405290816000820160009054906101000a900460ff16151515158152602001600182015481526020016002820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016003820154815250509050806000015161222b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612222906134b3565b60405180910390fd5b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16636352211e836040518263ffffffff1660e01b815260040161228691906135f3565b60206040518083038186803b15801561229e57600080fd5b505afa1580156122b2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122d69190612e84565b73ffffffffffffffffffffffffffffffffffffffff16816040015173ffffffffffffffffffffffffffffffffffffffff1614612347576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161233e906133b3565b60405180910390fd5b806060015134101561238e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161238590613493565b60405180910390fd5b600081604001519050600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166342842e0e8233866040518463ffffffff1660e01b81526004016123f6939291906132dc565b600060405180830381600087803b15801561241057600080fd5b505af1158015612424573d6000803e3d6000fd5b50505050600060646002543461243a91906136b1565b6124449190613680565b905060008134612454919061370b565b905080600a60008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546124a5919061362a565b92505081905550600060646050846124bd91906136b1565b6124c79190613680565b905080600160008282546124db919061362a565b9250508190555080836124ee919061370b565b6000808282546124fe919061362a565b925050819055503373ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16877fb2979fc0a58f29d0d68edbb6e025ad22d178bc8e70918cf06b8c258575c9650b3460405161256391906135f3565b60405180910390a46000600960008881526020019081526020016000206040518060800160405290816000820160009054906101000a900460ff16151515158152602001600182015481526020016002820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200160038201548152505090503373ffffffffffffffffffffffffffffffffffffffff16816040015173ffffffffffffffffffffffffffffffffffffffff161415612772578060600151600a60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825461269d919061362a565b925050819055506040518060800160405280600015158152602001888152602001600073ffffffffffffffffffffffffffffffffffffffff16815260200160008152506009600089815260200190815260200160002060008201518160000160006101000a81548160ff0219169083151502179055506020820151816001015560408201518160020160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550606082015181600301559050505b50505050505050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461280b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161280290613433565b60405180910390fd5b3373ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16636352211e846040518263ffffffff1660e01b815260040161287d91906135f3565b60206040518083038186803b15801561289557600080fd5b505afa1580156128a9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906128cd9190612e84565b73ffffffffffffffffffffffffffffffffffffffff1614806129c457503073ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663081812fc846040518263ffffffff1660e01b815260040161295c91906135f3565b60206040518083038186803b15801561297457600080fd5b505afa158015612988573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906129ac9190612e84565b73ffffffffffffffffffffffffffffffffffffffff16145b612a03576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016129fa90613413565b60405180910390fd5b6040518060800160405280600115158152602001838152602001600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16636352211e856040518263ffffffff1660e01b8152600401612a7891906135f3565b60206040518083038186803b158015612a9057600080fd5b505afa158015612aa4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612ac89190612e84565b73ffffffffffffffffffffffffffffffffffffffff168152602001828152506008600084815260200190815260200160002060008201518160000160006101000a81548160ff0219169083151502179055506020820151816001015560408201518160020160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060608201518160030155905050600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16636352211e836040518263ffffffff1660e01b8152600401612bd391906135f3565b60206040518083038186803b158015612beb57600080fd5b505afa158015612bff573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612c239190612e84565b73ffffffffffffffffffffffffffffffffffffffff16827f7909bd0ef8c98da22af7681103faed8091e55c4b049b43f10fcb740891e2108983604051612c6991906135f3565b60405180910390a35050565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614612d05576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612cfc906135b3565b60405180910390fd5b6000805411612d49576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612d4090613513565b60405180910390fd5b600080549050600080819055506000600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1682604051612d9e906132ac565b60006040518083038185875af1925050503d8060008114612ddb576040519150601f19603f3d011682016040523d82523d6000602084013e612de0565b606091505b5050905080612dee57600080fd5b5050565b600081359050612e0181613c64565b92915050565b600081519050612e1681613c64565b92915050565b600081359050612e2b81613c7b565b92915050565b600081359050612e4081613c92565b92915050565b600081359050612e5581613ca9565b92915050565b600060208284031215612e6d57600080fd5b6000612e7b84828501612df2565b91505092915050565b600060208284031215612e9657600080fd5b6000612ea484828501612e07565b91505092915050565b600060208284031215612ebf57600080fd5b6000612ecd84828501612e1c565b91505092915050565b60008060408385031215612ee957600080fd5b6000612ef785828601612e1c565b9250506020612f0885828601612e1c565b9150509250929050565b600060208284031215612f2457600080fd5b6000612f3284828501612e31565b91505092915050565b600060208284031215612f4d57600080fd5b6000612f5b84828501612e46565b91505092915050565b60008060408385031215612f7757600080fd5b6000612f8585828601612e46565b9250506020612f9685828601612e46565b9150509250929050565b612fa98161373f565b82525050565b612fb881613763565b82525050565b6000612fcb601283613619565b9150612fd682613823565b602082019050919050565b6000612fee601a83613619565b9150612ff98261384c565b602082019050919050565b6000613011602983613619565b915061301c82613875565b604082019050919050565b6000613034601283613619565b915061303f826138c4565b602082019050919050565b6000613057602283613619565b9150613062826138ed565b604082019050919050565b600061307a602183613619565b91506130858261393c565b604082019050919050565b600061309d602d83613619565b91506130a88261398b565b604082019050919050565b60006130c0601183613619565b91506130cb826139da565b602082019050919050565b60006130e3602483613619565b91506130ee82613a03565b604082019050919050565b6000613106601283613619565b915061311182613a52565b602082019050919050565b6000613129601483613619565b915061313482613a7b565b602082019050919050565b600061314c601083613619565b915061315782613aa4565b602082019050919050565b600061316f602d83613619565b915061317a82613acd565b604082019050919050565b6000613192601283613619565b915061319d82613b1c565b602082019050919050565b60006131b5601383613619565b91506131c082613b45565b602082019050919050565b60006131d860008361360e565b91506131e382613b6e565b600082019050919050565b60006131fb601883613619565b915061320682613b71565b602082019050919050565b600061321e602283613619565b915061322982613b9a565b604082019050919050565b6000613241601883613619565b915061324c82613be9565b602082019050919050565b6000613264600c83613619565b915061326f82613c12565b602082019050919050565b6000613287601283613619565b915061329282613c3b565b602082019050919050565b6132a6816137bb565b82525050565b60006132b7826131cb565b9150819050919050565b60006020820190506132d66000830184612fa0565b92915050565b60006060820190506132f16000830186612fa0565b6132fe6020830185612fa0565b61330b604083018461329d565b949350505050565b60006020820190506133286000830184612faf565b92915050565b60006080820190506133436000830187612faf565b613350602083018661329d565b61335d6040830185612fa0565b61336a606083018461329d565b95945050505050565b6000602082019050818103600083015261338c81612fbe565b9050919050565b600060208201905081810360008301526133ac81612fe1565b9050919050565b600060208201905081810360008301526133cc81613004565b9050919050565b600060208201905081810360008301526133ec81613027565b9050919050565b6000602082019050818103600083015261340c8161304a565b9050919050565b6000602082019050818103600083015261342c8161306d565b9050919050565b6000602082019050818103600083015261344c81613090565b9050919050565b6000602082019050818103600083015261346c816130b3565b9050919050565b6000602082019050818103600083015261348c816130d6565b9050919050565b600060208201905081810360008301526134ac816130f9565b9050919050565b600060208201905081810360008301526134cc8161311c565b9050919050565b600060208201905081810360008301526134ec8161313f565b9050919050565b6000602082019050818103600083015261350c81613162565b9050919050565b6000602082019050818103600083015261352c81613185565b9050919050565b6000602082019050818103600083015261354c816131a8565b9050919050565b6000602082019050818103600083015261356c816131ee565b9050919050565b6000602082019050818103600083015261358c81613211565b9050919050565b600060208201905081810360008301526135ac81613234565b9050919050565b600060208201905081810360008301526135cc81613257565b9050919050565b600060208201905081810360008301526135ec8161327a565b9050919050565b6000602082019050613608600083018461329d565b92915050565b600081905092915050565b600082825260208201905092915050565b6000613635826137bb565b9150613640836137bb565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115613675576136746137c5565b5b828201905092915050565b600061368b826137bb565b9150613696836137bb565b9250826136a6576136a56137f4565b5b828204905092915050565b60006136bc826137bb565b91506136c7836137bb565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615613700576136ff6137c5565b5b828202905092915050565b6000613716826137bb565b9150613721836137bb565b925082821015613734576137336137c5565b5b828203905092915050565b600061374a8261379b565b9050919050565b600061375c8261379b565b9050919050565b60008115159050919050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f416d6f756e74206d757374206265203e20300000000000000000000000000000600082015250565b7f596f752063616e742062757920796f7572206f776e206c616e64000000000000600082015250565b7f53656c6c6572206973206e6f206c6f6e67657220746865206f776e6572206f6660008201527f20746865206974656d0000000000000000000000000000000000000000000000602082015250565b7f53656e6465722063616e74206265203078300000000000000000000000000000600082015250565b7f4f6e6c79206269646465722063616e207769746864726177207468656972206260008201527f6964000000000000000000000000000000000000000000000000000000000000602082015250565b7f4f6e6c79206f776e65722063616e20616464206974656d2066726f6d2073616c60008201527f6500000000000000000000000000000000000000000000000000000000000000602082015250565b7f557365204d617273436f6e7472616374426173653a6f666665724c616e64466f60008201527f7253616c6520696e737465616400000000000000000000000000000000000000602082015250565b7f56616c7565206d757374206265203e2030000000000000000000000000000000600082015250565b7f4f6e6c79206f776e65722063616e2072656d6f7665206974656d2066726f6d2060008201527f73616c6500000000000000000000000000000000000000000000000000000000602082015250565b7f4e6f7420656e6f7567682062616c616e63650000000000000000000000000000600082015250565b7f4974656d206973206e6f7420666f722073616c65000000000000000000000000600082015250565b7f56616c7565203c206d696e507269636500000000000000000000000000000000600082015250565b7f557365204d617273436f6e7472616374426173653a616363657074426964466f60008201527f724c616e6420696e737465616400000000000000000000000000000000000000602082015250565b7f4e6f2042616c616e636520746f2073656e640000000000000000000000000000600082015250565b7f53656e646572206973206e6f74206f776e657200000000000000000000000000600082015250565b50565b7f596f7520616c7265616479206f776e20746865206c616e640000000000000000600082015250565b7f416d6f756e74206d757374206265203e207468616e206578697374696e67206260008201527f6964000000000000000000000000000000000000000000000000000000000000602082015250565b7f53656e6465722063616e7420626520746865206f776e65720000000000000000600082015250565b7f494e56414c49445f524f4c450000000000000000000000000000000000000000600082015250565b7f4c616e64206e6f7420796574206f776e65640000000000000000000000000000600082015250565b613c6d8161373f565b8114613c7857600080fd5b50565b613c8481613751565b8114613c8f57600080fd5b50565b613c9b8161376f565b8114613ca657600080fd5b50565b613cb2816137bb565b8114613cbd57600080fd5b5056fea26469706673582212207fa7450face8dae1c9070a2dedb98f7d86a808091adb75dce55f9f8e8a46377564736f6c63430008040033000000000000000000000000467439207d53530505e5eb40edd6debbaff3e0630000000000000000000000001371fa4c5b3487547a1190374b17df909dc366dc0000000000000000000000000000000000000000000000000000000000000005

Deployed Bytecode

0x60806040526004361061012a5760003560e01c80637d63dbb9116100ab578063ac8e49661161006f578063ac8e4966146103e9578063bedcf00314610412578063cad65b701461043d578063ced3955814610454578063df96ab4414610470578063fada3dee146104995761012a565b80637d63dbb91461031057806383b5ff8b1461035057806398373d2c1461037b578063997c16b014610397578063ac1a386a146103c05761012a565b80634c5e5f8f116100f25780634c5e5f8f1461021457806358d63b94146102515780635c73f0251461027c578063661877d2146102a75780636b40a593146102e75761012a565b806301ffc9a71461012f578063272d47d31461016c5780632c93f92e146101955780633ccfd60b146101c057806348e05b54146101d7575b600080fd5b34801561013b57600080fd5b5061015660048036038101906101519190612f12565b6104b0565b6040516101639190613313565b60405180910390f35b34801561017857600080fd5b50610193600480360381019061018e9190612f64565b61053c565b005b3480156101a157600080fd5b506101aa610c68565b6040516101b791906132c1565b60405180910390f35b3480156101cc57600080fd5b506101d5610c8e565b005b3480156101e357600080fd5b506101fe60048036038101906101f99190612f3b565b610d61565b60405161020b9190613313565b60405180910390f35b34801561022057600080fd5b5061023b60048036038101906102369190612e5b565b610d8e565b60405161024891906135f3565b60405180910390f35b34801561025d57600080fd5b50610266610da6565b60405161027391906132c1565b60405180910390f35b34801561028857600080fd5b50610291610dcc565b60405161029e91906135f3565b60405180910390f35b3480156102b357600080fd5b506102ce60048036038101906102c99190612f3b565b610dd2565b6040516102de949392919061332e565b60405180910390f35b3480156102f357600080fd5b5061030e60048036038101906103099190612f3b565b610e2f565b005b34801561031c57600080fd5b5061033760048036038101906103329190612f3b565b6112f0565b604051610347949392919061332e565b60405180910390f35b34801561035c57600080fd5b5061036561134d565b60405161037291906135f3565b60405180910390f35b61039560048036038101906103909190612f3b565b611353565b005b3480156103a357600080fd5b506103be60048036038101906103b99190612ed6565b611840565b005b3480156103cc57600080fd5b506103e760048036038101906103e29190612ead565b611956565b005b3480156103f557600080fd5b50610410600480360381019061040b9190612f3b565b611a30565b005b34801561041e57600080fd5b50610427611de5565b60405161043491906135f3565b60405180910390f35b34801561044957600080fd5b50610452611deb565b005b61046e60048036038101906104699190612f3b565b612027565b005b34801561047c57600080fd5b5061049760048036038101906104929190612f64565b61277b565b005b3480156104a557600080fd5b506104ae612c75565b005b60007fac8e4966e9c2ae151463907194fec3da37f4197fa797e33fb866aff060dcbea97f5a23eda13058d8963a7181770d6ab6c1c74b835e25f8dc388f28723e277fe9e4187bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146105cc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105c3906134f3565b60405180910390fd5b3373ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16636352211e846040518263ffffffff1660e01b815260040161063e91906135f3565b60206040518083038186803b15801561065657600080fd5b505afa15801561066a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061068e9190612e84565b73ffffffffffffffffffffffffffffffffffffffff16148061078557503073ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663081812fc846040518263ffffffff1660e01b815260040161071d91906135f3565b60206040518083038186803b15801561073557600080fd5b505afa158015610749573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061076d9190612e84565b73ffffffffffffffffffffffffffffffffffffffff16145b6107c4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107bb90613533565b60405180910390fd5b6000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16636352211e846040518263ffffffff1660e01b815260040161082191906135f3565b60206040518083038186803b15801561083957600080fd5b505afa15801561084d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108719190612e84565b90506000600960008581526020019081526020016000206040518060800160405290816000820160009054906101000a900460ff16151515158152602001600182015481526020016002820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200160038201548152505090506000816060015111610961576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161095890613453565b60405180910390fd5b82816060015110156109a8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161099f906134d3565b60405180910390fd5b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166342842e0e838360400151876040518463ffffffff1660e01b8152600401610a0b939291906132dc565b600060405180830381600087803b158015610a2557600080fd5b505af1158015610a39573d6000803e3d6000fd5b505050506000816060015190506040518060800160405280600015158152602001868152602001600073ffffffffffffffffffffffffffffffffffffffff16815260200160008152506009600087815260200190815260200160002060008201518160000160006101000a81548160ff0219169083151502179055506020820151816001015560408201518160020160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550606082015181600301559050506000606460025483610b2591906136b1565b610b2f9190613680565b905060008183610b3f919061370b565b905080600a60008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254610b90919061362a565b9250508190555060006064605084610ba891906136b1565b610bb29190613680565b90508060016000828254610bc6919061362a565b925050819055508083610bd9919061370b565b600080828254610be9919061362a565b92505081905550846040015173ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff16897fb2979fc0a58f29d0d68edbb6e025ad22d178bc8e70918cf06b8c258575c9650b8860600151604051610c5691906135f3565b60405180910390a45050505050505050565b600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000600a60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490506000600a60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055503373ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050158015610d5d573d6000803e3d6000fd5b5050565b60006008600083815260200190815260200160002060000160009054906101000a900460ff169050919050565b600a6020528060005260406000206000915090505481565b600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60015481565b60086020528060005260406000206000915090508060000160009054906101000a900460ff16908060010154908060020160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060030154905084565b600073ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16636352211e836040518263ffffffff1660e01b8152600401610ea291906135f3565b60206040518083038186803b158015610eba57600080fd5b505afa158015610ece573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ef29190612e84565b73ffffffffffffffffffffffffffffffffffffffff161415610f49576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f40906133d3565b60405180910390fd5b3373ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16636352211e836040518263ffffffff1660e01b8152600401610fbb91906135f3565b60206040518083038186803b158015610fd357600080fd5b505afa158015610fe7573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061100b9190612e84565b73ffffffffffffffffffffffffffffffffffffffff161415611062576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161105990613593565b60405180910390fd5b6000600960008381526020019081526020016000206040518060800160405290816000820160009054906101000a900460ff16151515158152602001600182015481526020016002820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200160038201548152505090503373ffffffffffffffffffffffffffffffffffffffff16816040015173ffffffffffffffffffffffffffffffffffffffff161461117b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611172906133f3565b60405180910390fd5b6000816060015190506040518060800160405280600015158152602001848152602001600073ffffffffffffffffffffffffffffffffffffffff16815260200160008152506009600085815260200190815260200160002060008201518160000160006101000a81548160ff0219169083151502179055506020820151816001015560408201518160020160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550606082015181600301559050503373ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050158015611297573d6000803e3d6000fd5b503373ffffffffffffffffffffffffffffffffffffffff16837fff5845ffef2184f7e6e00a0c9adec993bd1c799d0acaf87db14f90e2e1540bff84606001516040516112e391906135f3565b60405180910390a3505050565b60096020528060005260406000206000915090508060000160009054906101000a900460ff16908060010154908060020160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060030154905084565b60025481565b600073ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16636352211e836040518263ffffffff1660e01b81526004016113c691906135f3565b60206040518083038186803b1580156113de57600080fd5b505afa1580156113f2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114169190612e84565b73ffffffffffffffffffffffffffffffffffffffff16141561146d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611464906135d3565b60405180910390fd5b3373ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16636352211e836040518263ffffffff1660e01b81526004016114df91906135f3565b60206040518083038186803b1580156114f757600080fd5b505afa15801561150b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061152f9190612e84565b73ffffffffffffffffffffffffffffffffffffffff161415611586576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161157d90613553565b60405180910390fd5b600034116115c9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016115c090613373565b60405180910390fd5b6000600960008381526020019081526020016000206040518060800160405290816000820160009054906101000a900460ff16151515158152602001600182015481526020016002820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016003820154815250509050806060015134116116b6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116ad90613573565b60405180910390fd5b600081606001511115611722578060600151600a6000836040015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825461171a919061362a565b925050819055505b60405180608001604052806001151581526020018381526020013373ffffffffffffffffffffffffffffffffffffffff168152602001348152506009600084815260200190815260200160002060008201518160000160006101000a81548160ff0219169083151502179055506020820151816001015560408201518160020160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550606082015181600301559050503373ffffffffffffffffffffffffffffffffffffffff16827f9d0e95d43deb504aea78ea1851bcfdbc424f62b2f3b78e13dba385185afa61c03460405161183491906135f3565b60405180910390a35050565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146118d0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016118c7906135b3565b60405180910390fd5b81600660006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600760006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146119e6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119dd906135b3565b60405180910390fd5b600081905080600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050565b3373ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16636352211e836040518263ffffffff1660e01b8152600401611aa291906135f3565b60206040518083038186803b158015611aba57600080fd5b505afa158015611ace573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611af29190612e84565b73ffffffffffffffffffffffffffffffffffffffff161480611be957503073ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663081812fc836040518263ffffffff1660e01b8152600401611b8191906135f3565b60206040518083038186803b158015611b9957600080fd5b505afa158015611bad573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611bd19190612e84565b73ffffffffffffffffffffffffffffffffffffffff16145b611c28576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c1f90613473565b60405180910390fd5b60405180608001604052806000151581526020018281526020013373ffffffffffffffffffffffffffffffffffffffff16815260200160008152506008600083815260200190815260200160002060008201518160000160006101000a81548160ff0219169083151502179055506020820151816001015560408201518160020160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060608201518160030155905050600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16636352211e826040518263ffffffff1660e01b8152600401611d4f91906135f3565b60206040518083038186803b158015611d6757600080fd5b505afa158015611d7b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d9f9190612e84565b73ffffffffffffffffffffffffffffffffffffffff16817f27dfd15738fda72de82847031f1cb897fae699bc144fcf44a88a422fdcabbcca60405160405180910390a350565b60005481565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611e7b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611e72906135b3565b60405180910390fd5b600060015411611ec0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611eb790613513565b60405180910390fd5b6000600154905060006001819055506000600282611ede9190613680565b90506000600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1682604051611f28906132ac565b60006040518083038185875af1925050503d8060008114611f65576040519150601f19603f3d011682016040523d82523d6000602084013e611f6a565b606091505b5050905080611f7857600080fd5b60008284611f86919061370b565b90506000600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1682604051611fd0906132ac565b60006040518083038185875af1925050503d806000811461200d576040519150601f19603f3d011682016040523d82523d6000602084013e612012565b606091505b505090508061202057600080fd5b5050505050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16636352211e826040518263ffffffff1660e01b815260040161208291906135f3565b60206040518083038186803b15801561209a57600080fd5b505afa1580156120ae573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120d29190612e84565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415612140576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161213790613393565b60405180910390fd5b6000600860008381526020019081526020016000206040518060800160405290816000820160009054906101000a900460ff16151515158152602001600182015481526020016002820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016003820154815250509050806000015161222b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612222906134b3565b60405180910390fd5b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16636352211e836040518263ffffffff1660e01b815260040161228691906135f3565b60206040518083038186803b15801561229e57600080fd5b505afa1580156122b2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122d69190612e84565b73ffffffffffffffffffffffffffffffffffffffff16816040015173ffffffffffffffffffffffffffffffffffffffff1614612347576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161233e906133b3565b60405180910390fd5b806060015134101561238e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161238590613493565b60405180910390fd5b600081604001519050600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166342842e0e8233866040518463ffffffff1660e01b81526004016123f6939291906132dc565b600060405180830381600087803b15801561241057600080fd5b505af1158015612424573d6000803e3d6000fd5b50505050600060646002543461243a91906136b1565b6124449190613680565b905060008134612454919061370b565b905080600a60008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546124a5919061362a565b92505081905550600060646050846124bd91906136b1565b6124c79190613680565b905080600160008282546124db919061362a565b9250508190555080836124ee919061370b565b6000808282546124fe919061362a565b925050819055503373ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16877fb2979fc0a58f29d0d68edbb6e025ad22d178bc8e70918cf06b8c258575c9650b3460405161256391906135f3565b60405180910390a46000600960008881526020019081526020016000206040518060800160405290816000820160009054906101000a900460ff16151515158152602001600182015481526020016002820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200160038201548152505090503373ffffffffffffffffffffffffffffffffffffffff16816040015173ffffffffffffffffffffffffffffffffffffffff161415612772578060600151600a60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825461269d919061362a565b925050819055506040518060800160405280600015158152602001888152602001600073ffffffffffffffffffffffffffffffffffffffff16815260200160008152506009600089815260200190815260200160002060008201518160000160006101000a81548160ff0219169083151502179055506020820151816001015560408201518160020160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550606082015181600301559050505b50505050505050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461280b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161280290613433565b60405180910390fd5b3373ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16636352211e846040518263ffffffff1660e01b815260040161287d91906135f3565b60206040518083038186803b15801561289557600080fd5b505afa1580156128a9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906128cd9190612e84565b73ffffffffffffffffffffffffffffffffffffffff1614806129c457503073ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663081812fc846040518263ffffffff1660e01b815260040161295c91906135f3565b60206040518083038186803b15801561297457600080fd5b505afa158015612988573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906129ac9190612e84565b73ffffffffffffffffffffffffffffffffffffffff16145b612a03576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016129fa90613413565b60405180910390fd5b6040518060800160405280600115158152602001838152602001600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16636352211e856040518263ffffffff1660e01b8152600401612a7891906135f3565b60206040518083038186803b158015612a9057600080fd5b505afa158015612aa4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612ac89190612e84565b73ffffffffffffffffffffffffffffffffffffffff168152602001828152506008600084815260200190815260200160002060008201518160000160006101000a81548160ff0219169083151502179055506020820151816001015560408201518160020160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060608201518160030155905050600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16636352211e836040518263ffffffff1660e01b8152600401612bd391906135f3565b60206040518083038186803b158015612beb57600080fd5b505afa158015612bff573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612c239190612e84565b73ffffffffffffffffffffffffffffffffffffffff16827f7909bd0ef8c98da22af7681103faed8091e55c4b049b43f10fcb740891e2108983604051612c6991906135f3565b60405180910390a35050565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614612d05576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612cfc906135b3565b60405180910390fd5b6000805411612d49576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612d4090613513565b60405180910390fd5b600080549050600080819055506000600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1682604051612d9e906132ac565b60006040518083038185875af1925050503d8060008114612ddb576040519150601f19603f3d011682016040523d82523d6000602084013e612de0565b606091505b5050905080612dee57600080fd5b5050565b600081359050612e0181613c64565b92915050565b600081519050612e1681613c64565b92915050565b600081359050612e2b81613c7b565b92915050565b600081359050612e4081613c92565b92915050565b600081359050612e5581613ca9565b92915050565b600060208284031215612e6d57600080fd5b6000612e7b84828501612df2565b91505092915050565b600060208284031215612e9657600080fd5b6000612ea484828501612e07565b91505092915050565b600060208284031215612ebf57600080fd5b6000612ecd84828501612e1c565b91505092915050565b60008060408385031215612ee957600080fd5b6000612ef785828601612e1c565b9250506020612f0885828601612e1c565b9150509250929050565b600060208284031215612f2457600080fd5b6000612f3284828501612e31565b91505092915050565b600060208284031215612f4d57600080fd5b6000612f5b84828501612e46565b91505092915050565b60008060408385031215612f7757600080fd5b6000612f8585828601612e46565b9250506020612f9685828601612e46565b9150509250929050565b612fa98161373f565b82525050565b612fb881613763565b82525050565b6000612fcb601283613619565b9150612fd682613823565b602082019050919050565b6000612fee601a83613619565b9150612ff98261384c565b602082019050919050565b6000613011602983613619565b915061301c82613875565b604082019050919050565b6000613034601283613619565b915061303f826138c4565b602082019050919050565b6000613057602283613619565b9150613062826138ed565b604082019050919050565b600061307a602183613619565b91506130858261393c565b604082019050919050565b600061309d602d83613619565b91506130a88261398b565b604082019050919050565b60006130c0601183613619565b91506130cb826139da565b602082019050919050565b60006130e3602483613619565b91506130ee82613a03565b604082019050919050565b6000613106601283613619565b915061311182613a52565b602082019050919050565b6000613129601483613619565b915061313482613a7b565b602082019050919050565b600061314c601083613619565b915061315782613aa4565b602082019050919050565b600061316f602d83613619565b915061317a82613acd565b604082019050919050565b6000613192601283613619565b915061319d82613b1c565b602082019050919050565b60006131b5601383613619565b91506131c082613b45565b602082019050919050565b60006131d860008361360e565b91506131e382613b6e565b600082019050919050565b60006131fb601883613619565b915061320682613b71565b602082019050919050565b600061321e602283613619565b915061322982613b9a565b604082019050919050565b6000613241601883613619565b915061324c82613be9565b602082019050919050565b6000613264600c83613619565b915061326f82613c12565b602082019050919050565b6000613287601283613619565b915061329282613c3b565b602082019050919050565b6132a6816137bb565b82525050565b60006132b7826131cb565b9150819050919050565b60006020820190506132d66000830184612fa0565b92915050565b60006060820190506132f16000830186612fa0565b6132fe6020830185612fa0565b61330b604083018461329d565b949350505050565b60006020820190506133286000830184612faf565b92915050565b60006080820190506133436000830187612faf565b613350602083018661329d565b61335d6040830185612fa0565b61336a606083018461329d565b95945050505050565b6000602082019050818103600083015261338c81612fbe565b9050919050565b600060208201905081810360008301526133ac81612fe1565b9050919050565b600060208201905081810360008301526133cc81613004565b9050919050565b600060208201905081810360008301526133ec81613027565b9050919050565b6000602082019050818103600083015261340c8161304a565b9050919050565b6000602082019050818103600083015261342c8161306d565b9050919050565b6000602082019050818103600083015261344c81613090565b9050919050565b6000602082019050818103600083015261346c816130b3565b9050919050565b6000602082019050818103600083015261348c816130d6565b9050919050565b600060208201905081810360008301526134ac816130f9565b9050919050565b600060208201905081810360008301526134cc8161311c565b9050919050565b600060208201905081810360008301526134ec8161313f565b9050919050565b6000602082019050818103600083015261350c81613162565b9050919050565b6000602082019050818103600083015261352c81613185565b9050919050565b6000602082019050818103600083015261354c816131a8565b9050919050565b6000602082019050818103600083015261356c816131ee565b9050919050565b6000602082019050818103600083015261358c81613211565b9050919050565b600060208201905081810360008301526135ac81613234565b9050919050565b600060208201905081810360008301526135cc81613257565b9050919050565b600060208201905081810360008301526135ec8161327a565b9050919050565b6000602082019050613608600083018461329d565b92915050565b600081905092915050565b600082825260208201905092915050565b6000613635826137bb565b9150613640836137bb565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115613675576136746137c5565b5b828201905092915050565b600061368b826137bb565b9150613696836137bb565b9250826136a6576136a56137f4565b5b828204905092915050565b60006136bc826137bb565b91506136c7836137bb565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615613700576136ff6137c5565b5b828202905092915050565b6000613716826137bb565b9150613721836137bb565b925082821015613734576137336137c5565b5b828203905092915050565b600061374a8261379b565b9050919050565b600061375c8261379b565b9050919050565b60008115159050919050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f416d6f756e74206d757374206265203e20300000000000000000000000000000600082015250565b7f596f752063616e742062757920796f7572206f776e206c616e64000000000000600082015250565b7f53656c6c6572206973206e6f206c6f6e67657220746865206f776e6572206f6660008201527f20746865206974656d0000000000000000000000000000000000000000000000602082015250565b7f53656e6465722063616e74206265203078300000000000000000000000000000600082015250565b7f4f6e6c79206269646465722063616e207769746864726177207468656972206260008201527f6964000000000000000000000000000000000000000000000000000000000000602082015250565b7f4f6e6c79206f776e65722063616e20616464206974656d2066726f6d2073616c60008201527f6500000000000000000000000000000000000000000000000000000000000000602082015250565b7f557365204d617273436f6e7472616374426173653a6f666665724c616e64466f60008201527f7253616c6520696e737465616400000000000000000000000000000000000000602082015250565b7f56616c7565206d757374206265203e2030000000000000000000000000000000600082015250565b7f4f6e6c79206f776e65722063616e2072656d6f7665206974656d2066726f6d2060008201527f73616c6500000000000000000000000000000000000000000000000000000000602082015250565b7f4e6f7420656e6f7567682062616c616e63650000000000000000000000000000600082015250565b7f4974656d206973206e6f7420666f722073616c65000000000000000000000000600082015250565b7f56616c7565203c206d696e507269636500000000000000000000000000000000600082015250565b7f557365204d617273436f6e7472616374426173653a616363657074426964466f60008201527f724c616e6420696e737465616400000000000000000000000000000000000000602082015250565b7f4e6f2042616c616e636520746f2073656e640000000000000000000000000000600082015250565b7f53656e646572206973206e6f74206f776e657200000000000000000000000000600082015250565b50565b7f596f7520616c7265616479206f776e20746865206c616e640000000000000000600082015250565b7f416d6f756e74206d757374206265203e207468616e206578697374696e67206260008201527f6964000000000000000000000000000000000000000000000000000000000000602082015250565b7f53656e6465722063616e7420626520746865206f776e65720000000000000000600082015250565b7f494e56414c49445f524f4c450000000000000000000000000000000000000000600082015250565b7f4c616e64206e6f7420796574206f776e65640000000000000000000000000000600082015250565b613c6d8161373f565b8114613c7857600080fd5b50565b613c8481613751565b8114613c8f57600080fd5b50565b613c9b8161376f565b8114613ca657600080fd5b50565b613cb2816137bb565b8114613cbd57600080fd5b5056fea26469706673582212207fa7450face8dae1c9070a2dedb98f7d86a808091adb75dce55f9f8e8a46377564736f6c63430008040033

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

000000000000000000000000467439207d53530505e5eb40edd6debbaff3e0630000000000000000000000001371fa4c5b3487547a1190374b17df909dc366dc0000000000000000000000000000000000000000000000000000000000000005

-----Decoded View---------------
Arg [0] : _erc721Address (address): 0x467439207d53530505E5Eb40eDD6deBBAfF3e063
Arg [1] : _walletAddress (address): 0x1371Fa4c5B3487547a1190374b17dF909Dc366dC
Arg [2] : _cut (uint256): 5

-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 000000000000000000000000467439207d53530505e5eb40edd6debbaff3e063
Arg [1] : 0000000000000000000000001371fa4c5b3487547a1190374b17df909dc366dc
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000005


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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

Validator Index Block Amount
View All Withdrawals

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

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