Contract Address Details

0x672dC6510e7f7Fba3c0B0F35d84c749910296F9F

Contract Name
PostLogic
Creator
0xe01c8d–e085f7 at 0xa99707–82ef64
Balance
0 CSB
Tokens
Fetching tokens...
Transactions
0 Transactions
Transfers
0 Transfers
Gas Used
Fetching gas used...
Last Balance Update
85848288
Contract name:
PostLogic




Optimization enabled
true
Compiler version
v0.8.10+commit.fc410830




Optimization runs
200
Verified at
2022-08-08T08:53:16.152309Z

contracts/libraries/PostLogic.sol

// SPDX-License-Identifier: MIT

pragma solidity 0.8.10;

import "./DataTypes.sol";
import "./Events.sol";
import "../interfaces/ILinkModule4Note.sol";
import "../interfaces/IMintModule4Note.sol";
import "../interfaces/IMintNFT.sol";
import "@openzeppelin/contracts/proxy/Clones.sol";
import "@openzeppelin/contracts/utils/Strings.sol";

library PostLogic {
    using Strings for uint256;

    function postNoteWithLink(
        DataTypes.PostNoteData calldata vars,
        uint256 noteId,
        bytes32 linkItemType,
        bytes32 linkKey,
        bytes calldata data,
        mapping(uint256 => mapping(uint256 => DataTypes.Note)) storage _noteByIdByCharacter
    ) external {
        uint256 characterId = vars.characterId;
        // save note
        if (linkItemType != bytes32(0)) {
            _noteByIdByCharacter[characterId][noteId].linkItemType = linkItemType;
            _noteByIdByCharacter[characterId][noteId].linkKey = linkKey;
        }
        _noteByIdByCharacter[characterId][noteId].contentUri = vars.contentUri;
        _noteByIdByCharacter[characterId][noteId].linkModule = vars.linkModule;
        _noteByIdByCharacter[characterId][noteId].mintModule = vars.mintModule;

        // init link module
        if (vars.linkModule != address(0)) {
            bytes memory linkModuleReturnData = ILinkModule4Note(vars.linkModule)
                .initializeLinkModule(characterId, noteId, vars.linkModuleInitData);

            emit Events.SetLinkModule4Note(
                characterId,
                noteId,
                vars.linkModule,
                linkModuleReturnData,
                block.timestamp
            );
        }

        // init mint module
        if (vars.mintModule != address(0)) {
            bytes memory mintModuleReturnData = IMintModule4Note(vars.mintModule)
                .initializeMintModule(characterId, noteId, vars.mintModuleInitData);

            emit Events.SetMintModule4Note(
                characterId,
                noteId,
                vars.mintModule,
                mintModuleReturnData,
                block.timestamp
            );
        }

        emit Events.PostNote(characterId, noteId, linkKey, linkItemType, data);
    }

    function mintNote(
        uint256 characterId,
        uint256 noteId,
        address to,
        bytes calldata mintModuleData,
        address mintNFTImpl,
        mapping(uint256 => DataTypes.Character) storage _characterById,
        mapping(uint256 => mapping(uint256 => DataTypes.Note)) storage _noteByIdByCharacter
    ) external returns (uint256 tokenId) {
        address mintNFT = _noteByIdByCharacter[characterId][noteId].mintNFT;
        if (mintNFT == address(0)) {
            mintNFT = _deployMintNFT(
                characterId,
                noteId,
                _characterById[characterId].handle,
                mintNFTImpl
            );
            _noteByIdByCharacter[characterId][noteId].mintNFT = mintNFT;
        }

        // mint nft
        tokenId = IMintNFT(mintNFT).mint(to);

        address mintModule = _noteByIdByCharacter[characterId][noteId].mintModule;
        if (mintModule != address(0)) {
            IMintModule4Note(mintModule).processMint(to, characterId, noteId, mintModuleData);
        }

        emit Events.MintNote(to, characterId, noteId, mintNFT, tokenId);
    }

    function setNoteUri(
        uint256 characterId,
        uint256 noteId,
        string calldata newUri,
        mapping(uint256 => mapping(uint256 => DataTypes.Note)) storage _noteByIdByCharacter
    ) external {
        require(!_noteByIdByCharacter[characterId][noteId].locked, "NoteLocked");

        _noteByIdByCharacter[characterId][noteId].contentUri = newUri;

        emit Events.SetNoteUri(characterId, noteId, newUri);
    }

    function _deployMintNFT(
        uint256 characterId,
        uint256 noteId,
        string memory handle,
        address mintNFTImpl
    ) internal returns (address) {
        address mintNFT = Clones.clone(mintNFTImpl);

        bytes4 firstBytes = bytes4(bytes(handle));

        string memory NFTName = string(
            abi.encodePacked(handle, "-Note-", characterId.toString(), "-", noteId.toString())
        );
        string memory NFTSymbol = string(
            abi.encodePacked(firstBytes, "-Note-", characterId.toString(), "-", noteId.toString())
        );

        IMintNFT(mintNFT).initialize(characterId, noteId, address(this), NFTName, NFTSymbol);
        return mintNFT;
    }
}
        

