ETH Price: $3,219.85 (+2.77%)

Token

Staked Kei Positions (sKEI.POS)
 

Overview

Max Total Supply

17 sKEI.POS

Holders

15

Market

Volume (24H)

N/A

Min Price (24H)

N/A

Max Price (24H)

N/A
Balance
1 sKEI.POS
0xc5e83444cb9127c8d2a941f887fc36ba18a95d03
Loading...
Loading
Loading...
Loading
Loading...
Loading

Click here to update the token information / general information
# Exchange Pair Price  24H Volume % Volume
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:
StakingPositionManager

Compiler Version
v0.8.19+commit.7dd6d404

Optimization Enabled:
Yes with 1000 runs

Other Settings:
default evmVersion
File 1 of 33 : StakingPositionManager.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.9;

import "../../../library/ERC20/IERC20Partition.sol";
import "../../../library/ERC721/KEIERC721.sol";

import "../../../library/Governance/GovernanceLibrary.sol";
import "../../../core/Staking/IStaking.sol";

import "./IStakingPositionManager.sol";

contract StakingPositionManager is IStakingPositionManager, KEIERC721 {

    address public immutable override STAKING;
    address public immutable override STAKING_TOKEN;

    // mapping from NFT id to stake id
    mapping(uint256 => TokenDetails) private $details;

    uint256 private $nextTokenId = 1;

    constructor(address staking)
    ERC721("Staked Kei Positions", "sKEI.POS") {
        STAKING = staking;
        STAKING_TOKEN = IStaking(staking).STAKING_TOKEN();
    }

    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
        return interfaceId == type(IStakingPositionManager).interfaceId ||
            super.supportsInterface(interfaceId);
    }

    function stakeBalanceOf(uint256 tokenId) external view override returns (bytes32 _stakeId, uint256 _stakeBalance) {
        _requireMinted(tokenId);
        TokenDetails memory _details = $details[tokenId];
        _stakeId = _details.stakeId;
        _stakeBalance = IERC20Partition(STAKING_TOKEN).balanceOf(_details.container, _stakeId);
    }

    function stakeId(uint256 tokenId) external view override returns (bytes32) {
        return $details[tokenId].stakeId;
    }

    function setDelegate(uint256 tokenId, address target) external whenNotPaused override {
        require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: caller is not token owner nor approved");
        IVotesContainer($details[tokenId].container).delegate(STAKING_TOKEN, target);
    }

    function mint(
        bytes32 stakeId_,
        uint256 amount,
        address owner,
        bytes memory data
    ) external whenNotPaused override returns (uint256 tokenId) {
        tokenId = $nextTokenId++;

        IERC20Partition stakingToken = IERC20Partition(STAKING_TOKEN);
        address container = GovernanceLibrary.createVotesContainer();

        require(amount > 0, 'StakingPositionManager: INVALID_AMOUNT');

        $details[tokenId] = TokenDetails(stakeId_, container);

        stakingToken.transferFrom(
            _msgSender(),
            container,
            stakeId_,
            amount,
            "StakingPositionManager: MINT"
        );

        _safeMint(owner, tokenId, data);

        emit Mint(
            tokenId,
            stakeId_,
            amount,
            container,
            owner,
            _msgSender()
        );
    }

    function burn(
        uint256 tokenId,
        address recipient,
        bytes memory data
    ) external override whenNotPaused returns (bytes32 stakeId_, uint256 tokensReleased) {
        require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: caller is not token owner nor approved");
        IERC20Partition stakingToken = IERC20Partition(STAKING_TOKEN);

        _burn(tokenId);

        TokenDetails memory _details = $details[tokenId];
        delete $details[tokenId];

        stakeId_ = _details.stakeId;
        tokensReleased = stakingToken.balanceOf(_details.container, stakeId_);

        IVotesContainer(_details.container).transfer(
            STAKING_TOKEN,
            stakeId_,
            recipient,
            tokensReleased,
            data
        );

        emit Burn(tokenId, stakeId_, tokensReleased, _msgSender());
    }

    /**
     * @dev Hook that is called before any token transfer. This includes minting and burning. If {ERC721Consecutive} is
     * used, the hook may be called as part of a consecutive (batch) mint, as indicated by `batchSize` greater than 1.
     *
     * Calling conditions:
     *
     * - When `from` and `to` are both non-zero, ``from``'s tokens will be transferred to `to`.
     * - When `from` is zero, the tokens will be minted for `to`.
     * - When `to` is zero, ``from``'s tokens will be burned.
     * - `from` and `to` are never both zero.
     * - `batchSize` is non-zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _beforeTokenTransfer(
        address from,
        address to,
        uint256 firstTokenId,
        uint256 batchSize
    ) internal whenNotPaused virtual override {
        if (to != address(0)) {
            IVotesContainer($details[firstTokenId].container).delegate(STAKING_TOKEN, to);
        }
        super._beforeTokenTransfer(from, to, firstTokenId, batchSize);
    }

    function _tokenURIData(uint256 tokenId) internal view override returns (bytes memory) {
        TokenDetails memory _details = $details[tokenId];
        return abi.encode(
            _details.stakeId,
            IERC20Partition(STAKING_TOKEN).balanceOf(_details.container, _details.stakeId)
        );
    }
}

File 2 of 33 : AccessControl.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (access/AccessControl.sol)

pragma solidity ^0.8.0;

import "./IAccessControl.sol";
import "../utils/Context.sol";
import "../utils/Strings.sol";
import "../utils/introspection/ERC165.sol";

/**
 * @dev Contract module that allows children to implement role-based access
 * control mechanisms. This is a lightweight version that doesn't allow enumerating role
 * members except through off-chain means by accessing the contract event logs. Some
 * applications may benefit from on-chain enumerability, for those cases see
 * {AccessControlEnumerable}.
 *
 * Roles are referred to by their `bytes32` identifier. These should be exposed
 * in the external API and be unique. The best way to achieve this is by
 * using `public constant` hash digests:
 *
 * ```
 * bytes32 public constant MY_ROLE = keccak256("MY_ROLE");
 * ```
 *
 * Roles can be used to represent a set of permissions. To restrict access to a
 * function call, use {hasRole}:
 *
 * ```
 * function foo() public {
 *     require(hasRole(MY_ROLE, msg.sender));
 *     ...
 * }
 * ```
 *
 * Roles can be granted and revoked dynamically via the {grantRole} and
 * {revokeRole} functions. Each role has an associated admin role, and only
 * accounts that have a role's admin role can call {grantRole} and {revokeRole}.
 *
 * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means
 * that only accounts with this role will be able to grant or revoke other
 * roles. More complex role relationships can be created by using
 * {_setRoleAdmin}.
 *
 * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to
 * grant and revoke this role. Extra precautions should be taken to secure
 * accounts that have been granted it.
 */
abstract contract AccessControl is Context, IAccessControl, ERC165 {
    struct RoleData {
        mapping(address => bool) members;
        bytes32 adminRole;
    }

    mapping(bytes32 => RoleData) private _roles;

    bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;

    /**
     * @dev Modifier that checks that an account has a specific role. Reverts
     * with a standardized message including the required role.
     *
     * The format of the revert reason is given by the following regular expression:
     *
     *  /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/
     *
     * _Available since v4.1._
     */
    modifier onlyRole(bytes32 role) {
        _checkRole(role);
        _;
    }

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

    /**
     * @dev Returns `true` if `account` has been granted `role`.
     */
    function hasRole(bytes32 role, address account) public view virtual override returns (bool) {
        return _roles[role].members[account];
    }

    /**
     * @dev Revert with a standard message if `_msgSender()` is missing `role`.
     * Overriding this function changes the behavior of the {onlyRole} modifier.
     *
     * Format of the revert message is described in {_checkRole}.
     *
     * _Available since v4.6._
     */
    function _checkRole(bytes32 role) internal view virtual {
        _checkRole(role, _msgSender());
    }

    /**
     * @dev Revert with a standard message if `account` is missing `role`.
     *
     * The format of the revert reason is given by the following regular expression:
     *
     *  /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/
     */
    function _checkRole(bytes32 role, address account) internal view virtual {
        if (!hasRole(role, account)) {
            revert(
                string(
                    abi.encodePacked(
                        "AccessControl: account ",
                        Strings.toHexString(account),
                        " is missing role ",
                        Strings.toHexString(uint256(role), 32)
                    )
                )
            );
        }
    }

    /**
     * @dev Returns the admin role that controls `role`. See {grantRole} and
     * {revokeRole}.
     *
     * To change a role's admin, use {_setRoleAdmin}.
     */
    function getRoleAdmin(bytes32 role) public view virtual override returns (bytes32) {
        return _roles[role].adminRole;
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     *
     * May emit a {RoleGranted} event.
     */
    function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {
        _grantRole(role, account);
    }

    /**
     * @dev Revokes `role` from `account`.
     *
     * If `account` had been granted `role`, emits a {RoleRevoked} event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     *
     * May emit a {RoleRevoked} event.
     */
    function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {
        _revokeRole(role, account);
    }

    /**
     * @dev Revokes `role` from the calling account.
     *
     * Roles are often managed via {grantRole} and {revokeRole}: this function's
     * purpose is to provide a mechanism for accounts to lose their privileges
     * if they are compromised (such as when a trusted device is misplaced).
     *
     * If the calling account had been revoked `role`, emits a {RoleRevoked}
     * event.
     *
     * Requirements:
     *
     * - the caller must be `account`.
     *
     * May emit a {RoleRevoked} event.
     */
    function renounceRole(bytes32 role, address account) public virtual override {
        require(account == _msgSender(), "AccessControl: can only renounce roles for self");

        _revokeRole(role, account);
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event. Note that unlike {grantRole}, this function doesn't perform any
     * checks on the calling account.
     *
     * May emit a {RoleGranted} event.
     *
     * [WARNING]
     * ====
     * This function should only be called from the constructor when setting
     * up the initial roles for the system.
     *
     * Using this function in any other way is effectively circumventing the admin
     * system imposed by {AccessControl}.
     * ====
     *
     * NOTE: This function is deprecated in favor of {_grantRole}.
     */
    function _setupRole(bytes32 role, address account) internal virtual {
        _grantRole(role, account);
    }

    /**
     * @dev Sets `adminRole` as ``role``'s admin role.
     *
     * Emits a {RoleAdminChanged} event.
     */
    function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {
        bytes32 previousAdminRole = getRoleAdmin(role);
        _roles[role].adminRole = adminRole;
        emit RoleAdminChanged(role, previousAdminRole, adminRole);
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * Internal function without access restriction.
     *
     * May emit a {RoleGranted} event.
     */
    function _grantRole(bytes32 role, address account) internal virtual {
        if (!hasRole(role, account)) {
            _roles[role].members[account] = true;
            emit RoleGranted(role, account, _msgSender());
        }
    }

    /**
     * @dev Revokes `role` from `account`.
     *
     * Internal function without access restriction.
     *
     * May emit a {RoleRevoked} event.
     */
    function _revokeRole(bytes32 role, address account) internal virtual {
        if (hasRole(role, account)) {
            _roles[role].members[account] = false;
            emit RoleRevoked(role, account, _msgSender());
        }
    }
}

File 3 of 33 : IAccessControl.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol)

pragma solidity ^0.8.0;

/**
 * @dev External interface of AccessControl declared to support ERC165 detection.
 */
interface IAccessControl {
    /**
     * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`
     *
     * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite
     * {RoleAdminChanged} not being emitted signaling this.
     *
     * _Available since v3.1._
     */
    event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);

    /**
     * @dev Emitted when `account` is granted `role`.
     *
     * `sender` is the account that originated the contract call, an admin role
     * bearer except when using {AccessControl-_setupRole}.
     */
    event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);

    /**
     * @dev Emitted when `account` is revoked `role`.
     *
     * `sender` is the account that originated the contract call:
     *   - if using `revokeRole`, it is the admin role bearer
     *   - if using `renounceRole`, it is the role bearer (i.e. `account`)
     */
    event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);

    /**
     * @dev Returns `true` if `account` has been granted `role`.
     */
    function hasRole(bytes32 role, address account) external view returns (bool);

    /**
     * @dev Returns the admin role that controls `role`. See {grantRole} and
     * {revokeRole}.
     *
     * To change a role's admin, use {AccessControl-_setRoleAdmin}.
     */
    function getRoleAdmin(bytes32 role) external view returns (bytes32);

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function grantRole(bytes32 role, address account) external;

    /**
     * @dev Revokes `role` from `account`.
     *
     * If `account` had been granted `role`, emits a {RoleRevoked} event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function revokeRole(bytes32 role, address account) external;

    /**
     * @dev Revokes `role` from the calling account.
     *
     * Roles are often managed via {grantRole} and {revokeRole}: this function's
     * purpose is to provide a mechanism for accounts to lose their privileges
     * if they are compromised (such as when a trusted device is misplaced).
     *
     * If the calling account had been granted `role`, emits a {RoleRevoked}
     * event.
     *
     * Requirements:
     *
     * - the caller must be `account`.
     */
    function renounceRole(bytes32 role, address account) external;
}

