ETH Price: $2,513.28 (-0.65%)
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

More Info

Private Name Tags

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To

There are no matching entries

1 Internal Transaction found.

Latest 1 internal transaction

Advanced mode:
Parent Transaction Hash Method Block
From
To
-129740752021-08-06 22:27:121412 days ago1628288832  Contract Creation0 ETH

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
DiamondCutFacet

Compiler Version
v0.7.6+commit.7338295f

Optimization Enabled:
Yes with 1000 runs

Other Settings:
default evmVersion
/*
 SPDX-License-Identifier: MIT
*/

pragma experimental ABIEncoderV2;
pragma solidity ^0.7.6;
/******************************************************************************\
* Author: Nick Mudge <[email protected]> (https://twitter.com/mudgen)
* EIP-2535 Diamond Standard: https://eips.ethereum.org/EIPS/eip-2535
/******************************************************************************/

import {IDiamondCut} from "../../interfaces/IDiamondCut.sol";
import {LibDiamond} from "../../libraries/LibDiamond.sol";

contract DiamondCutFacet is IDiamondCut {
    /// @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 override {
        LibDiamond.enforceIsContractOwner();
        LibDiamond.diamondCut(_diamondCut, _init, _calldata);
    }
}

File 2 of 7 : IDiamondCut.sol
// SPDX-License-Identifier: MIT
pragma experimental ABIEncoderV2;
pragma solidity ^0.7.6;
/******************************************************************************\
* 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);
}

/*
 SPDX-License-Identifier: MIT
*/

pragma experimental ABIEncoderV2;
pragma solidity ^0.7.6;
/******************************************************************************\
* Author: Nick Mudge <[email protected]> (https://twitter.com/mudgen)
* EIP-2535 Diamond Standard: https://eips.ethereum.org/EIPS/eip-2535
/******************************************************************************/

