ETH Price: $2,519.97 (-0.25%)
 

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

Please try again later

Advanced mode:
Parent Transaction Hash Method Block
From
To
View All Internal Transactions

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 '../../seraph/SeraphProtected.sol';
import {IDiamondCut} from "../../interfaces/IDiamondCut.sol";
import {LibDiamond} from "../../libraries/LibDiamond.sol";

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

File 2 of 6 : 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;
// 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;
/******************************************************************************\
* Author: Nick Mudge <[email protected]> (https://twitter.com/mudgen)
* EIP-2535 Diamonds: 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";

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

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

    struct FacetFunctionSelectors {
        bytes4[] functionSelectors;
        uint256 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 enforceIsOwnerOrContract() internal view {
        require(msg.sender == diamondStorage().contractOwner ||
                msg.sender == address(this), "LibDiamond: Must be contract or owner"
        );
    }

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

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

    function addDiamondFunctions(
        address _diamondCutFacet,
        address _diamondLoupeFacet
    ) internal {
        IDiamondCut.FacetCut[] memory cut = new IDiamondCut.FacetCut[](2);
        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
        });
        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();        
        require(_facetAddress != address(0), "LibDiamondCut: Add facet can't be address(0)");
        uint96 selectorPosition = uint96(ds.facetFunctionSelectors[_facetAddress].functionSelectors.length);
        // add new facet address if it does not exist
        if (selectorPosition == 0) {
            addFacet(ds, _facetAddress);            
        }
        for (uint256 selectorIndex; selectorIndex < _functionSelectors.length; selectorIndex++) {
            bytes4 selector = _functionSelectors[selectorIndex];
            address oldFacetAddress = ds.selectorToFacetAndPosition[selector].facetAddress;
            require(oldFacetAddress == address(0), "LibDiamondCut: Can't add function that already exists");
            addFunction(ds, selector, selectorPosition, _facetAddress);
            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 can't be address(0)");
        uint96 selectorPosition = uint96(ds.facetFunctionSelectors[_facetAddress].functionSelectors.length);
        // add new facet address if it does not exist
        if (selectorPosition == 0) {
            addFacet(ds, _facetAddress);
        }
        for (uint256 selectorIndex; selectorIndex < _functionSelectors.length; selectorIndex++) {
            bytes4 selector = _functionSelectors[selectorIndex];
            address oldFacetAddress = ds.selectorToFacetAndPosition[selector].facetAddress;
            require(oldFacetAddress != _facetAddress, "LibDiamondCut: Can't replace function with same function");
            removeFunction(ds, oldFacetAddress, selector);
            addFunction(ds, selector, selectorPosition, _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(ds, oldFacetAddress, selector);
        }
    }

    function addFacet(DiamondStorage storage ds, address _facetAddress) internal {
        enforceHasContractCode(_facetAddress, "LibDiamondCut: New facet has no code");
        ds.facetFunctionSelectors[_facetAddress].facetAddressPosition = ds.facetAddresses.length;
        ds.facetAddresses.push(_facetAddress);
    }    


    function addFunction(DiamondStorage storage ds, bytes4 _selector, uint96 _selectorPosition, address _facetAddress) internal {
        ds.selectorToFacetAndPosition[_selector].functionSelectorPosition = _selectorPosition;
        ds.facetFunctionSelectors[_facetAddress].functionSelectors.push(_selector);
        ds.selectorToFacetAndPosition[_selector].facetAddress = _facetAddress;
    }

    function removeFunction(DiamondStorage storage ds, address _facetAddress, bytes4 _selector) internal {        
        require(_facetAddress != address(0), "LibDiamondCut: Can't remove function that doesn't exist");
        // an immutable function is a function defined directly in a diamond
        require(_facetAddress != address(this), "LibDiamondCut: Can't 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 = uint96(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 = 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) {
                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: AGPL-3.0-only
pragma solidity >=0.5.0 <=0.9.0;

interface ISeraph {
    function checkEnter(address, bytes4, bytes calldata, uint256) external;
    function checkLeave(bytes4) external;
}

abstract contract SeraphProtected {

    ISeraph constant internal _seraph = ISeraph(0xAac09eEdCcf664a9A6a594Fc527A0A4eC6cc2788);

    modifier withSeraph() {
        _seraph.checkEnter(msg.sender, msg.sig, msg.data, 0);
        _;
        _seraph.checkLeave(msg.sig);
    }

    modifier withSeraphPayable() {
        _seraph.checkEnter(msg.sender, msg.sig, msg.data, msg.value);
        _;
        _seraph.checkLeave(msg.sig);
    }
}

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 1000
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "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"}]

608060405234801561001057600080fd5b50611542806100206000396000f3fe608060405234801561001057600080fd5b506004361061002b5760003560e01c80631f931c1c14610030575b600080fd5b61004361003e366004610d0e565b610045565b005b73aac09eedccf664a9a6a594fc527a0a4ec6cc27886001600160a01b03166339c8e373336000356001600160e01b03191660003660006040518663ffffffff1660e01b815260040180866001600160a01b03168152602001857bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19168152602001806020018381526020018281038252858582818152602001925080828437600081840152601f19601f8201169050808301925050509650505050505050600060405180830381600087803b15801561011957600080fd5b505af115801561012d573d6000803e3d6000fd5b50505050610139610216565b61018361014685876113d3565b8484848080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061025492505050565b604080517f17ee968f000000000000000000000000000000000000000000000000000000008152600080356001600160e01b0319166004830152915173aac09eedccf664a9a6a594fc527a0a4ec6cc2788926317ee968f926024808201939182900301818387803b1580156101f757600080fd5b505af115801561020b573d6000803e3d6000fd5b505050505050505050565b61021e6103dc565b600401546001600160a01b031633146102525760405162461bcd60e51b815260040161024990610fef565b60405180910390fd5b565b60005b835181101561039157600084828151811061026e57fe5b60200260200101516020015190506000600281111561028957fe5b81600281111561029557fe5b14156102d8576102d38583815181106102aa57fe5b6020026020010151600001518684815181106102c257fe5b602002602001015160400151610400565b610388565b60018160028111156102e657fe5b1415610324576102d38583815181106102fb57fe5b60200260200101516000015186848151811061031357fe5b602002602001015160400151610516565b600281600281111561033257fe5b1415610370576102d385838151811061034757fe5b60200260200101516000015186848151811061035f57fe5b602002602001015160400151610636565b60405162461bcd60e51b815260040161024990611106565b50600101610257565b507f8faa70878671ccd212d20771b795c50af8fd3ff6cf27f4bde57e5d4de0aeb6738383836040516103c593929190610e35565b60405180910390a16103d782826106f1565b505050565b7fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131c90565b60008151116104215760405162461bcd60e51b81526004016102499061104c565b600061042b6103dc565b90506001600160a01b0383166104535760405162461bcd60e51b815260040161024990611163565b6001600160a01b03831660009081526001820160205260409020546bffffffffffffffffffffffff811661048b5761048b8285610818565b60005b835181101561050f5760008482815181106104a557fe5b6020908102919091018101516001600160e01b031981166000908152918690526040909120549091506001600160a01b031680156104f55760405162461bcd60e51b81526004016102499061127a565b6105018583868a61088f565b50506001918201910161048e565b5050505050565b60008151116105375760405162461bcd60e51b81526004016102499061104c565b60006105416103dc565b90506001600160a01b0383166105695760405162461bcd60e51b815260040161024990611163565b6001600160a01b03831660009081526001820160205260409020546bffffffffffffffffffffffff81166105a1576105a18285610818565b60005b835181101561050f5760008482815181106105bb57fe5b6020908102919091018101516001600160e01b031981166000908152918690526040909120549091506001600160a01b039081169087168114156106115760405162461bcd60e51b8152600401610249906112d7565b61061c858284610941565b6106288583868a61088f565b5050600191820191016105a4565b60008151116106575760405162461bcd60e51b81526004016102499061104c565b60006106616103dc565b90506001600160a01b0383161561068a5760405162461bcd60e51b815260040161024990611334565b60005b82518110156106eb5760008382815181106106a457fe5b6020908102919091018101516001600160e01b031981166000908152918590526040909120549091506001600160a01b03166106e1848284610941565b505060010161068d565b50505050565b6001600160a01b0382166107235780511561071e5760405162461bcd60e51b815260040161024990610f35565b610814565b60008151116107445760405162461bcd60e51b8152600401610249906111c0565b6001600160a01b038216301461077657610776826040518060600160405280602881526020016114c160289139610c50565b600080836001600160a01b0316836040516107919190610e19565b600060405180830381855af49150503d80600081146107cc576040519150601f19603f3d011682016040523d82523d6000602084013e6107d1565b606091505b5091509150816106eb578051156107fc578060405162461bcd60e51b81526004016102499190610f1b565b60405162461bcd60e51b815260040161024990610f92565b5050565b61083a816040518060600160405280602481526020016114e960249139610c50565b6002820180546001600160a01b03909216600081815260019485016020908152604082208601859055948401835591825292902001805473ffffffffffffffffffffffffffffffffffffffff19169091179055565b6001600160e01b0319831660008181526020868152604080832080546bffffffffffffffffffffffff909716600160a01b026001600160a01b0397881617815594909516808352600180890183529583208054968701815583528183206008870401805460e09890981c60046007909816979097026101000a96870263ffffffff90970219909716959095179095555292909152815473ffffffffffffffffffffffffffffffffffffffff1916179055565b6001600160a01b0382166109675760405162461bcd60e51b8152600401610249906110a9565b6001600160a01b0382163014156109905760405162461bcd60e51b81526004016102499061121d565b6001600160e01b03198116600090815260208481526040808320546001600160a01b03861684526001870190925290912054600160a01b9091046bffffffffffffffffffffffff169060001901808214610ac6576001600160a01b03841660009081526001860160205260408120805483908110610a0a57fe5b600091825260208083206008830401546001600160a01b038916845260018a019091526040909220805460079092166004026101000a90920460e01b925082919085908110610a5557fe5b600091825260208083206008830401805463ffffffff60079094166004026101000a938402191660e09590951c929092029390931790556001600160e01b03199290921682528690526040902080546001600160a01b0316600160a01b6bffffffffffffffffffffffff8516021790555b6001600160a01b03841660009081526001860160205260409020805480610ae957fe5b60008281526020808220600860001990940193840401805463ffffffff600460078716026101000a0219169055919092556001600160e01b03198516825286905260408120558061050f5760028501546001600160a01b038516600090815260018781016020526040909120015460001990910190808214610bed576000876002018381548110610b7657fe5b6000918252602090912001546002890180546001600160a01b039092169250829184908110610ba157fe5b6000918252602080832091909101805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b03948516179055929091168152600189810190925260409020018190555b86600201805480610bfa57fe5b600082815260208082208301600019908101805473ffffffffffffffffffffffffffffffffffffffff191690559092019092556001600160a01b0388168252600189810190915260408220015550505050505050565b813b81816106eb5760405162461bcd60e51b81526004016102499190610f1b565b80356001600160a01b0381168114610c8857600080fd5b919050565b600082601f830112610c9d578081fd5b81356020610cb2610cad836113b5565b611391565b8281528181019085830183850287018401881015610cce578586fd5b855b85811015610d015781356001600160e01b031981168114610cef578788fd5b84529284019290840190600101610cd0565b5090979650505050505050565b600080600080600060608688031215610d25578081fd5b853567ffffffffffffffff80821115610d3c578283fd5b818801915088601f830112610d4f578283fd5b813581811115610d5d578384fd5b60208a818284028601011115610d71578485fd5b8084019850819750610d84818b01610c71565b965060408a0135935082841115610d99578485fd5b838a0193508a601f850112610dac578485fd5b8335915082821115610dbc578485fd5b8a81838601011115610dcc578485fd5b979a96995094975050909401935090919050565b6001600160a01b03169052565b60008151808452610e05816020860160208601611494565b601f01601f19169290920160200192915050565b60008251610e2b818460208701611494565b9190910192915050565b606080825284518282018190526000919060809081850190602080820287018401818b01875b84811015610eec57607f198a840301865281518884016001600160a01b0382511685528582015160038110610e8c57fe5b858701526040918201519185018a9052815190819052908501908a90898601905b80831015610ed75783516001600160e01b0319168252928701926001929092019190870190610ead565b50978601979450505090830190600101610e5b565b5050610efa8289018b610de0565b8781036040890152610f0c818a610ded565b9b9a5050505050505050505050565b600060208252610f2e6020830184610ded565b9392505050565b6020808252603c908201527f4c69624469616d6f6e644375743a205f696e697420697320616464726573732860408201527f3029206275745f63616c6c64617461206973206e6f7420656d70747900000000606082015260800190565b60208082526026908201527f4c69624469616d6f6e644375743a205f696e69742066756e6374696f6e20726560408201527f7665727465640000000000000000000000000000000000000000000000000000606082015260800190565b60208082526022908201527f4c69624469616d6f6e643a204d75737420626520636f6e7472616374206f776e60408201527f6572000000000000000000000000000000000000000000000000000000000000606082015260800190565b6020808252602b908201527f4c69624469616d6f6e644375743a204e6f2073656c6563746f727320696e206660408201527f6163657420746f20637574000000000000000000000000000000000000000000606082015260800190565b60208082526037908201527f4c69624469616d6f6e644375743a2043616e27742072656d6f76652066756e6360408201527f74696f6e207468617420646f65736e2774206578697374000000000000000000606082015260800190565b60208082526027908201527f4c69624469616d6f6e644375743a20496e636f7272656374204661636574437560408201527f74416374696f6e00000000000000000000000000000000000000000000000000606082015260800190565b6020808252602c908201527f4c69624469616d6f6e644375743a204164642066616365742063616e2774206260408201527f6520616464726573732830290000000000000000000000000000000000000000606082015260800190565b6020808252603d908201527f4c69624469616d6f6e644375743a205f63616c6c6461746120697320656d707460408201527f7920627574205f696e6974206973206e6f742061646472657373283029000000606082015260800190565b6020808252602e908201527f4c69624469616d6f6e644375743a2043616e27742072656d6f766520696d6d7560408201527f7461626c652066756e6374696f6e000000000000000000000000000000000000606082015260800190565b60208082526035908201527f4c69624469616d6f6e644375743a2043616e2774206164642066756e6374696f60408201527f6e207468617420616c7265616479206578697374730000000000000000000000606082015260800190565b60208082526038908201527f4c69624469616d6f6e644375743a2043616e2774207265706c6163652066756e60408201527f6374696f6e20776974682073616d652066756e6374696f6e0000000000000000606082015260800190565b60208082526036908201527f4c69624469616d6f6e644375743a2052656d6f7665206661636574206164647260408201527f657373206d757374206265206164647265737328302900000000000000000000606082015260800190565b60405181810167ffffffffffffffff811182821017156113ad57fe5b604052919050565b600067ffffffffffffffff8211156113c957fe5b5060209081020190565b60006113e1610cad846113b5565b8381526020808201919084845b878110156114885781358701606080823603121561140a578788fd5b604080519182019167ffffffffffffffff808411828510171561142957fe5b83835261143585610c71565b825287850135935060038410611449578a8bfd5b838883015282850135935080841115611460578a8bfd5b5061146d36848601610c8d565b918101919091528752505093820193908201906001016113ee565b50919695505050505050565b60005b838110156114af578181015183820152602001611497565b838111156106eb575050600091015256fe4c69624469616d6f6e644375743a205f696e6974206164647265737320686173206e6f20636f64654c69624469616d6f6e644375743a204e657720666163657420686173206e6f20636f6465a26469706673582212201f65bcc2aa6bd112429386cd9feb63f913773cf4154a17f4843d7531c81fb99064736f6c63430007060033

Deployed Bytecode

0x608060405234801561001057600080fd5b506004361061002b5760003560e01c80631f931c1c14610030575b600080fd5b61004361003e366004610d0e565b610045565b005b73aac09eedccf664a9a6a594fc527a0a4ec6cc27886001600160a01b03166339c8e373336000356001600160e01b03191660003660006040518663ffffffff1660e01b815260040180866001600160a01b03168152602001857bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19168152602001806020018381526020018281038252858582818152602001925080828437600081840152601f19601f8201169050808301925050509650505050505050600060405180830381600087803b15801561011957600080fd5b505af115801561012d573d6000803e3d6000fd5b50505050610139610216565b61018361014685876113d3565b8484848080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061025492505050565b604080517f17ee968f000000000000000000000000000000000000000000000000000000008152600080356001600160e01b0319166004830152915173aac09eedccf664a9a6a594fc527a0a4ec6cc2788926317ee968f926024808201939182900301818387803b1580156101f757600080fd5b505af115801561020b573d6000803e3d6000fd5b505050505050505050565b61021e6103dc565b600401546001600160a01b031633146102525760405162461bcd60e51b815260040161024990610fef565b60405180910390fd5b565b60005b835181101561039157600084828151811061026e57fe5b60200260200101516020015190506000600281111561028957fe5b81600281111561029557fe5b14156102d8576102d38583815181106102aa57fe5b6020026020010151600001518684815181106102c257fe5b602002602001015160400151610400565b610388565b60018160028111156102e657fe5b1415610324576102d38583815181106102fb57fe5b60200260200101516000015186848151811061031357fe5b602002602001015160400151610516565b600281600281111561033257fe5b1415610370576102d385838151811061034757fe5b60200260200101516000015186848151811061035f57fe5b602002602001015160400151610636565b60405162461bcd60e51b815260040161024990611106565b50600101610257565b507f8faa70878671ccd212d20771b795c50af8fd3ff6cf27f4bde57e5d4de0aeb6738383836040516103c593929190610e35565b60405180910390a16103d782826106f1565b505050565b7fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131c90565b60008151116104215760405162461bcd60e51b81526004016102499061104c565b600061042b6103dc565b90506001600160a01b0383166104535760405162461bcd60e51b815260040161024990611163565b6001600160a01b03831660009081526001820160205260409020546bffffffffffffffffffffffff811661048b5761048b8285610818565b60005b835181101561050f5760008482815181106104a557fe5b6020908102919091018101516001600160e01b031981166000908152918690526040909120549091506001600160a01b031680156104f55760405162461bcd60e51b81526004016102499061127a565b6105018583868a61088f565b50506001918201910161048e565b5050505050565b60008151116105375760405162461bcd60e51b81526004016102499061104c565b60006105416103dc565b90506001600160a01b0383166105695760405162461bcd60e51b815260040161024990611163565b6001600160a01b03831660009081526001820160205260409020546bffffffffffffffffffffffff81166105a1576105a18285610818565b60005b835181101561050f5760008482815181106105bb57fe5b6020908102919091018101516001600160e01b031981166000908152918690526040909120549091506001600160a01b039081169087168114156106115760405162461bcd60e51b8152600401610249906112d7565b61061c858284610941565b6106288583868a61088f565b5050600191820191016105a4565b60008151116106575760405162461bcd60e51b81526004016102499061104c565b60006106616103dc565b90506001600160a01b0383161561068a5760405162461bcd60e51b815260040161024990611334565b60005b82518110156106eb5760008382815181106106a457fe5b6020908102919091018101516001600160e01b031981166000908152918590526040909120549091506001600160a01b03166106e1848284610941565b505060010161068d565b50505050565b6001600160a01b0382166107235780511561071e5760405162461bcd60e51b815260040161024990610f35565b610814565b60008151116107445760405162461bcd60e51b8152600401610249906111c0565b6001600160a01b038216301461077657610776826040518060600160405280602881526020016114c160289139610c50565b600080836001600160a01b0316836040516107919190610e19565b600060405180830381855af49150503d80600081146107cc576040519150601f19603f3d011682016040523d82523d6000602084013e6107d1565b606091505b5091509150816106eb578051156107fc578060405162461bcd60e51b81526004016102499190610f1b565b60405162461bcd60e51b815260040161024990610f92565b5050565b61083a816040518060600160405280602481526020016114e960249139610c50565b6002820180546001600160a01b03909216600081815260019485016020908152604082208601859055948401835591825292902001805473ffffffffffffffffffffffffffffffffffffffff19169091179055565b6001600160e01b0319831660008181526020868152604080832080546bffffffffffffffffffffffff909716600160a01b026001600160a01b0397881617815594909516808352600180890183529583208054968701815583528183206008870401805460e09890981c60046007909816979097026101000a96870263ffffffff90970219909716959095179095555292909152815473ffffffffffffffffffffffffffffffffffffffff1916179055565b6001600160a01b0382166109675760405162461bcd60e51b8152600401610249906110a9565b6001600160a01b0382163014156109905760405162461bcd60e51b81526004016102499061121d565b6001600160e01b03198116600090815260208481526040808320546001600160a01b03861684526001870190925290912054600160a01b9091046bffffffffffffffffffffffff169060001901808214610ac6576001600160a01b03841660009081526001860160205260408120805483908110610a0a57fe5b600091825260208083206008830401546001600160a01b038916845260018a019091526040909220805460079092166004026101000a90920460e01b925082919085908110610a5557fe5b600091825260208083206008830401805463ffffffff60079094166004026101000a938402191660e09590951c929092029390931790556001600160e01b03199290921682528690526040902080546001600160a01b0316600160a01b6bffffffffffffffffffffffff8516021790555b6001600160a01b03841660009081526001860160205260409020805480610ae957fe5b60008281526020808220600860001990940193840401805463ffffffff600460078716026101000a0219169055919092556001600160e01b03198516825286905260408120558061050f5760028501546001600160a01b038516600090815260018781016020526040909120015460001990910190808214610bed576000876002018381548110610b7657fe5b6000918252602090912001546002890180546001600160a01b039092169250829184908110610ba157fe5b6000918252602080832091909101805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b03948516179055929091168152600189810190925260409020018190555b86600201805480610bfa57fe5b600082815260208082208301600019908101805473ffffffffffffffffffffffffffffffffffffffff191690559092019092556001600160a01b0388168252600189810190915260408220015550505050505050565b813b81816106eb5760405162461bcd60e51b81526004016102499190610f1b565b80356001600160a01b0381168114610c8857600080fd5b919050565b600082601f830112610c9d578081fd5b81356020610cb2610cad836113b5565b611391565b8281528181019085830183850287018401881015610cce578586fd5b855b85811015610d015781356001600160e01b031981168114610cef578788fd5b84529284019290840190600101610cd0565b5090979650505050505050565b600080600080600060608688031215610d25578081fd5b853567ffffffffffffffff80821115610d3c578283fd5b818801915088601f830112610d4f578283fd5b813581811115610d5d578384fd5b60208a818284028601011115610d71578485fd5b8084019850819750610d84818b01610c71565b965060408a0135935082841115610d99578485fd5b838a0193508a601f850112610dac578485fd5b8335915082821115610dbc578485fd5b8a81838601011115610dcc578485fd5b979a96995094975050909401935090919050565b6001600160a01b03169052565b60008151808452610e05816020860160208601611494565b601f01601f19169290920160200192915050565b60008251610e2b818460208701611494565b9190910192915050565b606080825284518282018190526000919060809081850190602080820287018401818b01875b84811015610eec57607f198a840301865281518884016001600160a01b0382511685528582015160038110610e8c57fe5b858701526040918201519185018a9052815190819052908501908a90898601905b80831015610ed75783516001600160e01b0319168252928701926001929092019190870190610ead565b50978601979450505090830190600101610e5b565b5050610efa8289018b610de0565b8781036040890152610f0c818a610ded565b9b9a5050505050505050505050565b600060208252610f2e6020830184610ded565b9392505050565b6020808252603c908201527f4c69624469616d6f6e644375743a205f696e697420697320616464726573732860408201527f3029206275745f63616c6c64617461206973206e6f7420656d70747900000000606082015260800190565b60208082526026908201527f4c69624469616d6f6e644375743a205f696e69742066756e6374696f6e20726560408201527f7665727465640000000000000000000000000000000000000000000000000000606082015260800190565b60208082526022908201527f4c69624469616d6f6e643a204d75737420626520636f6e7472616374206f776e60408201527f6572000000000000000000000000000000000000000000000000000000000000606082015260800190565b6020808252602b908201527f4c69624469616d6f6e644375743a204e6f2073656c6563746f727320696e206660408201527f6163657420746f20637574000000000000000000000000000000000000000000606082015260800190565b60208082526037908201527f4c69624469616d6f6e644375743a2043616e27742072656d6f76652066756e6360408201527f74696f6e207468617420646f65736e2774206578697374000000000000000000606082015260800190565b60208082526027908201527f4c69624469616d6f6e644375743a20496e636f7272656374204661636574437560408201527f74416374696f6e00000000000000000000000000000000000000000000000000606082015260800190565b6020808252602c908201527f4c69624469616d6f6e644375743a204164642066616365742063616e2774206260408201527f6520616464726573732830290000000000000000000000000000000000000000606082015260800190565b6020808252603d908201527f4c69624469616d6f6e644375743a205f63616c6c6461746120697320656d707460408201527f7920627574205f696e6974206973206e6f742061646472657373283029000000606082015260800190565b6020808252602e908201527f4c69624469616d6f6e644375743a2043616e27742072656d6f766520696d6d7560408201527f7461626c652066756e6374696f6e000000000000000000000000000000000000606082015260800190565b60208082526035908201527f4c69624469616d6f6e644375743a2043616e2774206164642066756e6374696f60408201527f6e207468617420616c7265616479206578697374730000000000000000000000606082015260800190565b60208082526038908201527f4c69624469616d6f6e644375743a2043616e2774207265706c6163652066756e60408201527f6374696f6e20776974682073616d652066756e6374696f6e0000000000000000606082015260800190565b60208082526036908201527f4c69624469616d6f6e644375743a2052656d6f7665206661636574206164647260408201527f657373206d757374206265206164647265737328302900000000000000000000606082015260800190565b60405181810167ffffffffffffffff811182821017156113ad57fe5b604052919050565b600067ffffffffffffffff8211156113c957fe5b5060209081020190565b60006113e1610cad846113b5565b8381526020808201919084845b878110156114885781358701606080823603121561140a578788fd5b604080519182019167ffffffffffffffff808411828510171561142957fe5b83835261143585610c71565b825287850135935060038410611449578a8bfd5b838883015282850135935080841115611460578a8bfd5b5061146d36848601610c8d565b918101919091528752505093820193908201906001016113ee565b50919695505050505050565b60005b838110156114af578181015183820152602001611497565b838111156106eb575050600091015256fe4c69624469616d6f6e644375743a205f696e6974206164647265737320686173206e6f20636f64654c69624469616d6f6e644375743a204e657720666163657420686173206e6f20636f6465a26469706673582212201f65bcc2aa6bd112429386cd9feb63f913773cf4154a17f4843d7531c81fb99064736f6c63430007060033

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading
Loading...
Loading

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.