ETH Price: $2,678.38 (+1.63%)
Gas: 1 Gwei

Contract

0xc94674964E755EE3Cc8123A86f90Fa60A06f4DFd
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Safe Transfer Fr...194777972024-03-20 18:48:59143 days ago1710960539IN
0xc9467496...0A06f4DFd
0 ETH0.0078483436.71017954
Safe Transfer Fr...194777912024-03-20 18:47:47143 days ago1710960467IN
0xc9467496...0A06f4DFd
0 ETH0.0066363730.71941291
Set Approval For...189093242024-01-01 1:27:23223 days ago1704072443IN
0xc9467496...0A06f4DFd
0 ETH0.0004726310.11196328
Safe Transfer Fr...180229342023-08-29 21:24:23347 days ago1693344263IN
0xc9467496...0A06f4DFd
0 ETH0.0068527428.89354604
Safe Transfer Fr...177009022023-07-15 19:41:23392 days ago1689450083IN
0xc9467496...0A06f4DFd
0 ETH0.0005245613.18065757
Set Approval For...171617042023-04-30 22:02:23468 days ago1682892143IN
0xc9467496...0A06f4DFd
0 ETH0.0020308743.46166822
Set Approval For...170085322023-04-09 4:57:23490 days ago1681016243IN
0xc9467496...0A06f4DFd
0 ETH0.00052721.22609179
Set Approval For...166748282023-02-21 5:34:35537 days ago1676957675IN
0xc9467496...0A06f4DFd
0 ETH0.0013656329.27035557
Set Approval For...163471492023-01-06 10:28:47582 days ago1673000927IN
0xc9467496...0A06f4DFd
0 ETH0.0007164715.32904443
Set Approval For...163099952023-01-01 6:02:23588 days ago1672552943IN
0xc9467496...0A06f4DFd
0 ETH0.0006953814.87764127
Set Approval For...162853332022-12-28 19:26:11591 days ago1672255571IN
0xc9467496...0A06f4DFd
0 ETH0.0012293326.30828693
Set Approval For...162662152022-12-26 3:22:59594 days ago1672024979IN
0xc9467496...0A06f4DFd
0 ETH0.0005487111.73974558
Set Approval For...161053062022-12-03 15:53:23616 days ago1670082803IN
0xc9467496...0A06f4DFd
0 ETH0.0002957511.91207354
Set Approval For...154932692022-09-07 23:55:19703 days ago1662594919IN
0xc9467496...0A06f4DFd
0 ETH0.000247189.95608764
Set Approval For...153946692022-08-23 5:08:49719 days ago1661231329IN
0xc9467496...0A06f4DFd
0 ETH0.000179077.21249099
Set Approval For...153927022022-08-22 21:41:29719 days ago1661204489IN
0xc9467496...0A06f4DFd
0 ETH0.0005975312.78423573
Set Approval For...153884762022-08-22 5:35:43720 days ago1661146543IN
0xc9467496...0A06f4DFd
0 ETH0.000304916.52357573
Set Approval For...153882562022-08-22 4:45:57720 days ago1661143557IN
0xc9467496...0A06f4DFd
0 ETH0.000306176.56233286
Set Approval For...153695722022-08-19 5:37:31723 days ago1660887451IN
0xc9467496...0A06f4DFd
0 ETH0.000208648.40343502
Set Approval For...153620612022-08-18 1:13:20724 days ago1660785200IN
0xc9467496...0A06f4DFd
0 ETH0.0005619422.63359044
Set Approval For...153613392022-08-17 22:33:39724 days ago1660775619IN
0xc9467496...0A06f4DFd
0 ETH0.0005397711.5483664
Set Approval For...153603392022-08-17 18:38:19724 days ago1660761499IN
0xc9467496...0A06f4DFd
0 ETH0.0011173223.9052201
Set Approval For...153603392022-08-17 18:38:19724 days ago1660761499IN
0xc9467496...0A06f4DFd
0 ETH0.0011173223.9052201
Set Approval For...153591732022-08-17 14:13:41724 days ago1660745621IN
0xc9467496...0A06f4DFd
0 ETH0.0008447634.0245681
Set Approval For...153585112022-08-17 11:39:18724 days ago1660736358IN
0xc9467496...0A06f4DFd
0 ETH0.000379818.12617444
View all transactions

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
TheRaffle

Compiler Version
v0.8.4+commit.c7e474f2

Optimization Enabled:
No with 200 runs

Other Settings:
default evmVersion
File 1 of 21 : TheRaffle.sol
//SPDX-License-Identifier: Unlicense

pragma solidity 0.8.4;

import "@openzeppelin/contracts/access/Ownable.sol";
import "./lib/ERC721Enumerable.sol";
import "base64-sol/base64.sol";
import "./interfaces/ISudoPair.sol";
import "./interfaces/ISudoSwap.sol"; //factory

import "@chainlink/contracts/src/v0.8/interfaces/VRFCoordinatorV2Interface.sol";
import "@chainlink/contracts/src/v0.8/VRFConsumerBaseV2.sol";

import {SafeTransferLib} from "solmate/src/utils/SafeTransferLib.sol";

interface IRenderer {
    function render(uint256 id) external view returns (string calldata);
}

contract TheRaffle is Ownable, ERC721iEnumerable, VRFConsumerBaseV2 {
    enum GAME_STATE {
        NOT_INITIALIZED,
        OPEN,
        WAITING_NUMBER,
        GOT_NUMBER,
        FINISHED
    }

    using SafeTransferLib for address payable;

    IRenderer public renderer;

    ISudoPair public sudoPool;

    ISudoSwap public sudoFactory;

    address public dev;

    uint256 public multiplier;

    GAME_STATE public currentState;

    uint128 public burned;

    address currentTransferFrom;
    uint256 currentTransferCount;
    uint256 currentTransferBlock;

    // CHAINLINK STUFF
    VRFCoordinatorV2Interface COORDINATOR;

    // Your subscription ID.
    uint64 s_subscriptionId;

    // Goerli coordinator. For other networks,
    // see https://docs.chain.link/docs/vrf-contracts/#configurations
    address vrfCoordinator = 0x271682DEB8C4E0901D1a1550aD2e64D568E69909; // mainnet= 0x271682DEB8C4E0901D1a1550aD2e64D568E69909;

    // 200 gwei Key Hash
    bytes32 keyHash =
        0x8af398995b04c28e9951adb9721ef74c74f93e6a478f39e7e0777be13527e7ef; //mainnet= 0x8af398995b04c28e9951adb9721ef74c74f93e6a478f39e7e0777be13527e7ef;

    uint32 callbackGasLimit = 100000;

    uint16 requestConfirmations = 3;

    uint32 numWords = 1;

    uint256 public winningTicket;

    uint256 public s_requestId;

    event ConsecutiveTransfer(
        uint256 indexed fromTokenId,
        uint256 toTokenId,
        address indexed fromAddress,
        address indexed toAddress
    );

    constructor(
        string memory name,
        string memory symbol,
        uint64 subscriptionId,
        address _router
    ) ERC721(name, symbol) VRFConsumerBaseV2(vrfCoordinator) {
        dev = 0xD95A9A47b3772a262262a5A14Fd9B0DA5cE5F0f7;
        sudoFactory = ISudoSwap(0xb16c1342E617A5B6E4b631EB114483FDB289c0A4); //mainet = 0xb16c1342E617A5B6E4b631EB114483FDB289c0A4
        multiplier = 50;
        COORDINATOR = VRFCoordinatorV2Interface(vrfCoordinator);
        s_subscriptionId = subscriptionId;
    }

    function setup(address _renderer) external onlyOwner {
        renderer = IRenderer(_renderer);
    }

    function mint() internal {
        if (_maxSupply == 0) {
            _preMintReceiver = address(sudoPool);
        }
        _balances[_preMintReceiver] += multiplier;
        _maxSupply = _maxSupply + multiplier;

        // Emit the Consecutive Transfer Event
        emit ConsecutiveTransfer(
            totalSupply() == multiplier ? 1 : _maxSupply - (multiplier - 1),
            _maxSupply,
            address(0),
            _preMintReceiver
        );
    }

    // set _preminter to sudo pool
    function initialize() external payable {
        require(currentState == GAME_STATE.NOT_INITIALIZED, "Game started");
        createPool();
        mint();
        currentState = GAME_STATE.OPEN;
    }

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

    function _afterTokenTransfer(
        address from,
        address to,
        uint256 tokenId
    ) internal virtual override {
        // if a user sells an nft we burn it and send him the eth
        if (to == address(sudoPool)) {
            if (
                currentTransferBlock == block.number &&
                currentTransferFrom == from
            ) {
                currentTransferCount++;
            } else {
                currentTransferBlock = block.number;
                currentTransferFrom = from;
                currentTransferCount = 1;
            }

            // here we do chainlink stuff for winner
            if (
                _maxSupply - burned >= 4000 && currentState == GAME_STATE.OPEN
            ) {
                // add chainlink stuff
                currentState = GAME_STATE.WAITING_NUMBER;
                sudoPool.withdrawAllETH();
                requestRandomWords();
            } else if (currentState == GAME_STATE.GOT_NUMBER) {
                // here we distribute prize if we got number
                distributePrize(40);
            }

            burn(tokenId);
        }
        // if a user buys
        else if (from == address(sudoPool)) {
            if (
                balanceOf(address(sudoPool)) == 0 &&
                currentState == GAME_STATE.OPEN
            ) {
                //we mint more
                mint();
            }
        }
    }

    function burn(uint256 tokenId) internal virtual {
        address owner = ownerOf(tokenId);

        _approve(address(0), tokenId);

        _balances[owner] -= 1;
        // Prevent re-assigning the token back to the Pre-Mint Receiver
        _owners[tokenId] = 0x000000000000000000000000000000000000dEaD;

        burned += 1;
        emit Transfer(owner, address(0), tokenId);
    }

    receive() external payable {}

    // pool for user to buy nfts
    function createPool() internal {
        address _sudoPair = sudoFactory.createPairETH(
            IERC721(address(this)),
            ICurve(0x432f962D8209781da23fB37b6B59ee15dE7d9841), // exponential curve mainnt = 0x432f962D8209781da23fB37b6B59ee15dE7d9841
            payable(0x0), //   _assetRecipient .
            LSSVMPair.PoolType.TRADE, // pool type
            1001100000000000000, //delta  0.11%
            0, //fee
            0.01 ether, //starting price in eth 0.01
            new uint256[](0)
        );

        sudoPool = ISudoPair(_sudoPair);
    }

    function tokenURI(uint256 _tokenId)
        public
        view
        virtual
        override
        returns (string memory)
    {
        string
            memory descr = "The Raffle is an on chain Sudoswap game to test liquidity, a lucky holder can take home 700+ eth.";

        string memory image = renderer.render(_tokenId);

        return
            string(
                abi.encodePacked(
                    "data:application/json;base64,",
                    (
                        Base64.encode(
                            bytes(
                                (
                                    abi.encodePacked(
                                        '{"name":"Raffle #',
                                        uint2str(_tokenId),
                                        '","image": ',
                                        '"',
                                        "data:image/svg+xml;base64,",
                                        Base64.encode(bytes(image)),
                                        '",',
                                        '"description":"',
                                        descr,
                                        '",',
                                        '"attributes":[]}'
                                    )
                                )
                            )
                        )
                    )
                )
            );
    }

    function uint2str(uint256 _i)
        internal
        pure
        returns (string memory _uintAsString)
    {
        if (_i == 0) {
            return "0";
        }
        uint256 j = _i;
        uint256 len;
        while (j != 0) {
            len++;
            j /= 10;
        }
        bytes memory bstr = new bytes(len);
        uint256 k = len;
        while (_i != 0) {
            k = k - 1;
            uint8 temp = (48 + uint8(_i - (_i / 10) * 10));
            bytes1 b1 = bytes1(temp);
            bstr[k] = b1;
            _i /= 10;
        }
        return string(bstr);
    }

    // this is an emergency function in the case of chainlink not working on the first call ,we call it again but shouldn't be a problem..
    function emergencyRandomness() external onlyOwner {
        require(
            currentState != GAME_STATE.GOT_NUMBER && _maxSupply - burned > 4000,
            "Forbidden"
        );
        currentState = GAME_STATE.WAITING_NUMBER;
        requestRandomWords();
    }

    // Assumes the subscription is funded sufficiently.
    function requestRandomWords() internal {
        // Will revert if subscription is not set and funded.
        s_requestId = COORDINATOR.requestRandomWords(
            keyHash,
            s_subscriptionId,
            requestConfirmations,
            callbackGasLimit,
            numWords
        );
    }

    function fulfillRandomWords(
        uint256, /* requestId */
        uint256[] memory randomWords
    ) internal override {
        require(currentState == GAME_STATE.WAITING_NUMBER, "not goo state");
        winningTicket = randomWords[0];
        currentState = GAME_STATE.GOT_NUMBER;
    }

    // make this not fail
    function distributePrize(uint256 rounds) public {
        require(currentState == GAME_STATE.GOT_NUMBER, "not goo state");

        uint256 supply = totalSupply();
        uint256 i;
        unchecked {
            while (i < rounds) {
                address potentialWinner = _owners[(winningTicket + i) % supply];
                if (
                    potentialWinner != address(0) &&
                    potentialWinner !=
                    0x000000000000000000000000000000000000dEaD &&
                    potentialWinner != address(sudoPool)
                ) {
                    // we withdraw all eth into this contract
                    sudoPool.withdrawAllETH();

                    // send 10% to dave wallet
                    payable(dev).safeTransferETH(address(this).balance / 10);

                    // send rest to winner
                    payable(potentialWinner).safeTransferETH(
                        address(this).balance
                    );
                    // add state of game
                    currentState = GAME_STATE.FINISHED;
                    return;
                }
                i++;
            }
            winningTicket = winningTicket + i;
        }
    }

    /**
     * @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"
        );
        if (owner == address(_preMintReceiver)) {
            uint256 i = 1;
            uint256 supply = totalSupply();
            if (supply > 2 * multiplier) {
                i = supply - 2 * multiplier;
            }

            uint256 matched = 0;
            while (i < supply) {
                if (ownerOfclassic(i) == address(_preMintReceiver)) {
                    matched += 1;
                    if (matched - 1 == index) {
                        return i;
                    }
                }
                i = i + 1;
            }
        } else {
            uint256 tokenId = _ownedTokens[owner][index];

            return tokenId;
        }
    }

    function ownerOfclassic(uint256 tokenId)
        public
        view
        virtual
        returns (address)
    {
        address owner_ = _owners[tokenId];

        // Anything beyond the Pre-Minted supply will use the standard "ownerOf"
        if (tokenId > _maxSupply) {
            return super.ownerOf(tokenId);
        }

        // Since we have Pre-Minted the Max-Supply to the "Pre-Mint Receiver" account, we know:
        //  - if the "_owners" mapping has not been assigned, then the owner is the Pre-Mint Receiver.
        //  - after the NFT is transferred, the "_owners" mapping will be updated with the new owner.
        if (owner_ == address(0)) {
            owner_ = _preMintReceiver;
        }

        return owner_;
    }

    /**
     * @dev Override the ERC721 "ownerOf" function to account for the Pre-Mint Receiver.
     */
    function ownerOf(uint256 tokenId)
        public
        view
        virtual
        override
        returns (address)
    {
        address owner_ = _owners[tokenId];

        if (msg.sender == _preMintReceiver) {
            return _preMintReceiver;
        }

        // Anything beyond the Pre-Minted supply will use the standard "ownerOf"
        if (tokenId > _maxSupply) {
            return super.ownerOf(tokenId);
        }

        // Since we have Pre-Minted the Max-Supply to the "Pre-Mint Receiver" account, we know:
        //  - if the "_owners" mapping has not been assigned, then the owner is the Pre-Mint Receiver.
        //  - after the NFT is transferred, the "_owners" mapping will be updated with the new owner.
        if (owner_ == address(0)) {
            owner_ = _preMintReceiver;
        }

        return owner_;
    }

    /**
     * @dev See {IERC721-balanceOf}.
     */
    function balanceOf(address owner)
        public
        view
        virtual
        override
        returns (uint256)
    {
        require(
            owner != address(0),
            "ERC721: address zero is not a valid owner"
        );
        if (
            msg.sender == _preMintReceiver &&
            owner == _preMintReceiver &&
            block.number == currentTransferBlock
        ) {
            return _balances[owner] + currentTransferCount;
        }
        return _balances[owner];
    }
}