@openzeppelin/contracts/proxy/Clones.sol

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (proxy/Clones.sol)

pragma solidity ^0.8.0;

/**
 * @dev https://eips.ethereum.org/EIPS/eip-1167[EIP 1167] is a standard for
 * deploying minimal proxy contracts, also known as "clones".
 *
 * > To simply and cheaply clone contract functionality in an immutable way, this standard specifies
 * > a minimal bytecode implementation that delegates all calls to a known, fixed address.
 *
 * The library includes functions to deploy a proxy using either `create` (traditional deployment) or `create2`
 * (salted deterministic deployment). It also includes functions to predict the addresses of clones deployed using the
 * deterministic method.
 *
 * _Available since v3.4._
 */
library Clones {
    /**
     * @dev Deploys and returns the address of a clone that mimics the behaviour of `implementation`.
     *
     * This function uses the create opcode, which should never revert.
     */
    function clone(address implementation) internal returns (address instance) {
        assembly {
            let ptr := mload(0x40)
            mstore(ptr, 0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000000000000000000000)
            mstore(add(ptr, 0x14), shl(0x60, implementation))
            mstore(add(ptr, 0x28), 0x5af43d82803e903d91602b57fd5bf30000000000000000000000000000000000)
            instance := create(0, ptr, 0x37)
        }
        require(instance != address(0), "ERC1167: create failed");
    }

    /**
     * @dev Deploys and returns the address of a clone that mimics the behaviour of `implementation`.
     *
     * This function uses the create2 opcode and a `salt` to deterministically deploy
     * the clone. Using the same `implementation` and `salt` multiple time will revert, since
     * the clones cannot be deployed twice at the same address.
     */
    function cloneDeterministic(address implementation, bytes32 salt) internal returns (address instance) {
        assembly {
            let ptr := mload(0x40)
            mstore(ptr, 0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000000000000000000000)
            mstore(add(ptr, 0x14), shl(0x60, implementation))
            mstore(add(ptr, 0x28), 0x5af43d82803e903d91602b57fd5bf30000000000000000000000000000000000)
            instance := create2(0, ptr, 0x37, salt)
        }
        require(instance != address(0), "ERC1167: create2 failed");
    }

    /**
     * @dev Computes the address of a clone deployed using {Clones-cloneDeterministic}.
     */
    function predictDeterministicAddress(
        address implementation,
        bytes32 salt,
        address deployer
    ) internal pure returns (address predicted) {
        assembly {
            let ptr := mload(0x40)
            mstore(ptr, 0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000000000000000000000)
            mstore(add(ptr, 0x14), shl(0x60, implementation))
            mstore(add(ptr, 0x28), 0x5af43d82803e903d91602b57fd5bf3ff00000000000000000000000000000000)
            mstore(add(ptr, 0x38), shl(0x60, deployer))
            mstore(add(ptr, 0x4c), salt)
            mstore(add(ptr, 0x6c), keccak256(ptr, 0x37))
            predicted := keccak256(add(ptr, 0x37), 0x55)
        }
    }

    /**
     * @dev Computes the address of a clone deployed using {Clones-cloneDeterministic}.
     */
    function predictDeterministicAddress(address implementation, bytes32 salt)
        internal
        view
        returns (address predicted)
    {
        return predictDeterministicAddress(implementation, salt, address(this));
    }
}
          

@openzeppelin/contracts/utils/Strings.sol

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

pragma solidity ^0.8.0;

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

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

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

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

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

contracts/interfaces/ILinkModule4Note.sol

// SPDX-License-Identifier: MIT

pragma solidity 0.8.10;

interface ILinkModule4Note {
    function initializeLinkModule(
        uint256 characterId,
        uint256 noteId,
        bytes calldata data
    ) external returns (bytes memory);

    function processLink(
        address caller,
        uint256 characterId,
        uint256 noteId,
        bytes calldata data
    ) external;
}
          

contracts/interfaces/IMintModule4Note.sol

// SPDX-License-Identifier: MIT

pragma solidity 0.8.10;

interface IMintModule4Note {
    function initializeMintModule(
        uint256 characterId,
        uint256 noteId,
        bytes calldata data
    ) external returns (bytes memory);

    function processMint(
        address to,
        uint256 characterId,
        uint256 noteId,
        bytes calldata data
    ) external;
}
          

contracts/interfaces/IMintNFT.sol

// SPDX-License-Identifier: MIT

pragma solidity 0.8.10;

interface IMintNFT {
    function initialize(
        uint256 characterId,
        uint256 noteId,
        address web3Entry,
        string calldata name,
        string calldata symbol
    ) external;

    function mint(address to) external returns (uint256);

