ETH Price: $2,296.80 (+4.88%)

Token

ERC20 ***
 

Overview

Max Total Supply

1,024 ERC20 ***

Holders

145

Market

Volume (24H)

N/A

Min Price (24H)

N/A

Max Price (24H)

N/A
Filtered by Token Holder
Null: 0x000...000
Balance
0 ERC20 ***
0x0000000000000000000000000000000000000000
Loading...
Loading
Loading...
Loading
Loading...
Loading

Click here to update the token information / general information
# Exchange Pair Price  24H Volume % Volume

Contract Source Code Verified (Exact Match)

Contract Name:
Brains

Compiler Version
v0.8.26+commit.8a97fa7a

Optimization Enabled:
Yes with 2000 runs

Other Settings:
default evmVersion
File 1 of 19 : ERC721.sol
// SPDX-License-Identifier: MIT
/**
   ____    _    ____  _____ ____       _    ___ 
  | __ )  / \  / ___|| ____|  _ \     / \  |_ _|
  |  _ \ / _ \ \___ \|  _| | | | |   / _ \  | | 
  | |_) / ___ \ ___) | |___| |_| |  / ___ \ | | 
  |____/_/___\_\____/|_____|____/ _/_/   \_\___|
  | __ )|  _ \    / \  |_ _| \ | / ___|         
  |  _ \| |_) |  / _ \  | ||  \| \___ \         
  | |_) |  _ <  / ___ \ | || |\  |___) |        
  |____/|_| \_\/_/   \_\___|_| \_|____/         
*/
pragma solidity ^0.8.0;

import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";

import "./BrainERC20.sol"; 

interface IBrainCredits {
    function decreaseTotalSupply() external;
    function increaseTotalSupply() external;
}

contract Brains is ERC721, Ownable, IERC721Receiver, ReentrancyGuard {
    using SafeMath for uint256;

    struct MetadataProposal {
        string name;
        string ticker;
        string metadataUrl;
        string imageUrl;
        uint256 votesLocked;
        mapping(address => uint256) voterLocks;
        bool executed;
    }

    struct BrainMetadata {
        string name;
        string ticker;
        string metadataUrl;
        string imageUrl;
    }
    
    address public brainCreditAddress;
    address public pepecoinAddress;

    mapping(uint256 => address) public brainToERC20; 
    mapping(uint256 => BrainMetadata) public brainMetadata;
    mapping(uint256 => string) public brainERC20Names;
    mapping(uint256 => string) public brainERC20Symbols;
    mapping(address => uint256) public contributions;
    mapping(uint256 => mapping(uint256 => MetadataProposal)) public metadataProposals;
    mapping(uint256 => uint256) public proposalCounter;
    mapping(address => uint256) public stakes;
    mapping(uint256 => uint256) public tokenStakeTime;
    mapping(uint256 => string) private _tokenURIs;
    mapping(uint256 => bool) private _blockedTokenIds;

    uint256 public tokenCounter;
    uint256 private constant TOKENS_PER_NFT = 1000 * 10**18; 
    uint256 private constant STAKE_AMOUNT = 100000 * 10**18;
    uint256 private constant STAKE_DURATION = 90 days;
    uint256[] private availableTokenIds;
    uint256 public constant MAX_SUPPLY = 1024;
    uint256 public constant PROPOSAL_THRESHOLD = 250000 * 10**18; // 250,000 tokens

    // Add new state variables
    uint256 public currentBatchId;
    mapping(uint256 => mapping(address => uint256)) public batchContributions; // Contributions per batch per contributor
    mapping(uint256 => uint256) public batchTotalContributions;               // Total contributions per batch
    mapping(uint256 => bool) public batchMinted;                              // Whether the batch has been minted
    mapping(uint256 => address) public batchERC20Address;                     // The ERC20 token address associated with a batch
    mapping(uint256 => uint256) public batchTokenId;                          // The NFT tokenId associated with a batch
    mapping(uint256 => mapping(address => bool)) public tokensClaimed;         

    event BrainMinted(uint256 nftId, address brainFather);
    event BrainTokenActivated(uint256 nftId, address brainTokenAddress);
    event ContributionReceived(address contributor, uint256 amount);
    event BrainMetadataUpdated(uint256 tokenId, string name, string ticker, string metadataUrl, string imageUrl);
    event BrainTransferred(uint256 indexed tokenId, address indexed from, address indexed to, uint256 timestamp);
    event MetadataChangeProposed(uint256 indexed tokenId, uint256 proposalId, string name, string ticker, string metadataUrl, string imageUrl);
    event VoteCast(uint256 indexed tokenId, uint256 proposalId, address voter, uint256 amount);

    // Update the constructor to initialize `currentBatchId`
    constructor() ERC721("BasedAI Brains", "BRAIN") Ownable(msg.sender) {
        tokenCounter = 0;
        currentBatchId = 0; // Start with batch ID 0
    }

    function setBrainCredits(address _brainCreditAddress) public onlyOwner {
        brainCreditAddress = _brainCreditAddress;
    }

    function setPepecoin(address _pepecoinAddress) public onlyOwner {
        pepecoinAddress = _pepecoinAddress;
    }

    function redeemBrain(uint256 amount) public {
        require(brainCreditAddress != address(0), "Specific Brain Credit address not set");
        require(amount >= TOKENS_PER_NFT, "Minimum amount not met");
        require(amount % TOKENS_PER_NFT == 0, "Amount must be in increments of 1000 credits");
        uint256 numNFTs = amount / TOKENS_PER_NFT;
        require(tokenCounter + numNFTs - 1 <= MAX_SUPPLY, "Exceeds maximum supply of Brains");

        IERC20(brainCreditAddress).transferFrom(msg.sender, address(this), amount);

        for (uint256 i = 0; i < numNFTs; i++) {
            uint256 tokenId;
            if (availableTokenIds.length > 0) {
                tokenId = availableTokenIds[availableTokenIds.length - 1];
                availableTokenIds.pop();
            } else {
                unchecked {
                    tokenId = tokenCounter;
                    tokenCounter++;
                }
                
            }
            emit BrainMinted(tokenId, msg.sender);
            _safeMint(msg.sender, tokenId);
        }
    }

    function stakePepecoin(uint256 amount) public {
        require(pepecoinAddress != address(0), "Specific Pepecoin address not set");
        require(amount % STAKE_AMOUNT == 0, "Stake amount must be in increments of 100,000 tokens");
        uint256 numNFTs = amount.div(STAKE_AMOUNT);
        require(tokenCounter + numNFTs - 1 <= MAX_SUPPLY, "Exceeds maximum supply of Brains");

        IERC20(pepecoinAddress).transferFrom(msg.sender, address(this), amount);
        stakes[msg.sender] = stakes[msg.sender].add(amount);

        IBrainCredits(brainCreditAddress).decreaseTotalSupply();

        for (uint256 i = 0; i < numNFTs; i++) {
            uint256 tokenId;
            if (availableTokenIds.length > 0) {
                tokenId = availableTokenIds[availableTokenIds.length - 1];
                availableTokenIds.pop();
            } else {
                unchecked {
                    tokenId = tokenCounter;
                    tokenCounter++;
                    if (tokenCounter == 47) tokenCounter++; // reserved for Based Labs
                }
                
            }
            emit BrainMinted(tokenId, msg.sender);
            _safeMint(msg.sender, tokenId);
            tokenStakeTime[tokenId] = block.timestamp;
        }
    }

    function unstakePepecoin(uint256 tokenId) public {
        require(ownerOf(tokenId) == msg.sender, "Only Brain owner can unstake");
        require(block.timestamp >= tokenStakeTime[tokenId] + STAKE_DURATION, "Stake period not yet completed");
        require(stakes[msg.sender] >= STAKE_AMOUNT, "Not enough tokens staked");

        stakes[msg.sender] = stakes[msg.sender].sub(STAKE_AMOUNT);
        IERC20(pepecoinAddress).transfer(msg.sender, STAKE_AMOUNT);
        _burn(tokenId);
        availableTokenIds.push(tokenId);

        IBrainCredits(brainCreditAddress).increaseTotalSupply();
    }

    function activateBrain(uint256 tokenId) public {
        require(ownerOf(tokenId) == msg.sender, "Only Brain owner can link a ERC20");
        require(brainToERC20[tokenId] == address(0), "Brain token has been activated.");
        address erc20Contract = _deployERC20(msg.sender, tokenId); 
        brainToERC20[tokenId] = erc20Contract;
        emit BrainTokenActivated(tokenId, erc20Contract);
    }

    function _deployERC20(address tokenOwner, uint256 tokenId) internal returns (address) {
        string memory name;
        string memory symbol;
    
        // Check if name and symbol are defined in metadata
        if (bytes(brainMetadata[tokenId].name).length > 0 && bytes(brainMetadata[tokenId].ticker).length > 0) {
            name = brainMetadata[tokenId].name;
            symbol = brainMetadata[tokenId].ticker;
        } else {
            name = string(abi.encodePacked("BRAIN TOKEN #", Strings.toString(tokenId)));
            symbol = string(abi.encodePacked("B#", Strings.toString(tokenId)));
        }
    
        uint256 initialSupply = 1000000 * 10**18; 
        BrainERC20 newERC20 = new BrainERC20(name, symbol, initialSupply, tokenOwner);
        brainERC20Names[tokenId] = name;
        brainERC20Symbols[tokenId] = symbol;
        return address(newERC20);
    }

    function contributeBrainCredits(uint256 amount) public {
        require(brainCreditAddress != address(0), "Brain Credit address not set");
        require(amount > 0, "Amount must be greater than zero");
        IERC20(brainCreditAddress).transferFrom(msg.sender, address(this), amount);

        uint256 remainingAmount = amount;

        while (remainingAmount > 0) {
            uint256 availableContribution = TOKENS_PER_NFT.sub(batchTotalContributions[currentBatchId]);

            uint256 contributionAmount = remainingAmount;
            if (contributionAmount > availableContribution) {
                contributionAmount = availableContribution;
            }

            batchContributions[currentBatchId][msg.sender] = batchContributions[currentBatchId][msg.sender].add(contributionAmount);
            batchTotalContributions[currentBatchId] = batchTotalContributions[currentBatchId].add(contributionAmount);

            remainingAmount = remainingAmount.sub(contributionAmount);

            emit ContributionReceived(msg.sender, contributionAmount);

            if (batchTotalContributions[currentBatchId] >= TOKENS_PER_NFT) {
                // Move to the next batch
                currentBatchId++;
            }
        }
    }

    function getBrainERC20Address(uint256 tokenId) public view returns (address) {
        return brainToERC20[tokenId];
    }

    function collectiveMint(uint256 batchId) public {
        require(batchTotalContributions[batchId] >= TOKENS_PER_NFT, "Not enough BrainCredits contributed in this batch");
        require(!batchMinted[batchId], "Batch already minted");
        require(tokenCounter < MAX_SUPPLY, "Exceeds maximum supply of Brains");

        uint256 tokenId;
        if (availableTokenIds.length > 0) {
            tokenId = availableTokenIds[availableTokenIds.length - 1];
            availableTokenIds.pop();
        } else {
            unchecked {
                tokenId = tokenCounter;
                tokenCounter++;
                if (tokenCounter == 47) tokenCounter++; // reserved for Based Labs
            }
        }
        emit BrainMinted(tokenId, address(this));
        _safeMint(address(this), tokenId);
        address erc20Contract = _deployERC20(address(this), tokenId);
        brainToERC20[tokenId] = erc20Contract;

    
        batchERC20Address[batchId] = erc20Contract;
        batchTokenId[batchId] = tokenId;
        batchMinted[batchId] = true;

        emit BrainTokenActivated(tokenId, erc20Contract);
    }

    function claimTokens(uint256 batchId) public {
        require(batchMinted[batchId], "Tokens not minted for this batch yet");
        require(!tokensClaimed[batchId][msg.sender], "Tokens already claimed for this batch");
        uint256 contribution = batchContributions[batchId][msg.sender];
        require(contribution > 0, "No contributions for this batch");

        // Calculate the share based on contributions
        uint256 share = contribution.mul(1000000 * 10**18).div(TOKENS_PER_NFT);

        tokensClaimed[batchId][msg.sender] = true;

        BrainERC20(batchERC20Address[batchId]).transfer(msg.sender, share);
    }

    function getStakedAmount(address staker) public view returns (uint256) {
        return stakes[staker];
    }

    function mintLabsBrain(uint256 tokenId) public onlyOwner {
        require(tokenId < MAX_SUPPLY, "Token ID exceeds maximum supply");
        require(pepecoinAddress == address(0), "Cannot run after mint start");
        emit BrainMinted(tokenId, msg.sender);
        IBrainCredits(brainCreditAddress).decreaseTotalSupply();
        _safeMint(msg.sender, tokenId);
        if (tokenId != 47) tokenCounter++;
    }

    function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
        string memory _tokenURI = _tokenURIs[tokenId];

        if (bytes(_tokenURI).length > 0) {
            return _tokenURI;
        }

        if (bytes(brainMetadata[tokenId].metadataUrl).length > 0) {
            return brainMetadata[tokenId].metadataUrl;
        }

        return "https://ordinals.com/content/f4be79518ebb0283ed37012b42152dedc2bdfe2e7a89267c7448ab36e02bf99ci0";
    }

    function proposeMetadataChange(uint256 tokenId, string memory name, string memory ticker, string memory metadataUrl, string memory imageUrl) public {
        require(brainToERC20[tokenId] != address(0), "Brain token not activated");
        require(IERC20(brainToERC20[tokenId]).balanceOf(msg.sender) > 100, "Must own at least 100 brain tokens to propose");
        require(!_blockedTokenIds[tokenId], "Metadata updates disabled on Brain");
        
        uint256 proposalId = proposalCounter[tokenId];
        MetadataProposal storage proposal = metadataProposals[tokenId][proposalId];
        
        proposal.name = name;
        proposal.ticker = ticker;
        proposal.metadataUrl = metadataUrl;
        proposal.imageUrl = imageUrl;
        proposal.votesLocked = 0;
        proposal.executed = false;
        
        proposalCounter[tokenId]++;
        
        emit MetadataChangeProposed(tokenId, proposalId, name, ticker, metadataUrl, imageUrl);
    }

    function voteOnProposal(uint256 tokenId, uint256 proposalId, uint256 amount) public nonReentrant {
        require(brainToERC20[tokenId] != address(0), "Brain token not activated");
        require(!_blockedTokenIds[tokenId], "Metadata updates disabled on Brain");
        MetadataProposal storage proposal = metadataProposals[tokenId][proposalId];
        require(!proposal.executed, "Proposal already executed");
        
        IERC20 brainToken = IERC20(brainToERC20[tokenId]);
        require(brainToken.balanceOf(msg.sender) >= amount, "Insufficient balance");
        
        brainToken.transferFrom(msg.sender, address(this), amount);
        
        proposal.votesLocked = proposal.votesLocked.add(amount);
        proposal.voterLocks[msg.sender] = proposal.voterLocks[msg.sender].add(amount);
        
        emit VoteCast(tokenId, proposalId, msg.sender, amount);
        
        if (proposal.votesLocked >= PROPOSAL_THRESHOLD) {
            executeProposal(tokenId, proposalId);
        }
    }

    function executeProposal(uint256 tokenId, uint256 proposalId) internal {
        require(!_blockedTokenIds[tokenId], "Metadata updates disabled on Brain");
        MetadataProposal storage proposal = metadataProposals[tokenId][proposalId];
        require(!proposal.executed, "Proposal already executed");
        require(proposal.votesLocked >= PROPOSAL_THRESHOLD, "Voting threshold not met");
        
        brainMetadata[tokenId] = BrainMetadata(proposal.name, proposal.ticker, proposal.metadataUrl, proposal.imageUrl);
        
        // Update ERC20 token name and symbol
        address erc20Address = brainToERC20[tokenId];
        if (erc20Address != address(0)) {
            string memory newERC20Name = string(abi.encodePacked("BRAIN TOKEN #", Strings.toString(tokenId), " - ", proposal.name));
            string memory newERC20Symbol = string(abi.encodePacked("B#", Strings.toString(tokenId), "-", proposal.ticker));
            BrainERC20(erc20Address).updateTokenInfo(newERC20Name, newERC20Symbol);
            brainERC20Names[tokenId] = newERC20Name;
            brainERC20Symbols[tokenId] = newERC20Symbol;
        }
        
        proposal.executed = true;
        
        emit BrainMetadataUpdated(tokenId, proposal.name, proposal.ticker, proposal.metadataUrl, proposal.imageUrl);
    }

    function updateBrainMetadata(uint256 tokenId, string memory name, string memory ticker, string memory metadataUrl, string memory imageUrl) public {
        require(ownerOf(tokenId) == msg.sender, "Only Brain owner can update metadata");
        require(!_blockedTokenIds[tokenId], "Metadata updates disabled on Brain");
    
        brainMetadata[tokenId] = BrainMetadata(name, ticker, metadataUrl, imageUrl);
    
        // Update ERC20 token name and symbol
        address erc20Address = brainToERC20[tokenId];
        if (erc20Address != address(0)) {
            BrainERC20(erc20Address).updateTokenInfo(name, ticker);
            brainERC20Names[tokenId] = name;
            brainERC20Symbols[tokenId] = ticker;
        }
    
        emit BrainMetadataUpdated(tokenId, name, ticker, metadataUrl, imageUrl);
    }

    function toggleBlockBrainUri(uint256 tokenId) public onlyOwner {
        _blockedTokenIds[tokenId] = !_blockedTokenIds[tokenId];
    }

    function totalSupply() public pure returns (uint256) {
        return MAX_SUPPLY;
    }
    function _afterBrainTransfer(
        address from,
        address to,
        uint256 tokenId
    ) internal virtual {
        emit BrainTransferred(tokenId, from, to, block.timestamp);
    }

    function transferFrom(
        address from,
        address to,
        uint256 tokenId
    ) public virtual override {
        super.transferFrom(from, to, tokenId);
        _afterBrainTransfer(from, to, tokenId);
    }

    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId,
        bytes memory data
    ) public virtual override {
        super.safeTransferFrom(from, to, tokenId, data);
        _afterBrainTransfer(from, to, tokenId);
    }

    // Stub functionality for self-storage of ERC721s 
    function onERC721Received(
        address operator,
        address from,
        uint256 tokenId,
        bytes calldata data
    ) external override returns (bytes4) {
        // Handle the receipt of an ERC721 token
        return this.onERC721Received.selector;
    }

}

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

import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "@openzeppelin/contracts/utils/Strings.sol";

contract BrainERC20 is ERC20 {
    uint256 private constant MAX_SUPPLY = 1000000 * 10 ** 18;
    address public immutable brainContract;
    string private _name;
    string private _symbol;

    event BrainTokenTransferred(address indexed from, address indexed to, uint256 amount);
    event BrainTokenInfoUpdated(string oldName, string newName, string oldSymbol, string newSymbol);

    constructor(string memory initialName, string memory initialSymbol, uint256 initialSupply, address owner) ERC20(initialName, initialSymbol) {
        require(initialSupply <= MAX_SUPPLY, "Initial supply exceeds maximum supply");
        brainContract = msg.sender;
        _name = initialName;
        _symbol = initialSymbol;
        _mint(owner, initialSupply);
    }

    function name() public view virtual override returns (string memory) {
        return _name;
    }

    function symbol() public view virtual override returns (string memory) {
        return _symbol;
    }

    function mint(address account, uint256 amount) public onlyBrainContract {
        require(totalSupply() + amount <= MAX_SUPPLY, "Minting would exceed max supply");
        _mint(account, amount);
    }

    function transfer(address to, uint256 amount) public virtual override returns (bool) {
        address owner = _msgSender();
        bool success = super.transfer(to, amount);
        if (success) {
            emit BrainTokenTransferred(owner, to, amount);
        }
        return success;
    }

    function transferFrom(address from, address to, uint256 amount) public virtual override returns (bool) {
        bool success = super.transferFrom(from, to, amount);
        if (success) {
            emit BrainTokenTransferred(from, to, amount);
        }
        return success;
    }

    function updateTokenInfo(string memory newName, string memory newSymbol) public onlyBrainContract {
        string memory oldName = _name;
        string memory oldSymbol = _symbol;
        _name = newName;
        _symbol = newSymbol;
        emit BrainTokenInfoUpdated(oldName, newName, oldSymbol, newSymbol);
    }

    modifier onlyBrainContract() {
        require(msg.sender == brainContract, "Caller is not the Brain contract");
        _;
    }
}

File 3 of 19 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (security/ReentrancyGuard.sol)

