Contract Address Details

0x328610484ba1fAAE0fCDEe44990D199cD84c8608

Contract Name
ApprovalMintModule
Creator
0xe01c8d–e085f7 at 0x8021a3–24cda0
Balance
0 CSB
Tokens
Fetching tokens...
Transactions
4 Transactions
Transfers
0 Transfers
Gas Used
198,572
Last Balance Update
81830439
Contract name:
ApprovalMintModule




Optimization enabled
true
Compiler version
v0.8.16+commit.07a7930e




Optimization runs
200
Verified at
2023-03-17T06:50:55.747247Z

Constructor Arguments

000000000000000000000000a6f969045641cf486a747a2688f3a5a6d43cd0d8

Arg [0] (address) : 0xa6f969045641cf486a747a2688f3a5a6d43cd0d8

              

contracts/modules/mint/ApprovalMintModule.sol

// SPDX-License-Identifier: MIT
pragma solidity 0.8.16;

import {ModuleBase} from "../ModuleBase.sol";
import {ErrNotCharacterOwner, ErrNotApprovedOrExceedApproval} from "../../libraries/Error.sol";
import {Events} from "../../libraries/Events.sol";
import {IMintModule4Note} from "../../interfaces/IMintModule4Note.sol";
import {IERC721} from "@openzeppelin/contracts/token/ERC721/IERC721.sol";

/**
 * @title ApprovalMintModule
 * @notice This is a simple MintModule implementation, inheriting from the IMintModule4Note interface.
 */
contract ApprovalMintModule is IMintModule4Note, ModuleBase {
    struct ApprovedInfo {
        uint256 approvedAmount;
        uint256 mintedAmount;
    }
    // characterId => noteId => address => ApprovedInfo
    mapping(uint256 => mapping(uint256 => mapping(address => ApprovedInfo))) internal _approvedInfo;

    // solhint-disable-next-line no-empty-blocks
    constructor(address web3Entry_) ModuleBase(web3Entry_) {}

    /**
     * @dev The data should an abi encoded bytes, containing (in order): an address array and an uint256
     */
    /// @inheritdoc IMintModule4Note
    function initializeMintModule(
        uint256 characterId,
        uint256 noteId,
        bytes calldata data
    ) external override onlyWeb3Entry returns (bytes memory) {
        if (data.length > 0) {
            (address[] memory addresses, uint256 approvedAmount) = abi.decode(
                data,
                (address[], uint256)
            );
            _setApprovedAmount(characterId, noteId, addresses, approvedAmount);
        }
        return data;
    }

    /**
     * @notice Set the approved addresses for minting and the approvedAmount allowed to be minted. <br>
     * The approvedAmount is 0 by default, and you can also revoke the approval for addresses by
     * setting the approvedAmount to 0.
     * @param characterId The character ID of the note owner.
     * @param noteId The ID of the note.
     * @param addresses The Addresses to set.
     * @param approvedAmount The amount of NFTs allowed to be minted.
     */
    // solhint-disable-next-line comprehensive-interface
    function setApprovedAmount(
        uint256 characterId,
        uint256 noteId,
        address[] calldata addresses,
        uint256 approvedAmount
    ) external {
        // msg.sender should be the character owner
        address owner = IERC721(web3Entry).ownerOf(characterId);
        if (msg.sender != owner) revert ErrNotCharacterOwner();

        _setApprovedAmount(characterId, noteId, addresses, approvedAmount);
    }

    /**
     * @notice  Process minting and check if the caller is eligible.
     */
    /// @inheritdoc IMintModule4Note
    function processMint(
        address to,
        uint256 characterId,
        uint256 noteId,
        bytes calldata
    ) external override onlyWeb3Entry {
        ApprovedInfo storage approval = _approvedInfo[characterId][noteId][to];
        if (approval.approvedAmount <= approval.mintedAmount) {
            revert ErrNotApprovedOrExceedApproval();
        } else {
            ++approval.mintedAmount;
        }
    }

    /**
     * @notice Returns the approved info indicates the approved amount and minted amount of an address.
     * @param characterId ID of the character to query.
     * @param noteId  ID of the note to query.
     * @param account The address to query.
     * @return approvedAmount The approved amount that the address can mint.
     * @return mintedAmount The amount that the address has already minted.
     */
    // solhint-disable-next-line comprehensive-interface
    function getApprovedInfo(
        uint256 characterId,
        uint256 noteId,
        address account
    ) external view returns (uint256 approvedAmount, uint256 mintedAmount) {
        approvedAmount = _approvedInfo[characterId][noteId][account].approvedAmount;
        mintedAmount = _approvedInfo[characterId][noteId][account].mintedAmount;
    }

    function _setApprovedAmount(
        uint256 characterId,
        uint256 noteId,
        address[] memory addresses,
        uint256 approvedAmount
    ) internal {
        uint256 len = addresses.length;
        for (uint256 i = 0; i < len; ) {
            _approvedInfo[characterId][noteId][addresses[i]].approvedAmount = approvedAmount;

            unchecked {
                ++i;
            }
        }
        emit Events.SetApprovedMintAmount4Addresses(characterId, noteId, approvedAmount, addresses);
    }
}
        