File 4 of 33 : Clones.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (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) {
        /// @solidity memory-safe-assembly
        assembly {
            // Cleans the upper 96 bits of the `implementation` word, then packs the first 3 bytes
            // of the `implementation` address with the bytecode before the address.
            mstore(0x00, or(shr(0xe8, shl(0x60, implementation)), 0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000))
            // Packs the remaining 17 bytes of `implementation` with the bytecode after the address.
            mstore(0x20, or(shl(0x78, implementation), 0x5af43d82803e903d91602b57fd5bf3))
            instance := create(0, 0x09, 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) {
        /// @solidity memory-safe-assembly
        assembly {
            // Cleans the upper 96 bits of the `implementation` word, then packs the first 3 bytes
            // of the `implementation` address with the bytecode before the address.
            mstore(0x00, or(shr(0xe8, shl(0x60, implementation)), 0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000))
            // Packs the remaining 17 bytes of `implementation` with the bytecode after the address.
            mstore(0x20, or(shl(0x78, implementation), 0x5af43d82803e903d91602b57fd5bf3))
            instance := create2(0, 0x09, 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) {
        /// @solidity memory-safe-assembly
        assembly {
            let ptr := mload(0x40)
            mstore(add(ptr, 0x38), deployer)
            mstore(add(ptr, 0x24), 0x5af43d82803e903d91602b57fd5bf3ff)
            mstore(add(ptr, 0x14), implementation)
            mstore(ptr, 0x3d602d80600a3d3981f3363d3d373d3d3d363d73)
            mstore(add(ptr, 0x58), salt)
            mstore(add(ptr, 0x78), keccak256(add(ptr, 0x0c), 0x37))
            predicted := keccak256(add(ptr, 0x43), 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));
    }
}

File 5 of 33 : Pausable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol)

pragma solidity ^0.8.0;

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

/**
 * @dev Contract module which allows children to implement an emergency stop
 * mechanism that can be triggered by an authorized account.
 *
 * This module is used through inheritance. It will make available the
 * modifiers `whenNotPaused` and `whenPaused`, which can be applied to
 * the functions of your contract. Note that they will not be pausable by
 * simply including this module, only once the modifiers are put in place.
 */
abstract contract Pausable is Context {
    /**
     * @dev Emitted when the pause is triggered by `account`.
     */
    event Paused(address account);

    /**
     * @dev Emitted when the pause is lifted by `account`.
     */
    event Unpaused(address account);

    bool private _paused;

    /**
     * @dev Initializes the contract in unpaused state.
     */
    constructor() {
        _paused = false;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is not paused.
     *
     * Requirements:
     *
     * - The contract must not be paused.
     */
    modifier whenNotPaused() {
        _requireNotPaused();
        _;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is paused.
     *
     * Requirements:
     *
     * - The contract must be paused.
     */
    modifier whenPaused() {
        _requirePaused();
        _;
    }

    /**
     * @dev Returns true if the contract is paused, and false otherwise.
     */
    function paused() public view virtual returns (bool) {
        return _paused;
    }

    /**
     * @dev Throws if the contract is paused.
     */
    function _requireNotPaused() internal view virtual {
        require(!paused(), "Pausable: paused");
    }

    /**
     * @dev Throws if the contract is not paused.
     */
    function _requirePaused() internal view virtual {
        require(paused(), "Pausable: not paused");
    }

    /**
     * @dev Triggers stopped state.
     *
     * Requirements:
     *
     * - The contract must not be paused.
     */
    function _pause() internal virtual whenNotPaused {
        _paused = true;
        emit Paused(_msgSender());
    }

    /**
     * @dev Returns to normal state.
     *
     * Requirements:
     *
     * - The contract must be paused.
     */
    function _unpause() internal virtual whenPaused {
        _paused = false;
        emit Unpaused(_msgSender());
    }
}

File 6 of 33 : ERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.2) (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: address zero is not a valid owner");
        return _balances[owner];
    }

    /**
     * @dev See {IERC721-ownerOf}.
     */
    function ownerOf(uint256 tokenId) public view virtual override returns (address) {
        address owner = _ownerOf(tokenId);
        require(owner != address(0), "ERC721: invalid token ID");
        return owner;
    }

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

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

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

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

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

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

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

        _approve(to, tokenId);
    }

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

        return _tokenApprovals[tokenId];
    }

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

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

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

        _transfer(from, to, tokenId);
    }

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

    /**
     * @dev See {IERC721-safeTransferFrom}.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId,
        bytes memory data
    ) public virtual override {
        require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: caller is not token owner or 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 the owner of the `tokenId`. Does NOT revert if token doesn't exist
     */
    function _ownerOf(uint256 tokenId) internal view virtual returns (address) {
        return _owners[tokenId];
    }

    /**
     * @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 _ownerOf(tokenId) != address(0);
    }

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

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

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

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

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

        // Check that tokenId was not minted by `_beforeTokenTransfer` hook
        require(!_exists(tokenId), "ERC721: token already minted");

        unchecked {
            // Will not overflow unless all 2**256 token ids are minted to the same owner.
            // Given that tokens are minted one by one, it is impossible in practice that
            // this ever happens. Might change if we allow batch minting.
            // The ERC fails to describe this case.
            _balances[to] += 1;
        }

        _owners[tokenId] = to;

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

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

    /**
     * @dev Destroys `tokenId`.
     * The approval is cleared when the token is burned.
     * This is an internal function that does not check if the sender is authorized to operate on the token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     *
     * Emits a {Transfer} event.
     */
    function _burn(uint256 tokenId) internal virtual {
        address owner = ERC721.ownerOf(tokenId);

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

        // Update ownership in case tokenId was transferred by `_beforeTokenTransfer` hook
        owner = ERC721.ownerOf(tokenId);

        // Clear approvals
        delete _tokenApprovals[tokenId];

        unchecked {
            // Cannot overflow, as that would require more tokens to be burned/transferred
            // out than the owner initially received through minting and transferring in.
            _balances[owner] -= 1;
        }
        delete _owners[tokenId];

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

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

    /**
     * @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 from incorrect owner");
        require(to != address(0), "ERC721: transfer to the zero address");

        _beforeTokenTransfer(from, to, tokenId, 1);

        // Check that tokenId was not transferred by `_beforeTokenTransfer` hook
        require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer from incorrect owner");

        // Clear approvals from the previous owner
        delete _tokenApprovals[tokenId];

        unchecked {
            // `_balances[from]` cannot overflow for the same reason as described in `_burn`:
            // `from`'s balance is the number of token held, which is at least one before the current
            // transfer.
            // `_balances[to]` could overflow in the conditions described in `_mint`. That would require
            // all 2**256 token ids to be minted, which in practice is impossible.
            _balances[from] -= 1;
            _balances[to] += 1;
        }
        _owners[tokenId] = to;

        emit Transfer(from, to, tokenId);

        _afterTokenTransfer(from, to, tokenId, 1);
    }

    /**
     * @dev Approve `to` to operate on `tokenId`
     *
     * Emits an {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 an {ApprovalForAll} event.
     */
    function _setApprovalForAll(
        address owner,
        address operator,
        bool approved
    ) internal virtual {
        require(owner != operator, "ERC721: approve to caller");
        _operatorApprovals[owner][operator] = approved;
        emit ApprovalForAll(owner, operator, approved);
    }

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

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

    /**
     * @dev Hook that is called before any token transfer. This includes minting and burning. If {ERC721Consecutive} is
     * used, the hook may be called as part of a consecutive (batch) mint, as indicated by `batchSize` greater than 1.
     *
     * Calling conditions:
     *
     * - When `from` and `to` are both non-zero, ``from``'s tokens will be transferred to `to`.
     * - When `from` is zero, the tokens will be minted for `to`.
     * - When `to` is zero, ``from``'s tokens will be burned.
     * - `from` and `to` are never both zero.
     * - `batchSize` is non-zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _beforeTokenTransfer(
        address from,
        address to,
        uint256 firstTokenId,
        uint256 batchSize
    ) internal virtual {}

    /**
     * @dev Hook that is called after any token transfer. This includes minting and burning. If {ERC721Consecutive} is
     * used, the hook may be called as part of a consecutive (batch) mint, as indicated by `batchSize` greater than 1.
     *
     * Calling conditions:
     *
     * - When `from` and `to` are both non-zero, ``from``'s tokens were transferred to `to`.
     * - When `from` is zero, the tokens were minted for `to`.
     * - When `to` is zero, ``from``'s tokens were burned.
     * - `from` and `to` are never both zero.
     * - `batchSize` is non-zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _afterTokenTransfer(
        address from,
        address to,
        uint256 firstTokenId,
        uint256 batchSize
    ) internal virtual {}

    /**
     * @dev Unsafe write access to the balances, used by extensions that "mint" tokens using an {ownerOf} override.
     *
     * WARNING: Anyone calling this MUST ensure that the balances remain consistent with the ownership. The invariant
     * being that for any address `a` the value returned by `balanceOf(a)` must be equal to the number of tokens such
     * that `ownerOf(tokenId)` is `a`.
     */
    // solhint-disable-next-line func-name-mixedcase
    function __unsafe_increaseBalance(address account, uint256 amount) internal {
        _balances[account] += amount;
    }
}

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

pragma solidity ^0.8.0;

import "../IERC721.sol";

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

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

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

File 8 of 33 : 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);
}

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

pragma solidity ^0.8.0;

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

File 10 of 33 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/Address.sol)

pragma solidity ^0.8.1;

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

        return account.code.length > 0;
    }

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

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

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

    /**
     * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling
     * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.
     *
     * _Available since v4.8._
     */
    function verifyCallResultFromTarget(
        address target,
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        if (success) {
            if (returndata.length == 0) {
                // only check isContract if the call was successful and the return data is empty
                // otherwise we already know that it was a contract
                require(isContract(target), "Address: call to non-contract");
            }
            return returndata;
        } else {
            _revert(returndata, errorMessage);
        }
    }

    /**
     * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason or 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 {
            _revert(returndata, errorMessage);
        }
    }

    function _revert(bytes memory returndata, string memory errorMessage) private pure {
        // 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
            /// @solidity memory-safe-assembly
            assembly {
                let returndata_size := mload(returndata)
                revert(add(32, returndata), returndata_size)
            }
        } else {
            revert(errorMessage);
        }
    }
}

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

pragma solidity ^0.8.0;

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

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

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

pragma solidity ^0.8.0;

import "./IERC165.sol";

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

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

pragma solidity ^0.8.0;

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

File 14 of 33 : Math.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/Math.sol)

pragma solidity ^0.8.0;

/**
 * @dev Standard math utilities missing in the Solidity language.
 */
library Math {
    enum Rounding {
        Down, // Toward negative infinity
        Up, // Toward infinity
        Zero // Toward zero
    }

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

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

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

    /**
     * @dev Returns the ceiling of the division of two numbers.
     *
     * This differs from standard division with `/` in that it rounds up instead
     * of rounding down.
     */
    function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {
        // (a + b - 1) / b can overflow on addition, so we distribute.
        return a == 0 ? 0 : (a - 1) / b + 1;
    }

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

            // Handle non-overflow cases, 256 by 256 division.
            if (prod1 == 0) {
                return prod0 / denominator;
            }

            // Make sure the result is less than 2^256. Also prevents denominator == 0.
            require(denominator > prod1);

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

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

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

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

            // Does not overflow because the denominator cannot be zero at this stage in the function.
            uint256 twos = denominator & (~denominator + 1);
            assembly {
                // Divide denominator by twos.
                denominator := div(denominator, twos)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

File 15 of 33 : Multicall.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (utils/Multicall.sol)

pragma solidity ^0.8.0;

import "./Address.sol";

/**
 * @dev Provides a function to batch together multiple calls in a single external call.
 *
 * _Available since v4.1._
 */
abstract contract Multicall {
    /**
     * @dev Receives and executes a batch of function calls on this contract.
     */
    function multicall(bytes[] calldata data) external virtual returns (bytes[] memory results) {
        results = new bytes[](data.length);
        for (uint256 i = 0; i < data.length; i++) {
            results[i] = Address.functionDelegateCall(address(this), data[i]);
        }
        return results;
    }
}

File 16 of 33 : Strings.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/Strings.sol)

pragma solidity ^0.8.0;

import "./math/Math.sol";

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

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

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

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.
     */
    function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {
        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] = _SYMBOLS[value & 0xf];
            value >>= 4;
        }
        require(value == 0, "Strings: hex length insufficient");
        return string(buffer);
    }

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

File 17 of 33 : base64.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0;

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

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

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

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

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

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

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

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

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

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

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

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

        return result;
    }

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

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

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

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

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

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

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

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

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

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

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

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

        return result;
    }
}

File 18 of 33 : IKEI.sol
// SPDX-License-Identifier: UNLICENSED

pragma solidity >=0.8.0;

interface IKEI {

    event Upgrade(bytes32 indexed hash, string version, bytes snapshot);

    struct Core {
        address debt;
        address token;
        address oracle;
        address pricing;
        address rewards;
        address treasury;
    }

    struct Services {
        address pairs;
        address admin;
        address staking;
        address supplier;
        address identity;
        address referral;
        address liquidity;
        address affiliate;
        address processor;
    }

    struct Snapshot {
        address master;

        address debt;
        address token;
        address oracle;
        address pricing;
        address rewards;
        address treasury;

        address pairs;
        address admin;
        address staking;
        address supplier;
        address identity;
        address referral;
        address liquidity;
        address affiliate;
        address processor;
    }

    function WETH() external view returns (address);

    function master() external view returns (address);

    function token() external view returns (address);
    function rewards() external view returns (address);
    function treasury() external view returns (address);

    function debt() external view returns (address);
    function pairs() external view returns (address);
    function admin() external view returns (address);
    function oracle() external view returns (address);
    function pricing() external view returns (address);
    function staking() external view returns (address);
    function identity() external view returns (address);
    function supplier() external view returns (address);
    function referral() external view returns (address);
    function affiliate() external view returns (address);
    function liquidity() external view returns (address);
    function processor() external view returns (address);