pragma solidity ^0.8.0;

/**
 * @dev Contract module that helps prevent reentrant calls to a function.
 *
 * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
 * available, which can be applied to functions to make sure there are no nested
 * (reentrant) calls to them.
 *
 * Note that because there is a single `nonReentrant` guard, functions marked as
 * `nonReentrant` may not call one another. This can be worked around by making
 * those functions `private`, and then adding `external` `nonReentrant` entry
 * points to them.
 *
 * TIP: If you would like to learn more about reentrancy and alternative ways
 * to protect against it, check out our blog post
 * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
 */
abstract contract ReentrancyGuard {
    // Booleans are more expensive than uint256 or any type that takes up a full
    // word because each write operation emits an extra SLOAD to first read the
    // slot's contents, replace the bits taken up by the boolean, and then write
    // back. This is the compiler's defense against contract upgrades and
    // pointer aliasing, and it cannot be disabled.

    // The values being non-zero value makes deployment a bit more expensive,
    // but in exchange the refund on every call to nonReentrant will be lower in
    // amount. Since refunds are capped to a percentage of the total
    // transaction's gas, it is best to keep them low in cases like this one, to
    // increase the likelihood of the full refund coming into effect.
    uint256 private constant _NOT_ENTERED = 1;
    uint256 private constant _ENTERED = 2;

    uint256 private _status;

    constructor() {
        _status = _NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and making it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        _nonReentrantBefore();
        _;
        _nonReentrantAfter();
    }

    function _nonReentrantBefore() private {
        // On the first call to nonReentrant, _status will be _NOT_ENTERED
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

        // Any calls to nonReentrant after this point will fail
        _status = _ENTERED;
    }

    function _nonReentrantAfter() private {
        // By storing the original value once again, a refund is triggered (see
        // https://eips.ethereum.org/EIPS/eip-2200)
        _status = _NOT_ENTERED;
    }

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

File 4 of 19 : SafeMath.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (utils/math/SafeMath.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

File 5 of 19 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol)

pragma solidity ^0.8.20;

import {Context} from "../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.
 *
 * The initial owner is set to the address provided by the deployer. 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;

    /**
     * @dev The caller account is not authorized to perform an operation.
     */
    error OwnableUnauthorizedAccount(address account);

    /**
     * @dev The owner is not a valid owner account. (eg. `address(0)`)
     */
    error OwnableInvalidOwner(address owner);

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

    /**
     * @dev Initializes the contract setting the address provided by the deployer as the initial owner.
     */
    constructor(address initialOwner) {
        if (initialOwner == address(0)) {
            revert OwnableInvalidOwner(address(0));
        }
        _transferOwnership(initialOwner);
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        _checkOwner();
        _;
    }

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

    /**
     * @dev Throws if the sender is not the owner.
     */
    function _checkOwner() internal view virtual {
        if (owner() != _msgSender()) {
            revert OwnableUnauthorizedAccount(_msgSender());
        }
    }

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

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        if (newOwner == address(0)) {
            revert OwnableInvalidOwner(address(0));
        }
        _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 6 of 19 : IERC721Receiver.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC721/IERC721Receiver.sol)

pragma solidity ^0.8.20;

/**
 * @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 7 of 19 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.20;

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

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

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

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

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

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

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

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

File 8 of 19 : Strings.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/Strings.sol)

pragma solidity ^0.8.20;

import {Math} from "./math/Math.sol";
import {SignedMath} from "./math/SignedMath.sol";

/**
 * @dev String operations.
 */