    function getSourcePublicationPointer() external view returns (uint256, uint256);
}
          

contracts/libraries/DataTypes.sol

// SPDX-License-Identifier: MIT

pragma solidity 0.8.10;

library DataTypes {
    struct MigrateData {
        address account;
        string handle;
        string uri;
        address[] toAddresses;
        bytes32 linkType;
    }

    struct CreateCharacterData {
        address to;
        string handle;
        string uri;
        address linkModule;
        bytes linkModuleInitData;
    }

    struct createThenLinkCharacterData {
        uint256 fromCharacterId;
        address to;
        bytes32 linkType;
    }

    struct linkNoteData {
        uint256 fromCharacterId;
        uint256 toCharacterId;
        uint256 toNoteId;
        bytes32 linkType;
        bytes data;
    }

    struct unlinkNoteData {
        uint256 fromCharacterId;
        uint256 toCharacterId;
        uint256 toNoteId;
        bytes32 linkType;
    }

    struct linkCharacterData {
        uint256 fromCharacterId;
        uint256 toCharacterId;
        bytes32 linkType;
        bytes data;
    }

    struct unlinkCharacterData {
        uint256 fromCharacterId;
        uint256 toCharacterId;
        bytes32 linkType;
    }

    struct linkERC721Data {
        uint256 fromCharacterId;
        address tokenAddress;
        uint256 tokenId;
        bytes32 linkType;
        bytes data;
    }

    struct unlinkERC721Data {
        uint256 fromCharacterId;
        address tokenAddress;
        uint256 tokenId;
        bytes32 linkType;
    }

    struct linkAddressData {
        uint256 fromCharacterId;
        address ethAddress;
        bytes32 linkType;
        bytes data;
    }

    struct unlinkAddressData {
        uint256 fromCharacterId;
        address ethAddress;
        bytes32 linkType;
    }

    struct linkAnyUriData {
        uint256 fromCharacterId;
        string toUri;
        bytes32 linkType;
        bytes data;
    }

    struct unlinkAnyUriData {
        uint256 fromCharacterId;
        string toUri;
        bytes32 linkType;
    }

    struct linkLinklistData {
        uint256 fromCharacterId;
        uint256 toLinkListId;
        bytes32 linkType;
        bytes data;
    }

    struct unlinkLinklistData {
        uint256 fromCharacterId;
        uint256 toLinkListId;
        bytes32 linkType;
    }

    struct setLinkModule4CharacterData {
        uint256 characterId;
        address linkModule;
        bytes linkModuleInitData;
    }

    struct setLinkModule4NoteData {
        uint256 characterId;
        uint256 noteId;
        address linkModule;
        bytes linkModuleInitData;
    }

    struct setLinkModule4LinklistData {
        uint256 linklistId;
        address linkModule;
        bytes linkModuleInitData;
    }

    struct setLinkModule4ERC721Data {
        address tokenAddress;
        uint256 tokenId;
        address linkModule;
        bytes linkModuleInitData;
    }

    struct setLinkModule4AddressData {
        address account;
        address linkModule;
        bytes linkModuleInitData;
    }

    struct setMintModule4NoteData {
        uint256 characterId;
        uint256 noteId;
        address mintModule;
        bytes mintModuleInitData;
    }

    struct linkCharactersInBatchData {
        uint256 fromCharacterId;
        uint256[] toCharacterIds;
        bytes[] data;
        address[] toAddresses;
        bytes32 linkType;
    }

    struct LinkData {
        uint256 linklistId;
        uint256 linkItemType;
        uint256 linkingCharacterId;
        address linkingAddress;
        uint256 linkingLinklistId;
        bytes32 linkKey;
    }

    struct PostNoteData {
        uint256 characterId;
        string contentUri;
        address linkModule;
        bytes linkModuleInitData;
        address mintModule;
        bytes mintModuleInitData;
        bool locked;
    }

    struct MintNoteData {
        uint256 characterId;
        uint256 noteId;
        address to;
        bytes mintModuleData;
    }

    // character struct
    struct Character {
        uint256 characterId;
        string handle;
        string uri;
        uint256 noteCount;
        address socialToken;
        address linkModule;
    }

    // note struct
    struct Note {
        bytes32 linkItemType; // type of note with link
        bytes32 linkKey; // if linkKey is not empty, it is a note with link
        string contentUri;
        address linkModule;
        address mintModule;
        address mintNFT;
        bool deleted;
        bool locked;
    }

    struct CharacterLinkStruct {
        uint256 fromCharacterId;
        uint256 toCharacterId;
        bytes32 linkType;
    }

    struct NoteStruct {
        uint256 characterId;
        uint256 noteId;
    }

    struct ERC721Struct {
        address tokenAddress;
        uint256 erc721TokenId;
    }
}
          

contracts/libraries/Events.sol

// SPDX-License-Identifier: MIT

pragma solidity 0.8.10;

