ETH Price: $3,390.88 (+6.24%)
Gas: 26 Gwei

Contract

0xd40f94e5fD70835AC6FC0f0eaf00AEb20767A4E8
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To

There are no matching entries

Please try again later

Latest 1 internal transaction

Advanced mode:
Parent Transaction Hash Block From To
187729282023-12-12 21:57:23215 days ago1702418243  Contract Creation0 ETH
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
DiamondCutFacet

Compiler Version
v0.8.21+commit.d9974bed

Optimization Enabled:
Yes with 100000 runs

Other Settings:
shanghai EvmVersion
File 1 of 3 : DiamondCutFacet.sol
// SPDX-License-Identifier: GPL-3.0-only
pragma solidity 0.8.21;

/**
 * \
 * Author: Nick Mudge <[email protected]> (https://twitter.com/mudgen)
 * EIP-2535 Diamonds: https://eips.ethereum.org/EIPS/eip-2535
 * /*****************************************************************************
 */

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

// Remember to add the loupe functions from DiamondLoupeFacet to the diamond.
// The loupe functions are required by the EIP2535 Diamonds standard

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 3 : IDiamondCut.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.21;
/*
 * 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 3 of 3 : LibDiamond.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.21;

/**
 * \
 * Author: Nick Mudge
 *
 * Implementation of Diamond facet.
 * Uses the diamond-2 version 1.3.4 implementation:
 * https://github.com/mudgen/diamond-2
 *
 * This is gas optimized by reducing storage reads and storage writes.
 * This code is as complex as it is to reduce gas costs.
 * /*****************************************************************************
 */

import {IDiamondCut} from "contracts/interfaces/IDiamondCut.sol";

/* solhint-disable */
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;
        // owner of the contract
        // Used to query if a contract implements an interface.
        // Used to implement ERC-165.
        mapping(bytes4 => bool) supportedInterfaces;
        // The number of function selectors in selectorSlots
        uint16 selectorCount;
        // 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(
            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) {
            enforceHasContractCode(
                _newFacetAddress, "LibDiamondCut: Add facet has no code"
            );
            for (uint256 selectorIndex; selectorIndex < _selectors.length;) {
                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);
                // "_selectorCount & 7" is a gas efficient modulo by eight "_selectorCount % 8"
                // " << 5 is the same as multiplying by 32 ( * 32)
                uint256 selectorInSlotPosition = (_selectorCount & 7) << 5;
                // clear selector position in slot and add selector
                _selectorSlot = (
                    _selectorSlot & ~(CLEAR_SELECTOR_MASK >> selectorInSlotPosition)
                ) | (bytes32(selector) >> selectorInSlotPosition);
                // if slot is full then write it to storage
                if (selectorInSlotPosition == 224) {
                    // "_selectorSlot >> 3" is a gas efficient division by 8 "_selectorSlot / 8"
                    ds.selectorSlots[_selectorCount >> 3] = _selectorSlot;
                    _selectorSlot = 0;
                }
                _selectorCount++;

                unchecked {
                    selectorIndex++;
                }
            }
        } else if (_action == IDiamondCut.FacetCutAction.Replace) {
            enforceHasContractCode(
                _newFacetAddress, "LibDiamondCut: Replace facet has no code"
            );
            for (uint256 selectorIndex; selectorIndex < _selectors.length;) {
                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);

                unchecked {
                    selectorIndex++;
                }
            }
        } else if (_action == IDiamondCut.FacetCutAction.Remove) {
            require(
                _newFacetAddress == address(0),
                "LibDiamondCut: Remove facet address must be address(0)"
            );
            // "_selectorCount >> 3" is a gas efficient division by 8 "_selectorCount / 8"
            uint256 selectorSlotCount = _selectorCount >> 3;
            // "_selectorCount & 7" is a gas efficient modulo by eight "_selectorCount % 8"
            uint256 selectorInSlotIndex = _selectorCount & 7;
            for (uint256 selectorIndex; selectorIndex < _selectors.length;) {
                if (_selectorSlot == 0) {
                    // get last selectorSlot
                    selectorSlotCount--;
                    _selectorSlot = ds.selectorSlots[selectorSlotCount];
                    selectorInSlotIndex = 7;
                } else {
                    selectorInSlotIndex--;
                }
                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
                    // " << 5 is the same as multiplying by 32 ( * 32)
                    lastSelector = bytes4(_selectorSlot << (selectorInSlotIndex << 5));
                    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));
                    // "oldSelectorCount >> 3" is a gas efficient division by 8 "oldSelectorCount / 8"
                    oldSelectorsSlotCount = oldSelectorCount >> 3;
                    // "oldSelectorCount & 7" is a gas efficient modulo by eight "oldSelectorCount % 8"
                    // " << 5 is the same as multiplying by 32 ( * 32)
                    oldSelectorInSlotPosition = (oldSelectorCount & 7) << 5;
                }
                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;
                }

                unchecked {
                    selectorIndex++;
                }
            }
            _selectorCount = selectorSlotCount * 8 + selectorInSlotIndex;
        } 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 == 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);
    }
}

