Contract 0xc38cf9a386c3978bf543ec65524dc700efdd8353 1

 
 
Txn Hash Method
Block
From
To
Value [Txn Fee]
0xe52bd91458d2495f149c257f89bf94759ea95856da51f58e47353354db094100Set Approval For...353675062022-11-08 20:05:0825 days 2 hrs ago0x21031e8de61531a4f99e75f4b1707e6a0b6429af IN  0xc38cf9a386c3978bf543ec65524dc700efdd83530 MATIC0.082653568069 1,769.618431273
0xee1f7dd9f3222466d0a47a670499c0ce8de319e12659945d9e136c3f14988bbcSet Approval For...352604332022-11-06 5:31:3327 days 17 hrs ago0x2314553c0f5a4cf882ddd51e4506443dcea28edd IN  0xc38cf9a386c3978bf543ec65524dc700efdd83530 MATIC0.002253715699 48.165580967
0x28b9d9f74c43b7e7cece0b631c9ccc34dd2101f68c28caa08fde259134cd85ffSet Approval For...334079172022-09-22 2:50:5272 days 19 hrs ago0xb35dc9519f58b3e3df71f266f659ae66dad34a4b IN  0xc38cf9a386c3978bf543ec65524dc700efdd83530 MATIC0.001438467826 30.74240402
0xa884d163c2b0d52cc4f58b2411d9d1770a05ca92c1a4bf8839ed1851aae02f6aSet Approval For...333039852022-09-19 13:37:4175 days 9 hrs ago0x05ddbb545a2fa8dd6a155d21ae413b131b665bf3 IN  0xc38cf9a386c3978bf543ec65524dc700efdd83530 MATIC0.001637685 35.000000002
0x3d3b0a23e43a42f714cf7dbcc62e4baf791903c2e47f90a83b42bad379c20d56Set Approval For...332699522022-09-18 18:00:1876 days 4 hrs ago0xc446569e98466813d4a49cead6d9377215f6e244 IN  0xc38cf9a386c3978bf543ec65524dc700efdd83530 MATIC0.001516104145 32.459891359
0xd0cf6d8937303dd2e8bf5812bdc85cfb5f1bb52a1514538d157f5a67d27bdea2Safe Transfer Fr...331829462022-09-16 15:21:0178 days 7 hrs ago0xc446569e98466813d4a49cead6d9377215f6e244 IN  0xc38cf9a386c3978bf543ec65524dc700efdd83530 MATIC0.002065674566 31.065111158
0x60be5ea386cffb1b0091a4472a7c5de6bafc95896dc4dce6e08526adc2ee357aSet Approval For...327244822022-09-05 14:08:5089 days 8 hrs ago0x70a257a220ee9d6e2a423805673c6780854ad51a IN  0xc38cf9a386c3978bf543ec65524dc700efdd83530 MATIC0.00140373 30.000000012
0x40152a620b08923e43ae7b012b90e5501da8d70192992392c1be940439be21f7Set Approval For...325359002022-09-01 0:52:3093 days 21 hrs ago0xefe320582dec3ac7cf2358b9ba0e27b203d06ec6 IN  0xc38cf9a386c3978bf543ec65524dc700efdd83530 MATIC0.001511010998 32.350846727
0xd9b9d2ace5200d42b111dc17418b38e63edcf26284a137a1bda697a31718ec9dSet Approval For...324799592022-08-30 10:58:1895 days 11 hrs ago0x22cf6d284a72fc0c3642f492a8e23d724630da56 IN  0xc38cf9a386c3978bf543ec65524dc700efdd83530 MATIC0.002478016192 52.959248408
0xcb0b9a80cc69fc1fca9232a4b0f53b2e98abc61ca26a94c819d9d4bc5d7e61b2Safe Transfer Fr...324062652022-08-28 7:59:0797 days 14 hrs ago0x910774d83c91e4bf23eb71462bde525bfa2ae393 IN  0xc38cf9a386c3978bf543ec65524dc700efdd83530 MATIC0.001547416716 31.327395829
0x8fc4e3c6ef649c3cb7ae2959873f0bcd883622d8b53339ae7c6b1a1da5f33fc3Safe Transfer Fr...324062462022-08-28 7:57:5197 days 14 hrs ago0x910774d83c91e4bf23eb71462bde525bfa2ae393 IN  0xc38cf9a386c3978bf543ec65524dc700efdd83530 MATIC0.002037034116 30.634395317
0xf6b3bc82f457b7c7b08fc06b613570f041eb4883537ee7d8a88379304925b5d8Set Approval For...321395392022-08-21 5:17:26104 days 17 hrs ago0x5367b9261facf96b2679a974a62c4103a619bd87 IN  0xc38cf9a386c3978bf543ec65524dc700efdd83530 MATIC0.001584923469 33.872400014
0x0d265f72d7dcb0965a0f21e0315487a2a93008cf082c1390531449d1a289ce62Set Approval For...320726742022-08-19 13:13:28106 days 9 hrs ago0x0bbec62e7cf25738c3651f7f25fd41af4f841dae IN  0xc38cf9a386c3978bf543ec65524dc700efdd83530 MATIC0.001405208581 30.031599696
0xcbf61888d4fd1cca0e62aa5fdbb629c9df0426f2d2854d03341dae070412cd9bSafe Transfer Fr...317155352022-08-10 1:20:23115 days 21 hrs ago0x6687c671980e65ebd722b9146fc61e2471558dd6 IN  0xc38cf9a386c3978bf543ec65524dc700efdd83530 MATIC0.00339063351
0x5e44df7ba2efd1cf0202be95bdc298279a148e2a8acac50561d182a313542170Safe Transfer Fr...317152642022-08-10 1:11:04115 days 21 hrs ago0x6687c671980e65ebd722b9146fc61e2471558dd6 IN  0xc38cf9a386c3978bf543ec65524dc700efdd83530 MATIC0.00445436167
0x0b7ebec88e76bcea1e9542329c78e11cf2adbe387e6eae37c9c91a0a8db6bb42Set Approval For...312043482022-07-27 17:05:25129 days 5 hrs ago0xa83ed00ecc86aa9cbbb3fe066c967894d575dec8 IN  0xc38cf9a386c3978bf543ec65524dc700efdd83530 MATIC0.003113566275 66.541990463
0xe31b52dcac0cf445ad105d5c88cc5745926c9322225aacf122a4e33d6c25a796Safe Transfer Fr...309171852022-07-20 0:54:03136 days 21 hrs ago0xfac6b91421ebe1cc176cd50b8458de833fe1720e IN  0xc38cf9a386c3978bf543ec65524dc700efdd83530 MATIC0.002337341806 35.150640003
0x8417a96a2553e47635158bf4717e6561ca87f72c37d24e20f4e057174ac34d48Safe Transfer Fr...308459712022-07-18 3:20:25138 days 19 hrs ago0xefe320582dec3ac7cf2358b9ba0e27b203d06ec6 IN  0xc38cf9a386c3978bf543ec65524dc700efdd83530 MATIC0.001530873 31
0xbb4d98f3cfa143b4e52946c2d4faa645969f9d36b8afe1416ed41a0668ab9b8eSafe Transfer Fr...308452062022-07-18 2:51:58138 days 19 hrs ago0xefe320582dec3ac7cf2358b9ba0e27b203d06ec6 IN  0xc38cf9a386c3978bf543ec65524dc700efdd83530 MATIC0.001530873 31
0xaacb8ab8d4bc2e61a73f3d47f34270858a3c3e9a78ef5353216441cbb7d6c98cSafe Transfer Fr...308451732022-07-18 2:50:28138 days 19 hrs ago0xefe320582dec3ac7cf2358b9ba0e27b203d06ec6 IN  0xc38cf9a386c3978bf543ec65524dc700efdd83530 MATIC0.001530873 31
0xd2ddf6c175af62fad1cc3f040e1ebbc0dc6c2200ad7cc14f1a41f6f585998269Safe Transfer Fr...308451602022-07-18 2:49:36138 days 19 hrs ago0xefe320582dec3ac7cf2358b9ba0e27b203d06ec6 IN  0xc38cf9a386c3978bf543ec65524dc700efdd83530 MATIC0.001530873 31
0x919f229574431d3f6579f9b424becc40a8108aa546025ddd2c8a9970deaa2568Safe Transfer Fr...308451492022-07-18 2:48:52138 days 19 hrs ago0xefe320582dec3ac7cf2358b9ba0e27b203d06ec6 IN  0xc38cf9a386c3978bf543ec65524dc700efdd83530 MATIC0.001530873 31
0x129d33624bf1c6fc97c5f0a9173a15209ce32d2d8a6e34ee3c8af64c8dd5e9f2Safe Transfer Fr...308451102022-07-18 2:46:30138 days 19 hrs ago0xefe320582dec3ac7cf2358b9ba0e27b203d06ec6 IN  0xc38cf9a386c3978bf543ec65524dc700efdd83530 MATIC0.001530873 31
0xfbf271d4cc458f72ff116f7d9ed376502da9654037db409346c044c7c660e12aSafe Transfer Fr...308450832022-07-18 2:45:36138 days 19 hrs ago0xefe320582dec3ac7cf2358b9ba0e27b203d06ec6 IN  0xc38cf9a386c3978bf543ec65524dc700efdd83530 MATIC0.001530873 31
0x7eb7bd7c75d23876b2ebc5653a4312bf6248f279df02a2a0bbd959597f23ef6cSafe Transfer Fr...308450702022-07-18 2:45:10138 days 19 hrs ago0xefe320582dec3ac7cf2358b9ba0e27b203d06ec6 IN  0xc38cf9a386c3978bf543ec65524dc700efdd83530 MATIC0.001530873 31
[ Download CSV Export 
Parent Txn Hash Block From To Value
Loading
This contract may be a proxy contract. Click on More Options and select Is this a proxy? to confirm and enable the "Read as Proxy" & "Write as Proxy" tabs.

Contract Source Code Verified (Exact Match)

Contract Name:
PBToken

Compiler Version
v0.8.11+commit.d7f03943

Optimization Enabled:
No with 200 runs

Other Settings:
default evmVersion
File 1 of 20 : PBToken.sol
//SPDX-License-Identifier: Unlicense
pragma solidity ^0.8.11;

import "./HasSecondarySaleFees_v1.sol";
import "./ContextMixin.sol";

import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/interfaces/IERC2981.sol";

import "./Interface/IPBToken.sol";
import "./Interface/IPBProject.sol";

contract PBToken is
    IPBToken,
    ERC721,
    ERC721Burnable,
    Ownable,
    HasSecondarySaleFeesV1,
    ContextMixin
{
    using SafeMath for uint256;

    constructor() ERC721("PBToken", "PB") {}

    mapping(uint256 => Metadata) private idToMetadata;
    mapping(uint256 => string) private libraries;

    address projectAddress;
    string pbScript1;
    string pbScript2;

    function mint(MintData memory mintData) external override senderIsProject {
        uint256 id = mintData.projectId.mul(100000).add(mintData.minted);
        require(bytes(idToMetadata[id].scriptHash).length == 0);

        idToMetadata[id] = Metadata(
            mintData.projectId,
            mintData.dependencyId,
            mintData.scriptHash,
            mintData.url
        );

        _safeMint(mintData.collector, id);
        _setRoyaltiesOf(id, payable(mintData.artist), mintData.royalty);

        emit Minted(mintData.projectId, id, mintData.collector, mintData.price);
    }

    function tokenURI(uint256 tokenId)
        public
        view
        override(ERC721)
        returns (string memory)
    {
        require(_exists(tokenId), "ERC721Metadata: nonexistent token");
        return idToMetadata[tokenId].url;
    }

    function metadata(uint256 tokenId) public view returns (Metadata memory) {
        require(_exists(tokenId), "ERC721Metadata: nonexistent token");
        return idToMetadata[tokenId];
    }

    function projectName(uint256 tokenId)
        external
        view
        returns (string memory)
    {
        require(_exists(tokenId), "ERC721Metadata: nonexistent token");
        return
            IPBProject(projectAddress)
                .getProject(metadata(tokenId).projectId)
                .name;
    }

    function artist(uint256 tokenId) external view returns (address) {
        require(_exists(tokenId), "ERC721Metadata: nonexistent token");
        return
            IPBProject(projectAddress)
                .getProject(metadata(tokenId).projectId)
                .artist;
    }

    function description(uint256 tokenId)
        external
        view
        returns (string memory)
    {
        require(_exists(tokenId), "ERC721Metadata: nonexistent token");
        return
            IPBProject(projectAddress)
                .getProject(metadata(tokenId).projectId)
                .description;
    }

    function externalLibrary(uint256 tokenId)
        public
        view
        returns (string memory)
    {
        require(_exists(tokenId), "ERC721Metadata: nonexistent token");
        return libraries[metadata(tokenId).dependencyId];
    }

    function script(uint256 tokenId) external view returns (string memory) {
        require(_exists(tokenId), "ERC721Metadata: nonexistent token");
        Metadata memory data = metadata(tokenId);
        string memory mainScript = IPBProject(projectAddress).getScript(
            data.projectId
        );
        require(bytes(mainScript).length != 0, "Missing script");

        return
            string(
                abi.encodePacked(
                    string(abi.encodePacked("// ", externalLibrary(tokenId), "\n")),
                    pbScript1,
                    data.scriptHash,
                    pbScript2,
                    mainScript
                )
            );
    }

    function setProjectAddress(address addr) external onlyOwner {
        projectAddress = addr;
    }

    function withdraw() external override onlyOwner {
        Address.sendValue(payable(owner()), address(this).balance);
    }

    function setScriptComponent(string memory part, string memory component)
        external
        onlyOwner
    {
        bytes32 encoded = keccak256(bytes(part));
        if (encoded == keccak256(bytes("pbScript1"))) {
            pbScript1 = component;
        } else if (encoded == keccak256(bytes("pbScript2"))) {
            pbScript2 = component;
        }
    }

    function setLibrary(uint256 dependencyId, string memory lib)
        external
        onlyOwner
    {
        libraries[dependencyId] = lib;
    }

    function setTokenURIs(uint256[] memory ids, string[] memory uris)
        external
        onlyOwner
    {
        for (uint256 i = 0; i < ids.length; i++) {
            idToMetadata[ids[i]].url = uris[i];
        }
    }

    function isApprovedForAll(address _owner, address _operator)
        public
        view
        override(ERC721)
        returns (bool isOperator)
    {
        // if OpenSea's ERC721 Proxy Address is detected, auto-return true
        if (_operator == address(0x58807baD0B376efc12F5AD86aAc70E78ed67deaE)) {
            return true;
        }

        // otherwise, use the default ERC721.isApprovedForAll()
        return ERC721.isApprovedForAll(_owner, _operator);
    }

    function supportsInterface(bytes4 interfaceId)
        public
        view
        virtual
        override(IERC165, ERC721, HasSecondarySaleFeesV1)
        returns (bool)
    {
        return
            interfaceId == type(IERC2981).interfaceId ||
            ERC721.supportsInterface(interfaceId) ||
            HasSecondarySaleFeesV1.supportsInterface(interfaceId) ||
            interfaceId == type(IPBToken).interfaceId;
    }

    function _msgSender() internal view override returns (address sender) {
        return ContextMixin.msgSender();
    }

    modifier senderIsProject() {
        require(projectAddress == msg.sender, "invalid sender");
        _;
    }
}

File 2 of 20 : HasSecondarySaleFees_v1.sol
// SPDX-License-Identifier: MIT
// this is copied from chocomintapp/chocofactory
// https://github.com/chocomintapp/chocofactory/blob/main/packages/contracts/contracts/extentions/HasSecondarySaleFees.sol

pragma solidity ^0.8.11;

import "@openzeppelin/contracts/utils/introspection/ERC165.sol";
import "./Interface/IHasSecondarySaleFees_v1.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";

contract HasSecondarySaleFeesV1 is IERC165, IHasSecondarySaleFeesV1 {
    using SafeMath for uint256;

    event ChangeRoyalty(
        uint256 id,
        address payable royaltyAddress,
        uint256 royaltiesWithTwoDecimal
    );

    struct RoyaltyInfo {
        bool isPresent;
        address payable royaltyAddress;
        uint256 royaltiesWithTwoDecimal;
    }

    mapping(bytes32 => RoyaltyInfo) royaltyInfoMap;
    mapping(uint256 => bytes32) tokenRoyaltyMap;

    constructor() {}

    function _setRoyaltiesOf(
        uint256 _tokenId,
        address payable _royaltyAddress,
        uint256 _royaltiesWithTwoDecimal
    ) internal {
        bytes32 key = 0x0;
        require(_royaltyAddress != address(0), "Must not be zero-address");
        key = keccak256(
            abi.encodePacked(key, _royaltyAddress, _royaltiesWithTwoDecimal)
        );

        tokenRoyaltyMap[_tokenId] = key;
        emit ChangeRoyalty(
            _tokenId,
            _royaltyAddress,
            _royaltiesWithTwoDecimal
        );

        if (royaltyInfoMap[key].isPresent) {
            return;
        }
        royaltyInfoMap[key] = RoyaltyInfo(
            true,
            _royaltyAddress,
            _royaltiesWithTwoDecimal
        );
    }

    function getFeeRecipients(uint256 _tokenId)
        public
        view
        returns (address payable[] memory)
    {
        RoyaltyInfo memory info = royaltyInfoMap[tokenRoyaltyMap[_tokenId]];

        address payable[] memory recipients = new address payable[](1);
        recipients[0] = info.royaltyAddress;

        return recipients;
    }

    function getFeeBps(uint256 _tokenId)
        public
        view
        returns (uint256[] memory)
    {
        RoyaltyInfo memory info = royaltyInfoMap[tokenRoyaltyMap[_tokenId]];

        uint256[] memory fees = new uint256[](1);
        fees[0] = info.royaltiesWithTwoDecimal;

        return fees;
    }

    function royaltyInfo(uint256 tokenId, uint256 salePrice)
        external
        view
        returns (address receiver, uint256 royaltyAmount)
    {
        uint256[] memory fees = getFeeBps(tokenId);
        address payable[] memory addrs = getFeeRecipients(tokenId);

        receiver = addrs[0];
        royaltyAmount = fees[0].mul(salePrice).div(10000);
    }

    function supportsInterface(bytes4 interfaceId)
        public
        view
        virtual
        override(IERC165)
        returns (bool)
    {
        return interfaceId == type(IHasSecondarySaleFeesV1).interfaceId;
    }
}

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

/**
 * https://github.com/maticnetwork/pos-portal/blob/master/contracts/common/ContextMixin.sol
 * https://docs.opensea.io/docs/polygon-basic-integration
 */
abstract contract ContextMixin {
    function msgSender()
        internal
        view
        returns (address payable sender)
    {
        if (msg.sender == address(this)) {
            bytes memory array = msg.data;
            uint256 index = msg.data.length;
            assembly {
                // Load the 32 bytes word from memory with the address on the lower 20 bytes, and mask those.
                sender := and(
                    mload(add(array, index)),
                    0xffffffffffffffffffffffffffffffffffffffff
                )
            }
        } else {
            sender = payable(msg.sender);
        }
        return sender;
    }
}

File 4 of 20 : ERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (token/ERC721/ERC721.sol)

pragma solidity ^0.8.0;

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

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

    // Token name
    string private _name;

    // Token symbol
    string private _symbol;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        _approve(to, tokenId);
    }

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

        return _tokenApprovals[tokenId];
    }

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

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

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

        _transfer(from, to, tokenId);
    }

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

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

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients
     * are aware of the ERC721 protocol to prevent tokens from being forever locked.
     *
     * `_data` is additional data, it has no specified format and it is sent in call to `to`.
     *
     * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g.
     * implement alternative mechanisms to perform token transfer, such as signature-based.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function _safeTransfer(
        address from,
        address to,
        uint256 tokenId,
        bytes memory _data
    ) internal virtual {
        _transfer(from, to, tokenId);
        require(_checkOnERC721Received(from, to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer");
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        _beforeTokenTransfer(from, to, tokenId);

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

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

        emit Transfer(from, to, tokenId);
    }

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

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

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

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

File 5 of 20 : ERC721Burnable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (token/ERC721/extensions/ERC721Burnable.sol)

pragma solidity ^0.8.0;

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

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

File 6 of 20 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (access/Ownable.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

File 7 of 20 : SafeMath.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.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 substraction of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b > a) return (false, 0);
            return (true, a - b);
        }
    }

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

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

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

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

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

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

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

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

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

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

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

