CRO Price: $0.08 (-2.37%)

Token

Cros (CROS)

Overview

Max Total Supply

47,799,042.653581904385618571 CROS

Holders

1,286

Market

Price

$0.00 @ 0.003779 CRO

Onchain Market Cap

$14,008.47

Circulating Supply Market Cap

$0.00

Other Info

Token Contract (WITH 18 Decimals)

Balance
104,926.191093543915095161 CROS

Value
$30.75 ( ~396.5171 CRO) [0.2195%]
0xb0234db57a9798ce960509387c966d55ed35206b
Loading...
Loading
Loading...
Loading
Loading...
Loading

OVERVIEW

Croswap is a community-driven, multi-chain DEX that is optimized to run on any EVM-compatible blockchain network.

Market

Volume (24H):$104.67
Market Capitalization:$0.00
Circulating Supply:0.00 CROS
Market Data Source: Coinmarketcap

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:
DiamondBaseProxy

Compiler Version
v0.8.16+commit.07a7930e

Optimization Enabled:
Yes with 1 runs

Other Settings:
default evmVersion
File 1 of 29 : DiamondBaseProxy.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.15;

import {SolidStateDiamond} from "@solidstate/contracts/proxy/diamond/SolidStateDiamond.sol";

contract DiamondBaseProxy is SolidStateDiamond {}

File 2 of 29 : IERC173.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import { IERC173Internal } from './IERC173Internal.sol';

/**
 * @title Contract ownership standard interface
 * @dev see https://eips.ethereum.org/EIPS/eip-173
 */
interface IERC173 is IERC173Internal {
    /**
     * @notice get the ERC173 contract owner
     * @return conrtact owner
     */
    function owner() external view returns (address);

    /**
     * @notice transfer contract ownership to new account
     * @param account address of new owner
     */
    function transferOwnership(address account) external;
}

File 3 of 29 : IERC173Internal.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @title Partial ERC173 interface needed by internal functions
 */
interface IERC173Internal {
    event OwnershipTransferred(
        address indexed previousOwner,
        address indexed newOwner
    );
}

File 4 of 29 : IOwnable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import { IERC173 } from '../IERC173.sol';

interface IOwnable is IERC173 {}

File 5 of 29 : IOwnableInternal.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import { IERC173Internal } from '../IERC173Internal.sol';

interface IOwnableInternal is IERC173Internal {}

File 6 of 29 : ISafeOwnable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import { IOwnable } from './IOwnable.sol';

interface ISafeOwnable is IOwnable {
    /**
     * @notice get the nominated owner who has permission to call acceptOwnership
     */
    function nomineeOwner() external view returns (address);

    /**
     * @notice accept transfer of contract ownership
     */
    function acceptOwnership() external;
}

File 7 of 29 : ISafeOwnableInternal.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import { IOwnableInternal } from './IOwnableInternal.sol';

interface ISafeOwnableInternal is IOwnableInternal {}

File 8 of 29 : Ownable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import { IERC173 } from '../IERC173.sol';
import { IOwnable } from './IOwnable.sol';
import { OwnableInternal } from './OwnableInternal.sol';
import { OwnableStorage } from './OwnableStorage.sol';

/**
 * @title Ownership access control based on ERC173
 */
abstract contract Ownable is IOwnable, OwnableInternal {
    using OwnableStorage for OwnableStorage.Layout;

    /**
     * @inheritdoc IERC173
     */
    function owner() public view virtual returns (address) {
        return _owner();
    }

    /**
     * @inheritdoc IERC173
     */
    function transferOwnership(address account) public virtual onlyOwner {
        _transferOwnership(account);
    }
}

File 9 of 29 : OwnableInternal.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import { IOwnableInternal } from './IOwnableInternal.sol';
import { OwnableStorage } from './OwnableStorage.sol';

abstract contract OwnableInternal is IOwnableInternal {
    using OwnableStorage for OwnableStorage.Layout;

    modifier onlyOwner() {
        require(
            msg.sender == OwnableStorage.layout().owner,
            'Ownable: sender must be owner'
        );
        _;
    }

    function _owner() internal view virtual returns (address) {
        return OwnableStorage.layout().owner;
    }

    function _transferOwnership(address account) internal virtual {
        OwnableStorage.layout().setOwner(account);
        emit OwnershipTransferred(msg.sender, account);
    }
}

File 10 of 29 : OwnableStorage.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

library OwnableStorage {
    struct Layout {
        address owner;
    }

    bytes32 internal constant STORAGE_SLOT =
        keccak256('solidstate.contracts.storage.Ownable');

    function layout() internal pure returns (Layout storage l) {
        bytes32 slot = STORAGE_SLOT;
        assembly {
            l.slot := slot
        }
    }

    function setOwner(Layout storage l, address owner) internal {
        l.owner = owner;
    }
}

File 11 of 29 : SafeOwnable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import { Ownable, OwnableStorage } from './Ownable.sol';
import { ISafeOwnable } from './ISafeOwnable.sol';
import { OwnableInternal } from './OwnableInternal.sol';
import { SafeOwnableInternal } from './SafeOwnableInternal.sol';

/**
 * @title Ownership access control based on ERC173 with ownership transfer safety check
 */
abstract contract SafeOwnable is ISafeOwnable, Ownable, SafeOwnableInternal {
    /**
     * @inheritdoc ISafeOwnable
     */
    function nomineeOwner() public view virtual returns (address) {
        return _nomineeOwner();
    }

    /**
     * @inheritdoc ISafeOwnable
     */
    function acceptOwnership() public virtual onlyNomineeOwner {
        _acceptOwnership();
    }

    function _transferOwnership(address account)
        internal
        virtual
        override(OwnableInternal, SafeOwnableInternal)
    {
        super._transferOwnership(account);
    }
}

File 12 of 29 : SafeOwnableInternal.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import { ISafeOwnableInternal } from './ISafeOwnableInternal.sol';
import { OwnableInternal } from './OwnableInternal.sol';
import { OwnableStorage } from './OwnableStorage.sol';
import { SafeOwnableStorage } from './SafeOwnableStorage.sol';

abstract contract SafeOwnableInternal is ISafeOwnableInternal, OwnableInternal {
    using OwnableStorage for OwnableStorage.Layout;
    using SafeOwnableStorage for SafeOwnableStorage.Layout;

    modifier onlyNomineeOwner() {
        require(
            msg.sender == _nomineeOwner(),
            'SafeOwnable: sender must be nominee owner'
        );
        _;
    }

    /**
     * @notice get the nominated owner who has permission to call acceptOwnership
     */
    function _nomineeOwner() internal view virtual returns (address) {
        return SafeOwnableStorage.layout().nomineeOwner;
    }

    /**
     * @notice accept transfer of contract ownership
     */
    function _acceptOwnership() internal virtual {
        OwnableStorage.Layout storage l = OwnableStorage.layout();
        emit OwnershipTransferred(l.owner, msg.sender);
        l.setOwner(msg.sender);
        SafeOwnableStorage.layout().setNomineeOwner(address(0));
    }

    /**
     * @notice set nominee owner, granting permission to call acceptOwnership
     */
    function _transferOwnership(address account) internal virtual override {
        SafeOwnableStorage.layout().setNomineeOwner(account);
    }
}

File 13 of 29 : SafeOwnableStorage.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

library SafeOwnableStorage {
    struct Layout {
        address nomineeOwner;
    }

    bytes32 internal constant STORAGE_SLOT =
        keccak256('solidstate.contracts.storage.SafeOwnable');

    function layout() internal pure returns (Layout storage l) {
        bytes32 slot = STORAGE_SLOT;
        assembly {
            l.slot := slot
        }
    }

    function setNomineeOwner(Layout storage l, address nomineeOwner) internal {
        l.nomineeOwner = nomineeOwner;
    }
}

File 14 of 29 : ERC165.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import { IERC165 } from './IERC165.sol';
import { ERC165Storage } from './ERC165Storage.sol';

/**
 * @title ERC165 implementation
 */
abstract contract ERC165 is IERC165 {
    using ERC165Storage for ERC165Storage.Layout;

    /**
     * @inheritdoc IERC165
     */
    function supportsInterface(bytes4 interfaceId) public view returns (bool) {
        return ERC165Storage.layout().isSupportedInterface(interfaceId);
    }
}

File 15 of 29 : ERC165Storage.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

library ERC165Storage {
    struct Layout {
        mapping(bytes4 => bool) supportedInterfaces;
    }

    bytes32 internal constant STORAGE_SLOT =
        keccak256('solidstate.contracts.storage.ERC165');

    function layout() internal pure returns (Layout storage l) {
        bytes32 slot = STORAGE_SLOT;
        assembly {
            l.slot := slot
        }
    }

    function isSupportedInterface(Layout storage l, bytes4 interfaceId)
        internal
        view
        returns (bool)
    {
        return l.supportedInterfaces[interfaceId];
    }

    function setSupportedInterface(
        Layout storage l,
        bytes4 interfaceId,
        bool status
    ) internal {
        require(interfaceId != 0xffffffff, 'ERC165: invalid interface id');
        l.supportedInterfaces[interfaceId] = status;
    }
}

File 16 of 29 : IERC165.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @title ERC165 interface registration interface
 * @dev see https://eips.ethereum.org/EIPS/eip-165
 */
interface IERC165 {
    /**
     * @notice query whether contract has registered support for given interface
     * @param interfaceId interface id
     * @return bool whether interface is supported
     */
    function supportsInterface(bytes4 interfaceId) external view returns (bool);
}

File 17 of 29 : DiamondBase.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import { Proxy } from '../../Proxy.sol';
import { IDiamondBase } from './IDiamondBase.sol';
import { DiamondBaseStorage } from './DiamondBaseStorage.sol';

/**
 * @title EIP-2535 "Diamond" proxy base contract
 * @dev see https://eips.ethereum.org/EIPS/eip-2535
 */
abstract contract DiamondBase is IDiamondBase, Proxy {
    /**
     * @inheritdoc Proxy
     */
    function _getImplementation() internal view override returns (address) {
        // inline storage layout retrieval uses less gas
        DiamondBaseStorage.Layout storage l;
        bytes32 slot = DiamondBaseStorage.STORAGE_SLOT;
        assembly {
            l.slot := slot
        }

        address implementation = address(bytes20(l.facets[msg.sig]));

        if (implementation == address(0)) {
            implementation = l.fallbackAddress;
            require(
                implementation != address(0),
                'DiamondBase: no facet found for function signature'
            );
        }

        return implementation;
    }
}