File 2 of 21 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)

pragma solidity ^0.8.0;

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

/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * By default, the owner account will be the one that deploys the contract. This
 * can later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
abstract contract Ownable is Context {
    address private _owner;

    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor() {
        _transferOwnership(_msgSender());
    }

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

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

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

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

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

File 3 of 21 : ERC721Enumerable.sol
// SPDX-License-Identifier: MIT
// Modified from: OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/ERC721Enumerable.sol)
// Modified by: Rob Secord (https://twitter.com/robsecord)
// Co-founder @ Charged Particles - Visit: https://charged.fi
// Co-founder @ Taggr             - Visit: https://taggr.io

pragma solidity ^0.8.0;

import "./ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/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.
 *
 * @dev This implementation also includes support for pre-minting a max-supply of tokens up-front.
 *
 * Note on pre-mint:
 *  Assumes a Max-Supply which is entirely pre-minted to initial address with sequential Token IDs.
 *  For this reason, the "allTokens" state vars are unneccesary and have been removed.
 *  Also defines 2 light-weight state vars: "_preMintReceiver" & "_maxSupply"
 *  Overrides "ownerOf" & "_exists"
 */
abstract contract ERC721iEnumerable is ERC721, IERC721Enumerable {
    // Mapping from owner to list of owned token IDs
    mapping(address => mapping(uint256 => uint256)) internal _ownedTokens;

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

    // Tracking for the Pre-Mint Receiver
    address internal _preMintReceiver;

    // Max-Supply for Pre-Mint
    uint256 internal _maxSupply;

    /**
     * @dev See {IERC165-supportsInterface}.
     *
     * Note on Pre-Mint: this implementation maintains the exact same interface for IERC721Enumerable
     */
    function supportsInterface(bytes4 interfaceId)
        public
        view
        virtual
        override(IERC165, ERC721)
        returns (bool)
    {
        return
            interfaceId == type(IERC721Enumerable).interfaceId ||
            super.supportsInterface(interfaceId);
    }

    /**
     * @dev See {IERC721Enumerable-totalSupply}.
     */
    function totalSupply() public view virtual override returns (uint256) {
        // The Total Supply is simply the Max Supply
        return _maxSupply;
    }

    /**
     * @dev See {IERC721Enumerable-tokenByIndex}.
     */
    function tokenByIndex(uint256 index)
        public
        view
        virtual
        override
        returns (uint256)
    {
        require(
            index < _maxSupply,
            "ERC721Enumerable: global index out of bounds"
        );
        // Array index is 0-based, whereas Token ID is 1-based (sequential).
        return index + 1;
    }

    // /**
    //  * @dev Override the ERC721 "ownerOf" function to account for the Pre-Mint Receiver.
    //  */
    // function ownerOf(uint256 tokenId)
    //     public
    //     view
    //     virtual
    //     override(IERC721, ERC721)
    //     returns (address)
    // {
    //     // Anything beyond the Pre-Minted supply will use the standard "ownerOf"
    //     if (tokenId > _maxSupply) {
    //         return super.ownerOf(tokenId);
    //     }

    //     // Since we have Pre-Minted the Max-Supply to the "Pre-Mint Receiver" account, we know:
    //     //  - if the "_owners" mapping has not been assigned, then the owner is the Pre-Mint Receiver.
    //     //  - after the NFT is transferred, the "_owners" mapping will be updated with the new owner.
    //     address owner_ = _owners[tokenId];
    //     if (owner_ == address(0)) {
    //         owner_ = _preMintReceiver;
    //     }
    //     return owner_;
    // }

    /**
     * @dev Override the ERC721 "_exists" function to account for the Pre-Minted Max-Supply.
     */
    function _exists(uint256 tokenId)
        internal
        view
        virtual
        override(ERC721)
        returns (bool)
    {
        // Anything beyond the Pre-Minted supply will use the standard "_exists"
        if (tokenId > _maxSupply) {
            return super._exists(tokenId);
        }

        // We know the Max-Supply has been Pre-Minted with Sequential Token IDs
        return (tokenId >= 0 && tokenId <= _maxSupply);
    }

    /**
     * @dev See {IERC721Enumerable-_beforeTokenTransfer}.
     */
    function _beforeTokenTransfer(
        address from,
        address to,
        uint256 tokenId
    ) internal virtual override {
        super._beforeTokenTransfer(from, to, tokenId);

        if (from != to) {
            _removeTokenFromOwnerEnumeration(from, tokenId);
            _addTokenToOwnerEnumeration(to, tokenId);
        }
    }

    /**
     * @dev See {IERC721Enumerable-_addTokenToOwnerEnumeration}.
     */
    function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private {
        uint256 length = ERC721.balanceOf(to);
        _ownedTokens[to][length] = tokenId;
        _ownedTokensIndex[tokenId] = length;
    }

    /**
     * @dev See {IERC721Enumerable-_removeTokenFromOwnerEnumeration}.
     */
    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];
    }
}

File 4 of 21 : base64.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0;

/// @title Base64
/// @author Brecht Devos - <[email protected]>
/// @notice Provides functions for encoding/decoding base64
library Base64 {
    string internal constant TABLE_ENCODE = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
    bytes  internal constant TABLE_DECODE = hex"0000000000000000000000000000000000000000000000000000000000000000"
                                            hex"00000000000000000000003e0000003f3435363738393a3b3c3d000000000000"
                                            hex"00000102030405060708090a0b0c0d0e0f101112131415161718190000000000"
                                            hex"001a1b1c1d1e1f202122232425262728292a2b2c2d2e2f303132330000000000";

    function encode(bytes memory data) internal pure returns (string memory) {
        if (data.length == 0) return '';

        // load the table into memory
        string memory table = TABLE_ENCODE;

        // multiply by 4/3 rounded up
        uint256 encodedLen = 4 * ((data.length + 2) / 3);

        // add some extra buffer at the end required for the writing
        string memory result = new string(encodedLen + 32);

        assembly {
            // set the actual output length
            mstore(result, encodedLen)

            // prepare the lookup table
            let tablePtr := add(table, 1)

            // input ptr
            let dataPtr := data
            let endPtr := add(dataPtr, mload(data))

            // result ptr, jump over length
            let resultPtr := add(result, 32)

            // run over the input, 3 bytes at a time
            for {} lt(dataPtr, endPtr) {}
            {
                // read 3 bytes
                dataPtr := add(dataPtr, 3)
                let input := mload(dataPtr)

                // write 4 characters
                mstore8(resultPtr, mload(add(tablePtr, and(shr(18, input), 0x3F))))
                resultPtr := add(resultPtr, 1)
                mstore8(resultPtr, mload(add(tablePtr, and(shr(12, input), 0x3F))))
                resultPtr := add(resultPtr, 1)
                mstore8(resultPtr, mload(add(tablePtr, and(shr( 6, input), 0x3F))))
                resultPtr := add(resultPtr, 1)
                mstore8(resultPtr, mload(add(tablePtr, and(        input,  0x3F))))
                resultPtr := add(resultPtr, 1)
            }

            // padding with '='
            switch mod(mload(data), 3)
            case 1 { mstore(sub(resultPtr, 2), shl(240, 0x3d3d)) }
            case 2 { mstore(sub(resultPtr, 1), shl(248, 0x3d)) }
        }

        return result;
    }

    function decode(string memory _data) internal pure returns (bytes memory) {
        bytes memory data = bytes(_data);

        if (data.length == 0) return new bytes(0);
        require(data.length % 4 == 0, "invalid base64 decoder input");

        // load the table into memory
        bytes memory table = TABLE_DECODE;

        // every 4 characters represent 3 bytes
        uint256 decodedLen = (data.length / 4) * 3;

        // add some extra buffer at the end required for the writing
        bytes memory result = new bytes(decodedLen + 32);

        assembly {
            // padding with '='
            let lastBytes := mload(add(data, mload(data)))
            if eq(and(lastBytes, 0xFF), 0x3d) {
                decodedLen := sub(decodedLen, 1)
                if eq(and(lastBytes, 0xFFFF), 0x3d3d) {
                    decodedLen := sub(decodedLen, 1)
                }
            }

            // set the actual output length
            mstore(result, decodedLen)

            // prepare the lookup table
            let tablePtr := add(table, 1)

            // input ptr
            let dataPtr := data
            let endPtr := add(dataPtr, mload(data))

            // result ptr, jump over length
            let resultPtr := add(result, 32)

            // run over the input, 4 characters at a time
            for {} lt(dataPtr, endPtr) {}
            {
               // read 4 characters
               dataPtr := add(dataPtr, 4)
               let input := mload(dataPtr)

               // write 3 bytes
               let output := add(
                   add(
                       shl(18, and(mload(add(tablePtr, and(shr(24, input), 0xFF))), 0xFF)),
                       shl(12, and(mload(add(tablePtr, and(shr(16, input), 0xFF))), 0xFF))),
                   add(
                       shl( 6, and(mload(add(tablePtr, and(shr( 8, input), 0xFF))), 0xFF)),
                               and(mload(add(tablePtr, and(        input , 0xFF))), 0xFF)
                    )
                )
                mstore(resultPtr, shl(232, output))
                resultPtr := add(resultPtr, 3)
            }
        }

        return result;
    }
}

File 5 of 21 : ISudoPair.sol
//SPDX-License-Identifier: Unlicense
pragma solidity ^0.8.4;

interface ISudoPair {
    enum CurveErrorCodes {
        OK, // No error
        INVALID_NUMITEMS, // The numItem value is 0
        SPOT_PRICE_OVERFLOW // The updated spot price doesn't fit into 128 bits
    }

    function withdrawAllETH() external;

    function withdrawETH(uint256 amount) external;

    function swapTokenForAnyNFTs(
        uint256 numNFTs,
        uint256 maxExpectedTokenInput,
        address nftRecipient,
        bool isRouter,
        address routerCaller
    ) external payable;

    function getAllHeldIds() external view returns (uint256[] memory);

    function swapNFTsForToken(
        uint256[] calldata nftIds,
        uint256 minExpectedTokenOutput,
        address payable tokenRecipient,
        bool isRouter,
        address routerCaller
    ) external;

    function getBuyNFTQuote(uint256 numNFTs)
        external
        view
        returns (
            CurveErrorCodes error,
            uint256 newSpotPrice,
            uint256 newDelta,
            uint256 inputAmount,
            uint256 protocolFee
        );

    function getSellNFTQuote(uint256 numNFTs)
        external
        view
        returns (
            CurveErrorCodes error,
            uint256 newSpotPrice,
            uint256 newDelta,
            uint256 outputAmount,
            uint256 protocolFee
        );

    function changeSpotPrice(uint128 newSpotPrice) external;

    function transferOwnership(address newOwner) external;
}

File 6 of 21 : ISudoSwap.sol
//SPDX-License-Identifier: Unlicense
pragma solidity ^0.8.4;

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

interface LSSVMPair {
    enum PoolType {
        TOKEN,
        NFT,
        TRADE
    }
}

interface ISudoSwap {
    /**
        @notice Creates a pair contract using EIP-1167.
        @param _nft The NFT contract of the collection the pair trades
        @param _bondingCurve The bonding curve for the pair to price NFTs, must be whitelisted
        @param _assetRecipient The address that will receive the assets traders give during trades.
                              If set to address(0), assets will be sent to the pool address.
                              Not available to TRADE pools. 
        @param _poolType TOKEN, NFT, or TRADE
        @param _delta The delta value used by the bonding curve. The meaning of delta depends
        on the specific curve.
        @param _fee The fee taken by the LP in each trade. Can only be non-zero if _poolType is Trade.
        @param _spotPrice The initial selling spot price
        @param _initialNFTIDs The list of IDs of NFTs to transfer from the sender to the pair
        @return pair The new pair
     */
    function createPairETH(
        IERC721 _nft,
        ICurve _bondingCurve,
        address payable _assetRecipient,
        LSSVMPair.PoolType _poolType,
        uint128 _delta,
        uint96 _fee,
        uint128 _spotPrice,
        uint256[] calldata _initialNFTIDs
    ) external payable returns (address pair);
}

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

interface VRFCoordinatorV2Interface {
  /**
   * @notice Get configuration relevant for making requests
   * @return minimumRequestConfirmations global min for request confirmations
   * @return maxGasLimit global max for request gas limit
   * @return s_provingKeyHashes list of registered key hashes
   */
  function getRequestConfig()
    external
    view
    returns (
      uint16,
      uint32,
      bytes32[] memory
    );

  /**
   * @notice Request a set of random words.
   * @param keyHash - Corresponds to a particular oracle job which uses
   * that key for generating the VRF proof. Different keyHash's have different gas price
   * ceilings, so you can select a specific one to bound your maximum per request cost.
   * @param subId  - The ID of the VRF subscription. Must be funded
   * with the minimum subscription balance required for the selected keyHash.
   * @param minimumRequestConfirmations - How many blocks you'd like the
   * oracle to wait before responding to the request. See SECURITY CONSIDERATIONS
   * for why you may want to request more. The acceptable range is
   * [minimumRequestBlockConfirmations, 200].
   * @param callbackGasLimit - How much gas you'd like to receive in your
   * fulfillRandomWords callback. Note that gasleft() inside fulfillRandomWords
   * may be slightly less than this amount because of gas used calling the function
   * (argument decoding etc.), so you may need to request slightly more than you expect
   * to have inside fulfillRandomWords. The acceptable range is
   * [0, maxGasLimit]
   * @param numWords - The number of uint256 random values you'd like to receive
   * in your fulfillRandomWords callback. Note these numbers are expanded in a
   * secure way by the VRFCoordinator from a single random value supplied by the oracle.
   * @return requestId - A unique identifier of the request. Can be used to match
   * a request to a response in fulfillRandomWords.
   */
  function requestRandomWords(
    bytes32 keyHash,
    uint64 subId,
    uint16 minimumRequestConfirmations,
    uint32 callbackGasLimit,
    uint32 numWords
  ) external returns (uint256 requestId);

  /**
   * @notice Create a VRF subscription.
   * @return subId - A unique subscription id.
   * @dev You can manage the consumer set dynamically with addConsumer/removeConsumer.
   * @dev Note to fund the subscription, use transferAndCall. For example
   * @dev  LINKTOKEN.transferAndCall(
   * @dev    address(COORDINATOR),
   * @dev    amount,
   * @dev    abi.encode(subId));
   */
  function createSubscription() external returns (uint64 subId);

  /**
   * @notice Get a VRF subscription.
   * @param subId - ID of the subscription
   * @return balance - LINK balance of the subscription in juels.
   * @return reqCount - number of requests for this subscription, determines fee tier.
   * @return owner - owner of the subscription.
   * @return consumers - list of consumer address which are able to use this subscription.
   */
  function getSubscription(uint64 subId)
    external
    view
    returns (
      uint96 balance,
      uint64 reqCount,
      address owner,
      address[] memory consumers
    );