library Events {
    event BaseInitialized(string name, string symbol, uint256 timestamp);

    event Web3EntryInitialized(uint256 timestamp);

    event LinklistNFTInitialized(uint256 timestamp);

    event MintNFTInitialized(uint256 characterId, uint256 noteId, uint256 timestamp);

    event CharacterCreated(
        uint256 indexed characterId,
        address indexed creator,
        address indexed to,
        string handle,
        uint256 timestamp
    );

    event SetPrimaryCharacterId(
        address indexed account,
        uint256 indexed characterId,
        uint256 indexed oldCharacterId
    );

    event SetHandle(address indexed account, uint256 indexed characterId, string newHandle);

    event SetSocialToken(
        address indexed account,
        uint256 indexed characterId,
        address indexed tokenAddress
    );

    event SetOperator(uint256 indexed characterId, address indexed operator, uint256 timestamp);

    event SetCharacterUri(uint256 indexed characterId, string newUri);

    event PostNote(
        uint256 indexed characterId,
        uint256 indexed noteId,
        bytes32 indexed linkKey,
        bytes32 linkItemType,
        bytes data
    );

    event SetNoteUri(uint256 indexed characterId, uint256 noteId, string newUri);

    event DeleteNote(uint256 indexed characterId, uint256 noteId);

    event LockNote(uint256 indexed characterId, uint256 noteId);

    event LinkCharacter(
        address indexed account,
        uint256 indexed fromCharacterId,
        uint256 indexed toCharacterId,
        bytes32 linkType,
        uint256 linklistId
    );

    event UnlinkCharacter(
        address indexed account,
        uint256 indexed fromCharacterId,
        uint256 indexed toCharacterId,
        bytes32 linkType
    );

    event LinkNote(
        uint256 indexed fromCharacterId,
        uint256 indexed toCharacterId,
        uint256 indexed toNoteId,
        bytes32 linkType,
        uint256 linklistId
    );

    event UnlinkNote(
        uint256 indexed fromCharacterId,
        uint256 indexed toCharacterId,
        uint256 indexed toNoteId,
        bytes32 linkType,
        uint256 linklistId
    );

    event LinkERC721(
        uint256 indexed fromCharacterId,
        address indexed tokenAddress,
        uint256 indexed toNoteId,
        bytes32 linkType,
        uint256 linklistId
    );

    event LinkAddress(
        uint256 indexed fromCharacterId,
        address indexed ethAddress,
        bytes32 linkType,
        uint256 linklistId
    );

    event UnlinkAddress(
        uint256 indexed fromCharacterId,
        address indexed ethAddress,
        bytes32 linkType
    );

    event LinkAnyUri(
        uint256 indexed fromCharacterId,
        string toUri,
        bytes32 linkType,
        uint256 linklistId
    );

    event UnlinkAnyUri(uint256 indexed fromCharacterId, string toUri, bytes32 linkType);

    event LinkCharacterLink(
        uint256 indexed fromCharacterId,
        bytes32 indexed linkType,
        uint256 clFromCharacterId,
        uint256 clToCharacterId,
        bytes32 clLinkType
    );

    event UnlinkCharacterLink(
        uint256 indexed fromCharacterId,
        bytes32 indexed linkType,
        uint256 clFromCharactereId,
        uint256 clToCharacterId,
        bytes32 clLinkType
    );

    event UnlinkERC721(
        uint256 indexed fromCharacterId,
        address indexed tokenAddress,
        uint256 indexed toNoteId,
        bytes32 linkType,
        uint256 linklistId
    );

    event LinkLinklist(
        uint256 indexed fromCharacterId,
        uint256 indexed toLinklistId,
        bytes32 linkType,
        uint256 indexed linklistId
    );

    event UnlinkLinklist(
        uint256 indexed fromCharacterId,
        uint256 indexed toLinklistId,
        bytes32 linkType,
        uint256 indexed linklistId
    );

    event MintNote(
        address indexed to,
        uint256 indexed characterId,
        uint256 indexed noteId,
        address tokenAddress,
        uint256 tokenId
    );

    event SetLinkModule4Character(
        uint256 indexed characterId,
        address indexed linkModule,
        bytes returnData,
        uint256 timestamp
    );

    event SetLinkModule4Note(
        uint256 indexed characterId,
        uint256 indexed noteId,
        address indexed linkModule,
        bytes returnData,
        uint256 timestamp
    );

    event SetLinkModule4Address(
        address indexed account,
        address indexed linkModule,
        bytes returnData,
        uint256 timestamp
    );

    event SetLinkModule4ERC721(
        address indexed tokenAddress,
        uint256 indexed tokenId,
        address indexed linkModule,
        bytes returnData,
        uint256 timestamp
    );

    event SetLinkModule4Linklist(
        uint256 indexed linklistId,
        address indexed linkModule,
        bytes returnData,
        uint256 timestamp
    );

    event SetMintModule4Note(
        uint256 indexed characterId,
        uint256 indexed noteId,
        address indexed mintModule,
        bytes returnData,
        uint256 timestamp
    );

    event AttachLinklist(
        uint256 indexed linklistId,
        uint256 indexed characterId,
        bytes32 indexed linkType
    );

    event DetachLinklist(
        uint256 indexed linklistId,
        uint256 indexed characterId,
        bytes32 indexed linkType
    );
}
          