File 18 of 29 : DiamondBaseStorage.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import { AddressUtils } from '../../../utils/AddressUtils.sol';
import { IDiamondWritable } from '../writable/IDiamondWritable.sol';

/**
 * @dev derived from https://github.com/mudgen/diamond-2 (MIT license)
 */
library DiamondBaseStorage {
    using AddressUtils for address;
    using DiamondBaseStorage for DiamondBaseStorage.Layout;

    struct Layout {
        // function selector => (facet address, selector slot position)
        mapping(bytes4 => bytes32) facets;
        // total number of selectors registered
        uint16 selectorCount;
        // array of selector slots with 8 selectors per slot
        mapping(uint256 => bytes32) selectorSlots;
        address fallbackAddress;
    }

    bytes32 constant CLEAR_ADDRESS_MASK =
        bytes32(uint256(0xffffffffffffffffffffffff));
    bytes32 constant CLEAR_SELECTOR_MASK = bytes32(uint256(0xffffffff << 224));

    bytes32 internal constant STORAGE_SLOT =
        keccak256('solidstate.contracts.storage.DiamondBase');

    event DiamondCut(
        IDiamondWritable.FacetCut[] facetCuts,
        address target,
        bytes data
    );

    function layout() internal pure returns (Layout storage l) {
        bytes32 slot = STORAGE_SLOT;
        assembly {
            l.slot := slot
        }
    }

    /**
     * @notice update functions callable on Diamond proxy
     * @param l storage layout
     * @param facetCuts array of structured Diamond facet update data
     * @param target optional recipient of initialization delegatecall
     * @param data optional initialization call data
     */
    function diamondCut(
        Layout storage l,
        IDiamondWritable.FacetCut[] memory facetCuts,
        address target,
        bytes memory data
    ) internal {
        unchecked {
            uint256 originalSelectorCount = l.selectorCount;
            uint256 selectorCount = originalSelectorCount;
            bytes32 selectorSlot;

            // Check if last selector slot is not full
            if (selectorCount & 7 > 0) {
                // get last selectorSlot
                selectorSlot = l.selectorSlots[selectorCount >> 3];
            }

            for (uint256 i; i < facetCuts.length; i++) {
                IDiamondWritable.FacetCut memory facetCut = facetCuts[i];
                IDiamondWritable.FacetCutAction action = facetCut.action;

                require(
                    facetCut.selectors.length > 0,
                    'DiamondBase: no selectors specified'
                );

                if (action == IDiamondWritable.FacetCutAction.ADD) {
                    (selectorCount, selectorSlot) = l.addFacetSelectors(
                        selectorCount,
                        selectorSlot,
                        facetCut
                    );
                } else if (action == IDiamondWritable.FacetCutAction.REPLACE) {
                    l.replaceFacetSelectors(facetCut);
                } else if (action == IDiamondWritable.FacetCutAction.REMOVE) {
                    (selectorCount, selectorSlot) = l.removeFacetSelectors(
                        selectorCount,
                        selectorSlot,
                        facetCut
                    );
                }
            }

            if (selectorCount != originalSelectorCount) {
                l.selectorCount = uint16(selectorCount);
            }

            // If last selector slot is not full
            if (selectorCount & 7 > 0) {
                l.selectorSlots[selectorCount >> 3] = selectorSlot;
            }

            emit DiamondCut(facetCuts, target, data);
            initialize(target, data);
        }
    }

    function addFacetSelectors(
        Layout storage l,
        uint256 selectorCount,
        bytes32 selectorSlot,
        IDiamondWritable.FacetCut memory facetCut
    ) internal returns (uint256, bytes32) {
        unchecked {
            require(
                facetCut.target == address(this) ||
                    facetCut.target.isContract(),
                'DiamondBase: ADD target has no code'
            );

            for (uint256 i; i < facetCut.selectors.length; i++) {
                bytes4 selector = facetCut.selectors[i];
                bytes32 oldFacet = l.facets[selector];

                require(
                    address(bytes20(oldFacet)) == address(0),
                    'DiamondBase: selector already added'
                );

                // add facet for selector
                l.facets[selector] =
                    bytes20(facetCut.target) |
                    bytes32(selectorCount);
                uint256 selectorInSlotPosition = (selectorCount & 7) << 5;

                // clear selector position in slot and add selector
                selectorSlot =
                    (selectorSlot &
                        ~(CLEAR_SELECTOR_MASK >> selectorInSlotPosition)) |
                    (bytes32(selector) >> selectorInSlotPosition);

                // if slot is full then write it to storage
                if (selectorInSlotPosition == 224) {
                    l.selectorSlots[selectorCount >> 3] = selectorSlot;
                    selectorSlot = 0;
                }

                selectorCount++;
            }

            return (selectorCount, selectorSlot);
        }
    }

    function removeFacetSelectors(
        Layout storage l,
        uint256 selectorCount,
        bytes32 selectorSlot,
        IDiamondWritable.FacetCut memory facetCut
    ) internal returns (uint256, bytes32) {
        unchecked {
            require(
                facetCut.target == address(0),
                'DiamondBase: REMOVE target must be zero address'
            );

            uint256 selectorSlotCount = selectorCount >> 3;
            uint256 selectorInSlotIndex = selectorCount & 7;

            for (uint256 i; i < facetCut.selectors.length; i++) {
                bytes4 selector = facetCut.selectors[i];
                bytes32 oldFacet = l.facets[selector];

                require(
                    address(bytes20(oldFacet)) != address(0),
                    'DiamondBase: selector not found'
                );

                require(
                    address(bytes20(oldFacet)) != address(this),
                    'DiamondBase: selector is immutable'
                );

                if (selectorSlot == 0) {
                    selectorSlotCount--;
                    selectorSlot = l.selectorSlots[selectorSlotCount];
                    selectorInSlotIndex = 7;
                } else {
                    selectorInSlotIndex--;
                }

                bytes4 lastSelector;
                uint256 oldSelectorsSlotCount;
                uint256 oldSelectorInSlotPosition;

                // adding a block here prevents stack too deep error
                {
                    // replace selector with last selector in l.facets
                    lastSelector = bytes4(
                        selectorSlot << (selectorInSlotIndex << 5)
                    );

                    if (lastSelector != selector) {
                        // update last selector slot position info
                        l.facets[lastSelector] =
                            (oldFacet & CLEAR_ADDRESS_MASK) |
                            bytes20(l.facets[lastSelector]);
                    }

                    delete l.facets[selector];
                    uint256 oldSelectorCount = uint16(uint256(oldFacet));
                    oldSelectorsSlotCount = oldSelectorCount >> 3;
                    oldSelectorInSlotPosition = (oldSelectorCount & 7) << 5;
                }

                if (oldSelectorsSlotCount != selectorSlotCount) {
                    bytes32 oldSelectorSlot = l.selectorSlots[
                        oldSelectorsSlotCount
                    ];

                    // clears the selector we are deleting and puts the last selector in its place.
                    oldSelectorSlot =
                        (oldSelectorSlot &
                            ~(CLEAR_SELECTOR_MASK >>
                                oldSelectorInSlotPosition)) |
                        (bytes32(lastSelector) >> oldSelectorInSlotPosition);

                    // update storage with the modified slot
                    l.selectorSlots[oldSelectorsSlotCount] = oldSelectorSlot;
                } else {
                    // clears the selector we are deleting and puts the last selector in its place.
                    selectorSlot =
                        (selectorSlot &
                            ~(CLEAR_SELECTOR_MASK >>
                                oldSelectorInSlotPosition)) |
                        (bytes32(lastSelector) >> oldSelectorInSlotPosition);
                }

                if (selectorInSlotIndex == 0) {
                    delete l.selectorSlots[selectorSlotCount];
                    selectorSlot = 0;
                }
            }

            selectorCount = (selectorSlotCount << 3) | selectorInSlotIndex;

            return (selectorCount, selectorSlot);
        }
    }

    function replaceFacetSelectors(
        Layout storage l,
        IDiamondWritable.FacetCut memory facetCut
    ) internal {
        unchecked {
            require(
                facetCut.target.isContract(),
                'DiamondBase: REPLACE target has no code'
            );

            for (uint256 i; i < facetCut.selectors.length; i++) {
                bytes4 selector = facetCut.selectors[i];
                bytes32 oldFacet = l.facets[selector];
                address oldFacetAddress = address(bytes20(oldFacet));

                require(
                    oldFacetAddress != address(0),
                    'DiamondBase: selector not found'
                );

                require(
                    oldFacetAddress != address(this),
                    'DiamondBase: selector is immutable'
                );

                require(
                    oldFacetAddress != facetCut.target,
                    'DiamondBase: REPLACE target is identical'
                );

                // replace old facet address
                l.facets[selector] =
                    (oldFacet & CLEAR_ADDRESS_MASK) |
                    bytes20(facetCut.target);
            }
        }
    }

    function initialize(address target, bytes memory data) private {
        require(
            (target == address(0)) == (data.length == 0),
            'DiamondBase: invalid initialization parameters'
        );

        if (target != address(0)) {
            if (target != address(this)) {
                require(
                    target.isContract(),
                    'DiamondBase: initialization target has no code'
                );
            }

            (bool success, ) = target.delegatecall(data);

            if (!success) {
                assembly {
                    returndatacopy(0, 0, returndatasize())
                    revert(0, returndatasize())
                }
            }
        }
    }
}

File 19 of 29 : IDiamondBase.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import { IProxy } from '../../IProxy.sol';

interface IDiamondBase is IProxy {}

File 20 of 29 : ISolidStateDiamond.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import { ISafeOwnable } from '../../access/ownable/ISafeOwnable.sol';
import { IERC165 } from '../../introspection/IERC165.sol';
import { IDiamondBase } from './base/IDiamondBase.sol';
import { IDiamondReadable } from './readable/IDiamondReadable.sol';
import { IDiamondWritable } from './writable/IDiamondWritable.sol';