  /**
   * @notice Request subscription owner transfer.
   * @param subId - ID of the subscription
   * @param newOwner - proposed new owner of the subscription
   */
  function requestSubscriptionOwnerTransfer(uint64 subId, address newOwner) external;

  /**
   * @notice Request subscription owner transfer.
   * @param subId - ID of the subscription
   * @dev will revert if original owner of subId has
   * not requested that msg.sender become the new owner.
   */
  function acceptSubscriptionOwnerTransfer(uint64 subId) external;

  /**
   * @notice Add a consumer to a VRF subscription.
   * @param subId - ID of the subscription
   * @param consumer - New consumer which can use the subscription
   */
  function addConsumer(uint64 subId, address consumer) external;

  /**
   * @notice Remove a consumer from a VRF subscription.
   * @param subId - ID of the subscription
   * @param consumer - Consumer to remove from the subscription
   */
  function removeConsumer(uint64 subId, address consumer) external;

  /**
   * @notice Cancel a subscription
   * @param subId - ID of the subscription
   * @param to - Where to send the remaining LINK to
   */
  function cancelSubscription(uint64 subId, address to) external;

  /*
   * @notice Check to see if there exists a request commitment consumers
   * for all consumers and keyhashes for a given sub.
   * @param subId - ID of the subscription
   * @return true if there exists at least one unfulfilled request for the subscription, false
   * otherwise.
   */
  function pendingRequestExists(uint64 subId) external view returns (bool);
}

File 8 of 21 : VRFConsumerBaseV2.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;

/** ****************************************************************************
 * @notice Interface for contracts using VRF randomness
 * *****************************************************************************
 * @dev PURPOSE
 *
 * @dev Reggie the Random Oracle (not his real job) wants to provide randomness
 * @dev to Vera the verifier in such a way that Vera can be sure he's not
 * @dev making his output up to suit himself. Reggie provides Vera a public key
 * @dev to which he knows the secret key. Each time Vera provides a seed to
 * @dev Reggie, he gives back a value which is computed completely
 * @dev deterministically from the seed and the secret key.
 *
 * @dev Reggie provides a proof by which Vera can verify that the output was
 * @dev correctly computed once Reggie tells it to her, but without that proof,
 * @dev the output is indistinguishable to her from a uniform random sample
 * @dev from the output space.
 *
 * @dev The purpose of this contract is to make it easy for unrelated contracts
 * @dev to talk to Vera the verifier about the work Reggie is doing, to provide
 * @dev simple access to a verifiable source of randomness. It ensures 2 things:
 * @dev 1. The fulfillment came from the VRFCoordinator
 * @dev 2. The consumer contract implements fulfillRandomWords.
 * *****************************************************************************
 * @dev USAGE
 *
 * @dev Calling contracts must inherit from VRFConsumerBase, and can
 * @dev initialize VRFConsumerBase's attributes in their constructor as
 * @dev shown:
 *
 * @dev   contract VRFConsumer {
 * @dev     constructor(<other arguments>, address _vrfCoordinator, address _link)
 * @dev       VRFConsumerBase(_vrfCoordinator) public {
 * @dev         <initialization with other arguments goes here>
 * @dev       }
 * @dev   }
 *
 * @dev The oracle will have given you an ID for the VRF keypair they have
 * @dev committed to (let's call it keyHash). Create subscription, fund it
 * @dev and your consumer contract as a consumer of it (see VRFCoordinatorInterface
 * @dev subscription management functions).
 * @dev Call requestRandomWords(keyHash, subId, minimumRequestConfirmations,
 * @dev callbackGasLimit, numWords),
 * @dev see (VRFCoordinatorInterface for a description of the arguments).
 *
 * @dev Once the VRFCoordinator has received and validated the oracle's response
 * @dev to your request, it will call your contract's fulfillRandomWords method.
 *
 * @dev The randomness argument to fulfillRandomWords is a set of random words
 * @dev generated from your requestId and the blockHash of the request.
 *
 * @dev If your contract could have concurrent requests open, you can use the
 * @dev requestId returned from requestRandomWords to track which response is associated
 * @dev with which randomness request.
 * @dev See "SECURITY CONSIDERATIONS" for principles to keep in mind,
 * @dev if your contract could have multiple requests in flight simultaneously.
 *
 * @dev Colliding `requestId`s are cryptographically impossible as long as seeds
 * @dev differ.
 *
 * *****************************************************************************
 * @dev SECURITY CONSIDERATIONS
 *
 * @dev A method with the ability to call your fulfillRandomness method directly
 * @dev could spoof a VRF response with any random value, so it's critical that
 * @dev it cannot be directly called by anything other than this base contract
 * @dev (specifically, by the VRFConsumerBase.rawFulfillRandomness method).
 *
 * @dev For your users to trust that your contract's random behavior is free
 * @dev from malicious interference, it's best if you can write it so that all
 * @dev behaviors implied by a VRF response are executed *during* your
 * @dev fulfillRandomness method. If your contract must store the response (or
 * @dev anything derived from it) and use it later, you must ensure that any
 * @dev user-significant behavior which depends on that stored value cannot be
 * @dev manipulated by a subsequent VRF request.
 *
 * @dev Similarly, both miners and the VRF oracle itself have some influence
 * @dev over the order in which VRF responses appear on the blockchain, so if
 * @dev your contract could have multiple VRF requests in flight simultaneously,
 * @dev you must ensure that the order in which the VRF responses arrive cannot
 * @dev be used to manipulate your contract's user-significant behavior.
 *
 * @dev Since the block hash of the block which contains the requestRandomness
 * @dev call is mixed into the input to the VRF *last*, a sufficiently powerful
 * @dev miner could, in principle, fork the blockchain to evict the block
 * @dev containing the request, forcing the request to be included in a
 * @dev different block with a different hash, and therefore a different input
 * @dev to the VRF. However, such an attack would incur a substantial economic
 * @dev cost. This cost scales with the number of blocks the VRF oracle waits
 * @dev until it calls responds to a request. It is for this reason that
 * @dev that you can signal to an oracle you'd like them to wait longer before
 * @dev responding to the request (however this is not enforced in the contract
 * @dev and so remains effective only in the case of unmodified oracle software).
 */
abstract contract VRFConsumerBaseV2 {
  error OnlyCoordinatorCanFulfill(address have, address want);
  address private immutable vrfCoordinator;

  /**
   * @param _vrfCoordinator address of VRFCoordinator contract
   */
  constructor(address _vrfCoordinator) {
    vrfCoordinator = _vrfCoordinator;
  }

  /**
   * @notice fulfillRandomness handles the VRF response. Your contract must
   * @notice implement it. See "SECURITY CONSIDERATIONS" above for important
   * @notice principles to keep in mind when implementing your fulfillRandomness
   * @notice method.
   *
   * @dev VRFConsumerBaseV2 expects its subcontracts to have a method with this
   * @dev signature, and will call it once it has verified the proof
   * @dev associated with the randomness. (It is triggered via a call to
   * @dev rawFulfillRandomness, below.)
   *
   * @param requestId The Id initially returned by requestRandomness
   * @param randomWords the VRF output expanded to the requested number of words
   */
  function fulfillRandomWords(uint256 requestId, uint256[] memory randomWords) internal virtual;

  // rawFulfillRandomness is called by VRFCoordinator when it receives a valid VRF
  // proof. rawFulfillRandomness then calls fulfillRandomness, after validating
  // the origin of the call
  function rawFulfillRandomWords(uint256 requestId, uint256[] memory randomWords) external {
    if (msg.sender != vrfCoordinator) {
      revert OnlyCoordinatorCanFulfill(msg.sender, vrfCoordinator);
    }
    fulfillRandomWords(requestId, randomWords);
  }
}

File 9 of 21 : SafeTransferLib.sol
// SPDX-License-Identifier: AGPL-3.0-only
pragma solidity >=0.8.0;

import {ERC20} from "../tokens/ERC20.sol";

/// @notice Safe ETH and ERC20 transfer library that gracefully handles missing return values.
/// @author Solmate (https://github.com/transmissions11/solmate/blob/main/src/utils/SafeTransferLib.sol)
/// @dev Use with caution! Some functions in this library knowingly create dirty bits at the destination of the free memory pointer.
/// @dev Note that none of the functions in this library check that a token has code at all! That responsibility is delegated to the caller.
library SafeTransferLib {
    /*//////////////////////////////////////////////////////////////
                             ETH OPERATIONS
    //////////////////////////////////////////////////////////////*/

    function safeTransferETH(address to, uint256 amount) internal {
        bool success;

        assembly {
            // Transfer the ETH and store if it succeeded or not.
            success := call(gas(), to, amount, 0, 0, 0, 0)
        }

        require(success, "ETH_TRANSFER_FAILED");
    }

    /*//////////////////////////////////////////////////////////////
                            ERC20 OPERATIONS
    //////////////////////////////////////////////////////////////*/

    function safeTransferFrom(
        ERC20 token,
        address from,
        address to,
        uint256 amount
    ) internal {
        bool success;

        assembly {
            // Get a pointer to some free memory.
            let freeMemoryPointer := mload(0x40)

            // Write the abi-encoded calldata into memory, beginning with the function selector.
            mstore(freeMemoryPointer, 0x23b872dd00000000000000000000000000000000000000000000000000000000)
            mstore(add(freeMemoryPointer, 4), from) // Append the "from" argument.
            mstore(add(freeMemoryPointer, 36), to) // Append the "to" argument.
            mstore(add(freeMemoryPointer, 68), amount) // Append the "amount" argument.

            success := and(
                // Set success to whether the call reverted, if not we check it either
                // returned exactly 1 (can't just be non-zero data), or had no return data.
                or(and(eq(mload(0), 1), gt(returndatasize(), 31)), iszero(returndatasize())),
                // We use 100 because the length of our calldata totals up like so: 4 + 32 * 3.
                // We use 0 and 32 to copy up to 32 bytes of return data into the scratch space.
                // Counterintuitively, this call must be positioned second to the or() call in the
                // surrounding and() call or else returndatasize() will be zero during the computation.
                call(gas(), token, 0, freeMemoryPointer, 100, 0, 32)
            )
        }

        require(success, "TRANSFER_FROM_FAILED");
    }

    function safeTransfer(
        ERC20 token,
        address to,
        uint256 amount
    ) internal {
        bool success;

        assembly {
            // Get a pointer to some free memory.
            let freeMemoryPointer := mload(0x40)

            // Write the abi-encoded calldata into memory, beginning with the function selector.
            mstore(freeMemoryPointer, 0xa9059cbb00000000000000000000000000000000000000000000000000000000)
            mstore(add(freeMemoryPointer, 4), to) // Append the "to" argument.
            mstore(add(freeMemoryPointer, 36), amount) // Append the "amount" argument.

            success := and(
                // Set success to whether the call reverted, if not we check it either
                // returned exactly 1 (can't just be non-zero data), or had no return data.
                or(and(eq(mload(0), 1), gt(returndatasize(), 31)), iszero(returndatasize())),
                // We use 68 because the length of our calldata totals up like so: 4 + 32 * 2.
                // We use 0 and 32 to copy up to 32 bytes of return data into the scratch space.
                // Counterintuitively, this call must be positioned second to the or() call in the
                // surrounding and() call or else returndatasize() will be zero during the computation.
                call(gas(), token, 0, freeMemoryPointer, 68, 0, 32)
            )
        }

        require(success, "TRANSFER_FAILED");
    }

    function safeApprove(
        ERC20 token,
        address to,
        uint256 amount
    ) internal {
        bool success;

        assembly {
            // Get a pointer to some free memory.
            let freeMemoryPointer := mload(0x40)

            // Write the abi-encoded calldata into memory, beginning with the function selector.
            mstore(freeMemoryPointer, 0x095ea7b300000000000000000000000000000000000000000000000000000000)
            mstore(add(freeMemoryPointer, 4), to) // Append the "to" argument.
            mstore(add(freeMemoryPointer, 36), amount) // Append the "amount" argument.

            success := and(
                // Set success to whether the call reverted, if not we check it either
                // returned exactly 1 (can't just be non-zero data), or had no return data.
                or(and(eq(mload(0), 1), gt(returndatasize(), 31)), iszero(returndatasize())),
                // We use 68 because the length of our calldata totals up like so: 4 + 32 * 2.
                // We use 0 and 32 to copy up to 32 bytes of return data into the scratch space.
                // Counterintuitively, this call must be positioned second to the or() call in the
                // surrounding and() call or else returndatasize() will be zero during the computation.
                call(gas(), token, 0, freeMemoryPointer, 68, 0, 32)
            )
        }

        require(success, "APPROVE_FAILED");
    }
}

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

pragma solidity ^0.8.0;