File 8 of 20 : IERC2981.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (interfaces/IERC2981.sol)

pragma solidity ^0.8.0;

import "./IERC165.sol";

/**
 * @dev Interface for the NFT Royalty Standard
 */
interface IERC2981 is IERC165 {
    /**
     * @dev Called with the sale price to determine how much royalty is owed and to whom.
     * @param tokenId - the NFT asset queried for royalty information
     * @param salePrice - the sale price of the NFT asset specified by `tokenId`
     * @return receiver - address of who should be sent the royalty payment
     * @return royaltyAmount - the royalty payment amount for `salePrice`
     */
    function royaltyInfo(uint256 tokenId, uint256 salePrice)
        external
        view
        returns (address receiver, uint256 royaltyAmount);
}

File 9 of 20 : IPBToken.sol
//SPDX-License-Identifier: Unlicense
pragma solidity ^0.8.11;

import "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import "@openzeppelin/contracts/utils/introspection/IERC165.sol";

interface IPBToken is IERC165 {
    event Minted(
        uint256 indexed projectId,
        uint256 indexed tokenId,
        address indexed minter,
        uint256 price
    );

    event ScriptSet(uint256 indexed projectId);

    struct Metadata {
        uint256 projectId;
        uint256 dependencyId;
        string scriptHash;
        string url;
    }