interface ISolidStateDiamond is
    IDiamondBase,
    IDiamondReadable,
    IDiamondWritable,
    ISafeOwnable,
    IERC165
{
    receive() external payable;

    /**
     * @notice get the address of the fallback contract
     * @return fallback address
     */
    function getFallbackAddress() external view returns (address);

    /**
     * @notice set the address of the fallback contract
     * @param fallbackAddress fallback address
     */
    function setFallbackAddress(address fallbackAddress) external;
}

File 21 of 29 : DiamondReadable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import { DiamondBaseStorage } from '../base/DiamondBaseStorage.sol';
import { IDiamondReadable } from './IDiamondReadable.sol';

/**
 * @title EIP-2535 "Diamond" proxy introspection contract
 * @dev derived from https://github.com/mudgen/diamond-2 (MIT license)
 */
abstract contract DiamondReadable is IDiamondReadable {
    /**
     * @inheritdoc IDiamondReadable
     */
    function facets() external view returns (Facet[] memory diamondFacets) {
        DiamondBaseStorage.Layout storage l = DiamondBaseStorage.layout();

        diamondFacets = new Facet[](l.selectorCount);

        uint8[] memory numFacetSelectors = new uint8[](l.selectorCount);
        uint256 numFacets;
        uint256 selectorIndex;

        // loop through function selectors
        for (uint256 slotIndex; selectorIndex < l.selectorCount; slotIndex++) {
            bytes32 slot = l.selectorSlots[slotIndex];

            for (
                uint256 selectorSlotIndex;
                selectorSlotIndex < 8;
                selectorSlotIndex++
            ) {
                selectorIndex++;

                if (selectorIndex > l.selectorCount) {
                    break;
                }

                bytes4 selector = bytes4(slot << (selectorSlotIndex << 5));
                address facet = address(bytes20(l.facets[selector]));

                bool continueLoop;

                for (uint256 facetIndex; facetIndex < numFacets; facetIndex++) {
                    if (diamondFacets[facetIndex].target == facet) {
                        diamondFacets[facetIndex].selectors[
                            numFacetSelectors[facetIndex]
                        ] = selector;
                        // probably will never have more than 256 functions from one facet contract
                        require(numFacetSelectors[facetIndex] < 255);
                        numFacetSelectors[facetIndex]++;
                        continueLoop = true;
                        break;
                    }
                }

                if (continueLoop) {
                    continue;
                }

                diamondFacets[numFacets].target = facet;
                diamondFacets[numFacets].selectors = new bytes4[](
                    l.selectorCount
                );
                diamondFacets[numFacets].selectors[0] = selector;
                numFacetSelectors[numFacets] = 1;
                numFacets++;
            }
        }

        for (uint256 facetIndex; facetIndex < numFacets; facetIndex++) {
            uint256 numSelectors = numFacetSelectors[facetIndex];
            bytes4[] memory selectors = diamondFacets[facetIndex].selectors;

            // setting the number of selectors
            assembly {
                mstore(selectors, numSelectors)
            }
        }

        // setting the number of facets
        assembly {
            mstore(diamondFacets, numFacets)
        }
    }

    /**
     * @inheritdoc IDiamondReadable
     */
    function facetFunctionSelectors(address facet)
        external
        view
        returns (bytes4[] memory selectors)
    {
        DiamondBaseStorage.Layout storage l = DiamondBaseStorage.layout();

        selectors = new bytes4[](l.selectorCount);

        uint256 numSelectors;
        uint256 selectorIndex;

        // loop through function selectors
        for (uint256 slotIndex; selectorIndex < l.selectorCount; slotIndex++) {
            bytes32 slot = l.selectorSlots[slotIndex];

            for (
                uint256 selectorSlotIndex;
                selectorSlotIndex < 8;
                selectorSlotIndex++
            ) {
                selectorIndex++;

                if (selectorIndex > l.selectorCount) {
                    break;
                }

                bytes4 selector = bytes4(slot << (selectorSlotIndex << 5));

                if (facet == address(bytes20(l.facets[selector]))) {
                    selectors[numSelectors] = selector;
                    numSelectors++;
                }
            }
        }

        // set the number of selectors in the array
        assembly {
            mstore(selectors, numSelectors)
        }
    }

    /**
     * @inheritdoc IDiamondReadable
     */
    function facetAddresses()
        external
        view
        returns (address[] memory addresses)
    {
        DiamondBaseStorage.Layout storage l = DiamondBaseStorage.layout();

        addresses = new address[](l.selectorCount);
        uint256 numFacets;
        uint256 selectorIndex;

        for (uint256 slotIndex; selectorIndex < l.selectorCount; slotIndex++) {
            bytes32 slot = l.selectorSlots[slotIndex];

            for (
                uint256 selectorSlotIndex;
                selectorSlotIndex < 8;
                selectorSlotIndex++
            ) {
                selectorIndex++;

                if (selectorIndex > l.selectorCount) {
                    break;
                }

                bytes4 selector = bytes4(slot << (selectorSlotIndex << 5));
                address facet = address(bytes20(l.facets[selector]));

                bool continueLoop;

                for (uint256 facetIndex; facetIndex < numFacets; facetIndex++) {
                    if (facet == addresses[facetIndex]) {
                        continueLoop = true;
                        break;
                    }
                }

                if (continueLoop) {
                    continue;
                }

                addresses[numFacets] = facet;
                numFacets++;
            }
        }

        // set the number of facet addresses in the array
        assembly {
            mstore(addresses, numFacets)
        }
    }

    /**
     * @inheritdoc IDiamondReadable
     */
    function facetAddress(bytes4 selector)
        external
        view
        returns (address facet)
    {
        facet = address(bytes20(DiamondBaseStorage.layout().facets[selector]));
    }
}

File 22 of 29 : IDiamondReadable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @title Diamond proxy introspection interface
 * @dev see https://eips.ethereum.org/EIPS/eip-2535
 */
interface IDiamondReadable {
    struct Facet {
        address target;
        bytes4[] selectors;
    }

    /**
     * @notice get all facets and their selectors
     * @return diamondFacets array of structured facet data
     */
    function facets() external view returns (Facet[] memory diamondFacets);

    /**
     * @notice get all selectors for given facet address
     * @param facet address of facet to query
     * @return selectors array of function selectors
     */
    function facetFunctionSelectors(address facet)
        external
        view
        returns (bytes4[] memory selectors);

    /**
     * @notice get addresses of all facets used by diamond
     * @return addresses array of facet addresses
     */
    function facetAddresses()
        external
        view
        returns (address[] memory addresses);

    /**
     * @notice get the address of the facet associated with given selector
     * @param selector function selector to query
     * @return facet facet address (zero address if not found)
     */
    function facetAddress(bytes4 selector)
        external
        view
        returns (address facet);
}

File 23 of 29 : SolidStateDiamond.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import { IOwnable, Ownable, OwnableInternal, OwnableStorage } from '../../access/ownable/Ownable.sol';
import { ISafeOwnable, SafeOwnable } from '../../access/ownable/SafeOwnable.sol';
import { IERC173 } from '../../access/IERC173.sol';
import { ERC165, IERC165, ERC165Storage } from '../../introspection/ERC165.sol';
import { DiamondBase, DiamondBaseStorage } from './base/DiamondBase.sol';
import { DiamondReadable, IDiamondReadable } from './readable/DiamondReadable.sol';
import { DiamondWritable, IDiamondWritable } from './writable/DiamondWritable.sol';
import { ISolidStateDiamond } from './ISolidStateDiamond.sol';

/**
 * @title SolidState "Diamond" proxy reference implementation
 */
abstract contract SolidStateDiamond is
    ISolidStateDiamond,
    DiamondBase,
    DiamondReadable,
    DiamondWritable,
    SafeOwnable,
    ERC165
{
    using DiamondBaseStorage for DiamondBaseStorage.Layout;
    using ERC165Storage for ERC165Storage.Layout;
    using OwnableStorage for OwnableStorage.Layout;

    constructor() {
        ERC165Storage.Layout storage erc165 = ERC165Storage.layout();
        bytes4[] memory selectors = new bytes4[](12);

        // register DiamondWritable

        selectors[0] = IDiamondWritable.diamondCut.selector;

        erc165.setSupportedInterface(type(IDiamondWritable).interfaceId, true);

        // register DiamondReadable

        selectors[1] = IDiamondReadable.facets.selector;
        selectors[2] = IDiamondReadable.facetFunctionSelectors.selector;
        selectors[3] = IDiamondReadable.facetAddresses.selector;
        selectors[4] = IDiamondReadable.facetAddress.selector;

        erc165.setSupportedInterface(type(IDiamondReadable).interfaceId, true);

        // register ERC165

        selectors[5] = IERC165.supportsInterface.selector;

        erc165.setSupportedInterface(type(IERC165).interfaceId, true);

        // register SafeOwnable

        selectors[6] = Ownable.owner.selector;
        selectors[7] = SafeOwnable.nomineeOwner.selector;
        selectors[8] = Ownable.transferOwnership.selector;
        selectors[9] = SafeOwnable.acceptOwnership.selector;

        erc165.setSupportedInterface(type(IERC173).interfaceId, true);

        // register Diamond

        selectors[10] = SolidStateDiamond.getFallbackAddress.selector;
        selectors[11] = SolidStateDiamond.setFallbackAddress.selector;

        // diamond cut

        FacetCut[] memory facetCuts = new FacetCut[](1);

        facetCuts[0] = FacetCut({
            target: address(this),
            action: IDiamondWritable.FacetCutAction.ADD,
            selectors: selectors
        });

        DiamondBaseStorage.layout().diamondCut(facetCuts, address(0), '');

        // set owner

        OwnableStorage.layout().setOwner(msg.sender);
    }

    receive() external payable {}

    /**
     * @inheritdoc ISolidStateDiamond
     */
    function getFallbackAddress() external view returns (address) {
        return DiamondBaseStorage.layout().fallbackAddress;
    }

    /**
     * @inheritdoc ISolidStateDiamond
     */
    function setFallbackAddress(address fallbackAddress) external onlyOwner {
        DiamondBaseStorage.layout().fallbackAddress = fallbackAddress;
    }

    function _transferOwnership(address account)
        internal
        virtual
        override(OwnableInternal, SafeOwnable)
    {
        super._transferOwnership(account);
    }
}