/**
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
abstract contract Context {
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

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

File 11 of 21 : ERC721.sol
// SPDX-License-Identifier: MIT
// Modifed from: OpenZeppelin Contracts (last updated v4.7.0) (token/ERC721/ERC721.sol)
// Modified by: Rob Secord (https://twitter.com/robsecord)
// Co-founder @ Charged Particles - Visit: https://charged.fi
// Co-founder @ Taggr             - Visit: https://taggr.io

pragma solidity ^0.8.0;

import "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol";
import "@openzeppelin/contracts/utils/Address.sol";
import "@openzeppelin/contracts/utils/Context.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/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}.
 *
 * NOTE: Pre-Mint:
 *  The only changes made here are:
 *    - change scope of "_owners" from private to internal
 *    - change scope of "_balances" from private to internal
 *    - remove "ERC721" scope-resolution from "ownerOf" calls in order to override "ownerOf"
 *    - modify the _burn function to burn to an alternate Null Address (prevents reassignment back to Pre-Mint Receiver)
 */
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) internal _owners;

    // Mapping owner address to token count
    mapping(address => uint256) internal _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: address zero is not a valid owner"
        );
        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: invalid token ID");
        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)
    {
        _requireMinted(tokenId);

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

    /**
     * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each
     * token will be the concatenation of the `baseURI` and the `tokenId`. Empty
     * by default, can be overridden 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 = ownerOf(tokenId);
        require(to != owner, "ERC721: approval to current owner");

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

        _approve(to, tokenId);
    }

    /**
     * @dev See {IERC721-getApproved}.
     */
    function getApproved(uint256 tokenId)
        public
        view
        virtual
        override
        returns (address)
    {
        _requireMinted(tokenId);

        return _tokenApprovals[tokenId];
    }

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

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

    /**
     * @dev See {IERC721-transferFrom}.
     */
    function transferFrom(
        address from,
        address to,
        uint256 tokenId
    ) public virtual override {
        //solhint-disable-next-line max-line-length
        require(
            _isApprovedOrOwner(_msgSender(), tokenId),
            "ERC721: caller is not token 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: caller is not token 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)
    {
        address owner = ownerOf(tokenId);
        return (spender == owner ||
            isApprovedForAll(owner, spender) ||
            getApproved(tokenId) == spender);
    }

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

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

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

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

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

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

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

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

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

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

        _balances[owner] -= 1;
        // Prevent re-assigning the token back to the Pre-Mint Receiver
        _owners[tokenId] = 0x000000000000000000000000000000000000dEaD;

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

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

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

        _beforeTokenTransfer(from, to, tokenId);

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

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

        emit Transfer(from, to, tokenId);

        _afterTokenTransfer(from, to, tokenId);
    }

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

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

    /**
     * @dev Reverts if the `tokenId` has not been minted yet.
     */
    function _requireMinted(uint256 tokenId) internal view virtual {
        require(_exists(tokenId), "ERC721: invalid token ID");
    }

    /**
     * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address.
     * The call is not executed if the target address is not a contract.
     *
     * @param from address representing the previous owner of the given token ID
     * @param to target address that will receive the tokens
     * @param tokenId uint256 ID of the token to be transferred
     * @param data bytes optional data to send along with the call
     * @return bool whether the call correctly returned the expected magic value
     */
    function _checkOnERC721Received(
        address from,
        address to,
        uint256 tokenId,
        bytes memory data
    ) private returns (bool) {
        if (to.isContract()) {
            try
                IERC721Receiver(to).onERC721Received(
                    _msgSender(),
                    from,
                    tokenId,
                    data
                )
            returns (bytes4 retval) {
                return retval == IERC721Receiver.onERC721Received.selector;
            } catch (bytes memory reason) {
                if (reason.length == 0) {
                    revert(
                        "ERC721: transfer to non ERC721Receiver implementer"
                    );
                } else {
                    /// @solidity memory-safe-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` and `to` are never both zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _beforeTokenTransfer(
        address from,
        address to,
        uint256 tokenId
    ) internal virtual {}

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

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

pragma solidity ^0.8.0;

import "../IERC721.sol";

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

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

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

File 13 of 21 : IERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients
     * are aware of the ERC721 protocol to prevent tokens from being forever locked.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If the caller is not `from`, it must 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 Approve or remove `operator` as an operator for the caller.
     * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.
     *
     * Requirements:
     *
     * - The `operator` cannot be the caller.
     *
     * Emits an {ApprovalForAll} event.
     */
    function setApprovalForAll(address operator, bool _approved) external;

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

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

File 14 of 21 : IERC721Receiver.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721Receiver.sol)

pragma solidity ^0.8.0;

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

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

pragma solidity ^0.8.0;

import "../IERC721.sol";

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

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

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

File 16 of 21 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol)

pragma solidity ^0.8.1;

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

        return account.code.length > 0;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

pragma solidity ^0.8.0;

import "./IERC165.sol";

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

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

pragma solidity ^0.8.0;

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

File 20 of 21 : ICurve.sol
//SPDX-License-Identifier: Unlicense
pragma solidity ^0.8.4;

interface CurveErrorCodes {
    enum Error {
        OK, // No error
        INVALID_NUMITEMS, // The numItem value is 0
        SPOT_PRICE_OVERFLOW // The updated spot price doesn't fit into 128 bits
    }
}

interface ICurve {
    function validateDelta(uint128 delta) external pure returns (bool valid);

    function validateSpotPrice(uint128 newSpotPrice)
        external
        view
        returns (bool valid);

    function getBuyInfo(
        uint128 spotPrice,
        uint128 delta,
        uint256 numItems,
        uint256 feeMultiplier,
        uint256 protocolFeeMultiplier
    )
        external
        view
        returns (
            CurveErrorCodes.Error error,
            uint128 newSpotPrice,
            uint128 newDelta,
            uint256 inputValue,
            uint256 protocolFee
        );

    function getSellInfo(
        uint128 spotPrice,
        uint128 delta,
        uint256 numItems,
        uint256 feeMultiplier,
        uint256 protocolFeeMultiplier
    )
        external
        view
        returns (
            CurveErrorCodes.Error error,
            uint128 newSpotPrice,
            uint128 newDelta,
            uint256 outputValue,
            uint256 protocolFee
        );
}

File 21 of 21 : ERC20.sol
// SPDX-License-Identifier: AGPL-3.0-only
pragma solidity >=0.8.0;

/// @notice Modern and gas efficient ERC20 + EIP-2612 implementation.
/// @author Solmate (https://github.com/transmissions11/solmate/blob/main/src/tokens/ERC20.sol)
/// @author Modified from Uniswap (https://github.com/Uniswap/uniswap-v2-core/blob/master/contracts/UniswapV2ERC20.sol)
/// @dev Do not manually set balances without updating totalSupply, as the sum of all user balances must not exceed it.
abstract contract ERC20 {
    /*//////////////////////////////////////////////////////////////
                                 EVENTS
    //////////////////////////////////////////////////////////////*/

    event Transfer(address indexed from, address indexed to, uint256 amount);

    event Approval(address indexed owner, address indexed spender, uint256 amount);

    /*//////////////////////////////////////////////////////////////
                            METADATA STORAGE
    //////////////////////////////////////////////////////////////*/

    string public name;

    string public symbol;

    uint8 public immutable decimals;

    /*//////////////////////////////////////////////////////////////
                              ERC20 STORAGE
    //////////////////////////////////////////////////////////////*/

    uint256 public totalSupply;

    mapping(address => uint256) public balanceOf;

    mapping(address => mapping(address => uint256)) public allowance;

    /*//////////////////////////////////////////////////////////////
                            EIP-2612 STORAGE
    //////////////////////////////////////////////////////////////*/

    uint256 internal immutable INITIAL_CHAIN_ID;

    bytes32 internal immutable INITIAL_DOMAIN_SEPARATOR;

    mapping(address => uint256) public nonces;

    /*//////////////////////////////////////////////////////////////
                               CONSTRUCTOR
    //////////////////////////////////////////////////////////////*/

    constructor(
        string memory _name,
        string memory _symbol,
        uint8 _decimals
    ) {
        name = _name;
        symbol = _symbol;
        decimals = _decimals;

        INITIAL_CHAIN_ID = block.chainid;
        INITIAL_DOMAIN_SEPARATOR = computeDomainSeparator();
    }

    /*//////////////////////////////////////////////////////////////
                               ERC20 LOGIC
    //////////////////////////////////////////////////////////////*/

    function approve(address spender, uint256 amount) public virtual returns (bool) {
        allowance[msg.sender][spender] = amount;

        emit Approval(msg.sender, spender, amount);

        return true;
    }

    function transfer(address to, uint256 amount) public virtual returns (bool) {
        balanceOf[msg.sender] -= amount;

        // Cannot overflow because the sum of all user
        // balances can't exceed the max uint256 value.
        unchecked {
            balanceOf[to] += amount;
        }

        emit Transfer(msg.sender, to, amount);

        return true;
    }

    function transferFrom(
        address from,
        address to,
        uint256 amount
    ) public virtual returns (bool) {
        uint256 allowed = allowance[from][msg.sender]; // Saves gas for limited approvals.

        if (allowed != type(uint256).max) allowance[from][msg.sender] = allowed - amount;

        balanceOf[from] -= amount;

        // Cannot overflow because the sum of all user
        // balances can't exceed the max uint256 value.
        unchecked {
            balanceOf[to] += amount;
        }

        emit Transfer(from, to, amount);

        return true;
    }

    /*//////////////////////////////////////////////////////////////
                             EIP-2612 LOGIC
    //////////////////////////////////////////////////////////////*/

    function permit(
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) public virtual {
        require(deadline >= block.timestamp, "PERMIT_DEADLINE_EXPIRED");

        // Unchecked because the only math done is incrementing
        // the owner's nonce which cannot realistically overflow.
        unchecked {
            address recoveredAddress = ecrecover(
                keccak256(
                    abi.encodePacked(
                        "\x19\x01",
                        DOMAIN_SEPARATOR(),
                        keccak256(
                            abi.encode(
                                keccak256(
                                    "Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)"
                                ),
                                owner,
                                spender,
                                value,
                                nonces[owner]++,
                                deadline
                            )
                        )
                    )
                ),
                v,
                r,
                s
            );

            require(recoveredAddress != address(0) && recoveredAddress == owner, "INVALID_SIGNER");

            allowance[recoveredAddress][spender] = value;
        }

        emit Approval(owner, spender, value);
    }

    function DOMAIN_SEPARATOR() public view virtual returns (bytes32) {
        return block.chainid == INITIAL_CHAIN_ID ? INITIAL_DOMAIN_SEPARATOR : computeDomainSeparator();
    }

    function computeDomainSeparator() internal view virtual returns (bytes32) {
        return
            keccak256(
                abi.encode(
                    keccak256("EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)"),
                    keccak256(bytes(name)),
                    keccak256("1"),
                    block.chainid,
                    address(this)
                )
            );
    }

    /*//////////////////////////////////////////////////////////////
                        INTERNAL MINT/BURN LOGIC
    //////////////////////////////////////////////////////////////*/

    function _mint(address to, uint256 amount) internal virtual {
        totalSupply += amount;

        // Cannot overflow because the sum of all user
        // balances can't exceed the max uint256 value.
        unchecked {
            balanceOf[to] += amount;
        }

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

    function _burn(address from, uint256 amount) internal virtual {
        balanceOf[from] -= amount;

        // Cannot underflow because a user's balance
        // will never be larger than the total supply.
        unchecked {
            totalSupply -= amount;
        }

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

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"symbol","type":"string"},{"internalType":"uint64","name":"subscriptionId","type":"uint64"},{"internalType":"address","name":"_router","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"have","type":"address"},{"internalType":"address","name":"want","type":"address"}],"name":"OnlyCoordinatorCanFulfill","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"fromTokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"toTokenId","type":"uint256"},{"indexed":true,"internalType":"address","name":"fromAddress","type":"address"},{"indexed":true,"internalType":"address","name":"toAddress","type":"address"}],"name":"ConsecutiveTransfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"burned","outputs":[{"internalType":"uint128","name":"","type":"uint128"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"currentState","outputs":[{"internalType":"enum TheRaffle.GAME_STATE","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"dev","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"rounds","type":"uint256"}],"name":"distributePrize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"emergencyRandomness","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"initialize","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"multiplier","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOfclassic","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"requestId","type":"uint256"},{"internalType":"uint256[]","name":"randomWords","type":"uint256[]"}],"name":"rawFulfillRandomWords","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renderer","outputs":[{"internalType":"contract IRenderer","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"s_requestId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_renderer","type":"address"}],"name":"setup","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"sudoFactory","outputs":[{"internalType":"contract ISudoSwap","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"sudoPool","outputs":[{"internalType":"contract ISudoPair","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"winningTicket","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]

60a060405273271682deb8c4e0901d1a1550ad2e64d568e69909601560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507f8af398995b04c28e9951adb9721ef74c74f93e6a478f39e7e0777be13527e7ef60001b601655620186a0601760006101000a81548163ffffffff021916908363ffffffff1602179055506003601760046101000a81548161ffff021916908361ffff1602179055506001601760066101000a81548163ffffffff021916908363ffffffff160217905550348015620000f157600080fd5b50604051620061b5380380620061b583398181016040528101906200011791906200052b565b601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1684846200015c620001506200030f60201b60201c565b6200031760201b60201c565b816001908051906020019062000174929190620003db565b5080600290805190602001906200018d929190620003db565b5050508073ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff1660601b815250505073d95a9a47b3772a262262a5a14fd9b0da5ce5f0f7600e60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555073b16c1342e617a5b6e4b631eb114483fdb289c0a4600d60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506032600f81905550601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16601460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550816014806101000a81548167ffffffffffffffff021916908367ffffffffffffffff16021790555050505050620007b5565b600033905090565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b828054620003e990620006a6565b90600052602060002090601f0160209004810192826200040d576000855562000459565b82601f106200042857805160ff191683800117855562000459565b8280016001018555821562000459579182015b82811115620004585782518255916020019190600101906200043b565b5b5090506200046891906200046c565b5090565b5b80821115620004875760008160009055506001016200046d565b5090565b6000620004a26200049c84620005f2565b620005c9565b905082815260208101848484011115620004bb57600080fd5b620004c884828562000670565b509392505050565b600081519050620004e18162000781565b92915050565b600082601f830112620004f957600080fd5b81516200050b8482602086016200048b565b91505092915050565b60008151905062000525816200079b565b92915050565b600080600080608085870312156200054257600080fd5b600085015167ffffffffffffffff8111156200055d57600080fd5b6200056b87828801620004e7565b945050602085015167ffffffffffffffff8111156200058957600080fd5b6200059787828801620004e7565b9350506040620005aa8782880162000514565b9250506060620005bd87828801620004d0565b91505092959194509250565b6000620005d5620005e8565b9050620005e38282620006dc565b919050565b6000604051905090565b600067ffffffffffffffff82111562000610576200060f62000741565b5b6200061b8262000770565b9050602081019050919050565b600062000635826200063c565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600067ffffffffffffffff82169050919050565b60005b838110156200069057808201518184015260208101905062000673565b83811115620006a0576000848401525b50505050565b60006002820490506001821680620006bf57607f821691505b60208210811415620006d657620006d562000712565b5b50919050565b620006e78262000770565b810181811067ffffffffffffffff8211171562000709576200070862000741565b5b80604052505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000601f19601f8301169050919050565b6200078c8162000628565b81146200079857600080fd5b50565b620007a6816200065c565b8114620007b257600080fd5b50565b60805160601c6159da620007db60003960008181610abb0152610b0f01526159da6000f3fe6080604052600436106101fd5760003560e01c806373f425611161010d578063b4c3db26116100a0578063c87b56dd1161006f578063c87b56dd14610721578063d523f0741461075e578063e89e106a14610775578063e985e9c5146107a0578063f2fde38b146107dd57610204565b8063b4c3db2614610665578063b66fdf3a146106a2578063b88d4fde146106cd578063c26eea54146106f657610204565b806391cca3db116100dc57806391cca3db146105bd57806395d89b41146105e85780639935174214610613578063a22cb4651461063c57610204565b806373f42561146105325780638129fc1c1461055d5780638ada6b0f146105675780638da5cb5b1461059257610204565b80631fe543e3116101905780634f6ccce71161015f5780634f6ccce71461043b5780636352211e1461047857806366d38203146104b557806370a08231146104de578063715018a61461051b57610204565b80631fe543e31461038357806323b872dd146103ac5780632f745c59146103d557806342842e0e1461041257610204565b80630c3f6acf116101cc5780630c3f6acf146102d7578063178ddeda1461030257806318160ddd1461032d5780631b3ed7221461035857610204565b806301ffc9a71461020957806306fdde0314610246578063081812fc14610271578063095ea7b3146102ae57610204565b3661020457005b600080fd5b34801561021557600080fd5b50610230600480360381019061022b9190614025565b610806565b60405161023d9190614849565b60405180910390f35b34801561025257600080fd5b5061025b610880565b60405161026891906149a8565b60405180910390f35b34801561027d57600080fd5b50610298600480360381019061029391906140b8565b610912565b6040516102a591906147b9565b60405180910390f35b3480156102ba57600080fd5b506102d560048036038101906102d09190613fe9565b610958565b005b3480156102e357600080fd5b506102ec610a70565b6040516102f9919061498d565b60405180910390f35b34801561030e57600080fd5b50610317610a83565b6040516103249190614957565b60405180910390f35b34801561033957600080fd5b50610342610aa9565b60405161034f9190614c05565b60405180910390f35b34801561036457600080fd5b5061036d610ab3565b60405161037a9190614c05565b60405180910390f35b34801561038f57600080fd5b506103aa60048036038101906103a5919061410a565b610ab9565b005b3480156103b857600080fd5b506103d360048036038101906103ce9190613ee3565b610b79565b005b3480156103e157600080fd5b506103fc60048036038101906103f79190613fe9565b610bd9565b6040516104099190614c05565b60405180910390f35b34801561041e57600080fd5b5061043960048036038101906104349190613ee3565b610dd9565b005b34801561044757600080fd5b50610462600480360381019061045d91906140b8565b610df9565b60405161046f9190614c05565b60405180910390f35b34801561048457600080fd5b5061049f600480360381019061049a91906140b8565b610e53565b6040516104ac91906147b9565b60405180910390f35b3480156104c157600080fd5b506104dc60048036038101906104d79190613e55565b610f8d565b005b3480156104ea57600080fd5b5061050560048036038101906105009190613e55565b61104d565b6040516105129190614c05565b60405180910390f35b34801561052757600080fd5b50610530611216565b005b34801561053e57600080fd5b5061054761129e565b6040516105549190614bea565b60405180910390f35b6105656112c0565b005b34801561057357600080fd5b5061057c6113e5565b604051610589919061493c565b60405180910390f35b34801561059e57600080fd5b506105a761140b565b6040516105b491906147b9565b60405180910390f35b3480156105c957600080fd5b506105d2611434565b6040516105df91906147b9565b60405180910390f35b3480156105f457600080fd5b506105fd61145a565b60405161060a91906149a8565b60405180910390f35b34801561061f57600080fd5b5061063a600480360381019061063591906140b8565b6114ec565b005b34801561064857600080fd5b50610663600480360381019061065e9190613fad565b6118a6565b005b34801561067157600080fd5b5061068c600480360381019061068791906140b8565b6118bc565b60405161069991906147b9565b60405180910390f35b3480156106ae57600080fd5b506106b7611975565b6040516106c49190614972565b60405180910390f35b3480156106d957600080fd5b506106f460048036038101906106ef9190613f32565b61199b565b005b34801561070257600080fd5b5061070b6119fd565b6040516107189190614c05565b60405180910390f35b34801561072d57600080fd5b50610748600480360381019061074391906140b8565b611a03565b60405161075591906149a8565b60405180910390f35b34801561076a57600080fd5b50610773611b3a565b005b34801561078157600080fd5b5061078a611d1e565b6040516107979190614c05565b60405180910390f35b3480156107ac57600080fd5b506107c760048036038101906107c29190613ea7565b611d24565b6040516107d49190614849565b60405180910390f35b3480156107e957600080fd5b5061080460048036038101906107ff9190613e55565b611db8565b005b60007f780e9d63000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480610879575061087882611eb0565b5b9050919050565b60606001805461088f9061515a565b80601f01602080910402602001604051908101604052809291908181526020018280546108bb9061515a565b80156109085780601f106108dd57610100808354040283529160200191610908565b820191906000526020600020905b8154815290600101906020018083116108eb57829003601f168201915b5050505050905090565b600061091d82611f92565b6005600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b600061096382610e53565b90508073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156109d4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109cb90614b2a565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166109f3611fdd565b73ffffffffffffffffffffffffffffffffffffffff161480610a225750610a2181610a1c611fdd565b611d24565b5b610a61576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a5890614aca565b60405180910390fd5b610a6b8383611fe5565b505050565b601060009054906101000a900460ff1681565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000600a54905090565b600f5481565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610b6b57337f00000000000000000000000000000000000000000000000000000000000000006040517f1cf993f4000000000000000000000000000000000000000000000000000000008152600401610b629291906147d4565b60405180910390fd5b610b75828261209e565b5050565b610b8a610b84611fdd565b826121fd565b610bc9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610bc090614bca565b60405180910390fd5b610bd4838383612292565b505050565b6000610be4836124f9565b8210610c25576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c1c906149ca565b60405180910390fd5b600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610d74576000600190506000610c8b610aa9565b9050600f546002610c9c9190614e53565b811115610cc057600f546002610cb29190614e53565b81610cbd9190614ead565b91505b60005b81831015610d6c57600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610d0d846118bc565b73ffffffffffffffffffffffffffffffffffffffff161415610d5857600181610d369190614d95565b905084600182610d469190614ead565b1415610d5757829350505050610dd3565b5b600183610d659190614d95565b9250610cc3565b505050610dd2565b6000600760008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600084815260200190815260200160002054905080915050610dd3565b5b92915050565b610df48383836040518060200160405280600081525061199b565b505050565b6000600a548210610e3f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e3690614b8a565b60405180910390fd5b600182610e4c9190614d95565b9050919050565b6000806003600084815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415610f0d57600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16915050610f88565b600a54831115610f2857610f20836125b1565b915050610f88565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610f8357600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690505b809150505b919050565b610f95611fdd565b73ffffffffffffffffffffffffffffffffffffffff16610fb361140b565b73ffffffffffffffffffffffffffffffffffffffff1614611009576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161100090614aea565b60405180910390fd5b80600b60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60008073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156110be576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110b590614aaa565b60405180910390fd5b600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161480156111685750600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16145b8015611175575060135443145b156111ce57601254600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546111c79190614d95565b9050611211565b600460008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490505b919050565b61121e611fdd565b73ffffffffffffffffffffffffffffffffffffffff1661123c61140b565b73ffffffffffffffffffffffffffffffffffffffff1614611292576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161128990614aea565b60405180910390fd5b61129c6000612663565b565b601060019054906101000a90046fffffffffffffffffffffffffffffffff1681565b600060048111156112fa577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b601060009054906101000a900460ff166004811115611342577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b14611382576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161137990614b4a565b60405180910390fd5b61138a612727565b6113926128bf565b6001601060006101000a81548160ff021916908360048111156113de577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b0217905550565b600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6060600280546114699061515a565b80601f01602080910402602001604051908101604052809291908181526020018280546114959061515a565b80156114e25780601f106114b7576101008083540402835291602001916114e2565b820191906000526020600020905b8154815290600101906020018083116114c557829003601f168201915b5050505050905090565b60036004811115611526577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b601060009054906101000a900460ff16600481111561156e577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b146115ae576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016115a590614b6a565b60405180910390fd5b60006115b8610aa9565b905060005b828110156118955760006003600084846018540181611605577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b06815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141580156116a2575061dead73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614155b80156116fc5750600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614155b1561188757600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166390386bbf6040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561176b57600080fd5b505af115801561177f573d6000803e3d6000fd5b50505050611805600a47816117bd577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b04600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16612a7e90919063ffffffff16565b61182e478273ffffffffffffffffffffffffffffffffffffffff16612a7e90919063ffffffff16565b6004601060006101000a81548160ff0219169083600481111561187a577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b02179055505050506118a3565b8180600101925050506115bd565b806018540160188190555050505b50565b6118b86118b1611fdd565b8383612ad1565b5050565b6000806003600084815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600a5483111561191057611908836125b1565b915050611970565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561196b57600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690505b809150505b919050565b600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6119ac6119a6611fdd565b836121fd565b6119eb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119e290614bca565b60405180910390fd5b6119f784848484612c3e565b50505050565b60185481565b606060006040518060a00160405280606181526020016159046061913990506000600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c321118c856040518263ffffffff1660e01b8152600401611a7f9190614c05565b60006040518083038186803b158015611a9757600080fd5b505afa158015611aab573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f82011682018060405250810190611ad49190614077565b9050611b12611ae285612c9a565b611aeb83612e6f565b84604051602001611afe9392919061470e565b604051602081830303815290604052612e6f565b604051602001611b229190614797565b60405160208183030381529060405292505050919050565b611b42611fdd565b73ffffffffffffffffffffffffffffffffffffffff16611b6061140b565b73ffffffffffffffffffffffffffffffffffffffff1614611bb6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611bad90614aea565b60405180910390fd5b60036004811115611bf0577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b601060009054906101000a900460ff166004811115611c38577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b14158015611c845750610fa0601060019054906101000a90046fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff16600a54611c829190614ead565b115b611cc3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611cba90614a8a565b60405180910390fd5b6002601060006101000a81548160ff02191690836004811115611d0f577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b0217905550611d1c61300e565b565b60195481565b6000600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b611dc0611fdd565b73ffffffffffffffffffffffffffffffffffffffff16611dde61140b565b73ffffffffffffffffffffffffffffffffffffffff1614611e34576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611e2b90614aea565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415611ea4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611e9b90614a0a565b60405180910390fd5b611ead81612663565b50565b60007f80ac58cd000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480611f7b57507f5b5e139f000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b80611f8b5750611f8a82613115565b5b9050919050565b611f9b8161317f565b611fda576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611fd190614b0a565b60405180910390fd5b50565b600033905090565b816005600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff1661205883610e53565b73ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b600260048111156120d8577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b601060009054906101000a900460ff166004811115612120577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b14612160576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161215790614b6a565b60405180910390fd5b8060008151811061219a577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200260200101516018819055506003601060006101000a81548160ff021916908360048111156121f4577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b02179055505050565b60008061220983610e53565b90508073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16148061224b575061224a8185611d24565b5b8061228957508373ffffffffffffffffffffffffffffffffffffffff1661227184610912565b73ffffffffffffffffffffffffffffffffffffffff16145b91505092915050565b8273ffffffffffffffffffffffffffffffffffffffff166122b282610e53565b73ffffffffffffffffffffffffffffffffffffffff1614612308576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016122ff90614a2a565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415612378576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161236f90614a4a565b60405180910390fd5b6123838383836131b6565b61238e600082611fe5565b6001600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546123de9190614ead565b925050819055506001600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546124359190614d95565b92505081905550816003600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a46124f48383836131c6565b505050565b60008073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561256a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161256190614aaa565b60405180910390fd5b600460008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6000806003600084815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561265a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161265190614b0a565b60405180910390fd5b80915050919050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b6000600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ce9c095d3073432f962d8209781da23fb37b6b59ee15de7d984160006002670de49f255ca4c0006000662386f26fc10000600067ffffffffffffffff8111156127d5577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040519080825280602002602001820160405280156128035781602001602082028036833780820191505090505b506040518963ffffffff1660e01b81526004016128279897969594939291906148b7565b602060405180830381600087803b15801561284157600080fd5b505af1158015612855573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906128799190613e7e565b905080600c60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6000600a54141561292e57600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600960006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b600f5460046000600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546129a19190614d95565b92505081905550600f54600a546129b89190614d95565b600a81905550600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff16600f54612a1a610aa9565b14612a40576001600f54612a2e9190614ead565b600a54612a3b9190614ead565b612a43565b60015b7fdeaa91b6123d068f5821d0fb0678463d1a8a6079fe8af5de3ce5e896dcf9133d600a54604051612a749190614c05565b60405180910390a4565b600080600080600085875af1905080612acc576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612ac390614baa565b60405180910390fd5b505050565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415612b40576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612b3790614a6a565b60405180910390fd5b80600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3183604051612c319190614849565b60405180910390a3505050565b612c49848484612292565b612c5584848484613666565b612c94576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612c8b906149ea565b60405180910390fd5b50505050565b60606000821415612ce2576040518060400160405280600181526020017f30000000000000000000000000000000000000000000000000000000000000008152509050612e6a565b600082905060005b60008214612d14578080612cfd906151bd565b915050600a82612d0d9190614e22565b9150612cea565b60008167ffffffffffffffff811115612d56577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015612d885781602001600182028036833780820191505090505b50905060008290505b60008614612e6257600181612da69190614ead565b90506000600a8088612db89190614e22565b612dc29190614e53565b87612dcd9190614ead565b6030612dd99190614deb565b905060008160f81b905080848481518110612e1d577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600a88612e599190614e22565b97505050612d91565b819450505050505b919050565b6060600082511415612e9257604051806020016040528060008152509050613009565b60006040518060600160405280604081526020016159656040913990506000600360028551612ec19190614d95565b612ecb9190614e22565b6004612ed79190614e53565b90506000602082612ee89190614d95565b67ffffffffffffffff811115612f27577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015612f595781602001600182028036833780820191505090505b509050818152600183018586518101602084015b81831015612fc8576003830192508251603f8160121c168501518253600182019150603f81600c1c168501518253600182019150603f8160061c168501518253600182019150603f8116850151825360018201915050612f6d565b600389510660018114612fe25760028114612ff257612ffd565b613d3d60f01b6002830352612ffd565b603d60f81b60018303525b50505050508093505050505b919050565b601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16635d3b1d3060165460148054906101000a900467ffffffffffffffff16601760049054906101000a900461ffff16601760009054906101000a900463ffffffff16601760069054906101000a900463ffffffff166040518663ffffffff1660e01b81526004016130bb959493929190614864565b602060405180830381600087803b1580156130d557600080fd5b505af11580156130e9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061310d91906140e1565b601981905550565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b6000600a5482111561319b57613194826137fd565b90506131b1565b600082101580156131ae5750600a548211155b90505b919050565b6131c1838383613869565b505050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415613542574360135414801561327a57508273ffffffffffffffffffffffffffffffffffffffff16601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16145b1561329c5760126000815480929190613292906151bd565b91905055506132ed565b4360138190555082601160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060016012819055505b610fa0601060019054906101000a90046fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff16600a5461332e9190614ead565b101580156133bb575060016004811115613371577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b601060009054906101000a900460ff1660048111156133b9577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b145b156134a0576002601060006101000a81548160ff0219169083600481111561340c577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b0217905550600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166390386bbf6040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561347b57600080fd5b505af115801561348f573d6000803e3d6000fd5b5050505061349b61300e565b613534565b600360048111156134da577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b601060009054906101000a900460ff166004811115613522577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b14156135335761353260286114ec565b5b5b61353d816138c1565b613661565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156136605760006135c5600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1661104d565b148015613651575060016004811115613607577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b601060009054906101000a900460ff16600481111561364f577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b145b1561365f5761365e6128bf565b5b5b5b505050565b60006136878473ffffffffffffffffffffffffffffffffffffffff16613a48565b156137f0578373ffffffffffffffffffffffffffffffffffffffff1663150b7a026136b0611fdd565b8786866040518563ffffffff1660e01b81526004016136d294939291906147fd565b602060405180830381600087803b1580156136ec57600080fd5b505af192505050801561371d57506040513d601f19601f8201168201806040525081019061371a919061404e565b60015b6137a0573d806000811461374d576040519150601f19603f3d011682016040523d82523d6000602084013e613752565b606091505b50600081511415613798576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161378f906149ea565b60405180910390fd5b805181602001fd5b63150b7a0260e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149150506137f5565b600190505b949350505050565b60008073ffffffffffffffffffffffffffffffffffffffff166003600084815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614159050919050565b613874838383613a6b565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16146138bc576138b18382613a70565b6138bb8282613bdd565b5b505050565b60006138cc82610e53565b90506138d9600083611fe5565b6001600460008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546139299190614ead565b9250508190555061dead6003600084815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506001601060018282829054906101000a90046fffffffffffffffffffffffffffffffff166139b29190614d4f565b92506101000a8154816fffffffffffffffffffffffffffffffff02191690836fffffffffffffffffffffffffffffffff16021790555081600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a45050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b505050565b60006001613a7d846124f9565b613a879190614ead565b9050600060086000848152602001908152602001600020549050818114613b6c576000600760008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600084815260200190815260200160002054905080600760008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600084815260200190815260200160002081905550816008600083815260200190815260200160002081905550505b6008600084815260200190815260200160002060009055600760008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008381526020019081526020016000206000905550505050565b6000613be8836124f9565b905081600760008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600083815260200190815260200160002081905550806008600084815260200190815260200160002081905550505050565b6000613c6f613c6a84614c45565b614c20565b90508083825260208201905082856020860282011115613c8e57600080fd5b60005b85811015613cbe5781613ca48882613e2b565b845260208401935060208301925050600181019050613c91565b5050509392505050565b6000613cdb613cd684614c71565b614c20565b905082815260208101848484011115613cf357600080fd5b613cfe848285615118565b509392505050565b6000613d19613d1484614ca2565b614c20565b905082815260208101848484011115613d3157600080fd5b613d3c848285615127565b509392505050565b600081359050613d53816158a7565b92915050565b600081519050613d68816158a7565b92915050565b600082601f830112613d7f57600080fd5b8135613d8f848260208601613c5c565b91505092915050565b600081359050613da7816158be565b92915050565b600081359050613dbc816158d5565b92915050565b600081519050613dd1816158d5565b92915050565b600082601f830112613de857600080fd5b8135613df8848260208601613cc8565b91505092915050565b600082601f830112613e1257600080fd5b8151613e22848260208601613d06565b91505092915050565b600081359050613e3a816158ec565b92915050565b600081519050613e4f816158ec565b92915050565b600060208284031215613e6757600080fd5b6000613e7584828501613d44565b91505092915050565b600060208284031215613e9057600080fd5b6000613e9e84828501613d59565b91505092915050565b60008060408385031215613eba57600080fd5b6000613ec885828601613d44565b9250506020613ed985828601613d44565b9150509250929050565b600080600060608486031215613ef857600080fd5b6000613f0686828701613d44565b9350506020613f1786828701613d44565b9250506040613f2886828701613e2b565b9150509250925092565b60008060008060808587031215613f4857600080fd5b6000613f5687828801613d44565b9450506020613f6787828801613d44565b9350506040613f7887828801613e2b565b925050606085013567ffffffffffffffff811115613f9557600080fd5b613fa187828801613dd7565b91505092959194509250565b60008060408385031215613fc057600080fd5b6000613fce85828601613d44565b9250506020613fdf85828601613d98565b9150509250929050565b60008060408385031215613ffc57600080fd5b600061400a85828601613d44565b925050602061401b85828601613e2b565b9150509250929050565b60006020828403121561403757600080fd5b600061404584828501613dad565b91505092915050565b60006020828403121561406057600080fd5b600061406e84828501613dc2565b91505092915050565b60006020828403121561408957600080fd5b600082015167ffffffffffffffff8111156140a357600080fd5b6140af84828501613e01565b91505092915050565b6000602082840312156140ca57600080fd5b60006140d884828501613e2b565b91505092915050565b6000602082840312156140f357600080fd5b600061410184828501613e40565b91505092915050565b6000806040838503121561411d57600080fd5b600061412b85828601613e2b565b925050602083013567ffffffffffffffff81111561414857600080fd5b61415485828601613d6e565b9150509250929050565b600061416a83836146d2565b60208301905092915050565b61417f81614ef3565b82525050565b61418e81614ee1565b82525050565b600061419f82614ce3565b6141a98185614d11565b93506141b483614cd3565b8060005b838110156141e55781516141cc888261415e565b97506141d783614d04565b9250506001810190506141b8565b5085935050505092915050565b6141fb81614f05565b82525050565b61420a81614f11565b82525050565b600061421b82614cee565b6142258185614d22565b9350614235818560208601615127565b61423e816152f1565b840191505092915050565b6142528161500a565b82525050565b6142618161502e565b82525050565b61427081615052565b82525050565b61427f81615076565b82525050565b61428e8161509a565b82525050565b61429d816150be565b82525050565b6142ac816150d0565b82525050565b6142bb816150e2565b82525050565b6142ca816150f4565b82525050565b6142d981615106565b82525050565b60006142ea82614cf9565b6142f48185614d33565b9350614304818560208601615127565b61430d816152f1565b840191505092915050565b600061432382614cf9565b61432d8185614d44565b935061433d818560208601615127565b80840191505092915050565b6000614356602b83614d33565b915061436182615302565b604082019050919050565b6000614379603283614d33565b915061438482615351565b604082019050919050565b600061439c600f83614d44565b91506143a7826153a0565b600f82019050919050565b60006143bf602683614d33565b91506143ca826153c9565b604082019050919050565b60006143e2600283614d44565b91506143ed82615418565b600282019050919050565b6000614405601183614d44565b915061441082615441565b601182019050919050565b6000614428602583614d33565b91506144338261546a565b604082019050919050565b600061444b602483614d33565b9150614456826154b9565b604082019050919050565b600061446e601983614d33565b915061447982615508565b602082019050919050565b6000614491600983614d33565b915061449c82615531565b602082019050919050565b60006144b4602983614d33565b91506144bf8261555a565b604082019050919050565b60006144d7600183614d44565b91506144e2826155a9565b600182019050919050565b60006144fa603e83614d33565b9150614505826155d2565b604082019050919050565b600061451d602083614d33565b915061452882615621565b602082019050919050565b6000614540600b83614d44565b915061454b8261564a565b600b82019050919050565b6000614563601883614d33565b915061456e82615673565b602082019050919050565b6000614586602183614d33565b91506145918261569c565b604082019050919050565b60006145a9601d83614d44565b91506145b4826156eb565b601d82019050919050565b60006145cc600c83614d33565b91506145d782615714565b602082019050919050565b60006145ef601083614d44565b91506145fa8261573d565b601082019050919050565b6000614612600d83614d33565b915061461d82615766565b602082019050919050565b6000614635602c83614d33565b91506146408261578f565b604082019050919050565b6000614658601383614d33565b9150614663826157de565b602082019050919050565b600061467b602e83614d33565b915061468682615807565b604082019050919050565b600061469e601a83614d44565b91506146a982615856565b601a82019050919050565b6146bd81614f6d565b82525050565b6146cc81614f89565b82525050565b6146db81614fb7565b82525050565b6146ea81614fb7565b82525050565b6146f981614fc1565b82525050565b61470881614fd1565b82525050565b6000614719826143f8565b91506147258286614318565b915061473082614533565b915061473b826144ca565b915061474682614691565b91506147528285614318565b915061475d826143d5565b91506147688261438f565b91506147748284614318565b915061477f826143d5565b915061478a826145e2565b9150819050949350505050565b60006147a28261459c565b91506147ae8284614318565b915081905092915050565b60006020820190506147ce6000830184614185565b92915050565b60006040820190506147e96000830185614185565b6147f66020830184614185565b9392505050565b60006080820190506148126000830187614185565b61481f6020830186614185565b61482c60408301856146e1565b818103606083015261483e8184614210565b905095945050505050565b600060208201905061485e60008301846141f2565b92915050565b600060a0820190506148796000830188614201565b61488660208301876146ff565b61489360408301866146c3565b6148a060608301856146f0565b6148ad60808301846146f0565b9695505050505050565b6000610100820190506148cd600083018b614258565b6148da602083018a614249565b6148e76040830189614176565b6148f460608301886142a3565b61490160808301876142d0565b61490e60a08301866142b2565b61491b60c08301856142c1565b81810360e083015261492d8184614194565b90509998505050505050505050565b60006020820190506149516000830184614267565b92915050565b600060208201905061496c6000830184614276565b92915050565b60006020820190506149876000830184614285565b92915050565b60006020820190506149a26000830184614294565b92915050565b600060208201905081810360008301526149c281846142df565b905092915050565b600060208201905081810360008301526149e381614349565b9050919050565b60006020820190508181036000830152614a038161436c565b9050919050565b60006020820190508181036000830152614a23816143b2565b9050919050565b60006020820190508181036000830152614a438161441b565b9050919050565b60006020820190508181036000830152614a638161443e565b9050919050565b60006020820190508181036000830152614a8381614461565b9050919050565b60006020820190508181036000830152614aa381614484565b9050919050565b60006020820190508181036000830152614ac3816144a7565b9050919050565b60006020820190508181036000830152614ae3816144ed565b9050919050565b60006020820190508181036000830152614b0381614510565b9050919050565b60006020820190508181036000830152614b2381614556565b9050919050565b60006020820190508181036000830152614b4381614579565b9050919050565b60006020820190508181036000830152614b63816145bf565b9050919050565b60006020820190508181036000830152614b8381614605565b9050919050565b60006020820190508181036000830152614ba381614628565b9050919050565b60006020820190508181036000830152614bc38161464b565b9050919050565b60006020820190508181036000830152614be38161466e565b9050919050565b6000602082019050614bff60008301846146b4565b92915050565b6000602082019050614c1a60008301846146e1565b92915050565b6000614c2a614c3b565b9050614c36828261518c565b919050565b6000604051905090565b600067ffffffffffffffff821115614c6057614c5f6152c2565b5b602082029050602081019050919050565b600067ffffffffffffffff821115614c8c57614c8b6152c2565b5b614c95826152f1565b9050602081019050919050565b600067ffffffffffffffff821115614cbd57614cbc6152c2565b5b614cc6826152f1565b9050602081019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600082825260208201905092915050565b600081905092915050565b6000614d5a82614f6d565b9150614d6583614f6d565b9250826fffffffffffffffffffffffffffffffff03821115614d8a57614d89615206565b5b828201905092915050565b6000614da082614fb7565b9150614dab83614fb7565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115614de057614ddf615206565b5b828201905092915050565b6000614df682614fe5565b9150614e0183614fe5565b92508260ff03821115614e1757614e16615206565b5b828201905092915050565b6000614e2d82614fb7565b9150614e3883614fb7565b925082614e4857614e47615235565b5b828204905092915050565b6000614e5e82614fb7565b9150614e6983614fb7565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615614ea257614ea1615206565b5b828202905092915050565b6000614eb882614fb7565b9150614ec383614fb7565b925082821015614ed657614ed5615206565b5b828203905092915050565b6000614eec82614f97565b9050919050565b6000614efe82614f97565b9050919050565b60008115159050919050565b6000819050919050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b6000819050614f558261587f565b919050565b6000819050614f6882615893565b919050565b60006fffffffffffffffffffffffffffffffff82169050919050565b600061ffff82169050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600063ffffffff82169050919050565b600067ffffffffffffffff82169050919050565b600060ff82169050919050565b60006bffffffffffffffffffffffff82169050919050565b60006150158261501c565b9050919050565b600061502782614f97565b9050919050565b600061503982615040565b9050919050565b600061504b82614f97565b9050919050565b600061505d82615064565b9050919050565b600061506f82614f97565b9050919050565b600061508182615088565b9050919050565b600061509382614f97565b9050919050565b60006150a5826150ac565b9050919050565b60006150b782614f97565b9050919050565b60006150c982614f47565b9050919050565b60006150db82614f5a565b9050919050565b60006150ed82614ff2565b9050919050565b60006150ff82614f6d565b9050919050565b600061511182614f6d565b9050919050565b82818337600083830152505050565b60005b8381101561514557808201518184015260208101905061512a565b83811115615154576000848401525b50505050565b6000600282049050600182168061517257607f821691505b6020821081141561518657615185615293565b5b50919050565b615195826152f1565b810181811067ffffffffffffffff821117156151b4576151b36152c2565b5b80604052505050565b60006151c882614fb7565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156151fb576151fa615206565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000601f19601f8301169050919050565b7f455243373231456e756d657261626c653a206f776e657220696e646578206f7560008201527f74206f6620626f756e6473000000000000000000000000000000000000000000602082015250565b7f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560008201527f63656976657220696d706c656d656e7465720000000000000000000000000000602082015250565b7f226465736372697074696f6e223a220000000000000000000000000000000000600082015250565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b7f222c000000000000000000000000000000000000000000000000000000000000600082015250565b7f7b226e616d65223a22526166666c652023000000000000000000000000000000600082015250565b7f4552433732313a207472616e736665722066726f6d20696e636f72726563742060008201527f6f776e6572000000000000000000000000000000000000000000000000000000602082015250565b7f4552433732313a207472616e7366657220746f20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f4552433732313a20617070726f766520746f2063616c6c657200000000000000600082015250565b7f466f7262696464656e0000000000000000000000000000000000000000000000600082015250565b7f4552433732313a2061646472657373207a65726f206973206e6f74206120766160008201527f6c6964206f776e65720000000000000000000000000000000000000000000000602082015250565b7f2200000000000000000000000000000000000000000000000000000000000000600082015250565b7f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60008201527f6b656e206f776e6572206e6f7220617070726f76656420666f7220616c6c0000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f222c22696d616765223a20000000000000000000000000000000000000000000600082015250565b7f4552433732313a20696e76616c696420746f6b656e2049440000000000000000600082015250565b7f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560008201527f7200000000000000000000000000000000000000000000000000000000000000602082015250565b7f646174613a6170706c69636174696f6e2f6a736f6e3b6261736536342c000000600082015250565b7f47616d6520737461727465640000000000000000000000000000000000000000600082015250565b7f2261747472696275746573223a5b5d7d00000000000000000000000000000000600082015250565b7f6e6f7420676f6f20737461746500000000000000000000000000000000000000600082015250565b7f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60008201527f7574206f6620626f756e64730000000000000000000000000000000000000000602082015250565b7f4554485f5452414e534645525f4641494c454400000000000000000000000000600082015250565b7f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560008201527f72206e6f7220617070726f766564000000000000000000000000000000000000602082015250565b7f646174613a696d6167652f7376672b786d6c3b6261736536342c000000000000600082015250565b600581106158905761588f615264565b5b50565b600381106158a4576158a3615264565b5b50565b6158b081614ee1565b81146158bb57600080fd5b50565b6158c781614f05565b81146158d257600080fd5b50565b6158de81614f1b565b81146158e957600080fd5b50565b6158f581614fb7565b811461590057600080fd5b5056fe54686520526166666c6520697320616e206f6e20636861696e205375646f737761702067616d6520746f2074657374206c69717569646974792c2061206c75636b7920686f6c6465722063616e2074616b6520686f6d65203730302b206574682e4142434445464748494a4b4c4d4e4f505152535455565758595a6162636465666768696a6b6c6d6e6f707172737475767778797a303132333435363738392b2fa2646970667358221220ab008dcdf8e0c58292cb3f7d72d8591a5e1c7585173294e7630fd8921b2c41db64736f6c63430008040033000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000001240000000000000000000000002b2e8cda09bba9660dca5cb6233787738ad68329000000000000000000000000000000000000000000000000000000000000000a54686520526166666c65000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006524146464c450000000000000000000000000000000000000000000000000000

Deployed Bytecode

0x6080604052600436106101fd5760003560e01c806373f425611161010d578063b4c3db26116100a0578063c87b56dd1161006f578063c87b56dd14610721578063d523f0741461075e578063e89e106a14610775578063e985e9c5146107a0578063f2fde38b146107dd57610204565b8063b4c3db2614610665578063b66fdf3a146106a2578063b88d4fde146106cd578063c26eea54146106f657610204565b806391cca3db116100dc57806391cca3db146105bd57806395d89b41146105e85780639935174214610613578063a22cb4651461063c57610204565b806373f42561146105325780638129fc1c1461055d5780638ada6b0f146105675780638da5cb5b1461059257610204565b80631fe543e3116101905780634f6ccce71161015f5780634f6ccce71461043b5780636352211e1461047857806366d38203146104b557806370a08231146104de578063715018a61461051b57610204565b80631fe543e31461038357806323b872dd146103ac5780632f745c59146103d557806342842e0e1461041257610204565b80630c3f6acf116101cc5780630c3f6acf146102d7578063178ddeda1461030257806318160ddd1461032d5780631b3ed7221461035857610204565b806301ffc9a71461020957806306fdde0314610246578063081812fc14610271578063095ea7b3146102ae57610204565b3661020457005b600080fd5b34801561021557600080fd5b50610230600480360381019061022b9190614025565b610806565b60405161023d9190614849565b60405180910390f35b34801561025257600080fd5b5061025b610880565b60405161026891906149a8565b60405180910390f35b34801561027d57600080fd5b50610298600480360381019061029391906140b8565b610912565b6040516102a591906147b9565b60405180910390f35b3480156102ba57600080fd5b506102d560048036038101906102d09190613fe9565b610958565b005b3480156102e357600080fd5b506102ec610a70565b6040516102f9919061498d565b60405180910390f35b34801561030e57600080fd5b50610317610a83565b6040516103249190614957565b60405180910390f35b34801561033957600080fd5b50610342610aa9565b60405161034f9190614c05565b60405180910390f35b34801561036457600080fd5b5061036d610ab3565b60405161037a9190614c05565b60405180910390f35b34801561038f57600080fd5b506103aa60048036038101906103a5919061410a565b610ab9565b005b3480156103b857600080fd5b506103d360048036038101906103ce9190613ee3565b610b79565b005b3480156103e157600080fd5b506103fc60048036038101906103f79190613fe9565b610bd9565b6040516104099190614c05565b60405180910390f35b34801561041e57600080fd5b5061043960048036038101906104349190613ee3565b610dd9565b005b34801561044757600080fd5b50610462600480360381019061045d91906140b8565b610df9565b60405161046f9190614c05565b60405180910390f35b34801561048457600080fd5b5061049f600480360381019061049a91906140b8565b610e53565b6040516104ac91906147b9565b60405180910390f35b3480156104c157600080fd5b506104dc60048036038101906104d79190613e55565b610f8d565b005b3480156104ea57600080fd5b5061050560048036038101906105009190613e55565b61104d565b6040516105129190614c05565b60405180910390f35b34801561052757600080fd5b50610530611216565b005b34801561053e57600080fd5b5061054761129e565b6040516105549190614bea565b60405180910390f35b6105656112c0565b005b34801561057357600080fd5b5061057c6113e5565b604051610589919061493c565b60405180910390f35b34801561059e57600080fd5b506105a761140b565b6040516105b491906147b9565b60405180910390f35b3480156105c957600080fd5b506105d2611434565b6040516105df91906147b9565b60405180910390f35b3480156105f457600080fd5b506105fd61145a565b60405161060a91906149a8565b60405180910390f35b34801561061f57600080fd5b5061063a600480360381019061063591906140b8565b6114ec565b005b34801561064857600080fd5b50610663600480360381019061065e9190613fad565b6118a6565b005b34801561067157600080fd5b5061068c600480360381019061068791906140b8565b6118bc565b60405161069991906147b9565b60405180910390f35b3480156106ae57600080fd5b506106b7611975565b6040516106c49190614972565b60405180910390f35b3480156106d957600080fd5b506106f460048036038101906106ef9190613f32565b61199b565b005b34801561070257600080fd5b5061070b6119fd565b6040516107189190614c05565b60405180910390f35b34801561072d57600080fd5b50610748600480360381019061074391906140b8565b611a03565b60405161075591906149a8565b60405180910390f35b34801561076a57600080fd5b50610773611b3a565b005b34801561078157600080fd5b5061078a611d1e565b6040516107979190614c05565b60405180910390f35b3480156107ac57600080fd5b506107c760048036038101906107c29190613ea7565b611d24565b6040516107d49190614849565b60405180910390f35b3480156107e957600080fd5b5061080460048036038101906107ff9190613e55565b611db8565b005b60007f780e9d63000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480610879575061087882611eb0565b5b9050919050565b60606001805461088f9061515a565b80601f01602080910402602001604051908101604052809291908181526020018280546108bb9061515a565b80156109085780601f106108dd57610100808354040283529160200191610908565b820191906000526020600020905b8154815290600101906020018083116108eb57829003601f168201915b5050505050905090565b600061091d82611f92565b6005600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b600061096382610e53565b90508073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156109d4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109cb90614b2a565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166109f3611fdd565b73ffffffffffffffffffffffffffffffffffffffff161480610a225750610a2181610a1c611fdd565b611d24565b5b610a61576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a5890614aca565b60405180910390fd5b610a6b8383611fe5565b505050565b601060009054906101000a900460ff1681565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000600a54905090565b600f5481565b7f000000000000000000000000271682deb8c4e0901d1a1550ad2e64d568e6990973ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610b6b57337f000000000000000000000000271682deb8c4e0901d1a1550ad2e64d568e699096040517f1cf993f4000000000000000000000000000000000000000000000000000000008152600401610b629291906147d4565b60405180910390fd5b610b75828261209e565b5050565b610b8a610b84611fdd565b826121fd565b610bc9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610bc090614bca565b60405180910390fd5b610bd4838383612292565b505050565b6000610be4836124f9565b8210610c25576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c1c906149ca565b60405180910390fd5b600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610d74576000600190506000610c8b610aa9565b9050600f546002610c9c9190614e53565b811115610cc057600f546002610cb29190614e53565b81610cbd9190614ead565b91505b60005b81831015610d6c57600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610d0d846118bc565b73ffffffffffffffffffffffffffffffffffffffff161415610d5857600181610d369190614d95565b905084600182610d469190614ead565b1415610d5757829350505050610dd3565b5b600183610d659190614d95565b9250610cc3565b505050610dd2565b6000600760008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600084815260200190815260200160002054905080915050610dd3565b5b92915050565b610df48383836040518060200160405280600081525061199b565b505050565b6000600a548210610e3f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e3690614b8a565b60405180910390fd5b600182610e4c9190614d95565b9050919050565b6000806003600084815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415610f0d57600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16915050610f88565b600a54831115610f2857610f20836125b1565b915050610f88565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610f8357600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690505b809150505b919050565b610f95611fdd565b73ffffffffffffffffffffffffffffffffffffffff16610fb361140b565b73ffffffffffffffffffffffffffffffffffffffff1614611009576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161100090614aea565b60405180910390fd5b80600b60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60008073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156110be576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110b590614aaa565b60405180910390fd5b600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161480156111685750600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16145b8015611175575060135443145b156111ce57601254600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546111c79190614d95565b9050611211565b600460008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490505b919050565b61121e611fdd565b73ffffffffffffffffffffffffffffffffffffffff1661123c61140b565b73ffffffffffffffffffffffffffffffffffffffff1614611292576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161128990614aea565b60405180910390fd5b61129c6000612663565b565b601060019054906101000a90046fffffffffffffffffffffffffffffffff1681565b600060048111156112fa577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b601060009054906101000a900460ff166004811115611342577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b14611382576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161137990614b4a565b60405180910390fd5b61138a612727565b6113926128bf565b6001601060006101000a81548160ff021916908360048111156113de577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b0217905550565b600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6060600280546114699061515a565b80601f01602080910402602001604051908101604052809291908181526020018280546114959061515a565b80156114e25780601f106114b7576101008083540402835291602001916114e2565b820191906000526020600020905b8154815290600101906020018083116114c557829003601f168201915b5050505050905090565b60036004811115611526577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b601060009054906101000a900460ff16600481111561156e577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b146115ae576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016115a590614b6a565b60405180910390fd5b60006115b8610aa9565b905060005b828110156118955760006003600084846018540181611605577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b06815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141580156116a2575061dead73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614155b80156116fc5750600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614155b1561188757600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166390386bbf6040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561176b57600080fd5b505af115801561177f573d6000803e3d6000fd5b50505050611805600a47816117bd577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b04600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16612a7e90919063ffffffff16565b61182e478273ffffffffffffffffffffffffffffffffffffffff16612a7e90919063ffffffff16565b6004601060006101000a81548160ff0219169083600481111561187a577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b02179055505050506118a3565b8180600101925050506115bd565b806018540160188190555050505b50565b6118b86118b1611fdd565b8383612ad1565b5050565b6000806003600084815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600a5483111561191057611908836125b1565b915050611970565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561196b57600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690505b809150505b919050565b600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6119ac6119a6611fdd565b836121fd565b6119eb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119e290614bca565b60405180910390fd5b6119f784848484612c3e565b50505050565b60185481565b606060006040518060a00160405280606181526020016159046061913990506000600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c321118c856040518263ffffffff1660e01b8152600401611a7f9190614c05565b60006040518083038186803b158015611a9757600080fd5b505afa158015611aab573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f82011682018060405250810190611ad49190614077565b9050611b12611ae285612c9a565b611aeb83612e6f565b84604051602001611afe9392919061470e565b604051602081830303815290604052612e6f565b604051602001611b229190614797565b60405160208183030381529060405292505050919050565b611b42611fdd565b73ffffffffffffffffffffffffffffffffffffffff16611b6061140b565b73ffffffffffffffffffffffffffffffffffffffff1614611bb6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611bad90614aea565b60405180910390fd5b60036004811115611bf0577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b601060009054906101000a900460ff166004811115611c38577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b14158015611c845750610fa0601060019054906101000a90046fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff16600a54611c829190614ead565b115b611cc3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611cba90614a8a565b60405180910390fd5b6002601060006101000a81548160ff02191690836004811115611d0f577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b0217905550611d1c61300e565b565b60195481565b6000600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b611dc0611fdd565b73ffffffffffffffffffffffffffffffffffffffff16611dde61140b565b73ffffffffffffffffffffffffffffffffffffffff1614611e34576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611e2b90614aea565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415611ea4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611e9b90614a0a565b60405180910390fd5b611ead81612663565b50565b60007f80ac58cd000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480611f7b57507f5b5e139f000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b80611f8b5750611f8a82613115565b5b9050919050565b611f9b8161317f565b611fda576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611fd190614b0a565b60405180910390fd5b50565b600033905090565b816005600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff1661205883610e53565b73ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b600260048111156120d8577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b601060009054906101000a900460ff166004811115612120577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b14612160576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161215790614b6a565b60405180910390fd5b8060008151811061219a577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200260200101516018819055506003601060006101000a81548160ff021916908360048111156121f4577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b02179055505050565b60008061220983610e53565b90508073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16148061224b575061224a8185611d24565b5b8061228957508373ffffffffffffffffffffffffffffffffffffffff1661227184610912565b73ffffffffffffffffffffffffffffffffffffffff16145b91505092915050565b8273ffffffffffffffffffffffffffffffffffffffff166122b282610e53565b73ffffffffffffffffffffffffffffffffffffffff1614612308576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016122ff90614a2a565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415612378576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161236f90614a4a565b60405180910390fd5b6123838383836131b6565b61238e600082611fe5565b6001600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546123de9190614ead565b925050819055506001600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546124359190614d95565b92505081905550816003600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a46124f48383836131c6565b505050565b60008073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561256a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161256190614aaa565b60405180910390fd5b600460008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6000806003600084815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561265a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161265190614b0a565b60405180910390fd5b80915050919050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b6000600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ce9c095d3073432f962d8209781da23fb37b6b59ee15de7d984160006002670de49f255ca4c0006000662386f26fc10000600067ffffffffffffffff8111156127d5577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040519080825280602002602001820160405280156128035781602001602082028036833780820191505090505b506040518963ffffffff1660e01b81526004016128279897969594939291906148b7565b602060405180830381600087803b15801561284157600080fd5b505af1158015612855573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906128799190613e7e565b905080600c60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6000600a54141561292e57600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600960006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b600f5460046000600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546129a19190614d95565b92505081905550600f54600a546129b89190614d95565b600a81905550600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff16600f54612a1a610aa9565b14612a40576001600f54612a2e9190614ead565b600a54612a3b9190614ead565b612a43565b60015b7fdeaa91b6123d068f5821d0fb0678463d1a8a6079fe8af5de3ce5e896dcf9133d600a54604051612a749190614c05565b60405180910390a4565b600080600080600085875af1905080612acc576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612ac390614baa565b60405180910390fd5b505050565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415612b40576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612b3790614a6a565b60405180910390fd5b80600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3183604051612c319190614849565b60405180910390a3505050565b612c49848484612292565b612c5584848484613666565b612c94576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612c8b906149ea565b60405180910390fd5b50505050565b60606000821415612ce2576040518060400160405280600181526020017f30000000000000000000000000000000000000000000000000000000000000008152509050612e6a565b600082905060005b60008214612d14578080612cfd906151bd565b915050600a82612d0d9190614e22565b9150612cea565b60008167ffffffffffffffff811115612d56577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015612d885781602001600182028036833780820191505090505b50905060008290505b60008614612e6257600181612da69190614ead565b90506000600a8088612db89190614e22565b612dc29190614e53565b87612dcd9190614ead565b6030612dd99190614deb565b905060008160f81b905080848481518110612e1d577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600a88612e599190614e22565b97505050612d91565b819450505050505b919050565b6060600082511415612e9257604051806020016040528060008152509050613009565b60006040518060600160405280604081526020016159656040913990506000600360028551612ec19190614d95565b612ecb9190614e22565b6004612ed79190614e53565b90506000602082612ee89190614d95565b67ffffffffffffffff811115612f27577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015612f595781602001600182028036833780820191505090505b509050818152600183018586518101602084015b81831015612fc8576003830192508251603f8160121c168501518253600182019150603f81600c1c168501518253600182019150603f8160061c168501518253600182019150603f8116850151825360018201915050612f6d565b600389510660018114612fe25760028114612ff257612ffd565b613d3d60f01b6002830352612ffd565b603d60f81b60018303525b50505050508093505050505b919050565b601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16635d3b1d3060165460148054906101000a900467ffffffffffffffff16601760049054906101000a900461ffff16601760009054906101000a900463ffffffff16601760069054906101000a900463ffffffff166040518663ffffffff1660e01b81526004016130bb959493929190614864565b602060405180830381600087803b1580156130d557600080fd5b505af11580156130e9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061310d91906140e1565b601981905550565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b6000600a5482111561319b57613194826137fd565b90506131b1565b600082101580156131ae5750600a548211155b90505b919050565b6131c1838383613869565b505050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415613542574360135414801561327a57508273ffffffffffffffffffffffffffffffffffffffff16601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16145b1561329c5760126000815480929190613292906151bd565b91905055506132ed565b4360138190555082601160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060016012819055505b610fa0601060019054906101000a90046fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff16600a5461332e9190614ead565b101580156133bb575060016004811115613371577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b601060009054906101000a900460ff1660048111156133b9577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b145b156134a0576002601060006101000a81548160ff0219169083600481111561340c577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b0217905550600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166390386bbf6040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561347b57600080fd5b505af115801561348f573d6000803e3d6000fd5b5050505061349b61300e565b613534565b600360048111156134da577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b601060009054906101000a900460ff166004811115613522577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b14156135335761353260286114ec565b5b5b61353d816138c1565b613661565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156136605760006135c5600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1661104d565b148015613651575060016004811115613607577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b601060009054906101000a900460ff16600481111561364f577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b145b1561365f5761365e6128bf565b5b5b5b505050565b60006136878473ffffffffffffffffffffffffffffffffffffffff16613a48565b156137f0578373ffffffffffffffffffffffffffffffffffffffff1663150b7a026136b0611fdd565b8786866040518563ffffffff1660e01b81526004016136d294939291906147fd565b602060405180830381600087803b1580156136ec57600080fd5b505af192505050801561371d57506040513d601f19601f8201168201806040525081019061371a919061404e565b60015b6137a0573d806000811461374d576040519150601f19603f3d011682016040523d82523d6000602084013e613752565b606091505b50600081511415613798576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161378f906149ea565b60405180910390fd5b805181602001fd5b63150b7a0260e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149150506137f5565b600190505b949350505050565b60008073ffffffffffffffffffffffffffffffffffffffff166003600084815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614159050919050565b613874838383613a6b565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16146138bc576138b18382613a70565b6138bb8282613bdd565b5b505050565b60006138cc82610e53565b90506138d9600083611fe5565b6001600460008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546139299190614ead565b9250508190555061dead6003600084815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506001601060018282829054906101000a90046fffffffffffffffffffffffffffffffff166139b29190614d4f565b92506101000a8154816fffffffffffffffffffffffffffffffff02191690836fffffffffffffffffffffffffffffffff16021790555081600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a45050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b505050565b60006001613a7d846124f9565b613a879190614ead565b9050600060086000848152602001908152602001600020549050818114613b6c576000600760008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600084815260200190815260200160002054905080600760008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600084815260200190815260200160002081905550816008600083815260200190815260200160002081905550505b6008600084815260200190815260200160002060009055600760008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008381526020019081526020016000206000905550505050565b6000613be8836124f9565b905081600760008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600083815260200190815260200160002081905550806008600084815260200190815260200160002081905550505050565b6000613c6f613c6a84614c45565b614c20565b90508083825260208201905082856020860282011115613c8e57600080fd5b60005b85811015613cbe5781613ca48882613e2b565b845260208401935060208301925050600181019050613c91565b5050509392505050565b6000613cdb613cd684614c71565b614c20565b905082815260208101848484011115613cf357600080fd5b613cfe848285615118565b509392505050565b6000613d19613d1484614ca2565b614c20565b905082815260208101848484011115613d3157600080fd5b613d3c848285615127565b509392505050565b600081359050613d53816158a7565b92915050565b600081519050613d68816158a7565b92915050565b600082601f830112613d7f57600080fd5b8135613d8f848260208601613c5c565b91505092915050565b600081359050613da7816158be565b92915050565b600081359050613dbc816158d5565b92915050565b600081519050613dd1816158d5565b92915050565b600082601f830112613de857600080fd5b8135613df8848260208601613cc8565b91505092915050565b600082601f830112613e1257600080fd5b8151613e22848260208601613d06565b91505092915050565b600081359050613e3a816158ec565b92915050565b600081519050613e4f816158ec565b92915050565b600060208284031215613e6757600080fd5b6000613e7584828501613d44565b91505092915050565b600060208284031215613e9057600080fd5b6000613e9e84828501613d59565b91505092915050565b60008060408385031215613eba57600080fd5b6000613ec885828601613d44565b9250506020613ed985828601613d44565b9150509250929050565b600080600060608486031215613ef857600080fd5b6000613f0686828701613d44565b9350506020613f1786828701613d44565b9250506040613f2886828701613e2b565b9150509250925092565b60008060008060808587031215613f4857600080fd5b6000613f5687828801613d44565b9450506020613f6787828801613d44565b9350506040613f7887828801613e2b565b925050606085013567ffffffffffffffff811115613f9557600080fd5b613fa187828801613dd7565b91505092959194509250565b60008060408385031215613fc057600080fd5b6000613fce85828601613d44565b9250506020613fdf85828601613d98565b9150509250929050565b60008060408385031215613ffc57600080fd5b600061400a85828601613d44565b925050602061401b85828601613e2b565b9150509250929050565b60006020828403121561403757600080fd5b600061404584828501613dad565b91505092915050565b60006020828403121561406057600080fd5b600061406e84828501613dc2565b91505092915050565b60006020828403121561408957600080fd5b600082015167ffffffffffffffff8111156140a357600080fd5b6140af84828501613e01565b91505092915050565b6000602082840312156140ca57600080fd5b60006140d884828501613e2b565b91505092915050565b6000602082840312156140f357600080fd5b600061410184828501613e40565b91505092915050565b6000806040838503121561411d57600080fd5b600061412b85828601613e2b565b925050602083013567ffffffffffffffff81111561414857600080fd5b61415485828601613d6e565b9150509250929050565b600061416a83836146d2565b60208301905092915050565b61417f81614ef3565b82525050565b61418e81614ee1565b82525050565b600061419f82614ce3565b6141a98185614d11565b93506141b483614cd3565b8060005b838110156141e55781516141cc888261415e565b97506141d783614d04565b9250506001810190506141b8565b5085935050505092915050565b6141fb81614f05565b82525050565b61420a81614f11565b82525050565b600061421b82614cee565b6142258185614d22565b9350614235818560208601615127565b61423e816152f1565b840191505092915050565b6142528161500a565b82525050565b6142618161502e565b82525050565b61427081615052565b82525050565b61427f81615076565b82525050565b61428e8161509a565b82525050565b61429d816150be565b82525050565b6142ac816150d0565b82525050565b6142bb816150e2565b82525050565b6142ca816150f4565b82525050565b6142d981615106565b82525050565b60006142ea82614cf9565b6142f48185614d33565b9350614304818560208601615127565b61430d816152f1565b840191505092915050565b600061432382614cf9565b61432d8185614d44565b935061433d818560208601615127565b80840191505092915050565b6000614356602b83614d33565b915061436182615302565b604082019050919050565b6000614379603283614d33565b915061438482615351565b604082019050919050565b600061439c600f83614d44565b91506143a7826153a0565b600f82019050919050565b60006143bf602683614d33565b91506143ca826153c9565b604082019050919050565b60006143e2600283614d44565b91506143ed82615418565b600282019050919050565b6000614405601183614d44565b915061441082615441565b601182019050919050565b6000614428602583614d33565b91506144338261546a565b604082019050919050565b600061444b602483614d33565b9150614456826154b9565b604082019050919050565b600061446e601983614d33565b915061447982615508565b602082019050919050565b6000614491600983614d33565b915061449c82615531565b602082019050919050565b60006144b4602983614d33565b91506144bf8261555a565b604082019050919050565b60006144d7600183614d44565b91506144e2826155a9565b600182019050919050565b60006144fa603e83614d33565b9150614505826155d2565b604082019050919050565b600061451d602083614d33565b915061452882615621565b602082019050919050565b6000614540600b83614d44565b915061454b8261564a565b600b82019050919050565b6000614563601883614d33565b915061456e82615673565b602082019050919050565b6000614586602183614d33565b91506145918261569c565b604082019050919050565b60006145a9601d83614d44565b91506145b4826156eb565b601d82019050919050565b60006145cc600c83614d33565b91506145d782615714565b602082019050919050565b60006145ef601083614d44565b91506145fa8261573d565b601082019050919050565b6000614612600d83614d33565b915061461d82615766565b602082019050919050565b6000614635602c83614d33565b91506146408261578f565b604082019050919050565b6000614658601383614d33565b9150614663826157de565b602082019050919050565b600061467b602e83614d33565b915061468682615807565b604082019050919050565b600061469e601a83614d44565b91506146a982615856565b601a82019050919050565b6146bd81614f6d565b82525050565b6146cc81614f89565b82525050565b6146db81614fb7565b82525050565b6146ea81614fb7565b82525050565b6146f981614fc1565b82525050565b61470881614fd1565b82525050565b6000614719826143f8565b91506147258286614318565b915061473082614533565b915061473b826144ca565b915061474682614691565b91506147528285614318565b915061475d826143d5565b91506147688261438f565b91506147748284614318565b915061477f826143d5565b915061478a826145e2565b9150819050949350505050565b60006147a28261459c565b91506147ae8284614318565b915081905092915050565b60006020820190506147ce6000830184614185565b92915050565b60006040820190506147e96000830185614185565b6147f66020830184614185565b9392505050565b60006080820190506148126000830187614185565b61481f6020830186614185565b61482c60408301856146e1565b818103606083015261483e8184614210565b905095945050505050565b600060208201905061485e60008301846141f2565b92915050565b600060a0820190506148796000830188614201565b61488660208301876146ff565b61489360408301866146c3565b6148a060608301856146f0565b6148ad60808301846146f0565b9695505050505050565b6000610100820190506148cd600083018b614258565b6148da602083018a614249565b6148e76040830189614176565b6148f460608301886142a3565b61490160808301876142d0565b61490e60a08301866142b2565b61491b60c08301856142c1565b81810360e083015261492d8184614194565b90509998505050505050505050565b60006020820190506149516000830184614267565b92915050565b600060208201905061496c6000830184614276565b92915050565b60006020820190506149876000830184614285565b92915050565b60006020820190506149a26000830184614294565b92915050565b600060208201905081810360008301526149c281846142df565b905092915050565b600060208201905081810360008301526149e381614349565b9050919050565b60006020820190508181036000830152614a038161436c565b9050919050565b60006020820190508181036000830152614a23816143b2565b9050919050565b60006020820190508181036000830152614a438161441b565b9050919050565b60006020820190508181036000830152614a638161443e565b9050919050565b60006020820190508181036000830152614a8381614461565b9050919050565b60006020820190508181036000830152614aa381614484565b9050919050565b60006020820190508181036000830152614ac3816144a7565b9050919050565b60006020820190508181036000830152614ae3816144ed565b9050919050565b60006020820190508181036000830152614b0381614510565b9050919050565b60006020820190508181036000830152614b2381614556565b9050919050565b60006020820190508181036000830152614b4381614579565b9050919050565b60006020820190508181036000830152614b63816145bf565b9050919050565b60006020820190508181036000830152614b8381614605565b9050919050565b60006020820190508181036000830152614ba381614628565b9050919050565b60006020820190508181036000830152614bc38161464b565b9050919050565b60006020820190508181036000830152614be38161466e565b9050919050565b6000602082019050614bff60008301846146b4565b92915050565b6000602082019050614c1a60008301846146e1565b92915050565b6000614c2a614c3b565b9050614c36828261518c565b919050565b6000604051905090565b600067ffffffffffffffff821115614c6057614c5f6152c2565b5b602082029050602081019050919050565b600067ffffffffffffffff821115614c8c57614c8b6152c2565b5b614c95826152f1565b9050602081019050919050565b600067ffffffffffffffff821115614cbd57614cbc6152c2565b5b614cc6826152f1565b9050602081019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600082825260208201905092915050565b600081905092915050565b6000614d5a82614f6d565b9150614d6583614f6d565b9250826fffffffffffffffffffffffffffffffff03821115614d8a57614d89615206565b5b828201905092915050565b6000614da082614fb7565b9150614dab83614fb7565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115614de057614ddf615206565b5b828201905092915050565b6000614df682614fe5565b9150614e0183614fe5565b92508260ff03821115614e1757614e16615206565b5b828201905092915050565b6000614e2d82614fb7565b9150614e3883614fb7565b925082614e4857614e47615235565b5b828204905092915050565b6000614e5e82614fb7565b9150614e6983614fb7565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615614ea257614ea1615206565b5b828202905092915050565b6000614eb882614fb7565b9150614ec383614fb7565b925082821015614ed657614ed5615206565b5b828203905092915050565b6000614eec82614f97565b9050919050565b6000614efe82614f97565b9050919050565b60008115159050919050565b6000819050919050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b6000819050614f558261587f565b919050565b6000819050614f6882615893565b919050565b60006fffffffffffffffffffffffffffffffff82169050919050565b600061ffff82169050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600063ffffffff82169050919050565b600067ffffffffffffffff82169050919050565b600060ff82169050919050565b60006bffffffffffffffffffffffff82169050919050565b60006150158261501c565b9050919050565b600061502782614f97565b9050919050565b600061503982615040565b9050919050565b600061504b82614f97565b9050919050565b600061505d82615064565b9050919050565b600061506f82614f97565b9050919050565b600061508182615088565b9050919050565b600061509382614f97565b9050919050565b60006150a5826150ac565b9050919050565b60006150b782614f97565b9050919050565b60006150c982614f47565b9050919050565b60006150db82614f5a565b9050919050565b60006150ed82614ff2565b9050919050565b60006150ff82614f6d565b9050919050565b600061511182614f6d565b9050919050565b82818337600083830152505050565b60005b8381101561514557808201518184015260208101905061512a565b83811115615154576000848401525b50505050565b6000600282049050600182168061517257607f821691505b6020821081141561518657615185615293565b5b50919050565b615195826152f1565b810181811067ffffffffffffffff821117156151b4576151b36152c2565b5b80604052505050565b60006151c882614fb7565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156151fb576151fa615206565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000601f19601f8301169050919050565b7f455243373231456e756d657261626c653a206f776e657220696e646578206f7560008201527f74206f6620626f756e6473000000000000000000000000000000000000000000602082015250565b7f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560008201527f63656976657220696d706c656d656e7465720000000000000000000000000000602082015250565b7f226465736372697074696f6e223a220000000000000000000000000000000000600082015250565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b7f222c000000000000000000000000000000000000000000000000000000000000600082015250565b7f7b226e616d65223a22526166666c652023000000000000000000000000000000600082015250565b7f4552433732313a207472616e736665722066726f6d20696e636f72726563742060008201527f6f776e6572000000000000000000000000000000000000000000000000000000602082015250565b7f4552433732313a207472616e7366657220746f20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f4552433732313a20617070726f766520746f2063616c6c657200000000000000600082015250565b7f466f7262696464656e0000000000000000000000000000000000000000000000600082015250565b7f4552433732313a2061646472657373207a65726f206973206e6f74206120766160008201527f6c6964206f776e65720000000000000000000000000000000000000000000000602082015250565b7f2200000000000000000000000000000000000000000000000000000000000000600082015250565b7f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60008201527f6b656e206f776e6572206e6f7220617070726f76656420666f7220616c6c0000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f222c22696d616765223a20000000000000000000000000000000000000000000600082015250565b7f4552433732313a20696e76616c696420746f6b656e2049440000000000000000600082015250565b7f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560008201527f7200000000000000000000000000000000000000000000000000000000000000602082015250565b7f646174613a6170706c69636174696f6e2f6a736f6e3b6261736536342c000000600082015250565b7f47616d6520737461727465640000000000000000000000000000000000000000600082015250565b7f2261747472696275746573223a5b5d7d00000000000000000000000000000000600082015250565b7f6e6f7420676f6f20737461746500000000000000000000000000000000000000600082015250565b7f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60008201527f7574206f6620626f756e64730000000000000000000000000000000000000000602082015250565b7f4554485f5452414e534645525f4641494c454400000000000000000000000000600082015250565b7f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560008201527f72206e6f7220617070726f766564000000000000000000000000000000000000602082015250565b7f646174613a696d6167652f7376672b786d6c3b6261736536342c000000000000600082015250565b600581106158905761588f615264565b5b50565b600381106158a4576158a3615264565b5b50565b6158b081614ee1565b81146158bb57600080fd5b50565b6158c781614f05565b81146158d257600080fd5b50565b6158de81614f1b565b81146158e957600080fd5b50565b6158f581614fb7565b811461590057600080fd5b5056fe54686520526166666c6520697320616e206f6e20636861696e205375646f737761702067616d6520746f2074657374206c69717569646974792c2061206c75636b7920686f6c6465722063616e2074616b6520686f6d65203730302b206574682e4142434445464748494a4b4c4d4e4f505152535455565758595a6162636465666768696a6b6c6d6e6f707172737475767778797a303132333435363738392b2fa2646970667358221220ab008dcdf8e0c58292cb3f7d72d8591a5e1c7585173294e7630fd8921b2c41db64736f6c63430008040033

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

000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000001240000000000000000000000002b2e8cda09bba9660dca5cb6233787738ad68329000000000000000000000000000000000000000000000000000000000000000a54686520526166666c65000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006524146464c450000000000000000000000000000000000000000000000000000

-----Decoded View---------------
Arg [0] : name (string): The Raffle
Arg [1] : symbol (string): RAFFLE
Arg [2] : subscriptionId (uint64): 292
Arg [3] : _router (address): 0x2B2e8cDA09bBA9660dCA5cB6233787738Ad68329

-----Encoded View---------------
8 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000080
Arg [1] : 00000000000000000000000000000000000000000000000000000000000000c0
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000124
Arg [3] : 0000000000000000000000002b2e8cda09bba9660dca5cb6233787738ad68329
Arg [4] : 000000000000000000000000000000000000000000000000000000000000000a
Arg [5] : 54686520526166666c6500000000000000000000000000000000000000000000
Arg [6] : 0000000000000000000000000000000000000000000000000000000000000006
Arg [7] : 524146464c450000000000000000000000000000000000000000000000000000


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  ]

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.