    function version() external view returns (string memory);

    function upgrade(string memory newVersion) external;

    function snapshot() external view returns (Snapshot memory snapshot_);
    function snapshotHash() external view returns (bytes32);
    function core() external view returns (Core memory core_);
    function coreHash() external view returns (bytes32);
    function services() external view returns (Services memory core_);
    function servicesHash() external view returns (bytes32);
}

File 19 of 33 : IStaking.sol
// SPDX-License-Identifier: UNLICENSED

pragma solidity >=0.8.0;

interface IStaking {

    event RewardSharesIncrement(uint256 amount, uint256 totalSupply, address indexed sender);
    event CalculatorUpdate(address indexed prevValue, address indexed newValue, address indexed sender);
    event Stake(
        bytes32 indexed stakeId,
        address indexed recipient,
        StakeDetails details,
        address sender
    );
    event Unstake(
        bytes32 indexed stakeId,
        UnstakeReceipt receipt,
        address indexed to,
        address indexed sender
    );
    event Skim(
        bytes32 indexed stakeId,
        uint256 amount,
        address indexed recipient,
        address indexed sender
    );

    struct UnstakeReceipt {
        uint128 amount;
        uint128 principal;
        uint128 rewards;
        uint128 tokensReceived;
        uint128 unstakePenalty;
        uint32 unstakePenaltyPercent;
    }

    struct StakeDetails {
        uint128 principal;
        uint128 totalSupply;

        uint256 rewardSharesStart;

        uint32 rewardMultiplier;
        uint32 stakeDuration;
        uint32 lockDuration;
        uint48 createdAt;
        uint48 expiresAt;
    }

    function STAKING_TOKEN() external view returns (address);

    function calculator() external view returns (address);

    function totalRewards() external view returns (uint256);
    function totalRewardShares() external view returns (uint256);
    function totalValue() external view returns (uint256);
    function totalMultiplied() external view returns (uint256);
    function totalStakesCreated() external view returns (uint256);

    function balanceOf(address account, bytes32 stakeId) external view returns (uint256);
    function totalBalance(bytes32 stakeId, uint256 amount) external view returns (uint256);
    function rewardBalance(bytes32 stakeId, uint256 amount) external view returns (uint256);
    function unstakePenalty(bytes32 stakeId) external view returns (uint256);
    function principalBalance(bytes32 stakeId, uint256 amount) external view returns (uint256);
    function predictUnstake(bytes32 stakeId, uint256 amount) external view returns (UnstakeReceipt memory);
    function stakeDetails(bytes32 stakeId) external view returns (StakeDetails memory);
    function updateCalculator(address newCalculator) external;

    function skim(bytes32 stakeId, address recipient) external returns (bool);
    function stake(
        address account,
        uint256 maxTokens,
        uint32 stakeDuration,
        uint32 lockDuration
    ) external returns (bytes32 stakeId, StakeDetails memory details);
    function unstake(
        bytes32 stakeId,
        address recipient
    ) external returns (UnstakeReceipt memory receipt);
}

File 20 of 33 : IERC20Partition.sol
// SPDX-License-Identifier: UNLICENSED
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

File 21 of 33 : ERC721Describable.sol
// SPDX-License-Identifier: UNLICENSED

pragma solidity ^0.8.0;

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

import "./IERC721Describable.sol";
import "./IERC721Descriptor.sol";

abstract contract ERC721Describable is IERC721Describable, ERC721 {

    address private $descriptor;

    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
        return interfaceId == type(IERC721Describable).interfaceId ||
            super.supportsInterface(interfaceId);
    }

    function descriptor() external override view returns (address) {
        return $descriptor;
    }

    /**
     * @dev See {IERC721Metadata-tokenURI}.
     */
    function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
        _requireMinted(tokenId);
        IERC721Descriptor _descriptor = IERC721Descriptor($descriptor);
        require(address(_descriptor) != address(0), 'ERC721Describable: MISSING_DESCRIPTOR');
        return _descriptor.tokenURI(tokenId, _tokenURIData(tokenId));
    }

    function _updateDescriptor(address newDescriptor) internal virtual {
        require(newDescriptor != address(0), 'ERC721Describable: INVALID_DESCRIPTOR');
        emit DescriptorUpdate($descriptor, newDescriptor, _msgSender());
        $descriptor = newDescriptor;
    }

    function _tokenURIData(uint256 tokenId) internal virtual view returns (bytes memory);
}

File 22 of 33 : ERC721Details.sol
// SPDX-License-Identifier: UNLICENSED

pragma solidity ^0.8.0;

import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import 'base64-sol/base64.sol';

import "./IERC721Details.sol";

abstract contract ERC721Details is IERC721Details, ERC721 {
    using Strings for uint256;
    using Strings for address;

    uint256 private $sellerFee;
    address private $feeReceiver;
    ContractDetails private $details;

    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
        return interfaceId == type(IERC721Details).interfaceId ||
            super.supportsInterface(interfaceId);
    }

    function contractURI() external view virtual override returns (string memory) {
        return _generateURI(details(), sellerFee(), feeReceiver());
    }

    function feeReceiver() public view virtual override returns (address) {
        return $feeReceiver;
    }

    function details() public view virtual override returns (ContractDetails memory) {
        return $details;
    }

    // 100 = 1%
    function sellerFee() public view virtual override returns (uint256) {
        return $sellerFee;
    }

    // 100 == 1%
    function _updateSellerFee(uint256 newSellerFee) internal virtual {
        require(newSellerFee < 1000, 'ERC721Details: MAX_SELL_FEE');
        emit SellerFeeUpdate($sellerFee, newSellerFee, _msgSender());
        $sellerFee = newSellerFee;
    }

    function _updateDetails(ContractDetails calldata newContractDetails) internal virtual {
        emit ContractDetailsUpdate($details, newContractDetails, _msgSender());
        $details = newContractDetails;
    }

    function _updateFeeReceiver(address newFeeReceiver) internal virtual {
        emit FeeReceiverUpdate($feeReceiver, newFeeReceiver, _msgSender());
        $feeReceiver = newFeeReceiver;
    }

    function _generateURI(
        ContractDetails memory details_,
        uint256 sellFee,
        address feeRecipient
    ) private pure returns (string memory uri) {
        bytes memory buffer = abi.encodePacked("{"
            '"name":"', details_.name, '",'
            '"description":"', details_.description, '",'
            '"image":"', details_.image, '",'
            '"external_link":"', details_.link, '",'
            '"seller_fee_basis_points":', sellFee.toString(), ','
            '"fee_recipient":"', feeRecipient.toHexString(), '"'
        "}");

        return string(abi.encodePacked(
            'data:application/json;base64,',
            Base64.encode(buffer)
        ));
    }
}

File 23 of 33 : IERC721Describable.sol
// SPDX-License-Identifier: UNLICENSED

pragma solidity >=0.8.0;

interface IERC721Describable {

    event DescriptorUpdate(address prevValue, address newValue, address indexed sender);

    function descriptor() external view returns (address);

}

File 24 of 33 : IERC721Descriptor.sol
// SPDX-License-Identifier: UNLICENSED

pragma solidity >=0.8.0;

interface IERC721Descriptor {

    function tokenURI(uint256 tokenId, bytes memory data) external view returns (string memory uri);
}

File 25 of 33 : IERC721Details.sol
// SPDX-License-Identifier: UNLICENSED

pragma solidity >=0.8.0;

interface IERC721Details {

    event SellerFeeUpdate(uint256 prevValue, uint256 newValue, address indexed sender);
    event FeeReceiverUpdate(address prevValue, address newValue, address indexed sender);
    event ContractDetailsUpdate(
        ContractDetails prevValue,
        ContractDetails newValue,
        address indexed sender
    );

    struct ContractDetails {
        string name;
        string description;
        string image;
        string link;
    }

    function contractURI() external view returns (string memory);
    function details() external view returns (ContractDetails memory);
    function sellerFee() external view returns (uint256);
    function feeReceiver() external view returns (address);
}

File 26 of 33 : IKEIERC721.sol
// SPDX-License-Identifier: UNLICENSED

pragma solidity >=0.8.0;

import "./IERC721Details.sol";

interface IKEIERC721 {

    function totalSupply() external view returns (uint256);

    function updateSellerFee(uint256 newSellerFee) external;
    function updateDetails(IERC721Details.ContractDetails calldata newContractDetails) external;
    function updateDescriptor(address newDescriptor) external;
    function updateFeeReceiver(address newAssetReceiver) external;
}

File 27 of 33 : KEIERC721.sol
// SPDX-License-Identifier: UNLICENSED

pragma solidity ^0.8.0;

import "../KContract.sol";

import "./ERC721Describable.sol";
import "./ERC721Details.sol";
import "./IKEIERC721.sol";

abstract contract KEIERC721 is IKEIERC721, KContract, ERC721Describable, ERC721Details {

    uint256 private $totalSupply;

    constructor() {
        _updateSellerFee(300);
    }

    function totalSupply() external virtual override view returns (uint256) {
        return $totalSupply;
    }

    /**
     * @dev See {IERC721Metadata-tokenURI}.
     */
    function tokenURI(uint256 tokenId) public view virtual override(ERC721, ERC721Describable) returns (string memory) {
        return super.tokenURI(tokenId);
    }

    function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721Details, ERC721Describable, KContract) returns (bool) {
        return interfaceId == type(IKEIERC721).interfaceId ||
            super.supportsInterface(interfaceId);
    }

    function updateSellerFee(uint256 newSellerFee) external override onlyRole(MANAGE_ROLE) {
        _updateSellerFee(newSellerFee);
    }

    function updateDetails(IERC721Details.ContractDetails calldata newContractDetails) external override onlyRole(MANAGE_ROLE) {
        _updateDetails(newContractDetails);
    }

    function updateDescriptor(address newDescriptor) external override onlyRole(MANAGE_ROLE) {
        _updateDescriptor(newDescriptor);
    }

    function updateFeeReceiver(address newFeeReceiver) external override onlyRole(MANAGE_ROLE) {
        _updateFeeReceiver(newFeeReceiver);
    }

    function _mint(address to, uint256 tokenId) internal override virtual {
        super._mint(to, tokenId);
        unchecked {
            ++$totalSupply;
        }
    }

    function _burn(uint256 tokenId) internal override virtual {
        super._burn(tokenId);
        unchecked {
            --$totalSupply;
        }
    }
}

File 28 of 33 : GovernanceLibrary.sol
// SPDX-License-Identifier: UNLICENSED

pragma solidity >=0.8.0;

import "@openzeppelin/contracts/proxy/Clones.sol";

import "./IVotesContainer.sol";

library GovernanceLibrary {

    address internal constant CONTAINER_IMPLEMENTATION = 0xAc5450483197c648841E70C69c84eb0629e50d27;

    function createVotesContainer() internal returns (address instance) {
        instance = Clones.clone(CONTAINER_IMPLEMENTATION);
        IVotesContainer(instance).initialize();
    }
}

File 29 of 33 : IVotesContainer.sol
// SPDX-License-Identifier: UNLICENSED

pragma solidity >=0.8.0;

interface IVotesContainer {

    function initialize() external;

    function getVotes(address token) external view returns (uint256);
    function getPastVotes(address token, uint256 blockNumber) external view returns (uint256);
    function delegates(address token) external view returns (address);

    function delegate(address token, address target) external;
    function transfer(address token, bytes32 id, address to, uint256 amount, bytes memory data) external;
    function transfer(address token, address to, uint256 amount) external;
}

File 30 of 33 : IKContract.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.8.0;

interface IKContract {

    function MANAGE_ROLE() external pure returns (bytes32);
    function PAUSE_ROLE() external pure returns (bytes32);

    function pause() external;
    function unpause() external;
}

File 31 of 33 : KContract.sol
// SPDX-License-Identifier: UNLICENSED

pragma solidity ^0.8.0;

import "@openzeppelin/contracts/access/AccessControl.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@openzeppelin/contracts/utils/Multicall.sol";

import "../core/IKEI.sol";

import "./KLibrary.sol";
import "./IKContract.sol";

abstract contract KContract is IKContract, Pausable, Multicall, AccessControl {

    bytes32 public constant MANAGE_ROLE = keccak256('MANAGE_ROLE');
    bytes32 public constant PAUSE_ROLE = keccak256('PAUSE_ROLE');

    IKEI public immutable K = KLibrary.K;

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

    /**
     * @dev Returns `true` if `account` has been granted `role`.
     */
    function hasRole(bytes32 role, address account) public view override returns (bool) {
        return super.hasRole(role, account) || K.master() == account;
    }

    function pause() external virtual override onlyRole(PAUSE_ROLE) {
        _pause();
    }

    function unpause() external virtual override onlyRole(PAUSE_ROLE) {
        _unpause();
    }

    function _core() internal view returns (IKEI.Core memory) {
        return K.core();
    }

    function _snapshot() internal view returns (IKEI.Snapshot memory) {
        return K.snapshot();
    }

    function _services() internal view returns (IKEI.Services memory) {
        return K.services();
    }
}

File 32 of 33 : KLibrary.sol
// SPDX-License-Identifier: UNLICENSED

pragma solidity >=0.8.0;

import "../core/IKEI.sol";

library KLibrary {
    IKEI internal constant K = IKEI(0x1A3b856C1Bfdb85255F133aFD9116F240Abceb0a);
}