File 24 of 29 : DiamondWritable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import { OwnableInternal } from '../../../access/ownable/OwnableInternal.sol';
import { DiamondBaseStorage } from '../base/DiamondBaseStorage.sol';
import { IDiamondWritable } from './IDiamondWritable.sol';

/**
 * @title EIP-2535 "Diamond" proxy update contract
 */
abstract contract DiamondWritable is IDiamondWritable, OwnableInternal {
    using DiamondBaseStorage for DiamondBaseStorage.Layout;

    /**
     * @inheritdoc IDiamondWritable
     */
    function diamondCut(
        FacetCut[] calldata facetCuts,
        address target,
        bytes calldata data
    ) external onlyOwner {
        DiamondBaseStorage.layout().diamondCut(facetCuts, target, data);
    }
}

File 25 of 29 : IDiamondWritable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @title Diamond proxy upgrade interface
 * @dev see https://eips.ethereum.org/EIPS/eip-2535
 */
interface IDiamondWritable {
    enum FacetCutAction {
        ADD,
        REPLACE,
        REMOVE
    }

    event DiamondCut(FacetCut[] facetCuts, address target, bytes data);

    struct FacetCut {
        address target;
        FacetCutAction action;
        bytes4[] selectors;
    }

    /**
     * @notice update diamond facets and optionally execute arbitrary initialization function
     * @param facetCuts array of structured Diamond facet update data
     * @param target optional target of initialization delegatecall
     * @param data optional initialization function call data
     */
    function diamondCut(
        FacetCut[] calldata facetCuts,
        address target,
        bytes calldata data
    ) external;
}

File 26 of 29 : IProxy.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

interface IProxy {
    fallback() external payable;
}

File 27 of 29 : Proxy.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import { AddressUtils } from '../utils/AddressUtils.sol';
import { IProxy } from './IProxy.sol';

/**
 * @title Base proxy contract
 */
abstract contract Proxy is IProxy {
    using AddressUtils for address;

    /**
     * @notice delegate all calls to implementation contract
     * @dev reverts if implementation address contains no code, for compatibility with metamorphic contracts
     * @dev memory location in use by assembly may be unsafe in other contexts
     */
    fallback() external payable virtual {
        address implementation = _getImplementation();

        require(
            implementation.isContract(),
            'Proxy: implementation must be contract'
        );

        assembly {
            calldatacopy(0, 0, calldatasize())
            let result := delegatecall(
                gas(),
                implementation,
                0,
                calldatasize(),
                0,
                0
            )
            returndatacopy(0, 0, returndatasize())

            switch result
            case 0 {
                revert(0, returndatasize())
            }
            default {
                return(0, returndatasize())
            }
        }
    }

    /**
     * @notice get logic implementation address
     * @return implementation address
     */
    function _getImplementation() internal virtual returns (address);
}

File 28 of 29 : AddressUtils.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import { UintUtils } from './UintUtils.sol';

library AddressUtils {
    using UintUtils for uint256;

    function toString(address account) internal pure returns (string memory) {
        return uint256(uint160(account)).toHexString(20);
    }

    function isContract(address account) internal view returns (bool) {
        uint256 size;
        assembly {
            size := extcodesize(account)
        }
        return size > 0;
    }

    function sendValue(address payable account, uint256 amount) internal {
        (bool success, ) = account.call{ value: amount }('');
        require(success, 'AddressUtils: failed to send value');
    }

    function functionCall(address target, bytes memory data)
        internal
        returns (bytes memory)
    {
        return
            functionCall(target, data, 'AddressUtils: failed low-level call');
    }

    function functionCall(
        address target,
        bytes memory data,
        string memory error
    ) internal returns (bytes memory) {
        return _functionCallWithValue(target, data, 0, error);
    }

    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value
    ) internal returns (bytes memory) {
        return
            functionCallWithValue(
                target,
                data,
                value,
                'AddressUtils: failed low-level call with value'
            );
    }

    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value,
        string memory error
    ) internal returns (bytes memory) {
        require(
            address(this).balance >= value,
            'AddressUtils: insufficient balance for call'
        );
        return _functionCallWithValue(target, data, value, error);
    }

    function _functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value,
        string memory error
    ) private returns (bytes memory) {
        require(
            isContract(target),
            'AddressUtils: function call to non-contract'
        );

        (bool success, bytes memory returnData) = target.call{ value: value }(
            data
        );

        if (success) {
            return returnData;
        } else if (returnData.length > 0) {
            assembly {
                let returnData_size := mload(returnData)
                revert(add(32, returnData), returnData_size)
            }
        } else {
            revert(error);
        }
    }
}

File 29 of 29 : UintUtils.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @title utility functions for uint256 operations
 * @dev derived from https://github.com/OpenZeppelin/openzeppelin-contracts/ (MIT license)
 */
library UintUtils {
    bytes16 private constant HEX_SYMBOLS = '0123456789abcdef';

    function toString(uint256 value) internal pure returns (string memory) {
        if (value == 0) {
            return '0';
        }

        uint256 temp = value;
        uint256 digits;

        while (temp != 0) {
            digits++;
            temp /= 10;
        }

        bytes memory buffer = new bytes(digits);

        while (value != 0) {
            digits -= 1;
            buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));
            value /= 10;
        }

        return string(buffer);
    }

    function toHexString(uint256 value) internal pure returns (string memory) {
        if (value == 0) {
            return '0x00';
        }

        uint256 length = 0;

        for (uint256 temp = value; temp != 0; temp >>= 8) {
            unchecked {
                length++;
            }
        }

        return toHexString(value, 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';

        unchecked {
            for (uint256 i = 2 * length + 1; i > 1; --i) {
                buffer[i] = HEX_SYMBOLS[value & 0xf];
                value >>= 4;
            }
        }

        require(value == 0, 'UintUtils: hex length insufficient');

        return string(buffer);
    }
}

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

Contract Security Audit

Contract ABI