    struct MintData {
        uint256 projectId;
        address artist;
        address collector;
        uint256 royalty;
        string url;
        string scriptHash;
        uint256 dependencyId;
        uint256 price;
        uint256 minted;
    }

    function mint(MintData memory MintData) external;

    function metadata(uint256 tokenId) external view returns (Metadata memory);

    function withdraw() external;

    function projectName(uint256 tokenId) external view returns (string memory);

    function artist(uint256 tokenId) external view returns (address);

    function description(uint256 tokenId) external view returns (string memory);

    function externalLibrary(uint256 tokenId) external view returns (string memory);

    function script(uint256 tokenId) external view returns (string memory);

}

File 10 of 20 : IPBProject.sol
//SPDX-License-Identifier: Unlicense
pragma solidity ^0.8.11;
pragma experimental ABIEncoderV2;

interface IPBProject {
    struct Project {
        uint256 id;
        address artist;
        string name;
        string description;
        string metadata;
        uint256 dependencyId;
        uint256 originalTotalSupply;
        uint256 totalSupply;
        uint256 price;
        uint256 royalty;
        bool onsale;
        uint256 minted;
    }

    struct Offer {
        address seller;
        uint256 price;
    }

    event MadeOffer(
        uint256 indexed tokenId,
        address indexed seller,
        uint256 value
    );
    event CancelledOffer(uint256 indexed tokenId, address indexed seller);
    event Sold(
        uint256 indexed tokenId,
        address seller,
        address indexed buyer,
        uint256 value
    );
    event ProjectAdded(uint256 indexed id, address indexed artist);
    event ProjectBurned(uint256 indexed id);
    event ScriptSet(uint256 indexed id);
    event DescriptionSet(uint256 indexed id);

    event SalesStatusChanged(
        uint256 indexed id,
        uint256 price,
        uint256 royalty,
        uint256 totalSupply,
        bool onsale
    );

    function withdraw() external;

    function getProject(uint256 id)
        external
        view
        returns (Project memory project);

    function addProject(
        string memory name,
        string memory description,
        string memory metadata,
        uint256 dependencyId,
        uint256 totalSupply,
        uint256 price,
        uint256 royalty,
        bool onsale,
        bytes memory signature
    ) external;