Contract ABI

[]
              

Contract Creation Code

0x61112b61003a600b82828239805160001a60731461002d57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe730000000000000000000000000000000000000000301460806040526004361061004b5760003560e01c806342a34a53146100505780635be6941514610072578063ff97fd41146100a4575b600080fd5b81801561005c57600080fd5b5061007061006b366004610ac4565b6100c4565b005b81801561007e57600080fd5b5061009261008d366004610b73565b610414565b60405190815260200160405180910390f35b8180156100b057600080fd5b506100706100bf366004610bfe565b610675565b863585156100ed576000818152602083815260408083208a845290915290208681556001018590555b6100fa6020890189610c59565b6000838152602085815260408083208c84529091529020610120926002909101916109e2565b506101316060890160408a01610ca0565b6000828152602084815260408083208b8452909152902060030180546001600160a01b0319166001600160a01b039290921691909117905561017960a0890160808a01610ca0565b6000828152602084815260408083208b845290915280822060040180546001600160a01b0319166001600160a01b039490941693909317909255906101c49060608b01908b01610ca0565b6001600160a01b0316146102bf5760006101e460608a0160408b01610ca0565b6001600160a01b031663f0336077838a61020160608e018e610c59565b6040518563ffffffff1660e01b81526004016102209493929190610ceb565b6000604051808303816000875af115801561023f573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526102679190810190610d5b565b905061027960608a0160408b01610ca0565b6001600160a01b031688837f889c6317f76b8527935ed434226767d05f8b7c664d99f6f787e62efd558f6f0184426040516102b5929190610e34565b60405180910390a4505b60006102d160a08a0160808b01610ca0565b6001600160a01b0316146103cc5760006102f160a08a0160808b01610ca0565b6001600160a01b0316637dd37a9e838a61030e60a08e018e610c59565b6040518563ffffffff1660e01b815260040161032d9493929190610ceb565b6000604051808303816000875af115801561034c573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526103749190810190610d5b565b905061038660a08a0160808b01610ca0565b6001600160a01b031688837f36e973ebf2a1c9c4006aaad244866e6dea9a0e85770deea599b193a9eb51b8f784426040516103c2929190610e34565b60405180910390a4505b8487827f6ea6daa2449ded342bb92186e54e576ec7c6a729d4ccbf6f364e1bd1f1a5274089888860405161040293929190610e56565b60405180910390a45050505050505050565b6000888152602082815260408083208a84529091528120600501546001600160a01b03168061051c576104e68a8a8660008e8152602001908152602001600020600101805461046290610e79565b80601f016020809104026020016040519081016040528092919081815260200182805461048e90610e79565b80156104db5780601f106104b0576101008083540402835291602001916104db565b820191906000526020600020905b8154815290600101906020018083116104be57829003601f168201915b505050505088610742565b60008b8152602085815260408083208d8452909152902060050180546001600160a01b0319166001600160a01b03831617905590505b6040516335313c2160e11b81526001600160a01b038981166004830152821690636a627842906024016020604051808303816000875af1158015610564573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105889190610eb4565b60008b8152602085815260408083208d84529091529020600401549092506001600160a01b0316801561061c57604051637f20dc2160e01b81526001600160a01b03821690637f20dc21906105e9908c908f908f908e908e90600401610ecd565b600060405180830381600087803b15801561060357600080fd5b505af1158015610617573d6000803e3d6000fd5b505050505b604080516001600160a01b038481168252602082018690528c928e92918d16917f6f1704cf3bc1cfc1bc2284eee0ba541a208bc80989f559ed39cc6567d77cf212910160405180910390a4505098975050505050505050565b600085815260208281526040808320878452909152902060050154600160a81b900460ff16156106d95760405162461bcd60e51b815260206004820152600a602482015269139bdd19531bd8dad95960b21b60448201526064015b60405180910390fd5b60008581526020828152604080832087845290915290206106fe9060020184846109e2565b50847f179143dd0d35a50f482efc003aa5b84a0c3a40d74e9cc2d7ea3053b9e8c3769785858560405161073393929190610e56565b60405180910390a25050505050565b60008061074e8361083f565b9050600061075b85610efb565b9050600085610769896108dc565b610772896108dc565b60405160200161078493929190610f32565b60405160208183030381529060405290506000826107a18a6108dc565b6107aa8a6108dc565b6040516020016107bc93929190610f96565b60408051601f19818403018152908290526317eb5c4360e11b825291506001600160a01b03851690632fd6b88690610800908c908c90309088908890600401610ff6565b600060405180830381600087803b15801561081a57600080fd5b505af115801561082e573d6000803e3d6000fd5b50959b9a5050505050505050505050565b6000604051733d602d80600a3d3981f3363d3d373d3d3d363d7360601b81528260601b60148201526e5af43d82803e903d91602b57fd5bf360881b60288201526037816000f09150506001600160a01b0381166108d75760405162461bcd60e51b8152602060048201526016602482015275115490cc4c4d8dce8818dc99585d194819985a5b195960521b60448201526064016106d0565b919050565b6060816109005750506040805180820190915260018152600360fc1b602082015290565b8160005b811561092a578061091481611057565b91506109239050600a83611088565b9150610904565b60008167ffffffffffffffff81111561094557610945610d15565b6040519080825280601f01601f19166020018201604052801561096f576020820181803683370190505b5090505b84156109da5761098460018361109c565b9150610991600a866110b3565b61099c9060306110c7565b60f81b8183815181106109b1576109b16110df565b60200101906001600160f81b031916908160001a9053506109d3600a86611088565b9450610973565b949350505050565b8280546109ee90610e79565b90600052602060002090601f016020900481019282610a105760008555610a56565b82601f10610a295782800160ff19823516178555610a56565b82800160010185558215610a56579182015b82811115610a56578235825591602001919060010190610a3b565b50610a62929150610a66565b5090565b5b80821115610a625760008155600101610a67565b60008083601f840112610a8d57600080fd5b50813567ffffffffffffffff811115610aa557600080fd5b602083019150836020828501011115610abd57600080fd5b9250929050565b600080600080600080600060c0888a031215610adf57600080fd5b873567ffffffffffffffff80821115610af757600080fd5b9089019060e0828c031215610b0b57600080fd5b90975060208901359650604089013595506060890135945060808901359080821115610b3657600080fd5b50610b438a828b01610a7b565b989b979a5095989497959660a090950135949350505050565b80356001600160a01b03811681146108d757600080fd5b60008060008060008060008060e0898b031215610b8f57600080fd5b8835975060208901359650610ba660408a01610b5c565b9550606089013567ffffffffffffffff811115610bc257600080fd5b610bce8b828c01610a7b565b9096509450610be1905060808a01610b5c565b925060a0890135915060c089013590509295985092959890939650565b600080600080600060808688031215610c1657600080fd5b8535945060208601359350604086013567ffffffffffffffff811115610c3b57600080fd5b610c4788828901610a7b565b96999598509660600135949350505050565b6000808335601e19843603018112610c7057600080fd5b83018035915067ffffffffffffffff821115610c8b57600080fd5b602001915036819003821315610abd57600080fd5b600060208284031215610cb257600080fd5b610cbb82610b5c565b9392505050565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b848152836020820152606060408201526000610d0b606083018486610cc2565b9695505050505050565b634e487b7160e01b600052604160045260246000fd5b60005b83811015610d46578181015183820152602001610d2e565b83811115610d55576000848401525b50505050565b600060208284031215610d6d57600080fd5b815167ffffffffffffffff80821115610d8557600080fd5b818401915084601f830112610d9957600080fd5b815181811115610dab57610dab610d15565b604051601f8201601f19908116603f01168101908382118183101715610dd357610dd3610d15565b81604052828152876020848701011115610dec57600080fd5b610dfd836020830160208801610d2b565b979650505050505050565b60008151808452610e20816020860160208601610d2b565b601f01601f19169290920160200192915050565b604081526000610e476040830185610e08565b90508260208301529392505050565b838152604060208201526000610e70604083018486610cc2565b95945050505050565b600181811c90821680610e8d57607f821691505b60208210811415610eae57634e487b7160e01b600052602260045260246000fd5b50919050565b600060208284031215610ec657600080fd5b5051919050565b60018060a01b0386168152846020820152836040820152608060608201526000610dfd608083018486610cc2565b805160208201516001600160e01b03198082169291906004831015610f2a5780818460040360031b1b83161693505b505050919050565b60008451610f44818460208901610d2b565b652d4e6f74652d60d01b9083019081528451610f67816006840160208901610d2b565b602d60f81b600692909101918201528351610f89816007840160208801610d2b565b0160070195945050505050565b6001600160e01b031984168152652d4e6f74652d60d01b60048201528251600090610fc881600a850160208801610d2b565b602d60f81b600a918401918201528351610fe981600b840160208801610d2b565b01600b0195945050505050565b85815284602082015260018060a01b038416604082015260a06060820152600061102360a0830185610e08565b82810360808401526110358185610e08565b98975050505050505050565b634e487b7160e01b600052601160045260246000fd5b600060001982141561106b5761106b611041565b5060010190565b634e487b7160e01b600052601260045260246000fd5b60008261109757611097611072565b500490565b6000828210156110ae576110ae611041565b500390565b6000826110c2576110c2611072565b500690565b600082198211156110da576110da611041565b500190565b634e487b7160e01b600052603260045260246000fdfea26469706673582212205e509af29d2641bfb9bf641c6c38c7e56a17766303994330ed4d16456bff40e264736f6c634300080a0033