[{"anonymous":false,"inputs":[{"components":[{"internalType":"address","name":"target","type":"address"},{"internalType":"enum IDiamondWritable.FacetCutAction","name":"action","type":"uint8"},{"internalType":"bytes4[]","name":"selectors","type":"bytes4[]"}],"indexed":false,"internalType":"struct IDiamondWritable.FacetCut[]","name":"facetCuts","type":"tuple[]"},{"indexed":false,"internalType":"address","name":"target","type":"address"},{"indexed":false,"internalType":"bytes","name":"data","type":"bytes"}],"name":"DiamondCut","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"stateMutability":"payable","type":"fallback"},{"inputs":[],"name":"acceptOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"target","type":"address"},{"internalType":"enum IDiamondWritable.FacetCutAction","name":"action","type":"uint8"},{"internalType":"bytes4[]","name":"selectors","type":"bytes4[]"}],"internalType":"struct IDiamondWritable.FacetCut[]","name":"facetCuts","type":"tuple[]"},{"internalType":"address","name":"target","type":"address"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"diamondCut","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"selector","type":"bytes4"}],"name":"facetAddress","outputs":[{"internalType":"address","name":"facet","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"facetAddresses","outputs":[{"internalType":"address[]","name":"addresses","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"facet","type":"address"}],"name":"facetFunctionSelectors","outputs":[{"internalType":"bytes4[]","name":"selectors","type":"bytes4[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"facets","outputs":[{"components":[{"internalType":"address","name":"target","type":"address"},{"internalType":"bytes4[]","name":"selectors","type":"bytes4[]"}],"internalType":"struct IDiamondReadable.Facet[]","name":"diamondFacets","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getFallbackAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nomineeOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"fallbackAddress","type":"address"}],"name":"setFallbackAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]

60806040523480156200001157600080fd5b506000620000296200048160201b62000cdb1760201c565b60408051600c8082526101a08201909252919250600091906020820161018080368337019050509050631f931c1c60e01b8160008151811062000070576200007062000f8a565b6001600160e01b0319909216602092830291909101820152620000aa9083906307e4c70760e21b9060019062000cff620004a5821b17901c565b637a0ed62760e01b81600181518110620000c857620000c862000f8a565b6001600160e01b03199092166020928302919091019091015280516356fe50af60e11b908290600290811062000102576200010262000f8a565b6001600160e01b03199092166020928302919091019091015280516314bbdacb60e21b90829060039081106200013c576200013c62000f8a565b6001600160e01b03199092166020928302919091019091015280516366ffd66360e11b908290600490811062000176576200017662000f8a565b6001600160e01b0319909216602092830291909101820152620001b09083906348e2b09360e01b9060019062000cff620004a5821b17901c565b6301ffc9a760e01b81600581518110620001ce57620001ce62000f8a565b6001600160e01b0319909216602092830291909101820152620002089083906301ffc9a760e01b9060019062000cff620004a5821b17901c565b638da5cb5b60e01b8160068151811062000226576200022662000f8a565b6001600160e01b031990921660209283029190910190910152805163455a8a8560e11b908290600790811062000260576200026062000f8a565b6001600160e01b031990921660209283029190910190910152805163f2fde38b60e01b90829060089081106200029a576200029a62000f8a565b6001600160e01b03199092166020928302919091019091015280516379ba509760e01b9082906009908110620002d457620002d462000f8a565b6001600160e01b03199092166020928302919091018201526200030e9083906307f5828d60e41b9060019062000cff620004a5821b17901c565b632c40805960e01b81600a815181106200032c576200032c62000f8a565b6001600160e01b0319909216602092830291909101909101528051639142376560e01b908290600b90811062000366576200036662000f8a565b6001600160e01b03199290921660209283029190910190910152604080516001808252818301909252600091816020015b604080516060808201835260008083526020830152918101919091528152602001906001900390816200039757905050604080516060810190915230815290915060208101600081526020018381525081600081518110620003fd57620003fd62000f8a565b60200260200101819052506200044a81600060405180602001604052806000815250620004346200053360201b62000d861760201c565b6200055760201b62000d9817909392919060201c565b6200047833620004646200078360201b62000f741760201c565b620007a760201b62000f981790919060201c565b505050620011a8565b7f326d0c59a7612f6a9919e2a8ee333c80ba689d8ba2634de89c85cbb04832e70590565b6001600160e01b03198083169003620005055760405162461bcd60e51b815260206004820152601c60248201527f4552433136353a20696e76616c696420696e746572666163652069640000000060448201526064015b60405180910390fd5b6001600160e01b03199190911660009081526020929092526040909120805460ff1916911515919091179055565b7f177481ac65e4292921c69f62d1cc7f57541261e5d61c8175cf4e36a01c9bfc9390565b600184015461ffff811690819060009060071615620005885750600381901c60009081526002870160205260409020545b60005b8651811015620006f1576000878281518110620005ac57620005ac62000f8a565b60200260200101519050600081602001519050600082604001515111620006225760405162461bcd60e51b815260206004820152602360248201527f4469616d6f6e64426173653a206e6f2073656c6563746f7273207370656369666044820152621a595960ea1b6064820152608401620004fc565b600081600281111562000639576200063962000fa0565b0362000668576200065d8585848d620007c460201b62000fb517909392919060201c565b9095509350620006e6565b60018160028111156200067f576200067f62000fa0565b03620006a5576200069f828b6200099660201b620011681790919060201c565b620006e6565b6002816002811115620006bc57620006bc62000fa0565b03620006e657620006e08585848d62000b7f60201b6200132b17909392919060201c565b90955093505b50506001016200058b565b508282146200070e5760018701805461ffff191661ffff84161790555b60078216156200073157600382901c600090815260028801602052604090208190555b7f8faa70878671ccd212d20771b795c50af8fd3ff6cf27f4bde57e5d4de0aeb67386868660405162000766939291906200100a565b60405180910390a16200077a858562000df5565b50505050505050565b7f8a22373512790c48b83a1fe2efdd2888d4a917bcdc24d0adf63e60f67168046090565b81546001600160a01b0319166001600160a01b0391909116179055565b805160009081906001600160a01b03163014806200080057506200080083600001516001600160a01b031662000f8460201b620003821760201c565b6200085a5760405162461bcd60e51b815260206004820152602360248201527f4469616d6f6e64426173653a204144442074617267657420686173206e6f20636044820152626f646560e81b6064820152608401620004fc565b60005b836040015151811015620009895760008460400151828151811062000886576200088662000f8a565b6020908102919091018101516001600160e01b031981166000908152918a9052604090912054909150606081901c156200090f5760405162461bcd60e51b815260206004820152602360248201527f4469616d6f6e64426173653a2073656c6563746f7220616c726561647920616460448201526219195960ea1b6064820152608401620004fc565b85516001600160e01b0319838116600081815260208d90526040902060609390931b6001600160601b0319168b1790925560058a901b60e090811692831c91831c199990991617978190036200097957600389901c600090815260028b0160205260408120989098555b505050600195860195016200085d565b5093959294509192505050565b620009b981600001516001600160a01b031662000f8460201b620003821760201c565b62000a175760405162461bcd60e51b815260206004820152602760248201527f4469616d6f6e64426173653a205245504c4143452074617267657420686173206044820152666e6f20636f646560c81b6064820152608401620004fc565b60005b81604001515181101562000b7a5760008260400151828151811062000a435762000a4362000f8a565b6020908102919091018101516001600160e01b03198116600090815291869052604090912054909150606081901c8062000a915760405162461bcd60e51b8152600401620004fc9062001111565b306001600160a01b0382160362000abc5760405162461bcd60e51b8152600401620004fc9062001148565b84600001516001600160a01b0316816001600160a01b03160362000b345760405162461bcd60e51b815260206004820152602860248201527f4469616d6f6e64426173653a205245504c41434520746172676574206973206960448201526719195b9d1a58d85b60c21b6064820152608401620004fc565b5083516001600160e01b031992909216600090815260208690526040902060609290921b6001600160601b0319166001600160601b039190911617905560010162000a1a565b505050565b805160009081906001600160a01b03161562000bf65760405162461bcd60e51b815260206004820152602f60248201527f4469616d6f6e64426173653a2052454d4f564520746172676574206d7573742060448201526e6265207a65726f206164647265737360881b6064820152608401620004fc565b600385901c6007861660005b85604001515181101562000de15760008660400151828151811062000c2b5762000c2b62000f8a565b6020908102919091018101516001600160e01b031981166000908152918c9052604090912054909150606081901c62000c785760405162461bcd60e51b8152600401620004fc9062001111565b30606082901c0362000c9e5760405162461bcd60e51b8152600401620004fc9062001148565b600089900362000ccc57600019909401600081815260028c0160205260409020549850936007935062000cd4565b600019909301925b600584901b89901b6000806001600160e01b03198084169086161462000d27576001600160e01b03198316600090815260208f90526040902080546001600160601b0319166001600160601b0386161790555b50506001600160e01b03198316600090815260208d90526040812055611fff600383901c1660e0600584901b1687821462000d8c57600082815260028f016020526040902080546001600160e01b031980841c19909116908516831c17905562000db0565b80836001600160e01b031916901c816001600160e01b031960001b901c198d16179b505b8660000362000dcf57600088815260028f01602052604081208190559b505b50506001909301925062000c02915050565b5060039190911b1796939550929350505050565b8051156001600160a01b038316151462000e695760405162461bcd60e51b815260206004820152602e60248201527f4469616d6f6e64426173653a20696e76616c696420696e697469616c697a617460448201526d696f6e20706172616d657465727360901b6064820152608401620004fc565b6001600160a01b0382161562000f80576001600160a01b038216301462000f0e5762000ea9826001600160a01b031662000f8460201b620003821760201c565b62000f0e5760405162461bcd60e51b815260206004820152602e60248201527f4469616d6f6e64426173653a20696e697469616c697a6174696f6e207461726760448201526d657420686173206e6f20636f646560901b6064820152608401620004fc565b6000826001600160a01b03168260405162000f2a91906200118a565b600060405180830381855af49150503d806000811462000f67576040519150601f19603f3d011682016040523d82523d6000602084013e62000f6c565b606091505b505090508062000b7a573d6000803e3d6000fd5b5050565b3b151590565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052602160045260246000fd5b60005b8381101562000fd357818101518382015260200162000fb9565b50506000910152565b6000815180845262000ff681602086016020860162000fb6565b601f01601f19169290920160200192915050565b60006060808301818452808751808352608092508286019150828160051b8701016020808b0160005b84811015620010df57898403607f19018652815180516001600160a01b031685528381015189860190600381106200107b57634e487b7160e01b600052602160045260246000fd5b868601526040918201519186018a905281519081905290840190600090898701905b80831015620010c95783516001600160e01b03191682529286019260019290920191908601906200109d565b5097850197955050509082019060010162001033565b50506001600160a01b038a1690880152868103604088015262001103818962000fdc565b9a9950505050505050505050565b6020808252601f908201527f4469616d6f6e64426173653a2073656c6563746f72206e6f7420666f756e6400604082015260600190565b60208082526022908201527f4469616d6f6e64426173653a2073656c6563746f7220697320696d6d757461626040820152616c6560f01b606082015260800190565b600082516200119e81846020870162000fb6565b9190910192915050565b611eee80620011b86000396000f3fe60806040526004361061009b5760003560e01c806301ffc9a71461013f5780631f931c1c146101745780632c4080591461019457806352ef6b2c146101c157806379ba5097146101e35780637a0ed627146101f85780638ab5150a1461021a5780638da5cb5b1461022f5780639142376514610244578063adfca15e14610264578063cdffacc614610291578063f2fde38b146102b1576100a2565b366100a257005b60006100ac6102d1565b90506001600160a01b0381163b6101195760405162461bcd60e51b815260206004820152602660248201527f50726f78793a20696d706c656d656e746174696f6e206d75737420626520636f6044820152651b9d1c9858dd60d21b60648201526084015b60405180910390fd5b3660008037600080366000845af43d6000803e808015610138573d6000f35b3d6000fd5b005b34801561014b57600080fd5b5061015f61015a3660046117de565b610388565b60405190151581526020015b60405180910390f35b34801561018057600080fd5b5061013d61018f366004611858565b6103bd565b3480156101a057600080fd5b506101a961044a565b6040516001600160a01b03909116815260200161016b565b3480156101cd57600080fd5b506101d6610466565b60405161016b9190611909565b3480156101ef57600080fd5b5061013d610608565b34801561020457600080fd5b5061020d61068c565b60405161016b919061199b565b34801561022657600080fd5b506101a9610ab1565b34801561023b57600080fd5b506101a9610ac0565b34801561025057600080fd5b5061013d61025f366004611a18565b610aca565b34801561027057600080fd5b5061028461027f366004611a18565b610b27565b60405161016b9190611a33565b34801561029d57600080fd5b506101a96102ac3660046117de565b610c72565b3480156102bd57600080fd5b5061013d6102cc366004611a18565b610c9f565b600080356001600160e01b0319168152600080516020611e9983398151915260208190526040822054819060601c8061037b575060038201546001600160a01b03168061037b5760405162461bcd60e51b815260206004820152603260248201527f4469616d6f6e64426173653a206e6f20666163657420666f756e6420666f722060448201527166756e6374696f6e207369676e617475726560701b6064820152608401610110565b9392505050565b3b151590565b60006103b782610396610cdb565b906001600160e01b0319166000908152602091909152604090205460ff1690565b92915050565b6103c5610f74565b546001600160a01b031633146103ed5760405162461bcd60e51b815260040161011090611a75565b6104436103fa8587611b3d565b8484848080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061043b9250610d86915050565b929190610d98565b5050505050565b6000610454610d86565b600301546001600160a01b0316919050565b60606000610472610d86565b600181015490915061ffff166001600160401b0381111561049557610495611aac565b6040519080825280602002602001820160405280156104be578160200160208202803683370190505b50915060008060005b600184015461ffff16821015610600576000818152600285016020526040812054905b60088110156105eb57836104fd81611c86565b600188015490955061ffff16851190506105eb57600581901b82901b6001600160e01b0319811660009081526020889052604081205460601c90805b8881101561058e578a818151811061055357610553611c9f565b60200260200101516001600160a01b0316836001600160a01b03160361057c576001915061058e565b8061058681611c86565b915050610539565b50801561059d575050506105d9565b818a89815181106105b0576105b0611c9f565b6001600160a01b0390921660209283029190910190910152876105d281611c86565b9850505050505b806105e381611c86565b9150506104ea565b505080806105f890611c86565b9150506104c7565b505082525090565b61061061158e565b6001600160a01b0316336001600160a01b0316146106825760405162461bcd60e51b815260206004820152602960248201527f536166654f776e61626c653a2073656e646572206d757374206265206e6f6d696044820152683732b29037bbb732b960b91b6064820152608401610110565b61068a6115a7565b565b60606000610698610d86565b600181015490915061ffff166001600160401b038111156106bb576106bb611aac565b60405190808252806020026020018201604052801561070157816020015b6040805180820190915260008152606060208201528152602001906001900390816106d95790505b50600182015490925060009061ffff166001600160401b0381111561072857610728611aac565b604051908082528060200260200182016040528015610751578160200160208202803683370190505b50905060008060005b600185015461ffff16821015610a3f576000818152600286016020526040812054905b6008811015610a2a578361079081611c86565b600189015490955061ffff1685119050610a2a57600581901b82901b6001600160e01b0319811660009081526020899052604081205460601c90805b888110156108e957826001600160a01b03168c82815181106107f0576107f0611c9f565b6020026020010151600001516001600160a01b0316036108d757838c828151811061081d5761081d611c9f565b6020026020010151602001518b838151811061083b5761083b611c9f565b602002602001015160ff168151811061085657610856611c9f565b60200260200101906001600160e01b03191690816001600160e01b0319168152505060ff8a828151811061088c5761088c611c9f565b602002602001015160ff16106108a157600080fd5b8981815181106108b3576108b3611c9f565b6020026020010180518091906108c890611cb5565b60ff16905250600191506108e9565b806108e181611c86565b9150506107cc565b5080156108f857505050610a18565b818b898151811061090b5761090b611c9f565b60209081029190910101516001600160a01b03909116905260018a015461ffff166001600160401b0381111561094357610943611aac565b60405190808252806020026020018201604052801561096c578160200160208202803683370190505b508b898151811061097f5761097f611c9f565b602002602001015160200181905250828b89815181106109a1576109a1611c9f565b6020026020010151602001516000815181106109bf576109bf611c9f565b60200260200101906001600160e01b03191690816001600160e01b0319168152505060018989815181106109f5576109f5611c9f565b60ff9092166020928302919091019091015287610a1181611c86565b9850505050505b80610a2281611c86565b91505061077d565b50508080610a3790611c86565b91505061075a565b5060005b82811015610aa6576000848281518110610a5f57610a5f611c9f565b602002602001015160ff1690506000878381518110610a8057610a80611c9f565b602002602001015160200151905081815250508080610a9e90611c86565b915050610a43565b508185525050505090565b6000610abb61158e565b905090565b6000610abb61160a565b610ad2610f74565b546001600160a01b03163314610afa5760405162461bcd60e51b815260040161011090611a75565b80610b03610d86565b60030180546001600160a01b0319166001600160a01b039290921691909117905550565b60606000610b33610d86565b600181015490915061ffff166001600160401b03811115610b5657610b56611aac565b604051908082528060200260200182016040528015610b7f578160200160208202803683370190505b50915060008060005b600184015461ffff16821015610c68576000818152600285016020526040812054905b6008811015610c535783610bbe81611c86565b600188015490955061ffff1685119050610c5357600581901b82901b6001600160e01b0319811660009081526020889052604090205460601c6001600160a01b038a1603610c405780888781518110610c1957610c19611c9f565b6001600160e01b03199092166020928302919091019091015285610c3c81611c86565b9650505b5080610c4b81611c86565b915050610bab565b50508080610c6090611c86565b915050610b88565b5050825250919050565b6000610c7c610d86565b6001600160e01b0319909216600090815260209290925250604090205460601c90565b610ca7610f74565b546001600160a01b03163314610ccf5760405162461bcd60e51b815260040161011090611a75565b610cd881611614565b50565b7f326d0c59a7612f6a9919e2a8ee333c80ba689d8ba2634de89c85cbb04832e70590565b6001600160e01b03198083169003610d585760405162461bcd60e51b815260206004820152601c60248201527b115490cc4d8d4e881a5b9d985b1a59081a5b9d195c999858d9481a5960221b6044820152606401610110565b6001600160e01b03199190911660009081526020929092526040909120805460ff1916911515919091179055565b600080516020611e9983398151915290565b600184015461ffff811690819060009060071615610dc85750600381901c60009081526002870160205260409020545b60005b8651811015610ee8576000878281518110610de857610de8611c9f565b60200260200101519050600081602001519050600082604001515111610e5c5760405162461bcd60e51b815260206004820152602360248201527f4469616d6f6e64426173653a206e6f2073656c6563746f7273207370656369666044820152621a595960ea1b6064820152608401610110565b6000816002811115610e7057610e70611cd4565b03610e8b57610e818a868685610fb5565b9095509350610ede565b6001816002811115610e9f57610e9f611cd4565b03610eb357610eae8a83611168565b610ede565b6002816002811115610ec757610ec7611cd4565b03610ede57610ed88a86868561132b565b90955093505b5050600101610dcb565b50828214610f045760018701805461ffff191661ffff84161790555b6007821615610f2657600382901c600090815260028801602052604090208190555b7f8faa70878671ccd212d20771b795c50af8fd3ff6cf27f4bde57e5d4de0aeb673868686604051610f5993929190611d3a565b60405180910390a1610f6b858561161d565b50505050505050565b7f8a22373512790c48b83a1fe2efdd2888d4a917bcdc24d0adf63e60f67168046090565b81546001600160a01b0319166001600160a01b0391909116179055565b805160009081906001600160a01b0316301480610fdc575082516001600160a01b03163b15155b6110345760405162461bcd60e51b815260206004820152602360248201527f4469616d6f6e64426173653a204144442074617267657420686173206e6f20636044820152626f646560e81b6064820152608401610110565b60005b83604001515181101561115b5760008460400151828151811061105c5761105c611c9f565b6020908102919091018101516001600160e01b031981166000908152918a9052604090912054909150606081901c156110e35760405162461bcd60e51b815260206004820152602360248201527f4469616d6f6e64426173653a2073656c6563746f7220616c726561647920616460448201526219195960ea1b6064820152608401610110565b85516001600160e01b0319838116600081815260208d90526040902060609390931b6001600160601b0319168b1790925560058a901b60e090811692831c91831c1999909916179781900361114c57600389901c600090815260028b0160205260408120989098555b50505060019586019501611037565b5093959294509192505050565b80516001600160a01b03163b6111d05760405162461bcd60e51b815260206004820152602760248201527f4469616d6f6e64426173653a205245504c4143452074617267657420686173206044820152666e6f20636f646560c81b6064820152608401610110565b60005b816040015151811015611326576000826040015182815181106111f8576111f8611c9f565b6020908102919091018101516001600160e01b03198116600090815291869052604090912054909150606081901c806112435760405162461bcd60e51b815260040161011090611e03565b306001600160a01b0382160361126b5760405162461bcd60e51b815260040161011090611e3a565b84600001516001600160a01b0316816001600160a01b0316036112e15760405162461bcd60e51b815260206004820152602860248201527f4469616d6f6e64426173653a205245504c41434520746172676574206973206960448201526719195b9d1a58d85b60c21b6064820152608401610110565b5083516001600160e01b031992909216600090815260208690526040902060609290921b6001600160601b0319166001600160601b03919091161790556001016111d3565b505050565b805160009081906001600160a01b0316156113a05760405162461bcd60e51b815260206004820152602f60248201527f4469616d6f6e64426173653a2052454d4f564520746172676574206d7573742060448201526e6265207a65726f206164647265737360881b6064820152608401610110565b600385901c6007861660005b85604001515181101561157a576000866040015182815181106113d1576113d1611c9f565b6020908102919091018101516001600160e01b031981166000908152918c9052604090912054909150606081901c61141b5760405162461bcd60e51b815260040161011090611e03565b30606082901c0361143e5760405162461bcd60e51b815260040161011090611e3a565b600089900361146a57600019909401600081815260028c01602052604090205498509360079350611472565b600019909301925b600584901b89901b6000806001600160e01b0319808416908616146114c4576001600160e01b03198316600090815260208f90526040902080546001600160601b0319166001600160601b0386161790555b50506001600160e01b03198316600090815260208d90526040812055611fff600383901c1660e0600584901b1687821461152757600082815260028f016020526040902080546001600160e01b031980841c19909116908516831c17905561154b565b80836001600160e01b031916901c816001600160e01b031960001b901c198d16179b505b8660000361156957600088815260028f01602052604081208190559b505b5050600190930192506113ac915050565b5060039190911b1796939550929350505050565b600061159861178d565b546001600160a01b0316919050565b60006115b1610f74565b805460405191925033916001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a36115f78133610f98565b610cd8600061160461178d565b90610f98565b6000611598610f74565b610cd8816117b1565b8051156001600160a01b038316151461168f5760405162461bcd60e51b815260206004820152602e60248201527f4469616d6f6e64426173653a20696e76616c696420696e697469616c697a617460448201526d696f6e20706172616d657465727360901b6064820152608401610110565b6001600160a01b03821615611789576001600160a01b038216301461171c576001600160a01b0382163b61171c5760405162461bcd60e51b815260206004820152602e60248201527f4469616d6f6e64426173653a20696e697469616c697a6174696f6e207461726760448201526d657420686173206e6f20636f646560901b6064820152608401610110565b6000826001600160a01b0316826040516117369190611e7c565b600060405180830381855af49150503d8060008114611771576040519150601f19603f3d011682016040523d82523d6000602084013e611776565b606091505b5050905080611326573d6000803e3d6000fd5b5050565b7f24aa1f7b31fd188a8d3ecfb06bc55c806040e59b03bd4396283442fce661789090565b610cd881610cd88161160461178d565b80356001600160e01b0319811681146117d957600080fd5b919050565b6000602082840312156117f057600080fd5b61037b826117c1565b80356001600160a01b03811681146117d957600080fd5b60008083601f84011261182257600080fd5b5081356001600160401b0381111561183957600080fd5b60208301915083602082850101111561185157600080fd5b9250929050565b60008060008060006060868803121561187057600080fd5b85356001600160401b038082111561188757600080fd5b818801915088601f83011261189b57600080fd5b8135818111156118aa57600080fd5b8960208260051b85010111156118bf57600080fd5b602083019750809650506118d5602089016117f9565b945060408801359150808211156118eb57600080fd5b506118f888828901611810565b969995985093965092949392505050565b6020808252825182820181905260009190848201906040850190845b8181101561194a5783516001600160a01b031683529284019291840191600101611925565b50909695505050505050565b600081518084526020808501945080840160005b838110156119905781516001600160e01b0319168752958201959082019060010161196a565b509495945050505050565b60006020808301818452808551808352604092508286019150828160051b87010184880160005b83811015611a0a57888303603f19018552815180516001600160a01b031684528701518784018790526119f787850182611956565b95880195935050908601906001016119c2565b509098975050505050505050565b600060208284031215611a2a57600080fd5b61037b826117f9565b6020808252825182820181905260009190848201906040850190845b8181101561194a5783516001600160e01b03191683529284019291840191600101611a4f565b6020808252601d908201527f4f776e61626c653a2073656e646572206d757374206265206f776e6572000000604082015260600190565b634e487b7160e01b600052604160045260246000fd5b604051606081016001600160401b0381118282101715611ae457611ae4611aac565b60405290565b604051601f8201601f191681016001600160401b0381118282101715611b1257611b12611aac565b604052919050565b60006001600160401b03821115611b3357611b33611aac565b5060051b60200190565b6000611b50611b4b84611b1a565b611aea565b83815260208082019190600586811b860136811115611b6e57600080fd5b865b81811015611c635780356001600160401b0380821115611b905760008081fd5b818a01915060608236031215611ba65760008081fd5b611bae611ac2565b611bb7836117f9565b81528683013560038110611bcb5760008081fd5b8188015260408381013583811115611be35760008081fd5b939093019236601f850112611bfa57600092508283fd5b83359250611c0a611b4b84611b1a565b83815292871b84018801928881019036851115611c275760008081fd5b948901945b84861015611c4c57611c3d866117c1565b82529489019490890190611c2c565b918301919091525088525050948301948301611b70565b5092979650505050505050565b634e487b7160e01b600052601160045260246000fd5b600060018201611c9857611c98611c70565b5060010190565b634e487b7160e01b600052603260045260246000fd5b600060ff821660ff8103611ccb57611ccb611c70565b60010192915050565b634e487b7160e01b600052602160045260246000fd5b60005b83811015611d05578181015183820152602001611ced565b50506000910152565b60008151808452611d26816020860160208601611cea565b601f01601f19169290920160200192915050565b6000606080830181845280875180835260808601915060808160051b87010192506020808a016000805b84811015611dd357898703607f19018652825180516001600160a01b031688528481015160038110611da457634e487b7160e01b84526021600452602484fd5b88860152604090810151908801899052611dc089890182611956565b9750509483019491830191600101611d64565b5050506001600160a01b0389169087015250508381036040850152611df88186611d0e565b979650505050505050565b6020808252601f908201527f4469616d6f6e64426173653a2073656c6563746f72206e6f7420666f756e6400604082015260600190565b60208082526022908201527f4469616d6f6e64426173653a2073656c6563746f7220697320696d6d757461626040820152616c6560f01b606082015260800190565b60008251611e8e818460208701611cea565b919091019291505056fe177481ac65e4292921c69f62d1cc7f57541261e5d61c8175cf4e36a01c9bfc93a2646970667358221220588eb2f9872ee520e82802b9f40044b62c4c7e11ce87434d39a6316dc57bf9ed64736f6c63430008100033

Deployed Bytecode

0x60806040526004361061009b5760003560e01c806301ffc9a71461013f5780631f931c1c146101745780632c4080591461019457806352ef6b2c146101c157806379ba5097146101e35780637a0ed627146101f85780638ab5150a1461021a5780638da5cb5b1461022f5780639142376514610244578063adfca15e14610264578063cdffacc614610291578063f2fde38b146102b1576100a2565b366100a257005b60006100ac6102d1565b90506001600160a01b0381163b6101195760405162461bcd60e51b815260206004820152602660248201527f50726f78793a20696d706c656d656e746174696f6e206d75737420626520636f6044820152651b9d1c9858dd60d21b60648201526084015b60405180910390fd5b3660008037600080366000845af43d6000803e808015610138573d6000f35b3d6000fd5b005b34801561014b57600080fd5b5061015f61015a3660046117de565b610388565b60405190151581526020015b60405180910390f35b34801561018057600080fd5b5061013d61018f366004611858565b6103bd565b3480156101a057600080fd5b506101a961044a565b6040516001600160a01b03909116815260200161016b565b3480156101cd57600080fd5b506101d6610466565b60405161016b9190611909565b3480156101ef57600080fd5b5061013d610608565b34801561020457600080fd5b5061020d61068c565b60405161016b919061199b565b34801561022657600080fd5b506101a9610ab1565b34801561023b57600080fd5b506101a9610ac0565b34801561025057600080fd5b5061013d61025f366004611a18565b610aca565b34801561027057600080fd5b5061028461027f366004611a18565b610b27565b60405161016b9190611a33565b34801561029d57600080fd5b506101a96102ac3660046117de565b610c72565b3480156102bd57600080fd5b5061013d6102cc366004611a18565b610c9f565b600080356001600160e01b0319168152600080516020611e9983398151915260208190526040822054819060601c8061037b575060038201546001600160a01b03168061037b5760405162461bcd60e51b815260206004820152603260248201527f4469616d6f6e64426173653a206e6f20666163657420666f756e6420666f722060448201527166756e6374696f6e207369676e617475726560701b6064820152608401610110565b9392505050565b3b151590565b60006103b782610396610cdb565b906001600160e01b0319166000908152602091909152604090205460ff1690565b92915050565b6103c5610f74565b546001600160a01b031633146103ed5760405162461bcd60e51b815260040161011090611a75565b6104436103fa8587611b3d565b8484848080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061043b9250610d86915050565b929190610d98565b5050505050565b6000610454610d86565b600301546001600160a01b0316919050565b60606000610472610d86565b600181015490915061ffff166001600160401b0381111561049557610495611aac565b6040519080825280602002602001820160405280156104be578160200160208202803683370190505b50915060008060005b600184015461ffff16821015610600576000818152600285016020526040812054905b60088110156105eb57836104fd81611c86565b600188015490955061ffff16851190506105eb57600581901b82901b6001600160e01b0319811660009081526020889052604081205460601c90805b8881101561058e578a818151811061055357610553611c9f565b60200260200101516001600160a01b0316836001600160a01b03160361057c576001915061058e565b8061058681611c86565b915050610539565b50801561059d575050506105d9565b818a89815181106105b0576105b0611c9f565b6001600160a01b0390921660209283029190910190910152876105d281611c86565b9850505050505b806105e381611c86565b9150506104ea565b505080806105f890611c86565b9150506104c7565b505082525090565b61061061158e565b6001600160a01b0316336001600160a01b0316146106825760405162461bcd60e51b815260206004820152602960248201527f536166654f776e61626c653a2073656e646572206d757374206265206e6f6d696044820152683732b29037bbb732b960b91b6064820152608401610110565b61068a6115a7565b565b60606000610698610d86565b600181015490915061ffff166001600160401b038111156106bb576106bb611aac565b60405190808252806020026020018201604052801561070157816020015b6040805180820190915260008152606060208201528152602001906001900390816106d95790505b50600182015490925060009061ffff166001600160401b0381111561072857610728611aac565b604051908082528060200260200182016040528015610751578160200160208202803683370190505b50905060008060005b600185015461ffff16821015610a3f576000818152600286016020526040812054905b6008811015610a2a578361079081611c86565b600189015490955061ffff1685119050610a2a57600581901b82901b6001600160e01b0319811660009081526020899052604081205460601c90805b888110156108e957826001600160a01b03168c82815181106107f0576107f0611c9f565b6020026020010151600001516001600160a01b0316036108d757838c828151811061081d5761081d611c9f565b6020026020010151602001518b838151811061083b5761083b611c9f565b602002602001015160ff168151811061085657610856611c9f565b60200260200101906001600160e01b03191690816001600160e01b0319168152505060ff8a828151811061088c5761088c611c9f565b602002602001015160ff16106108a157600080fd5b8981815181106108b3576108b3611c9f565b6020026020010180518091906108c890611cb5565b60ff16905250600191506108e9565b806108e181611c86565b9150506107cc565b5080156108f857505050610a18565b818b898151811061090b5761090b611c9f565b60209081029190910101516001600160a01b03909116905260018a015461ffff166001600160401b0381111561094357610943611aac565b60405190808252806020026020018201604052801561096c578160200160208202803683370190505b508b898151811061097f5761097f611c9f565b602002602001015160200181905250828b89815181106109a1576109a1611c9f565b6020026020010151602001516000815181106109bf576109bf611c9f565b60200260200101906001600160e01b03191690816001600160e01b0319168152505060018989815181106109f5576109f5611c9f565b60ff9092166020928302919091019091015287610a1181611c86565b9850505050505b80610a2281611c86565b91505061077d565b50508080610a3790611c86565b91505061075a565b5060005b82811015610aa6576000848281518110610a5f57610a5f611c9f565b602002602001015160ff1690506000878381518110610a8057610a80611c9f565b602002602001015160200151905081815250508080610a9e90611c86565b915050610a43565b508185525050505090565b6000610abb61158e565b905090565b6000610abb61160a565b610ad2610f74565b546001600160a01b03163314610afa5760405162461bcd60e51b815260040161011090611a75565b80610b03610d86565b60030180546001600160a01b0319166001600160a01b039290921691909117905550565b60606000610b33610d86565b600181015490915061ffff166001600160401b03811115610b5657610b56611aac565b604051908082528060200260200182016040528015610b7f578160200160208202803683370190505b50915060008060005b600184015461ffff16821015610c68576000818152600285016020526040812054905b6008811015610c535783610bbe81611c86565b600188015490955061ffff1685119050610c5357600581901b82901b6001600160e01b0319811660009081526020889052604090205460601c6001600160a01b038a1603610c405780888781518110610c1957610c19611c9f565b6001600160e01b03199092166020928302919091019091015285610c3c81611c86565b9650505b5080610c4b81611c86565b915050610bab565b50508080610c6090611c86565b915050610b88565b5050825250919050565b6000610c7c610d86565b6001600160e01b0319909216600090815260209290925250604090205460601c90565b610ca7610f74565b546001600160a01b03163314610ccf5760405162461bcd60e51b815260040161011090611a75565b610cd881611614565b50565b7f326d0c59a7612f6a9919e2a8ee333c80ba689d8ba2634de89c85cbb04832e70590565b6001600160e01b03198083169003610d585760405162461bcd60e51b815260206004820152601c60248201527b115490cc4d8d4e881a5b9d985b1a59081a5b9d195c999858d9481a5960221b6044820152606401610110565b6001600160e01b03199190911660009081526020929092526040909120805460ff1916911515919091179055565b600080516020611e9983398151915290565b600184015461ffff811690819060009060071615610dc85750600381901c60009081526002870160205260409020545b60005b8651811015610ee8576000878281518110610de857610de8611c9f565b60200260200101519050600081602001519050600082604001515111610e5c5760405162461bcd60e51b815260206004820152602360248201527f4469616d6f6e64426173653a206e6f2073656c6563746f7273207370656369666044820152621a595960ea1b6064820152608401610110565b6000816002811115610e7057610e70611cd4565b03610e8b57610e818a868685610fb5565b9095509350610ede565b6001816002811115610e9f57610e9f611cd4565b03610eb357610eae8a83611168565b610ede565b6002816002811115610ec757610ec7611cd4565b03610ede57610ed88a86868561132b565b90955093505b5050600101610dcb565b50828214610f045760018701805461ffff191661ffff84161790555b6007821615610f2657600382901c600090815260028801602052604090208190555b7f8faa70878671ccd212d20771b795c50af8fd3ff6cf27f4bde57e5d4de0aeb673868686604051610f5993929190611d3a565b60405180910390a1610f6b858561161d565b50505050505050565b7f8a22373512790c48b83a1fe2efdd2888d4a917bcdc24d0adf63e60f67168046090565b81546001600160a01b0319166001600160a01b0391909116179055565b805160009081906001600160a01b0316301480610fdc575082516001600160a01b03163b15155b6110345760405162461bcd60e51b815260206004820152602360248201527f4469616d6f6e64426173653a204144442074617267657420686173206e6f20636044820152626f646560e81b6064820152608401610110565b60005b83604001515181101561115b5760008460400151828151811061105c5761105c611c9f565b6020908102919091018101516001600160e01b031981166000908152918a9052604090912054909150606081901c156110e35760405162461bcd60e51b815260206004820152602360248201527f4469616d6f6e64426173653a2073656c6563746f7220616c726561647920616460448201526219195960ea1b6064820152608401610110565b85516001600160e01b0319838116600081815260208d90526040902060609390931b6001600160601b0319168b1790925560058a901b60e090811692831c91831c1999909916179781900361114c57600389901c600090815260028b0160205260408120989098555b50505060019586019501611037565b5093959294509192505050565b80516001600160a01b03163b6111d05760405162461bcd60e51b815260206004820152602760248201527f4469616d6f6e64426173653a205245504c4143452074617267657420686173206044820152666e6f20636f646560c81b6064820152608401610110565b60005b816040015151811015611326576000826040015182815181106111f8576111f8611c9f565b6020908102919091018101516001600160e01b03198116600090815291869052604090912054909150606081901c806112435760405162461bcd60e51b815260040161011090611e03565b306001600160a01b0382160361126b5760405162461bcd60e51b815260040161011090611e3a565b84600001516001600160a01b0316816001600160a01b0316036112e15760405162461bcd60e51b815260206004820152602860248201527f4469616d6f6e64426173653a205245504c41434520746172676574206973206960448201526719195b9d1a58d85b60c21b6064820152608401610110565b5083516001600160e01b031992909216600090815260208690526040902060609290921b6001600160601b0319166001600160601b03919091161790556001016111d3565b505050565b805160009081906001600160a01b0316156113a05760405162461bcd60e51b815260206004820152602f60248201527f4469616d6f6e64426173653a2052454d4f564520746172676574206d7573742060448201526e6265207a65726f206164647265737360881b6064820152608401610110565b600385901c6007861660005b85604001515181101561157a576000866040015182815181106113d1576113d1611c9f565b6020908102919091018101516001600160e01b031981166000908152918c9052604090912054909150606081901c61141b5760405162461bcd60e51b815260040161011090611e03565b30606082901c0361143e5760405162461bcd60e51b815260040161011090611e3a565b600089900361146a57600019909401600081815260028c01602052604090205498509360079350611472565b600019909301925b600584901b89901b6000806001600160e01b0319808416908616146114c4576001600160e01b03198316600090815260208f90526040902080546001600160601b0319166001600160601b0386161790555b50506001600160e01b03198316600090815260208d90526040812055611fff600383901c1660e0600584901b1687821461152757600082815260028f016020526040902080546001600160e01b031980841c19909116908516831c17905561154b565b80836001600160e01b031916901c816001600160e01b031960001b901c198d16179b505b8660000361156957600088815260028f01602052604081208190559b505b5050600190930192506113ac915050565b5060039190911b1796939550929350505050565b600061159861178d565b546001600160a01b0316919050565b60006115b1610f74565b805460405191925033916001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a36115f78133610f98565b610cd8600061160461178d565b90610f98565b6000611598610f74565b610cd8816117b1565b8051156001600160a01b038316151461168f5760405162461bcd60e51b815260206004820152602e60248201527f4469616d6f6e64426173653a20696e76616c696420696e697469616c697a617460448201526d696f6e20706172616d657465727360901b6064820152608401610110565b6001600160a01b03821615611789576001600160a01b038216301461171c576001600160a01b0382163b61171c5760405162461bcd60e51b815260206004820152602e60248201527f4469616d6f6e64426173653a20696e697469616c697a6174696f6e207461726760448201526d657420686173206e6f20636f646560901b6064820152608401610110565b6000826001600160a01b0316826040516117369190611e7c565b600060405180830381855af49150503d8060008114611771576040519150601f19603f3d011682016040523d82523d6000602084013e611776565b606091505b5050905080611326573d6000803e3d6000fd5b5050565b7f24aa1f7b31fd188a8d3ecfb06bc55c806040e59b03bd4396283442fce661789090565b610cd881610cd88161160461178d565b80356001600160e01b0319811681146117d957600080fd5b919050565b6000602082840312156117f057600080fd5b61037b826117c1565b80356001600160a01b03811681146117d957600080fd5b60008083601f84011261182257600080fd5b5081356001600160401b0381111561183957600080fd5b60208301915083602082850101111561185157600080fd5b9250929050565b60008060008060006060868803121561187057600080fd5b85356001600160401b038082111561188757600080fd5b818801915088601f83011261189b57600080fd5b8135818111156118aa57600080fd5b8960208260051b85010111156118bf57600080fd5b602083019750809650506118d5602089016117f9565b945060408801359150808211156118eb57600080fd5b506118f888828901611810565b969995985093965092949392505050565b6020808252825182820181905260009190848201906040850190845b8181101561194a5783516001600160a01b031683529284019291840191600101611925565b50909695505050505050565b600081518084526020808501945080840160005b838110156119905781516001600160e01b0319168752958201959082019060010161196a565b509495945050505050565b60006020808301818452808551808352604092508286019150828160051b87010184880160005b83811015611a0a57888303603f19018552815180516001600160a01b031684528701518784018790526119f787850182611956565b95880195935050908601906001016119c2565b509098975050505050505050565b600060208284031215611a2a57600080fd5b61037b826117f9565b6020808252825182820181905260009190848201906040850190845b8181101561194a5783516001600160e01b03191683529284019291840191600101611a4f565b6020808252601d908201527f4f776e61626c653a2073656e646572206d757374206265206f776e6572000000604082015260600190565b634e487b7160e01b600052604160045260246000fd5b604051606081016001600160401b0381118282101715611ae457611ae4611aac565b60405290565b604051601f8201601f191681016001600160401b0381118282101715611b1257611b12611aac565b604052919050565b60006001600160401b03821115611b3357611b33611aac565b5060051b60200190565b6000611b50611b4b84611b1a565b611aea565b83815260208082019190600586811b860136811115611b6e57600080fd5b865b81811015611c635780356001600160401b0380821115611b905760008081fd5b818a01915060608236031215611ba65760008081fd5b611bae611ac2565b611bb7836117f9565b81528683013560038110611bcb5760008081fd5b8188015260408381013583811115611be35760008081fd5b939093019236601f850112611bfa57600092508283fd5b83359250611c0a611b4b84611b1a565b83815292871b84018801928881019036851115611c275760008081fd5b948901945b84861015611c4c57611c3d866117c1565b82529489019490890190611c2c565b918301919091525088525050948301948301611b70565b5092979650505050505050565b634e487b7160e01b600052601160045260246000fd5b600060018201611c9857611c98611c70565b5060010190565b634e487b7160e01b600052603260045260246000fd5b600060ff821660ff8103611ccb57611ccb611c70565b60010192915050565b634e487b7160e01b600052602160045260246000fd5b60005b83811015611d05578181015183820152602001611ced565b50506000910152565b60008151808452611d26816020860160208601611cea565b601f01601f19169290920160200192915050565b6000606080830181845280875180835260808601915060808160051b87010192506020808a016000805b84811015611dd357898703607f19018652825180516001600160a01b031688528481015160038110611da457634e487b7160e01b84526021600452602484fd5b88860152604090810151908801899052611dc089890182611956565b9750509483019491830191600101611d64565b5050506001600160a01b0389169087015250508381036040850152611df88186611d0e565b979650505050505050565b6020808252601f908201527f4469616d6f6e64426173653a2073656c6563746f72206e6f7420666f756e6400604082015260600190565b60208082526022908201527f4469616d6f6e64426173653a2073656c6563746f7220697320696d6d757461626040820152616c6560f01b606082015260800190565b60008251611e8e818460208701611cea565b919091019291505056fe177481ac65e4292921c69f62d1cc7f57541261e5d61c8175cf4e36a01c9bfc93a2646970667358221220588eb2f9872ee520e82802b9f40044b62c4c7e11ce87434d39a6316dc57bf9ed64736f6c63430008100033

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.