@openzeppelin/contracts/token/ERC721/IERC721.sol

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC721/IERC721.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

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

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

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

@openzeppelin/contracts/utils/introspection/IERC165.sol

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

pragma solidity ^0.8.0;

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

contracts/interfaces/IMintModule4Note.sol

// SPDX-License-Identifier: MIT
pragma solidity 0.8.16;

interface IMintModule4Note {
    /**
     * @notice  Initialize the MintModule for a specific note.
     * @param   characterId  The character ID of the note to initialize.
     * @param   noteId  The note ID to initialize.
     * @param   data  The data passed from the user to be decoded.
     * @return  bytes  The returned data of calling initializeMintModule.
     */
    function initializeMintModule(
        uint256 characterId,
        uint256 noteId,
        bytes calldata data
    ) external returns (bytes memory);

    /**
     * @notice Processes the mint logic. <br>
     * Triggered when the `mintNote` of web3Entry is called, if mint module of note is set.
     * @param   to  The receive address of the NFT.
     * @param   characterId  The character ID of the note owner.
     * @param   noteId  The note ID.
     * @param   data  The data passed from the user to be decoded.
     */
    function processMint(
        address to,
        uint256 characterId,
        uint256 noteId,
        bytes calldata data
    ) external;
}
          

contracts/libraries/Error.sol

// SPDX-License-Identifier: MIT

pragma solidity 0.8.16;

/// @dev Character ID not exists
error ErrCharacterNotExists(uint256 characterId);

/// @dev Not owner of address
error ErrNotAddressOwner();

/// @dev Caller is not the owner of character
error ErrNotCharacterOwner();

/// @dev Note has been locked
error ErrNoteLocked();

/// @dev Handle does not exist
error ErrHandleExists();

/// @dev Social token address does not exist
error ErrSocialTokenExists();

/// @dev Handle length too long or too short
error ErrHandleLengthInvalid();

/// @dev Handle contains invalid characters
error ErrHandleContainsInvalidCharacters();

/// @dev  Operator has not enough permission for this character
error ErrNotEnoughPermission();

/// @dev Operator has not enough permissions for this note
error ErrNotEnoughPermissionForThisNote();

/// @dev Target address already has primary character
error ErrTargetAlreadyHasPrimaryCharacter();

/// @dev Note has been deleted
error ErrNoteIsDeleted();

/// @dev Note does not exist
error ErrNoteNotExists();

/// @dev Array length mismatch
error ErrArrayLengthMismatch();

/// @dev Caller is not web3Entry contract
error ErrCallerNotWeb3Entry();

/// @dev Caller is not web3Entry contract, and not the owner of character
error ErrCallerNotWeb3EntryOrNotOwner();

/// @dev Token id already exists
error ErrTokenIdAlreadyExists();

/// @dev Character does not exist
error ErrNotExistingCharacter();

/// @dev Token id of linklist does not exist
error ErrNotExistingLinklistToken();

/// @dev Invalid web3Entry address
error ErrInvalidWeb3Entry();

