ETH Price: $2,010.18 (-2.56%)

Contract

0xfC6dD98F962BB487289C8AD4F3a2732972A1AD34

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

Parent Transaction Hash Block From To
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
DiamondCutFacet

Compiler Version
v0.8.22+commit.4fc1097e

Optimization Enabled:
Yes with 1000000 runs

Other Settings:
default evmVersion
File 1 of 3 : DiamondCutFacet.sol
// SPDX-License-Identifier: MIT
/**
 * Vendored on October 12, 2023 from:
 * https://github.com/mudgen/diamond-3-hardhat/blob/main/contracts/facets/DiamondCutFacet.sol
 */
pragma solidity ^0.8.0;

/**
 * \
 * 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 { LibDiamond } from "../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
/**
 * Vendored on October 12, 2023 from:
 * https://github.com/mudgen/diamond-3-hardhat/blob/main/contracts/interfaces/IDiamondCut.sol
 */
pragma solidity ^0.8.0;

/**
 * \
 * Author: Nick Mudge (https://twitter.com/mudgen)
 * EIP-2535 Diamonds: https://eips.ethereum.org/EIPS/eip-2535
 * /*****************************************************************************
 */
interface IDiamondCut {
    enum FacetCutAction {
        Add,
        Replace,
        Remove
    }
    // Add=0, Replace=1, Remove=2

    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
/**
 * Vendored on October 12, 2023 from:
 * https://github.com/mudgen/diamond-3-hardhat/blob/main/contracts/libraries/LibDiamond.sol
 */
pragma solidity ^0.8.0;

/**
 * \
 * 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";

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

error InitializationFunctionReverted(address _initializationContractAddress, bytes _calldata);

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 enforceIsContractOwner() internal view {
        require(msg.sender == diamondStorage().contractOwner, "LibDiamond: Must be contract owner");
    }

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

    // 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)) {
            return;
        }
        enforceHasContractCode(_init, "LibDiamondCut: _init address has no code");
        (bool success, bytes memory error) = _init.delegatecall(_calldata);
        if (!success) {
            if (error.length > 0) {
                // bubble up error
                /// @solidity memory-safe-assembly
                assembly {
                    let returndata_size := mload(error)
                    revert(add(32, error), returndata_size)
                }
            } else {
                revert InitializationFunctionReverted(_init, _calldata);
            }
        }
    }

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

Settings
{
  "remappings": [
    "@prb/test/=lib/prb-test/src/",
    "forge-std/=lib/forge-std/src/",
    "@openzeppelin/=lib/openzeppelin-contracts/contracts/",
    "@solady/=lib/solady/src/",
    "@create3/=lib/create3-factory/src/",
    "@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/",
    "create3-factory/=lib/create3-factory/",
    "ds-test/=lib/forge-std/lib/ds-test/src/",
    "erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/",
    "openzeppelin-contracts/=lib/openzeppelin-contracts/",
    "prb-test/=lib/prb-test/src/",
    "solady/=lib/solady/",
    "solmate/=lib/create3-factory/lib/solmate/src/"
  ],
  "optimizer": {
    "enabled": true,
    "runs": 1000000
  },
  "metadata": {
    "useLiteralContent": false,
    "bytecodeHash": "none",
    "appendCBOR": false
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "evmVersion": "shanghai",
  "viaIR": true,
  "libraries": {}
}

Contract Security Audit

Contract ABI

API
[{"inputs":[{"internalType":"address","name":"_initializationContractAddress","type":"address"},{"internalType":"bytes","name":"_calldata","type":"bytes"}],"name":"InitializationFunctionReverted","type":"error"},{"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"}]

608080604052346100165761160c908161001b8239f35b5f80fdfe6080806040526004361015610012575f80fd5b5f3560e01c631f931c1c14610025575f80fd5b34610ab95760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610ab95767ffffffffffffffff60043511610ab957366023600435011215610ab957600435600401359067ffffffffffffffff8211610ab9573660248360051b600435010111610ab95773ffffffffffffffffffffffffffffffffffffffff6024351660243503610ab95767ffffffffffffffff60443511610ab957366023604435011215610ab95767ffffffffffffffff6044356004013511610ab95736602460443560040135604435010111610ab95773ffffffffffffffffffffffffffffffffffffffff7fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c132054163303610aea575061015261014d82610bd0565b610b8c565b90602082828152018091602460043501915b60248260051b6004350101831061094057838561018961014d60443560040135610be8565b60443560048101358083529193919060240160208501375f602060443560040135850101525f915b80518310156107d85760206101c68483610c22565b51015160038110156107ab57806103c4575073ffffffffffffffffffffffffffffffffffffffff6101f78483610c22565b5151169160406102078584610c22565b5101519161021783511515610cbf565b610222841515610d4a565b6bffffffffffffffffffffffff6102768573ffffffffffffffffffffffffffffffffffffffff165f527fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131d60205260405f2090565b54169182156103b6575b5f925b84518410156103a1577fffffffff000000000000000000000000000000000000000000000000000000006102b78587610c22565b5116805f527fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131c60205273ffffffffffffffffffffffffffffffffffffffff60405f20541661031d5781610310886001946103159461148e565b610dd5565b930192610283565b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603560248201527f4c69624469616d6f6e644375743a2043616e2774206164642066756e6374696f60448201527f6e207468617420616c72656164792065786973747300000000000000000000006064820152fd5b50949150949250600191505b019190926101b1565b6103bf8561139c565b610280565b919391600181036105be575073ffffffffffffffffffffffffffffffffffffffff6103ef8483610c22565b5151169360406103ff8584610c22565b5101519161040f83511515610cbf565b61041a861515610d4a565b6bffffffffffffffffffffffff61046e8773ffffffffffffffffffffffffffffffffffffffff165f527fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131d60205260405f2090565b54169182156105b0575b5f925b84518410156105a1577fffffffff000000000000000000000000000000000000000000000000000000006104af8587610c22565b5116805f527fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131c60205273ffffffffffffffffffffffffffffffffffffffff60405f2054169189831461051d576103108a828461051061051596600198610fac565b61148e565b93019261047b565b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603860248201527f4c69624469616d6f6e644375743a2043616e2774207265706c6163652066756e60448201527f6374696f6e20776974682073616d652066756e6374696f6e00000000000000006064820152fd5b509491509450600191506103ad565b6105b98761139c565b610478565b9193916002036107275773ffffffffffffffffffffffffffffffffffffffff6105e78483610c22565b5151169160406105f78584610c22565b5101519261060784511515610cbf565b6106a3575f5b835181101561069657806106907fffffffff0000000000000000000000000000000000000000000000000000000061064760019488610c22565b5116805f527fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131c60205273ffffffffffffffffffffffffffffffffffffffff60405f205416610fac565b0161060d565b50926001919492506103ad565b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603660248201527f4c69624469616d6f6e644375743a2052656d6f7665206661636574206164647260448201527f657373206d7573742062652061646472657373283029000000000000000000006064820152fd5b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602760248201527f4c69624469616d6f6e644375743a20496e636f7272656374204661636574437560448201527f74416374696f6e000000000000000000000000000000000000000000000000006064820152fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b8382604051926060840190606085525180915260808085019160808160051b87010193925f905b82821061086a57610868877f8faa70878671ccd212d20771b795c50af8fd3ff6cf27f4bde57e5d4de0aeb6738a8061085d8b73ffffffffffffffffffffffffffffffffffffffff602435166020840152828103604084015285610c63565b0390a1602435610e1f565b005b90919293947fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff808882030182528551606082019073ffffffffffffffffffffffffffffffffffffffff815116835260208101519060038210156107ab576040889160209384870152015193606060408201528451809452019201905f905b80821061090657505050602080600192970192019201909392916107ff565b9091926020806001927fffffffff0000000000000000000000000000000000000000000000000000000087511681520194019201906108e7565b823567ffffffffffffffff8111610ab95760607fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffdc826004350136030112610ab9576040519081606081011067ffffffffffffffff606084011117610abd576060820160405260043581016024013573ffffffffffffffffffffffffffffffffffffffff81169003610ab957600435810160248101358352604401356003811015610ab957602083015260648160043501013567ffffffffffffffff8111610ab95736604382846004350101011215610ab9576024818360043501010135610a2961014d82610bd0565b9260208483815201903660448460051b86846004350101010111610ab95760448482600435010101915b60448460051b8684600435010101018310610a805750505050506040820152815260209283019201610164565b82357fffffffff0000000000000000000000000000000000000000000000000000000081168103610ab957815260209283019201610a53565b5f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b807f08c379a0000000000000000000000000000000000000000000000000000000006084925260206004820152602260248201527f4c69624469616d6f6e643a204d75737420626520636f6e7472616374206f776e60448201527f65720000000000000000000000000000000000000000000000000000000000006064820152fd5b604051906060820182811067ffffffffffffffff821117610abd57604052565b907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f604051930116820182811067ffffffffffffffff821117610abd57604052565b67ffffffffffffffff8111610abd5760051b60200190565b67ffffffffffffffff8111610abd57601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b8051821015610c365760209160051b010190565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b91908251928382525f5b848110610cab5750507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f845f6020809697860101520116010190565b602081830181015184830182015201610c6d565b15610cc657565b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f4c69624469616d6f6e644375743a204e6f2073656c6563746f727320696e206660448201527f6163657420746f206375740000000000000000000000000000000000000000006064820152fd5b15610d5157565b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602c60248201527f4c69624469616d6f6e644375743a204164642066616365742063616e2774206260448201527f65206164647265737328302900000000000000000000000000000000000000006064820152fd5b6bffffffffffffffffffffffff809116908114610df25760010190565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b9073ffffffffffffffffffffffffffffffffffffffff8216918215610f33575f8091610ea2610e4c610b6c565b602881527f4c69624469616d6f6e644375743a205f696e697420616464726573732068617360208201527f206e6f20636f64650000000000000000000000000000000000000000000000006040820152826115c5565b83519060208501905af4913d15610f2b573d92610ec161014d85610be8565b9384523d5f602086013e5b15610ed657505050565b825115610ee557825160208401fd5b610f276040519283927f192105d70000000000000000000000000000000000000000000000000000000084526004840152604060248401526044830190610c63565b0390fd5b606092610ecc565b505050565b9190918054831015610c36575f52601c60205f208360031c019260021b1690565b7fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131e8054821015610c36575f527fb5c239a29faf02594141bbc5e6982a9b85ba2b4d59c3ed3baaf4cb8e5e11cbef01905f90565b73ffffffffffffffffffffffffffffffffffffffff80911691821561131857308314611294577fffffffff00000000000000000000000000000000000000000000000000000000809116805f527fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131c93602090858252604093845f205460a01c96825f527fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131d94858552865f2054927fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff998a8501948511610df25788918789888885036111e9575b9450505050505f52858552865f208054801561115e578a01906110b58282610f38565b63ffffffff82549160031b1b19169055555f5283525f85812055156110dd575b505050505050565b7fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131e948554878101908111610df257825f52848452816001875f2001549180830361118b575b505050855495861561115e575f97600197019161113e83610f59565b909182549160031b1b1916905555855252822001555f80808080806110d5565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603160045260245ffd5b61119490610f59565b90549060031b1c166111d5816111a984610f59565b90919073ffffffffffffffffffffffffffffffffffffffff8084549260031b9316831b921b1916179055565b5f528484526001865f2001555f8181611122565b61121e856112899761123b94845f528087526112078d835f20610f38565b90549060031b1c60e01b9687955f52525f20610f38565b90919063ffffffff83549160031b9260e01c831b921b1916179055565b165f52838752885f209073ffffffffffffffffffffffffffffffffffffffff7fffffffffffffffffffffffff000000000000000000000000000000000000000083549260a01b169116179055565b865f80878988611092565b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f4c69624469616d6f6e644375743a2043616e27742072656d6f766520696d6d7560448201527f7461626c652066756e6374696f6e0000000000000000000000000000000000006064820152fd5b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603760248201527f4c69624469616d6f6e644375743a2043616e27742072656d6f76652066756e6360448201527f74696f6e207468617420646f65736e27742065786973740000000000000000006064820152fd5b6113fd6113a7610b6c565b602481527f4c69624469616d6f6e644375743a204e657720666163657420686173206e6f2060208201527f636f6465000000000000000000000000000000000000000000000000000000006040820152826115c5565b7fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131e9081549173ffffffffffffffffffffffffffffffffffffffff82165f527fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131d60205282600160405f20015568010000000000000000831015610abd57826111a991600161148c95019055610f59565b565b9173ffffffffffffffffffffffffffffffffffffffff7fffffffff00000000000000000000000000000000000000000000000000000000841691825f5261153d7fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131c948560205260405f209073ffffffffffffffffffffffffffffffffffffffff7fffffffffffffffffffffffff000000000000000000000000000000000000000083549260a01b169116179055565b1692835f527fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131d60205260405f209081549168010000000000000000831015610abd578261121e91600161159295018155610f38565b5f5260205260405f20907fffffffffffffffffffffffff0000000000000000000000000000000000000000825416179055565b3b156115ce5750565b610f27906040519182917f08c379a0000000000000000000000000000000000000000000000000000000008352602060048401526024830190610c6356

Deployed Bytecode

0x6080806040526004361015610012575f80fd5b5f3560e01c631f931c1c14610025575f80fd5b34610ab95760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610ab95767ffffffffffffffff60043511610ab957366023600435011215610ab957600435600401359067ffffffffffffffff8211610ab9573660248360051b600435010111610ab95773ffffffffffffffffffffffffffffffffffffffff6024351660243503610ab95767ffffffffffffffff60443511610ab957366023604435011215610ab95767ffffffffffffffff6044356004013511610ab95736602460443560040135604435010111610ab95773ffffffffffffffffffffffffffffffffffffffff7fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c132054163303610aea575061015261014d82610bd0565b610b8c565b90602082828152018091602460043501915b60248260051b6004350101831061094057838561018961014d60443560040135610be8565b60443560048101358083529193919060240160208501375f602060443560040135850101525f915b80518310156107d85760206101c68483610c22565b51015160038110156107ab57806103c4575073ffffffffffffffffffffffffffffffffffffffff6101f78483610c22565b5151169160406102078584610c22565b5101519161021783511515610cbf565b610222841515610d4a565b6bffffffffffffffffffffffff6102768573ffffffffffffffffffffffffffffffffffffffff165f527fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131d60205260405f2090565b54169182156103b6575b5f925b84518410156103a1577fffffffff000000000000000000000000000000000000000000000000000000006102b78587610c22565b5116805f527fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131c60205273ffffffffffffffffffffffffffffffffffffffff60405f20541661031d5781610310886001946103159461148e565b610dd5565b930192610283565b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603560248201527f4c69624469616d6f6e644375743a2043616e2774206164642066756e6374696f60448201527f6e207468617420616c72656164792065786973747300000000000000000000006064820152fd5b50949150949250600191505b019190926101b1565b6103bf8561139c565b610280565b919391600181036105be575073ffffffffffffffffffffffffffffffffffffffff6103ef8483610c22565b5151169360406103ff8584610c22565b5101519161040f83511515610cbf565b61041a861515610d4a565b6bffffffffffffffffffffffff61046e8773ffffffffffffffffffffffffffffffffffffffff165f527fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131d60205260405f2090565b54169182156105b0575b5f925b84518410156105a1577fffffffff000000000000000000000000000000000000000000000000000000006104af8587610c22565b5116805f527fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131c60205273ffffffffffffffffffffffffffffffffffffffff60405f2054169189831461051d576103108a828461051061051596600198610fac565b61148e565b93019261047b565b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603860248201527f4c69624469616d6f6e644375743a2043616e2774207265706c6163652066756e60448201527f6374696f6e20776974682073616d652066756e6374696f6e00000000000000006064820152fd5b509491509450600191506103ad565b6105b98761139c565b610478565b9193916002036107275773ffffffffffffffffffffffffffffffffffffffff6105e78483610c22565b5151169160406105f78584610c22565b5101519261060784511515610cbf565b6106a3575f5b835181101561069657806106907fffffffff0000000000000000000000000000000000000000000000000000000061064760019488610c22565b5116805f527fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131c60205273ffffffffffffffffffffffffffffffffffffffff60405f205416610fac565b0161060d565b50926001919492506103ad565b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603660248201527f4c69624469616d6f6e644375743a2052656d6f7665206661636574206164647260448201527f657373206d7573742062652061646472657373283029000000000000000000006064820152fd5b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602760248201527f4c69624469616d6f6e644375743a20496e636f7272656374204661636574437560448201527f74416374696f6e000000000000000000000000000000000000000000000000006064820152fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b8382604051926060840190606085525180915260808085019160808160051b87010193925f905b82821061086a57610868877f8faa70878671ccd212d20771b795c50af8fd3ff6cf27f4bde57e5d4de0aeb6738a8061085d8b73ffffffffffffffffffffffffffffffffffffffff602435166020840152828103604084015285610c63565b0390a1602435610e1f565b005b90919293947fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff808882030182528551606082019073ffffffffffffffffffffffffffffffffffffffff815116835260208101519060038210156107ab576040889160209384870152015193606060408201528451809452019201905f905b80821061090657505050602080600192970192019201909392916107ff565b9091926020806001927fffffffff0000000000000000000000000000000000000000000000000000000087511681520194019201906108e7565b823567ffffffffffffffff8111610ab95760607fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffdc826004350136030112610ab9576040519081606081011067ffffffffffffffff606084011117610abd576060820160405260043581016024013573ffffffffffffffffffffffffffffffffffffffff81169003610ab957600435810160248101358352604401356003811015610ab957602083015260648160043501013567ffffffffffffffff8111610ab95736604382846004350101011215610ab9576024818360043501010135610a2961014d82610bd0565b9260208483815201903660448460051b86846004350101010111610ab95760448482600435010101915b60448460051b8684600435010101018310610a805750505050506040820152815260209283019201610164565b82357fffffffff0000000000000000000000000000000000000000000000000000000081168103610ab957815260209283019201610a53565b5f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b807f08c379a0000000000000000000000000000000000000000000000000000000006084925260206004820152602260248201527f4c69624469616d6f6e643a204d75737420626520636f6e7472616374206f776e60448201527f65720000000000000000000000000000000000000000000000000000000000006064820152fd5b604051906060820182811067ffffffffffffffff821117610abd57604052565b907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f604051930116820182811067ffffffffffffffff821117610abd57604052565b67ffffffffffffffff8111610abd5760051b60200190565b67ffffffffffffffff8111610abd57601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b8051821015610c365760209160051b010190565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b91908251928382525f5b848110610cab5750507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f845f6020809697860101520116010190565b602081830181015184830182015201610c6d565b15610cc657565b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f4c69624469616d6f6e644375743a204e6f2073656c6563746f727320696e206660448201527f6163657420746f206375740000000000000000000000000000000000000000006064820152fd5b15610d5157565b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602c60248201527f4c69624469616d6f6e644375743a204164642066616365742063616e2774206260448201527f65206164647265737328302900000000000000000000000000000000000000006064820152fd5b6bffffffffffffffffffffffff809116908114610df25760010190565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b9073ffffffffffffffffffffffffffffffffffffffff8216918215610f33575f8091610ea2610e4c610b6c565b602881527f4c69624469616d6f6e644375743a205f696e697420616464726573732068617360208201527f206e6f20636f64650000000000000000000000000000000000000000000000006040820152826115c5565b83519060208501905af4913d15610f2b573d92610ec161014d85610be8565b9384523d5f602086013e5b15610ed657505050565b825115610ee557825160208401fd5b610f276040519283927f192105d70000000000000000000000000000000000000000000000000000000084526004840152604060248401526044830190610c63565b0390fd5b606092610ecc565b505050565b9190918054831015610c36575f52601c60205f208360031c019260021b1690565b7fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131e8054821015610c36575f527fb5c239a29faf02594141bbc5e6982a9b85ba2b4d59c3ed3baaf4cb8e5e11cbef01905f90565b73ffffffffffffffffffffffffffffffffffffffff80911691821561131857308314611294577fffffffff00000000000000000000000000000000000000000000000000000000809116805f527fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131c93602090858252604093845f205460a01c96825f527fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131d94858552865f2054927fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff998a8501948511610df25788918789888885036111e9575b9450505050505f52858552865f208054801561115e578a01906110b58282610f38565b63ffffffff82549160031b1b19169055555f5283525f85812055156110dd575b505050505050565b7fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131e948554878101908111610df257825f52848452816001875f2001549180830361118b575b505050855495861561115e575f97600197019161113e83610f59565b909182549160031b1b1916905555855252822001555f80808080806110d5565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603160045260245ffd5b61119490610f59565b90549060031b1c166111d5816111a984610f59565b90919073ffffffffffffffffffffffffffffffffffffffff8084549260031b9316831b921b1916179055565b5f528484526001865f2001555f8181611122565b61121e856112899761123b94845f528087526112078d835f20610f38565b90549060031b1c60e01b9687955f52525f20610f38565b90919063ffffffff83549160031b9260e01c831b921b1916179055565b165f52838752885f209073ffffffffffffffffffffffffffffffffffffffff7fffffffffffffffffffffffff000000000000000000000000000000000000000083549260a01b169116179055565b865f80878988611092565b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f4c69624469616d6f6e644375743a2043616e27742072656d6f766520696d6d7560448201527f7461626c652066756e6374696f6e0000000000000000000000000000000000006064820152fd5b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603760248201527f4c69624469616d6f6e644375743a2043616e27742072656d6f76652066756e6360448201527f74696f6e207468617420646f65736e27742065786973740000000000000000006064820152fd5b6113fd6113a7610b6c565b602481527f4c69624469616d6f6e644375743a204e657720666163657420686173206e6f2060208201527f636f6465000000000000000000000000000000000000000000000000000000006040820152826115c5565b7fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131e9081549173ffffffffffffffffffffffffffffffffffffffff82165f527fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131d60205282600160405f20015568010000000000000000831015610abd57826111a991600161148c95019055610f59565b565b9173ffffffffffffffffffffffffffffffffffffffff7fffffffff00000000000000000000000000000000000000000000000000000000841691825f5261153d7fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131c948560205260405f209073ffffffffffffffffffffffffffffffffffffffff7fffffffffffffffffffffffff000000000000000000000000000000000000000083549260a01b169116179055565b1692835f527fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131d60205260405f209081549168010000000000000000831015610abd578261121e91600161159295018155610f38565b5f5260205260405f20907fffffffffffffffffffffffff0000000000000000000000000000000000000000825416179055565b3b156115ce5750565b610f27906040519182917f08c379a0000000000000000000000000000000000000000000000000000000008352602060048401526024830190610c6356

Block Transaction Gas Used Reward
view all blocks sequenced

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

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.