Contract 0xdC1C3eE57e8D7a898671aF2634E57B6cc7c81F57

 
Txn Hash Method
Block
From
To
Value [Txn Fee]
0x8c99fe14635bb791a4667fbf349876bb38081f541c97b58aaa29839ba33317200x60806040185131942021-08-29 7:21:0699 days 19 hrs ago0xab0c9bc6bcbaad9391c530f33f9294dec38ae189 IN  Contract Creation0 MATIC0.019263220001
[ Download CSV Export 
Parent Txn Hash Block From To Value
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
DiamondLoupeFacet

Compiler Version
v0.7.1+commit.f4a555be

Optimization Enabled:
No with 200 runs

Other Settings:
default evmVersion, None license
/**
 *Submitted for verification at polygonscan.com on 2021-08-29
*/

// File: Interfaces/IERC165.sol


pragma solidity ^0.7.1;

interface IERC165 {
    /// @notice Query if a contract implements an interface
    /// @param interfaceId The interface identifier, as specified in ERC-165
    /// @dev Interface identification is specified in ERC-165. This function
    ///  uses less than 30,000 gas.
    /// @return `true` if the contract implements `interfaceID` and
    ///  `interfaceID` is not 0xffffffff, `false` otherwise
    function supportsInterface(bytes4 interfaceId) external view returns (bool);
}
// File: Interfaces/IDiamondLoupe.sol


pragma solidity ^0.7.1;

// A loupe is a small magnifying glass used to look at diamonds.
// These functions look at diamonds
interface IDiamondLoupe {
    /// These functions are expected to be called frequently
    /// by tools.

    struct Facet {
        address facetAddress;
        bytes4[] functionSelectors;
    }

    /// @notice Gets all facet addresses and their four byte function selectors.
    /// @return facets_ Facet
    function facets() external view returns (Facet[] memory facets_);

    /// @notice Gets all the function selectors supported by a specific facet.
    /// @param _facet The facet address.
    /// @return facetFunctionSelectors_
    function facetFunctionSelectors(address _facet) external view returns (bytes4[] memory facetFunctionSelectors_);

    /// @notice Get all the facet addresses used by a diamond.
    /// @return facetAddresses_
    function facetAddresses() external view returns (address[] memory facetAddresses_);

    /// @notice Gets the facet that supports the given selector.
    /// @dev If facet is not found return address(0).
    /// @param _functionSelector The function selector.
    /// @return facetAddress_ The facet address.
    function facetAddress(bytes4 _functionSelector) external view returns (address facetAddress_);
}
// File: Interfaces/IDiamondCut.sol


pragma solidity ^0.7.1;

/******************************************************************************\
* Author: Nick Mudge <[email protected]> (https://twitter.com/mudgen)
/******************************************************************************/

interface IDiamondCut {
    enum FacetCutAction {Add, Replace, Remove}

    struct FacetCut {
        address facetAddress;
        FacetCutAction action;
        bytes4[] functionSelectors;
    }

    /// @notice Add/replace/remove any number of functions and optionally execute
    ///         a function with delegatecall
    /// @param _diamondCut Contains the facet addresses and function selectors
    /// @param _init The address of the contract or facet to execute _calldata
    /// @param _calldata A function call, including function selector and arguments
    ///                  _calldata is executed with delegatecall on _init
    function diamondCut(
        FacetCut[] calldata _diamondCut,
        address _init,
        bytes calldata _calldata
    ) external;

    event DiamondCut(FacetCut[] _diamondCut, address _init, bytes _calldata);
}
// File: Diamond/LibDiamond.sol


pragma solidity ^0.7.1;

/******************************************************************************\
* Author: Nick Mudge
*
* Implementation of Diamond facet.
* This is gas optimized by reducing storage reads and storage writes.
* This code is as complex as it is to reduce gas costs.
/******************************************************************************/


library LibDiamond {
        bytes32 constant DIAMOND_STORAGE_POSITION = keccak256("diamond.standard.diamond.storage");

    struct DiamondStorage {
        // maps function selectors to the facets that execute the functions.
        // and maps the selectors to their position in the selectorSlots array.        
        // func selector => address facet, selector position
        mapping(bytes4 => bytes32) facets;
        // array of slots of function selectors.
        // each slot holds 8 function selectors.
        mapping(uint256 => bytes32) selectorSlots;
        // The number of function selectors in selectorSlots
        uint16 selectorCount;
        // owner of the contract
        // Used to query if a contract implements an interface.
        // Used to implement ERC-165.
        mapping(bytes4 => bool) supportedInterfaces;
        // owner of the contract
        address contractOwner;
    }

    function diamondStorage() internal pure returns (DiamondStorage storage ds) {
        bytes32 position = DIAMOND_STORAGE_POSITION;
        assembly {
            ds.slot := position
        }
    }
   
   event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

   function setContractOwner(address _newOwner) internal {
        DiamondStorage storage ds = diamondStorage();
        address previousOwner = ds.contractOwner;
        ds.contractOwner = _newOwner;
        emit OwnershipTransferred(previousOwner, _newOwner);
    }

    function contractOwner() internal view returns (address contractOwner_) {
        contractOwner_ = diamondStorage().contractOwner;
    }

    function enforceIsContractOwner() view internal {
        require(msg.sender == diamondStorage().contractOwner, "LibDiamond: Must be contract owner");
    }

    modifier onlyOwner {
        require(msg.sender == diamondStorage().contractOwner, "LibDiamond: Must be contract owner");
        _;
    }

    event DiamondCut(IDiamondCut.FacetCut[] _diamondCut, address _init, bytes _calldata);

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

    // Internal function version of diamondCut
    // This code is almost the same as the external diamondCut,
    // except it is using 'Facet[] memory _diamondCut' instead of
    // 'Facet[] calldata _diamondCut'.
    // The code is duplicated to prevent copying calldata to memory which
    // causes an error for a two dimensional array.
    function diamondCut(
        IDiamondCut.FacetCut[] memory _diamondCut,
        address _init,
        bytes memory _calldata
    ) internal {
        DiamondStorage storage ds = diamondStorage();
        uint256 originalSelectorCount = ds.selectorCount;
        uint256 selectorCount = originalSelectorCount;
        bytes32 selectorSlot;
        // Check if last selector slot is not full
        if (selectorCount % 8 > 0) {
            // get last selectorSlot
            selectorSlot = ds.selectorSlots[selectorCount / 8];
        }
        // loop through diamond cut
        for (uint256 facetIndex; facetIndex < _diamondCut.length; facetIndex++) {
            (selectorCount, selectorSlot) = addReplaceRemoveFacetSelectors(
                selectorCount,
                selectorSlot,
                _diamondCut[facetIndex].facetAddress,
                _diamondCut[facetIndex].action,
                _diamondCut[facetIndex].functionSelectors
            );
        }
        if (selectorCount != originalSelectorCount) {
            ds.selectorCount = uint16(selectorCount);
        }
        // If last selector slot is not full
        if (selectorCount % 8 > 0) {
            ds.selectorSlots[selectorCount / 8] = selectorSlot;
        }
        emit DiamondCut(_diamondCut, _init, _calldata);
        initializeDiamondCut(_init, _calldata);
    }

    function addReplaceRemoveFacetSelectors(
        uint256 _selectorCount,
        bytes32 _selectorSlot,
        address _newFacetAddress,
        IDiamondCut.FacetCutAction _action,
        bytes4[] memory _selectors
    ) internal returns (uint256, bytes32) {
        DiamondStorage storage ds = diamondStorage();
        require(_selectors.length > 0, "LibDiamondCut: No selectors in facet to cut");        
        if (_action == IDiamondCut.FacetCutAction.Add) {
            require(_newFacetAddress != address(0), "LibDiamondCut: Add facet can't be address(0)");
            enforceHasContractCode(_newFacetAddress, "LibDiamondCut: Add facet has no code");
            for (uint256 selectorIndex; selectorIndex < _selectors.length; selectorIndex++) {
                bytes4 selector = _selectors[selectorIndex];
                bytes32 oldFacet = ds.facets[selector];                
                require(address(bytes20(oldFacet)) == address(0), "LibDiamondCut: Can't add function that already exists");
                // add facet for selector                                
                ds.facets[selector] = bytes20(_newFacetAddress) | bytes32(_selectorCount);                
                uint256 selectorInSlotPosition = (_selectorCount % 8) * 32;
                // 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) {
                    ds.selectorSlots[_selectorCount / 8] = _selectorSlot;
                    _selectorSlot = 0;
                }
                _selectorCount++;
            }
        } else if(_action == IDiamondCut.FacetCutAction.Replace) {
            require(_newFacetAddress != address(0), "LibDiamondCut: Replace facet can't be address(0)");
            enforceHasContractCode(_newFacetAddress, "LibDiamondCut: Replace facet has no code");
            for (uint256 selectorIndex; selectorIndex < _selectors.length; selectorIndex++) {
                bytes4 selector = _selectors[selectorIndex];
                bytes32 oldFacet = ds.facets[selector];  
                address oldFacetAddress = address(bytes20(oldFacet));
                // only useful if immutable functions exist
                require(oldFacetAddress != address(this), "LibDiamondCut: Can't replace immutable function");
                require(oldFacetAddress != _newFacetAddress, "LibDiamondCut: Can't replace function with same function");
                require(oldFacetAddress != address(0), "LibDiamondCut: Can't replace function that doesn't exist");
                // replace old facet address
                ds.facets[selector] = (oldFacet & CLEAR_ADDRESS_MASK) | bytes20(_newFacetAddress);
            }
        } else if(_action == IDiamondCut.FacetCutAction.Remove) {
            require(_newFacetAddress == address(0), "LibDiamondCut: Remove facet address must be address(0)");
            uint256 selectorSlotCount = _selectorCount / 8;
            uint256 selectorInSlotIndex = (_selectorCount % 8) - 1;
            for (uint256 selectorIndex; selectorIndex < _selectors.length; selectorIndex++) {
                if (_selectorSlot == 0) {
                    // get last selectorSlot
                    selectorSlotCount--;
                    _selectorSlot = ds.selectorSlots[selectorSlotCount];
                    selectorInSlotIndex = 7;
                }
                bytes4 lastSelector;
                uint256 oldSelectorsSlotCount;
                uint256 oldSelectorInSlotPosition;
                // adding a block here prevents stack too deep error
                {
                    bytes4 selector = _selectors[selectorIndex];
                    bytes32 oldFacet = ds.facets[selector];
                    require(address(bytes20(oldFacet)) != address(0), "LibDiamondCut: Can't remove function that doesn't exist");
                    // only useful if immutable functions exist
                    require(address(bytes20(oldFacet)) != address(this), "LibDiamondCut: Can't remove immutable function");
                    // replace selector with last selector in ds.facets
                    // gets the last selector
                    lastSelector = bytes4(_selectorSlot << (selectorInSlotIndex * 32));
                    if (lastSelector != selector) {
                        // update last selector slot position info
                        ds.facets[lastSelector] = (oldFacet & CLEAR_ADDRESS_MASK) | bytes20(ds.facets[lastSelector]);
                    }
                    delete ds.facets[selector];
                    uint256 oldSelectorCount = uint16(uint256(oldFacet));
                    oldSelectorsSlotCount = oldSelectorCount / 8;
                    oldSelectorInSlotPosition = (oldSelectorCount % 8) * 32;
                }
                if (oldSelectorsSlotCount != selectorSlotCount) {
                    bytes32 oldSelectorSlot = ds.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
                    ds.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 ds.selectorSlots[selectorSlotCount];
                    _selectorSlot = 0;
                }
                selectorInSlotIndex--;
            }
            _selectorCount = selectorSlotCount * 8 + selectorInSlotIndex + 1;
        } else {
            revert("LibDiamondCut: Incorrect FacetCutAction");
        }       
        return (_selectorCount, _selectorSlot);
    }

    function initializeDiamondCut(address _init, bytes memory _calldata) internal {
        if (_init == address(0)) {
            require(_calldata.length == 0, "LibDiamondCut: _init is address(0) but_calldata is not empty");
        } else {
            require(_calldata.length > 0, "LibDiamondCut: _calldata is empty but _init is not address(0)");
            if (_init != address(this)) {
                enforceHasContractCode(_init, "LibDiamondCut: _init address has no code");
            }
            (bool success, bytes memory error) = _init.delegatecall(_calldata);
            if (!success) {
                if (error.length > 0) {
                    // bubble up the error
                    revert(string(error));
                } else {
                    revert("LibDiamondCut: _init function reverted");
                }
            }
        }
    }

    function enforceHasContractCode(address _contract, string memory _errorMessage) internal view {
        uint256 contractSize;
        assembly {
            contractSize := extcodesize(_contract)
        }
        require(contractSize > 0, _errorMessage);
    }
}
// File: Diamond/DiamondLoupeFacet.sol