Settings
{
  "remappings": [
    "forge-std/=lib/forge-std/src/",
    "ds-test/=lib/forge-std/lib/ds-test/src/",
    "interfaces/=interfaces/",
    "contracts/=contracts/",
    "test/=test/",
    "test-gas/=test-gas/",
    "deploy/=deploy/",
    "@openzeppelin/=node_modules/@openzeppelin/",
    "@chainlink/=node_modules/@chainlink/",
    "@eth-optimism/=node_modules/@eth-optimism/",
    "@prb/=node_modules/@prb/"
  ],
  "optimizer": {
    "enabled": true,
    "runs": 100000
  },
  "metadata": {
    "useLiteralContent": false,
    "bytecodeHash": "ipfs",
    "appendCBOR": true
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "evmVersion": "shanghai",
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"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"},{"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"}]

608060405234801561000f575f80fd5b506117ec8061001d5f395ff3fe608060405234801561000f575f80fd5b5060043610610029575f3560e01c80631f931c1c1461002d575b5f80fd5b61004061003b366004611107565b610042565b005b61004a61009a565b6100936100578587611278565b8484848080601f0160208091040260200160405190810160405280939291908181526020018383808284375f9201919091525061017092505050565b5050505050565b7fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131c6003015462010000900473ffffffffffffffffffffffffffffffffffffffff16331461016e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f4c69624469616d6f6e643a204d75737420626520636f6e7472616374206f776e60448201527f657200000000000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b565b7fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131f547fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131c9061ffff16805f806101c66008846113f8565b11156101ed57600184015f6101dc600885611438565b81526020019081526020015f205490505b5f5b87518110156102725761025b83838a848151811061020f5761020f61144b565b60200260200101515f01518b858151811061022c5761022c61144b565b6020026020010151602001518c868151811061024a5761024a61144b565b60200260200101516040015161032d565b90935091508061026a81611478565b9150506101ef565b508282146102ab576003840180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00001661ffff84161790555b5f6102b76008846113f8565b11156102df5780600185015f6102ce600886611438565b815260208101919091526040015f20555b7f8faa70878671ccd212d20771b795c50af8fd3ff6cf27f4bde57e5d4de0aeb67387878760405161031293929190611547565b60405180910390a16103248686610da6565b50505050505050565b5f80807fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131c90505f8451116103e3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f4c69624469616d6f6e644375743a204e6f2073656c6563746f727320696e206660448201527f6163657420746f206375740000000000000000000000000000000000000000006064820152608401610165565b5f8560028111156103f6576103f66114af565b036105c15761041d866040518060600160405280602481526020016117436024913961105f565b5f5b84518110156105bb575f85828151811061043b5761043b61144b565b6020908102919091018101517fffffffff0000000000000000000000000000000000000000000000000000000081165f90815291859052604090912054909150606081901c1561050d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603560248201527f4c69624469616d6f6e644375743a2043616e2774206164642066756e6374696f60448201527f6e207468617420616c72656164792065786973747300000000000000000000006064820152608401610165565b7fffffffff000000000000000000000000000000000000000000000000000000008083165f8181526020879052604090207fffffffffffffffffffffffffffffffffffffffff00000000000000000000000060608d901b168e17905560e060058e901b811692831c199c909c1690821c179a81900361059f5760038c901c5f90815260018601602052604081209b909b555b8b6105a981611478565b9c50506001909301925061041f915050565b50610d9a565b60018560028111156105d5576105d56114af565b036108c1576105fc8660405180606001604052806028815260200161178f6028913961105f565b5f5b84518110156105bb575f85828151811061061a5761061a61144b565b6020908102919091018101517fffffffff0000000000000000000000000000000000000000000000000000000081165f90815291859052604090912054909150606081901c3081036106ee576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602f60248201527f4c69624469616d6f6e644375743a2043616e2774207265706c61636520696d6d60448201527f757461626c652066756e6374696f6e00000000000000000000000000000000006064820152608401610165565b8973ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16036107a9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603860248201527f4c69624469616d6f6e644375743a2043616e2774207265706c6163652066756e60448201527f6374696f6e20776974682073616d652066756e6374696f6e00000000000000006064820152608401610165565b73ffffffffffffffffffffffffffffffffffffffff811661084c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603860248201527f4c69624469616d6f6e644375743a2043616e2774207265706c6163652066756e60448201527f6374696f6e207468617420646f65736e277420657869737400000000000000006064820152608401610165565b507fffffffff000000000000000000000000000000000000000000000000000000009091165f9081526020849052604090206bffffffffffffffffffffffff919091167fffffffffffffffffffffffffffffffffffffffff00000000000000000000000060608a901b161790556001016105fe565b60028560028111156108d5576108d56114af565b03610d125773ffffffffffffffffffffffffffffffffffffffff86161561097e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603660248201527f4c69624469616d6f6e644375743a2052656d6f7665206661636574206164647260448201527f657373206d7573742062652061646472657373283029000000000000000000006064820152608401610165565b600388901c600789165f5b8651811015610cf2575f8a90036109c357826109a4816116aa565b5f8181526001870160205260409020549b509350600792506109d19050565b816109cd816116aa565b9250505b5f805f808a85815181106109e7576109e761144b565b6020908102919091018101517fffffffff0000000000000000000000000000000000000000000000000000000081165f908152918a9052604090912054909150606081901c610ab8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603760248201527f4c69624469616d6f6e644375743a2043616e27742072656d6f76652066756e6360448201527f74696f6e207468617420646f65736e27742065786973740000000000000000006064820152608401610165565b30606082901c03610b4b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f4c69624469616d6f6e644375743a2043616e27742072656d6f766520696d6d7560448201527f7461626c652066756e6374696f6e0000000000000000000000000000000000006064820152608401610165565b600587901b8f901b94507fffffffff0000000000000000000000000000000000000000000000000000000080861690831614610be8577fffffffff0000000000000000000000000000000000000000000000000000000085165f90815260208a90526040902080547fffffffffffffffffffffffffffffffffffffffff000000000000000000000000166bffffffffffffffffffffffff83161790555b7fffffffff00000000000000000000000000000000000000000000000000000000919091165f90815260208990526040812055600381901c611fff16925060051b60e0169050858214610c7b575f828152600188016020526040902080547fffffffff0000000000000000000000000000000000000000000000000000000080841c19909116908516831c179055610ccb565b80837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916901c817fffffffff000000000000000000000000000000000000000000000000000000005f1b901c198e16179c505b845f03610ce7575f86815260018801602052604081208190559c505b505050600101610989565b5080610cff8360086116de565b610d0991906116fb565b99505050610d9a565b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602760248201527f4c69624469616d6f6e644375743a20496e636f7272656374204661636574437560448201527f74416374696f6e000000000000000000000000000000000000000000000000006064820152608401610165565b50959694955050505050565b73ffffffffffffffffffffffffffffffffffffffff8216610e5457805115610e50576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603c60248201527f4c69624469616d6f6e644375743a205f696e697420697320616464726573732860448201527f3029206275745f63616c6c64617461206973206e6f7420656d707479000000006064820152608401610165565b5050565b5f815111610ee4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603d60248201527f4c69624469616d6f6e644375743a205f63616c6c6461746120697320656d707460448201527f7920627574205f696e6974206973206e6f7420616464726573732830290000006064820152608401610165565b73ffffffffffffffffffffffffffffffffffffffff82163014610f2357610f23826040518060600160405280602881526020016117676028913961105f565b5f808373ffffffffffffffffffffffffffffffffffffffff1683604051610f4a919061170e565b5f60405180830381855af49150503d805f8114610f82576040519150601f19603f3d011682016040523d82523d5f602084013e610f87565b606091505b5090925090508115155f0361105957805115610fd157806040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101659190611729565b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4c69624469616d6f6e644375743a205f696e69742066756e6374696f6e20726560448201527f76657274656400000000000000000000000000000000000000000000000000006064820152608401610165565b50505050565b813b8181611059576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101659190611729565b803573ffffffffffffffffffffffffffffffffffffffff811681146110bd575f80fd5b919050565b5f8083601f8401126110d2575f80fd5b50813567ffffffffffffffff8111156110e9575f80fd5b602083019150836020828501011115611100575f80fd5b9250929050565b5f805f805f6060868803121561111b575f80fd5b853567ffffffffffffffff80821115611132575f80fd5b818801915088601f830112611145575f80fd5b813581811115611153575f80fd5b8960208260051b8501011115611167575f80fd5b6020830197508096505061117d6020890161109a565b94506040880135915080821115611192575f80fd5b5061119f888289016110c2565b969995985093965092949392505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b6040516060810167ffffffffffffffff81118282101715611200576112006111b0565b60405290565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff8111828210171561124d5761124d6111b0565b604052919050565b5f67ffffffffffffffff82111561126e5761126e6111b0565b5060051b60200190565b5f61128a61128584611255565b611206565b83815260208082019190600586811b8601368111156112a7575f80fd5b865b818110156113be57803567ffffffffffffffff808211156112c9575f8081fd5b818a019150606082360312156112de575f8081fd5b6112e66111dd565b6112ef8361109a565b81528683013560038110611302575f8081fd5b8188015260408381013583811115611319575f8081fd5b939093019236601f85011261132f575f92508283fd5b8335925061133f61128584611255565b83815292871b8401880192888101903685111561135b575f8081fd5b948901945b848610156113a75785357fffffffff0000000000000000000000000000000000000000000000000000000081168114611398575f8081fd5b82529489019490890190611360565b9183019190915250885250509483019483016112a9565b5092979650505050505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b5f82611406576114066113cb565b500690565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f82611446576114466113cb565b500490565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036114a8576114a861140b565b5060010190565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b5f5b838110156114f65781810151838201526020016114de565b50505f910152565b5f81518084526115158160208601602086016114dc565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b5f6060808301818452808751808352608092508286019150828160051b8701016020808b015f5b8481101561166d577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff808a8503018652815188850173ffffffffffffffffffffffffffffffffffffffff825116865284820151600381106115f5577f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b868601526040918201519186018a9052815190819052908401905f90898701905b808310156116585783517fffffffff00000000000000000000000000000000000000000000000000000000168252928601926001929092019190860190611616565b5097850197955050509082019060010161156e565b505073ffffffffffffffffffffffffffffffffffffffff8a1690880152868103604088015261169c81896114fe565b9a9950505050505050505050565b5f816116b8576116b861140b565b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190565b80820281158282048414176116f5576116f561140b565b92915050565b808201808211156116f5576116f561140b565b5f825161171f8184602087016114dc565b9190910192915050565b602081525f61173b60208301846114fe565b939250505056fe4c69624469616d6f6e644375743a2041646420666163657420686173206e6f20636f64654c69624469616d6f6e644375743a205f696e6974206164647265737320686173206e6f20636f64654c69624469616d6f6e644375743a205265706c61636520666163657420686173206e6f20636f6465a2646970667358221220025a353707fced013cf03a2e3b39839b0ef88848194bcd32c58fb6fb826ed54564736f6c63430008150033