    function burnProject(uint256 id) external;

    function setSaleStatus(
        uint256 id,
        uint256 price,
        uint256 royalty,
        uint256 totalSupply,
        bool onsale
    ) external;

    function mintToken(
        uint256 id,
        string memory url,
        string memory scriptHash,
        bytes memory signature
    ) external payable;

    function acceptOffer(uint256 tokenId) external payable;

    function makeOffer(uint256 tokenId, uint256 price) external;

    function getOffer(uint256 tokenId) external view returns (uint256);

    function getScript(uint256 id) external view returns (string memory);

    function setScript(
        uint256 id,
        string memory script,
        bytes memory signature
    ) external;

    function isFrozen(uint256 id) external returns (bool);
}

File 11 of 20 : ERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (utils/introspection/ERC165.sol)

pragma solidity ^0.8.0;

import "./IERC165.sol";

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

File 12 of 20 : IHasSecondarySaleFees_v1.sol
// SPDX-License-Identifier: MIT
// this is copied from chocomintapp/chocofactory
// https://github.com/chocomintapp/chocofactory/blob/main/packages/contracts/contracts/extentions/HasSecondarySaleFees.sol
pragma solidity ^0.8.11;

import "@openzeppelin/contracts/interfaces/IERC2981.sol";

interface IHasSecondarySaleFeesV1 is IERC2981 {
    function getFeeBps(uint256 id) external view returns (uint256[] memory);

    function getFeeRecipients(uint256 id) external view returns (address payable[] memory);
}

File 13 of 20 : IERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (utils/introspection/IERC165.sol)

pragma solidity ^0.8.0;

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

File 14 of 20 : IERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (interfaces/IERC165.sol)

pragma solidity ^0.8.0;

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