File 33 of 33 : IStakingPositionManager.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.8.0;

interface IStakingPositionManager {

    event Mint(
        uint256 indexed tokenId,
        bytes32 indexed stakeId,
        uint256 amount,
        address container,
        address indexed owner,
        address sender
    );

    event Burn(
        uint256 indexed tokenId,
        bytes32 indexed stakeId,
        uint256 amount,
        address indexed sender
    );

    struct TokenDetails {
        bytes32 stakeId;
        address container;
    }

    function STAKING_TOKEN() external view returns (address);
    function STAKING() external view returns (address);

    function stakeId(uint256 tokenId) external view returns (bytes32);
    function stakeBalanceOf(uint256 tokenId) external view returns (bytes32 _stakeId, uint256 _stakeBalance);

    function setDelegate(uint256 tokenId, address target) external;

    function mint(
        bytes32 stakeId,
        uint256 amount,
        address owner,
        bytes memory data
    ) external returns (uint256 tokenId);

    function burn(
        uint256 tokenId,
        address recipient,
        bytes memory data
    ) external returns (bytes32 stakeId, uint256 tokensReleased);

}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"staking","type":"address"}],"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":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":true,"internalType":"bytes32","name":"stakeId","type":"bytes32"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"Burn","type":"event"},{"anonymous":false,"inputs":[{"components":[{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"description","type":"string"},{"internalType":"string","name":"image","type":"string"},{"internalType":"string","name":"link","type":"string"}],"indexed":false,"internalType":"struct IERC721Details.ContractDetails","name":"prevValue","type":"tuple"},{"components":[{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"description","type":"string"},{"internalType":"string","name":"image","type":"string"},{"internalType":"string","name":"link","type":"string"}],"indexed":false,"internalType":"struct IERC721Details.ContractDetails","name":"newValue","type":"tuple"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"ContractDetailsUpdate","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"prevValue","type":"address"},{"indexed":false,"internalType":"address","name":"newValue","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"DescriptorUpdate","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"prevValue","type":"address"},{"indexed":false,"internalType":"address","name":"newValue","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"FeeReceiverUpdate","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":true,"internalType":"bytes32","name":"stakeId","type":"bytes32"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"address","name":"container","type":"address"},{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":false,"internalType":"address","name":"sender","type":"address"}],"name":"Mint","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"prevValue","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newValue","type":"uint256"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"SellerFeeUpdate","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"K","outputs":[{"internalType":"contract IKEI","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MANAGE_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PAUSE_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"STAKING","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"STAKING_TOKEN","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"burn","outputs":[{"internalType":"bytes32","name":"stakeId_","type":"bytes32"},{"internalType":"uint256","name":"tokensReleased","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"contractURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"descriptor","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"details","outputs":[{"components":[{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"description","type":"string"},{"internalType":"string","name":"image","type":"string"},{"internalType":"string","name":"link","type":"string"}],"internalType":"struct IERC721Details.ContractDetails","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"feeReceiver","outputs":[{"internalType":"address","name":"","type":"address"}],"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":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"stakeId_","type":"bytes32"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address","name":"owner","type":"address"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"mint","outputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes[]","name":"data","type":"bytes[]"}],"name":"multicall","outputs":[{"internalType":"bytes[]","name":"results","type":"bytes[]"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"sellerFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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":"tokenId","type":"uint256"},{"internalType":"address","name":"target","type":"address"}],"name":"setDelegate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"stakeBalanceOf","outputs":[{"internalType":"bytes32","name":"_stakeId","type":"bytes32"},{"internalType":"uint256","name":"_stakeBalance","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"stakeId","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newDescriptor","type":"address"}],"name":"updateDescriptor","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"description","type":"string"},{"internalType":"string","name":"image","type":"string"},{"internalType":"string","name":"link","type":"string"}],"internalType":"struct IERC721Details.ContractDetails","name":"newContractDetails","type":"tuple"}],"name":"updateDetails","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newFeeReceiver","type":"address"}],"name":"updateFeeReceiver","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newSellerFee","type":"uint256"}],"name":"updateSellerFee","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60e0604052731a3b856c1bfdb85255f133afd9116f240abceb0a60805260016011553480156200002e57600080fd5b5060405162004539380380620045398339810160408190526200005191620001ff565b604080518082018252601481527f5374616b6564204b656920506f736974696f6e7300000000000000000000000060208083019190915282518084019093526008835267734b45492e504f5360c01b908301526000805460ff19169055906002620000bd8382620002d6565b506003620000cc8282620002d6565b505050620000e261012c6200016660201b60201c565b6001600160a01b03811660a08190526040805163011e759160e21b81529051630479d644916004808201926020929091908290030181865afa1580156200012d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620001539190620001ff565b6001600160a01b031660c05250620003a2565b6103e88110620001bc5760405162461bcd60e51b815260206004820152601b60248201527f45524337323144657461696c733a204d41585f53454c4c5f4645450000000000604482015260640160405180910390fd5b600954604080519182526020820183905233917f569b104e3f615b26071757ef60d0c50cdabb7f292601913b165a8b867aff3ee2910160405180910390a2600955565b6000602082840312156200021257600080fd5b81516001600160a01b03811681146200022a57600080fd5b9392505050565b634e487b7160e01b600052604160045260246000fd5b600181811c908216806200025c57607f821691505b6020821081036200027d57634e487b7160e01b600052602260045260246000fd5b50919050565b601f821115620002d157600081815260208120601f850160051c81016020861015620002ac5750805b601f850160051c820191505b81811015620002cd57828155600101620002b8565b5050505b505050565b81516001600160401b03811115620002f257620002f262000231565b6200030a8162000303845462000247565b8462000283565b602080601f831160018114620003425760008415620003295750858301515b600019600386901b1c1916600185901b178555620002cd565b600085815260208120601f198616915b82811015620003735788860151825594840194600190910190840162000352565b5085821015620003925787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b60805160a05160c05161412f6200040a6000396000818161031b01528181610a0301528181610b2a01528181611212015281816114a20152818161179b0152818161242801526128040152600061054401526000818161059901526110d1015261412f6000f3fe608060405234801561001057600080fd5b50600436106102e95760003560e01c80638456cb5911610191578063b88d4fde116100e3578063e1f3d55a11610097578063e9afeea911610071578063e9afeea914610697578063f01a11fc146106aa578063f6623bee146106bd57600080fd5b8063e1f3d55a1461064b578063e8a3d48514610653578063e985e9c51461065b57600080fd5b8063c87b56dd116100c8578063c87b56dd14610612578063ce88b25b14610625578063d547741f1461063857600080fd5b8063b88d4fde146105ec578063c69bebe4146105ff57600080fd5b80639905045011610145578063a932492f1161011f578063a932492f14610594578063ac9650d8146105bb578063b3f00674146105db57600080fd5b80639905045014610566578063a217fddf14610579578063a22cb4651461058157600080fd5b806394dcf2e61161017657806394dcf2e61461052457806395d89b411461053757806397610f301461053f57600080fd5b80638456cb591461050957806391d148541461051157600080fd5b8063303e74df1161024a578063565974d3116101fe5780636352211e116101d85780636352211e146104c357806368cbc14d146104d657806370a08231146104f657600080fd5b8063565974d31461047c5780635c975abb1461049157806360a4b76a1461049c57600080fd5b8063389ed2671161022f578063389ed2671461043a5780633f4ba83a1461046157806342842e0e1461046957600080fd5b8063303e74df1461041657806336568abe1461042757600080fd5b806318160ddd116102a1578063248a9ca311610286578063248a9ca3146103b75780632e342d49146103db5780632f2ff15d1461040357600080fd5b806318160ddd1461039257806323b872dd146103a457600080fd5b806306fdde03116102d257806306fdde0314610355578063081812fc1461036a578063095ea7b31461037d57600080fd5b806301ffc9a7146102ee5780630479d64414610316575b600080fd5b6103016102fc366004613209565b6106d0565b60405190151581526020015b60405180910390f35b61033d7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b03909116815260200161030d565b61035d610714565b60405161030d9190613276565b61033d610378366004613289565b6107a6565b61039061038b3660046132b7565b6107cd565b005b600f545b60405190815260200161030d565b6103906103b23660046132e3565b610903565b6103966103c5366004613289565b6000908152600160208190526040909120015490565b6103ee6103e93660046133e9565b61097a565b6040805192835260208301919091520161030d565b610390610411366004613442565b610be1565b6008546001600160a01b031661033d565b610390610435366004613442565b610c07565b6103967f139c2898040ef16910dc9f44dc697df79363da767d8bc92f2e310312b816e46d81565b610390610c93565b6103906104773660046132e3565b610cc8565b610484610ce3565b60405161030d9190613472565b60005460ff16610301565b6103967fa076a07f65bcd51bcb15a0f01a65bc18f2d922acb81bcfd8af4caf5adb55709181565b61033d6104d1366004613289565b610f68565b6103966104e4366004613289565b60009081526010602052604090205490565b6103966105043660046134f0565b610fcd565b610390611067565b61030161051f366004613442565b611099565b610390610532366004613442565b611163565b61035d611283565b61033d7f000000000000000000000000000000000000000000000000000000000000000081565b6103906105743660046134f0565b611292565b610396600081565b61039061058f36600461351b565b6112c5565b61033d7f000000000000000000000000000000000000000000000000000000000000000081565b6105ce6105c9366004613549565b6112d0565b60405161030d91906135be565b600a546001600160a01b031661033d565b6103906105fa366004613620565b6113c5565b61039061060d3660046134f0565b611442565b61035d610620366004613289565b611475565b61039661063336600461368c565b611480565b610390610646366004613442565b6116ba565b600954610396565b61035d6116e0565b6103016106693660046136d7565b6001600160a01b03918216600090815260076020908152604080832093909416825291909152205460ff1690565b6103906106a5366004613705565b611706565b6103ee6106b8366004613289565b611739565b6103906106cb366004613289565b61180e565b60006001600160e01b031982167f7fa9643100000000000000000000000000000000000000000000000000000000148061070e575061070e82611841565b92915050565b60606002805461072390613740565b80601f016020809104026020016040519081016040528092919081815260200182805461074f90613740565b801561079c5780601f106107715761010080835404028352916020019161079c565b820191906000526020600020905b81548152906001019060200180831161077f57829003601f168201915b5050505050905090565b60006107b18261187f565b506000908152600660205260409020546001600160a01b031690565b60006107d882610f68565b9050806001600160a01b0316836001600160a01b0316036108665760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560448201527f720000000000000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b336001600160a01b038216148061088257506108828133610669565b6108f45760405162461bcd60e51b815260206004820152603d60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206f7220617070726f76656420666f7220616c6c000000606482015260840161085d565b6108fe83836118e3565b505050565b61090d3382611951565b61096f5760405162461bcd60e51b815260206004820152602d60248201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560448201526c1c881bdc88185c1c1c9bdd9959609a1b606482015260840161085d565b6108fe8383836119d0565b600080610985611bd6565b61098f3386611951565b610a015760405162461bcd60e51b815260206004820152602e60248201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560448201527f72206e6f7220617070726f766564000000000000000000000000000000000000606482015260840161085d565b7f0000000000000000000000000000000000000000000000000000000000000000610a2b86611c2b565b600086815260106020818152604080842081518083018352815481526001820180546001600160a01b038082168488019081528f8a5297909652969092556001600160a01b031990951690558351925190516326985b5f60e11b8152908216600482015260248101839052919550831690634d30b6be90604401602060405180830381865afa158015610ac2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ae6919061377a565b60208201516040517fe95e259c0000000000000000000000000000000000000000000000000000000081529194506001600160a01b03169063e95e259c90610b5a907f00000000000000000000000000000000000000000000000000000000000000009088908b9089908c90600401613793565b600060405180830381600087803b158015610b7457600080fd5b505af1158015610b88573d6000803e3d6000fd5b50505050610b933390565b6001600160a01b031684887f76e88d7c46f40a85a53501fc17c87c0c0bf97db37f6ac39640b61e13b109dc7986604051610bcf91815260200190565b60405180910390a45050935093915050565b60008281526001602081905260409091200154610bfd81611c41565b6108fe8383611c4b565b6001600160a01b0381163314610c855760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c660000000000000000000000000000000000606482015260840161085d565b610c8f8282611cb6565b5050565b7f139c2898040ef16910dc9f44dc697df79363da767d8bc92f2e310312b816e46d610cbd81611c41565b610cc5611d1d565b50565b6108fe838383604051806020016040528060008152506113c5565b610d0e6040518060800160405280606081526020016060815260200160608152602001606081525090565b600b604051806080016040529081600082018054610d2b90613740565b80601f0160208091040260200160405190810160405280929190818152602001828054610d5790613740565b8015610da45780601f10610d7957610100808354040283529160200191610da4565b820191906000526020600020905b815481529060010190602001808311610d8757829003601f168201915b50505050508152602001600182018054610dbd90613740565b80601f0160208091040260200160405190810160405280929190818152602001828054610de990613740565b8015610e365780601f10610e0b57610100808354040283529160200191610e36565b820191906000526020600020905b815481529060010190602001808311610e1957829003601f168201915b50505050508152602001600282018054610e4f90613740565b80601f0160208091040260200160405190810160405280929190818152602001828054610e7b90613740565b8015610ec85780601f10610e9d57610100808354040283529160200191610ec8565b820191906000526020600020905b815481529060010190602001808311610eab57829003601f168201915b50505050508152602001600382018054610ee190613740565b80601f0160208091040260200160405190810160405280929190818152602001828054610f0d90613740565b8015610f5a5780601f10610f2f57610100808354040283529160200191610f5a565b820191906000526020600020905b815481529060010190602001808311610f3d57829003601f168201915b505050505081525050905090565b6000818152600460205260408120546001600160a01b03168061070e5760405162461bcd60e51b815260206004820152601860248201527f4552433732313a20696e76616c696420746f6b656e2049440000000000000000604482015260640161085d565b60006001600160a01b03821661104b5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f74206120766160448201527f6c6964206f776e65720000000000000000000000000000000000000000000000606482015260840161085d565b506001600160a01b031660009081526005602052604090205490565b7f139c2898040ef16910dc9f44dc697df79363da767d8bc92f2e310312b816e46d61109181611c41565b610cc5611d6f565b60008281526001602090815260408083206001600160a01b038516845290915281205460ff168061115c5750816001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ee97f7f36040518163ffffffff1660e01b8152600401602060405180830381865afa15801561112d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061115191906137d6565b6001600160a01b0316145b9392505050565b61116b611bd6565b611176335b83611951565b6111e85760405162461bcd60e51b815260206004820152602e60248201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560448201527f72206e6f7220617070726f766564000000000000000000000000000000000000606482015260840161085d565b6000828152601060205260409081902060010154905163455b2b4360e11b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000081166004830152838116602483015290911690638ab6568690604401600060405180830381600087803b15801561126757600080fd5b505af115801561127b573d6000803e3d6000fd5b505050505050565b60606003805461072390613740565b7fa076a07f65bcd51bcb15a0f01a65bc18f2d922acb81bcfd8af4caf5adb5570916112bc81611c41565b610c8f82611dac565b610c8f338383611e7b565b60608167ffffffffffffffff8111156112eb576112eb613324565b60405190808252806020026020018201604052801561131e57816020015b60608152602001906001900390816113095790505b50905060005b828110156113be5761138e30858584818110611342576113426137f3565b90506020028101906113549190613809565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250611f4992505050565b8282815181106113a0576113a06137f3565b602002602001018190525080806113b69061386d565b915050611324565b5092915050565b6113ce33611170565b6114305760405162461bcd60e51b815260206004820152602d60248201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560448201526c1c881bdc88185c1c1c9bdd9959609a1b606482015260840161085d565b61143c84848484611f6e565b50505050565b7fa076a07f65bcd51bcb15a0f01a65bc18f2d922acb81bcfd8af4caf5adb55709161146c81611c41565b610c8f82611fec565b606061070e82612057565b600061148a611bd6565b6011805490600061149a8361386d565b9091555090507f000000000000000000000000000000000000000000000000000000000000000060006114cb612144565b9050600086116115435760405162461bcd60e51b815260206004820152602660248201527f5374616b696e67506f736974696f6e4d616e616765723a20494e56414c49445f60448201527f414d4f554e540000000000000000000000000000000000000000000000000000606482015260840161085d565b6040805180820182528881526001600160a01b0383811660208084019182526000888152601090915293909320915182559151600190910180546001600160a01b03191691831691909117905582166328972b15336040516001600160e01b031960e084901b1681526001600160a01b0391821660048201529084166024820152604481018a90526064810189905260a06084820152601c60a48201527f5374616b696e67506f736974696f6e4d616e616765723a204d494e540000000060c482015260e4016020604051808303816000875af1158015611628573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061164c9190613886565b506116588584866121bb565b6001600160a01b03851687847f7fea3dfabbd3b7b49bd19d2211e9d7c653ade95d9de7b59c54a72d9680859f84898533604080519384526001600160a01b03928316602085015291169082015260600160405180910390a45050949350505050565b600082815260016020819052604090912001546116d681611c41565b6108fe8383611cb6565b60606117016116ed610ce3565b600954600a546001600160a01b0316612239565b905090565b7fa076a07f65bcd51bcb15a0f01a65bc18f2d922acb81bcfd8af4caf5adb55709161173081611c41565b610c8f826122c4565b6000806117458361187f565b6000838152601060209081526040918290208251808401845281548082526001909201546001600160a01b0390811693820184905293516326985b5f60e11b8152600481019390935260248301829052909450917f00000000000000000000000000000000000000000000000000000000000000001690634d30b6be90604401602060405180830381865afa1580156117e2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611806919061377a565b915050915091565b7fa076a07f65bcd51bcb15a0f01a65bc18f2d922acb81bcfd8af4caf5adb55709161183881611c41565b610c8f82612315565b60006001600160e01b031982167f5845372e00000000000000000000000000000000000000000000000000000000148061070e575061070e826123a9565b6000818152600460205260409020546001600160a01b0316610cc55760405162461bcd60e51b815260206004820152601860248201527f4552433732313a20696e76616c696420746f6b656e2049440000000000000000604482015260640161085d565b600081815260066020526040902080546001600160a01b0319166001600160a01b038416908117909155819061191882610f68565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b60008061195d83610f68565b9050806001600160a01b0316846001600160a01b031614806119a457506001600160a01b0380821660009081526007602090815260408083209388168352929052205460ff165b806119c85750836001600160a01b03166119bd846107a6565b6001600160a01b0316145b949350505050565b826001600160a01b03166119e382610f68565b6001600160a01b031614611a475760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b606482015260840161085d565b6001600160a01b038216611ac25760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f2061646460448201527f7265737300000000000000000000000000000000000000000000000000000000606482015260840161085d565b611acf83838360016123e7565b826001600160a01b0316611ae282610f68565b6001600160a01b031614611b465760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b606482015260840161085d565b600081815260066020908152604080832080546001600160a01b03199081169091556001600160a01b0387811680865260058552838620805460001901905590871680865283862080546001019055868652600490945282852080549092168417909155905184937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b60005460ff1615611c295760405162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015260640161085d565b565b611c348161249b565b50600f8054600019019055565b610cc5813361253e565b611c558282611099565b610c8f5760008281526001602081815260408084206001600160a01b0386168086529252808420805460ff19169093179092559051339285917f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d9190a45050565b611cc08282611099565b15610c8f5760008281526001602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b611d25612597565b6000805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b611d77611bd6565b6000805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258611d523390565b6001600160a01b038116611e105760405162461bcd60e51b815260206004820152602560248201527f4552433732314465736372696261626c653a20494e56414c49445f444553435260448201526424a82a27a960d91b606482015260840161085d565b600854604080516001600160a01b0392831681529183166020830152805133927fe8b31212509d3f0c10470aa066887ac33c2c3dc76bb2db59e5a99823ed1d4e9792908290030190a2600880546001600160a01b0319166001600160a01b0392909216919091179055565b816001600160a01b0316836001600160a01b031603611edc5760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c657200000000000000604482015260640161085d565b6001600160a01b03838116600081815260076020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b606061115c83836040518060600160405280602781526020016140d3602791396125e9565b611f798484846119d0565b611f8584848484612661565b61143c5760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606482015260840161085d565b600a54604080516001600160a01b0392831681529183166020830152805133927f4d8f80e1903d6d2003eb791e4d8c65caaa6feeb024f36d27984c31b08c2a880092908290030190a2600a80546001600160a01b0319166001600160a01b0392909216919091179055565b60606120628261187f565b6008546001600160a01b0316806120c95760405162461bcd60e51b815260206004820152602560248201527f4552433732314465736372696261626c653a204d495353494e475f444553435260448201526424a82a27a960d91b606482015260840161085d565b806001600160a01b03166397b448e2846120e2866127ad565b6040518363ffffffff1660e01b81526004016120ff9291906138a3565b600060405180830381865afa15801561211c573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261115c91908101906138bc565b600061216373ac5450483197c648841e70c69c84eb0629e50d2761289a565b9050806001600160a01b0316638129fc1c6040518163ffffffff1660e01b8152600401600060405180830381600087803b1580156121a057600080fd5b505af11580156121b4573d6000803e3d6000fd5b5050505090565b6121c5838361293b565b6121d26000848484612661565b6108fe5760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606482015260840161085d565b60606000846000015185602001518660400151876060015161225a88612952565b61226c886001600160a01b03166129f2565b60405160200161228196959493929190613946565b604051602081830303815290604052905061229b81612a08565b6040516020016122ab9190613aea565b6040516020818303038152906040529150509392505050565b336001600160a01b03167f4b3ec8e8abc32b5c0b1646dc72fd7cf2f4d90449e7171c2ea224cd7825d63541600b83604051612300929190613c1b565b60405180910390a280600b6108fe8282613e26565b6103e881106123665760405162461bcd60e51b815260206004820152601b60248201527f45524337323144657461696c733a204d41585f53454c4c5f4645450000000000604482015260640161085d565b600954604080519182526020820183905233917f569b104e3f615b26071757ef60d0c50cdabb7f292601913b165a8b867aff3ee2910160405180910390a2600955565b60006001600160e01b031982167fecf9737800000000000000000000000000000000000000000000000000000000148061070e575061070e82612ba4565b6123ef611bd6565b6001600160a01b03831615612496576000828152601060205260409081902060010154905163455b2b4360e11b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000081166004830152858116602483015290911690638ab6568690604401600060405180830381600087803b15801561247d57600080fd5b505af1158015612491573d6000803e3d6000fd5b505050505b61143c565b60006124a682610f68565b90506124b68160008460016123e7565b6124bf82610f68565b600083815260066020908152604080832080546001600160a01b03199081169091556001600160a01b0385168085526005845282852080546000190190558785526004909352818420805490911690555192935084927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b6125488282611099565b610c8f57612555816129f2565b612560836020612be2565b604051602001612571929190613f43565b60408051601f198184030181529082905262461bcd60e51b825261085d91600401613276565b60005460ff16611c295760405162461bcd60e51b815260206004820152601460248201527f5061757361626c653a206e6f7420706175736564000000000000000000000000604482015260640161085d565b6060600080856001600160a01b0316856040516126069190613fc4565b600060405180830381855af49150503d8060008114612641576040519150601f19603f3d011682016040523d82523d6000602084013e612646565b606091505b509150915061265786838387612dc3565b9695505050505050565b60006001600160a01b0384163b156127a257604051630a85bd0160e11b81526001600160a01b0385169063150b7a02906126a5903390899088908890600401613fe0565b6020604051808303816000875af19250505080156126e0575060408051601f3d908101601f191682019092526126dd91810190614012565b60015b612788573d80801561270e576040519150601f19603f3d011682016040523d82523d6000602084013e612713565b606091505b5080516000036127805760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606482015260840161085d565b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490506119c8565b506001949350505050565b6000818152601060209081526040918290208251808401845281548082526001909201546001600160a01b0390811693820184905293516326985b5f60e11b815260048101939093526024830182905260609390927f000000000000000000000000000000000000000000000000000000000000000090911690634d30b6be90604401602060405180830381865afa15801561284d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612871919061377a565b604080516020810193909352820152606001604051602081830303815290604052915050919050565b6000763d602d80600a3d3981f3363d3d373d3d3d363d730000008260601b60e81c176000526e5af43d82803e903d91602b57fd5bf38260781b17602052603760096000f090506001600160a01b0381166129365760405162461bcd60e51b815260206004820152601660248201527f455243313136373a20637265617465206661696c656400000000000000000000604482015260640161085d565b919050565b6129458282612e3c565b5050600f80546001019055565b6060600061295f83612fd5565b600101905060008167ffffffffffffffff81111561297f5761297f613324565b6040519080825280601f01601f1916602001820160405280156129a9576020820181803683370190505b5090508181016020015b600019017f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a85049450846129b357509392505050565b606061070e6001600160a01b0383166014612be2565b60608151600003612a2757505060408051602081019091526000815290565b60006040518060600160405280604081526020016140936040913990506000600384516002612a56919061402f565b612a609190614042565b612a6b906004614064565b90506000612a7a82602061402f565b67ffffffffffffffff811115612a9257612a92613324565b6040519080825280601f01601f191660200182016040528015612abc576020820181803683370190505b509050818152600183018586518101602084015b81831015612b28576003830192508251603f8160121c168501518253600182019150603f81600c1c168501518253600182019150603f8160061c168501518253600182019150603f8116850151825350600101612ad0565b600389510660018114612b425760028114612b6e57612b96565b7f3d3d000000000000000000000000000000000000000000000000000000000000600119830152612b96565b7f3d000000000000000000000000000000000000000000000000000000000000006000198301525b509398975050505050505050565b60006001600160e01b031982167f303e74df00000000000000000000000000000000000000000000000000000000148061070e575061070e826130b7565b60606000612bf1836002614064565b612bfc90600261402f565b67ffffffffffffffff811115612c1457612c14613324565b6040519080825280601f01601f191660200182016040528015612c3e576020820181803683370190505b5090507f300000000000000000000000000000000000000000000000000000000000000081600081518110612c7557612c756137f3565b60200101906001600160f81b031916908160001a9053507f780000000000000000000000000000000000000000000000000000000000000081600181518110612cc057612cc06137f3565b60200101906001600160f81b031916908160001a9053506000612ce4846002614064565b612cef90600161402f565b90505b6001811115612d74577f303132333435363738396162636465660000000000000000000000000000000085600f1660108110612d3057612d306137f3565b1a60f81b828281518110612d4657612d466137f3565b60200101906001600160f81b031916908160001a90535060049490941c93612d6d8161407b565b9050612cf2565b50831561115c5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e74604482015260640161085d565b60608315612e32578251600003612e2b576001600160a01b0385163b612e2b5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161085d565b50816119c8565b6119c88383613129565b6001600160a01b038216612e925760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f2061646472657373604482015260640161085d565b6000818152600460205260409020546001600160a01b031615612ef75760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000604482015260640161085d565b612f056000838360016123e7565b6000818152600460205260409020546001600160a01b031615612f6a5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000604482015260640161085d565b6001600160a01b038216600081815260056020908152604080832080546001019055848352600490915280822080546001600160a01b0319168417905551839291907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6000807a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000831061301e577a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000830492506040015b6d04ee2d6d415b85acef8100000000831061304a576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc10000831061306857662386f26fc10000830492506010015b6305f5e1008310613080576305f5e100830492506008015b612710831061309457612710830492506004015b606483106130a6576064830492506002015b600a831061070e5760010192915050565b60006001600160e01b031982167f80ac58cd00000000000000000000000000000000000000000000000000000000148061311a57506001600160e01b031982167f5b5e139f00000000000000000000000000000000000000000000000000000000145b8061070e575061070e82613153565b8151156131395781518083602001fd5b8060405162461bcd60e51b815260040161085d9190613276565b60006001600160e01b031982167fe327066e00000000000000000000000000000000000000000000000000000000148061070e575061070e8260006001600160e01b031982167f7965db0b00000000000000000000000000000000000000000000000000000000148061070e57507f01ffc9a7000000000000000000000000000000000000000000000000000000006001600160e01b031983161461070e565b6001600160e01b031981168114610cc557600080fd5b60006020828403121561321b57600080fd5b813561115c816131f3565b60005b83811015613241578181015183820152602001613229565b50506000910152565b60008151808452613262816020860160208601613226565b601f01601f19169290920160200192915050565b60208152600061115c602083018461324a565b60006020828403121561329b57600080fd5b5035919050565b6001600160a01b0381168114610cc557600080fd5b600080604083850312156132ca57600080fd5b82356132d5816132a2565b946020939093013593505050565b6000806000606084860312156132f857600080fd5b8335613303816132a2565b92506020840135613313816132a2565b929592945050506040919091013590565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561336357613363613324565b604052919050565b600067ffffffffffffffff82111561338557613385613324565b50601f01601f191660200190565b600082601f8301126133a457600080fd5b81356133b76133b28261336b565b61333a565b8181528460208386010111156133cc57600080fd5b816020850160208301376000918101602001919091529392505050565b6000806000606084860312156133fe57600080fd5b833592506020840135613410816132a2565b9150604084013567ffffffffffffffff81111561342c57600080fd5b61343886828701613393565b9150509250925092565b6000806040838503121561345557600080fd5b823591506020830135613467816132a2565b809150509250929050565b60208152600082516080602084015261348e60a084018261324a565b90506020840151601f19808584030160408601526134ac838361324a565b925060408601519150808584030160608601526134c9838361324a565b92506060860151915080858403016080860152506134e7828261324a565b95945050505050565b60006020828403121561350257600080fd5b813561115c816132a2565b8015158114610cc557600080fd5b6000806040838503121561352e57600080fd5b8235613539816132a2565b915060208301356134678161350d565b6000806020838503121561355c57600080fd5b823567ffffffffffffffff8082111561357457600080fd5b818501915085601f83011261358857600080fd5b81358181111561359757600080fd5b8660208260051b85010111156135ac57600080fd5b60209290920196919550909350505050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b8281101561361357603f1988860301845261360185835161324a565b945092850192908501906001016135e5565b5092979650505050505050565b6000806000806080858703121561363657600080fd5b8435613641816132a2565b93506020850135613651816132a2565b925060408501359150606085013567ffffffffffffffff81111561367457600080fd5b61368087828801613393565b91505092959194509250565b600080600080608085870312156136a257600080fd5b843593506020850135925060408501356136bb816132a2565b9150606085013567ffffffffffffffff81111561367457600080fd5b600080604083850312156136ea57600080fd5b82356136f5816132a2565b91506020830135613467816132a2565b60006020828403121561371757600080fd5b813567ffffffffffffffff81111561372e57600080fd5b82016080818503121561115c57600080fd5b600181811c9082168061375457607f821691505b60208210810361377457634e487b7160e01b600052602260045260246000fd5b50919050565b60006020828403121561378c57600080fd5b5051919050565b60006001600160a01b03808816835286602084015280861660408401525083606083015260a060808301526137cb60a083018461324a565b979650505050505050565b6000602082840312156137e857600080fd5b815161115c816132a2565b634e487b7160e01b600052603260045260246000fd5b6000808335601e1984360301811261382057600080fd5b83018035915067ffffffffffffffff82111561383b57600080fd5b60200191503681900382131561385057600080fd5b9250929050565b634e487b7160e01b600052601160045260246000fd5b60006001820161387f5761387f613857565b5060010190565b60006020828403121561389857600080fd5b815161115c8161350d565b8281526040602082015260006119c8604083018461324a565b6000602082840312156138ce57600080fd5b815167ffffffffffffffff8111156138e557600080fd5b8201601f810184136138f657600080fd5b80516139046133b28261336b565b81815285602083850101111561391957600080fd5b6134e7826020830160208601613226565b6000815161393c818560208601613226565b9290920192915050565b7f7b226e616d65223a22000000000000000000000000000000000000000000000081526000875161397e816009850160208c01613226565b7f222c226465736372697074696f6e223a2200000000000000000000000000000060099184019182015287516139bb81601a840160208c01613226565b7f222c22696d616765223a22000000000000000000000000000000000000000000601a929091019182015286516139f9816025840160208b01613226565b7f222c2265787465726e616c5f6c696e6b223a2200000000000000000000000000602592909101918201528551613a37816038840160208a01613226565b7f222c2273656c6c65725f6665655f62617369735f706f696e7473223a00000000603892909101918201528451613a75816054840160208901613226565b613adc613ab3613aad6054848601017f2c226665655f726563697069656e74223a220000000000000000000000000000815260120190565b8761392a565b7f227d000000000000000000000000000000000000000000000000000000000000815260020190565b9a9950505050505050505050565b7f646174613a6170706c69636174696f6e2f6a736f6e3b6261736536342c000000815260008251613b2281601d850160208701613226565b91909101601d0192915050565b60008154613b3c81613740565b808552602060018381168015613b595760018114613b7357613ba1565b60ff1985168884015283151560051b880183019550613ba1565b866000528260002060005b85811015613b995781548a8201860152908301908401613b7e565b890184019650505b505050505092915050565b6000808335601e19843603018112613bc357600080fd5b830160208101925035905067ffffffffffffffff811115613be357600080fd5b80360382131561385057600080fd5b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b60408152608060408201526000613c3560c0830185613b2f565b603f1980848303016060850152613c4f8260018801613b2f565b915080848303016080850152613c688260028801613b2f565b9150808483030160a085015250613c828160038701613b2f565b90508281036020840152613c968485613bac565b60808352613ca8608084018284613bf2565b915050613cb86020860186613bac565b8383036020850152613ccb838284613bf2565b92505050613cdc6040860186613bac565b8383036040850152613cef838284613bf2565b92505050613d006060860186613bac565b8383036060850152613d13838284613bf2565b98975050505050505050565b601f8211156108fe57600081815260208120601f850160051c81016020861015613d465750805b601f850160051c820191505b8181101561127b57828155600101613d52565b67ffffffffffffffff831115613d7d57613d7d613324565b613d9183613d8b8354613740565b83613d1f565b6000601f841160018114613dc55760008515613dad5750838201355b600019600387901b1c1916600186901b178355613e1f565b600083815260209020601f19861690835b82811015613df65786850135825560209485019460019092019101613dd6565b5086821015613e135760001960f88860031b161c19848701351681555b505060018560011b0183555b5050505050565b613e308283613809565b67ffffffffffffffff811115613e4857613e48613324565b613e5c81613e568554613740565b85613d1f565b6000601f821160018114613e905760008315613e785750838201355b600019600385901b1c1916600184901b178555613eea565b600085815260209020601f19841690835b82811015613ec15786850135825560209485019460019092019101613ea1565b5084821015613ede5760001960f88660031b161c19848701351681555b505060018360011b0185555b50505050613efb6020830183613809565b613f09818360018601613d65565b5050613f186040830183613809565b613f26818360028601613d65565b5050613f356060830183613809565b61143c818360038601613d65565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351613f7b816017850160208801613226565b7f206973206d697373696e6720726f6c65200000000000000000000000000000006017918401918201528351613fb8816028840160208801613226565b01602801949350505050565b60008251613fd6818460208701613226565b9190910192915050565b60006001600160a01b03808716835280861660208401525083604083015260806060830152612657608083018461324a565b60006020828403121561402457600080fd5b815161115c816131f3565b8082018082111561070e5761070e613857565b60008261405f57634e487b7160e01b600052601260045260246000fd5b500490565b808202811582820484141761070e5761070e613857565b60008161408a5761408a613857565b50600019019056fe4142434445464748494a4b4c4d4e4f505152535455565758595a6162636465666768696a6b6c6d6e6f707172737475767778797a303132333435363738392b2f416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220688938035ad94c2cfee607f7d035dd1cd5fdcf87c19af75e5a1e520708e3572c64736f6c63430008130033000000000000000000000000463beb323b229d52f530be23c2e829c78904d8a8

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106102e95760003560e01c80638456cb5911610191578063b88d4fde116100e3578063e1f3d55a11610097578063e9afeea911610071578063e9afeea914610697578063f01a11fc146106aa578063f6623bee146106bd57600080fd5b8063e1f3d55a1461064b578063e8a3d48514610653578063e985e9c51461065b57600080fd5b8063c87b56dd116100c8578063c87b56dd14610612578063ce88b25b14610625578063d547741f1461063857600080fd5b8063b88d4fde146105ec578063c69bebe4146105ff57600080fd5b80639905045011610145578063a932492f1161011f578063a932492f14610594578063ac9650d8146105bb578063b3f00674146105db57600080fd5b80639905045014610566578063a217fddf14610579578063a22cb4651461058157600080fd5b806394dcf2e61161017657806394dcf2e61461052457806395d89b411461053757806397610f301461053f57600080fd5b80638456cb591461050957806391d148541461051157600080fd5b8063303e74df1161024a578063565974d3116101fe5780636352211e116101d85780636352211e146104c357806368cbc14d146104d657806370a08231146104f657600080fd5b8063565974d31461047c5780635c975abb1461049157806360a4b76a1461049c57600080fd5b8063389ed2671161022f578063389ed2671461043a5780633f4ba83a1461046157806342842e0e1461046957600080fd5b8063303e74df1461041657806336568abe1461042757600080fd5b806318160ddd116102a1578063248a9ca311610286578063248a9ca3146103b75780632e342d49146103db5780632f2ff15d1461040357600080fd5b806318160ddd1461039257806323b872dd146103a457600080fd5b806306fdde03116102d257806306fdde0314610355578063081812fc1461036a578063095ea7b31461037d57600080fd5b806301ffc9a7146102ee5780630479d64414610316575b600080fd5b6103016102fc366004613209565b6106d0565b60405190151581526020015b60405180910390f35b61033d7f0000000000000000000000007df5bd5da810d1f713506648d04b4a9bdf0e0b5481565b6040516001600160a01b03909116815260200161030d565b61035d610714565b60405161030d9190613276565b61033d610378366004613289565b6107a6565b61039061038b3660046132b7565b6107cd565b005b600f545b60405190815260200161030d565b6103906103b23660046132e3565b610903565b6103966103c5366004613289565b6000908152600160208190526040909120015490565b6103ee6103e93660046133e9565b61097a565b6040805192835260208301919091520161030d565b610390610411366004613442565b610be1565b6008546001600160a01b031661033d565b610390610435366004613442565b610c07565b6103967f139c2898040ef16910dc9f44dc697df79363da767d8bc92f2e310312b816e46d81565b610390610c93565b6103906104773660046132e3565b610cc8565b610484610ce3565b60405161030d9190613472565b60005460ff16610301565b6103967fa076a07f65bcd51bcb15a0f01a65bc18f2d922acb81bcfd8af4caf5adb55709181565b61033d6104d1366004613289565b610f68565b6103966104e4366004613289565b60009081526010602052604090205490565b6103966105043660046134f0565b610fcd565b610390611067565b61030161051f366004613442565b611099565b610390610532366004613442565b611163565b61035d611283565b61033d7f000000000000000000000000463beb323b229d52f530be23c2e829c78904d8a881565b6103906105743660046134f0565b611292565b610396600081565b61039061058f36600461351b565b6112c5565b61033d7f0000000000000000000000001a3b856c1bfdb85255f133afd9116f240abceb0a81565b6105ce6105c9366004613549565b6112d0565b60405161030d91906135be565b600a546001600160a01b031661033d565b6103906105fa366004613620565b6113c5565b61039061060d3660046134f0565b611442565b61035d610620366004613289565b611475565b61039661063336600461368c565b611480565b610390610646366004613442565b6116ba565b600954610396565b61035d6116e0565b6103016106693660046136d7565b6001600160a01b03918216600090815260076020908152604080832093909416825291909152205460ff1690565b6103906106a5366004613705565b611706565b6103ee6106b8366004613289565b611739565b6103906106cb366004613289565b61180e565b60006001600160e01b031982167f7fa9643100000000000000000000000000000000000000000000000000000000148061070e575061070e82611841565b92915050565b60606002805461072390613740565b80601f016020809104026020016040519081016040528092919081815260200182805461074f90613740565b801561079c5780601f106107715761010080835404028352916020019161079c565b820191906000526020600020905b81548152906001019060200180831161077f57829003601f168201915b5050505050905090565b60006107b18261187f565b506000908152600660205260409020546001600160a01b031690565b60006107d882610f68565b9050806001600160a01b0316836001600160a01b0316036108665760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560448201527f720000000000000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b336001600160a01b038216148061088257506108828133610669565b6108f45760405162461bcd60e51b815260206004820152603d60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206f7220617070726f76656420666f7220616c6c000000606482015260840161085d565b6108fe83836118e3565b505050565b61090d3382611951565b61096f5760405162461bcd60e51b815260206004820152602d60248201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560448201526c1c881bdc88185c1c1c9bdd9959609a1b606482015260840161085d565b6108fe8383836119d0565b600080610985611bd6565b61098f3386611951565b610a015760405162461bcd60e51b815260206004820152602e60248201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560448201527f72206e6f7220617070726f766564000000000000000000000000000000000000606482015260840161085d565b7f0000000000000000000000007df5bd5da810d1f713506648d04b4a9bdf0e0b54610a2b86611c2b565b600086815260106020818152604080842081518083018352815481526001820180546001600160a01b038082168488019081528f8a5297909652969092556001600160a01b031990951690558351925190516326985b5f60e11b8152908216600482015260248101839052919550831690634d30b6be90604401602060405180830381865afa158015610ac2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ae6919061377a565b60208201516040517fe95e259c0000000000000000000000000000000000000000000000000000000081529194506001600160a01b03169063e95e259c90610b5a907f0000000000000000000000007df5bd5da810d1f713506648d04b4a9bdf0e0b549088908b9089908c90600401613793565b600060405180830381600087803b158015610b7457600080fd5b505af1158015610b88573d6000803e3d6000fd5b50505050610b933390565b6001600160a01b031684887f76e88d7c46f40a85a53501fc17c87c0c0bf97db37f6ac39640b61e13b109dc7986604051610bcf91815260200190565b60405180910390a45050935093915050565b60008281526001602081905260409091200154610bfd81611c41565b6108fe8383611c4b565b6001600160a01b0381163314610c855760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c660000000000000000000000000000000000606482015260840161085d565b610c8f8282611cb6565b5050565b7f139c2898040ef16910dc9f44dc697df79363da767d8bc92f2e310312b816e46d610cbd81611c41565b610cc5611d1d565b50565b6108fe838383604051806020016040528060008152506113c5565b610d0e6040518060800160405280606081526020016060815260200160608152602001606081525090565b600b604051806080016040529081600082018054610d2b90613740565b80601f0160208091040260200160405190810160405280929190818152602001828054610d5790613740565b8015610da45780601f10610d7957610100808354040283529160200191610da4565b820191906000526020600020905b815481529060010190602001808311610d8757829003601f168201915b50505050508152602001600182018054610dbd90613740565b80601f0160208091040260200160405190810160405280929190818152602001828054610de990613740565b8015610e365780601f10610e0b57610100808354040283529160200191610e36565b820191906000526020600020905b815481529060010190602001808311610e1957829003601f168201915b50505050508152602001600282018054610e4f90613740565b80601f0160208091040260200160405190810160405280929190818152602001828054610e7b90613740565b8015610ec85780601f10610e9d57610100808354040283529160200191610ec8565b820191906000526020600020905b815481529060010190602001808311610eab57829003601f168201915b50505050508152602001600382018054610ee190613740565b80601f0160208091040260200160405190810160405280929190818152602001828054610f0d90613740565b8015610f5a5780601f10610f2f57610100808354040283529160200191610f5a565b820191906000526020600020905b815481529060010190602001808311610f3d57829003601f168201915b505050505081525050905090565b6000818152600460205260408120546001600160a01b03168061070e5760405162461bcd60e51b815260206004820152601860248201527f4552433732313a20696e76616c696420746f6b656e2049440000000000000000604482015260640161085d565b60006001600160a01b03821661104b5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f74206120766160448201527f6c6964206f776e65720000000000000000000000000000000000000000000000606482015260840161085d565b506001600160a01b031660009081526005602052604090205490565b7f139c2898040ef16910dc9f44dc697df79363da767d8bc92f2e310312b816e46d61109181611c41565b610cc5611d6f565b60008281526001602090815260408083206001600160a01b038516845290915281205460ff168061115c5750816001600160a01b03167f0000000000000000000000001a3b856c1bfdb85255f133afd9116f240abceb0a6001600160a01b031663ee97f7f36040518163ffffffff1660e01b8152600401602060405180830381865afa15801561112d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061115191906137d6565b6001600160a01b0316145b9392505050565b61116b611bd6565b611176335b83611951565b6111e85760405162461bcd60e51b815260206004820152602e60248201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560448201527f72206e6f7220617070726f766564000000000000000000000000000000000000606482015260840161085d565b6000828152601060205260409081902060010154905163455b2b4360e11b81526001600160a01b037f0000000000000000000000007df5bd5da810d1f713506648d04b4a9bdf0e0b5481166004830152838116602483015290911690638ab6568690604401600060405180830381600087803b15801561126757600080fd5b505af115801561127b573d6000803e3d6000fd5b505050505050565b60606003805461072390613740565b7fa076a07f65bcd51bcb15a0f01a65bc18f2d922acb81bcfd8af4caf5adb5570916112bc81611c41565b610c8f82611dac565b610c8f338383611e7b565b60608167ffffffffffffffff8111156112eb576112eb613324565b60405190808252806020026020018201604052801561131e57816020015b60608152602001906001900390816113095790505b50905060005b828110156113be5761138e30858584818110611342576113426137f3565b90506020028101906113549190613809565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250611f4992505050565b8282815181106113a0576113a06137f3565b602002602001018190525080806113b69061386d565b915050611324565b5092915050565b6113ce33611170565b6114305760405162461bcd60e51b815260206004820152602d60248201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560448201526c1c881bdc88185c1c1c9bdd9959609a1b606482015260840161085d565b61143c84848484611f6e565b50505050565b7fa076a07f65bcd51bcb15a0f01a65bc18f2d922acb81bcfd8af4caf5adb55709161146c81611c41565b610c8f82611fec565b606061070e82612057565b600061148a611bd6565b6011805490600061149a8361386d565b9091555090507f0000000000000000000000007df5bd5da810d1f713506648d04b4a9bdf0e0b5460006114cb612144565b9050600086116115435760405162461bcd60e51b815260206004820152602660248201527f5374616b696e67506f736974696f6e4d616e616765723a20494e56414c49445f60448201527f414d4f554e540000000000000000000000000000000000000000000000000000606482015260840161085d565b6040805180820182528881526001600160a01b0383811660208084019182526000888152601090915293909320915182559151600190910180546001600160a01b03191691831691909117905582166328972b15336040516001600160e01b031960e084901b1681526001600160a01b0391821660048201529084166024820152604481018a90526064810189905260a06084820152601c60a48201527f5374616b696e67506f736974696f6e4d616e616765723a204d494e540000000060c482015260e4016020604051808303816000875af1158015611628573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061164c9190613886565b506116588584866121bb565b6001600160a01b03851687847f7fea3dfabbd3b7b49bd19d2211e9d7c653ade95d9de7b59c54a72d9680859f84898533604080519384526001600160a01b03928316602085015291169082015260600160405180910390a45050949350505050565b600082815260016020819052604090912001546116d681611c41565b6108fe8383611cb6565b60606117016116ed610ce3565b600954600a546001600160a01b0316612239565b905090565b7fa076a07f65bcd51bcb15a0f01a65bc18f2d922acb81bcfd8af4caf5adb55709161173081611c41565b610c8f826122c4565b6000806117458361187f565b6000838152601060209081526040918290208251808401845281548082526001909201546001600160a01b0390811693820184905293516326985b5f60e11b8152600481019390935260248301829052909450917f0000000000000000000000007df5bd5da810d1f713506648d04b4a9bdf0e0b541690634d30b6be90604401602060405180830381865afa1580156117e2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611806919061377a565b915050915091565b7fa076a07f65bcd51bcb15a0f01a65bc18f2d922acb81bcfd8af4caf5adb55709161183881611c41565b610c8f82612315565b60006001600160e01b031982167f5845372e00000000000000000000000000000000000000000000000000000000148061070e575061070e826123a9565b6000818152600460205260409020546001600160a01b0316610cc55760405162461bcd60e51b815260206004820152601860248201527f4552433732313a20696e76616c696420746f6b656e2049440000000000000000604482015260640161085d565b600081815260066020526040902080546001600160a01b0319166001600160a01b038416908117909155819061191882610f68565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b60008061195d83610f68565b9050806001600160a01b0316846001600160a01b031614806119a457506001600160a01b0380821660009081526007602090815260408083209388168352929052205460ff165b806119c85750836001600160a01b03166119bd846107a6565b6001600160a01b0316145b949350505050565b826001600160a01b03166119e382610f68565b6001600160a01b031614611a475760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b606482015260840161085d565b6001600160a01b038216611ac25760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f2061646460448201527f7265737300000000000000000000000000000000000000000000000000000000606482015260840161085d565b611acf83838360016123e7565b826001600160a01b0316611ae282610f68565b6001600160a01b031614611b465760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b606482015260840161085d565b600081815260066020908152604080832080546001600160a01b03199081169091556001600160a01b0387811680865260058552838620805460001901905590871680865283862080546001019055868652600490945282852080549092168417909155905184937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b60005460ff1615611c295760405162461bcd60e51b815260206004820152601060248201527f5061757361626c653a2070617573656400000000000000000000000000000000604482015260640161085d565b565b611c348161249b565b50600f8054600019019055565b610cc5813361253e565b611c558282611099565b610c8f5760008281526001602081815260408084206001600160a01b0386168086529252808420805460ff19169093179092559051339285917f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d9190a45050565b611cc08282611099565b15610c8f5760008281526001602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b611d25612597565b6000805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b611d77611bd6565b6000805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258611d523390565b6001600160a01b038116611e105760405162461bcd60e51b815260206004820152602560248201527f4552433732314465736372696261626c653a20494e56414c49445f444553435260448201526424a82a27a960d91b606482015260840161085d565b600854604080516001600160a01b0392831681529183166020830152805133927fe8b31212509d3f0c10470aa066887ac33c2c3dc76bb2db59e5a99823ed1d4e9792908290030190a2600880546001600160a01b0319166001600160a01b0392909216919091179055565b816001600160a01b0316836001600160a01b031603611edc5760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c657200000000000000604482015260640161085d565b6001600160a01b03838116600081815260076020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b606061115c83836040518060600160405280602781526020016140d3602791396125e9565b611f798484846119d0565b611f8584848484612661565b61143c5760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606482015260840161085d565b600a54604080516001600160a01b0392831681529183166020830152805133927f4d8f80e1903d6d2003eb791e4d8c65caaa6feeb024f36d27984c31b08c2a880092908290030190a2600a80546001600160a01b0319166001600160a01b0392909216919091179055565b60606120628261187f565b6008546001600160a01b0316806120c95760405162461bcd60e51b815260206004820152602560248201527f4552433732314465736372696261626c653a204d495353494e475f444553435260448201526424a82a27a960d91b606482015260840161085d565b806001600160a01b03166397b448e2846120e2866127ad565b6040518363ffffffff1660e01b81526004016120ff9291906138a3565b600060405180830381865afa15801561211c573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261115c91908101906138bc565b600061216373ac5450483197c648841e70c69c84eb0629e50d2761289a565b9050806001600160a01b0316638129fc1c6040518163ffffffff1660e01b8152600401600060405180830381600087803b1580156121a057600080fd5b505af11580156121b4573d6000803e3d6000fd5b5050505090565b6121c5838361293b565b6121d26000848484612661565b6108fe5760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606482015260840161085d565b60606000846000015185602001518660400151876060015161225a88612952565b61226c886001600160a01b03166129f2565b60405160200161228196959493929190613946565b604051602081830303815290604052905061229b81612a08565b6040516020016122ab9190613aea565b6040516020818303038152906040529150509392505050565b336001600160a01b03167f4b3ec8e8abc32b5c0b1646dc72fd7cf2f4d90449e7171c2ea224cd7825d63541600b83604051612300929190613c1b565b60405180910390a280600b6108fe8282613e26565b6103e881106123665760405162461bcd60e51b815260206004820152601b60248201527f45524337323144657461696c733a204d41585f53454c4c5f4645450000000000604482015260640161085d565b600954604080519182526020820183905233917f569b104e3f615b26071757ef60d0c50cdabb7f292601913b165a8b867aff3ee2910160405180910390a2600955565b60006001600160e01b031982167fecf9737800000000000000000000000000000000000000000000000000000000148061070e575061070e82612ba4565b6123ef611bd6565b6001600160a01b03831615612496576000828152601060205260409081902060010154905163455b2b4360e11b81526001600160a01b037f0000000000000000000000007df5bd5da810d1f713506648d04b4a9bdf0e0b5481166004830152858116602483015290911690638ab6568690604401600060405180830381600087803b15801561247d57600080fd5b505af1158015612491573d6000803e3d6000fd5b505050505b61143c565b60006124a682610f68565b90506124b68160008460016123e7565b6124bf82610f68565b600083815260066020908152604080832080546001600160a01b03199081169091556001600160a01b0385168085526005845282852080546000190190558785526004909352818420805490911690555192935084927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b6125488282611099565b610c8f57612555816129f2565b612560836020612be2565b604051602001612571929190613f43565b60408051601f198184030181529082905262461bcd60e51b825261085d91600401613276565b60005460ff16611c295760405162461bcd60e51b815260206004820152601460248201527f5061757361626c653a206e6f7420706175736564000000000000000000000000604482015260640161085d565b6060600080856001600160a01b0316856040516126069190613fc4565b600060405180830381855af49150503d8060008114612641576040519150601f19603f3d011682016040523d82523d6000602084013e612646565b606091505b509150915061265786838387612dc3565b9695505050505050565b60006001600160a01b0384163b156127a257604051630a85bd0160e11b81526001600160a01b0385169063150b7a02906126a5903390899088908890600401613fe0565b6020604051808303816000875af19250505080156126e0575060408051601f3d908101601f191682019092526126dd91810190614012565b60015b612788573d80801561270e576040519150601f19603f3d011682016040523d82523d6000602084013e612713565b606091505b5080516000036127805760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606482015260840161085d565b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490506119c8565b506001949350505050565b6000818152601060209081526040918290208251808401845281548082526001909201546001600160a01b0390811693820184905293516326985b5f60e11b815260048101939093526024830182905260609390927f0000000000000000000000007df5bd5da810d1f713506648d04b4a9bdf0e0b5490911690634d30b6be90604401602060405180830381865afa15801561284d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612871919061377a565b604080516020810193909352820152606001604051602081830303815290604052915050919050565b6000763d602d80600a3d3981f3363d3d373d3d3d363d730000008260601b60e81c176000526e5af43d82803e903d91602b57fd5bf38260781b17602052603760096000f090506001600160a01b0381166129365760405162461bcd60e51b815260206004820152601660248201527f455243313136373a20637265617465206661696c656400000000000000000000604482015260640161085d565b919050565b6129458282612e3c565b5050600f80546001019055565b6060600061295f83612fd5565b600101905060008167ffffffffffffffff81111561297f5761297f613324565b6040519080825280601f01601f1916602001820160405280156129a9576020820181803683370190505b5090508181016020015b600019017f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a85049450846129b357509392505050565b606061070e6001600160a01b0383166014612be2565b60608151600003612a2757505060408051602081019091526000815290565b60006040518060600160405280604081526020016140936040913990506000600384516002612a56919061402f565b612a609190614042565b612a6b906004614064565b90506000612a7a82602061402f565b67ffffffffffffffff811115612a9257612a92613324565b6040519080825280601f01601f191660200182016040528015612abc576020820181803683370190505b509050818152600183018586518101602084015b81831015612b28576003830192508251603f8160121c168501518253600182019150603f81600c1c168501518253600182019150603f8160061c168501518253600182019150603f8116850151825350600101612ad0565b600389510660018114612b425760028114612b6e57612b96565b7f3d3d000000000000000000000000000000000000000000000000000000000000600119830152612b96565b7f3d000000000000000000000000000000000000000000000000000000000000006000198301525b509398975050505050505050565b60006001600160e01b031982167f303e74df00000000000000000000000000000000000000000000000000000000148061070e575061070e826130b7565b60606000612bf1836002614064565b612bfc90600261402f565b67ffffffffffffffff811115612c1457612c14613324565b6040519080825280601f01601f191660200182016040528015612c3e576020820181803683370190505b5090507f300000000000000000000000000000000000000000000000000000000000000081600081518110612c7557612c756137f3565b60200101906001600160f81b031916908160001a9053507f780000000000000000000000000000000000000000000000000000000000000081600181518110612cc057612cc06137f3565b60200101906001600160f81b031916908160001a9053506000612ce4846002614064565b612cef90600161402f565b90505b6001811115612d74577f303132333435363738396162636465660000000000000000000000000000000085600f1660108110612d3057612d306137f3565b1a60f81b828281518110612d4657612d466137f3565b60200101906001600160f81b031916908160001a90535060049490941c93612d6d8161407b565b9050612cf2565b50831561115c5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e74604482015260640161085d565b60608315612e32578251600003612e2b576001600160a01b0385163b612e2b5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161085d565b50816119c8565b6119c88383613129565b6001600160a01b038216612e925760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f2061646472657373604482015260640161085d565b6000818152600460205260409020546001600160a01b031615612ef75760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000604482015260640161085d565b612f056000838360016123e7565b6000818152600460205260409020546001600160a01b031615612f6a5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000604482015260640161085d565b6001600160a01b038216600081815260056020908152604080832080546001019055848352600490915280822080546001600160a01b0319168417905551839291907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6000807a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000831061301e577a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000830492506040015b6d04ee2d6d415b85acef8100000000831061304a576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc10000831061306857662386f26fc10000830492506010015b6305f5e1008310613080576305f5e100830492506008015b612710831061309457612710830492506004015b606483106130a6576064830492506002015b600a831061070e5760010192915050565b60006001600160e01b031982167f80ac58cd00000000000000000000000000000000000000000000000000000000148061311a57506001600160e01b031982167f5b5e139f00000000000000000000000000000000000000000000000000000000145b8061070e575061070e82613153565b8151156131395781518083602001fd5b8060405162461bcd60e51b815260040161085d9190613276565b60006001600160e01b031982167fe327066e00000000000000000000000000000000000000000000000000000000148061070e575061070e8260006001600160e01b031982167f7965db0b00000000000000000000000000000000000000000000000000000000148061070e57507f01ffc9a7000000000000000000000000000000000000000000000000000000006001600160e01b031983161461070e565b6001600160e01b031981168114610cc557600080fd5b60006020828403121561321b57600080fd5b813561115c816131f3565b60005b83811015613241578181015183820152602001613229565b50506000910152565b60008151808452613262816020860160208601613226565b601f01601f19169290920160200192915050565b60208152600061115c602083018461324a565b60006020828403121561329b57600080fd5b5035919050565b6001600160a01b0381168114610cc557600080fd5b600080604083850312156132ca57600080fd5b82356132d5816132a2565b946020939093013593505050565b6000806000606084860312156132f857600080fd5b8335613303816132a2565b92506020840135613313816132a2565b929592945050506040919091013590565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561336357613363613324565b604052919050565b600067ffffffffffffffff82111561338557613385613324565b50601f01601f191660200190565b600082601f8301126133a457600080fd5b81356133b76133b28261336b565b61333a565b8181528460208386010111156133cc57600080fd5b816020850160208301376000918101602001919091529392505050565b6000806000606084860312156133fe57600080fd5b833592506020840135613410816132a2565b9150604084013567ffffffffffffffff81111561342c57600080fd5b61343886828701613393565b9150509250925092565b6000806040838503121561345557600080fd5b823591506020830135613467816132a2565b809150509250929050565b60208152600082516080602084015261348e60a084018261324a565b90506020840151601f19808584030160408601526134ac838361324a565b925060408601519150808584030160608601526134c9838361324a565b92506060860151915080858403016080860152506134e7828261324a565b95945050505050565b60006020828403121561350257600080fd5b813561115c816132a2565b8015158114610cc557600080fd5b6000806040838503121561352e57600080fd5b8235613539816132a2565b915060208301356134678161350d565b6000806020838503121561355c57600080fd5b823567ffffffffffffffff8082111561357457600080fd5b818501915085601f83011261358857600080fd5b81358181111561359757600080fd5b8660208260051b85010111156135ac57600080fd5b60209290920196919550909350505050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b8281101561361357603f1988860301845261360185835161324a565b945092850192908501906001016135e5565b5092979650505050505050565b6000806000806080858703121561363657600080fd5b8435613641816132a2565b93506020850135613651816132a2565b925060408501359150606085013567ffffffffffffffff81111561367457600080fd5b61368087828801613393565b91505092959194509250565b600080600080608085870312156136a257600080fd5b843593506020850135925060408501356136bb816132a2565b9150606085013567ffffffffffffffff81111561367457600080fd5b600080604083850312156136ea57600080fd5b82356136f5816132a2565b91506020830135613467816132a2565b60006020828403121561371757600080fd5b813567ffffffffffffffff81111561372e57600080fd5b82016080818503121561115c57600080fd5b600181811c9082168061375457607f821691505b60208210810361377457634e487b7160e01b600052602260045260246000fd5b50919050565b60006020828403121561378c57600080fd5b5051919050565b60006001600160a01b03808816835286602084015280861660408401525083606083015260a060808301526137cb60a083018461324a565b979650505050505050565b6000602082840312156137e857600080fd5b815161115c816132a2565b634e487b7160e01b600052603260045260246000fd5b6000808335601e1984360301811261382057600080fd5b83018035915067ffffffffffffffff82111561383b57600080fd5b60200191503681900382131561385057600080fd5b9250929050565b634e487b7160e01b600052601160045260246000fd5b60006001820161387f5761387f613857565b5060010190565b60006020828403121561389857600080fd5b815161115c8161350d565b8281526040602082015260006119c8604083018461324a565b6000602082840312156138ce57600080fd5b815167ffffffffffffffff8111156138e557600080fd5b8201601f810184136138f657600080fd5b80516139046133b28261336b565b81815285602083850101111561391957600080fd5b6134e7826020830160208601613226565b6000815161393c818560208601613226565b9290920192915050565b7f7b226e616d65223a22000000000000000000000000000000000000000000000081526000875161397e816009850160208c01613226565b7f222c226465736372697074696f6e223a2200000000000000000000000000000060099184019182015287516139bb81601a840160208c01613226565b7f222c22696d616765223a22000000000000000000000000000000000000000000601a929091019182015286516139f9816025840160208b01613226565b7f222c2265787465726e616c5f6c696e6b223a2200000000000000000000000000602592909101918201528551613a37816038840160208a01613226565b7f222c2273656c6c65725f6665655f62617369735f706f696e7473223a00000000603892909101918201528451613a75816054840160208901613226565b613adc613ab3613aad6054848601017f2c226665655f726563697069656e74223a220000000000000000000000000000815260120190565b8761392a565b7f227d000000000000000000000000000000000000000000000000000000000000815260020190565b9a9950505050505050505050565b7f646174613a6170706c69636174696f6e2f6a736f6e3b6261736536342c000000815260008251613b2281601d850160208701613226565b91909101601d0192915050565b60008154613b3c81613740565b808552602060018381168015613b595760018114613b7357613ba1565b60ff1985168884015283151560051b880183019550613ba1565b866000528260002060005b85811015613b995781548a8201860152908301908401613b7e565b890184019650505b505050505092915050565b6000808335601e19843603018112613bc357600080fd5b830160208101925035905067ffffffffffffffff811115613be357600080fd5b80360382131561385057600080fd5b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b60408152608060408201526000613c3560c0830185613b2f565b603f1980848303016060850152613c4f8260018801613b2f565b915080848303016080850152613c688260028801613b2f565b9150808483030160a085015250613c828160038701613b2f565b90508281036020840152613c968485613bac565b60808352613ca8608084018284613bf2565b915050613cb86020860186613bac565b8383036020850152613ccb838284613bf2565b92505050613cdc6040860186613bac565b8383036040850152613cef838284613bf2565b92505050613d006060860186613bac565b8383036060850152613d13838284613bf2565b98975050505050505050565b601f8211156108fe57600081815260208120601f850160051c81016020861015613d465750805b601f850160051c820191505b8181101561127b57828155600101613d52565b67ffffffffffffffff831115613d7d57613d7d613324565b613d9183613d8b8354613740565b83613d1f565b6000601f841160018114613dc55760008515613dad5750838201355b600019600387901b1c1916600186901b178355613e1f565b600083815260209020601f19861690835b82811015613df65786850135825560209485019460019092019101613dd6565b5086821015613e135760001960f88860031b161c19848701351681555b505060018560011b0183555b5050505050565b613e308283613809565b67ffffffffffffffff811115613e4857613e48613324565b613e5c81613e568554613740565b85613d1f565b6000601f821160018114613e905760008315613e785750838201355b600019600385901b1c1916600184901b178555613eea565b600085815260209020601f19841690835b82811015613ec15786850135825560209485019460019092019101613ea1565b5084821015613ede5760001960f88660031b161c19848701351681555b505060018360011b0185555b50505050613efb6020830183613809565b613f09818360018601613d65565b5050613f186040830183613809565b613f26818360028601613d65565b5050613f356060830183613809565b61143c818360038601613d65565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351613f7b816017850160208801613226565b7f206973206d697373696e6720726f6c65200000000000000000000000000000006017918401918201528351613fb8816028840160208801613226565b01602801949350505050565b60008251613fd6818460208701613226565b9190910192915050565b60006001600160a01b03808716835280861660208401525083604083015260806060830152612657608083018461324a565b60006020828403121561402457600080fd5b815161115c816131f3565b8082018082111561070e5761070e613857565b60008261405f57634e487b7160e01b600052601260045260246000fd5b500490565b808202811582820484141761070e5761070e613857565b60008161408a5761408a613857565b50600019019056fe4142434445464748494a4b4c4d4e4f505152535455565758595a6162636465666768696a6b6c6d6e6f707172737475767778797a303132333435363738392b2f416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220688938035ad94c2cfee607f7d035dd1cd5fdcf87c19af75e5a1e520708e3572c64736f6c63430008130033

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

000000000000000000000000463beb323b229d52f530be23c2e829c78904d8a8

-----Decoded View---------------
Arg [0] : staking (address): 0x463beb323b229d52F530Be23C2E829C78904D8a8

-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 000000000000000000000000463beb323b229d52f530be23c2e829c78904d8a8


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

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