Deployed Bytecode

0x608060405234801561000f575f80fd5b5060043610610029575f3560e01c80631f931c1c1461002d575b5f80fd5b61004061003b366004611107565b610042565b005b61004a61009a565b6100936100578587611278565b8484848080601f0160208091040260200160405190810160405280939291908181526020018383808284375f9201919091525061017092505050565b5050505050565b7fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131c6003015462010000900473ffffffffffffffffffffffffffffffffffffffff16331461016e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f4c69624469616d6f6e643a204d75737420626520636f6e7472616374206f776e60448201527f657200000000000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b565b7fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131f547fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131c9061ffff16805f806101c66008846113f8565b11156101ed57600184015f6101dc600885611438565b81526020019081526020015f205490505b5f5b87518110156102725761025b83838a848151811061020f5761020f61144b565b60200260200101515f01518b858151811061022c5761022c61144b565b6020026020010151602001518c868151811061024a5761024a61144b565b60200260200101516040015161032d565b90935091508061026a81611478565b9150506101ef565b508282146102ab576003840180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00001661ffff84161790555b5f6102b76008846113f8565b11156102df5780600185015f6102ce600886611438565b815260208101919091526040015f20555b7f8faa70878671ccd212d20771b795c50af8fd3ff6cf27f4bde57e5d4de0aeb67387878760405161031293929190611547565b60405180910390a16103248686610da6565b50505050505050565b5f80807fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131c90505f8451116103e3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f4c69624469616d6f6e644375743a204e6f2073656c6563746f727320696e206660448201527f6163657420746f206375740000000000000000000000000000000000000000006064820152608401610165565b5f8560028111156103f6576103f66114af565b036105c15761041d866040518060600160405280602481526020016117436024913961105f565b5f5b84518110156105bb575f85828151811061043b5761043b61144b565b6020908102919091018101517fffffffff0000000000000000000000000000000000000000000000000000000081165f90815291859052604090912054909150606081901c1561050d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603560248201527f4c69624469616d6f6e644375743a2043616e2774206164642066756e6374696f60448201527f6e207468617420616c72656164792065786973747300000000000000000000006064820152608401610165565b7fffffffff000000000000000000000000000000000000000000000000000000008083165f8181526020879052604090207fffffffffffffffffffffffffffffffffffffffff00000000000000000000000060608d901b168e17905560e060058e901b811692831c199c909c1690821c179a81900361059f5760038c901c5f90815260018601602052604081209b909b555b8b6105a981611478565b9c50506001909301925061041f915050565b50610d9a565b60018560028111156105d5576105d56114af565b036108c1576105fc8660405180606001604052806028815260200161178f6028913961105f565b5f5b84518110156105bb575f85828151811061061a5761061a61144b565b6020908102919091018101517fffffffff0000000000000000000000000000000000000000000000000000000081165f90815291859052604090912054909150606081901c3081036106ee576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602f60248201527f4c69624469616d6f6e644375743a2043616e2774207265706c61636520696d6d60448201527f757461626c652066756e6374696f6e00000000000000000000000000000000006064820152608401610165565b8973ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16036107a9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603860248201527f4c69624469616d6f6e644375743a2043616e2774207265706c6163652066756e60448201527f6374696f6e20776974682073616d652066756e6374696f6e00000000000000006064820152608401610165565b73ffffffffffffffffffffffffffffffffffffffff811661084c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603860248201527f4c69624469616d6f6e644375743a2043616e2774207265706c6163652066756e60448201527f6374696f6e207468617420646f65736e277420657869737400000000000000006064820152608401610165565b507fffffffff000000000000000000000000000000000000000000000000000000009091165f9081526020849052604090206bffffffffffffffffffffffff919091167fffffffffffffffffffffffffffffffffffffffff00000000000000000000000060608a901b161790556001016105fe565b60028560028111156108d5576108d56114af565b03610d125773ffffffffffffffffffffffffffffffffffffffff86161561097e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603660248201527f4c69624469616d6f6e644375743a2052656d6f7665206661636574206164647260448201527f657373206d7573742062652061646472657373283029000000000000000000006064820152608401610165565b600388901c600789165f5b8651811015610cf2575f8a90036109c357826109a4816116aa565b5f8181526001870160205260409020549b509350600792506109d19050565b816109cd816116aa565b9250505b5f805f808a85815181106109e7576109e761144b565b6020908102919091018101517fffffffff0000000000000000000000000000000000000000000000000000000081165f908152918a9052604090912054909150606081901c610ab8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603760248201527f4c69624469616d6f6e644375743a2043616e27742072656d6f76652066756e6360448201527f74696f6e207468617420646f65736e27742065786973740000000000000000006064820152608401610165565b30606082901c03610b4b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f4c69624469616d6f6e644375743a2043616e27742072656d6f766520696d6d7560448201527f7461626c652066756e6374696f6e0000000000000000000000000000000000006064820152608401610165565b600587901b8f901b94507fffffffff0000000000000000000000000000000000000000000000000000000080861690831614610be8577fffffffff0000000000000000000000000000000000000000000000000000000085165f90815260208a90526040902080547fffffffffffffffffffffffffffffffffffffffff000000000000000000000000166bffffffffffffffffffffffff83161790555b7fffffffff00000000000000000000000000000000000000000000000000000000919091165f90815260208990526040812055600381901c611fff16925060051b60e0169050858214610c7b575f828152600188016020526040902080547fffffffff0000000000000000000000000000000000000000000000000000000080841c19909116908516831c179055610ccb565b80837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916901c817fffffffff000000000000000000000000000000000000000000000000000000005f1b901c198e16179c505b845f03610ce7575f86815260018801602052604081208190559c505b505050600101610989565b5080610cff8360086116de565b610d0991906116fb565b99505050610d9a565b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602760248201527f4c69624469616d6f6e644375743a20496e636f7272656374204661636574437560448201527f74416374696f6e000000000000000000000000000000000000000000000000006064820152608401610165565b50959694955050505050565b73ffffffffffffffffffffffffffffffffffffffff8216610e5457805115610e50576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603c60248201527f4c69624469616d6f6e644375743a205f696e697420697320616464726573732860448201527f3029206275745f63616c6c64617461206973206e6f7420656d707479000000006064820152608401610165565b5050565b5f815111610ee4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603d60248201527f4c69624469616d6f6e644375743a205f63616c6c6461746120697320656d707460448201527f7920627574205f696e6974206973206e6f7420616464726573732830290000006064820152608401610165565b73ffffffffffffffffffffffffffffffffffffffff82163014610f2357610f23826040518060600160405280602881526020016117676028913961105f565b5f808373ffffffffffffffffffffffffffffffffffffffff1683604051610f4a919061170e565b5f60405180830381855af49150503d805f8114610f82576040519150601f19603f3d011682016040523d82523d5f602084013e610f87565b606091505b5090925090508115155f0361105957805115610fd157806040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101659190611729565b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4c69624469616d6f6e644375743a205f696e69742066756e6374696f6e20726560448201527f76657274656400000000000000000000000000000000000000000000000000006064820152608401610165565b50505050565b813b8181611059576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101659190611729565b803573ffffffffffffffffffffffffffffffffffffffff811681146110bd575f80fd5b919050565b5f8083601f8401126110d2575f80fd5b50813567ffffffffffffffff8111156110e9575f80fd5b602083019150836020828501011115611100575f80fd5b9250929050565b5f805f805f6060868803121561111b575f80fd5b853567ffffffffffffffff80821115611132575f80fd5b818801915088601f830112611145575f80fd5b813581811115611153575f80fd5b8960208260051b8501011115611167575f80fd5b6020830197508096505061117d6020890161109a565b94506040880135915080821115611192575f80fd5b5061119f888289016110c2565b969995985093965092949392505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b6040516060810167ffffffffffffffff81118282101715611200576112006111b0565b60405290565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff8111828210171561124d5761124d6111b0565b604052919050565b5f67ffffffffffffffff82111561126e5761126e6111b0565b5060051b60200190565b5f61128a61128584611255565b611206565b83815260208082019190600586811b8601368111156112a7575f80fd5b865b818110156113be57803567ffffffffffffffff808211156112c9575f8081fd5b818a019150606082360312156112de575f8081fd5b6112e66111dd565b6112ef8361109a565b81528683013560038110611302575f8081fd5b8188015260408381013583811115611319575f8081fd5b939093019236601f85011261132f575f92508283fd5b8335925061133f61128584611255565b83815292871b8401880192888101903685111561135b575f8081fd5b948901945b848610156113a75785357fffffffff0000000000000000000000000000000000000000000000000000000081168114611398575f8081fd5b82529489019490890190611360565b9183019190915250885250509483019483016112a9565b5092979650505050505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b5f82611406576114066113cb565b500690565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f82611446576114466113cb565b500490565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b5f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036114a8576114a861140b565b5060010190565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b5f5b838110156114f65781810151838201526020016114de565b50505f910152565b5f81518084526115158160208601602086016114dc565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b5f6060808301818452808751808352608092508286019150828160051b8701016020808b015f5b8481101561166d577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff808a8503018652815188850173ffffffffffffffffffffffffffffffffffffffff825116865284820151600381106115f5577f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b868601526040918201519186018a9052815190819052908401905f90898701905b808310156116585783517fffffffff00000000000000000000000000000000000000000000000000000000168252928601926001929092019190860190611616565b5097850197955050509082019060010161156e565b505073ffffffffffffffffffffffffffffffffffffffff8a1690880152868103604088015261169c81896114fe565b9a9950505050505050505050565b5f816116b8576116b861140b565b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190565b80820281158282048414176116f5576116f561140b565b92915050565b808201808211156116f5576116f561140b565b5f825161171f8184602087016114dc565b9190910192915050565b602081525f61173b60208301846114fe565b939250505056fe4c69624469616d6f6e644375743a2041646420666163657420686173206e6f20636f64654c69624469616d6f6e644375743a205f696e6974206164647265737320686173206e6f20636f64654c69624469616d6f6e644375743a205265706c61636520666163657420686173206e6f20636f6465a2646970667358221220025a353707fced013cf03a2e3b39839b0ef88848194bcd32c58fb6fb826ed54564736f6c63430008150033

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
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.