import {IDiamondCut} from "../interfaces/IDiamondCut.sol";
import {IDiamondLoupe} from "../interfaces/IDiamondLoupe.sol";
import {IERC165} from "../interfaces/IERC165.sol";
import {IERC173} from "../interfaces/IERC173.sol";
import {LibMeta} from "./LibMeta.sol";

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

    struct FacetAddressAndPosition {
        address facetAddress;
        uint16 functionSelectorPosition; // position in facetFunctionSelectors.functionSelectors array
    }

    struct FacetFunctionSelectors {
        bytes4[] functionSelectors;
        uint16 facetAddressPosition; // position of facetAddress in facetAddresses array
    }

    struct DiamondStorage {
        // maps function selector to the facet address and
        // the position of the selector in the facetFunctionSelectors.selectors array
        mapping(bytes4 => FacetAddressAndPosition) selectorToFacetAndPosition;
        // maps facet addresses to function selectors
        mapping(address => FacetFunctionSelectors) facetFunctionSelectors;
        // facet addresses
        address[] facetAddresses;
        // 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() internal view {
        require(LibMeta.msgSender() == diamondStorage().contractOwner, "LibDiamond: Must be contract owner");
    }

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

    function addDiamondFunctions(
        address _diamondCutFacet,
        address _diamondLoupeFacet,
        address _ownershipFacet
    ) internal {
        IDiamondCut.FacetCut[] memory cut = new IDiamondCut.FacetCut[](3);
        bytes4[] memory functionSelectors = new bytes4[](1);
        functionSelectors[0] = IDiamondCut.diamondCut.selector;
        cut[0] = IDiamondCut.FacetCut({facetAddress: _diamondCutFacet, action: IDiamondCut.FacetCutAction.Add, functionSelectors: functionSelectors});
        functionSelectors = new bytes4[](5);
        functionSelectors[0] = IDiamondLoupe.facets.selector;
        functionSelectors[1] = IDiamondLoupe.facetFunctionSelectors.selector;
        functionSelectors[2] = IDiamondLoupe.facetAddresses.selector;
        functionSelectors[3] = IDiamondLoupe.facetAddress.selector;
        functionSelectors[4] = IERC165.supportsInterface.selector;
        cut[1] = IDiamondCut.FacetCut({
            facetAddress: _diamondLoupeFacet,
            action: IDiamondCut.FacetCutAction.Add,
            functionSelectors: functionSelectors
        });
        functionSelectors = new bytes4[](2);
        functionSelectors[0] = IERC173.transferOwnership.selector;
        functionSelectors[1] = IERC173.owner.selector;
        cut[2] = IDiamondCut.FacetCut({facetAddress: _ownershipFacet, action: IDiamondCut.FacetCutAction.Add, functionSelectors: functionSelectors});
        diamondCut(cut, address(0), "");
    }

    // Internal function version of diamondCut
    function diamondCut(
        IDiamondCut.FacetCut[] memory _diamondCut,
        address _init,
        bytes memory _calldata
    ) internal {
        for (uint256 facetIndex; facetIndex < _diamondCut.length; facetIndex++) {
            IDiamondCut.FacetCutAction action = _diamondCut[facetIndex].action;
            if (action == IDiamondCut.FacetCutAction.Add) {
                addFunctions(_diamondCut[facetIndex].facetAddress, _diamondCut[facetIndex].functionSelectors);
            } else if (action == IDiamondCut.FacetCutAction.Replace) {
                replaceFunctions(_diamondCut[facetIndex].facetAddress, _diamondCut[facetIndex].functionSelectors);
            } else if (action == IDiamondCut.FacetCutAction.Remove) {
                removeFunctions(_diamondCut[facetIndex].facetAddress, _diamondCut[facetIndex].functionSelectors);
            } else {
                revert("LibDiamondCut: Incorrect FacetCutAction");
            }
        }
        emit DiamondCut(_diamondCut, _init, _calldata);
        initializeDiamondCut(_init, _calldata);
    }

    function addFunctions(address _facetAddress, bytes4[] memory _functionSelectors) internal {
        require(_functionSelectors.length > 0, "LibDiamondCut: No selectors in facet to cut");
        DiamondStorage storage ds = diamondStorage();
        // uint16 selectorCount = uint16(diamondStorage().selectors.length);
        require(_facetAddress != address(0), "LibDiamondCut: Add facet cant be address(0)");
        uint16 selectorPosition = uint16(ds.facetFunctionSelectors[_facetAddress].functionSelectors.length);
        // add new facet address if it does not exist
        if (selectorPosition == 0) {
            enforceHasContractCode(_facetAddress, "LibDiamondCut: New facet has no code");
            ds.facetFunctionSelectors[_facetAddress].facetAddressPosition = uint16(ds.facetAddresses.length);
            ds.facetAddresses.push(_facetAddress);
        }
        for (uint256 selectorIndex; selectorIndex < _functionSelectors.length; selectorIndex++) {
            bytes4 selector = _functionSelectors[selectorIndex];
            address oldFacetAddress = ds.selectorToFacetAndPosition[selector].facetAddress;
            require(oldFacetAddress == address(0), "LibDiamondCut: Cant add function that already exists");
            ds.facetFunctionSelectors[_facetAddress].functionSelectors.push(selector);
            ds.selectorToFacetAndPosition[selector].facetAddress = _facetAddress;
            ds.selectorToFacetAndPosition[selector].functionSelectorPosition = selectorPosition;
            selectorPosition++;
        }
    }

    function replaceFunctions(address _facetAddress, bytes4[] memory _functionSelectors) internal {
        require(_functionSelectors.length > 0, "LibDiamondCut: No selectors in facet to cut");
        DiamondStorage storage ds = diamondStorage();
        require(_facetAddress != address(0), "LibDiamondCut: Add facet cant be address(0)");
        uint16 selectorPosition = uint16(ds.facetFunctionSelectors[_facetAddress].functionSelectors.length);
        // add new facet address if it does not exist
        if (selectorPosition == 0) {
            enforceHasContractCode(_facetAddress, "LibDiamondCut: New facet has no code");
            ds.facetFunctionSelectors[_facetAddress].facetAddressPosition = uint16(ds.facetAddresses.length);
            ds.facetAddresses.push(_facetAddress);
        }
        for (uint256 selectorIndex; selectorIndex < _functionSelectors.length; selectorIndex++) {
            bytes4 selector = _functionSelectors[selectorIndex];
            address oldFacetAddress = ds.selectorToFacetAndPosition[selector].facetAddress;
            require(oldFacetAddress != _facetAddress, "LibDiamondCut: Cant replace function with same function");
            removeFunction(oldFacetAddress, selector);
            // add function
            ds.selectorToFacetAndPosition[selector].functionSelectorPosition = selectorPosition;
            ds.facetFunctionSelectors[_facetAddress].functionSelectors.push(selector);
            ds.selectorToFacetAndPosition[selector].facetAddress = _facetAddress;
            selectorPosition++;
        }
    }

    function removeFunctions(address _facetAddress, bytes4[] memory _functionSelectors) internal {
        require(_functionSelectors.length > 0, "LibDiamondCut: No selectors in facet to cut");
        DiamondStorage storage ds = diamondStorage();
        // if function does not exist then do nothing and return
        require(_facetAddress == address(0), "LibDiamondCut: Remove facet address must be address(0)");
        for (uint256 selectorIndex; selectorIndex < _functionSelectors.length; selectorIndex++) {
            bytes4 selector = _functionSelectors[selectorIndex];
            address oldFacetAddress = ds.selectorToFacetAndPosition[selector].facetAddress;
            removeFunction(oldFacetAddress, selector);
        }
    }

    function removeFunction(address _facetAddress, bytes4 _selector) internal {
        DiamondStorage storage ds = diamondStorage();
        require(_facetAddress != address(0), "LibDiamondCut: Cant remove function that doesnt exist");
        // an immutable function is a function defined directly in a diamond
        require(_facetAddress != address(this), "LibDiamondCut: Cant remove immutable function");
        // replace selector with last selector, then delete last selector
        uint256 selectorPosition = ds.selectorToFacetAndPosition[_selector].functionSelectorPosition;
        uint256 lastSelectorPosition = ds.facetFunctionSelectors[_facetAddress].functionSelectors.length - 1;
        // if not the same then replace _selector with lastSelector
        if (selectorPosition != lastSelectorPosition) {
            bytes4 lastSelector = ds.facetFunctionSelectors[_facetAddress].functionSelectors[lastSelectorPosition];
            ds.facetFunctionSelectors[_facetAddress].functionSelectors[selectorPosition] = lastSelector;
            ds.selectorToFacetAndPosition[lastSelector].functionSelectorPosition = uint16(selectorPosition);
        }
        // delete the last selector
        ds.facetFunctionSelectors[_facetAddress].functionSelectors.pop();
        delete ds.selectorToFacetAndPosition[_selector];

        // if no more selectors for facet address then delete the facet address
        if (lastSelectorPosition == 0) {
            // replace facet address with last facet address and delete last facet address
            uint256 lastFacetAddressPosition = ds.facetAddresses.length - 1;
            uint256 facetAddressPosition = ds.facetFunctionSelectors[_facetAddress].facetAddressPosition;
            if (facetAddressPosition != lastFacetAddressPosition) {
                address lastFacetAddress = ds.facetAddresses[lastFacetAddressPosition];
                ds.facetAddresses[facetAddressPosition] = lastFacetAddress;
                ds.facetFunctionSelectors[lastFacetAddress].facetAddressPosition = uint16(facetAddressPosition);
            }
            ds.facetAddresses.pop();
            delete ds.facetFunctionSelectors[_facetAddress].facetAddressPosition;
        }
    }

    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 == false) {
                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);
    }
}