/// @dev Not approved by module or exceed the approval amount
error ErrNotApprovedOrExceedApproval();
          

contracts/libraries/Events.sol

// SPDX-License-Identifier: MIT

pragma solidity 0.8.16;

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 GrantOperatorPermissions(
        uint256 indexed characterId,
        address indexed operator,
        uint256 permissionBitMap
    );

    event GrantOperators4Note(
        uint256 indexed characterId,
        uint256 indexed noteId,
        address[] blocklist,
        address[] allowlist
    );

    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 linkModuleInitData,
        bytes returnData
    );

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

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

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

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

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

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

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

    event SetApprovedMintAmount4Addresses(
        uint256 indexed characterId,
        uint256 indexed noteId,
        uint256 indexed amount,
        address[] approvedAddresses
    );
}
          

contracts/modules/ModuleBase.sol

// SPDX-License-Identifier: MIT
pragma solidity 0.8.16;

import {ErrCallerNotWeb3Entry, ErrInvalidWeb3Entry} from "../libraries/Error.sol";

abstract contract ModuleBase {
    address public immutable web3Entry;

    modifier onlyWeb3Entry() {
        if (msg.sender != web3Entry) revert ErrCallerNotWeb3Entry();
        _;
    }

    constructor(address web3Entry_) {
        if (web3Entry_ == address(0)) revert ErrInvalidWeb3Entry();
        web3Entry = web3Entry_;
    }
}
          

Compiler Settings

{"outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode","evm.methodIdentifiers","metadata"],"":["ast"]}},"optimizer":{"runs":200,"enabled":true},"libraries":{}}
              

Contract ABI