pragma solidity ^0.7.1;
pragma experimental ABIEncoderV2;

/******************************************************************************\
* Author: Nick Mudge <[email protected]> (https://twitter.com/mudgen)
/******************************************************************************/




contract DiamondLoupeFacet is IDiamondLoupe, IERC165 {
    // Diamond Loupe Functions
    ////////////////////////////////////////////////////////////////////
    /// These functions are expected to be called frequently by tools.
    //
    // struct Facet {
    //     address facetAddress;
    //     bytes4[] functionSelectors;
    // }
    /// @notice Gets all facets and their selectors.
    /// @return facets_ Facet
    function facets() external override view returns (Facet[] memory facets_) {
        LibDiamond.DiamondStorage storage ds = LibDiamond.diamondStorage();
        facets_ = new Facet[](ds.selectorCount);
        uint8[] memory numFacetSelectors = new uint8[](ds.selectorCount);
        uint256 numFacets;
        uint256 selectorIndex;
        // loop through function selectors
        for (uint256 slotIndex; selectorIndex < ds.selectorCount; slotIndex++) {
            bytes32 slot = ds.selectorSlots[slotIndex];
            for (uint256 selectorSlotIndex; selectorSlotIndex < 8; selectorSlotIndex++) {
                selectorIndex++;
                if (selectorIndex > ds.selectorCount) {
                    break;
                }
                bytes4 selector = bytes4(slot << (selectorSlotIndex * 32));
                address facetAddress_ = address(bytes20(ds.facets[selector]));
                bool continueLoop = false;
                for (uint256 facetIndex; facetIndex < numFacets; facetIndex++) {
                    if (facets_[facetIndex].facetAddress == facetAddress_) {
                        facets_[facetIndex].functionSelectors[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) {
                    continueLoop = false;
                    continue;
                }
                facets_[numFacets].facetAddress = facetAddress_;
                facets_[numFacets].functionSelectors = new bytes4[](ds.selectorCount);
                facets_[numFacets].functionSelectors[0] = selector;
                numFacetSelectors[numFacets] = 1;
                numFacets++;
            }
        }
        for (uint256 facetIndex; facetIndex < numFacets; facetIndex++) {
            uint256 numSelectors = numFacetSelectors[facetIndex];
            bytes4[] memory selectors = facets_[facetIndex].functionSelectors;
            // setting the number of selectors
            assembly {
                mstore(selectors, numSelectors)
            }
        }
        // setting the number of facets
        assembly {
            mstore(facets_, numFacets)
        }
    }

    /// @notice Gets all the function selectors supported by a specific facet.
    /// @param _facet The facet address.
    /// @return _facetFunctionSelectors The selectors associated with a facet address.
    function facetFunctionSelectors(address _facet) external override view returns (bytes4[] memory _facetFunctionSelectors) {
        LibDiamond.DiamondStorage storage ds = LibDiamond.diamondStorage();
        uint256 numSelectors;
        _facetFunctionSelectors = new bytes4[](ds.selectorCount);
        uint256 selectorIndex;
        // loop through function selectors
        for (uint256 slotIndex; selectorIndex < ds.selectorCount; slotIndex++) {
            bytes32 slot = ds.selectorSlots[slotIndex];
            for (uint256 selectorSlotIndex; selectorSlotIndex < 8; selectorSlotIndex++) {
                selectorIndex++;
                if (selectorIndex > ds.selectorCount) {
                    break;
                }
                bytes4 selector = bytes4(slot << (selectorSlotIndex * 32));
                address facet = address(bytes20(ds.facets[selector]));
                if (_facet == facet) {
                    _facetFunctionSelectors[numSelectors] = selector;
                    numSelectors++;
                }
            }
        }
        // Set the number of selectors in the array
        assembly {
            mstore(_facetFunctionSelectors, numSelectors)
        }
    }

    /// @notice Get all the facet addresses used by a diamond.
    /// @return facetAddresses_
    function facetAddresses() external override view returns (address[] memory facetAddresses_) {
        LibDiamond.DiamondStorage storage ds = LibDiamond.diamondStorage();
        facetAddresses_ = new address[](ds.selectorCount);
        uint256 numFacets;
        uint256 selectorIndex;
        // loop through function selectors
        for (uint256 slotIndex; selectorIndex < ds.selectorCount; slotIndex++) {
            bytes32 slot = ds.selectorSlots[slotIndex];
            for (uint256 selectorSlotIndex; selectorSlotIndex < 8; selectorSlotIndex++) {
                selectorIndex++;
                if (selectorIndex > ds.selectorCount) {
                    break;
                }
                bytes4 selector = bytes4(slot << (selectorSlotIndex * 32));
                address facetAddress_ = address(bytes20(ds.facets[selector]));
                bool continueLoop = false;
                for (uint256 facetIndex; facetIndex < numFacets; facetIndex++) {
                    if (facetAddress_ == facetAddresses_[facetIndex]) {
                        continueLoop = true;
                        break;
                    }
                }
                if (continueLoop) {
                    continueLoop = false;
                    continue;
                }
                facetAddresses_[numFacets] = facetAddress_;
                numFacets++;
            }
        }
        // Set the number of facet addresses in the array
        assembly {
            mstore(facetAddresses_, numFacets)
        }
    }

    /// @notice Gets the facet that supports the given selector.
    /// @dev If facet is not found return address(0).
    /// @param _functionSelector The function selector.
    /// @return facetAddress_ The facet address.
    function facetAddress(bytes4 _functionSelector) external override view returns (address facetAddress_) {
        LibDiamond.DiamondStorage storage ds = LibDiamond.diamondStorage();
        facetAddress_ = address(bytes20(ds.facets[_functionSelector]));
    }

    // This implements ERC-165.
    function supportsInterface(bytes4 _interfaceId) external override view returns (bool) {
        LibDiamond.DiamondStorage storage ds = LibDiamond.diamondStorage();
        return ds.supportedInterfaces[_interfaceId];
    }
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"bytes4","name":"_functionSelector","type":"bytes4"}],"name":"facetAddress","outputs":[{"internalType":"address","name":"facetAddress_","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"facetAddresses","outputs":[{"internalType":"address[]","name":"facetAddresses_","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_facet","type":"address"}],"name":"facetFunctionSelectors","outputs":[{"internalType":"bytes4[]","name":"_facetFunctionSelectors","type":"bytes4[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"facets","outputs":[{"components":[{"internalType":"address","name":"facetAddress","type":"address"},{"internalType":"bytes4[]","name":"functionSelectors","type":"bytes4[]"}],"internalType":"struct IDiamondLoupe.Facet[]","name":"facets_","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"_interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"}]

608060405234801561001057600080fd5b5061107a806100206000396000f3fe608060405234801561001057600080fd5b50600436106100575760003560e01c806301ffc9a71461005c57806352ef6b2c1461008c5780637a0ed627146100aa578063adfca15e146100c8578063cdffacc6146100f8575b600080fd5b61007660048036038101906100719190610bdf565b610128565b6040516100839190610ed5565b60405180910390f35b61009461019e565b6040516100a19190610e6f565b60405180910390f35b6100b26103db565b6040516100bf9190610eb3565b60405180910390f35b6100e260048036038101906100dd9190610bb6565b6108bb565b6040516100ef9190610e91565b60405180910390f35b610112600480360381019061010d9190610bdf565b610ac3565b60405161011f9190610e54565b60405180910390f35b600080610133610b2f565b9050806003016000847bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060009054906101000a900460ff16915050919050565b606060006101aa610b2f565b90508060020160009054906101000a900461ffff1661ffff1667ffffffffffffffff811180156101d957600080fd5b506040519080825280602002602001820160405280156102085781602001602082028036833780820191505090505b50915060008060005b8360020160009054906101000a900461ffff1661ffff168210156103d157600084600101600083815260200190815260200160002054905060005b60088110156103c25783806001019450508560020160009054906101000a900461ffff1661ffff16841115610280576103c2565b60006020820283901b90506000876000016000837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191681526020019081526020016000205460601c90506000805b8881101561034f578a81815181106102fe57fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610342576001915061034f565b80806001019150506102ea565b50801561036257600090505050506103b5565b818a898151811061036f57fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505087806001019850505050505b808060010191505061024c565b50508080600101915050610211565b5081845250505090565b606060006103e7610b2f565b90508060020160009054906101000a900461ffff1661ffff1667ffffffffffffffff8111801561041657600080fd5b5060405190808252806020026020018201604052801561045057816020015b61043d610b5c565b8152602001906001900390816104355790505b50915060608160020160009054906101000a900461ffff1661ffff1667ffffffffffffffff8111801561048257600080fd5b506040519080825280602002602001820160405280156104b15781602001602082028036833780820191505090505b50905060008060005b8460020160009054906101000a900461ffff1661ffff1682101561085b57600085600101600083815260200190815260200160002054905060005b600881101561084c5783806001019450508660020160009054906101000a900461ffff1661ffff168411156105295761084c565b60006020820283901b90506000886000016000837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191681526020019081526020016000205460601c90506000805b888110156106ca578273ffffffffffffffffffffffffffffffffffffffff168c82815181106105be57fe5b60200260200101516000015173ffffffffffffffffffffffffffffffffffffffff1614156106bd57838c82815181106105f357fe5b6020026020010151602001518b838151811061060b57fe5b602002602001015160ff168151811061062057fe5b60200260200101907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191690817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19168152505060ff8a828151811061067a57fe5b602002602001015160ff161061068f57600080fd5b89818151811061069b57fe5b60200260200101805180919060010160ff1660ff1681525050600191506106ca565b8080600101915050610593565b5080156106dd576000905050505061083f565b818b89815181106106ea57fe5b60200260200101516000019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250508960020160009054906101000a900461ffff1661ffff1667ffffffffffffffff8111801561075557600080fd5b506040519080825280602002602001820160405280156107845781602001602082028036833780820191505090505b508b898151811061079157fe5b602002602001015160200181905250828b89815181106107ad57fe5b6020026020010151602001516000815181106107c557fe5b60200260200101907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191690817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191681525050600189898151811061081f57fe5b602002602001019060ff16908160ff168152505087806001019850505050505b80806001019150506104f5565b505080806001019150506104ba565b5060005b828110156108b057600084828151811061087557fe5b602002602001015160ff169050606087838151811061089057fe5b60200260200101516020015190508181525050808060010191505061085f565b508185525050505090565b606060006108c7610b2f565b905060008160020160009054906101000a900461ffff1661ffff1667ffffffffffffffff811180156108f857600080fd5b506040519080825280602002602001820160405280156109275781602001602082028036833780820191505090505b5092506000805b8360020160009054906101000a900461ffff1661ffff16821015610ab757600084600101600083815260200190815260200160002054905060005b6008811015610aa85783806001019450508560020160009054906101000a900461ffff1661ffff1684111561099d57610aa8565b60006020820283901b90506000876000016000837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191681526020019081526020016000205460601c90508073ffffffffffffffffffffffffffffffffffffffff168a73ffffffffffffffffffffffffffffffffffffffff161415610a995781898881518110610a4457fe5b60200260200101907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191690817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19168152505086806001019750505b50508080600101915050610969565b5050808060010191505061092e565b50818452505050919050565b600080610ace610b2f565b9050806000016000847bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191681526020019081526020016000205460601c915050919050565b6000807fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131c90508091505090565b6040518060400160405280600073ffffffffffffffffffffffffffffffffffffffff168152602001606081525090565b600081359050610b9b81611016565b92915050565b600081359050610bb08161102d565b92915050565b600060208284031215610bc857600080fd5b6000610bd684828501610b8c565b91505092915050565b600060208284031215610bf157600080fd5b6000610bff84828501610ba1565b91505092915050565b6000610c148383610c4c565b60208301905092915050565b6000610c2c8383610e08565b60208301905092915050565b6000610c448383610e17565b905092915050565b610c5581610fac565b82525050565b610c6481610fac565b82525050565b6000610c7582610f20565b610c7f8185610f68565b9350610c8a83610ef0565b8060005b83811015610cbb578151610ca28882610c08565b9750610cad83610f41565b925050600181019050610c8e565b5085935050505092915050565b6000610cd382610f2b565b610cdd8185610f79565b9350610ce883610f00565b8060005b83811015610d19578151610d008882610c20565b9750610d0b83610f4e565b925050600181019050610cec565b5085935050505092915050565b6000610d3182610f2b565b610d3b8185610f8a565b9350610d4683610f00565b8060005b83811015610d77578151610d5e8882610c20565b9750610d6983610f4e565b925050600181019050610d4a565b5085935050505092915050565b6000610d8f82610f36565b610d998185610f9b565b935083602082028501610dab85610f10565b8060005b85811015610de75784840389528151610dc88582610c38565b9450610dd383610f5b565b925060208a01995050600181019050610daf565b50829750879550505050505092915050565b610e0281610fbe565b82525050565b610e1181610fca565b82525050565b6000604083016000830151610e2f6000860182610c4c565b5060208301518482036020860152610e478282610cc8565b9150508091505092915050565b6000602082019050610e696000830184610c5b565b92915050565b60006020820190508181036000830152610e898184610c6a565b905092915050565b60006020820190508181036000830152610eab8184610d26565b905092915050565b60006020820190508181036000830152610ecd8184610d84565b905092915050565b6000602082019050610eea6000830184610df9565b92915050565b6000819050602082019050919050565b6000819050602082019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b6000602082019050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600082825260208201905092915050565b600082825260208201905092915050565b6000610fb782610ff6565b9050919050565b60008115159050919050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b61101f81610fac565b811461102a57600080fd5b50565b61103681610fca565b811461104157600080fd5b5056fea264697066735822122006a9230c331b8f805c8d8e825c2dfd6e2a521d17ecb72b6b27ef134a09bc0c4e64736f6c63430007010033

Deployed ByteCode Sourcemap

15603:6843:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;22218:225;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;20110:1570;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;16041:2513;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;18772:1233;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;21916:261;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;22218:225;22298:4;22315:36;22354:27;:25;:27::i;:::-;22315:66;;22399:2;:22;;:36;22422:12;22399:36;;;;;;;;;;;;;;;;;;;;;;;;;;;22392:43;;;22218:225;;;:::o;20110:1570::-;20168:32;20213:36;20252:27;:25;:27::i;:::-;20213:66;;20322:2;:16;;;;;;;;;;;;20308:31;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;20290:49;;20350:17;20378:21;20459:17;20454:1081;20494:2;:16;;;;;;;;;;;;20478:32;;:13;:32;20454:1081;;;20540:12;20555:2;:16;;:27;20572:9;20555:27;;;;;;;;;;;;20540:42;;20602:25;20597:927;20649:1;20629:17;:21;20597:927;;;20692:15;;;;;;;20746:2;:16;;;;;;;;;;;;20730:32;;:13;:32;20726:86;;;20787:5;;20726:86;20830:15;20884:2;20864:17;:22;20855:4;:32;;20830:58;;20907:21;20947:2;:9;;:19;20957:8;20947:19;;;;;;;;;;;;;;;;;;20931:37;;20907:61;;20987:17;21036:18;21031:257;21069:9;21056:10;:22;21031:257;;;21138:15;21154:10;21138:27;;;;;;;;;;;;;;21121:44;;:13;:44;;;21117:152;;;21209:4;21194:19;;21240:5;;21117:152;21080:12;;;;;;;21031:257;;;;21310:12;21306:112;;;21362:5;21347:20;;21390:8;;;;;21306:112;21465:13;21436:15;21452:9;21436:26;;;;;;;;;;;;;:42;;;;;;;;;;;21497:11;;;;;;;20597:927;;;;20652:19;;;;;;;20597:927;;;;20454:1081;20512:11;;;;;;;20454:1081;;;;21652:9;21635:15;21628:34;21613:60;;;;:::o;16041:2513::-;16091:22;16126:36;16165:27;:25;:27::i;:::-;16126:66;;16225:2;:16;;;;;;;;;;;;16213:29;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;16203:39;;16253:32;16300:2;:16;;;;;;;;;;;;16288:29;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;16253:64;;16328:17;16356:21;16437:17;16432:1635;16472:2;:16;;;;;;;;;;;;16456:32;;:13;:32;16432:1635;;;16518:12;16533:2;:16;;:27;16550:9;16533:27;;;;;;;;;;;;16518:42;;16580:25;16575:1481;16627:1;16607:17;:21;16575:1481;;;16670:15;;;;;;;16724:2;:16;;;;;;;;;;;;16708:32;;:13;:32;16704:86;;;16765:5;;16704:86;16808:15;16862:2;16842:17;:22;16833:4;:32;;16808:58;;16885:21;16925:2;:9;;:19;16935:8;16925:19;;;;;;;;;;;;;;;;;;16909:37;;16885:61;;16965:17;17014:18;17009:598;17047:9;17034:10;:22;17009:598;;;17135:13;17099:49;;:7;17107:10;17099:19;;;;;;;;;;;;;;:32;;;:49;;;17095:493;;;17248:8;17177:7;17185:10;17177:19;;;;;;;;;;;;;;:37;;;17215:17;17233:10;17215:29;;;;;;;;;;;;;;17177:68;;;;;;;;;;;;;;;:79;;;;;;;;;;;;;17424:3;17392:17;17410:10;17392:29;;;;;;;;;;;;;;:35;;;17384:44;;;;;;17455:17;17473:10;17455:29;;;;;;;;;;;;;:31;;;;;;;;;;;;;;;17528:4;17513:19;;17559:5;;17095:493;17058:12;;;;;;;17009:598;;;;17629:12;17625:112;;;17681:5;17666:20;;17709:8;;;;;17625:112;17789:13;17755:7;17763:9;17755:18;;;;;;;;;;;;;;:31;;:47;;;;;;;;;;;17873:2;:16;;;;;;;;;;;;17860:30;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;17821:7;17829:9;17821:18;;;;;;;;;;;;;;:36;;:69;;;;17951:8;17909:7;17917:9;17909:18;;;;;;;;;;;;;;:36;;;17946:1;17909:39;;;;;;;;;;;;;:50;;;;;;;;;;;;;18009:1;17978:17;17996:9;17978:28;;;;;;;;;;;;;:32;;;;;;;;;;;18029:11;;;;;;;16575:1481;;;;16630:19;;;;;;;16575:1481;;;;16432:1635;16490:11;;;;;;;16432:1635;;;;18082:18;18077:358;18115:9;18102:10;:22;18077:358;;;18155:20;18178:17;18196:10;18178:29;;;;;;;;;;;;;;18155:52;;;;18222:25;18250:7;18258:10;18250:19;;;;;;;;;;;;;;:37;;;18222:65;;18396:12;18385:9;18378:31;18359:65;;18126:12;;;;;;;18077:358;;;;18526:9;18517:7;18510:26;18495:52;;;;;:::o;18772:1233::-;18852:39;18904:36;18943:27;:25;:27::i;:::-;18904:66;;18981:20;19051:2;:16;;;;;;;;;;;;19038:30;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;19012:56;;19079:21;19160:17;19155:700;19195:2;:16;;;;;;;;;;;;19179:32;;:13;:32;19155:700;;;19241:12;19256:2;:16;;:27;19273:9;19256:27;;;;;;;;;;;;19241:42;;19303:25;19298:546;19350:1;19330:17;:21;19298:546;;;19393:15;;;;;;;19447:2;:16;;;;;;;;;;;;19431:32;;:13;:32;19427:86;;;19488:5;;19427:86;19531:15;19585:2;19565:17;:22;19556:4;:32;;19531:58;;19608:13;19640:2;:9;;:19;19650:8;19640:19;;;;;;;;;;;;;;;;;;19624:37;;19608:53;;19694:5;19684:15;;:6;:15;;;19680:149;;;19764:8;19724:23;19748:12;19724:37;;;;;;;;;;;;;:48;;;;;;;;;;;;;19795:14;;;;;;;19680:149;19298:546;;19353:19;;;;;;;19298:546;;;;19155:700;19213:11;;;;;;;19155:700;;;;19974:12;19949:23;19942:45;19927:71;;;;;;:::o;21916:261::-;21996:21;22030:36;22069:27;:25;:27::i;:::-;22030:66;;22139:2;:9;;:28;22149:17;22139:28;;;;;;;;;;;;;;;;;;22123:46;;22107:62;;21916:261;;;;:::o;4484:202::-;4533:25;4571:16;3616:45;4571:43;;4660:8;4649:19;;4634:45;;:::o;-1:-1:-1:-;;;;;;;;;;;;;;;;;;;;;:::o;5:130::-;;85:6;72:20;63:29;;97:33;124:5;97:33;:::i;:::-;57:78;;;;:::o;142:128::-;;221:6;208:20;199:29;;233:32;259:5;233:32;:::i;:::-;193:77;;;;:::o;277:241::-;;381:2;369:9;360:7;356:23;352:32;349:2;;;397:1;394;387:12;349:2;432:1;449:53;494:7;485:6;474:9;470:22;449:53;:::i;:::-;439:63;;411:97;343:175;;;;:::o;525:239::-;;628:2;616:9;607:7;603:23;599:32;596:2;;;644:1;641;634:12;596:2;679:1;696:52;740:7;731:6;720:9;716:22;696:52;:::i;:::-;686:62;;658:96;590:174;;;;:::o;772:173::-;;859:46;901:3;893:6;859:46;:::i;:::-;934:4;929:3;925:14;911:28;;852:93;;;;:::o;954:169::-;;1039:44;1079:3;1071:6;1039:44;:::i;:::-;1112:4;1107:3;1103:14;1089:28;;1032:91;;;;:::o;1132:237::-;;1275:88;1359:3;1351:6;1275:88;:::i;:::-;1261:102;;1254:115;;;;:::o;1377:103::-;1450:24;1468:5;1450:24;:::i;:::-;1445:3;1438:37;1432:48;;:::o;1487:113::-;1570:24;1588:5;1570:24;:::i;:::-;1565:3;1558:37;1552:48;;:::o;1638:690::-;;1783:54;1831:5;1783:54;:::i;:::-;1850:86;1929:6;1924:3;1850:86;:::i;:::-;1843:93;;1957:56;2007:5;1957:56;:::i;:::-;2033:7;2061:1;2046:260;2071:6;2068:1;2065:13;2046:260;;;2138:6;2132:13;2159:63;2218:3;2203:13;2159:63;:::i;:::-;2152:70;;2239:60;2292:6;2239:60;:::i;:::-;2229:70;;2103:203;2093:1;2090;2086:9;2081:14;;2046:260;;;2050:14;2319:3;2312:10;;1762:566;;;;;;;:::o;2365:662::-;;2498:53;2545:5;2498:53;:::i;:::-;2564:75;2632:6;2627:3;2564:75;:::i;:::-;2557:82;;2660:55;2709:5;2660:55;:::i;:::-;2735:7;2763:1;2748:257;2773:6;2770:1;2767:13;2748:257;;;2840:6;2834:13;2861:61;2918:3;2903:13;2861:61;:::i;:::-;2854:68;;2939:59;2991:6;2939:59;:::i;:::-;2929:69;;2805:200;2795:1;2792;2788:9;2783:14;;2748:257;;;2752:14;3018:3;3011:10;;2477:550;;;;;;;:::o;3064:682::-;;3207:53;3254:5;3207:53;:::i;:::-;3273:85;3351:6;3346:3;3273:85;:::i;:::-;3266:92;;3379:55;3428:5;3379:55;:::i;:::-;3454:7;3482:1;3467:257;3492:6;3489:1;3486:13;3467:257;;;3559:6;3553:13;3580:61;3637:3;3622:13;3580:61;:::i;:::-;3573:68;;3658:59;3710:6;3658:59;:::i;:::-;3648:69;;3524:200;3514:1;3511;3507:9;3502:14;;3467:257;;;3471:14;3737:3;3730:10;;3186:560;;;;;;;:::o;3823:1016::-;;4010:75;4079:5;4010:75;:::i;:::-;4098:107;4198:6;4193:3;4098:107;:::i;:::-;4091:114;;4228:3;4270:4;4262:6;4258:17;4253:3;4249:27;4297:77;4368:5;4297:77;:::i;:::-;4394:7;4422:1;4407:393;4432:6;4429:1;4426:13;4407:393;;;4494:9;4488:4;4484:20;4479:3;4472:33;4539:6;4533:13;4561:106;4662:4;4647:13;4561:106;:::i;:::-;4553:114;;4684:81;4758:6;4684:81;:::i;:::-;4674:91;;4788:4;4783:3;4779:14;4772:21;;4464:336;4454:1;4451;4447:9;4442:14;;4407:393;;;4411:14;4813:4;4806:11;;4830:3;4823:10;;3989:850;;;;;;;;;:::o;4847:104::-;4924:21;4939:5;4924:21;:::i;:::-;4919:3;4912:34;4906:45;;:::o;4958:100::-;5029:23;5046:5;5029:23;:::i;:::-;5024:3;5017:36;5011:47;;:::o;5128:602::-;;5261:4;5256:3;5252:14;5352:4;5345:5;5341:16;5335:23;5364:63;5421:4;5416:3;5412:14;5398:12;5364:63;:::i;:::-;5281:152;5519:4;5512:5;5508:16;5502:23;5571:3;5565:4;5561:14;5554:4;5549:3;5545:14;5538:38;5591:101;5687:4;5673:12;5591:101;:::i;:::-;5583:109;;5443:261;5721:4;5714:11;;5234:496;;;;;:::o;5737:222::-;;5864:2;5853:9;5849:18;5841:26;;5878:71;5946:1;5935:9;5931:17;5922:6;5878:71;:::i;:::-;5835:124;;;;:::o;5966:370::-;;6143:2;6132:9;6128:18;6120:26;;6193:9;6187:4;6183:20;6179:1;6168:9;6164:17;6157:47;6218:108;6321:4;6312:6;6218:108;:::i;:::-;6210:116;;6114:222;;;;:::o;6343:366::-;;6518:2;6507:9;6503:18;6495:26;;6568:9;6562:4;6558:20;6554:1;6543:9;6539:17;6532:47;6593:106;6694:4;6685:6;6593:106;:::i;:::-;6585:114;;6489:220;;;;:::o;6716:454::-;;6935:2;6924:9;6920:18;6912:26;;6985:9;6979:4;6975:20;6971:1;6960:9;6956:17;6949:47;7010:150;7155:4;7146:6;7010:150;:::i;:::-;7002:158;;6906:264;;;;:::o;7177:210::-;;7298:2;7287:9;7283:18;7275:26;;7312:65;7374:1;7363:9;7359:17;7350:6;7312:65;:::i;:::-;7269:118;;;;:::o;7394:151::-;;7480:3;7472:11;;7518:4;7513:3;7509:14;7501:22;;7466:79;;;:::o;7552:150::-;;7637:3;7629:11;;7675:4;7670:3;7666:14;7658:22;;7623:79;;;:::o;7709:172::-;;7816:3;7808:11;;7854:4;7849:3;7845:14;7837:22;;7802:79;;;:::o;7888:137::-;;7997:5;7991:12;7981:22;;7962:63;;;:::o;8032:136::-;;8140:5;8134:12;8124:22;;8105:63;;;:::o;8175:158::-;;8305:5;8299:12;8289:22;;8270:63;;;:::o;8340:108::-;;8438:4;8433:3;8429:14;8421:22;;8415:33;;;:::o;8455:107::-;;8552:4;8547:3;8543:14;8535:22;;8529:33;;;:::o;8569:129::-;;8688:4;8683:3;8679:14;8671:22;;8665:33;;;:::o;8706:178::-;;8836:6;8831:3;8824:19;8873:4;8868:3;8864:14;8849:29;;8817:67;;;;:::o;8893:167::-;;9012:6;9007:3;9000:19;9049:4;9044:3;9040:14;9025:29;;8993:67;;;;:::o;9069:177::-;;9198:6;9193:3;9186:19;9235:4;9230:3;9226:14;9211:29;;9179:67;;;;:::o;9255:199::-;;9406:6;9401:3;9394:19;9443:4;9438:3;9434:14;9419:29;;9387:67;;;;:::o;9462:91::-;;9524:24;9542:5;9524:24;:::i;:::-;9513:35;;9507:46;;;:::o;9560:85::-;;9633:5;9626:13;9619:21;9608:32;;9602:43;;;:::o;9652:144::-;;9724:66;9717:5;9713:78;9702:89;;9696:100;;;:::o;9803:121::-;;9876:42;9869:5;9865:54;9854:65;;9848:76;;;:::o;9931:117::-;10000:24;10018:5;10000:24;:::i;:::-;9993:5;9990:35;9980:2;;10039:1;10036;10029:12;9980:2;9974:74;:::o;10055:115::-;10123:23;10140:5;10123:23;:::i;:::-;10116:5;10113:34;10103:2;;10161:1;10158;10151:12;10103:2;10097:73;:::o

Swarm Source

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