// SPDX-License-Identifier: MIT
pragma experimental ABIEncoderV2;
pragma solidity ^0.7.6;
// 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_);
}

// SPDX-License-Identifier: MIT
pragma experimental ABIEncoderV2;
pragma solidity ^0.7.6;
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);
}

// SPDX-License-Identifier: MIT
pragma experimental ABIEncoderV2;
pragma solidity ^0.7.6;
/// @title ERC-173 Contract Ownership Standard
///  Note: the ERC-165 identifier for this interface is 0x7f5828d0
/* is ERC165 */
interface IERC173 {
    /// @notice Get the address of the owner
    /// @return owner_ The address of the owner.
    function owner() external view returns (address owner_);

    /// @notice Set the address of the new owner of the contract
    /// @dev Set _newOwner to address(0) to renounce any ownership.
    /// @param _newOwner The address of the new owner of the contract
    function transferOwnership(address _newOwner) external;
}

/*
 SPDX-License-Identifier: MIT
*/

pragma experimental ABIEncoderV2;
pragma solidity ^0.7.6;

library LibMeta {
    bytes32 internal constant EIP712_DOMAIN_TYPEHASH =
        keccak256(bytes("EIP712Domain(string name,string version,uint256 salt,address verifyingContract)"));

    function domainSeparator(string memory name, string memory version) internal view returns (bytes32 domainSeparator_) {
        domainSeparator_ = keccak256(
            abi.encode(EIP712_DOMAIN_TYPEHASH, keccak256(bytes(name)), keccak256(bytes(version)), getChainID(), address(this))
        );
    }

    function getChainID() internal pure returns (uint256 id) {
        assembly {
            id := chainid()
        }
    }

    function msgSender() internal view returns (address sender_) {
        if (msg.sender == address(this)) {
            bytes memory array = msg.data;
            uint256 index = msg.data.length;
            assembly {
                // Load the 32 bytes word from memory with the address on the lower 20 bytes, and mask those.
                sender_ := and(mload(add(array, index)), 0xffffffffffffffffffffffffffffffffffffffff)
            }
        } else {
            sender_ = msg.sender;
        }
    }
}

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

Contract Security Audit

Contract ABI