[{"type":"constructor","stateMutability":"nonpayable","inputs":[{"type":"address","name":"web3Entry_","internalType":"address"}]},{"type":"error","name":"ErrCallerNotWeb3Entry","inputs":[]},{"type":"error","name":"ErrInvalidWeb3Entry","inputs":[]},{"type":"error","name":"ErrNotApprovedOrExceedApproval","inputs":[]},{"type":"error","name":"ErrNotCharacterOwner","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"approvedAmount","internalType":"uint256"},{"type":"uint256","name":"mintedAmount","internalType":"uint256"}],"name":"getApprovedInfo","inputs":[{"type":"uint256","name":"characterId","internalType":"uint256"},{"type":"uint256","name":"noteId","internalType":"uint256"},{"type":"address","name":"account","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"bytes","name":"","internalType":"bytes"}],"name":"initializeMintModule","inputs":[{"type":"uint256","name":"characterId","internalType":"uint256"},{"type":"uint256","name":"noteId","internalType":"uint256"},{"type":"bytes","name":"data","internalType":"bytes"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"processMint","inputs":[{"type":"address","name":"to","internalType":"address"},{"type":"uint256","name":"characterId","internalType":"uint256"},{"type":"uint256","name":"noteId","internalType":"uint256"},{"type":"bytes","name":"","internalType":"bytes"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setApprovedAmount","inputs":[{"type":"uint256","name":"characterId","internalType":"uint256"},{"type":"uint256","name":"noteId","internalType":"uint256"},{"type":"address[]","name":"addresses","internalType":"address[]"},{"type":"uint256","name":"approvedAmount","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"web3Entry","inputs":[]}]
              

Contract Creation Code

0x60a060405234801561001057600080fd5b5060405161091438038061091483398101604081905261002f91610069565b806001600160a01b03811661005757604051630acbf3f760e11b815260040160405180910390fd5b6001600160a01b031660805250610099565b60006020828403121561007b57600080fd5b81516001600160a01b038116811461009257600080fd5b9392505050565b60805161084c6100c86000396000818160f30152818161014d015281816101fe01526102c0015261084c6000f3fe608060405234801561001057600080fd5b50600436106100575760003560e01c806354bec78b1461005c5780637dd37a9e146100b95780637f20dc21146100d9578063e1332272146100ee578063e1a2c9361461012d575b600080fd5b61009f61006a36600461046f565b6000928352602083815260408085209385529281528284206001600160a01b0392909216845252902080546001909101549091565b604080519283526020830191909152015b60405180910390f35b6100cc6100c73660046104f1565b610140565b6040516100b09190610544565b6100ec6100e7366004610592565b6101f3565b005b6101157f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100b0565b6100ec61013b3660046105fc565b6102a7565b6060336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461018b576040516302b6341b60e41b815260040160405180910390fd5b81156101b3576000806101a08486018661069d565b915091506101b08787848461039e565b50505b82828080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509298975050505050505050565b336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461023c576040516302b6341b60e41b815260040160405180910390fd5b60008481526020818152604080832086845282528083206001600160a01b0389168452909152902060018101548154116102895760405163013815b160e51b815260040160405180910390fd5b806001016000815461029a90610768565b909155505b505050505050565b6040516331a9108f60e11b8152600481018690526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690636352211e90602401602060405180830381865afa15801561030f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610333919061078f565b9050336001600160a01b0382161461035e57604051631b0c476f60e11b815260040160405180910390fd5b61029f868686868080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525088925061039e915050565b815160005b8181101561040557600086815260208181526040808320888452909152812085518592908790859081106103d9576103d96107b3565b6020908102919091018101516001600160a01b03168252810191909152604001600020556001016103a3565b508184867f1e10538c13505897fea8535a8c31310ec25843d51f10c5ab5e4b5e01c809b6b28660405161043891906107c9565b60405180910390a45050505050565b6001600160a01b038116811461045c57600080fd5b50565b803561046a81610447565b919050565b60008060006060848603121561048457600080fd5b8335925060208401359150604084013561049d81610447565b809150509250925092565b60008083601f8401126104ba57600080fd5b50813567ffffffffffffffff8111156104d257600080fd5b6020830191508360208285010111156104ea57600080fd5b9250929050565b6000806000806060858703121561050757600080fd5b8435935060208501359250604085013567ffffffffffffffff81111561052c57600080fd5b610538878288016104a8565b95989497509550505050565b600060208083528351808285015260005b8181101561057157858101830151858201604001528201610555565b506000604082860101526040601f19601f8301168501019250505092915050565b6000806000806000608086880312156105aa57600080fd5b85356105b581610447565b94506020860135935060408601359250606086013567ffffffffffffffff8111156105df57600080fd5b6105eb888289016104a8565b969995985093965092949392505050565b60008060008060006080868803121561061457600080fd5b8535945060208601359350604086013567ffffffffffffffff8082111561063a57600080fd5b818801915088601f83011261064e57600080fd5b81358181111561065d57600080fd5b8960208260051b850101111561067257600080fd5b96999598505060200195606001359392505050565b634e487b7160e01b600052604160045260246000fd5b600080604083850312156106b057600080fd5b823567ffffffffffffffff808211156106c857600080fd5b818501915085601f8301126106dc57600080fd5b81356020828211156106f0576106f0610687565b8160051b604051601f19603f8301168101818110868211171561071557610715610687565b60405292835281830193508481018201928984111561073357600080fd5b948201945b83861015610758576107498661045f565b85529482019493820193610738565b9997909101359750505050505050565b60006001820161078857634e487b7160e01b600052601160045260246000fd5b5060010190565b6000602082840312156107a157600080fd5b81516107ac81610447565b9392505050565b634e487b7160e01b600052603260045260246000fd5b6020808252825182820181905260009190848201906040850190845b8181101561080a5783516001600160a01b0316835292840192918401916001016107e5565b5090969550505050505056fea26469706673582212208a888b848c18d78c0765746bf21c41da3383b9600e04501ec14b504ae3c23dde64736f6c63430008100033000000000000000000000000a6f969045641cf486a747a2688f3a5a6d43cd0d8

Deployed ByteCode

0x608060405234801561001057600080fd5b50600436106100575760003560e01c806354bec78b1461005c5780637dd37a9e146100b95780637f20dc21146100d9578063e1332272146100ee578063e1a2c9361461012d575b600080fd5b61009f61006a36600461046f565b6000928352602083815260408085209385529281528284206001600160a01b0392909216845252902080546001909101549091565b604080519283526020830191909152015b60405180910390f35b6100cc6100c73660046104f1565b610140565b6040516100b09190610544565b6100ec6100e7366004610592565b6101f3565b005b6101157f000000000000000000000000a6f969045641cf486a747a2688f3a5a6d43cd0d881565b6040516001600160a01b0390911681526020016100b0565b6100ec61013b3660046105fc565b6102a7565b6060336001600160a01b037f000000000000000000000000a6f969045641cf486a747a2688f3a5a6d43cd0d8161461018b576040516302b6341b60e41b815260040160405180910390fd5b81156101b3576000806101a08486018661069d565b915091506101b08787848461039e565b50505b82828080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509298975050505050505050565b336001600160a01b037f000000000000000000000000a6f969045641cf486a747a2688f3a5a6d43cd0d8161461023c576040516302b6341b60e41b815260040160405180910390fd5b60008481526020818152604080832086845282528083206001600160a01b0389168452909152902060018101548154116102895760405163013815b160e51b815260040160405180910390fd5b806001016000815461029a90610768565b909155505b505050505050565b6040516331a9108f60e11b8152600481018690526000907f000000000000000000000000a6f969045641cf486a747a2688f3a5a6d43cd0d86001600160a01b031690636352211e90602401602060405180830381865afa15801561030f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610333919061078f565b9050336001600160a01b0382161461035e57604051631b0c476f60e11b815260040160405180910390fd5b61029f868686868080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525088925061039e915050565b815160005b8181101561040557600086815260208181526040808320888452909152812085518592908790859081106103d9576103d96107b3565b6020908102919091018101516001600160a01b03168252810191909152604001600020556001016103a3565b508184867f1e10538c13505897fea8535a8c31310ec25843d51f10c5ab5e4b5e01c809b6b28660405161043891906107c9565b60405180910390a45050505050565b6001600160a01b038116811461045c57600080fd5b50565b803561046a81610447565b919050565b60008060006060848603121561048457600080fd5b8335925060208401359150604084013561049d81610447565b809150509250925092565b60008083601f8401126104ba57600080fd5b50813567ffffffffffffffff8111156104d257600080fd5b6020830191508360208285010111156104ea57600080fd5b9250929050565b6000806000806060858703121561050757600080fd5b8435935060208501359250604085013567ffffffffffffffff81111561052c57600080fd5b610538878288016104a8565b95989497509550505050565b600060208083528351808285015260005b8181101561057157858101830151858201604001528201610555565b506000604082860101526040601f19601f8301168501019250505092915050565b6000806000806000608086880312156105aa57600080fd5b85356105b581610447565b94506020860135935060408601359250606086013567ffffffffffffffff8111156105df57600080fd5b6105eb888289016104a8565b969995985093965092949392505050565b60008060008060006080868803121561061457600080fd5b8535945060208601359350604086013567ffffffffffffffff8082111561063a57600080fd5b818801915088601f83011261064e57600080fd5b81358181111561065d57600080fd5b8960208260051b850101111561067257600080fd5b96999598505060200195606001359392505050565b634e487b7160e01b600052604160045260246000fd5b600080604083850312156106b057600080fd5b823567ffffffffffffffff808211156106c857600080fd5b818501915085601f8301126106dc57600080fd5b81356020828211156106f0576106f0610687565b8160051b604051601f19603f8301168101818110868211171561071557610715610687565b60405292835281830193508481018201928984111561073357600080fd5b948201945b83861015610758576107498661045f565b85529482019493820193610738565b9997909101359750505050505050565b60006001820161078857634e487b7160e01b600052601160045260246000fd5b5060010190565b6000602082840312156107a157600080fd5b81516107ac81610447565b9392505050565b634e487b7160e01b600052603260045260246000fd5b6020808252825182820181905260009190848201906040850190845b8181101561080a5783516001600160a01b0316835292840192918401916001016107e5565b5090969550505050505056fea26469706673582212208a888b848c18d78c0765746bf21c41da3383b9600e04501ec14b504ae3c23dde64736f6c63430008100033