File 15 of 20 : IERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (token/ERC721/IERC721.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

    /**
     * @dev Transfers `tokenId` token from `from` to `to`.
     *
     * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(
        address from,
        address to,
        uint256 tokenId
    ) external;

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

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

    /**
     * @dev Approve or remove `operator` as an operator for the caller.
     * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.
     *
     * Requirements:
     *
     * - The `operator` cannot be the caller.
     *
     * Emits an {ApprovalForAll} event.
     */
    function setApprovalForAll(address operator, bool _approved) external;

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

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

File 16 of 20 : IERC721Receiver.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (token/ERC721/IERC721Receiver.sol)

pragma solidity ^0.8.0;

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

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

pragma solidity ^0.8.0;

import "../IERC721.sol";

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

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

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

File 18 of 20 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (utils/Address.sol)

pragma solidity ^0.8.0;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize, which returns 0 for contracts in
        // construction, since the code is only stored at the end of the
        // constructor execution.

        uint256 size;
        assembly {
            size := extcodesize(account)
        }
        return size > 0;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

File 19 of 20 : Context.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (utils/Context.sol)

pragma solidity ^0.8.0;

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

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

File 20 of 20 : Strings.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (utils/Strings.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

Contract Security Audit

Contract ABI

[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":false,"internalType":"address payable","name":"royaltyAddress","type":"address"},{"indexed":false,"internalType":"uint256","name":"royaltiesWithTwoDecimal","type":"uint256"}],"name":"ChangeRoyalty","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"projectId","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":true,"internalType":"address","name":"minter","type":"address"},{"indexed":false,"internalType":"uint256","name":"price","type":"uint256"}],"name":"Minted","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":"uint256","name":"projectId","type":"uint256"}],"name":"ScriptSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"artist","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","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":"tokenId","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"description","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"externalLibrary","outputs":[{"internalType":"string","name":"","type":"string"}],"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":"getFeeBps","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"getFeeRecipients","outputs":[{"internalType":"address payable[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"address","name":"_operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"isOperator","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"metadata","outputs":[{"components":[{"internalType":"uint256","name":"projectId","type":"uint256"},{"internalType":"uint256","name":"dependencyId","type":"uint256"},{"internalType":"string","name":"scriptHash","type":"string"},{"internalType":"string","name":"url","type":"string"}],"internalType":"struct IPBToken.Metadata","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"uint256","name":"projectId","type":"uint256"},{"internalType":"address","name":"artist","type":"address"},{"internalType":"address","name":"collector","type":"address"},{"internalType":"uint256","name":"royalty","type":"uint256"},{"internalType":"string","name":"url","type":"string"},{"internalType":"string","name":"scriptHash","type":"string"},{"internalType":"uint256","name":"dependencyId","type":"uint256"},{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"uint256","name":"minted","type":"uint256"}],"internalType":"struct IPBToken.MintData","name":"mintData","type":"tuple"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"projectName","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"salePrice","type":"uint256"}],"name":"royaltyInfo","outputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint256","name":"royaltyAmount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"script","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"dependencyId","type":"uint256"},{"internalType":"string","name":"lib","type":"string"}],"name":"setLibrary","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"setProjectAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"part","type":"string"},{"internalType":"string","name":"component","type":"string"}],"name":"setScriptComponent","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"internalType":"string[]","name":"uris","type":"string[]"}],"name":"setTokenURIs","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60806040523480156200001157600080fd5b506040518060400160405280600781526020017f5042546f6b656e000000000000000000000000000000000000000000000000008152506040518060400160405280600281526020017f50420000000000000000000000000000000000000000000000000000000000008152508160009080519060200190620000969291906200026d565b508060019080519060200190620000af9291906200026d565b505050620000d2620000c6620000d860201b60201c565b620000f460201b60201c565b62000382565b6000620000ef620001ba60201b620020a21760201c565b905090565b6000600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600660006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b60003073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614156200026657600080368080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509050600080369050905073ffffffffffffffffffffffffffffffffffffffff8183015116925050506200026a565b3390505b90565b8280546200027b906200034c565b90600052602060002090601f0160209004810192826200029f5760008555620002eb565b82601f10620002ba57805160ff1916838001178555620002eb565b82800160010185558215620002eb579182015b82811115620002ea578251825591602001919060010190620002cd565b5b509050620002fa9190620002fe565b5090565b5b8082111562000319576000816000905550600101620002ff565b5090565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600060028204905060018216806200036557607f821691505b602082108114156200037c576200037b6200031d565b5b50919050565b61560680620003926000396000f3fe608060405234801561001057600080fd5b50600436106101f05760003560e01c80638da5cb5b1161010f578063c569bd95116100a2578063e985e9c511610071578063e985e9c5146105ec578063f283f39b1461061c578063f2fde38b1461064c578063fce0f92814610668576101f0565b8063c569bd9514610540578063c87b56dd14610570578063db3e4c84146105a0578063e3684e39146105bc576101f0565b8063a828477c116100de578063a828477c146104a8578063b88d4fde146104d8578063b9c4d9fb146104f4578063bf9197b414610524576101f0565b80638da5cb5b1461043457806395d89b4114610452578063a22cb46514610470578063a6376f651461048c576101f0565b80632d270fa1116101875780634b1b7b84116101565780634b1b7b841461039a5780636352211e146103ca57806370a08231146103fa578063715018a61461042a576101f0565b80632d270fa11461033c5780633ccfd60b1461035857806342842e0e1461036257806342966c681461037e576101f0565b80630ebd4c7f116101c35780630ebd4c7f1461028f57806323b872dd146102bf5780632a55205a146102db5780632c5f13e01461030c576101f0565b806301ffc9a7146101f557806306fdde0314610225578063081812fc14610243578063095ea7b314610273575b600080fd5b61020f600480360381019061020a91906133e8565b610684565b60405161021c9190613430565b60405180910390f35b61022d610776565b60405161023a91906134e4565b60405180910390f35b61025d6004803603810190610258919061353c565b610808565b60405161026a91906135aa565b60405180910390f35b61028d600480360381019061028891906135f1565b61088d565b005b6102a960048036038101906102a4919061353c565b6109a5565b6040516102b691906136ef565b60405180910390f35b6102d960048036038101906102d49190613711565b610ad4565b005b6102f560048036038101906102f09190613764565b610b34565b6040516103039291906137b3565b60405180910390f35b6103266004803603810190610321919061353c565b610bbc565b60405161033391906134e4565b60405180910390f35b61035660048036038101906103519190613911565b610cbe565b005b610360610e08565b005b61037c60048036038101906103779190613711565b610e97565b005b6103986004803603810190610393919061353c565b610eb7565b005b6103b460048036038101906103af919061353c565b610f13565b6040516103c191906135aa565b60405180910390f35b6103e460048036038101906103df919061353c565b611015565b6040516103f191906135aa565b60405180910390f35b610414600480360381019061040f9190613989565b6110c7565b60405161042191906139b6565b60405180910390f35b61043261117f565b005b61043c611207565b60405161044991906135aa565b60405180910390f35b61045a611231565b60405161046791906134e4565b60405180910390f35b61048a600480360381019061048591906139fd565b6112c3565b005b6104a660048036038101906104a19190613b5f565b6112d9565b005b6104c260048036038101906104bd919061353c565b6114e3565b6040516104cf91906134e4565b60405180910390f35b6104f260048036038101906104ed9190613c49565b6115e5565b005b61050e6004803603810190610509919061353c565b611647565b60405161051b9190613d9c565b60405180910390f35b61053e60048036038101906105399190613dbe565b6117a4565b005b61055a6004803603810190610555919061353c565b61184c565b60405161056791906134e4565b60405180910390f35b61058a6004803603810190610585919061353c565b6119ef565b60405161059791906134e4565b60405180910390f35b6105ba60048036038101906105b59190613fc3565b611adf565b005b6105d660048036038101906105d1919061353c565b611bde565b6040516105e391906140ef565b60405180910390f35b61060660048036038101906106019190614111565b611d8b565b6040516106139190613430565b60405180910390f35b6106366004803603810190610631919061353c565b611df1565b60405161064391906134e4565b60405180910390f35b61066660048036038101906106619190613989565b611eea565b005b610682600480360381019061067d9190613989565b611fe2565b005b60007f2a55205a000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806106f757506106f682612153565b5b80610707575061070682612235565b5b8061076f57507f81169641000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b9050919050565b60606000805461078590614180565b80601f01602080910402602001604051908101604052809291908181526020018280546107b190614180565b80156107fe5780601f106107d3576101008083540402835291602001916107fe565b820191906000526020600020905b8154815290600101906020018083116107e157829003601f168201915b5050505050905090565b60006108138261229f565b610852576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161084990614224565b60405180910390fd5b6004600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b600061089882611015565b90508073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610909576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610900906142b6565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff1661092861230b565b73ffffffffffffffffffffffffffffffffffffffff16148061095757506109568161095161230b565b611d8b565b5b610996576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161098d90614348565b60405180910390fd5b6109a0838361231a565b505050565b6060600060076000600860008681526020019081526020016000205481526020019081526020016000206040518060600160405290816000820160009054906101000a900460ff161515151581526020016000820160019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200160018201548152505090506000600167ffffffffffffffff811115610a7457610a736137e6565b5b604051908082528060200260200182016040528015610aa25781602001602082028036833780820191505090505b509050816040015181600081518110610abe57610abd614368565b5b6020026020010181815250508092505050919050565b610ae5610adf61230b565b826123d3565b610b24576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b1b90614409565b60405180910390fd5b610b2f8383836124b1565b505050565b6000806000610b42856109a5565b90506000610b4f86611647565b905080600081518110610b6557610b64614368565b5b60200260200101519350610bb1612710610ba38785600081518110610b8d57610b8c614368565b5b602002602001015161270d90919063ffffffff16565b61272390919063ffffffff16565b925050509250929050565b6060610bc78261229f565b610c06576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610bfd9061449b565b60405180910390fd5b600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f0f3f2c8610c4d84611bde565b600001516040518263ffffffff1660e01b8152600401610c6d91906139b6565b600060405180830381865afa158015610c8a573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f82011682018060405250810190610cb391906146e0565b606001519050919050565b610cc661230b565b73ffffffffffffffffffffffffffffffffffffffff16610ce4611207565b73ffffffffffffffffffffffffffffffffffffffff1614610d3a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d3190614775565b60405180910390fd5b6000828051906020012090506040518060400160405280600981526020017f706253637269707431000000000000000000000000000000000000000000000081525080519060200120811415610da65781600c9080519060200190610da09291906132b1565b50610e03565b6040518060400160405280600981526020017f706253637269707432000000000000000000000000000000000000000000000081525080519060200120811415610e025781600d9080519060200190610e009291906132b1565b505b5b505050565b610e1061230b565b73ffffffffffffffffffffffffffffffffffffffff16610e2e611207565b73ffffffffffffffffffffffffffffffffffffffff1614610e84576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e7b90614775565b60405180910390fd5b610e95610e8f611207565b47612739565b565b610eb2838383604051806020016040528060008152506115e5565b505050565b610ec8610ec261230b565b826123d3565b610f07576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610efe90614807565b60405180910390fd5b610f108161282d565b50565b6000610f1e8261229f565b610f5d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f549061449b565b60405180910390fd5b600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f0f3f2c8610fa484611bde565b600001516040518263ffffffff1660e01b8152600401610fc491906139b6565b600060405180830381865afa158015610fe1573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f8201168201806040525081019061100a91906146e0565b602001519050919050565b6000806002600084815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156110be576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110b590614899565b60405180910390fd5b80915050919050565b60008073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611138576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161112f9061492b565b60405180910390fd5b600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b61118761230b565b73ffffffffffffffffffffffffffffffffffffffff166111a5611207565b73ffffffffffffffffffffffffffffffffffffffff16146111fb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111f290614775565b60405180910390fd5b611205600061293e565b565b6000600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606001805461124090614180565b80601f016020809104026020016040519081016040528092919081815260200182805461126c90614180565b80156112b95780601f1061128e576101008083540402835291602001916112b9565b820191906000526020600020905b81548152906001019060200180831161129c57829003601f168201915b5050505050905090565b6112d56112ce61230b565b8383612a04565b5050565b3373ffffffffffffffffffffffffffffffffffffffff16600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611369576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161136090614997565b60405180910390fd5b600061139c82610100015161138e620186a0856000015161270d90919063ffffffff16565b612b7190919063ffffffff16565b905060006009600083815260200190815260200160002060020180546113c190614180565b9050146113cd57600080fd5b6040518060800160405280836000015181526020018360c0015181526020018360a001518152602001836080015181525060096000838152602001908152602001600020600082015181600001556020820151816001015560408201518160020190805190602001906114419291906132b1565b50606082015181600301908051906020019061145e9291906132b1565b50905050611470826040015182612b87565b6114838183602001518460600151612ba5565b816040015173ffffffffffffffffffffffffffffffffffffffff168183600001517fd8b8d2d3ace608730456d04af4e0923470195af40bf23302e9291aeb64c6f67e8560e001516040516114d791906139b6565b60405180910390a45050565b60606114ee8261229f565b61152d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016115249061449b565b60405180910390fd5b600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f0f3f2c861157484611bde565b600001516040518263ffffffff1660e01b815260040161159491906139b6565b600060405180830381865afa1580156115b1573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f820116820180604052508101906115da91906146e0565b604001519050919050565b6115f66115f061230b565b836123d3565b611635576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161162c90614409565b60405180910390fd5b61164184848484612d8e565b50505050565b6060600060076000600860008681526020019081526020016000205481526020019081526020016000206040518060600160405290816000820160009054906101000a900460ff161515151581526020016000820160019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200160018201548152505090506000600167ffffffffffffffff811115611716576117156137e6565b5b6040519080825280602002602001820160405280156117445781602001602082028036833780820191505090505b5090508160200151816000815181106117605761175f614368565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250508092505050919050565b6117ac61230b565b73ffffffffffffffffffffffffffffffffffffffff166117ca611207565b73ffffffffffffffffffffffffffffffffffffffff1614611820576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161181790614775565b60405180910390fd5b80600a600084815260200190815260200160002090805190602001906118479291906132b1565b505050565b60606118578261229f565b611896576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161188d9061449b565b60405180910390fd5b60006118a183611bde565b90506000600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ea146e5183600001516040518263ffffffff1660e01b815260040161190491906139b6565b600060405180830381865afa158015611921573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f8201168201806040525081019061194a91906149b7565b9050600081511415611991576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161198890614a4c565b60405180910390fd5b61199a84611df1565b6040516020016119aa9190614b40565b604051602081830303815290604052600c8360400151600d846040516020016119d7959493929190614c01565b60405160208183030381529060405292505050919050565b60606119fa8261229f565b611a39576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a309061449b565b60405180910390fd5b600960008381526020019081526020016000206003018054611a5a90614180565b80601f0160208091040260200160405190810160405280929190818152602001828054611a8690614180565b8015611ad35780601f10611aa857610100808354040283529160200191611ad3565b820191906000526020600020905b815481529060010190602001808311611ab657829003601f168201915b50505050509050919050565b611ae761230b565b73ffffffffffffffffffffffffffffffffffffffff16611b05611207565b73ffffffffffffffffffffffffffffffffffffffff1614611b5b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b5290614775565b60405180910390fd5b60005b8251811015611bd957818181518110611b7a57611b79614368565b5b602002602001015160096000858481518110611b9957611b98614368565b5b602002602001015181526020019081526020016000206003019080519060200190611bc59291906132b1565b508080611bd190614c7b565b915050611b5e565b505050565b611be6613337565b611bef8261229f565b611c2e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c259061449b565b60405180910390fd5b600960008381526020019081526020016000206040518060800160405290816000820154815260200160018201548152602001600282018054611c7090614180565b80601f0160208091040260200160405190810160405280929190818152602001828054611c9c90614180565b8015611ce95780601f10611cbe57610100808354040283529160200191611ce9565b820191906000526020600020905b815481529060010190602001808311611ccc57829003601f168201915b50505050508152602001600382018054611d0290614180565b80601f0160208091040260200160405190810160405280929190818152602001828054611d2e90614180565b8015611d7b5780601f10611d5057610100808354040283529160200191611d7b565b820191906000526020600020905b815481529060010190602001808311611d5e57829003601f168201915b5050505050815250509050919050565b60007358807bad0b376efc12f5ad86aac70e78ed67deae73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611dde5760019050611deb565b611de88383612dea565b90505b92915050565b6060611dfc8261229f565b611e3b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611e329061449b565b60405180910390fd5b600a6000611e4884611bde565b6020015181526020019081526020016000208054611e6590614180565b80601f0160208091040260200160405190810160405280929190818152602001828054611e9190614180565b8015611ede5780601f10611eb357610100808354040283529160200191611ede565b820191906000526020600020905b815481529060010190602001808311611ec157829003601f168201915b50505050509050919050565b611ef261230b565b73ffffffffffffffffffffffffffffffffffffffff16611f10611207565b73ffffffffffffffffffffffffffffffffffffffff1614611f66576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611f5d90614775565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415611fd6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611fcd90614d36565b60405180910390fd5b611fdf8161293e565b50565b611fea61230b565b73ffffffffffffffffffffffffffffffffffffffff16612008611207565b73ffffffffffffffffffffffffffffffffffffffff161461205e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161205590614775565b60405180910390fd5b80600b60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60003073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141561214c57600080368080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509050600080369050905073ffffffffffffffffffffffffffffffffffffffff818301511692505050612150565b3390505b90565b60007f80ac58cd000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061221e57507f5b5e139f000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b8061222e575061222d82612e7e565b5b9050919050565b60007fb7799584000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b60008073ffffffffffffffffffffffffffffffffffffffff166002600084815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614159050919050565b60006123156120a2565b905090565b816004600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff1661238d83611015565b73ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b60006123de8261229f565b61241d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161241490614dc8565b60405180910390fd5b600061242883611015565b90508073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16148061249757508373ffffffffffffffffffffffffffffffffffffffff1661247f84610808565b73ffffffffffffffffffffffffffffffffffffffff16145b806124a857506124a78185611d8b565b5b91505092915050565b8273ffffffffffffffffffffffffffffffffffffffff166124d182611015565b73ffffffffffffffffffffffffffffffffffffffff1614612527576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161251e90614e5a565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415612597576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161258e90614eec565b60405180910390fd5b6125a2838383612ee8565b6125ad60008261231a565b6001600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546125fd9190614f0c565b925050819055506001600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546126549190614f40565b92505081905550816002600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4505050565b6000818361271b9190614f96565b905092915050565b60008183612731919061501f565b905092915050565b8047101561277c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016127739061509c565b60405180910390fd5b60008273ffffffffffffffffffffffffffffffffffffffff16826040516127a2906150ed565b60006040518083038185875af1925050503d80600081146127df576040519150601f19603f3d011682016040523d82523d6000602084013e6127e4565b606091505b5050905080612828576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161281f90615174565b60405180910390fd5b505050565b600061283882611015565b905061284681600084612ee8565b61285160008361231a565b6001600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546128a19190614f0c565b925050819055506002600083815260200190815260200160002060006101000a81549073ffffffffffffffffffffffffffffffffffffffff021916905581600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a45050565b6000600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600660006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415612a73576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612a6a906151e0565b60405180910390fd5b80600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3183604051612b649190613430565b60405180910390a3505050565b60008183612b7f9190614f40565b905092915050565b612ba1828260405180602001604052806000815250612eed565b5050565b60008060001b9050600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415612c1d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612c149061524c565b60405180910390fd5b808383604051602001612c3293929190615300565b6040516020818303038152906040528051906020012090508060086000868152602001908152602001600020819055507f42a952ab851bf637851b9ee24bec4a757ec491b32f20609ff401ac17c221477d848484604051612c959392919061534c565b60405180910390a16007600082815260200190815260200160002060000160009054906101000a900460ff1615612ccc5750612d89565b60405180606001604052806001151581526020018473ffffffffffffffffffffffffffffffffffffffff168152602001838152506007600083815260200190815260200160002060008201518160000160006101000a81548160ff02191690831515021790555060208201518160000160016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060408201518160010155905050505b505050565b612d998484846124b1565b612da584848484612f48565b612de4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612ddb906153f5565b60405180910390fd5b50505050565b6000600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b505050565b612ef783836130d0565b612f046000848484612f48565b612f43576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612f3a906153f5565b60405180910390fd5b505050565b6000612f698473ffffffffffffffffffffffffffffffffffffffff1661329e565b156130c3578373ffffffffffffffffffffffffffffffffffffffff1663150b7a02612f9261230b565b8786866040518563ffffffff1660e01b8152600401612fb4949392919061546a565b6020604051808303816000875af1925050508015612ff057506040513d601f19601f82011682018060405250810190612fed91906154cb565b60015b613073573d8060008114613020576040519150601f19603f3d011682016040523d82523d6000602084013e613025565b606091505b5060008151141561306b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401613062906153f5565b60405180910390fd5b805181602001fd5b63150b7a0260e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149150506130c8565b600190505b949350505050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415613140576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161313790615544565b60405180910390fd5b6131498161229f565b15613189576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401613180906155b0565b60405180910390fd5b61319560008383612ee8565b6001600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546131e59190614f40565b92505081905550816002600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a45050565b600080823b905060008111915050919050565b8280546132bd90614180565b90600052602060002090601f0160209004810192826132df5760008555613326565b82601f106132f857805160ff1916838001178555613326565b82800160010185558215613326579182015b8281111561332557825182559160200191906001019061330a565b5b509050613333919061335f565b5090565b6040518060800160405280600081526020016000815260200160608152602001606081525090565b5b80821115613378576000816000905550600101613360565b5090565b6000604051905090565b600080fd5b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b6133c581613390565b81146133d057600080fd5b50565b6000813590506133e2816133bc565b92915050565b6000602082840312156133fe576133fd613386565b5b600061340c848285016133d3565b91505092915050565b60008115159050919050565b61342a81613415565b82525050565b60006020820190506134456000830184613421565b92915050565b600081519050919050565b600082825260208201905092915050565b60005b8381101561348557808201518184015260208101905061346a565b83811115613494576000848401525b50505050565b6000601f19601f8301169050919050565b60006134b68261344b565b6134c08185613456565b93506134d0818560208601613467565b6134d98161349a565b840191505092915050565b600060208201905081810360008301526134fe81846134ab565b905092915050565b6000819050919050565b61351981613506565b811461352457600080fd5b50565b60008135905061353681613510565b92915050565b60006020828403121561355257613551613386565b5b600061356084828501613527565b91505092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061359482613569565b9050919050565b6135a481613589565b82525050565b60006020820190506135bf600083018461359b565b92915050565b6135ce81613589565b81146135d957600080fd5b50565b6000813590506135eb816135c5565b92915050565b6000806040838503121561360857613607613386565b5b6000613616858286016135dc565b925050602061362785828601613527565b9150509250929050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b61366681613506565b82525050565b6000613678838361365d565b60208301905092915050565b6000602082019050919050565b600061369c82613631565b6136a6818561363c565b93506136b18361364d565b8060005b838110156136e25781516136c9888261366c565b97506136d483613684565b9250506001810190506136b5565b5085935050505092915050565b600060208201905081810360008301526137098184613691565b905092915050565b60008060006060848603121561372a57613729613386565b5b6000613738868287016135dc565b9350506020613749868287016135dc565b925050604061375a86828701613527565b9150509250925092565b6000806040838503121561377b5761377a613386565b5b600061378985828601613527565b925050602061379a85828601613527565b9150509250929050565b6137ad81613506565b82525050565b60006040820190506137c8600083018561359b565b6137d560208301846137a4565b9392505050565b600080fd5b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b61381e8261349a565b810181811067ffffffffffffffff8211171561383d5761383c6137e6565b5b80604052505050565b600061385061337c565b905061385c8282613815565b919050565b600067ffffffffffffffff82111561387c5761387b6137e6565b5b6138858261349a565b9050602081019050919050565b82818337600083830152505050565b60006138b46138af84613861565b613846565b9050828152602081018484840111156138d0576138cf6137e1565b5b6138db848285613892565b509392505050565b600082601f8301126138f8576138f76137dc565b5b81356139088482602086016138a1565b91505092915050565b6000806040838503121561392857613927613386565b5b600083013567ffffffffffffffff8111156139465761394561338b565b5b613952858286016138e3565b925050602083013567ffffffffffffffff8111156139735761397261338b565b5b61397f858286016138e3565b9150509250929050565b60006020828403121561399f5761399e613386565b5b60006139ad848285016135dc565b91505092915050565b60006020820190506139cb60008301846137a4565b92915050565b6139da81613415565b81146139e557600080fd5b50565b6000813590506139f7816139d1565b92915050565b60008060408385031215613a1457613a13613386565b5b6000613a22858286016135dc565b9250506020613a33858286016139e8565b9150509250929050565b600080fd5b600080fd5b60006101208284031215613a5e57613a5d613a3d565b5b613a69610120613846565b90506000613a7984828501613527565b6000830152506020613a8d848285016135dc565b6020830152506040613aa1848285016135dc565b6040830152506060613ab584828501613527565b606083015250608082013567ffffffffffffffff811115613ad957613ad8613a42565b5b613ae5848285016138e3565b60808301525060a082013567ffffffffffffffff811115613b0957613b08613a42565b5b613b15848285016138e3565b60a08301525060c0613b2984828501613527565b60c08301525060e0613b3d84828501613527565b60e083015250610100613b5284828501613527565b6101008301525092915050565b600060208284031215613b7557613b74613386565b5b600082013567ffffffffffffffff811115613b9357613b9261338b565b5b613b9f84828501613a47565b91505092915050565b600067ffffffffffffffff821115613bc357613bc26137e6565b5b613bcc8261349a565b9050602081019050919050565b6000613bec613be784613ba8565b613846565b905082815260208101848484011115613c0857613c076137e1565b5b613c13848285613892565b509392505050565b600082601f830112613c3057613c2f6137dc565b5b8135613c40848260208601613bd9565b91505092915050565b60008060008060808587031215613c6357613c62613386565b5b6000613c71878288016135dc565b9450506020613c82878288016135dc565b9350506040613c9387828801613527565b925050606085013567ffffffffffffffff811115613cb457613cb361338b565b5b613cc087828801613c1b565b91505092959194509250565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b6000613d0382613569565b9050919050565b613d1381613cf8565b82525050565b6000613d258383613d0a565b60208301905092915050565b6000602082019050919050565b6000613d4982613ccc565b613d538185613cd7565b9350613d5e83613ce8565b8060005b83811015613d8f578151613d768882613d19565b9750613d8183613d31565b925050600181019050613d62565b5085935050505092915050565b60006020820190508181036000830152613db68184613d3e565b905092915050565b60008060408385031215613dd557613dd4613386565b5b6000613de385828601613527565b925050602083013567ffffffffffffffff811115613e0457613e0361338b565b5b613e10858286016138e3565b9150509250929050565b600067ffffffffffffffff821115613e3557613e346137e6565b5b602082029050602081019050919050565b600080fd5b6000613e5e613e5984613e1a565b613846565b90508083825260208201905060208402830185811115613e8157613e80613e46565b5b835b81811015613eaa5780613e968882613527565b845260208401935050602081019050613e83565b5050509392505050565b600082601f830112613ec957613ec86137dc565b5b8135613ed9848260208601613e4b565b91505092915050565b600067ffffffffffffffff821115613efd57613efc6137e6565b5b602082029050602081019050919050565b6000613f21613f1c84613ee2565b613846565b90508083825260208201905060208402830185811115613f4457613f43613e46565b5b835b81811015613f8b57803567ffffffffffffffff811115613f6957613f686137dc565b5b808601613f7689826138e3565b85526020850194505050602081019050613f46565b5050509392505050565b600082601f830112613faa57613fa96137dc565b5b8135613fba848260208601613f0e565b91505092915050565b60008060408385031215613fda57613fd9613386565b5b600083013567ffffffffffffffff811115613ff857613ff761338b565b5b61400485828601613eb4565b925050602083013567ffffffffffffffff8111156140255761402461338b565b5b61403185828601613f95565b9150509250929050565b600082825260208201905092915050565b60006140578261344b565b614061818561403b565b9350614071818560208601613467565b61407a8161349a565b840191505092915050565b600060808301600083015161409d600086018261365d565b5060208301516140b0602086018261365d565b50604083015184820360408601526140c8828261404c565b915050606083015184820360608601526140e2828261404c565b9150508091505092915050565b600060208201905081810360008301526141098184614085565b905092915050565b6000806040838503121561412857614127613386565b5b6000614136858286016135dc565b9250506020614147858286016135dc565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b6000600282049050600182168061419857607f821691505b602082108114156141ac576141ab614151565b5b50919050565b7f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860008201527f697374656e7420746f6b656e0000000000000000000000000000000000000000602082015250565b600061420e602c83613456565b9150614219826141b2565b604082019050919050565b6000602082019050818103600083015261423d81614201565b9050919050565b7f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560008201527f7200000000000000000000000000000000000000000000000000000000000000602082015250565b60006142a0602183613456565b91506142ab82614244565b604082019050919050565b600060208201905081810360008301526142cf81614293565b9050919050565b7f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760008201527f6e6572206e6f7220617070726f76656420666f7220616c6c0000000000000000602082015250565b6000614332603883613456565b915061433d826142d6565b604082019050919050565b6000602082019050818103600083015261436181614325565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60008201527f776e6572206e6f7220617070726f766564000000000000000000000000000000602082015250565b60006143f3603183613456565b91506143fe82614397565b604082019050919050565b60006020820190508181036000830152614422816143e6565b9050919050565b7f4552433732314d657461646174613a206e6f6e6578697374656e7420746f6b6560008201527f6e00000000000000000000000000000000000000000000000000000000000000602082015250565b6000614485602183613456565b915061449082614429565b604082019050919050565b600060208201905081810360008301526144b481614478565b9050919050565b6000815190506144ca81613510565b92915050565b6000815190506144df816135c5565b92915050565b60006144f86144f384613861565b613846565b905082815260208101848484011115614514576145136137e1565b5b61451f848285613467565b509392505050565b600082601f83011261453c5761453b6137dc565b5b815161454c8482602086016144e5565b91505092915050565b600081519050614564816139d1565b92915050565b6000610180828403121561458157614580613a3d565b5b61458c610180613846565b9050600061459c848285016144bb565b60008301525060206145b0848285016144d0565b602083015250604082015167ffffffffffffffff8111156145d4576145d3613a42565b5b6145e084828501614527565b604083015250606082015167ffffffffffffffff81111561460457614603613a42565b5b61461084828501614527565b606083015250608082015167ffffffffffffffff81111561463457614633613a42565b5b61464084828501614527565b60808301525060a0614654848285016144bb565b60a08301525060c0614668848285016144bb565b60c08301525060e061467c848285016144bb565b60e083015250610100614691848285016144bb565b610100830152506101206146a7848285016144bb565b610120830152506101406146bd84828501614555565b610140830152506101606146d3848285016144bb565b6101608301525092915050565b6000602082840312156146f6576146f5613386565b5b600082015167ffffffffffffffff8111156147145761471361338b565b5b6147208482850161456a565b91505092915050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b600061475f602083613456565b915061476a82614729565b602082019050919050565b6000602082019050818103600083015261478e81614752565b9050919050565b7f4552433732314275726e61626c653a2063616c6c6572206973206e6f74206f7760008201527f6e6572206e6f7220617070726f76656400000000000000000000000000000000602082015250565b60006147f1603083613456565b91506147fc82614795565b604082019050919050565b60006020820190508181036000830152614820816147e4565b9050919050565b7f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460008201527f656e7420746f6b656e0000000000000000000000000000000000000000000000602082015250565b6000614883602983613456565b915061488e82614827565b604082019050919050565b600060208201905081810360008301526148b281614876565b9050919050565b7f4552433732313a2062616c616e636520717565727920666f7220746865207a6560008201527f726f206164647265737300000000000000000000000000000000000000000000602082015250565b6000614915602a83613456565b9150614920826148b9565b604082019050919050565b6000602082019050818103600083015261494481614908565b9050919050565b7f696e76616c69642073656e646572000000000000000000000000000000000000600082015250565b6000614981600e83613456565b915061498c8261494b565b602082019050919050565b600060208201905081810360008301526149b081614974565b9050919050565b6000602082840312156149cd576149cc613386565b5b600082015167ffffffffffffffff8111156149eb576149ea61338b565b5b6149f784828501614527565b91505092915050565b7f4d697373696e6720736372697074000000000000000000000000000000000000600082015250565b6000614a36600e83613456565b9150614a4182614a00565b602082019050919050565b60006020820190508181036000830152614a6581614a29565b9050919050565b600081905092915050565b7f2f2f200000000000000000000000000000000000000000000000000000000000600082015250565b6000614aad600383614a6c565b9150614ab882614a77565b600382019050919050565b6000614ace8261344b565b614ad88185614a6c565b9350614ae8818560208601613467565b80840191505092915050565b7f0a00000000000000000000000000000000000000000000000000000000000000600082015250565b6000614b2a600183614a6c565b9150614b3582614af4565b600182019050919050565b6000614b4b82614aa0565b9150614b578284614ac3565b9150614b6282614b1d565b915081905092915050565b60008190508160005260206000209050919050565b60008154614b8f81614180565b614b998186614a6c565b94506001821660008114614bb45760018114614bc557614bf8565b60ff19831686528186019350614bf8565b614bce85614b6d565b60005b83811015614bf057815481890152600182019150602081019050614bd1565b838801955050505b50505092915050565b6000614c0d8288614ac3565b9150614c198287614b82565b9150614c258286614ac3565b9150614c318285614b82565b9150614c3d8284614ac3565b91508190509695505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000614c8682613506565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415614cb957614cb8614c4c565b5b600182019050919050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b6000614d20602683613456565b9150614d2b82614cc4565b604082019050919050565b60006020820190508181036000830152614d4f81614d13565b9050919050565b7f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860008201527f697374656e7420746f6b656e0000000000000000000000000000000000000000602082015250565b6000614db2602c83613456565b9150614dbd82614d56565b604082019050919050565b60006020820190508181036000830152614de181614da5565b9050919050565b7f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960008201527f73206e6f74206f776e0000000000000000000000000000000000000000000000602082015250565b6000614e44602983613456565b9150614e4f82614de8565b604082019050919050565b60006020820190508181036000830152614e7381614e37565b9050919050565b7f4552433732313a207472616e7366657220746f20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b6000614ed6602483613456565b9150614ee182614e7a565b604082019050919050565b60006020820190508181036000830152614f0581614ec9565b9050919050565b6000614f1782613506565b9150614f2283613506565b925082821015614f3557614f34614c4c565b5b828203905092915050565b6000614f4b82613506565b9150614f5683613506565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115614f8b57614f8a614c4c565b5b828201905092915050565b6000614fa182613506565b9150614fac83613506565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615614fe557614fe4614c4c565b5b828202905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600061502a82613506565b915061503583613506565b92508261504557615044614ff0565b5b828204905092915050565b7f416464726573733a20696e73756666696369656e742062616c616e6365000000600082015250565b6000615086601d83613456565b915061509182615050565b602082019050919050565b600060208201905081810360008301526150b581615079565b9050919050565b600081905092915050565b50565b60006150d76000836150bc565b91506150e2826150c7565b600082019050919050565b60006150f8826150ca565b9150819050919050565b7f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260008201527f6563697069656e74206d61792068617665207265766572746564000000000000602082015250565b600061515e603a83613456565b915061516982615102565b604082019050919050565b6000602082019050818103600083015261518d81615151565b9050919050565b7f4552433732313a20617070726f766520746f2063616c6c657200000000000000600082015250565b60006151ca601983613456565b91506151d582615194565b602082019050919050565b600060208201905081810360008301526151f9816151bd565b9050919050565b7f4d757374206e6f74206265207a65726f2d616464726573730000000000000000600082015250565b6000615236601883613456565b915061524182615200565b602082019050919050565b6000602082019050818103600083015261526581615229565b9050919050565b6000819050919050565b6000819050919050565b61529161528c8261526c565b615276565b82525050565b60008160601b9050919050565b60006152af82615297565b9050919050565b60006152c1826152a4565b9050919050565b6152d96152d482613cf8565b6152b6565b82525050565b6000819050919050565b6152fa6152f582613506565b6152df565b82525050565b600061530c8286615280565b60208201915061531c82856152c8565b60148201915061532c82846152e9565b602082019150819050949350505050565b61534681613cf8565b82525050565b600060608201905061536160008301866137a4565b61536e602083018561533d565b61537b60408301846137a4565b949350505050565b7f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560008201527f63656976657220696d706c656d656e7465720000000000000000000000000000602082015250565b60006153df603283613456565b91506153ea82615383565b604082019050919050565b6000602082019050818103600083015261540e816153d2565b9050919050565b600081519050919050565b600082825260208201905092915050565b600061543c82615415565b6154468185615420565b9350615456818560208601613467565b61545f8161349a565b840191505092915050565b600060808201905061547f600083018761359b565b61548c602083018661359b565b61549960408301856137a4565b81810360608301526154ab8184615431565b905095945050505050565b6000815190506154c5816133bc565b92915050565b6000602082840312156154e1576154e0613386565b5b60006154ef848285016154b6565b91505092915050565b7f4552433732313a206d696e7420746f20746865207a65726f2061646472657373600082015250565b600061552e602083613456565b9150615539826154f8565b602082019050919050565b6000602082019050818103600083015261555d81615521565b9050919050565b7f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000600082015250565b600061559a601c83613456565b91506155a582615564565b602082019050919050565b600060208201905081810360008301526155c98161558d565b905091905056fea26469706673582212207b01298d3e5b03309b847c6ec26d18a601c2e73f16081a7eef544a0987b5df1e64736f6c634300080b0033

Block Transaction Gas Used Reward
Age Block Fee Address BC Fee Address Voting Power Jailed Incoming
Block Uncle Number Difficulty Gas Used Reward
Loading
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.