API
[{"anonymous":false,"inputs":[{"components":[{"internalType":"address","name":"facetAddress","type":"address"},{"internalType":"enum IDiamondCut.FacetCutAction","name":"action","type":"uint8"},{"internalType":"bytes4[]","name":"functionSelectors","type":"bytes4[]"}],"indexed":false,"internalType":"struct IDiamondCut.FacetCut[]","name":"_diamondCut","type":"tuple[]"},{"indexed":false,"internalType":"address","name":"_init","type":"address"},{"indexed":false,"internalType":"bytes","name":"_calldata","type":"bytes"}],"name":"DiamondCut","type":"event"},{"inputs":[{"components":[{"internalType":"address","name":"facetAddress","type":"address"},{"internalType":"enum IDiamondCut.FacetCutAction","name":"action","type":"uint8"},{"internalType":"bytes4[]","name":"functionSelectors","type":"bytes4[]"}],"internalType":"struct IDiamondCut.FacetCut[]","name":"_diamondCut","type":"tuple[]"},{"internalType":"address","name":"_init","type":"address"},{"internalType":"bytes","name":"_calldata","type":"bytes"}],"name":"diamondCut","outputs":[],"stateMutability":"nonpayable","type":"function"}]

608060405234801561001057600080fd5b50611503806100206000396000f3fe608060405234801561001057600080fd5b506004361061002b5760003560e01c80631f931c1c14610030575b600080fd5b61004361003e366004610ccf565b610045565b005b61004d61009e565b61009761005a8587611394565b8484848080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506100ec92505050565b5050505050565b6100a6610274565b600401546001600160a01b03166100bb610298565b6001600160a01b0316146100ea5760405162461bcd60e51b81526004016100e190610fb0565b60405180910390fd5b565b60005b835181101561022957600084828151811061010657fe5b60200260200101516020015190506000600281111561012157fe5b81600281111561012d57fe5b14156101705761016b85838151811061014257fe5b60200260200101516000015186848151811061015a57fe5b6020026020010151604001516102f5565b610220565b600181600281111561017e57fe5b14156101bc5761016b85838151811061019357fe5b6020026020010151600001518684815181106101ab57fe5b6020026020010151604001516104ef565b60028160028111156101ca57fe5b14156102085761016b8583815181106101df57fe5b6020026020010151600001518684815181106101f757fe5b602002602001015160400151610705565b60405162461bcd60e51b81526004016100e19061106a565b506001016100ef565b507f8faa70878671ccd212d20771b795c50af8fd3ff6cf27f4bde57e5d4de0aeb67383838360405161025d93929190610df6565b60405180910390a161026f82826107bf565b505050565b7fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131c90565b6000333014156102ef57600080368080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152505050503601516001600160a01b031691506102f29050565b50335b90565b60008151116103165760405162461bcd60e51b81526004016100e19061100d565b6000610320610274565b90506001600160a01b0383166103485760405162461bcd60e51b81526004016100e1906112f5565b6001600160a01b038316600090815260018201602052604090205461ffff81166103ea5761038e846040518060600160405280602481526020016114aa602491396108e7565b6002820180546001600160a01b038616600081815260018087016020908152604083208201805461ffff191661ffff90961695909517909455845490810185559381529190912090910180546001600160a01b03191690911790555b60005b835181101561009757600084828151811061040457fe5b6020908102919091018101516001600160e01b031981166000908152918690526040909120549091506001600160a01b031680156104545760405162461bcd60e51b81526004016100e1906111de565b506001600160a01b0386166000818152600186810160209081526040808420805480850182559085528285206008820401805463ffffffff60079093166004026101000a928302191660e089901c929092029190911790556001600160e01b0319909516835287905292902080546001600160a01b03191690911761ffff60a01b1916600160a01b61ffff86160217905591820191016103ed565b60008151116105105760405162461bcd60e51b81526004016100e19061100d565b600061051a610274565b90506001600160a01b0383166105425760405162461bcd60e51b81526004016100e1906112f5565b6001600160a01b038316600090815260018201602052604090205461ffff81166105e457610588846040518060600160405280602481526020016114aa602491396108e7565b6002820180546001600160a01b038616600081815260018087016020908152604083208201805461ffff191661ffff90961695909517909455845490810185559381529190912090910180546001600160a01b03191690911790555b60005b83518110156100975760008482815181106105fe57fe5b6020908102919091018101516001600160e01b031981166000908152918690526040909120549091506001600160a01b039081169087168114156106545760405162461bcd60e51b81526004016100e1906110c7565b61065e8183610908565b506001600160e01b03198116600081815260208681526040808320805461ffff60a01b1916600160a01b61ffff8a16021781556001600160a01b038b168085526001808b018552928520805480850182559086528486206008820401805463ffffffff60079093166004026101000a928302191660e09990991c91909102979097179096559390925286905281546001600160a01b031916909217905591820191016105e7565b60008151116107265760405162461bcd60e51b81526004016100e19061100d565b6000610730610274565b90506001600160a01b038316156107595760405162461bcd60e51b81526004016100e19061123b565b60005b82518110156107b957600083828151811061077357fe5b6020908102919091018101516001600160e01b031981166000908152918590526040909120549091506001600160a01b03166107af8183610908565b505060010161075c565b50505050565b6001600160a01b0382166107f1578051156107ec5760405162461bcd60e51b81526004016100e190610ef6565b6108e3565b60008151116108125760405162461bcd60e51b81526004016100e190611124565b6001600160a01b03821630146108445761084482604051806060016040528060288152602001611482602891396108e7565b600080836001600160a01b03168360405161085f9190610dda565b600060405180830381855af49150503d806000811461089a576040519150601f19603f3d011682016040523d82523d6000602084013e61089f565b606091505b509092509050816107b9578051156108cb578060405162461bcd60e51b81526004016100e19190610edc565b60405162461bcd60e51b81526004016100e190610f53565b5050565b813b81816107b95760405162461bcd60e51b81526004016100e19190610edc565b6000610912610274565b90506001600160a01b03831661093a5760405162461bcd60e51b81526004016100e190611298565b6001600160a01b0383163014156109635760405162461bcd60e51b81526004016100e190611181565b6001600160e01b03198216600090815260208281526040808320546001600160a01b03871684526001850190925290912054600160a01b90910461ffff169060001901808214610a84576001600160a01b038516600090815260018401602052604081208054839081106109d357fe5b600091825260208083206008830401546001600160a01b038a168452600188019091526040909220805460079092166004026101000a90920460e01b925082919085908110610a1e57fe5b600091825260208083206008830401805463ffffffff60079094166004026101000a938402191660e09590951c929092029390931790556001600160e01b031992909216825284905260409020805461ffff60a01b1916600160a01b61ffff8516021790555b6001600160a01b03851660009081526001840160205260409020805480610aa757fe5b60008281526020808220600860001990940193840401805463ffffffff600460078716026101000a0219169055919092556001600160e01b0319861682528490526040902080547fffffffffffffffffffff00000000000000000000000000000000000000000000169055806100975760028301546001600160a01b03861660009081526001858101602052604090912001546000199091019061ffff16808214610bd3576000856002018381548110610b5d57fe5b6000918252602090912001546002870180546001600160a01b039092169250829184908110610b8857fe5b600091825260208083209190910180546001600160a01b0319166001600160a01b0394851617905592909116815260018781019092526040902001805461ffff191661ffff83161790555b84600201805480610be057fe5b60008281526020808220830160001990810180546001600160a01b03191690559092019092556001600160a01b03891682526001878101909152604090912001805461ffff1916905550505050505050565b80356001600160a01b0381168114610c4957600080fd5b919050565b600082601f830112610c5e578081fd5b81356020610c73610c6e83611376565b611352565b8281528181019085830183850287018401881015610c8f578586fd5b855b85811015610cc25781356001600160e01b031981168114610cb0578788fd5b84529284019290840190600101610c91565b5090979650505050505050565b600080600080600060608688031215610ce6578081fd5b853567ffffffffffffffff80821115610cfd578283fd5b818801915088601f830112610d10578283fd5b813581811115610d1e578384fd5b60208a818284028601011115610d32578485fd5b8084019850819750610d45818b01610c32565b965060408a0135935082841115610d5a578485fd5b838a0193508a601f850112610d6d578485fd5b8335915082821115610d7d578485fd5b8a81838601011115610d8d578485fd5b979a96995094975050909401935090919050565b6001600160a01b03169052565b60008151808452610dc6816020860160208601611455565b601f01601f19169290920160200192915050565b60008251610dec818460208701611455565b9190910192915050565b606080825284518282018190526000919060809081850190602080820287018401818b01875b84811015610ead57607f198a840301865281518884016001600160a01b0382511685528582015160038110610e4d57fe5b858701526040918201519185018a9052815190819052908501908a90898601905b80831015610e985783516001600160e01b0319168252928701926001929092019190870190610e6e565b50978601979450505090830190600101610e1c565b5050610ebb8289018b610da1565b8781036040890152610ecd818a610dae565b9b9a5050505050505050505050565b600060208252610eef6020830184610dae565b9392505050565b6020808252603c908201527f4c69624469616d6f6e644375743a205f696e697420697320616464726573732860408201527f3029206275745f63616c6c64617461206973206e6f7420656d70747900000000606082015260800190565b60208082526026908201527f4c69624469616d6f6e644375743a205f696e69742066756e6374696f6e20726560408201527f7665727465640000000000000000000000000000000000000000000000000000606082015260800190565b60208082526022908201527f4c69624469616d6f6e643a204d75737420626520636f6e7472616374206f776e60408201527f6572000000000000000000000000000000000000000000000000000000000000606082015260800190565b6020808252602b908201527f4c69624469616d6f6e644375743a204e6f2073656c6563746f727320696e206660408201527f6163657420746f20637574000000000000000000000000000000000000000000606082015260800190565b60208082526027908201527f4c69624469616d6f6e644375743a20496e636f7272656374204661636574437560408201527f74416374696f6e00000000000000000000000000000000000000000000000000606082015260800190565b60208082526037908201527f4c69624469616d6f6e644375743a2043616e74207265706c6163652066756e6360408201527f74696f6e20776974682073616d652066756e6374696f6e000000000000000000606082015260800190565b6020808252603d908201527f4c69624469616d6f6e644375743a205f63616c6c6461746120697320656d707460408201527f7920627574205f696e6974206973206e6f742061646472657373283029000000606082015260800190565b6020808252602d908201527f4c69624469616d6f6e644375743a2043616e742072656d6f766520696d6d757460408201527f61626c652066756e6374696f6e00000000000000000000000000000000000000606082015260800190565b60208082526034908201527f4c69624469616d6f6e644375743a2043616e74206164642066756e6374696f6e60408201527f207468617420616c726561647920657869737473000000000000000000000000606082015260800190565b60208082526036908201527f4c69624469616d6f6e644375743a2052656d6f7665206661636574206164647260408201527f657373206d757374206265206164647265737328302900000000000000000000606082015260800190565b60208082526035908201527f4c69624469616d6f6e644375743a2043616e742072656d6f76652066756e637460408201527f696f6e207468617420646f65736e742065786973740000000000000000000000606082015260800190565b6020808252602b908201527f4c69624469616d6f6e644375743a204164642066616365742063616e7420626560408201527f2061646472657373283029000000000000000000000000000000000000000000606082015260800190565b60405181810167ffffffffffffffff8111828210171561136e57fe5b604052919050565b600067ffffffffffffffff82111561138a57fe5b5060209081020190565b60006113a2610c6e84611376565b8381526020808201919084845b87811015611449578135870160608082360312156113cb578788fd5b604080519182019167ffffffffffffffff80841182851017156113ea57fe5b8383526113f685610c32565b82528785013593506003841061140a578a8bfd5b838883015282850135935080841115611421578a8bfd5b5061142e36848601610c4e565b918101919091528752505093820193908201906001016113af565b50919695505050505050565b60005b83811015611470578181015183820152602001611458565b838111156107b9575050600091015256fe4c69624469616d6f6e644375743a205f696e6974206164647265737320686173206e6f20636f64654c69624469616d6f6e644375743a204e657720666163657420686173206e6f20636f6465a26469706673582212201f711ec97d47f31714bcdb6285fe6a4f5dfeead1c7d65ec0ab2dd2e1c134226064736f6c63430007060033