Deployed ByteCode

0x73672dc6510e7f7fba3c0b0f35d84c749910296f9f301460806040526004361061004b5760003560e01c806342a34a53146100505780635be6941514610072578063ff97fd41146100a4575b600080fd5b81801561005c57600080fd5b5061007061006b366004610ac4565b6100c4565b005b81801561007e57600080fd5b5061009261008d366004610b73565b610414565b60405190815260200160405180910390f35b8180156100b057600080fd5b506100706100bf366004610bfe565b610675565b863585156100ed576000818152602083815260408083208a845290915290208681556001018590555b6100fa6020890189610c59565b6000838152602085815260408083208c84529091529020610120926002909101916109e2565b506101316060890160408a01610ca0565b6000828152602084815260408083208b8452909152902060030180546001600160a01b0319166001600160a01b039290921691909117905561017960a0890160808a01610ca0565b6000828152602084815260408083208b845290915280822060040180546001600160a01b0319166001600160a01b039490941693909317909255906101c49060608b01908b01610ca0565b6001600160a01b0316146102bf5760006101e460608a0160408b01610ca0565b6001600160a01b031663f0336077838a61020160608e018e610c59565b6040518563ffffffff1660e01b81526004016102209493929190610ceb565b6000604051808303816000875af115801561023f573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526102679190810190610d5b565b905061027960608a0160408b01610ca0565b6001600160a01b031688837f889c6317f76b8527935ed434226767d05f8b7c664d99f6f787e62efd558f6f0184426040516102b5929190610e34565b60405180910390a4505b60006102d160a08a0160808b01610ca0565b6001600160a01b0316146103cc5760006102f160a08a0160808b01610ca0565b6001600160a01b0316637dd37a9e838a61030e60a08e018e610c59565b6040518563ffffffff1660e01b815260040161032d9493929190610ceb565b6000604051808303816000875af115801561034c573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526103749190810190610d5b565b905061038660a08a0160808b01610ca0565b6001600160a01b031688837f36e973ebf2a1c9c4006aaad244866e6dea9a0e85770deea599b193a9eb51b8f784426040516103c2929190610e34565b60405180910390a4505b8487827f6ea6daa2449ded342bb92186e54e576ec7c6a729d4ccbf6f364e1bd1f1a5274089888860405161040293929190610e56565b60405180910390a45050505050505050565b6000888152602082815260408083208a84529091528120600501546001600160a01b03168061051c576104e68a8a8660008e8152602001908152602001600020600101805461046290610e79565b80601f016020809104026020016040519081016040528092919081815260200182805461048e90610e79565b80156104db5780601f106104b0576101008083540402835291602001916104db565b820191906000526020600020905b8154815290600101906020018083116104be57829003601f168201915b505050505088610742565b60008b8152602085815260408083208d8452909152902060050180546001600160a01b0319166001600160a01b03831617905590505b6040516335313c2160e11b81526001600160a01b038981166004830152821690636a627842906024016020604051808303816000875af1158015610564573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105889190610eb4565b60008b8152602085815260408083208d84529091529020600401549092506001600160a01b0316801561061c57604051637f20dc2160e01b81526001600160a01b03821690637f20dc21906105e9908c908f908f908e908e90600401610ecd565b600060405180830381600087803b15801561060357600080fd5b505af1158015610617573d6000803e3d6000fd5b505050505b604080516001600160a01b038481168252602082018690528c928e92918d16917f6f1704cf3bc1cfc1bc2284eee0ba541a208bc80989f559ed39cc6567d77cf212910160405180910390a4505098975050505050505050565b600085815260208281526040808320878452909152902060050154600160a81b900460ff16156106d95760405162461bcd60e51b815260206004820152600a602482015269139bdd19531bd8dad95960b21b60448201526064015b60405180910390fd5b60008581526020828152604080832087845290915290206106fe9060020184846109e2565b50847f179143dd0d35a50f482efc003aa5b84a0c3a40d74e9cc2d7ea3053b9e8c3769785858560405161073393929190610e56565b60405180910390a25050505050565b60008061074e8361083f565b9050600061075b85610efb565b9050600085610769896108dc565b610772896108dc565b60405160200161078493929190610f32565b60405160208183030381529060405290506000826107a18a6108dc565b6107aa8a6108dc565b6040516020016107bc93929190610f96565b60408051601f19818403018152908290526317eb5c4360e11b825291506001600160a01b03851690632fd6b88690610800908c908c90309088908890600401610ff6565b600060405180830381600087803b15801561081a57600080fd5b505af115801561082e573d6000803e3d6000fd5b50959b9a5050505050505050505050565b6000604051733d602d80600a3d3981f3363d3d373d3d3d363d7360601b81528260601b60148201526e5af43d82803e903d91602b57fd5bf360881b60288201526037816000f09150506001600160a01b0381166108d75760405162461bcd60e51b8152602060048201526016602482015275115490cc4c4d8dce8818dc99585d194819985a5b195960521b60448201526064016106d0565b919050565b6060816109005750506040805180820190915260018152600360fc1b602082015290565b8160005b811561092a578061091481611057565b91506109239050600a83611088565b9150610904565b60008167ffffffffffffffff81111561094557610945610d15565b6040519080825280601f01601f19166020018201604052801561096f576020820181803683370190505b5090505b84156109da5761098460018361109c565b9150610991600a866110b3565b61099c9060306110c7565b60f81b8183815181106109b1576109b16110df565b60200101906001600160f81b031916908160001a9053506109d3600a86611088565b9450610973565b949350505050565b8280546109ee90610e79565b90600052602060002090601f016020900481019282610a105760008555610a56565b82601f10610a295782800160ff19823516178555610a56565b82800160010185558215610a56579182015b82811115610a56578235825591602001919060010190610a3b565b50610a62929150610a66565b5090565b5b80821115610a625760008155600101610a67565b60008083601f840112610a8d57600080fd5b50813567ffffffffffffffff811115610aa557600080fd5b602083019150836020828501011115610abd57600080fd5b9250929050565b600080600080600080600060c0888a031215610adf57600080fd5b873567ffffffffffffffff80821115610af757600080fd5b9089019060e0828c031215610b0b57600080fd5b90975060208901359650604089013595506060890135945060808901359080821115610b3657600080fd5b50610b438a828b01610a7b565b989b979a5095989497959660a090950135949350505050565b80356001600160a01b03811681146108d757600080fd5b60008060008060008060008060e0898b031215610b8f57600080fd5b8835975060208901359650610ba660408a01610b5c565b9550606089013567ffffffffffffffff811115610bc257600080fd5b610bce8b828c01610a7b565b9096509450610be1905060808a01610b5c565b925060a0890135915060c089013590509295985092959890939650565b600080600080600060808688031215610c1657600080fd5b8535945060208601359350604086013567ffffffffffffffff811115610c3b57600080fd5b610c4788828901610a7b565b96999598509660600135949350505050565b6000808335601e19843603018112610c7057600080fd5b83018035915067ffffffffffffffff821115610c8b57600080fd5b602001915036819003821315610abd57600080fd5b600060208284031215610cb257600080fd5b610cbb82610b5c565b9392505050565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b848152836020820152606060408201526000610d0b606083018486610cc2565b9695505050505050565b634e487b7160e01b600052604160045260246000fd5b60005b83811015610d46578181015183820152602001610d2e565b83811115610d55576000848401525b50505050565b600060208284031215610d6d57600080fd5b815167ffffffffffffffff80821115610d8557600080fd5b818401915084601f830112610d9957600080fd5b815181811115610dab57610dab610d15565b604051601f8201601f19908116603f01168101908382118183101715610dd357610dd3610d15565b81604052828152876020848701011115610dec57600080fd5b610dfd836020830160208801610d2b565b979650505050505050565b60008151808452610e20816020860160208601610d2b565b601f01601f19169290920160200192915050565b604081526000610e476040830185610e08565b90508260208301529392505050565b838152604060208201526000610e70604083018486610cc2565b95945050505050565b600181811c90821680610e8d57607f821691505b60208210811415610eae57634e487b7160e01b600052602260045260246000fd5b50919050565b600060208284031215610ec657600080fd5b5051919050565b60018060a01b0386168152846020820152836040820152608060608201526000610dfd608083018486610cc2565b805160208201516001600160e01b03198082169291906004831015610f2a5780818460040360031b1b83161693505b505050919050565b60008451610f44818460208901610d2b565b652d4e6f74652d60d01b9083019081528451610f67816006840160208901610d2b565b602d60f81b600692909101918201528351610f89816007840160208801610d2b565b0160070195945050505050565b6001600160e01b031984168152652d4e6f74652d60d01b60048201528251600090610fc881600a850160208801610d2b565b602d60f81b600a918401918201528351610fe981600b840160208801610d2b565b01600b0195945050505050565b85815284602082015260018060a01b038416604082015260a06060820152600061102360a0830185610e08565b82810360808401526110358185610e08565b98975050505050505050565b634e487b7160e01b600052601160045260246000fd5b600060001982141561106b5761106b611041565b5060010190565b634e487b7160e01b600052601260045260246000fd5b60008261109757611097611072565b500490565b6000828210156110ae576110ae611041565b500390565b6000826110c2576110c2611072565b500690565b600082198211156110da576110da611041565b500190565b634e487b7160e01b600052603260045260246000fdfea26469706673582212205e509af29d2641bfb9bf641c6c38c7e56a17766303994330ed4d16456bff40e264736f6c634300080a0033