library Strings {
    bytes16 private constant HEX_DIGITS = "0123456789abcdef";
    uint8 private constant ADDRESS_LENGTH = 20;

    /**
     * @dev The `value` string doesn't fit in the specified `length`.
     */
    error StringsInsufficientHexLength(uint256 value, uint256 length);

    /**
     * @dev Converts a `uint256` to its ASCII `string` decimal representation.
     */
    function toString(uint256 value) internal pure returns (string memory) {
        unchecked {
            uint256 length = Math.log10(value) + 1;
            string memory buffer = new string(length);
            uint256 ptr;
            /// @solidity memory-safe-assembly
            assembly {
                ptr := add(buffer, add(32, length))
            }
            while (true) {
                ptr--;
                /// @solidity memory-safe-assembly
                assembly {
                    mstore8(ptr, byte(mod(value, 10), HEX_DIGITS))
                }
                value /= 10;
                if (value == 0) break;
            }
            return buffer;
        }
    }

    /**
     * @dev Converts a `int256` to its ASCII `string` decimal representation.
     */
    function toStringSigned(int256 value) internal pure returns (string memory) {
        return string.concat(value < 0 ? "-" : "", toString(SignedMath.abs(value)));
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
     */
    function toHexString(uint256 value) internal pure returns (string memory) {
        unchecked {
            return toHexString(value, Math.log256(value) + 1);
        }
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.
     */
    function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {
        uint256 localValue = value;
        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_DIGITS[localValue & 0xf];
            localValue >>= 4;
        }
        if (localValue != 0) {
            revert StringsInsufficientHexLength(value, length);
        }
        return string(buffer);
    }

    /**
     * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal
     * representation.
     */
    function toHexString(address addr) internal pure returns (string memory) {
        return toHexString(uint256(uint160(addr)), ADDRESS_LENGTH);
    }

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

File 9 of 19 : ERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC721/ERC721.sol)

pragma solidity ^0.8.20;

import {IERC721} from "./IERC721.sol";
import {IERC721Receiver} from "./IERC721Receiver.sol";
import {IERC721Metadata} from "./extensions/IERC721Metadata.sol";
import {Context} from "../../utils/Context.sol";
import {Strings} from "../../utils/Strings.sol";
import {IERC165, ERC165} from "../../utils/introspection/ERC165.sol";
import {IERC721Errors} from "../../interfaces/draft-IERC6093.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}.
 */
abstract contract ERC721 is Context, ERC165, IERC721, IERC721Metadata, IERC721Errors {
    using Strings for uint256;

    // Token name
    string private _name;

    // Token symbol
    string private _symbol;

    mapping(uint256 tokenId => address) private _owners;

    mapping(address owner => uint256) private _balances;

    mapping(uint256 tokenId => address) private _tokenApprovals;

    mapping(address owner => mapping(address operator => 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 returns (uint256) {
        if (owner == address(0)) {
            revert ERC721InvalidOwner(address(0));
        }
        return _balances[owner];
    }

    /**
     * @dev See {IERC721-ownerOf}.
     */
    function ownerOf(uint256 tokenId) public view virtual returns (address) {
        return _requireOwned(tokenId);
    }

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

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

    /**
     * @dev See {IERC721Metadata-tokenURI}.
     */
    function tokenURI(uint256 tokenId) public view virtual returns (string memory) {
        _requireOwned(tokenId);

        string memory baseURI = _baseURI();
        return bytes(baseURI).length > 0 ? string.concat(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 {
        _approve(to, tokenId, _msgSender());
    }

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

        return _getApproved(tokenId);
    }

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

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

    /**
     * @dev See {IERC721-transferFrom}.
     */
    function transferFrom(address from, address to, uint256 tokenId) public virtual {
        if (to == address(0)) {
            revert ERC721InvalidReceiver(address(0));
        }
        // Setting an "auth" arguments enables the `_isAuthorized` check which verifies that the token exists
        // (from != 0). Therefore, it is not needed to verify that the return value is not 0 here.
        address previousOwner = _update(to, tokenId, _msgSender());
        if (previousOwner != from) {
            revert ERC721IncorrectOwner(from, tokenId, previousOwner);
        }
    }

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

    /**
     * @dev See {IERC721-safeTransferFrom}.
     */
    function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data) public virtual {
        transferFrom(from, to, tokenId);
        _checkOnERC721Received(from, to, tokenId, data);
    }

    /**
     * @dev Returns the owner of the `tokenId`. Does NOT revert if token doesn't exist
     *
     * IMPORTANT: Any overrides to this function that add ownership of tokens not tracked by the
     * core ERC721 logic MUST be matched with the use of {_increaseBalance} to keep balances
     * consistent with ownership. The invariant to preserve is that for any address `a` the value returned by
     * `balanceOf(a)` must be equal to the number of tokens such that `_ownerOf(tokenId)` is `a`.
     */
    function _ownerOf(uint256 tokenId) internal view virtual returns (address) {
        return _owners[tokenId];
    }

    /**
     * @dev Returns the approved address for `tokenId`. Returns 0 if `tokenId` is not minted.
     */
    function _getApproved(uint256 tokenId) internal view virtual returns (address) {
        return _tokenApprovals[tokenId];
    }

    /**
     * @dev Returns whether `spender` is allowed to manage `owner`'s tokens, or `tokenId` in
     * particular (ignoring whether it is owned by `owner`).
     *
     * WARNING: This function assumes that `owner` is the actual owner of `tokenId` and does not verify this
     * assumption.
     */
    function _isAuthorized(address owner, address spender, uint256 tokenId) internal view virtual returns (bool) {
        return
            spender != address(0) &&
            (owner == spender || isApprovedForAll(owner, spender) || _getApproved(tokenId) == spender);
    }

    /**
     * @dev Checks if `spender` can operate on `tokenId`, assuming the provided `owner` is the actual owner.
     * Reverts if `spender` does not have approval from the provided `owner` for the given token or for all its assets
     * the `spender` for the specific `tokenId`.
     *
     * WARNING: This function assumes that `owner` is the actual owner of `tokenId` and does not verify this
     * assumption.
     */
    function _checkAuthorized(address owner, address spender, uint256 tokenId) internal view virtual {
        if (!_isAuthorized(owner, spender, tokenId)) {
            if (owner == address(0)) {
                revert ERC721NonexistentToken(tokenId);
            } else {
                revert ERC721InsufficientApproval(spender, tokenId);
            }
        }
    }

    /**
     * @dev Unsafe write access to the balances, used by extensions that "mint" tokens using an {ownerOf} override.
     *
     * NOTE: the value is limited to type(uint128).max. This protect against _balance overflow. It is unrealistic that
     * a uint256 would ever overflow from increments when these increments are bounded to uint128 values.
     *
     * WARNING: Increasing an account's balance using this function tends to be paired with an override of the
     * {_ownerOf} function to resolve the ownership of the corresponding tokens so that balances and ownership
     * remain consistent with one another.
     */
    function _increaseBalance(address account, uint128 value) internal virtual {
        unchecked {
            _balances[account] += value;
        }
    }

    /**
     * @dev Transfers `tokenId` from its current owner to `to`, or alternatively mints (or burns) if the current owner
     * (or `to`) is the zero address. Returns the owner of the `tokenId` before the update.
     *
     * The `auth` argument is optional. If the value passed is non 0, then this function will check that
     * `auth` is either the owner of the token, or approved to operate on the token (by the owner).
     *
     * Emits a {Transfer} event.
     *
     * NOTE: If overriding this function in a way that tracks balances, see also {_increaseBalance}.
     */
    function _update(address to, uint256 tokenId, address auth) internal virtual returns (address) {
        address from = _ownerOf(tokenId);

        // Perform (optional) operator check
        if (auth != address(0)) {
            _checkAuthorized(from, auth, tokenId);
        }

        // Execute the update
        if (from != address(0)) {
            // Clear approval. No need to re-authorize or emit the Approval event
            _approve(address(0), tokenId, address(0), false);

            unchecked {
                _balances[from] -= 1;
            }
        }

        if (to != address(0)) {
            unchecked {
                _balances[to] += 1;
            }
        }

        _owners[tokenId] = to;

        emit Transfer(from, to, tokenId);

        return from;
    }

    /**
     * @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 {
        if (to == address(0)) {
            revert ERC721InvalidReceiver(address(0));
        }
        address previousOwner = _update(to, tokenId, address(0));
        if (previousOwner != address(0)) {
            revert ERC721InvalidSender(address(0));
        }
    }

    /**
     * @dev Mints `tokenId`, transfers it to `to` and checks for `to` acceptance.
     *
     * 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 {
        _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);
        _checkOnERC721Received(address(0), to, tokenId, data);
    }

    /**
     * @dev Destroys `tokenId`.
     * The approval is cleared when the token is burned.
     * This is an internal function that does not check if the sender is authorized to operate on the token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     *
     * Emits a {Transfer} event.
     */
    function _burn(uint256 tokenId) internal {
        address previousOwner = _update(address(0), tokenId, address(0));
        if (previousOwner == address(0)) {
            revert ERC721NonexistentToken(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 {
        if (to == address(0)) {
            revert ERC721InvalidReceiver(address(0));
        }
        address previousOwner = _update(to, tokenId, address(0));
        if (previousOwner == address(0)) {
            revert ERC721NonexistentToken(tokenId);
        } else if (previousOwner != from) {
            revert ERC721IncorrectOwner(from, tokenId, previousOwner);
        }
    }

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`, checking that contract recipients
     * are aware of the ERC721 standard 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 like {safeTransferFrom} in the sense that it invokes
     * {IERC721Receiver-onERC721Received} on the receiver, and can be used to e.g.
     * implement alternative mechanisms to perform token transfer, such as signature-based.
     *
     * Requirements:
     *
     * - `tokenId` token must exist and be owned by `from`.
     * - `to` cannot be the zero address.
     * - `from` cannot be the zero address.
     * - 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) internal {
        _safeTransfer(from, to, tokenId, "");
    }

    /**
     * @dev Same as {xref-ERC721-_safeTransfer-address-address-uint256-}[`_safeTransfer`], with an additional `data` parameter which is
     * forwarded in {IERC721Receiver-onERC721Received} to contract recipients.
     */
    function _safeTransfer(address from, address to, uint256 tokenId, bytes memory data) internal virtual {
        _transfer(from, to, tokenId);
        _checkOnERC721Received(from, to, tokenId, data);
    }

    /**
     * @dev Approve `to` to operate on `tokenId`
     *
     * The `auth` argument is optional. If the value passed is non 0, then this function will check that `auth` is
     * either the owner of the token, or approved to operate on all tokens held by this owner.
     *
     * Emits an {Approval} event.
     *
     * Overrides to this logic should be done to the variant with an additional `bool emitEvent` argument.
     */
    function _approve(address to, uint256 tokenId, address auth) internal {
        _approve(to, tokenId, auth, true);
    }

    /**
     * @dev Variant of `_approve` with an optional flag to enable or disable the {Approval} event. The event is not
     * emitted in the context of transfers.
     */
    function _approve(address to, uint256 tokenId, address auth, bool emitEvent) internal virtual {
        // Avoid reading the owner unless necessary
        if (emitEvent || auth != address(0)) {
            address owner = _requireOwned(tokenId);

            // We do not use _isAuthorized because single-token approvals should not be able to call approve
            if (auth != address(0) && owner != auth && !isApprovedForAll(owner, auth)) {
                revert ERC721InvalidApprover(auth);
            }

            if (emitEvent) {
                emit Approval(owner, to, tokenId);
            }
        }

        _tokenApprovals[tokenId] = to;
    }

    /**
     * @dev Approve `operator` to operate on all of `owner` tokens
     *
     * Requirements:
     * - operator can't be the address zero.
     *
     * Emits an {ApprovalForAll} event.
     */
    function _setApprovalForAll(address owner, address operator, bool approved) internal virtual {
        if (operator == address(0)) {
            revert ERC721InvalidOperator(operator);
        }
        _operatorApprovals[owner][operator] = approved;
        emit ApprovalForAll(owner, operator, approved);
    }

    /**
     * @dev Reverts if the `tokenId` doesn't have a current owner (it hasn't been minted, or it has been burned).
     * Returns the owner.
     *
     * Overrides to ownership logic should be done to {_ownerOf}.
     */
    function _requireOwned(uint256 tokenId) internal view returns (address) {
        address owner = _ownerOf(tokenId);
        if (owner == address(0)) {
            revert ERC721NonexistentToken(tokenId);
        }
        return owner;
    }

    /**
     * @dev Private function to invoke {IERC721Receiver-onERC721Received} on a target address. This will revert if the
     * recipient doesn't accept the token transfer. 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
     */
    function _checkOnERC721Received(address from, address to, uint256 tokenId, bytes memory data) private {
        if (to.code.length > 0) {
            try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, data) returns (bytes4 retval) {
                if (retval != IERC721Receiver.onERC721Received.selector) {
                    revert ERC721InvalidReceiver(to);
                }
            } catch (bytes memory reason) {
                if (reason.length == 0) {
                    revert ERC721InvalidReceiver(to);
                } else {
                    /// @solidity memory-safe-assembly
                    assembly {
                        revert(add(32, reason), mload(reason))
                    }
                }
            }
        }
    }
}

File 10 of 19 : ERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/ERC20.sol)

pragma solidity ^0.8.20;

import {IERC20} from "./IERC20.sol";
import {IERC20Metadata} from "./extensions/IERC20Metadata.sol";
import {Context} from "../../utils/Context.sol";
import {IERC20Errors} from "../../interfaces/draft-IERC6093.sol";

/**
 * @dev Implementation of the {IERC20} interface.
 *
 * This implementation is agnostic to the way tokens are created. This means
 * that a supply mechanism has to be added in a derived contract using {_mint}.
 *
 * TIP: For a detailed writeup see our guide
 * https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How
 * to implement supply mechanisms].
 *
 * The default value of {decimals} is 18. To change this, you should override
 * this function so it returns a different value.
 *
 * We have followed general OpenZeppelin Contracts guidelines: functions revert
 * instead returning `false` on failure. This behavior is nonetheless
 * conventional and does not conflict with the expectations of ERC20
 * applications.
 *
 * Additionally, an {Approval} event is emitted on calls to {transferFrom}.
 * This allows applications to reconstruct the allowance for all accounts just
 * by listening to said events. Other implementations of the EIP may not emit
 * these events, as it isn't required by the specification.
 */
abstract contract ERC20 is Context, IERC20, IERC20Metadata, IERC20Errors {
    mapping(address account => uint256) private _balances;

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

    uint256 private _totalSupply;

    string private _name;
    string private _symbol;

    /**
     * @dev Sets the values for {name} and {symbol}.
     *
     * All two of these values are immutable: they can only be set once during
     * construction.
     */
    constructor(string memory name_, string memory symbol_) {
        _name = name_;
        _symbol = symbol_;
    }

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

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

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

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

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

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

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

    /**
     * @dev See {IERC20-approve}.
     *
     * NOTE: If `value` is the maximum `uint256`, the allowance is not updated on
     * `transferFrom`. This is semantically equivalent to an infinite approval.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function approve(address spender, uint256 value) public virtual returns (bool) {
        address owner = _msgSender();
        _approve(owner, spender, value);
        return true;
    }

    /**
     * @dev See {IERC20-transferFrom}.
     *
     * Emits an {Approval} event indicating the updated allowance. This is not
     * required by the EIP. See the note at the beginning of {ERC20}.
     *
     * NOTE: Does not update the allowance if the current allowance
     * is the maximum `uint256`.
     *
     * Requirements:
     *
     * - `from` and `to` cannot be the zero address.
     * - `from` must have a balance of at least `value`.
     * - the caller must have allowance for ``from``'s tokens of at least
     * `value`.
     */
    function transferFrom(address from, address to, uint256 value) public virtual returns (bool) {
        address spender = _msgSender();
        _spendAllowance(from, spender, value);
        _transfer(from, to, value);
        return true;
    }

    /**
     * @dev Moves a `value` amount of tokens from `from` to `to`.
     *
     * This internal function is equivalent to {transfer}, and can be used to
     * e.g. implement automatic token fees, slashing mechanisms, etc.
     *
     * Emits a {Transfer} event.
     *
     * NOTE: This function is not virtual, {_update} should be overridden instead.
     */
    function _transfer(address from, address to, uint256 value) internal {
        if (from == address(0)) {
            revert ERC20InvalidSender(address(0));
        }
        if (to == address(0)) {
            revert ERC20InvalidReceiver(address(0));
        }
        _update(from, to, value);
    }

    /**
     * @dev Transfers a `value` amount of tokens from `from` to `to`, or alternatively mints (or burns) if `from`
     * (or `to`) is the zero address. All customizations to transfers, mints, and burns should be done by overriding
     * this function.
     *
     * Emits a {Transfer} event.
     */
    function _update(address from, address to, uint256 value) internal virtual {
        if (from == address(0)) {
            // Overflow check required: The rest of the code assumes that totalSupply never overflows
            _totalSupply += value;
        } else {
            uint256 fromBalance = _balances[from];
            if (fromBalance < value) {
                revert ERC20InsufficientBalance(from, fromBalance, value);
            }
            unchecked {
                // Overflow not possible: value <= fromBalance <= totalSupply.
                _balances[from] = fromBalance - value;
            }
        }

        if (to == address(0)) {
            unchecked {
                // Overflow not possible: value <= totalSupply or value <= fromBalance <= totalSupply.
                _totalSupply -= value;
            }
        } else {
            unchecked {
                // Overflow not possible: balance + value is at most totalSupply, which we know fits into a uint256.
                _balances[to] += value;
            }
        }

        emit Transfer(from, to, value);
    }

    /**
     * @dev Creates a `value` amount of tokens and assigns them to `account`, by transferring it from address(0).
     * Relies on the `_update` mechanism
     *
     * Emits a {Transfer} event with `from` set to the zero address.
     *
     * NOTE: This function is not virtual, {_update} should be overridden instead.
     */
    function _mint(address account, uint256 value) internal {
        if (account == address(0)) {
            revert ERC20InvalidReceiver(address(0));
        }
        _update(address(0), account, value);
    }

    /**
     * @dev Destroys a `value` amount of tokens from `account`, lowering the total supply.
     * Relies on the `_update` mechanism.
     *
     * Emits a {Transfer} event with `to` set to the zero address.
     *
     * NOTE: This function is not virtual, {_update} should be overridden instead
     */
    function _burn(address account, uint256 value) internal {
        if (account == address(0)) {
            revert ERC20InvalidSender(address(0));
        }
        _update(account, address(0), value);
    }

    /**
     * @dev Sets `value` as the allowance of `spender` over the `owner` s tokens.
     *
     * This internal function is equivalent to `approve`, and can be used to
     * e.g. set automatic allowances for certain subsystems, etc.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `owner` cannot be the zero address.
     * - `spender` cannot be the zero address.
     *
     * Overrides to this logic should be done to the variant with an additional `bool emitEvent` argument.
     */
    function _approve(address owner, address spender, uint256 value) internal {
        _approve(owner, spender, value, true);
    }

    /**
     * @dev Variant of {_approve} with an optional flag to enable or disable the {Approval} event.
     *
     * By default (when calling {_approve}) the flag is set to true. On the other hand, approval changes made by
     * `_spendAllowance` during the `transferFrom` operation set the flag to false. This saves gas by not emitting any
     * `Approval` event during `transferFrom` operations.
     *
     * Anyone who wishes to continue emitting `Approval` events on the`transferFrom` operation can force the flag to
     * true using the following override:
     * ```
     * function _approve(address owner, address spender, uint256 value, bool) internal virtual override {
     *     super._approve(owner, spender, value, true);
     * }
     * ```
     *
     * Requirements are the same as {_approve}.
     */
    function _approve(address owner, address spender, uint256 value, bool emitEvent) internal virtual {
        if (owner == address(0)) {
            revert ERC20InvalidApprover(address(0));
        }
        if (spender == address(0)) {
            revert ERC20InvalidSpender(address(0));
        }
        _allowances[owner][spender] = value;
        if (emitEvent) {
            emit Approval(owner, spender, value);
        }
    }

    /**
     * @dev Updates `owner` s allowance for `spender` based on spent `value`.
     *
     * Does not update the allowance value in case of infinite allowance.
     * Revert if not enough allowance is available.
     *
     * Does not emit an {Approval} event.
     */
    function _spendAllowance(address owner, address spender, uint256 value) internal virtual {
        uint256 currentAllowance = allowance(owner, spender);
        if (currentAllowance != type(uint256).max) {
            if (currentAllowance < value) {
                revert ERC20InsufficientAllowance(spender, currentAllowance, value);
            }
            unchecked {
                _approve(owner, spender, currentAllowance - value, false);
            }
        }
    }
}

File 11 of 19 : SignedMath.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/math/SignedMath.sol)

pragma solidity ^0.8.20;

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

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

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

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

File 12 of 19 : Math.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/math/Math.sol)

pragma solidity ^0.8.20;

/**
 * @dev Standard math utilities missing in the Solidity language.
 */
library Math {
    /**
     * @dev Muldiv operation overflow.
     */
    error MathOverflowedMulDiv();

    enum Rounding {
        Floor, // Toward negative infinity
        Ceil, // Toward positive infinity
        Trunc, // Toward zero
        Expand // Away from zero
    }

    /**
     * @dev Returns the addition of two unsigned integers, with an overflow flag.
     */
    function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            uint256 c = a + b;
            if (c < a) return (false, 0);
            return (true, c);
        }
    }

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

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

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

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

    /**
     * @dev Returns the largest of two numbers.
     */
    function max(uint256 a, uint256 b) internal pure returns (uint256) {
        return a > b ? a : b;
    }

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

    /**
     * @dev Returns the average of two numbers. The result is rounded towards
     * zero.
     */
    function average(uint256 a, uint256 b) internal pure returns (uint256) {
        // (a + b) / 2 can overflow.
        return (a & b) + (a ^ b) / 2;
    }

    /**
     * @dev Returns the ceiling of the division of two numbers.
     *
     * This differs from standard division with `/` in that it rounds towards infinity instead
     * of rounding towards zero.
     */
    function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {
        if (b == 0) {
            // Guarantee the same behavior as in a regular Solidity division.
            return a / b;
        }

        // (a + b - 1) / b can overflow on addition, so we distribute.
        return a == 0 ? 0 : (a - 1) / b + 1;
    }

    /**
     * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or
     * denominator == 0.
     * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) with further edits by
     * Uniswap Labs also under MIT license.
     */
    function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) {
        unchecked {
            // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use
            // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256
            // variables such that product = prod1 * 2^256 + prod0.
            uint256 prod0 = x * y; // Least significant 256 bits of the product
            uint256 prod1; // Most significant 256 bits of the product
            assembly {
                let mm := mulmod(x, y, not(0))
                prod1 := sub(sub(mm, prod0), lt(mm, prod0))
            }

            // Handle non-overflow cases, 256 by 256 division.
            if (prod1 == 0) {
                // Solidity will revert if denominator == 0, unlike the div opcode on its own.
                // The surrounding unchecked block does not change this fact.
                // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic.
                return prod0 / denominator;
            }

            // Make sure the result is less than 2^256. Also prevents denominator == 0.
            if (denominator <= prod1) {
                revert MathOverflowedMulDiv();
            }

            ///////////////////////////////////////////////
            // 512 by 256 division.
            ///////////////////////////////////////////////

            // Make division exact by subtracting the remainder from [prod1 prod0].
            uint256 remainder;
            assembly {
                // Compute remainder using mulmod.
                remainder := mulmod(x, y, denominator)

                // Subtract 256 bit number from 512 bit number.
                prod1 := sub(prod1, gt(remainder, prod0))
                prod0 := sub(prod0, remainder)
            }

            // Factor powers of two out of denominator and compute largest power of two divisor of denominator.
            // Always >= 1. See https://cs.stackexchange.com/q/138556/92363.

            uint256 twos = denominator & (0 - denominator);
            assembly {
                // Divide denominator by twos.
                denominator := div(denominator, twos)

                // Divide [prod1 prod0] by twos.
                prod0 := div(prod0, twos)

                // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.
                twos := add(div(sub(0, twos), twos), 1)
            }

            // Shift in bits from prod1 into prod0.
            prod0 |= prod1 * twos;

            // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such
            // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for
            // four bits. That is, denominator * inv = 1 mod 2^4.
            uint256 inverse = (3 * denominator) ^ 2;

            // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also
            // works in modular arithmetic, doubling the correct bits in each step.
            inverse *= 2 - denominator * inverse; // inverse mod 2^8
            inverse *= 2 - denominator * inverse; // inverse mod 2^16
            inverse *= 2 - denominator * inverse; // inverse mod 2^32
            inverse *= 2 - denominator * inverse; // inverse mod 2^64
            inverse *= 2 - denominator * inverse; // inverse mod 2^128
            inverse *= 2 - denominator * inverse; // inverse mod 2^256

            // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.
            // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is
            // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1
            // is no longer required.
            result = prod0 * inverse;
            return result;
        }
    }

    /**
     * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.
     */
    function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) {
        uint256 result = mulDiv(x, y, denominator);
        if (unsignedRoundsUp(rounding) && mulmod(x, y, denominator) > 0) {
            result += 1;
        }
        return result;
    }

    /**
     * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded
     * towards zero.
     *
     * Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11).
     */
    function sqrt(uint256 a) internal pure returns (uint256) {
        if (a == 0) {
            return 0;
        }

        // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.
        //
        // We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have
        // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.
        //
        // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`
        // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`
        // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`
        //
        // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.
        uint256 result = 1 << (log2(a) >> 1);

        // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,
        // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at
        // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision
        // into the expected uint128 result.
        unchecked {
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            return min(result, a / result);
        }
    }

    /**
     * @notice Calculates sqrt(a), following the selected rounding direction.
     */
    function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = sqrt(a);
            return result + (unsignedRoundsUp(rounding) && result * result < a ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 2 of a positive value rounded towards zero.
     * Returns 0 if given 0.
     */
    function log2(uint256 value) internal pure returns (uint256) {
        uint256 result = 0;
        unchecked {
            if (value >> 128 > 0) {
                value >>= 128;
                result += 128;
            }
            if (value >> 64 > 0) {
                value >>= 64;
                result += 64;
            }
            if (value >> 32 > 0) {
                value >>= 32;
                result += 32;
            }
            if (value >> 16 > 0) {
                value >>= 16;
                result += 16;
            }
            if (value >> 8 > 0) {
                value >>= 8;
                result += 8;
            }
            if (value >> 4 > 0) {
                value >>= 4;
                result += 4;
            }
            if (value >> 2 > 0) {
                value >>= 2;
                result += 2;
            }
            if (value >> 1 > 0) {
                result += 1;
            }
        }
        return result;
    }

    /**
     * @dev Return the log in base 2, following the selected rounding direction, of a positive value.
     * Returns 0 if given 0.
     */
    function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = log2(value);
            return result + (unsignedRoundsUp(rounding) && 1 << result < value ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 10 of a positive value rounded towards zero.
     * Returns 0 if given 0.
     */
    function log10(uint256 value) internal pure returns (uint256) {
        uint256 result = 0;
        unchecked {
            if (value >= 10 ** 64) {
                value /= 10 ** 64;
                result += 64;
            }
            if (value >= 10 ** 32) {
                value /= 10 ** 32;
                result += 32;
            }
            if (value >= 10 ** 16) {
                value /= 10 ** 16;
                result += 16;
            }
            if (value >= 10 ** 8) {
                value /= 10 ** 8;
                result += 8;
            }
            if (value >= 10 ** 4) {
                value /= 10 ** 4;
                result += 4;
            }
            if (value >= 10 ** 2) {
                value /= 10 ** 2;
                result += 2;
            }
            if (value >= 10 ** 1) {
                result += 1;
            }
        }
        return result;
    }

    /**
     * @dev Return the log in base 10, following the selected rounding direction, of a positive value.
     * Returns 0 if given 0.
     */
    function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = log10(value);
            return result + (unsignedRoundsUp(rounding) && 10 ** result < value ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 256 of a positive value rounded towards zero.
     * Returns 0 if given 0.
     *
     * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.
     */
    function log256(uint256 value) internal pure returns (uint256) {
        uint256 result = 0;
        unchecked {
            if (value >> 128 > 0) {
                value >>= 128;
                result += 16;
            }
            if (value >> 64 > 0) {
                value >>= 64;
                result += 8;
            }
            if (value >> 32 > 0) {
                value >>= 32;
                result += 4;
            }
            if (value >> 16 > 0) {
                value >>= 16;
                result += 2;
            }
            if (value >> 8 > 0) {
                result += 1;
            }
        }
        return result;
    }

    /**
     * @dev Return the log in base 256, following the selected rounding direction, of a positive value.
     * Returns 0 if given 0.
     */
    function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = log256(value);
            return result + (unsignedRoundsUp(rounding) && 1 << (result << 3) < value ? 1 : 0);
        }
    }

    /**
     * @dev Returns whether a provided rounding mode is considered rounding up for unsigned integers.
     */
    function unsignedRoundsUp(Rounding rounding) internal pure returns (bool) {
        return uint8(rounding) % 2 == 1;
    }
}

File 13 of 19 : draft-IERC6093.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/draft-IERC6093.sol)
pragma solidity ^0.8.20;

/**
 * @dev Standard ERC20 Errors
 * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC20 tokens.
 */
interface IERC20Errors {
    /**
     * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers.
     * @param sender Address whose tokens are being transferred.
     * @param balance Current balance for the interacting account.
     * @param needed Minimum amount required to perform a transfer.
     */
    error ERC20InsufficientBalance(address sender, uint256 balance, uint256 needed);

    /**
     * @dev Indicates a failure with the token `sender`. Used in transfers.
     * @param sender Address whose tokens are being transferred.
     */
    error ERC20InvalidSender(address sender);

    /**
     * @dev Indicates a failure with the token `receiver`. Used in transfers.
     * @param receiver Address to which tokens are being transferred.
     */
    error ERC20InvalidReceiver(address receiver);

    /**
     * @dev Indicates a failure with the `spender`’s `allowance`. Used in transfers.
     * @param spender Address that may be allowed to operate on tokens without being their owner.
     * @param allowance Amount of tokens a `spender` is allowed to operate with.
     * @param needed Minimum amount required to perform a transfer.
     */
    error ERC20InsufficientAllowance(address spender, uint256 allowance, uint256 needed);

    /**
     * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.
     * @param approver Address initiating an approval operation.
     */
    error ERC20InvalidApprover(address approver);

    /**
     * @dev Indicates a failure with the `spender` to be approved. Used in approvals.
     * @param spender Address that may be allowed to operate on tokens without being their owner.
     */
    error ERC20InvalidSpender(address spender);
}

/**
 * @dev Standard ERC721 Errors
 * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC721 tokens.
 */
interface IERC721Errors {
    /**
     * @dev Indicates that an address can't be an owner. For example, `address(0)` is a forbidden owner in EIP-20.
     * Used in balance queries.
     * @param owner Address of the current owner of a token.
     */
    error ERC721InvalidOwner(address owner);

    /**
     * @dev Indicates a `tokenId` whose `owner` is the zero address.
     * @param tokenId Identifier number of a token.
     */
    error ERC721NonexistentToken(uint256 tokenId);

    /**
     * @dev Indicates an error related to the ownership over a particular token. Used in transfers.
     * @param sender Address whose tokens are being transferred.
     * @param tokenId Identifier number of a token.
     * @param owner Address of the current owner of a token.
     */
    error ERC721IncorrectOwner(address sender, uint256 tokenId, address owner);

    /**
     * @dev Indicates a failure with the token `sender`. Used in transfers.
     * @param sender Address whose tokens are being transferred.
     */
    error ERC721InvalidSender(address sender);

    /**
     * @dev Indicates a failure with the token `receiver`. Used in transfers.
     * @param receiver Address to which tokens are being transferred.
     */
    error ERC721InvalidReceiver(address receiver);

    /**
     * @dev Indicates a failure with the `operator`’s approval. Used in transfers.
     * @param operator Address that may be allowed to operate on tokens without being their owner.
     * @param tokenId Identifier number of a token.
     */
    error ERC721InsufficientApproval(address operator, uint256 tokenId);

    /**
     * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.
     * @param approver Address initiating an approval operation.
     */
    error ERC721InvalidApprover(address approver);

    /**
     * @dev Indicates a failure with the `operator` to be approved. Used in approvals.
     * @param operator Address that may be allowed to operate on tokens without being their owner.
     */
    error ERC721InvalidOperator(address operator);
}

/**
 * @dev Standard ERC1155 Errors
 * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC1155 tokens.
 */
interface IERC1155Errors {
    /**
     * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers.
     * @param sender Address whose tokens are being transferred.
     * @param balance Current balance for the interacting account.
     * @param needed Minimum amount required to perform a transfer.
     * @param tokenId Identifier number of a token.
     */
    error ERC1155InsufficientBalance(address sender, uint256 balance, uint256 needed, uint256 tokenId);

    /**
     * @dev Indicates a failure with the token `sender`. Used in transfers.
     * @param sender Address whose tokens are being transferred.
     */
    error ERC1155InvalidSender(address sender);

    /**
     * @dev Indicates a failure with the token `receiver`. Used in transfers.
     * @param receiver Address to which tokens are being transferred.
     */
    error ERC1155InvalidReceiver(address receiver);

    /**
     * @dev Indicates a failure with the `operator`’s approval. Used in transfers.
     * @param operator Address that may be allowed to operate on tokens without being their owner.
     * @param owner Address of the current owner of a token.
     */
    error ERC1155MissingApprovalForAll(address operator, address owner);

    /**
     * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.
     * @param approver Address initiating an approval operation.
     */
    error ERC1155InvalidApprover(address approver);

    /**
     * @dev Indicates a failure with the `operator` to be approved. Used in approvals.
     * @param operator Address that may be allowed to operate on tokens without being their owner.
     */
    error ERC1155InvalidOperator(address operator);

    /**
     * @dev Indicates an array length mismatch between ids and values in a safeBatchTransferFrom operation.
     * Used in batch transfers.
     * @param idsLength Length of the array of token identifiers
     * @param valuesLength Length of the array of token amounts
     */
    error ERC1155InvalidArrayLength(uint256 idsLength, uint256 valuesLength);
}

File 14 of 19 : ERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/ERC165.sol)

pragma solidity ^0.8.20;

import {IERC165} from "./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);
 * }
 * ```
 */
abstract contract ERC165 is IERC165 {
    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual returns (bool) {
        return interfaceId == type(IERC165).interfaceId;
    }
}

File 15 of 19 : Context.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol)

pragma solidity ^0.8.20;

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

    function _contextSuffixLength() internal view virtual returns (uint256) {
        return 0;
    }
}

File 16 of 19 : IERC721Metadata.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC721/extensions/IERC721Metadata.sol)

pragma solidity ^0.8.20;

import {IERC721} from "../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 17 of 19 : IERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC721/IERC721.sol)

pragma solidity ^0.8.20;

import {IERC165} from "../../utils/introspection/IERC165.sol";

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

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

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

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

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

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

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

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

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

    /**
     * @dev Approve or remove `operator` as an operator for the caller.
     * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.
     *
     * Requirements:
     *
     * - The `operator` cannot be the address zero.
     *
     * 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 18 of 19 : IERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/IERC165.sol)

pragma solidity ^0.8.20;

/**
 * @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 19 of 19 : IERC20Metadata.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/extensions/IERC20Metadata.sol)

pragma solidity ^0.8.20;

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

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

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

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

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

Contract Security Audit

Contract ABI

API
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"address","name":"owner","type":"address"}],"name":"ERC721IncorrectOwner","type":"error"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ERC721InsufficientApproval","type":"error"},{"inputs":[{"internalType":"address","name":"approver","type":"address"}],"name":"ERC721InvalidApprover","type":"error"},{"inputs":[{"internalType":"address","name":"operator","type":"address"}],"name":"ERC721InvalidOperator","type":"error"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"ERC721InvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"}],"name":"ERC721InvalidReceiver","type":"error"},{"inputs":[{"internalType":"address","name":"sender","type":"address"}],"name":"ERC721InvalidSender","type":"error"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ERC721NonexistentToken","type":"error"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"OwnableInvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"OwnableUnauthorizedAccount","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":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"string","name":"name","type":"string"},{"indexed":false,"internalType":"string","name":"ticker","type":"string"},{"indexed":false,"internalType":"string","name":"metadataUrl","type":"string"},{"indexed":false,"internalType":"string","name":"imageUrl","type":"string"}],"name":"BrainMetadataUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"nftId","type":"uint256"},{"indexed":false,"internalType":"address","name":"brainFather","type":"address"}],"name":"BrainMinted","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"nftId","type":"uint256"},{"indexed":false,"internalType":"address","name":"brainTokenAddress","type":"address"}],"name":"BrainTokenActivated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"BrainTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"contributor","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"ContributionReceived","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"proposalId","type":"uint256"},{"indexed":false,"internalType":"string","name":"name","type":"string"},{"indexed":false,"internalType":"string","name":"ticker","type":"string"},{"indexed":false,"internalType":"string","name":"metadataUrl","type":"string"},{"indexed":false,"internalType":"string","name":"imageUrl","type":"string"}],"name":"MetadataChangeProposed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"proposalId","type":"uint256"},{"indexed":false,"internalType":"address","name":"voter","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"VoteCast","type":"event"},{"inputs":[],"name":"MAX_SUPPLY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PROPOSAL_THRESHOLD","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"activateBrain","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"address","name":"","type":"address"}],"name":"batchContributions","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"batchERC20Address","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"batchMinted","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"batchTokenId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"batchTotalContributions","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"brainCreditAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"brainERC20Names","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"brainERC20Symbols","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"brainMetadata","outputs":[{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"ticker","type":"string"},{"internalType":"string","name":"metadataUrl","type":"string"},{"internalType":"string","name":"imageUrl","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"brainToERC20","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"batchId","type":"uint256"}],"name":"claimTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"batchId","type":"uint256"}],"name":"collectiveMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"contributeBrainCredits","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"contributions","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"currentBatchId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getBrainERC20Address","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"staker","type":"address"}],"name":"getStakedAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"metadataProposals","outputs":[{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"ticker","type":"string"},{"internalType":"string","name":"metadataUrl","type":"string"},{"internalType":"string","name":"imageUrl","type":"string"},{"internalType":"uint256","name":"votesLocked","type":"uint256"},{"internalType":"bool","name":"executed","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"mintLabsBrain","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"address","name":"from","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"onERC721Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pepecoinAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"proposalCounter","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"ticker","type":"string"},{"internalType":"string","name":"metadataUrl","type":"string"},{"internalType":"string","name":"imageUrl","type":"string"}],"name":"proposeMetadataChange","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"redeemBrain","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_brainCreditAddress","type":"address"}],"name":"setBrainCredits","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_pepecoinAddress","type":"address"}],"name":"setPepecoin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"stakePepecoin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"stakes","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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":"tokenId","type":"uint256"}],"name":"toggleBlockBrainUri","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"tokenCounter","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"tokenStakeTime","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":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"address","name":"","type":"address"}],"name":"tokensClaimed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"unstakePepecoin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"ticker","type":"string"},{"internalType":"string","name":"metadataUrl","type":"string"},{"internalType":"string","name":"imageUrl","type":"string"}],"name":"updateBrainMetadata","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"proposalId","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"voteOnProposal","outputs":[],"stateMutability":"nonpayable","type":"function"}]

608060405234801561000f575f80fd5b50336040518060400160405280600e81526020016d4261736564414920427261696e7360901b81525060405180604001604052806005815260200164212920a4a760d91b815250815f908161006491906101a7565b50600161007182826101a7565b5050506001600160a01b0381166100a157604051631e4fbdf760e01b81525f600482015260240160405180910390fd5b6100aa816100be565b5060016007555f6015819055601755610261565b600680546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a35050565b634e487b7160e01b5f52604160045260245ffd5b600181811c9082168061013757607f821691505b60208210810361015557634e487b7160e01b5f52602260045260245ffd5b50919050565b601f8211156101a257805f5260205f20601f840160051c810160208510156101805750805b601f840160051c820191505b8181101561019f575f815560010161018c565b50505b505050565b81516001600160401b038111156101c0576101c061010f565b6101d4816101ce8454610123565b8461015b565b6020601f821160018114610206575f83156101ef5750848201515b5f19600385901b1c1916600184901b17845561019f565b5f84815260208120601f198516915b828110156102355787850151825560209485019460019092019101610215565b508482101561025257868401515f19600387901b60f8161c191681555b50505050600190811b01905550565b615ffb8061026e5f395ff3fe608060405234801561000f575f80fd5b506004361061035b575f3560e01c80637a3ebc2a116101c9578063c3edd884116100fe578063e985e9c51161009e578063f2fde38b11610079578063f2fde38b1461087b578063f3e832881461088e578063f932b282146108ad578063fa7f1db8146108c0575f80fd5b8063e985e9c514610802578063e9dd0f881461083d578063ee2231991461085c575f80fd5b8063cb1e4466116100d9578063cb1e446614610781578063cf8912c5146107a4578063d082e381146107d1578063d7e0d3b4146107da575f80fd5b8063c3edd88414610731578063c87b56dd14610744578063c8834ef514610757575f80fd5b806397d7cef411610169578063a43275bd11610144578063a43275bd146106d2578063a6c26603146106e5578063b88d4fde146106f6578063bb5ce86c14610709575f80fd5b806397d7cef41461069957806398462b68146106ac578063a22cb465146106bf575f80fd5b806387d5ec8e116101a457806387d5ec8e1461065a578063890a5b951461066d5780638da5cb5b1461068057806395d89b4114610691575f80fd5b80637a3ebc2a1461060f5780637ca77d9f1461063457806381ec3d5b14610647575f80fd5b80633abad85d1161029f57806353917a4d1161023f578063715018a61161021a578063715018a6146105aa57806375d7b0e7146105b2578063791282d5146105c557806379e8a604146105e7575f80fd5b806353917a4d146105715780636352211e1461058457806370a0823114610597575f80fd5b806346e04a2f1161027a57806346e04a2f146105105780634da6a556146105235780634ddfb0f21461054b57806352ed33c31461055e575f80fd5b80633abad85d146104cb57806342842e0e146104de57806342e94c90146104f1575f80fd5b8063150b7a021161030a578063202c9bc9116102e5578063202c9bc91461048957806323b872dd1461049c57806332cb6b0c146104af57806334ad3501146104b8575f80fd5b8063150b7a021461041257806316934fc41461046257806318160ddd14610481575f80fd5b8063081812fc1161033a578063081812fc146103c9578063095ea7b3146103f45780630a763da114610409575f80fd5b80622f88821461035f57806301ffc9a71461039157806306fdde03146103b4575b5f80fd5b61037e61036d3660046140d4565b601c6020525f908152604090205481565b6040519081526020015b60405180910390f35b6103a461039f366004614118565b6108d3565b6040519015158152602001610388565b6103bc6109b7565b6040516103889190614161565b6103dc6103d73660046140d4565b610a46565b6040516001600160a01b039091168152602001610388565b61040761040236600461418e565b610a6d565b005b61037e60175481565b6104316104203660046141b6565b630a85bd0160e11b95945050505050565b6040517fffffffff000000000000000000000000000000000000000000000000000000009091168152602001610388565b61037e61047036600461424b565b60116020525f908152604090205481565b61040061037e565b6104076104973660046140d4565b610a7c565b6104076104aa366004614264565b610d34565b61037e61040081565b6104076104c63660046140d4565b610d4f565b6104076104d9366004614347565b610d76565b6104076104ec366004614264565b611019565b61037e6104ff36600461424b565b600e6020525f908152604090205481565b61040761051e3660046140d4565b611033565b61037e61053136600461424b565b6001600160a01b03165f9081526011602052604090205490565b6104076105593660046140d4565b611294565b61040761056c3660046140d4565b611541565b61040761057f36600461424b565b61178a565b6103dc6105923660046140d4565b6117c1565b61037e6105a536600461424b565b6117cb565b610407611829565b6103bc6105c03660046140d4565b61183c565b6103a46105d33660046140d4565b601a6020525f908152604090205460ff1681565b6103dc6105f53660046140d4565b600a6020525f90815260409020546001600160a01b031681565b61062261061d366004614409565b6118d3565b60405161038896959493929190614429565b6009546103dc906001600160a01b031681565b6103bc6106553660046140d4565b611b2d565b6104076106683660046140d4565b611b45565b61040761067b366004614490565b611ec3565b6006546001600160a01b03166103dc565b6103bc61220c565b6104076106a73660046140d4565b61221b565b6008546103dc906001600160a01b031681565b6104076106cd3660046144c6565b612385565b6104076106e03660046140d4565b612390565b61037e6934f086f3b33b6840000081565b6104076107043660046144fb565b6126a7565b6103dc6107173660046140d4565b601b6020525f90815260409020546001600160a01b031681565b61040761073f3660046140d4565b6126be565b6103bc6107523660046140d4565b612834565b61037e610765366004614572565b601860209081525f928352604080842090915290825290205481565b61079461078f3660046140d4565b6129c0565b604051610388949392919061459c565b6103a46107b2366004614572565b601d60209081525f928352604080842090915290825290205460ff1681565b61037e60155481565b6103dc6107e83660046140d4565b5f908152600a60205260409020546001600160a01b031690565b6103a46108103660046145f3565b6001600160a01b039182165f90815260056020908152604080832093909416825291909152205460ff1690565b61037e61084b3660046140d4565b60106020525f908152604090205481565b61037e61086a3660046140d4565b60126020525f908152604090205481565b61040761088936600461424b565b612bff565b61037e61089c3660046140d4565b60196020525f908152604090205481565b6104076108bb366004614347565b612c52565b6104076108ce36600461424b565b612ec9565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082167f80ac58cd00000000000000000000000000000000000000000000000000000000148061096557507fffffffff0000000000000000000000000000000000000000000000000000000082167f5b5e139f00000000000000000000000000000000000000000000000000000000145b806109b157507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b92915050565b60605f80546109c59061461b565b80601f01602080910402602001604051908101604052809291908181526020018280546109f19061461b565b8015610a3c5780601f10610a1357610100808354040283529160200191610a3c565b820191905f5260205f20905b815481529060010190602001808311610a1f57829003601f168201915b5050505050905090565b5f610a5082612f00565b505f828152600460205260409020546001600160a01b03166109b1565b610a78828233612f38565b5050565b5f81815260196020526040902054683635c9adc5dea000001115610b0d5760405162461bcd60e51b815260206004820152603160248201527f4e6f7420656e6f75676820427261696e4372656469747320636f6e747269627560448201527f74656420696e207468697320626174636800000000000000000000000000000060648201526084015b60405180910390fd5b5f818152601a602052604090205460ff1615610b6b5760405162461bcd60e51b815260206004820152601460248201527f426174636820616c7265616479206d696e7465640000000000000000000000006044820152606401610b04565b61040060155410610bbe5760405162461bcd60e51b815260206004820181905260248201527f45786365656473206d6178696d756d20737570706c79206f6620427261696e736044820152606401610b04565b6016545f9015610c1c5760168054610bd890600190614667565b81548110610be857610be861467a565b905f5260205f20015490506016805480610c0457610c0461468e565b600190038181905f5260205f20015f90559055610c3e565b5060158054600181019091555f19602f82900301610c3e576015805460010190555b604080518281523060208201527f565d5be3c5d9b8fce8cebcd35e95027d3d05547e683e3d6fdb0f0e49d33db90d910160405180910390a1610c803082612f45565b5f610c8b3083612f5e565b5f838152600a6020908152604080832080546001600160a01b03861673ffffffffffffffffffffffffffffffffffffffff199182168117909255888552601b8452828520805490911682179055601c8352818420879055601a835292819020805460ff191660011790558051868152918201929092529192507f44165505aa9de0a6966949bee8bf2595f4ee689a16dd65a62fe05aa3a67410d1910160405180910390a1505050565b610d3f8383836131bb565b610d4a838383613257565b505050565b610d576132aa565b5f908152601460205260409020805460ff19811660ff90911615179055565b5f858152600a60205260409020546001600160a01b0316610dd95760405162461bcd60e51b815260206004820152601960248201527f427261696e20746f6b656e206e6f7420616374697661746564000000000000006044820152606401610b04565b5f858152600a6020526040908190205490517f70a082310000000000000000000000000000000000000000000000000000000081523360048201526064916001600160a01b0316906370a0823190602401602060405180830381865afa158015610e45573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610e6991906146a2565b11610edc5760405162461bcd60e51b815260206004820152602d60248201527f4d757374206f776e206174206c656173742031303020627261696e20746f6b6560448201527f6e7320746f2070726f706f7365000000000000000000000000000000000000006064820152608401610b04565b5f8581526014602052604090205460ff1615610f455760405162461bcd60e51b815260206004820152602260248201527f4d6574616461746120757064617465732064697361626c6564206f6e2042726160448201526134b760f11b6064820152608401610b04565b5f85815260106020908152604080832054600f835281842081855290925290912080610f7187826146fd565b5060018101610f8086826146fd565b5060028101610f8f85826146fd565b5060038101610f9e84826146fd565b505f6004820181905560068201805460ff19169055878152601060205260408120805491610fcb836147b8565b9190505550867f6bc35514acc7287944b18df177cdce8fe5d415ad1307bcb2d700e0b6a33f2cf583888888886040516110089594939291906147d0565b60405180910390a250505050505050565b610d4a83838360405180602001604052805f8152506126a7565b5f818152601a602052604090205460ff166110b55760405162461bcd60e51b8152602060048201526024808201527f546f6b656e73206e6f74206d696e74656420666f72207468697320626174636860448201527f20796574000000000000000000000000000000000000000000000000000000006064820152608401610b04565b5f818152601d6020908152604080832033845290915290205460ff16156111445760405162461bcd60e51b815260206004820152602560248201527f546f6b656e7320616c726561647920636c61696d656420666f7220746869732060448201527f62617463680000000000000000000000000000000000000000000000000000006064820152608401610b04565b5f818152601860209081526040808320338452909152902054806111aa5760405162461bcd60e51b815260206004820152601f60248201527f4e6f20636f6e747269627574696f6e7320666f722074686973206261746368006044820152606401610b04565b5f6111d2683635c9adc5dea000006111cc8469d3c21bcecceda10000006132f0565b90613302565b5f848152601d6020908152604080832033808552908352818420805460ff19166001179055878452601b909252918290205491517fa9059cbb0000000000000000000000000000000000000000000000000000000081526004810191909152602481018390529192506001600160a01b03169063a9059cbb906044016020604051808303815f875af115801561126a573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061128e919061482e565b50505050565b3361129e826117c1565b6001600160a01b0316146112f45760405162461bcd60e51b815260206004820152601c60248201527f4f6e6c7920427261696e206f776e65722063616e20756e7374616b65000000006044820152606401610b04565b5f81815260126020526040902054611310906276a70090614849565b42101561135f5760405162461bcd60e51b815260206004820152601e60248201527f5374616b6520706572696f64206e6f742079657420636f6d706c6574656400006044820152606401610b04565b335f9081526011602052604090205469152d02c7e14af680000011156113c75760405162461bcd60e51b815260206004820152601860248201527f4e6f7420656e6f75676820746f6b656e73207374616b656400000000000000006044820152606401610b04565b335f908152601160205260409020546113ea9069152d02c7e14af680000061330d565b335f81815260116020526040908190209290925560095491517fa9059cbb000000000000000000000000000000000000000000000000000000008152600481019190915269152d02c7e14af680000060248201526001600160a01b039091169063a9059cbb906044016020604051808303815f875af115801561146f573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611493919061482e565b5061149d81613318565b601680546001810182555f9182527fd833147d7dc355ba459fc788f669e58cfaf9dc25ddcd0702e87d69c7b512428901829055600854604080517fde0f2be100000000000000000000000000000000000000000000000000000000815290516001600160a01b039092169263de0f2be19260048084019382900301818387803b158015611528575f80fd5b505af115801561153a573d5f803e3d5ffd5b5050505050565b6008546001600160a01b03166115995760405162461bcd60e51b815260206004820152601c60248201527f427261696e204372656469742061646472657373206e6f7420736574000000006044820152606401610b04565b5f81116115e85760405162461bcd60e51b815260206004820181905260248201527f416d6f756e74206d7573742062652067726561746572207468616e207a65726f6044820152606401610b04565b6008546040516323b872dd60e01b8152336004820152306024820152604481018390526001600160a01b03909116906323b872dd906064016020604051808303815f875af115801561163c573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611660919061482e565b50805b8015610a78576017545f9081526019602052604081205461168e90683635c9adc5dea000009061330d565b9050818181111561169c5750805b6017545f9081526018602090815260408083203384529091529020546116c29082613350565b601780545f90815260186020908152604080832033845282528083209490945591548152601990915220546116f79082613350565b6017545f90815260196020526040902055611712838261330d565b60408051338152602081018490529194507f1bb460ccaaf70fbacfec17a376f8acbd278c1405590ffcc8ebe4b88daf4f64ad910160405180910390a16017545f90815260196020526040902054683635c9adc5dea00000116117835760178054905f61177d836147b8565b91905055505b5050611663565b6117926132aa565b6008805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b5f6109b182612f00565b5f6001600160a01b03821661180e576040517f89c62b640000000000000000000000000000000000000000000000000000000081525f6004820152602401610b04565b506001600160a01b03165f9081526003602052604090205490565b6118316132aa565b61183a5f61335b565b565b600d6020525f9081526040902080546118549061461b565b80601f01602080910402602001604051908101604052809291908181526020018280546118809061461b565b80156118cb5780601f106118a2576101008083540402835291602001916118cb565b820191905f5260205f20905b8154815290600101906020018083116118ae57829003601f168201915b505050505081565b600f60209081525f92835260408084209091529082529020805481906118f89061461b565b80601f01602080910402602001604051908101604052809291908181526020018280546119249061461b565b801561196f5780601f106119465761010080835404028352916020019161196f565b820191905f5260205f20905b81548152906001019060200180831161195257829003601f168201915b5050505050908060010180546119849061461b565b80601f01602080910402602001604051908101604052809291908181526020018280546119b09061461b565b80156119fb5780601f106119d2576101008083540402835291602001916119fb565b820191905f5260205f20905b8154815290600101906020018083116119de57829003601f168201915b505050505090806002018054611a109061461b565b80601f0160208091040260200160405190810160405280929190818152602001828054611a3c9061461b565b8015611a875780601f10611a5e57610100808354040283529160200191611a87565b820191905f5260205f20905b815481529060010190602001808311611a6a57829003601f168201915b505050505090806003018054611a9c9061461b565b80601f0160208091040260200160405190810160405280929190818152602001828054611ac89061461b565b8015611b135780601f10611aea57610100808354040283529160200191611b13565b820191905f5260205f20905b815481529060010190602001808311611af657829003601f168201915b50505050600483015460069093015491929160ff16905086565b600c6020525f9081526040902080546118549061461b565b6009546001600160a01b0316611bc35760405162461bcd60e51b815260206004820152602160248201527f53706563696669632050657065636f696e2061646472657373206e6f7420736560448201527f74000000000000000000000000000000000000000000000000000000000000006064820152608401610b04565b611bd769152d02c7e14af680000082614870565b15611c4a5760405162461bcd60e51b815260206004820152603460248201527f5374616b6520616d6f756e74206d75737420626520696e20696e6372656d656e60448201527f7473206f66203130302c30303020746f6b656e730000000000000000000000006064820152608401610b04565b5f611c5f8269152d02c7e14af6800000613302565b9050610400600182601554611c749190614849565b611c7e9190614667565b1115611ccc5760405162461bcd60e51b815260206004820181905260248201527f45786365656473206d6178696d756d20737570706c79206f6620427261696e736044820152606401610b04565b6009546040516323b872dd60e01b8152336004820152306024820152604481018490526001600160a01b03909116906323b872dd906064016020604051808303815f875af1158015611d20573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611d44919061482e565b50335f90815260116020526040902054611d5e9083613350565b335f908152601160205260408082209290925560085482517f90578ae100000000000000000000000000000000000000000000000000000000815292516001600160a01b03909116926390578ae192600480830193919282900301818387803b158015611dc9575f80fd5b505af1158015611ddb573d5f803e3d5ffd5b505050505f5b81811015610d4a576016545f9015611e475760168054611e0390600190614667565b81548110611e1357611e1361467a565b905f5260205f20015490506016805480611e2f57611e2f61468e565b600190038181905f5260205f20015f90559055611e69565b5060158054600181019091555f19602f82900301611e69576015805460010190555b604080518281523360208201527f565d5be3c5d9b8fce8cebcd35e95027d3d05547e683e3d6fdb0f0e49d33db90d910160405180910390a1611eab3382612f45565b5f908152601260205260409020429055600101611de1565b611ecb6133b9565b5f838152600a60205260409020546001600160a01b0316611f2e5760405162461bcd60e51b815260206004820152601960248201527f427261696e20746f6b656e206e6f7420616374697661746564000000000000006044820152606401610b04565b5f8381526014602052604090205460ff1615611f975760405162461bcd60e51b815260206004820152602260248201527f4d6574616461746120757064617465732064697361626c6564206f6e2042726160448201526134b760f11b6064820152608401610b04565b5f838152600f602090815260408083208584529091529020600681015460ff16156120045760405162461bcd60e51b815260206004820152601960248201527f50726f706f73616c20616c7265616479206578656375746564000000000000006044820152606401610b04565b5f848152600a6020526040908190205490517f70a082310000000000000000000000000000000000000000000000000000000081523360048201526001600160a01b0390911690839082906370a0823190602401602060405180830381865afa158015612073573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061209791906146a2565b10156120e55760405162461bcd60e51b815260206004820152601460248201527f496e73756666696369656e742062616c616e63650000000000000000000000006044820152606401610b04565b6040516323b872dd60e01b8152336004820152306024820152604481018490526001600160a01b038216906323b872dd906064016020604051808303815f875af1158015612135573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612159919061482e565b5060048201546121699084613350565b6004830155335f9081526005830160205260409020546121899084613350565b335f81815260058501602090815260409182902093909355805187815292830191909152810184905285907ff6ed5a0362706e33942c258dd867d1664e91a7653843a7c3459a857db97287ae9060600160405180910390a26934f086f3b33b68400000826004015410612200576122008585613412565b5050610d4a6001600755565b6060600180546109c59061461b565b33612225826117c1565b6001600160a01b0316146122a15760405162461bcd60e51b815260206004820152602160248201527f4f6e6c7920427261696e206f776e65722063616e206c696e6b2061204552433260448201527f30000000000000000000000000000000000000000000000000000000000000006064820152608401610b04565b5f818152600a60205260409020546001600160a01b0316156123055760405162461bcd60e51b815260206004820152601f60248201527f427261696e20746f6b656e20686173206265656e206163746976617465642e006044820152606401610b04565b5f6123103383612f5e565b5f838152600a6020908152604091829020805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0385169081179091558251868152918201529192507f44165505aa9de0a6966949bee8bf2595f4ee689a16dd65a62fe05aa3a67410d1910160405180910390a15050565b610a7833838361396d565b6008546001600160a01b031661240e5760405162461bcd60e51b815260206004820152602560248201527f537065636966696320427261696e204372656469742061646472657373206e6f60448201527f74207365740000000000000000000000000000000000000000000000000000006064820152608401610b04565b683635c9adc5dea000008110156124675760405162461bcd60e51b815260206004820152601660248201527f4d696e696d756d20616d6f756e74206e6f74206d6574000000000000000000006044820152606401610b04565b61247a683635c9adc5dea0000082614870565b156124ed5760405162461bcd60e51b815260206004820152602c60248201527f416d6f756e74206d75737420626520696e20696e6372656d656e7473206f662060448201527f31303030206372656469747300000000000000000000000000000000000000006064820152608401610b04565b5f612501683635c9adc5dea0000083614883565b90506104006001826015546125169190614849565b6125209190614667565b111561256e5760405162461bcd60e51b815260206004820181905260248201527f45786365656473206d6178696d756d20737570706c79206f6620427261696e736044820152606401610b04565b6008546040516323b872dd60e01b8152336004820152306024820152604481018490526001600160a01b03909116906323b872dd906064016020604051808303815f875af11580156125c2573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906125e6919061482e565b505f5b81811015610d4a576016545f901561264f576016805461260b90600190614667565b8154811061261b5761261b61467a565b905f5260205f200154905060168054806126375761263761468e565b600190038181905f5260205f20015f9055905561265c565b5060158054600181019091555b604080518281523360208201527f565d5be3c5d9b8fce8cebcd35e95027d3d05547e683e3d6fdb0f0e49d33db90d910160405180910390a161269e3382612f45565b506001016125e9565b6126b384848484613a24565b61128e848484613257565b6126c66132aa565b61040081106127175760405162461bcd60e51b815260206004820152601f60248201527f546f6b656e2049442065786365656473206d6178696d756d20737570706c79006044820152606401610b04565b6009546001600160a01b0316156127705760405162461bcd60e51b815260206004820152601b60248201527f43616e6e6f742072756e206166746572206d696e7420737461727400000000006044820152606401610b04565b604080518281523360208201527f565d5be3c5d9b8fce8cebcd35e95027d3d05547e683e3d6fdb0f0e49d33db90d910160405180910390a160085f9054906101000a90046001600160a01b03166001600160a01b03166390578ae16040518163ffffffff1660e01b81526004015f604051808303815f87803b1580156127f4575f80fd5b505af1158015612806573d5f803e3d5ffd5b505050506128143382612f45565b80602f146128315760158054905f61282b836147b8565b91905055505b50565b5f818152601360205260408120805460609291906128519061461b565b80601f016020809104026020016040519081016040528092919081815260200182805461287d9061461b565b80156128c85780601f1061289f576101008083540402835291602001916128c8565b820191905f5260205f20905b8154815290600101906020018083116128ab57829003601f168201915b505050505090505f815111156128de5792915050565b5f838152600b6020526040812060020180546128f99061461b565b905011156129a0575f838152600b60205260409020600201805461291c9061461b565b80601f01602080910402602001604051908101604052809291908181526020018280546129489061461b565b80156129935780601f1061296a57610100808354040283529160200191612993565b820191905f5260205f20905b81548152906001019060200180831161297657829003601f168201915b5050505050915050919050565b6040518060800160405280605f8152602001615f67605f91399392505050565b600b6020525f90815260409020805481906129da9061461b565b80601f0160208091040260200160405190810160405280929190818152602001828054612a069061461b565b8015612a515780601f10612a2857610100808354040283529160200191612a51565b820191905f5260205f20905b815481529060010190602001808311612a3457829003601f168201915b505050505090806001018054612a669061461b565b80601f0160208091040260200160405190810160405280929190818152602001828054612a929061461b565b8015612add5780601f10612ab457610100808354040283529160200191612add565b820191905f5260205f20905b815481529060010190602001808311612ac057829003601f168201915b505050505090806002018054612af29061461b565b80601f0160208091040260200160405190810160405280929190818152602001828054612b1e9061461b565b8015612b695780601f10612b4057610100808354040283529160200191612b69565b820191905f5260205f20905b815481529060010190602001808311612b4c57829003601f168201915b505050505090806003018054612b7e9061461b565b80601f0160208091040260200160405190810160405280929190818152602001828054612baa9061461b565b8015612bf55780601f10612bcc57610100808354040283529160200191612bf5565b820191905f5260205f20905b815481529060010190602001808311612bd857829003601f168201915b5050505050905084565b612c076132aa565b6001600160a01b038116612c49576040517f1e4fbdf70000000000000000000000000000000000000000000000000000000081525f6004820152602401610b04565b6128318161335b565b33612c5c866117c1565b6001600160a01b031614612cd75760405162461bcd60e51b8152602060048201526024808201527f4f6e6c7920427261696e206f776e65722063616e20757064617465206d65746160448201527f64617461000000000000000000000000000000000000000000000000000000006064820152608401610b04565b5f8581526014602052604090205460ff1615612d405760405162461bcd60e51b815260206004820152602260248201527f4d6574616461746120757064617465732064697361626c6564206f6e2042726160448201526134b760f11b6064820152608401610b04565b604080516080810182528581526020808201869052818301859052606082018490525f888152600b9091529190912081518190612d7d90826146fd565b5060208201516001820190612d9290826146fd565b5060408201516002820190612da790826146fd565b5060608201516003820190612dbc90826146fd565b5050505f858152600a60205260409020546001600160a01b03168015612e82576040517f2f71d0220000000000000000000000000000000000000000000000000000000081526001600160a01b03821690632f71d02290612e239088908890600401614896565b5f604051808303815f87803b158015612e3a575f80fd5b505af1158015612e4c573d5f803e3d5ffd5b5050505f878152600c602052604090209050612e6886826146fd565b505f868152600d60205260409020612e8085826146fd565b505b7f7b73af05a2d1d4fa3f0df287883eedf5070d787e199b00d6929cdd4d328a764b8686868686604051612eb99594939291906147d0565b60405180910390a1505050505050565b612ed16132aa565b6009805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b5f818152600260205260408120546001600160a01b0316806109b157604051637e27328960e01b815260048101849052602401610b04565b610d4a8383836001613a3b565b610a78828260405180602001604052805f815250613b83565b5f818152600b6020526040812080546060918291849190612f7e9061461b565b9050118015612fa757505f848152600b602052604081206001018054612fa39061461b565b9050115b156130e3575f848152600b602052604090208054612fc49061461b565b80601f0160208091040260200160405190810160405280929190818152602001828054612ff09061461b565b801561303b5780601f106130125761010080835404028352916020019161303b565b820191905f5260205f20905b81548152906001019060200180831161301e57829003601f168201915b5050505f878152600b602052604090206001018054939550926130609250905061461b565b80601f016020809104026020016040519081016040528092919081815260200182805461308c9061461b565b80156130d75780601f106130ae576101008083540402835291602001916130d7565b820191905f5260205f20905b8154815290600101906020018083116130ba57829003601f168201915b50505050509050613138565b6130ec84613b99565b6040516020016130fc91906148da565b604051602081830303815290604052915061311684613b99565b604051602001613126919061490b565b60405160208183030381529060405290505b5f69d3c21bcecceda100000090505f83838389604051613157906140c7565b613164949392919061493c565b604051809103905ff08015801561317d573d5f803e3d5ffd5b505f878152600c6020526040902090915061319885826146fd565b505f868152600d602052604090206131b084826146fd565b509695505050505050565b6001600160a01b0382166131e457604051633250574960e11b81525f6004820152602401610b04565b5f6131f0838333613c36565b9050836001600160a01b0316816001600160a01b03161461128e576040517f64283d7b0000000000000000000000000000000000000000000000000000000081526001600160a01b0380861660048301526024820184905282166044820152606401610b04565b816001600160a01b0316836001600160a01b0316827fca9cf35395507b17a2d1c8da6b344ae6227bad9b90859f4b53cfac1ad5ecca5d4260405161329d91815260200190565b60405180910390a4505050565b6006546001600160a01b0316331461183a576040517f118cdaa7000000000000000000000000000000000000000000000000000000008152336004820152602401610b04565b5f6132fb8284614981565b9392505050565b5f6132fb8284614883565b5f6132fb8284614667565b5f6133245f835f613c36565b90506001600160a01b038116610a7857604051637e27328960e01b815260048101839052602401610b04565b5f6132fb8284614849565b600680546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a35050565b60026007540361340b5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610b04565b6002600755565b5f8281526014602052604090205460ff161561347b5760405162461bcd60e51b815260206004820152602260248201527f4d6574616461746120757064617465732064697361626c6564206f6e2042726160448201526134b760f11b6064820152608401610b04565b5f828152600f602090815260408083208484529091529020600681015460ff16156134e85760405162461bcd60e51b815260206004820152601960248201527f50726f706f73616c20616c7265616479206578656375746564000000000000006044820152606401610b04565b6934f086f3b33b68400000816004015410156135465760405162461bcd60e51b815260206004820152601860248201527f566f74696e67207468726573686f6c64206e6f74206d657400000000000000006044820152606401610b04565b6040518060800160405280825f01805461355f9061461b565b80601f016020809104026020016040519081016040528092919081815260200182805461358b9061461b565b80156135d65780601f106135ad576101008083540402835291602001916135d6565b820191905f5260205f20905b8154815290600101906020018083116135b957829003601f168201915b505050505081526020018260010180546135ef9061461b565b80601f016020809104026020016040519081016040528092919081815260200182805461361b9061461b565b80156136665780601f1061363d57610100808354040283529160200191613666565b820191905f5260205f20905b81548152906001019060200180831161364957829003601f168201915b5050505050815260200182600201805461367f9061461b565b80601f01602080910402602001604051908101604052809291908181526020018280546136ab9061461b565b80156136f65780601f106136cd576101008083540402835291602001916136f6565b820191905f5260205f20905b8154815290600101906020018083116136d957829003601f168201915b5050505050815260200182600301805461370f9061461b565b80601f016020809104026020016040519081016040528092919081815260200182805461373b9061461b565b80156137865780601f1061375d57610100808354040283529160200191613786565b820191905f5260205f20905b81548152906001019060200180831161376957829003601f168201915b5050509190925250505f848152600b60205260409020815181906137aa90826146fd565b50602082015160018201906137bf90826146fd565b50604082015160028201906137d490826146fd565b50606082015160038201906137e990826146fd565b5050505f838152600a60205260409020546001600160a01b0316801561390d575f61381385613b99565b60405161382591908590602001614a06565b60405160208183030381529060405290505f61384086613b99565b84600101604051602001613855929190614a67565b60408051601f19818403018152908290527f2f71d02200000000000000000000000000000000000000000000000000000000825291506001600160a01b03841690632f71d022906138ac9085908590600401614896565b5f604051808303815f87803b1580156138c3575f80fd5b505af11580156138d5573d5f803e3d5ffd5b5050505f878152600c6020526040902090506138f183826146fd565b505f868152600d6020526040902061390982826146fd565b5050505b60068201805460ff191660019081179091556040517f7b73af05a2d1d4fa3f0df287883eedf5070d787e199b00d6929cdd4d328a764b9161395f91879186919082019060028301906003840190614b46565b60405180910390a150505050565b6001600160a01b0382166139b8576040517f5b08ba180000000000000000000000000000000000000000000000000000000081526001600160a01b0383166004820152602401610b04565b6001600160a01b038381165f81815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b613a2f848484610d34565b61128e84848484613d35565b8080613a4f57506001600160a01b03821615155b15613b47575f613a5e84612f00565b90506001600160a01b03831615801590613a8a5750826001600160a01b0316816001600160a01b031614155b8015613abb57506001600160a01b038082165f9081526005602090815260408083209387168352929052205460ff16155b15613afd576040517fa9fbf51f0000000000000000000000000000000000000000000000000000000081526001600160a01b0384166004820152602401610b04565b8115613b455783856001600160a01b0316826001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45b505b50505f908152600460205260409020805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b613b8d8383613e6c565b610d4a5f848484613d35565b60605f613ba583613ee6565b60010190505f8167ffffffffffffffff811115613bc457613bc461429e565b6040519080825280601f01601f191660200182016040528015613bee576020820181803683370190505b5090508181016020015b5f19017f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a8504945084613bf857509392505050565b5f828152600260205260408120546001600160a01b0390811690831615613c6257613c62818486613fc7565b6001600160a01b03811615613c9c57613c7d5f855f80613a3b565b6001600160a01b0381165f90815260036020526040902080545f190190555b6001600160a01b03851615613cca576001600160a01b0385165f908152600360205260409020805460010190555b5f84815260026020526040808220805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0389811691821790925591518793918516917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4949350505050565b6001600160a01b0383163b1561128e57604051630a85bd0160e11b81526001600160a01b0384169063150b7a0290613d77903390889087908790600401614b98565b6020604051808303815f875af1925050508015613db1575060408051601f3d908101601f19168201909252613dae91810190614bd8565b60015b613e18573d808015613dde576040519150601f19603f3d011682016040523d82523d5f602084013e613de3565b606091505b5080515f03613e1057604051633250574960e11b81526001600160a01b0385166004820152602401610b04565b805181602001fd5b7fffffffff000000000000000000000000000000000000000000000000000000008116630a85bd0160e11b1461153a57604051633250574960e11b81526001600160a01b0385166004820152602401610b04565b6001600160a01b038216613e9557604051633250574960e11b81525f6004820152602401610b04565b5f613ea183835f613c36565b90506001600160a01b03811615610d4a576040517f73c6ac6e0000000000000000000000000000000000000000000000000000000081525f6004820152602401610b04565b5f807a184f03e93ff9f4daa797ed6e38ed64bf6a1f0100000000000000008310613f2e577a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000830492506040015b6d04ee2d6d415b85acef81000000008310613f5a576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc100008310613f7857662386f26fc10000830492506010015b6305f5e1008310613f90576305f5e100830492506008015b6127108310613fa457612710830492506004015b60648310613fb6576064830492506002015b600a83106109b15760010192915050565b613fd2838383614044565b610d4a576001600160a01b03831661400057604051637e27328960e01b815260048101829052602401610b04565b6040517f177e802f0000000000000000000000000000000000000000000000000000000081526001600160a01b038316600482015260248101829052604401610b04565b5f6001600160a01b038316158015906140bf5750826001600160a01b0316846001600160a01b0316148061409c57506001600160a01b038085165f9081526005602090815260408083209387168352929052205460ff165b806140bf57505f828152600460205260409020546001600160a01b038481169116145b949350505050565b61137380614bf483390190565b5f602082840312156140e4575f80fd5b5035919050565b7fffffffff0000000000000000000000000000000000000000000000000000000081168114612831575f80fd5b5f60208284031215614128575f80fd5b81356132fb816140eb565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b602081525f6132fb6020830184614133565b80356001600160a01b0381168114614189575f80fd5b919050565b5f806040838503121561419f575f80fd5b6141a883614173565b946020939093013593505050565b5f805f805f608086880312156141ca575f80fd5b6141d386614173565b94506141e160208701614173565b935060408601359250606086013567ffffffffffffffff811115614203575f80fd5b8601601f81018813614213575f80fd5b803567ffffffffffffffff811115614229575f80fd5b88602082840101111561423a575f80fd5b959894975092955050506020019190565b5f6020828403121561425b575f80fd5b6132fb82614173565b5f805f60608486031215614276575f80fd5b61427f84614173565b925061428d60208501614173565b929592945050506040919091013590565b634e487b7160e01b5f52604160045260245ffd5b5f8067ffffffffffffffff8411156142cc576142cc61429e565b50604051601f19601f85018116603f0116810181811067ffffffffffffffff821117156142fb576142fb61429e565b604052838152905080828401851015614312575f80fd5b838360208301375f60208583010152509392505050565b5f82601f830112614338575f80fd5b6132fb838335602085016142b2565b5f805f805f60a0868803121561435b575f80fd5b85359450602086013567ffffffffffffffff811115614378575f80fd5b61438488828901614329565b945050604086013567ffffffffffffffff8111156143a0575f80fd5b6143ac88828901614329565b935050606086013567ffffffffffffffff8111156143c8575f80fd5b6143d488828901614329565b925050608086013567ffffffffffffffff8111156143f0575f80fd5b6143fc88828901614329565b9150509295509295909350565b5f806040838503121561441a575f80fd5b50508035926020909101359150565b60c081525f61443b60c0830189614133565b828103602084015261444d8189614133565b905082810360408401526144618188614133565b905082810360608401526144758187614133565b6080840195909552505090151560a090910152949350505050565b5f805f606084860312156144a2575f80fd5b505081359360208301359350604090920135919050565b8015158114612831575f80fd5b5f80604083850312156144d7575f80fd5b6144e083614173565b915060208301356144f0816144b9565b809150509250929050565b5f805f806080858703121561450e575f80fd5b61451785614173565b935061452560208601614173565b925060408501359150606085013567ffffffffffffffff811115614547575f80fd5b8501601f81018713614557575f80fd5b614566878235602084016142b2565b91505092959194509250565b5f8060408385031215614583575f80fd5b8235915061459360208401614173565b90509250929050565b608081525f6145ae6080830187614133565b82810360208401526145c08187614133565b905082810360408401526145d48186614133565b905082810360608401526145e88185614133565b979650505050505050565b5f8060408385031215614604575f80fd5b61460d83614173565b915061459360208401614173565b600181811c9082168061462f57607f821691505b60208210810361464d57634e487b7160e01b5f52602260045260245ffd5b50919050565b634e487b7160e01b5f52601160045260245ffd5b818103818111156109b1576109b1614653565b634e487b7160e01b5f52603260045260245ffd5b634e487b7160e01b5f52603160045260245ffd5b5f602082840312156146b2575f80fd5b5051919050565b601f821115610d4a57805f5260205f20601f840160051c810160208510156146de5750805b601f840160051c820191505b8181101561153a575f81556001016146ea565b815167ffffffffffffffff8111156147175761471761429e565b61472b81614725845461461b565b846146b9565b6020601f82116001811461475d575f83156147465750848201515b5f19600385901b1c1916600184901b17845561153a565b5f84815260208120601f198516915b8281101561478c578785015182556020948501946001909201910161476c565b50848210156147a957868401515f19600387901b60f8161c191681555b50505050600190811b01905550565b5f5f1982036147c9576147c9614653565b5060010190565b85815260a060208201525f6147e860a0830187614133565b82810360408401526147fa8187614133565b9050828103606084015261480e8186614133565b905082810360808401526148228185614133565b98975050505050505050565b5f6020828403121561483e575f80fd5b81516132fb816144b9565b808201808211156109b1576109b1614653565b634e487b7160e01b5f52601260045260245ffd5b5f8261487e5761487e61485c565b500690565b5f826148915761489161485c565b500490565b604081525f6148a86040830185614133565b82810360208401526148ba8185614133565b95945050505050565b5f81518060208401855e5f93019283525090919050565b7f425241494e20544f4b454e20230000000000000000000000000000000000000081525f6132fb600d8301846148c3565b7f422300000000000000000000000000000000000000000000000000000000000081525f6132fb60028301846148c3565b608081525f61494e6080830187614133565b82810360208401526149608187614133565b9150508360408301526001600160a01b038316606083015295945050505050565b80820281158282048414176109b1576109b1614653565b5f81546149a48161461b565b6001821680156149bb57600181146149d0576149fd565b60ff19831686528115158202860193506149fd565b845f5260205f205f5b838110156149f5578154888201526001909101906020016149d9565b505081860193505b50505092915050565b7f425241494e20544f4b454e20230000000000000000000000000000000000000081525f614a37600d8301856148c3565b7f202d20000000000000000000000000000000000000000000000000000000000081526148ba6003820185614998565b7f422300000000000000000000000000000000000000000000000000000000000081525f614a9860028301856148c3565b7f2d0000000000000000000000000000000000000000000000000000000000000081526148ba6001820185614998565b5f8154614ad48161461b565b808552600182168015614aee5760018114614b0a576149fd565b60ff1983166020870152602082151560051b87010193506149fd565b845f5260205f205f5b83811015614b355781546020828a010152600182019150602081019050614b13565b870160200194505050505092915050565b85815260a060208201525f614b5e60a0830187614ac8565b8281036040840152614b708187614ac8565b90508281036060840152614b848186614ac8565b905082810360808401526148228185614ac8565b6001600160a01b03851681526001600160a01b0384166020820152826040820152608060608201525f614bce6080830184614133565b9695505050505050565b5f60208284031215614be8575f80fd5b81516132fb816140eb56fe60a060405234801561000f575f80fd5b5060405161137338038061137383398101604081905261002e916102e5565b8383600361003c83826103f6565b50600461004982826103f6565b50505069d3c21bcecceda10000008211156100b95760405162461bcd60e51b815260206004820152602560248201527f496e697469616c20737570706c792065786365656473206d6178696d756d20736044820152647570706c7960d81b60648201526084015b60405180910390fd5b3360805260056100c985826103f6565b5060066100d684826103f6565b506100e181836100ea565b505050506104d5565b6001600160a01b0382166101135760405163ec442f0560e01b81525f60048201526024016100b0565b61011e5f8383610122565b5050565b6001600160a01b03831661014c578060025f82825461014191906104b0565b909155506101bc9050565b6001600160a01b0383165f908152602081905260409020548181101561019e5760405163391434e360e21b81526001600160a01b038516600482015260248101829052604481018390526064016100b0565b6001600160a01b0384165f9081526020819052604090209082900390555b6001600160a01b0382166101d8576002805482900390556101f6565b6001600160a01b0382165f9081526020819052604090208054820190555b816001600160a01b0316836001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8360405161023b91815260200190565b60405180910390a3505050565b634e487b7160e01b5f52604160045260245ffd5b5f82601f83011261026b575f80fd5b81516001600160401b0381111561028457610284610248565b604051601f8201601f19908116603f011681016001600160401b03811182821017156102b2576102b2610248565b6040528181528382016020018510156102c9575f80fd5b8160208501602083015e5f918101602001919091529392505050565b5f805f80608085870312156102f8575f80fd5b84516001600160401b0381111561030d575f80fd5b6103198782880161025c565b602087015190955090506001600160401b03811115610336575f80fd5b6103428782880161025c565b60408701516060880151919550935090506001600160a01b0381168114610367575f80fd5b939692955090935050565b600181811c9082168061038657607f821691505b6020821081036103a457634e487b7160e01b5f52602260045260245ffd5b50919050565b601f8211156103f157805f5260205f20601f840160051c810160208510156103cf5750805b601f840160051c820191505b818110156103ee575f81556001016103db565b50505b505050565b81516001600160401b0381111561040f5761040f610248565b6104238161041d8454610372565b846103aa565b6020601f821160018114610455575f831561043e5750848201515b5f19600385901b1c1916600184901b1784556103ee565b5f84815260208120601f198516915b828110156104845787850151825560209485019460019092019101610464565b50848210156104a157868401515f19600387901b60f8161c191681555b50505050600190811b01905550565b808201808211156104cf57634e487b7160e01b5f52601160045260245ffd5b92915050565b608051610e786104fb5f395f818161019d01528181610349015261053e0152610e785ff3fe608060405234801561000f575f80fd5b50600436106100cf575f3560e01c806340c10f191161007d57806395d89b411161005857806395d89b41146101d7578063a9059cbb146101df578063dd62ed3e146101f2575f80fd5b806340c10f191461015d57806370a08231146101705780638e68554b14610198575f80fd5b806323b872dd116100ad57806323b872dd146101265780632f71d02214610139578063313ce5671461014e575f80fd5b806306fdde03146100d3578063095ea7b3146100f157806318160ddd14610114575b5f80fd5b6100db61022a565b6040516100e89190610aa9565b60405180910390f35b6101046100ff366004610add565b6102ba565b60405190151581526020016100e8565b6002545b6040519081526020016100e8565b610104610134366004610b05565b6102d3565b61014c610147366004610bdf565b61033e565b005b604051601281526020016100e8565b61014c61016b366004610add565b610533565b61011861017e366004610c44565b6001600160a01b03165f9081526020819052604090205490565b6101bf7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100e8565b6100db610626565b6101046101ed366004610add565b610635565b610118610200366004610c5d565b6001600160a01b039182165f90815260016020908152604080832093909416825291909152205490565b60606005805461023990610c8e565b80601f016020809104026020016040519081016040528092919081815260200182805461026590610c8e565b80156102b05780601f10610287576101008083540402835291602001916102b0565b820191905f5260205f20905b81548152906001019060200180831161029357829003601f168201915b5050505050905090565b5f336102c781858561068f565b60019150505b92915050565b5f806102e08585856106a1565b9050801561033657836001600160a01b0316856001600160a01b03167f4cd95681b751c91f83e626435fb48875e7d8da94d9cd0e6133c5c5f8e16306f68560405161032d91815260200190565b60405180910390a35b949350505050565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146103bb5760405162461bcd60e51b815260206004820181905260248201527f43616c6c6572206973206e6f742074686520427261696e20636f6e747261637460448201526064015b60405180910390fd5b5f600580546103c990610c8e565b80601f01602080910402602001604051908101604052809291908181526020018280546103f590610c8e565b80156104405780601f1061041757610100808354040283529160200191610440565b820191905f5260205f20905b81548152906001019060200180831161042357829003601f168201915b505050505090505f6006805461045590610c8e565b80601f016020809104026020016040519081016040528092919081815260200182805461048190610c8e565b80156104cc5780601f106104a3576101008083540402835291602001916104cc565b820191905f5260205f20905b8154815290600101906020018083116104af57829003601f168201915b5050505050905083600590816104e29190610d11565b5060066104ef8482610d11565b507f8fa70b8946217587fc701348a508a5a023a68ed13b9363dd0b72017ac2d532c1828583866040516105259493929190610dcc565b60405180910390a150505050565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146105ab5760405162461bcd60e51b815260206004820181905260248201527f43616c6c6572206973206e6f742074686520427261696e20636f6e747261637460448201526064016103b2565b69d3c21bcecceda1000000816105c060025490565b6105ca9190610e23565b11156106185760405162461bcd60e51b815260206004820152601f60248201527f4d696e74696e6720776f756c6420657863656564206d617820737570706c790060448201526064016103b2565b61062282826106c4565b5050565b60606006805461023990610c8e565b5f33816106428585610711565b9050801561033657846001600160a01b0316826001600160a01b03167f4cd95681b751c91f83e626435fb48875e7d8da94d9cd0e6133c5c5f8e16306f68660405161032d91815260200190565b61069c838383600161071e565b505050565b5f336106ae858285610823565b6106b98585856108b1565b506001949350505050565b6001600160a01b038216610706576040517fec442f050000000000000000000000000000000000000000000000000000000081525f60048201526024016103b2565b6106225f838361093c565b5f336102c78185856108b1565b6001600160a01b038416610760576040517fe602df050000000000000000000000000000000000000000000000000000000081525f60048201526024016103b2565b6001600160a01b0383166107a2576040517f94280d620000000000000000000000000000000000000000000000000000000081525f60048201526024016103b2565b6001600160a01b038085165f908152600160209081526040808320938716835292905220829055801561081d57826001600160a01b0316846001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258460405161081491815260200190565b60405180910390a35b50505050565b6001600160a01b038381165f908152600160209081526040808320938616835292905220545f19811461081d57818110156108a3576040517ffb8f41b20000000000000000000000000000000000000000000000000000000081526001600160a01b038416600482015260248101829052604481018390526064016103b2565b61081d84848484035f61071e565b6001600160a01b0383166108f3576040517f96c6fd1e0000000000000000000000000000000000000000000000000000000081525f60048201526024016103b2565b6001600160a01b038216610935576040517fec442f050000000000000000000000000000000000000000000000000000000081525f60048201526024016103b2565b61069c8383835b6001600160a01b038316610966578060025f82825461095b9190610e23565b909155506109ef9050565b6001600160a01b0383165f90815260208190526040902054818110156109d1576040517fe450d38c0000000000000000000000000000000000000000000000000000000081526001600160a01b038516600482015260248101829052604481018390526064016103b2565b6001600160a01b0384165f9081526020819052604090209082900390555b6001600160a01b038216610a0b57600280548290039055610a29565b6001600160a01b0382165f9081526020819052604090208054820190555b816001600160a01b0316836001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef83604051610a6e91815260200190565b60405180910390a3505050565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b602081525f610abb6020830184610a7b565b9392505050565b80356001600160a01b0381168114610ad8575f80fd5b919050565b5f8060408385031215610aee575f80fd5b610af783610ac2565b946020939093013593505050565b5f805f60608486031215610b17575f80fd5b610b2084610ac2565b9250610b2e60208501610ac2565b929592945050506040919091013590565b634e487b7160e01b5f52604160045260245ffd5b5f82601f830112610b62575f80fd5b813567ffffffffffffffff811115610b7c57610b7c610b3f565b604051601f19603f601f19601f8501160116810181811067ffffffffffffffff82111715610bac57610bac610b3f565b604052818152838201602001851015610bc3575f80fd5b816020850160208301375f918101602001919091529392505050565b5f8060408385031215610bf0575f80fd5b823567ffffffffffffffff811115610c06575f80fd5b610c1285828601610b53565b925050602083013567ffffffffffffffff811115610c2e575f80fd5b610c3a85828601610b53565b9150509250929050565b5f60208284031215610c54575f80fd5b610abb82610ac2565b5f8060408385031215610c6e575f80fd5b610c7783610ac2565b9150610c8560208401610ac2565b90509250929050565b600181811c90821680610ca257607f821691505b602082108103610cc057634e487b7160e01b5f52602260045260245ffd5b50919050565b601f82111561069c57805f5260205f20601f840160051c81016020851015610ceb5750805b601f840160051c820191505b81811015610d0a575f8155600101610cf7565b5050505050565b815167ffffffffffffffff811115610d2b57610d2b610b3f565b610d3f81610d398454610c8e565b84610cc6565b6020601f821160018114610d71575f8315610d5a5750848201515b5f19600385901b1c1916600184901b178455610d0a565b5f84815260208120601f198516915b82811015610da05787850151825560209485019460019092019101610d80565b5084821015610dbd57868401515f19600387901b60f8161c191681555b50505050600190811b01905550565b608081525f610dde6080830187610a7b565b8281036020840152610df08187610a7b565b90508281036040840152610e048186610a7b565b90508281036060840152610e188185610a7b565b979650505050505050565b808201808211156102cd57634e487b7160e01b5f52601160045260245ffdfea2646970667358221220f6d581e9095116183a74ecc428ee4283517f54da2c1f2915ad9175ff456a39fb64736f6c634300081a003368747470733a2f2f6f7264696e616c732e636f6d2f636f6e74656e742f663462653739353138656262303238336564333730313262343231353264656463326264666532653761383932363763373434386162333665303262663939636930a26469706673582212203dde49af248f95a4d91adf1bb29765e8dc0a21a81f87619253aa0cd9f73ab6fa64736f6c634300081a0033

Deployed Bytecode

0x608060405234801561000f575f80fd5b506004361061035b575f3560e01c80637a3ebc2a116101c9578063c3edd884116100fe578063e985e9c51161009e578063f2fde38b11610079578063f2fde38b1461087b578063f3e832881461088e578063f932b282146108ad578063fa7f1db8146108c0575f80fd5b8063e985e9c514610802578063e9dd0f881461083d578063ee2231991461085c575f80fd5b8063cb1e4466116100d9578063cb1e446614610781578063cf8912c5146107a4578063d082e381146107d1578063d7e0d3b4146107da575f80fd5b8063c3edd88414610731578063c87b56dd14610744578063c8834ef514610757575f80fd5b806397d7cef411610169578063a43275bd11610144578063a43275bd146106d2578063a6c26603146106e5578063b88d4fde146106f6578063bb5ce86c14610709575f80fd5b806397d7cef41461069957806398462b68146106ac578063a22cb465146106bf575f80fd5b806387d5ec8e116101a457806387d5ec8e1461065a578063890a5b951461066d5780638da5cb5b1461068057806395d89b4114610691575f80fd5b80637a3ebc2a1461060f5780637ca77d9f1461063457806381ec3d5b14610647575f80fd5b80633abad85d1161029f57806353917a4d1161023f578063715018a61161021a578063715018a6146105aa57806375d7b0e7146105b2578063791282d5146105c557806379e8a604146105e7575f80fd5b806353917a4d146105715780636352211e1461058457806370a0823114610597575f80fd5b806346e04a2f1161027a57806346e04a2f146105105780634da6a556146105235780634ddfb0f21461054b57806352ed33c31461055e575f80fd5b80633abad85d146104cb57806342842e0e146104de57806342e94c90146104f1575f80fd5b8063150b7a021161030a578063202c9bc9116102e5578063202c9bc91461048957806323b872dd1461049c57806332cb6b0c146104af57806334ad3501146104b8575f80fd5b8063150b7a021461041257806316934fc41461046257806318160ddd14610481575f80fd5b8063081812fc1161033a578063081812fc146103c9578063095ea7b3146103f45780630a763da114610409575f80fd5b80622f88821461035f57806301ffc9a71461039157806306fdde03146103b4575b5f80fd5b61037e61036d3660046140d4565b601c6020525f908152604090205481565b6040519081526020015b60405180910390f35b6103a461039f366004614118565b6108d3565b6040519015158152602001610388565b6103bc6109b7565b6040516103889190614161565b6103dc6103d73660046140d4565b610a46565b6040516001600160a01b039091168152602001610388565b61040761040236600461418e565b610a6d565b005b61037e60175481565b6104316104203660046141b6565b630a85bd0160e11b95945050505050565b6040517fffffffff000000000000000000000000000000000000000000000000000000009091168152602001610388565b61037e61047036600461424b565b60116020525f908152604090205481565b61040061037e565b6104076104973660046140d4565b610a7c565b6104076104aa366004614264565b610d34565b61037e61040081565b6104076104c63660046140d4565b610d4f565b6104076104d9366004614347565b610d76565b6104076104ec366004614264565b611019565b61037e6104ff36600461424b565b600e6020525f908152604090205481565b61040761051e3660046140d4565b611033565b61037e61053136600461424b565b6001600160a01b03165f9081526011602052604090205490565b6104076105593660046140d4565b611294565b61040761056c3660046140d4565b611541565b61040761057f36600461424b565b61178a565b6103dc6105923660046140d4565b6117c1565b61037e6105a536600461424b565b6117cb565b610407611829565b6103bc6105c03660046140d4565b61183c565b6103a46105d33660046140d4565b601a6020525f908152604090205460ff1681565b6103dc6105f53660046140d4565b600a6020525f90815260409020546001600160a01b031681565b61062261061d366004614409565b6118d3565b60405161038896959493929190614429565b6009546103dc906001600160a01b031681565b6103bc6106553660046140d4565b611b2d565b6104076106683660046140d4565b611b45565b61040761067b366004614490565b611ec3565b6006546001600160a01b03166103dc565b6103bc61220c565b6104076106a73660046140d4565b61221b565b6008546103dc906001600160a01b031681565b6104076106cd3660046144c6565b612385565b6104076106e03660046140d4565b612390565b61037e6934f086f3b33b6840000081565b6104076107043660046144fb565b6126a7565b6103dc6107173660046140d4565b601b6020525f90815260409020546001600160a01b031681565b61040761073f3660046140d4565b6126be565b6103bc6107523660046140d4565b612834565b61037e610765366004614572565b601860209081525f928352604080842090915290825290205481565b61079461078f3660046140d4565b6129c0565b604051610388949392919061459c565b6103a46107b2366004614572565b601d60209081525f928352604080842090915290825290205460ff1681565b61037e60155481565b6103dc6107e83660046140d4565b5f908152600a60205260409020546001600160a01b031690565b6103a46108103660046145f3565b6001600160a01b039182165f90815260056020908152604080832093909416825291909152205460ff1690565b61037e61084b3660046140d4565b60106020525f908152604090205481565b61037e61086a3660046140d4565b60126020525f908152604090205481565b61040761088936600461424b565b612bff565b61037e61089c3660046140d4565b60196020525f908152604090205481565b6104076108bb366004614347565b612c52565b6104076108ce36600461424b565b612ec9565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082167f80ac58cd00000000000000000000000000000000000000000000000000000000148061096557507fffffffff0000000000000000000000000000000000000000000000000000000082167f5b5e139f00000000000000000000000000000000000000000000000000000000145b806109b157507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b92915050565b60605f80546109c59061461b565b80601f01602080910402602001604051908101604052809291908181526020018280546109f19061461b565b8015610a3c5780601f10610a1357610100808354040283529160200191610a3c565b820191905f5260205f20905b815481529060010190602001808311610a1f57829003601f168201915b5050505050905090565b5f610a5082612f00565b505f828152600460205260409020546001600160a01b03166109b1565b610a78828233612f38565b5050565b5f81815260196020526040902054683635c9adc5dea000001115610b0d5760405162461bcd60e51b815260206004820152603160248201527f4e6f7420656e6f75676820427261696e4372656469747320636f6e747269627560448201527f74656420696e207468697320626174636800000000000000000000000000000060648201526084015b60405180910390fd5b5f818152601a602052604090205460ff1615610b6b5760405162461bcd60e51b815260206004820152601460248201527f426174636820616c7265616479206d696e7465640000000000000000000000006044820152606401610b04565b61040060155410610bbe5760405162461bcd60e51b815260206004820181905260248201527f45786365656473206d6178696d756d20737570706c79206f6620427261696e736044820152606401610b04565b6016545f9015610c1c5760168054610bd890600190614667565b81548110610be857610be861467a565b905f5260205f20015490506016805480610c0457610c0461468e565b600190038181905f5260205f20015f90559055610c3e565b5060158054600181019091555f19602f82900301610c3e576015805460010190555b604080518281523060208201527f565d5be3c5d9b8fce8cebcd35e95027d3d05547e683e3d6fdb0f0e49d33db90d910160405180910390a1610c803082612f45565b5f610c8b3083612f5e565b5f838152600a6020908152604080832080546001600160a01b03861673ffffffffffffffffffffffffffffffffffffffff199182168117909255888552601b8452828520805490911682179055601c8352818420879055601a835292819020805460ff191660011790558051868152918201929092529192507f44165505aa9de0a6966949bee8bf2595f4ee689a16dd65a62fe05aa3a67410d1910160405180910390a1505050565b610d3f8383836131bb565b610d4a838383613257565b505050565b610d576132aa565b5f908152601460205260409020805460ff19811660ff90911615179055565b5f858152600a60205260409020546001600160a01b0316610dd95760405162461bcd60e51b815260206004820152601960248201527f427261696e20746f6b656e206e6f7420616374697661746564000000000000006044820152606401610b04565b5f858152600a6020526040908190205490517f70a082310000000000000000000000000000000000000000000000000000000081523360048201526064916001600160a01b0316906370a0823190602401602060405180830381865afa158015610e45573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610e6991906146a2565b11610edc5760405162461bcd60e51b815260206004820152602d60248201527f4d757374206f776e206174206c656173742031303020627261696e20746f6b6560448201527f6e7320746f2070726f706f7365000000000000000000000000000000000000006064820152608401610b04565b5f8581526014602052604090205460ff1615610f455760405162461bcd60e51b815260206004820152602260248201527f4d6574616461746120757064617465732064697361626c6564206f6e2042726160448201526134b760f11b6064820152608401610b04565b5f85815260106020908152604080832054600f835281842081855290925290912080610f7187826146fd565b5060018101610f8086826146fd565b5060028101610f8f85826146fd565b5060038101610f9e84826146fd565b505f6004820181905560068201805460ff19169055878152601060205260408120805491610fcb836147b8565b9190505550867f6bc35514acc7287944b18df177cdce8fe5d415ad1307bcb2d700e0b6a33f2cf583888888886040516110089594939291906147d0565b60405180910390a250505050505050565b610d4a83838360405180602001604052805f8152506126a7565b5f818152601a602052604090205460ff166110b55760405162461bcd60e51b8152602060048201526024808201527f546f6b656e73206e6f74206d696e74656420666f72207468697320626174636860448201527f20796574000000000000000000000000000000000000000000000000000000006064820152608401610b04565b5f818152601d6020908152604080832033845290915290205460ff16156111445760405162461bcd60e51b815260206004820152602560248201527f546f6b656e7320616c726561647920636c61696d656420666f7220746869732060448201527f62617463680000000000000000000000000000000000000000000000000000006064820152608401610b04565b5f818152601860209081526040808320338452909152902054806111aa5760405162461bcd60e51b815260206004820152601f60248201527f4e6f20636f6e747269627574696f6e7320666f722074686973206261746368006044820152606401610b04565b5f6111d2683635c9adc5dea000006111cc8469d3c21bcecceda10000006132f0565b90613302565b5f848152601d6020908152604080832033808552908352818420805460ff19166001179055878452601b909252918290205491517fa9059cbb0000000000000000000000000000000000000000000000000000000081526004810191909152602481018390529192506001600160a01b03169063a9059cbb906044016020604051808303815f875af115801561126a573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061128e919061482e565b50505050565b3361129e826117c1565b6001600160a01b0316146112f45760405162461bcd60e51b815260206004820152601c60248201527f4f6e6c7920427261696e206f776e65722063616e20756e7374616b65000000006044820152606401610b04565b5f81815260126020526040902054611310906276a70090614849565b42101561135f5760405162461bcd60e51b815260206004820152601e60248201527f5374616b6520706572696f64206e6f742079657420636f6d706c6574656400006044820152606401610b04565b335f9081526011602052604090205469152d02c7e14af680000011156113c75760405162461bcd60e51b815260206004820152601860248201527f4e6f7420656e6f75676820746f6b656e73207374616b656400000000000000006044820152606401610b04565b335f908152601160205260409020546113ea9069152d02c7e14af680000061330d565b335f81815260116020526040908190209290925560095491517fa9059cbb000000000000000000000000000000000000000000000000000000008152600481019190915269152d02c7e14af680000060248201526001600160a01b039091169063a9059cbb906044016020604051808303815f875af115801561146f573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611493919061482e565b5061149d81613318565b601680546001810182555f9182527fd833147d7dc355ba459fc788f669e58cfaf9dc25ddcd0702e87d69c7b512428901829055600854604080517fde0f2be100000000000000000000000000000000000000000000000000000000815290516001600160a01b039092169263de0f2be19260048084019382900301818387803b158015611528575f80fd5b505af115801561153a573d5f803e3d5ffd5b5050505050565b6008546001600160a01b03166115995760405162461bcd60e51b815260206004820152601c60248201527f427261696e204372656469742061646472657373206e6f7420736574000000006044820152606401610b04565b5f81116115e85760405162461bcd60e51b815260206004820181905260248201527f416d6f756e74206d7573742062652067726561746572207468616e207a65726f6044820152606401610b04565b6008546040516323b872dd60e01b8152336004820152306024820152604481018390526001600160a01b03909116906323b872dd906064016020604051808303815f875af115801561163c573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611660919061482e565b50805b8015610a78576017545f9081526019602052604081205461168e90683635c9adc5dea000009061330d565b9050818181111561169c5750805b6017545f9081526018602090815260408083203384529091529020546116c29082613350565b601780545f90815260186020908152604080832033845282528083209490945591548152601990915220546116f79082613350565b6017545f90815260196020526040902055611712838261330d565b60408051338152602081018490529194507f1bb460ccaaf70fbacfec17a376f8acbd278c1405590ffcc8ebe4b88daf4f64ad910160405180910390a16017545f90815260196020526040902054683635c9adc5dea00000116117835760178054905f61177d836147b8565b91905055505b5050611663565b6117926132aa565b6008805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b5f6109b182612f00565b5f6001600160a01b03821661180e576040517f89c62b640000000000000000000000000000000000000000000000000000000081525f6004820152602401610b04565b506001600160a01b03165f9081526003602052604090205490565b6118316132aa565b61183a5f61335b565b565b600d6020525f9081526040902080546118549061461b565b80601f01602080910402602001604051908101604052809291908181526020018280546118809061461b565b80156118cb5780601f106118a2576101008083540402835291602001916118cb565b820191905f5260205f20905b8154815290600101906020018083116118ae57829003601f168201915b505050505081565b600f60209081525f92835260408084209091529082529020805481906118f89061461b565b80601f01602080910402602001604051908101604052809291908181526020018280546119249061461b565b801561196f5780601f106119465761010080835404028352916020019161196f565b820191905f5260205f20905b81548152906001019060200180831161195257829003601f168201915b5050505050908060010180546119849061461b565b80601f01602080910402602001604051908101604052809291908181526020018280546119b09061461b565b80156119fb5780601f106119d2576101008083540402835291602001916119fb565b820191905f5260205f20905b8154815290600101906020018083116119de57829003601f168201915b505050505090806002018054611a109061461b565b80601f0160208091040260200160405190810160405280929190818152602001828054611a3c9061461b565b8015611a875780601f10611a5e57610100808354040283529160200191611a87565b820191905f5260205f20905b815481529060010190602001808311611a6a57829003601f168201915b505050505090806003018054611a9c9061461b565b80601f0160208091040260200160405190810160405280929190818152602001828054611ac89061461b565b8015611b135780601f10611aea57610100808354040283529160200191611b13565b820191905f5260205f20905b815481529060010190602001808311611af657829003601f168201915b50505050600483015460069093015491929160ff16905086565b600c6020525f9081526040902080546118549061461b565b6009546001600160a01b0316611bc35760405162461bcd60e51b815260206004820152602160248201527f53706563696669632050657065636f696e2061646472657373206e6f7420736560448201527f74000000000000000000000000000000000000000000000000000000000000006064820152608401610b04565b611bd769152d02c7e14af680000082614870565b15611c4a5760405162461bcd60e51b815260206004820152603460248201527f5374616b6520616d6f756e74206d75737420626520696e20696e6372656d656e60448201527f7473206f66203130302c30303020746f6b656e730000000000000000000000006064820152608401610b04565b5f611c5f8269152d02c7e14af6800000613302565b9050610400600182601554611c749190614849565b611c7e9190614667565b1115611ccc5760405162461bcd60e51b815260206004820181905260248201527f45786365656473206d6178696d756d20737570706c79206f6620427261696e736044820152606401610b04565b6009546040516323b872dd60e01b8152336004820152306024820152604481018490526001600160a01b03909116906323b872dd906064016020604051808303815f875af1158015611d20573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611d44919061482e565b50335f90815260116020526040902054611d5e9083613350565b335f908152601160205260408082209290925560085482517f90578ae100000000000000000000000000000000000000000000000000000000815292516001600160a01b03909116926390578ae192600480830193919282900301818387803b158015611dc9575f80fd5b505af1158015611ddb573d5f803e3d5ffd5b505050505f5b81811015610d4a576016545f9015611e475760168054611e0390600190614667565b81548110611e1357611e1361467a565b905f5260205f20015490506016805480611e2f57611e2f61468e565b600190038181905f5260205f20015f90559055611e69565b5060158054600181019091555f19602f82900301611e69576015805460010190555b604080518281523360208201527f565d5be3c5d9b8fce8cebcd35e95027d3d05547e683e3d6fdb0f0e49d33db90d910160405180910390a1611eab3382612f45565b5f908152601260205260409020429055600101611de1565b611ecb6133b9565b5f838152600a60205260409020546001600160a01b0316611f2e5760405162461bcd60e51b815260206004820152601960248201527f427261696e20746f6b656e206e6f7420616374697661746564000000000000006044820152606401610b04565b5f8381526014602052604090205460ff1615611f975760405162461bcd60e51b815260206004820152602260248201527f4d6574616461746120757064617465732064697361626c6564206f6e2042726160448201526134b760f11b6064820152608401610b04565b5f838152600f602090815260408083208584529091529020600681015460ff16156120045760405162461bcd60e51b815260206004820152601960248201527f50726f706f73616c20616c7265616479206578656375746564000000000000006044820152606401610b04565b5f848152600a6020526040908190205490517f70a082310000000000000000000000000000000000000000000000000000000081523360048201526001600160a01b0390911690839082906370a0823190602401602060405180830381865afa158015612073573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061209791906146a2565b10156120e55760405162461bcd60e51b815260206004820152601460248201527f496e73756666696369656e742062616c616e63650000000000000000000000006044820152606401610b04565b6040516323b872dd60e01b8152336004820152306024820152604481018490526001600160a01b038216906323b872dd906064016020604051808303815f875af1158015612135573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612159919061482e565b5060048201546121699084613350565b6004830155335f9081526005830160205260409020546121899084613350565b335f81815260058501602090815260409182902093909355805187815292830191909152810184905285907ff6ed5a0362706e33942c258dd867d1664e91a7653843a7c3459a857db97287ae9060600160405180910390a26934f086f3b33b68400000826004015410612200576122008585613412565b5050610d4a6001600755565b6060600180546109c59061461b565b33612225826117c1565b6001600160a01b0316146122a15760405162461bcd60e51b815260206004820152602160248201527f4f6e6c7920427261696e206f776e65722063616e206c696e6b2061204552433260448201527f30000000000000000000000000000000000000000000000000000000000000006064820152608401610b04565b5f818152600a60205260409020546001600160a01b0316156123055760405162461bcd60e51b815260206004820152601f60248201527f427261696e20746f6b656e20686173206265656e206163746976617465642e006044820152606401610b04565b5f6123103383612f5e565b5f838152600a6020908152604091829020805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0385169081179091558251868152918201529192507f44165505aa9de0a6966949bee8bf2595f4ee689a16dd65a62fe05aa3a67410d1910160405180910390a15050565b610a7833838361396d565b6008546001600160a01b031661240e5760405162461bcd60e51b815260206004820152602560248201527f537065636966696320427261696e204372656469742061646472657373206e6f60448201527f74207365740000000000000000000000000000000000000000000000000000006064820152608401610b04565b683635c9adc5dea000008110156124675760405162461bcd60e51b815260206004820152601660248201527f4d696e696d756d20616d6f756e74206e6f74206d6574000000000000000000006044820152606401610b04565b61247a683635c9adc5dea0000082614870565b156124ed5760405162461bcd60e51b815260206004820152602c60248201527f416d6f756e74206d75737420626520696e20696e6372656d656e7473206f662060448201527f31303030206372656469747300000000000000000000000000000000000000006064820152608401610b04565b5f612501683635c9adc5dea0000083614883565b90506104006001826015546125169190614849565b6125209190614667565b111561256e5760405162461bcd60e51b815260206004820181905260248201527f45786365656473206d6178696d756d20737570706c79206f6620427261696e736044820152606401610b04565b6008546040516323b872dd60e01b8152336004820152306024820152604481018490526001600160a01b03909116906323b872dd906064016020604051808303815f875af11580156125c2573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906125e6919061482e565b505f5b81811015610d4a576016545f901561264f576016805461260b90600190614667565b8154811061261b5761261b61467a565b905f5260205f200154905060168054806126375761263761468e565b600190038181905f5260205f20015f9055905561265c565b5060158054600181019091555b604080518281523360208201527f565d5be3c5d9b8fce8cebcd35e95027d3d05547e683e3d6fdb0f0e49d33db90d910160405180910390a161269e3382612f45565b506001016125e9565b6126b384848484613a24565b61128e848484613257565b6126c66132aa565b61040081106127175760405162461bcd60e51b815260206004820152601f60248201527f546f6b656e2049442065786365656473206d6178696d756d20737570706c79006044820152606401610b04565b6009546001600160a01b0316156127705760405162461bcd60e51b815260206004820152601b60248201527f43616e6e6f742072756e206166746572206d696e7420737461727400000000006044820152606401610b04565b604080518281523360208201527f565d5be3c5d9b8fce8cebcd35e95027d3d05547e683e3d6fdb0f0e49d33db90d910160405180910390a160085f9054906101000a90046001600160a01b03166001600160a01b03166390578ae16040518163ffffffff1660e01b81526004015f604051808303815f87803b1580156127f4575f80fd5b505af1158015612806573d5f803e3d5ffd5b505050506128143382612f45565b80602f146128315760158054905f61282b836147b8565b91905055505b50565b5f818152601360205260408120805460609291906128519061461b565b80601f016020809104026020016040519081016040528092919081815260200182805461287d9061461b565b80156128c85780601f1061289f576101008083540402835291602001916128c8565b820191905f5260205f20905b8154815290600101906020018083116128ab57829003601f168201915b505050505090505f815111156128de5792915050565b5f838152600b6020526040812060020180546128f99061461b565b905011156129a0575f838152600b60205260409020600201805461291c9061461b565b80601f01602080910402602001604051908101604052809291908181526020018280546129489061461b565b80156129935780601f1061296a57610100808354040283529160200191612993565b820191905f5260205f20905b81548152906001019060200180831161297657829003601f168201915b5050505050915050919050565b6040518060800160405280605f8152602001615f67605f91399392505050565b600b6020525f90815260409020805481906129da9061461b565b80601f0160208091040260200160405190810160405280929190818152602001828054612a069061461b565b8015612a515780601f10612a2857610100808354040283529160200191612a51565b820191905f5260205f20905b815481529060010190602001808311612a3457829003601f168201915b505050505090806001018054612a669061461b565b80601f0160208091040260200160405190810160405280929190818152602001828054612a929061461b565b8015612add5780601f10612ab457610100808354040283529160200191612add565b820191905f5260205f20905b815481529060010190602001808311612ac057829003601f168201915b505050505090806002018054612af29061461b565b80601f0160208091040260200160405190810160405280929190818152602001828054612b1e9061461b565b8015612b695780601f10612b4057610100808354040283529160200191612b69565b820191905f5260205f20905b815481529060010190602001808311612b4c57829003601f168201915b505050505090806003018054612b7e9061461b565b80601f0160208091040260200160405190810160405280929190818152602001828054612baa9061461b565b8015612bf55780601f10612bcc57610100808354040283529160200191612bf5565b820191905f5260205f20905b815481529060010190602001808311612bd857829003601f168201915b5050505050905084565b612c076132aa565b6001600160a01b038116612c49576040517f1e4fbdf70000000000000000000000000000000000000000000000000000000081525f6004820152602401610b04565b6128318161335b565b33612c5c866117c1565b6001600160a01b031614612cd75760405162461bcd60e51b8152602060048201526024808201527f4f6e6c7920427261696e206f776e65722063616e20757064617465206d65746160448201527f64617461000000000000000000000000000000000000000000000000000000006064820152608401610b04565b5f8581526014602052604090205460ff1615612d405760405162461bcd60e51b815260206004820152602260248201527f4d6574616461746120757064617465732064697361626c6564206f6e2042726160448201526134b760f11b6064820152608401610b04565b604080516080810182528581526020808201869052818301859052606082018490525f888152600b9091529190912081518190612d7d90826146fd565b5060208201516001820190612d9290826146fd565b5060408201516002820190612da790826146fd565b5060608201516003820190612dbc90826146fd565b5050505f858152600a60205260409020546001600160a01b03168015612e82576040517f2f71d0220000000000000000000000000000000000000000000000000000000081526001600160a01b03821690632f71d02290612e239088908890600401614896565b5f604051808303815f87803b158015612e3a575f80fd5b505af1158015612e4c573d5f803e3d5ffd5b5050505f878152600c602052604090209050612e6886826146fd565b505f868152600d60205260409020612e8085826146fd565b505b7f7b73af05a2d1d4fa3f0df287883eedf5070d787e199b00d6929cdd4d328a764b8686868686604051612eb99594939291906147d0565b60405180910390a1505050505050565b612ed16132aa565b6009805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b5f818152600260205260408120546001600160a01b0316806109b157604051637e27328960e01b815260048101849052602401610b04565b610d4a8383836001613a3b565b610a78828260405180602001604052805f815250613b83565b5f818152600b6020526040812080546060918291849190612f7e9061461b565b9050118015612fa757505f848152600b602052604081206001018054612fa39061461b565b9050115b156130e3575f848152600b602052604090208054612fc49061461b565b80601f0160208091040260200160405190810160405280929190818152602001828054612ff09061461b565b801561303b5780601f106130125761010080835404028352916020019161303b565b820191905f5260205f20905b81548152906001019060200180831161301e57829003601f168201915b5050505f878152600b602052604090206001018054939550926130609250905061461b565b80601f016020809104026020016040519081016040528092919081815260200182805461308c9061461b565b80156130d75780601f106130ae576101008083540402835291602001916130d7565b820191905f5260205f20905b8154815290600101906020018083116130ba57829003601f168201915b50505050509050613138565b6130ec84613b99565b6040516020016130fc91906148da565b604051602081830303815290604052915061311684613b99565b604051602001613126919061490b565b60405160208183030381529060405290505b5f69d3c21bcecceda100000090505f83838389604051613157906140c7565b613164949392919061493c565b604051809103905ff08015801561317d573d5f803e3d5ffd5b505f878152600c6020526040902090915061319885826146fd565b505f868152600d602052604090206131b084826146fd565b509695505050505050565b6001600160a01b0382166131e457604051633250574960e11b81525f6004820152602401610b04565b5f6131f0838333613c36565b9050836001600160a01b0316816001600160a01b03161461128e576040517f64283d7b0000000000000000000000000000000000000000000000000000000081526001600160a01b0380861660048301526024820184905282166044820152606401610b04565b816001600160a01b0316836001600160a01b0316827fca9cf35395507b17a2d1c8da6b344ae6227bad9b90859f4b53cfac1ad5ecca5d4260405161329d91815260200190565b60405180910390a4505050565b6006546001600160a01b0316331461183a576040517f118cdaa7000000000000000000000000000000000000000000000000000000008152336004820152602401610b04565b5f6132fb8284614981565b9392505050565b5f6132fb8284614883565b5f6132fb8284614667565b5f6133245f835f613c36565b90506001600160a01b038116610a7857604051637e27328960e01b815260048101839052602401610b04565b5f6132fb8284614849565b600680546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a35050565b60026007540361340b5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610b04565b6002600755565b5f8281526014602052604090205460ff161561347b5760405162461bcd60e51b815260206004820152602260248201527f4d6574616461746120757064617465732064697361626c6564206f6e2042726160448201526134b760f11b6064820152608401610b04565b5f828152600f602090815260408083208484529091529020600681015460ff16156134e85760405162461bcd60e51b815260206004820152601960248201527f50726f706f73616c20616c7265616479206578656375746564000000000000006044820152606401610b04565b6934f086f3b33b68400000816004015410156135465760405162461bcd60e51b815260206004820152601860248201527f566f74696e67207468726573686f6c64206e6f74206d657400000000000000006044820152606401610b04565b6040518060800160405280825f01805461355f9061461b565b80601f016020809104026020016040519081016040528092919081815260200182805461358b9061461b565b80156135d65780601f106135ad576101008083540402835291602001916135d6565b820191905f5260205f20905b8154815290600101906020018083116135b957829003601f168201915b505050505081526020018260010180546135ef9061461b565b80601f016020809104026020016040519081016040528092919081815260200182805461361b9061461b565b80156136665780601f1061363d57610100808354040283529160200191613666565b820191905f5260205f20905b81548152906001019060200180831161364957829003601f168201915b5050505050815260200182600201805461367f9061461b565b80601f01602080910402602001604051908101604052809291908181526020018280546136ab9061461b565b80156136f65780601f106136cd576101008083540402835291602001916136f6565b820191905f5260205f20905b8154815290600101906020018083116136d957829003601f168201915b5050505050815260200182600301805461370f9061461b565b80601f016020809104026020016040519081016040528092919081815260200182805461373b9061461b565b80156137865780601f1061375d57610100808354040283529160200191613786565b820191905f5260205f20905b81548152906001019060200180831161376957829003601f168201915b5050509190925250505f848152600b60205260409020815181906137aa90826146fd565b50602082015160018201906137bf90826146fd565b50604082015160028201906137d490826146fd565b50606082015160038201906137e990826146fd565b5050505f838152600a60205260409020546001600160a01b0316801561390d575f61381385613b99565b60405161382591908590602001614a06565b60405160208183030381529060405290505f61384086613b99565b84600101604051602001613855929190614a67565b60408051601f19818403018152908290527f2f71d02200000000000000000000000000000000000000000000000000000000825291506001600160a01b03841690632f71d022906138ac9085908590600401614896565b5f604051808303815f87803b1580156138c3575f80fd5b505af11580156138d5573d5f803e3d5ffd5b5050505f878152600c6020526040902090506138f183826146fd565b505f868152600d6020526040902061390982826146fd565b5050505b60068201805460ff191660019081179091556040517f7b73af05a2d1d4fa3f0df287883eedf5070d787e199b00d6929cdd4d328a764b9161395f91879186919082019060028301906003840190614b46565b60405180910390a150505050565b6001600160a01b0382166139b8576040517f5b08ba180000000000000000000000000000000000000000000000000000000081526001600160a01b0383166004820152602401610b04565b6001600160a01b038381165f81815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b613a2f848484610d34565b61128e84848484613d35565b8080613a4f57506001600160a01b03821615155b15613b47575f613a5e84612f00565b90506001600160a01b03831615801590613a8a5750826001600160a01b0316816001600160a01b031614155b8015613abb57506001600160a01b038082165f9081526005602090815260408083209387168352929052205460ff16155b15613afd576040517fa9fbf51f0000000000000000000000000000000000000000000000000000000081526001600160a01b0384166004820152602401610b04565b8115613b455783856001600160a01b0316826001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45b505b50505f908152600460205260409020805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b613b8d8383613e6c565b610d4a5f848484613d35565b60605f613ba583613ee6565b60010190505f8167ffffffffffffffff811115613bc457613bc461429e565b6040519080825280601f01601f191660200182016040528015613bee576020820181803683370190505b5090508181016020015b5f19017f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a8504945084613bf857509392505050565b5f828152600260205260408120546001600160a01b0390811690831615613c6257613c62818486613fc7565b6001600160a01b03811615613c9c57613c7d5f855f80613a3b565b6001600160a01b0381165f90815260036020526040902080545f190190555b6001600160a01b03851615613cca576001600160a01b0385165f908152600360205260409020805460010190555b5f84815260026020526040808220805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0389811691821790925591518793918516917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4949350505050565b6001600160a01b0383163b1561128e57604051630a85bd0160e11b81526001600160a01b0384169063150b7a0290613d77903390889087908790600401614b98565b6020604051808303815f875af1925050508015613db1575060408051601f3d908101601f19168201909252613dae91810190614bd8565b60015b613e18573d808015613dde576040519150601f19603f3d011682016040523d82523d5f602084013e613de3565b606091505b5080515f03613e1057604051633250574960e11b81526001600160a01b0385166004820152602401610b04565b805181602001fd5b7fffffffff000000000000000000000000000000000000000000000000000000008116630a85bd0160e11b1461153a57604051633250574960e11b81526001600160a01b0385166004820152602401610b04565b6001600160a01b038216613e9557604051633250574960e11b81525f6004820152602401610b04565b5f613ea183835f613c36565b90506001600160a01b03811615610d4a576040517f73c6ac6e0000000000000000000000000000000000000000000000000000000081525f6004820152602401610b04565b5f807a184f03e93ff9f4daa797ed6e38ed64bf6a1f0100000000000000008310613f2e577a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000830492506040015b6d04ee2d6d415b85acef81000000008310613f5a576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc100008310613f7857662386f26fc10000830492506010015b6305f5e1008310613f90576305f5e100830492506008015b6127108310613fa457612710830492506004015b60648310613fb6576064830492506002015b600a83106109b15760010192915050565b613fd2838383614044565b610d4a576001600160a01b03831661400057604051637e27328960e01b815260048101829052602401610b04565b6040517f177e802f0000000000000000000000000000000000000000000000000000000081526001600160a01b038316600482015260248101829052604401610b04565b5f6001600160a01b038316158015906140bf5750826001600160a01b0316846001600160a01b0316148061409c57506001600160a01b038085165f9081526005602090815260408083209387168352929052205460ff165b806140bf57505f828152600460205260409020546001600160a01b038481169116145b949350505050565b61137380614bf483390190565b5f602082840312156140e4575f80fd5b5035919050565b7fffffffff0000000000000000000000000000000000000000000000000000000081168114612831575f80fd5b5f60208284031215614128575f80fd5b81356132fb816140eb565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b602081525f6132fb6020830184614133565b80356001600160a01b0381168114614189575f80fd5b919050565b5f806040838503121561419f575f80fd5b6141a883614173565b946020939093013593505050565b5f805f805f608086880312156141ca575f80fd5b6141d386614173565b94506141e160208701614173565b935060408601359250606086013567ffffffffffffffff811115614203575f80fd5b8601601f81018813614213575f80fd5b803567ffffffffffffffff811115614229575f80fd5b88602082840101111561423a575f80fd5b959894975092955050506020019190565b5f6020828403121561425b575f80fd5b6132fb82614173565b5f805f60608486031215614276575f80fd5b61427f84614173565b925061428d60208501614173565b929592945050506040919091013590565b634e487b7160e01b5f52604160045260245ffd5b5f8067ffffffffffffffff8411156142cc576142cc61429e565b50604051601f19601f85018116603f0116810181811067ffffffffffffffff821117156142fb576142fb61429e565b604052838152905080828401851015614312575f80fd5b838360208301375f60208583010152509392505050565b5f82601f830112614338575f80fd5b6132fb838335602085016142b2565b5f805f805f60a0868803121561435b575f80fd5b85359450602086013567ffffffffffffffff811115614378575f80fd5b61438488828901614329565b945050604086013567ffffffffffffffff8111156143a0575f80fd5b6143ac88828901614329565b935050606086013567ffffffffffffffff8111156143c8575f80fd5b6143d488828901614329565b925050608086013567ffffffffffffffff8111156143f0575f80fd5b6143fc88828901614329565b9150509295509295909350565b5f806040838503121561441a575f80fd5b50508035926020909101359150565b60c081525f61443b60c0830189614133565b828103602084015261444d8189614133565b905082810360408401526144618188614133565b905082810360608401526144758187614133565b6080840195909552505090151560a090910152949350505050565b5f805f606084860312156144a2575f80fd5b505081359360208301359350604090920135919050565b8015158114612831575f80fd5b5f80604083850312156144d7575f80fd5b6144e083614173565b915060208301356144f0816144b9565b809150509250929050565b5f805f806080858703121561450e575f80fd5b61451785614173565b935061452560208601614173565b925060408501359150606085013567ffffffffffffffff811115614547575f80fd5b8501601f81018713614557575f80fd5b614566878235602084016142b2565b91505092959194509250565b5f8060408385031215614583575f80fd5b8235915061459360208401614173565b90509250929050565b608081525f6145ae6080830187614133565b82810360208401526145c08187614133565b905082810360408401526145d48186614133565b905082810360608401526145e88185614133565b979650505050505050565b5f8060408385031215614604575f80fd5b61460d83614173565b915061459360208401614173565b600181811c9082168061462f57607f821691505b60208210810361464d57634e487b7160e01b5f52602260045260245ffd5b50919050565b634e487b7160e01b5f52601160045260245ffd5b818103818111156109b1576109b1614653565b634e487b7160e01b5f52603260045260245ffd5b634e487b7160e01b5f52603160045260245ffd5b5f602082840312156146b2575f80fd5b5051919050565b601f821115610d4a57805f5260205f20601f840160051c810160208510156146de5750805b601f840160051c820191505b8181101561153a575f81556001016146ea565b815167ffffffffffffffff8111156147175761471761429e565b61472b81614725845461461b565b846146b9565b6020601f82116001811461475d575f83156147465750848201515b5f19600385901b1c1916600184901b17845561153a565b5f84815260208120601f198516915b8281101561478c578785015182556020948501946001909201910161476c565b50848210156147a957868401515f19600387901b60f8161c191681555b50505050600190811b01905550565b5f5f1982036147c9576147c9614653565b5060010190565b85815260a060208201525f6147e860a0830187614133565b82810360408401526147fa8187614133565b9050828103606084015261480e8186614133565b905082810360808401526148228185614133565b98975050505050505050565b5f6020828403121561483e575f80fd5b81516132fb816144b9565b808201808211156109b1576109b1614653565b634e487b7160e01b5f52601260045260245ffd5b5f8261487e5761487e61485c565b500690565b5f826148915761489161485c565b500490565b604081525f6148a86040830185614133565b82810360208401526148ba8185614133565b95945050505050565b5f81518060208401855e5f93019283525090919050565b7f425241494e20544f4b454e20230000000000000000000000000000000000000081525f6132fb600d8301846148c3565b7f422300000000000000000000000000000000000000000000000000000000000081525f6132fb60028301846148c3565b608081525f61494e6080830187614133565b82810360208401526149608187614133565b9150508360408301526001600160a01b038316606083015295945050505050565b80820281158282048414176109b1576109b1614653565b5f81546149a48161461b565b6001821680156149bb57600181146149d0576149fd565b60ff19831686528115158202860193506149fd565b845f5260205f205f5b838110156149f5578154888201526001909101906020016149d9565b505081860193505b50505092915050565b7f425241494e20544f4b454e20230000000000000000000000000000000000000081525f614a37600d8301856148c3565b7f202d20000000000000000000000000000000000000000000000000000000000081526148ba6003820185614998565b7f422300000000000000000000000000000000000000000000000000000000000081525f614a9860028301856148c3565b7f2d0000000000000000000000000000000000000000000000000000000000000081526148ba6001820185614998565b5f8154614ad48161461b565b808552600182168015614aee5760018114614b0a576149fd565b60ff1983166020870152602082151560051b87010193506149fd565b845f5260205f205f5b83811015614b355781546020828a010152600182019150602081019050614b13565b870160200194505050505092915050565b85815260a060208201525f614b5e60a0830187614ac8565b8281036040840152614b708187614ac8565b90508281036060840152614b848186614ac8565b905082810360808401526148228185614ac8565b6001600160a01b03851681526001600160a01b0384166020820152826040820152608060608201525f614bce6080830184614133565b9695505050505050565b5f60208284031215614be8575f80fd5b81516132fb816140eb56fe60a060405234801561000f575f80fd5b5060405161137338038061137383398101604081905261002e916102e5565b8383600361003c83826103f6565b50600461004982826103f6565b50505069d3c21bcecceda10000008211156100b95760405162461bcd60e51b815260206004820152602560248201527f496e697469616c20737570706c792065786365656473206d6178696d756d20736044820152647570706c7960d81b60648201526084015b60405180910390fd5b3360805260056100c985826103f6565b5060066100d684826103f6565b506100e181836100ea565b505050506104d5565b6001600160a01b0382166101135760405163ec442f0560e01b81525f60048201526024016100b0565b61011e5f8383610122565b5050565b6001600160a01b03831661014c578060025f82825461014191906104b0565b909155506101bc9050565b6001600160a01b0383165f908152602081905260409020548181101561019e5760405163391434e360e21b81526001600160a01b038516600482015260248101829052604481018390526064016100b0565b6001600160a01b0384165f9081526020819052604090209082900390555b6001600160a01b0382166101d8576002805482900390556101f6565b6001600160a01b0382165f9081526020819052604090208054820190555b816001600160a01b0316836001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8360405161023b91815260200190565b60405180910390a3505050565b634e487b7160e01b5f52604160045260245ffd5b5f82601f83011261026b575f80fd5b81516001600160401b0381111561028457610284610248565b604051601f8201601f19908116603f011681016001600160401b03811182821017156102b2576102b2610248565b6040528181528382016020018510156102c9575f80fd5b8160208501602083015e5f918101602001919091529392505050565b5f805f80608085870312156102f8575f80fd5b84516001600160401b0381111561030d575f80fd5b6103198782880161025c565b602087015190955090506001600160401b03811115610336575f80fd5b6103428782880161025c565b60408701516060880151919550935090506001600160a01b0381168114610367575f80fd5b939692955090935050565b600181811c9082168061038657607f821691505b6020821081036103a457634e487b7160e01b5f52602260045260245ffd5b50919050565b601f8211156103f157805f5260205f20601f840160051c810160208510156103cf5750805b601f840160051c820191505b818110156103ee575f81556001016103db565b50505b505050565b81516001600160401b0381111561040f5761040f610248565b6104238161041d8454610372565b846103aa565b6020601f821160018114610455575f831561043e5750848201515b5f19600385901b1c1916600184901b1784556103ee565b5f84815260208120601f198516915b828110156104845787850151825560209485019460019092019101610464565b50848210156104a157868401515f19600387901b60f8161c191681555b50505050600190811b01905550565b808201808211156104cf57634e487b7160e01b5f52601160045260245ffd5b92915050565b608051610e786104fb5f395f818161019d01528181610349015261053e0152610e785ff3fe608060405234801561000f575f80fd5b50600436106100cf575f3560e01c806340c10f191161007d57806395d89b411161005857806395d89b41146101d7578063a9059cbb146101df578063dd62ed3e146101f2575f80fd5b806340c10f191461015d57806370a08231146101705780638e68554b14610198575f80fd5b806323b872dd116100ad57806323b872dd146101265780632f71d02214610139578063313ce5671461014e575f80fd5b806306fdde03146100d3578063095ea7b3146100f157806318160ddd14610114575b5f80fd5b6100db61022a565b6040516100e89190610aa9565b60405180910390f35b6101046100ff366004610add565b6102ba565b60405190151581526020016100e8565b6002545b6040519081526020016100e8565b610104610134366004610b05565b6102d3565b61014c610147366004610bdf565b61033e565b005b604051601281526020016100e8565b61014c61016b366004610add565b610533565b61011861017e366004610c44565b6001600160a01b03165f9081526020819052604090205490565b6101bf7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100e8565b6100db610626565b6101046101ed366004610add565b610635565b610118610200366004610c5d565b6001600160a01b039182165f90815260016020908152604080832093909416825291909152205490565b60606005805461023990610c8e565b80601f016020809104026020016040519081016040528092919081815260200182805461026590610c8e565b80156102b05780601f10610287576101008083540402835291602001916102b0565b820191905f5260205f20905b81548152906001019060200180831161029357829003601f168201915b5050505050905090565b5f336102c781858561068f565b60019150505b92915050565b5f806102e08585856106a1565b9050801561033657836001600160a01b0316856001600160a01b03167f4cd95681b751c91f83e626435fb48875e7d8da94d9cd0e6133c5c5f8e16306f68560405161032d91815260200190565b60405180910390a35b949350505050565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146103bb5760405162461bcd60e51b815260206004820181905260248201527f43616c6c6572206973206e6f742074686520427261696e20636f6e747261637460448201526064015b60405180910390fd5b5f600580546103c990610c8e565b80601f01602080910402602001604051908101604052809291908181526020018280546103f590610c8e565b80156104405780601f1061041757610100808354040283529160200191610440565b820191905f5260205f20905b81548152906001019060200180831161042357829003601f168201915b505050505090505f6006805461045590610c8e565b80601f016020809104026020016040519081016040528092919081815260200182805461048190610c8e565b80156104cc5780601f106104a3576101008083540402835291602001916104cc565b820191905f5260205f20905b8154815290600101906020018083116104af57829003601f168201915b5050505050905083600590816104e29190610d11565b5060066104ef8482610d11565b507f8fa70b8946217587fc701348a508a5a023a68ed13b9363dd0b72017ac2d532c1828583866040516105259493929190610dcc565b60405180910390a150505050565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146105ab5760405162461bcd60e51b815260206004820181905260248201527f43616c6c6572206973206e6f742074686520427261696e20636f6e747261637460448201526064016103b2565b69d3c21bcecceda1000000816105c060025490565b6105ca9190610e23565b11156106185760405162461bcd60e51b815260206004820152601f60248201527f4d696e74696e6720776f756c6420657863656564206d617820737570706c790060448201526064016103b2565b61062282826106c4565b5050565b60606006805461023990610c8e565b5f33816106428585610711565b9050801561033657846001600160a01b0316826001600160a01b03167f4cd95681b751c91f83e626435fb48875e7d8da94d9cd0e6133c5c5f8e16306f68660405161032d91815260200190565b61069c838383600161071e565b505050565b5f336106ae858285610823565b6106b98585856108b1565b506001949350505050565b6001600160a01b038216610706576040517fec442f050000000000000000000000000000000000000000000000000000000081525f60048201526024016103b2565b6106225f838361093c565b5f336102c78185856108b1565b6001600160a01b038416610760576040517fe602df050000000000000000000000000000000000000000000000000000000081525f60048201526024016103b2565b6001600160a01b0383166107a2576040517f94280d620000000000000000000000000000000000000000000000000000000081525f60048201526024016103b2565b6001600160a01b038085165f908152600160209081526040808320938716835292905220829055801561081d57826001600160a01b0316846001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258460405161081491815260200190565b60405180910390a35b50505050565b6001600160a01b038381165f908152600160209081526040808320938616835292905220545f19811461081d57818110156108a3576040517ffb8f41b20000000000000000000000000000000000000000000000000000000081526001600160a01b038416600482015260248101829052604481018390526064016103b2565b61081d84848484035f61071e565b6001600160a01b0383166108f3576040517f96c6fd1e0000000000000000000000000000000000000000000000000000000081525f60048201526024016103b2565b6001600160a01b038216610935576040517fec442f050000000000000000000000000000000000000000000000000000000081525f60048201526024016103b2565b61069c8383835b6001600160a01b038316610966578060025f82825461095b9190610e23565b909155506109ef9050565b6001600160a01b0383165f90815260208190526040902054818110156109d1576040517fe450d38c0000000000000000000000000000000000000000000000000000000081526001600160a01b038516600482015260248101829052604481018390526064016103b2565b6001600160a01b0384165f9081526020819052604090209082900390555b6001600160a01b038216610a0b57600280548290039055610a29565b6001600160a01b0382165f9081526020819052604090208054820190555b816001600160a01b0316836001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef83604051610a6e91815260200190565b60405180910390a3505050565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b602081525f610abb6020830184610a7b565b9392505050565b80356001600160a01b0381168114610ad8575f80fd5b919050565b5f8060408385031215610aee575f80fd5b610af783610ac2565b946020939093013593505050565b5f805f60608486031215610b17575f80fd5b610b2084610ac2565b9250610b2e60208501610ac2565b929592945050506040919091013590565b634e487b7160e01b5f52604160045260245ffd5b5f82601f830112610b62575f80fd5b813567ffffffffffffffff811115610b7c57610b7c610b3f565b604051601f19603f601f19601f8501160116810181811067ffffffffffffffff82111715610bac57610bac610b3f565b604052818152838201602001851015610bc3575f80fd5b816020850160208301375f918101602001919091529392505050565b5f8060408385031215610bf0575f80fd5b823567ffffffffffffffff811115610c06575f80fd5b610c1285828601610b53565b925050602083013567ffffffffffffffff811115610c2e575f80fd5b610c3a85828601610b53565b9150509250929050565b5f60208284031215610c54575f80fd5b610abb82610ac2565b5f8060408385031215610c6e575f80fd5b610c7783610ac2565b9150610c8560208401610ac2565b90509250929050565b600181811c90821680610ca257607f821691505b602082108103610cc057634e487b7160e01b5f52602260045260245ffd5b50919050565b601f82111561069c57805f5260205f20601f840160051c81016020851015610ceb5750805b601f840160051c820191505b81811015610d0a575f8155600101610cf7565b5050505050565b815167ffffffffffffffff811115610d2b57610d2b610b3f565b610d3f81610d398454610c8e565b84610cc6565b6020601f821160018114610d71575f8315610d5a5750848201515b5f19600385901b1c1916600184901b178455610d0a565b5f84815260208120601f198516915b82811015610da05787850151825560209485019460019092019101610d80565b5084821015610dbd57868401515f19600387901b60f8161c191681555b50505050600190811b01905550565b608081525f610dde6080830187610a7b565b8281036020840152610df08187610a7b565b90508281036040840152610e048186610a7b565b90508281036060840152610e188185610a7b565b979650505050505050565b808201808211156102cd57634e487b7160e01b5f52601160045260245ffdfea2646970667358221220f6d581e9095116183a74ecc428ee4283517f54da2c1f2915ad9175ff456a39fb64736f6c634300081a003368747470733a2f2f6f7264696e616c732e636f6d2f636f6e74656e742f663462653739353138656262303238336564333730313262343231353264656463326264666532653761383932363763373434386162333665303262663939636930a26469706673582212203dde49af248f95a4d91adf1bb29765e8dc0a21a81f87619253aa0cd9f73ab6fa64736f6c634300081a0033

Loading...
Loading
Loading...
Loading
[ Download: CSV Export  ]
[ Download: CSV Export  ]

A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.