Deployed Bytecode

0x608060405234801561001057600080fd5b506004361061002b5760003560e01c80631f931c1c14610030575b600080fd5b61004361003e366004610ccf565b610045565b005b61004d61009e565b61009761005a8587611394565b8484848080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506100ec92505050565b5050505050565b6100a6610274565b600401546001600160a01b03166100bb610298565b6001600160a01b0316146100ea5760405162461bcd60e51b81526004016100e190610fb0565b60405180910390fd5b565b60005b835181101561022957600084828151811061010657fe5b60200260200101516020015190506000600281111561012157fe5b81600281111561012d57fe5b14156101705761016b85838151811061014257fe5b60200260200101516000015186848151811061015a57fe5b6020026020010151604001516102f5565b610220565b600181600281111561017e57fe5b14156101bc5761016b85838151811061019357fe5b6020026020010151600001518684815181106101ab57fe5b6020026020010151604001516104ef565b60028160028111156101ca57fe5b14156102085761016b8583815181106101df57fe5b6020026020010151600001518684815181106101f757fe5b602002602001015160400151610705565b60405162461bcd60e51b81526004016100e19061106a565b506001016100ef565b507f8faa70878671ccd212d20771b795c50af8fd3ff6cf27f4bde57e5d4de0aeb67383838360405161025d93929190610df6565b60405180910390a161026f82826107bf565b505050565b7fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131c90565b6000333014156102ef57600080368080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152505050503601516001600160a01b031691506102f29050565b50335b90565b60008151116103165760405162461bcd60e51b81526004016100e19061100d565b6000610320610274565b90506001600160a01b0383166103485760405162461bcd60e51b81526004016100e1906112f5565b6001600160a01b038316600090815260018201602052604090205461ffff81166103ea5761038e846040518060600160405280602481526020016114aa602491396108e7565b6002820180546001600160a01b038616600081815260018087016020908152604083208201805461ffff191661ffff90961695909517909455845490810185559381529190912090910180546001600160a01b03191690911790555b60005b835181101561009757600084828151811061040457fe5b6020908102919091018101516001600160e01b031981166000908152918690526040909120549091506001600160a01b031680156104545760405162461bcd60e51b81526004016100e1906111de565b506001600160a01b0386166000818152600186810160209081526040808420805480850182559085528285206008820401805463ffffffff60079093166004026101000a928302191660e089901c929092029190911790556001600160e01b0319909516835287905292902080546001600160a01b03191690911761ffff60a01b1916600160a01b61ffff86160217905591820191016103ed565b60008151116105105760405162461bcd60e51b81526004016100e19061100d565b600061051a610274565b90506001600160a01b0383166105425760405162461bcd60e51b81526004016100e1906112f5565b6001600160a01b038316600090815260018201602052604090205461ffff81166105e457610588846040518060600160405280602481526020016114aa602491396108e7565b6002820180546001600160a01b038616600081815260018087016020908152604083208201805461ffff191661ffff90961695909517909455845490810185559381529190912090910180546001600160a01b03191690911790555b60005b83518110156100975760008482815181106105fe57fe5b6020908102919091018101516001600160e01b031981166000908152918690526040909120549091506001600160a01b039081169087168114156106545760405162461bcd60e51b81526004016100e1906110c7565b61065e8183610908565b506001600160e01b03198116600081815260208681526040808320805461ffff60a01b1916600160a01b61ffff8a16021781556001600160a01b038b168085526001808b018552928520805480850182559086528486206008820401805463ffffffff60079093166004026101000a928302191660e09990991c91909102979097179096559390925286905281546001600160a01b031916909217905591820191016105e7565b60008151116107265760405162461bcd60e51b81526004016100e19061100d565b6000610730610274565b90506001600160a01b038316156107595760405162461bcd60e51b81526004016100e19061123b565b60005b82518110156107b957600083828151811061077357fe5b6020908102919091018101516001600160e01b031981166000908152918590526040909120549091506001600160a01b03166107af8183610908565b505060010161075c565b50505050565b6001600160a01b0382166107f1578051156107ec5760405162461bcd60e51b81526004016100e190610ef6565b6108e3565b60008151116108125760405162461bcd60e51b81526004016100e190611124565b6001600160a01b03821630146108445761084482604051806060016040528060288152602001611482602891396108e7565b600080836001600160a01b03168360405161085f9190610dda565b600060405180830381855af49150503d806000811461089a576040519150601f19603f3d011682016040523d82523d6000602084013e61089f565b606091505b509092509050816107b9578051156108cb578060405162461bcd60e51b81526004016100e19190610edc565b60405162461bcd60e51b81526004016100e190610f53565b5050565b813b81816107b95760405162461bcd60e51b81526004016100e19190610edc565b6000610912610274565b90506001600160a01b03831661093a5760405162461bcd60e51b81526004016100e190611298565b6001600160a01b0383163014156109635760405162461bcd60e51b81526004016100e190611181565b6001600160e01b03198216600090815260208281526040808320546001600160a01b03871684526001850190925290912054600160a01b90910461ffff169060001901808214610a84576001600160a01b038516600090815260018401602052604081208054839081106109d357fe5b600091825260208083206008830401546001600160a01b038a168452600188019091526040909220805460079092166004026101000a90920460e01b925082919085908110610a1e57fe5b600091825260208083206008830401805463ffffffff60079094166004026101000a938402191660e09590951c929092029390931790556001600160e01b031992909216825284905260409020805461ffff60a01b1916600160a01b61ffff8516021790555b6001600160a01b03851660009081526001840160205260409020805480610aa757fe5b60008281526020808220600860001990940193840401805463ffffffff600460078716026101000a0219169055919092556001600160e01b0319861682528490526040902080547fffffffffffffffffffff00000000000000000000000000000000000000000000169055806100975760028301546001600160a01b03861660009081526001858101602052604090912001546000199091019061ffff16808214610bd3576000856002018381548110610b5d57fe5b6000918252602090912001546002870180546001600160a01b039092169250829184908110610b8857fe5b600091825260208083209190910180546001600160a01b0319166001600160a01b0394851617905592909116815260018781019092526040902001805461ffff191661ffff83161790555b84600201805480610be057fe5b60008281526020808220830160001990810180546001600160a01b03191690559092019092556001600160a01b03891682526001878101909152604090912001805461ffff1916905550505050505050565b80356001600160a01b0381168114610c4957600080fd5b919050565b600082601f830112610c5e578081fd5b81356020610c73610c6e83611376565b611352565b8281528181019085830183850287018401881015610c8f578586fd5b855b85811015610cc25781356001600160e01b031981168114610cb0578788fd5b84529284019290840190600101610c91565b5090979650505050505050565b600080600080600060608688031215610ce6578081fd5b853567ffffffffffffffff80821115610cfd578283fd5b818801915088601f830112610d10578283fd5b813581811115610d1e578384fd5b60208a818284028601011115610d32578485fd5b8084019850819750610d45818b01610c32565b965060408a0135935082841115610d5a578485fd5b838a0193508a601f850112610d6d578485fd5b8335915082821115610d7d578485fd5b8a81838601011115610d8d578485fd5b979a96995094975050909401935090919050565b6001600160a01b03169052565b60008151808452610dc6816020860160208601611455565b601f01601f19169290920160200192915050565b60008251610dec818460208701611455565b9190910192915050565b606080825284518282018190526000919060809081850190602080820287018401818b01875b84811015610ead57607f198a840301865281518884016001600160a01b0382511685528582015160038110610e4d57fe5b858701526040918201519185018a9052815190819052908501908a90898601905b80831015610e985783516001600160e01b0319168252928701926001929092019190870190610e6e565b50978601979450505090830190600101610e1c565b5050610ebb8289018b610da1565b8781036040890152610ecd818a610dae565b9b9a5050505050505050505050565b600060208252610eef6020830184610dae565b9392505050565b6020808252603c908201527f4c69624469616d6f6e644375743a205f696e697420697320616464726573732860408201527f3029206275745f63616c6c64617461206973206e6f7420656d70747900000000606082015260800190565b60208082526026908201527f4c69624469616d6f6e644375743a205f696e69742066756e6374696f6e20726560408201527f7665727465640000000000000000000000000000000000000000000000000000606082015260800190565b60208082526022908201527f4c69624469616d6f6e643a204d75737420626520636f6e7472616374206f776e60408201527f6572000000000000000000000000000000000000000000000000000000000000606082015260800190565b6020808252602b908201527f4c69624469616d6f6e644375743a204e6f2073656c6563746f727320696e206660408201527f6163657420746f20637574000000000000000000000000000000000000000000606082015260800190565b60208082526027908201527f4c69624469616d6f6e644375743a20496e636f7272656374204661636574437560408201527f74416374696f6e00000000000000000000000000000000000000000000000000606082015260800190565b60208082526037908201527f4c69624469616d6f6e644375743a2043616e74207265706c6163652066756e6360408201527f74696f6e20776974682073616d652066756e6374696f6e000000000000000000606082015260800190565b6020808252603d908201527f4c69624469616d6f6e644375743a205f63616c6c6461746120697320656d707460408201527f7920627574205f696e6974206973206e6f742061646472657373283029000000606082015260800190565b6020808252602d908201527f4c69624469616d6f6e644375743a2043616e742072656d6f766520696d6d757460408201527f61626c652066756e6374696f6e00000000000000000000000000000000000000606082015260800190565b60208082526034908201527f4c69624469616d6f6e644375743a2043616e74206164642066756e6374696f6e60408201527f207468617420616c726561647920657869737473000000000000000000000000606082015260800190565b60208082526036908201527f4c69624469616d6f6e644375743a2052656d6f7665206661636574206164647260408201527f657373206d757374206265206164647265737328302900000000000000000000606082015260800190565b60208082526035908201527f4c69624469616d6f6e644375743a2043616e742072656d6f76652066756e637460408201527f696f6e207468617420646f65736e742065786973740000000000000000000000606082015260800190565b6020808252602b908201527f4c69624469616d6f6e644375743a204164642066616365742063616e7420626560408201527f2061646472657373283029000000000000000000000000000000000000000000606082015260800190565b60405181810167ffffffffffffffff8111828210171561136e57fe5b604052919050565b600067ffffffffffffffff82111561138a57fe5b5060209081020190565b60006113a2610c6e84611376565b8381526020808201919084845b87811015611449578135870160608082360312156113cb578788fd5b604080519182019167ffffffffffffffff80841182851017156113ea57fe5b8383526113f685610c32565b82528785013593506003841061140a578a8bfd5b838883015282850135935080841115611421578a8bfd5b5061142e36848601610c4e565b918101919091528752505093820193908201906001016113af565b50919695505050505050565b60005b83811015611470578181015183820152602001611458565b838111156107b9575050600091015256fe4c69624469616d6f6e644375743a205f696e6974206164647265737320686173206e6f20636f64654c69624469616d6f6e644375743a204e657720666163657420686173206e6f20636f6465a26469706673582212201f711ec97d47f31714bcdb6285fe6a4f5dfeead1c7d65ec0ab2dd2e1c134226064736f6c63430007060033

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export  ]

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.