MATIC Price: $0.600219 (-1.49%)
Gas: 32 GWei
 
Transaction Hash
Method
Block
From
To
Value
Cancel Listing580881782024-06-12 23:12:192 days ago1718233939IN
0x7B51dBc2...5f57eB821
0 MATIC0.0019628130.00000002
Create Listing580873612024-06-12 22:43:232 days ago1718232203IN
0x7B51dBc2...5f57eB821
0 MATIC0.09947539325.14035492
Cancel Listing580449772024-06-11 21:31:183 days ago1718141478IN
0x7B51dBc2...5f57eB821
0 MATIC0.02590909395.99999963
Cancel Listing580397072024-06-11 18:24:083 days ago1718130248IN
0x7B51dBc2...5f57eB821
0 MATIC0.001964230.02129893
Update Listing579999852024-06-10 18:22:004 days ago1718043720IN
0x7B51dBc2...5f57eB821
0 MATIC0.0026581833
Update Listing579984352024-06-10 17:26:504 days ago1718040410IN
0x7B51dBc2...5f57eB821
0 MATIC0.0025493130.00000003
Cancel Listing578342152024-06-06 12:15:058 days ago1717676105IN
0x7B51dBc2...5f57eB821
0 MATIC0.0019628130.000009
Create Listing578341852024-06-06 12:14:018 days ago1717676041IN
0x7B51dBc2...5f57eB821
0 MATIC0.0083745433.95000661
Update Listing578330372024-06-06 11:33:208 days ago1717673600IN
0x7B51dBc2...5f57eB821
0 MATIC0.0027521730.00000003
Update Listing577905132024-06-05 8:54:0810 days ago1717577648IN
0x7B51dBc2...5f57eB821
0 MATIC0.0026317931.68582173
Fill Listing577580802024-06-04 12:47:3310 days ago1717505253IN
0x7B51dBc2...5f57eB821
0 MATIC0.0044211630.00000003
Fill Listing577525772024-06-04 9:23:0111 days ago1717492981IN
0x7B51dBc2...5f57eB821
0 MATIC0.0044211630.00000041
Update Listing576764472024-06-02 9:18:2513 days ago1717319905IN
0x7B51dBc2...5f57eB821
0 MATIC0.0025489530.00000003
Update Listing576764172024-06-02 9:17:2313 days ago1717319843IN
0x7B51dBc2...5f57eB821
0 MATIC0.0024649530.00000003
Create Listing576763622024-06-02 9:15:2513 days ago1717319725IN
0x7B51dBc2...5f57eB821
0 MATIC0.0074001930.00000003
Fill Listing576758772024-06-02 8:57:1113 days ago1717318631IN
0x7B51dBc2...5f57eB821
0 MATIC0.0040563930.00000003
Create Listing575255912024-05-29 10:50:3517 days ago1716979835IN
0x7B51dBc2...5f57eB821
0 MATIC0.0093035837.71624801
Create Listing574909552024-05-28 13:42:3517 days ago1716903755IN
0x7B51dBc2...5f57eB821
0 MATIC0.0084306230.00810198
Fill Listing573577432024-05-25 2:35:4621 days ago1716604546IN
0x7B51dBc2...5f57eB821
0 MATIC0.004484730.00000463
Fill Listing573576172024-05-25 2:31:2021 days ago1716604280IN
0x7B51dBc2...5f57eB821
0 MATIC0.0043065930.00000863
Fill Listing573575762024-05-25 2:29:5221 days ago1716604192IN
0x7B51dBc2...5f57eB821
0 MATIC0.0048315630.0000068
Update Listing573363512024-05-24 13:21:5521 days ago1716556915IN
0x7B51dBc2...5f57eB821
0 MATIC0.0025062430.48509255
Update Listing573363242024-05-24 13:20:5921 days ago1716556859IN
0x7B51dBc2...5f57eB821
0 MATIC0.0025125930.5624481
Create Listing573363082024-05-24 13:20:2521 days ago1716556825IN
0x7B51dBc2...5f57eB821
0 MATIC0.0086799530.45694693
Update Listing572546722024-05-22 9:24:3424 days ago1716369874IN
0x7B51dBc2...5f57eB821
0 MATIC0.0026330130.00001552
View all transactions

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

Contract Source Code Verified (Exact Match)

Contract Name:
Diamond

Compiler Version
v0.8.20+commit.a1b79de6

Optimization Enabled:
Yes with 1000 runs

Other Settings:
paris EvmVersion
File 1 of 7 : Diamond.sol
// SPDX-License-Identifier: MIT
pragma solidity =0.8.20;

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

 Implementation of a diamond.
///////////////////////////////////////////////////////////////////////*/

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

// When no function exists for function called
error FunctionNotFound(bytes4 _functionSelector);

// This is used in diamond constructor
// more arguments are added to this struct
// this avoids stack too deep errors
struct DiamondArgs {
    address owner;
    address init;
    bytes initCalldata;
}

contract Diamond {
    AppStorage internal s;

    constructor(IDiamondCut.FacetCut[] memory _diamondCut, DiamondArgs memory _args) payable {
        LibDiamond.setContractOwner(_args.owner);
        LibDiamond.diamondCut(_diamondCut, _args.init, _args.initCalldata);

        // Code can be added here to perform actions and set state variables.
    }

    // Find facet for function that is called and execute the
    // function if a facet is found and return any value.
    fallback() external payable {
        LibDiamond.DiamondStorage storage ds;
        bytes32 position = LibDiamond.DIAMOND_STORAGE_POSITION;
        // get diamond storage
        assembly {
            ds.slot := position
        }
        // get facet from function selector
        address facet = ds.facetAddressAndSelectorPosition[msg.sig].facetAddress;
        if (facet == address(0)) {
            revert FunctionNotFound(msg.sig);
        }
        // Execute external function from facet using delegatecall and return any value.
        assembly {
            // copy function selector and any arguments
            calldatacopy(0, 0, calldatasize())
            // execute function call using the facet
            let result := delegatecall(gas(), facet, 0, calldatasize(), 0, 0)
            // get any return value
            returndatacopy(0, 0, returndatasize())
            // return any return value or error back to the caller
            switch result
            case 0 { revert(0, returndatasize()) }
            default { return(0, returndatasize()) }
        }
    }

    receive() external payable { }
}

File 2 of 7 : LibDiamond.sol
// SPDX-License-Identifier: MIT
pragma solidity =0.8.20;

/*///////////////////////////////////////////////////////////////////////
 Author: Nick Mudge <[email protected]> (https://twitter.com/mudgen)
 EIP-2535 Diamonds: https://eips.ethereum.org/EIPS/eip-2535
///////////////////////////////////////////////////////////////////////*/
import { IDiamond } from "../interfaces/IDiamond.sol";
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 NoSelectorsGivenToAdd();
error NotContractOwner(address _user, address _contractOwner);
error NoSelectorsProvidedForFacetForCut(address _facetAddress);
error CannotAddSelectorsToZeroAddress(bytes4[] _selectors);
error NoBytecodeAtAddress(address _contractAddress, string _message);
error IncorrectFacetCutAction(uint8 _action);
error CannotAddFunctionToDiamondThatAlreadyExists(bytes4 _selector);
error CannotReplaceFunctionsFromFacetWithZeroAddress(bytes4[] _selectors);
error CannotReplaceImmutableFunction(bytes4 _selector);
error CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet(bytes4 _selector);
error CannotReplaceFunctionThatDoesNotExists(bytes4 _selector);
error RemoveFacetAddressMustBeZeroAddress(address _facetAddress);
error CannotRemoveFunctionThatDoesNotExist(bytes4 _selector);
error CannotRemoveImmutableFunction(bytes4 _selector);
error InitializationFunctionReverted(address _initializationContractAddress, bytes _calldata);

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

    struct FacetAddressAndSelectorPosition {
        address facetAddress;
        uint16 selectorPosition;
    }

    struct DiamondStorage {
        // function selector => facet address and selector position in selectors array
        mapping(bytes4 => FacetAddressAndSelectorPosition) facetAddressAndSelectorPosition;
        bytes4[] selectors;
        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 {
        if (msg.sender != diamondStorage().contractOwner) {
            revert NotContractOwner(msg.sender, diamondStorage().contractOwner);
        }
    }

    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++) {
            bytes4[] memory functionSelectors = _diamondCut[facetIndex].functionSelectors;
            address facetAddress = _diamondCut[facetIndex].facetAddress;
            if (functionSelectors.length == 0) {
                revert NoSelectorsProvidedForFacetForCut(facetAddress);
            }
            IDiamondCut.FacetCutAction action = _diamondCut[facetIndex].action;
            if (action == IDiamond.FacetCutAction.Add) {
                addFunctions(facetAddress, functionSelectors);
            } else if (action == IDiamond.FacetCutAction.Replace) {
                replaceFunctions(facetAddress, functionSelectors);
            } else if (action == IDiamond.FacetCutAction.Remove) {
                removeFunctions(facetAddress, functionSelectors);
            } else {
                revert IncorrectFacetCutAction(uint8(action));
            }
        }
        emit DiamondCut(_diamondCut, _init, _calldata);
        initializeDiamondCut(_init, _calldata);
    }

    function addFunctions(address _facetAddress, bytes4[] memory _functionSelectors) internal {
        if (_facetAddress == address(0)) {
            revert CannotAddSelectorsToZeroAddress(_functionSelectors);
        }
        DiamondStorage storage ds = diamondStorage();
        uint16 selectorCount = uint16(ds.selectors.length);
        enforceHasContractCode(_facetAddress, "LibDiamondCut: Add facet has no code");
        for (uint256 selectorIndex; selectorIndex < _functionSelectors.length; selectorIndex++) {
            bytes4 selector = _functionSelectors[selectorIndex];
            address oldFacetAddress = ds.facetAddressAndSelectorPosition[selector].facetAddress;
            if (oldFacetAddress != address(0)) {
                revert CannotAddFunctionToDiamondThatAlreadyExists(selector);
            }
            ds.facetAddressAndSelectorPosition[selector] = FacetAddressAndSelectorPosition(_facetAddress, selectorCount);
            ds.selectors.push(selector);
            selectorCount++;
        }
    }

    function replaceFunctions(address _facetAddress, bytes4[] memory _functionSelectors) internal {
        DiamondStorage storage ds = diamondStorage();
        if (_facetAddress == address(0)) {
            revert CannotReplaceFunctionsFromFacetWithZeroAddress(_functionSelectors);
        }
        enforceHasContractCode(_facetAddress, "LibDiamondCut: Replace facet has no code");
        for (uint256 selectorIndex; selectorIndex < _functionSelectors.length; selectorIndex++) {
            bytes4 selector = _functionSelectors[selectorIndex];
            address oldFacetAddress = ds.facetAddressAndSelectorPosition[selector].facetAddress;
            // can't replace immutable functions -- functions defined directly in the diamond in this case
            if (oldFacetAddress == address(this)) {
                revert CannotReplaceImmutableFunction(selector);
            }
            if (oldFacetAddress == _facetAddress) {
                revert CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet(selector);
            }
            if (oldFacetAddress == address(0)) {
                revert CannotReplaceFunctionThatDoesNotExists(selector);
            }
            // replace old facet address
            ds.facetAddressAndSelectorPosition[selector].facetAddress = _facetAddress;
        }
    }

    function removeFunctions(address _facetAddress, bytes4[] memory _functionSelectors) internal {
        DiamondStorage storage ds = diamondStorage();
        uint256 selectorCount = ds.selectors.length;
        if (_facetAddress != address(0)) {
            revert RemoveFacetAddressMustBeZeroAddress(_facetAddress);
        }
        for (uint256 selectorIndex; selectorIndex < _functionSelectors.length; selectorIndex++) {
            bytes4 selector = _functionSelectors[selectorIndex];
            FacetAddressAndSelectorPosition memory oldFacetAddressAndSelectorPosition =
                ds.facetAddressAndSelectorPosition[selector];
            if (oldFacetAddressAndSelectorPosition.facetAddress == address(0)) {
                revert CannotRemoveFunctionThatDoesNotExist(selector);
            }

            // can't remove immutable functions -- functions defined directly in the diamond
            if (oldFacetAddressAndSelectorPosition.facetAddress == address(this)) {
                revert CannotRemoveImmutableFunction(selector);
            }
            // replace selector with last selector
            selectorCount--;
            if (oldFacetAddressAndSelectorPosition.selectorPosition != selectorCount) {
                bytes4 lastSelector = ds.selectors[selectorCount];
                ds.selectors[oldFacetAddressAndSelectorPosition.selectorPosition] = lastSelector;
                ds.facetAddressAndSelectorPosition[lastSelector].selectorPosition =
                    oldFacetAddressAndSelectorPosition.selectorPosition;
            }
            // delete last selector
            ds.selectors.pop();
            delete ds.facetAddressAndSelectorPosition[selector];
        }
    }

    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)
        }
        if (contractSize == 0) {
            revert NoBytecodeAtAddress(_contract, _errorMessage);
        }
    }
}

File 3 of 7 : IDiamondCut.sol
// SPDX-License-Identifier: MIT
pragma solidity =0.8.20;

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

import { IDiamond } from "./IDiamond.sol";

interface IDiamondCut is IDiamond {
    /// @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;
}

File 4 of 7 : IDiamondLoupe.sol
// SPDX-License-Identifier: MIT
pragma solidity =0.8.20;

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

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

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

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

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

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

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

File 5 of 7 : IERC173.sol
// SPDX-License-Identifier: MIT
pragma solidity =0.8.20;

/// @title ERC-173 Contract Ownership Standard
///  Note: the ERC-165 identifier for this interface is 0x7f5828d0
/* is ERC165 */
interface IERC173 {
    /// @dev This emits when ownership of a contract changes.
    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

    /// @notice Get the address of the owner
    /// @return owner_ The address of the owner.
    function owner() external view returns (address owner_);

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

File 6 of 7 : AppStorage.sol
// SPDX-FileCopyrightText: All Rights Reserved, KlimaDAA SWITZERLAND 2023
// SPDX-License-Identifier: UNLICENSED
pragma solidity =0.8.20;

/**
 * @title Account
 * @author Cujo
 * @notice Stores User-level Carbonmark state.
 */

contract Account {
    /**
     * @title State
     * @notice Stores the account level state for a user of Carbonmark
     * @param listingTotalByCredit The current sum total of all listings for a specified total. ERC20 tokens have a
     * dummy ID of 0. ERC1155 tokens have a real ID.
     */
    struct State {
        uint256 totalListings;
        mapping(address token => mapping(uint256 tokenId => uint256 listingTotal)) listingTotalByCredit;
    }
}

/**
 * @title Storage
 * @author Cujo
 * @notice Stores System-level Carbonmark state.
 */

contract Storage {
    /**
     * @title CreditProtocol
     * @notice Enum providing values to check against when a new token is being listed
     */
    enum CreditProtocol {
        UNKNOWN,
        TOUCAN,
        C3,
        ICR
    }

    enum TokenType {
        UNKNOWN,
        ERC20,
        ERC1155
    }

    /**
     * @title CreditListing
     * @notice Stores the detailed data for currently valid listings within this struct
     * @param account The ethereum account that owns this listing
     * @param token The ethereum address of the token listed
     * @param listedAmount The original amount of the token being listed
     * @param remainingAmount The remaining unfilled amount on this listing
     * @param unitPrice The unit price in USDC, expected to be six decimals
     * @param minFillAmount The minimum amount needed to fill any part of this listing
     * @param deadline The last UNIX timestamp for which this listing is valid
     */
    struct CreditListing {
        address account;
        address token;
        uint256 tokenId;
        uint256 originalAmount;
        uint256 remainingAmount;
        uint256 unitPrice;
        uint256 minFillAmount;
        uint256 deadline;
        TokenType tokenType;
    }
}

/**
 * @title AppStorage
 * @author Cujo
 * @notice Defines the state object for Carbonmark
 * @param reentrantStatus An intra-transaction state variable to protect against reentrance.
 * @param tokenCreditProtocol Mapping of a credit token address to the credit protocol that issued it
 * @param creditListings Mapping of a listing ID to the CreditListing struct that holds the details of this listing
 * @param a Mapping to the account level state.
 */
struct AppStorage {
    uint256 reentrantStatus;
    // System tracking
    mapping(address => Storage.CreditProtocol) tokenCreditProtocol;
    // Listing info
    mapping(bytes32 => Storage.CreditListing) creditListings;
    // Individual account information
    mapping(address => Account.State) a;
}

File 7 of 7 : IDiamond.sol
// SPDX-License-Identifier: MIT
pragma solidity =0.8.20;

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

interface IDiamond {
    enum FacetCutAction {
        Add,
        Replace,
        Remove
    }
    // Add=0, Replace=1, Remove=2

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

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

Settings
{
  "remappings": [
    "ds-test/=lib/forge-std/lib/ds-test/src/",
    "forge-std/=lib/forge-std/src/",
    "@openzeppelin/=lib/oz/contracts/",
    "openzeppelin/=lib/oz/contracts/",
    "oz/=lib/oz/",
    "solidity-stringutils/=lib/solidity-stringutils/src/"
  ],
  "optimizer": {
    "enabled": true,
    "runs": 1000
  },
  "metadata": {
    "useLiteralContent": false,
    "bytecodeHash": "ipfs",
    "appendCBOR": true
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "evmVersion": "paris",
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"inputs":[{"components":[{"internalType":"address","name":"facetAddress","type":"address"},{"internalType":"enum IDiamond.FacetCutAction","name":"action","type":"uint8"},{"internalType":"bytes4[]","name":"functionSelectors","type":"bytes4[]"}],"internalType":"struct IDiamond.FacetCut[]","name":"_diamondCut","type":"tuple[]"},{"components":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"init","type":"address"},{"internalType":"bytes","name":"initCalldata","type":"bytes"}],"internalType":"struct DiamondArgs","name":"_args","type":"tuple"}],"stateMutability":"payable","type":"constructor"},{"inputs":[{"internalType":"bytes4","name":"_selector","type":"bytes4"}],"name":"CannotAddFunctionToDiamondThatAlreadyExists","type":"error"},{"inputs":[{"internalType":"bytes4[]","name":"_selectors","type":"bytes4[]"}],"name":"CannotAddSelectorsToZeroAddress","type":"error"},{"inputs":[{"internalType":"bytes4","name":"_selector","type":"bytes4"}],"name":"CannotRemoveFunctionThatDoesNotExist","type":"error"},{"inputs":[{"internalType":"bytes4","name":"_selector","type":"bytes4"}],"name":"CannotRemoveImmutableFunction","type":"error"},{"inputs":[{"internalType":"bytes4","name":"_selector","type":"bytes4"}],"name":"CannotReplaceFunctionThatDoesNotExists","type":"error"},{"inputs":[{"internalType":"bytes4","name":"_selector","type":"bytes4"}],"name":"CannotReplaceFunctionWithTheSameFunctionFromTheSameFacet","type":"error"},{"inputs":[{"internalType":"bytes4[]","name":"_selectors","type":"bytes4[]"}],"name":"CannotReplaceFunctionsFromFacetWithZeroAddress","type":"error"},{"inputs":[{"internalType":"bytes4","name":"_selector","type":"bytes4"}],"name":"CannotReplaceImmutableFunction","type":"error"},{"inputs":[{"internalType":"bytes4","name":"_functionSelector","type":"bytes4"}],"name":"FunctionNotFound","type":"error"},{"inputs":[{"internalType":"uint8","name":"_action","type":"uint8"}],"name":"IncorrectFacetCutAction","type":"error"},{"inputs":[{"internalType":"address","name":"_initializationContractAddress","type":"address"},{"internalType":"bytes","name":"_calldata","type":"bytes"}],"name":"InitializationFunctionReverted","type":"error"},{"inputs":[{"internalType":"address","name":"_contractAddress","type":"address"},{"internalType":"string","name":"_message","type":"string"}],"name":"NoBytecodeAtAddress","type":"error"},{"inputs":[{"internalType":"address","name":"_facetAddress","type":"address"}],"name":"NoSelectorsProvidedForFacetForCut","type":"error"},{"inputs":[{"internalType":"address","name":"_facetAddress","type":"address"}],"name":"RemoveFacetAddressMustBeZeroAddress","type":"error"},{"anonymous":false,"inputs":[{"components":[{"internalType":"address","name":"facetAddress","type":"address"},{"internalType":"enum IDiamond.FacetCutAction","name":"action","type":"uint8"},{"internalType":"bytes4[]","name":"functionSelectors","type":"bytes4[]"}],"indexed":false,"internalType":"struct IDiamond.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":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"stateMutability":"payable","type":"fallback"},{"stateMutability":"payable","type":"receive"}]

60806040526040516110a93803806110a983398101604081905261002291610ad1565b805161002d9061004d565b61004682826020015183604001516100d060201b60201c565b5050610eb7565b7fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131f80546001600160a01b031981166001600160a01b03848116918217909355604051600080516020610ff5833981519152939092169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3505050565b60005b835181101561023a5760008482815181106100f0576100f0610c72565b6020026020010151604001519050600085838151811061011257610112610c72565b602002602001015160000151905081516000036101525760405163e767f91f60e01b81526001600160a01b03821660048201526024015b60405180910390fd5b600086848151811061016657610166610c72565b60200260200101516020015190506000600281111561018757610187610c88565b81600281111561019957610199610c88565b036101ad576101a88284610285565b610224565b60018160028111156101c1576101c1610c88565b036101d0576101a88284610438565b60028160028111156101e4576101e4610c88565b036101f3576101a882846105cb565b80600281111561020557610205610c88565b604051633ff4d20f60e11b815260ff9091166004820152602401610149565b505050808061023290610cb4565b9150506100d3565b507f8faa70878671ccd212d20771b795c50af8fd3ff6cf27f4bde57e5d4de0aeb67383838360405161026e93929190610d3e565b60405180910390a16102808282610854565b505050565b6001600160a01b0382166102ae57806040516302b8da0760e21b81526004016101499190610e07565b6000805160206110618339815191525460408051606081019091526024808252600080516020610ff583398151915292916102f391869190611015602083013961091a565b60005b835181101561043157600084828151811061031357610313610c72565b6020908102919091018101516001600160e01b031981166000908152918690526040909120549091506001600160a01b031680156103705760405163ebbf5d0760e01b81526001600160e01b031983166004820152602401610149565b6040805180820182526001600160a01b03808a16825261ffff80881660208085019182526001600160e01b0319881660009081528b8252958620945185549251909316600160a01b026001600160b01b0319909216929093169190911717909155600180880180549182018155835291206008820401805460e085901c60046007909416939093026101000a92830263ffffffff90930219169190911790558361041981610e21565b9450505050808061042990610cb4565b9150506102f6565b5050505050565b600080516020610ff58339815191526001600160a01b038316610470578160405163cd98a96f60e01b81526004016101499190610e07565b610492836040518060600160405280602881526020016110816028913961091a565b60005b82518110156105c55760008382815181106104b2576104b2610c72565b6020908102919091018101516001600160e01b031981166000908152918590526040909120549091506001600160a01b031630810361051057604051632901806d60e11b81526001600160e01b031983166004820152602401610149565b856001600160a01b0316816001600160a01b03160361054e57604051631ac6ce8d60e11b81526001600160e01b031983166004820152602401610149565b6001600160a01b03811661058157604051637479f93960e01b81526001600160e01b031983166004820152602401610149565b506001600160e01b031916600090815260208390526040902080546001600160a01b0319166001600160a01b038616179055806105bd81610cb4565b915050610495565b50505050565b60008051602061106183398151915254600080516020610ff5833981519152906001600160a01b0384161561061e5760405163d091bc8160e01b81526001600160a01b0385166004820152602401610149565b60005b835181101561043157600084828151811061063e5761063e610c72565b6020908102919091018101516001600160e01b0319811660009081528683526040908190208151808301909252546001600160a01b038116808352600160a01b90910461ffff1693820193909352909250906106b957604051637a08a22d60e01b81526001600160e01b031983166004820152602401610149565b8051306001600160a01b03909116036106f157604051630df5fd6160e31b81526001600160e01b031983166004820152602401610149565b836106fb81610e42565b94505083816020015161ffff16146107d957600085600101858154811061072457610724610c72565b90600052602060002090600891828204019190066004029054906101000a900460e01b90508086600101836020015161ffff168154811061076757610767610c72565b600091825260208083206008830401805463ffffffff60079094166004026101000a938402191660e09590951c92909202939093179055838201516001600160e01b03199390931681529087905260409020805461ffff60a01b1916600160a01b61ffff909316929092029190911790555b846001018054806107ec576107ec610e59565b60008281526020808220600860001990940193840401805463ffffffff600460078716026101000a0219169055919092556001600160e01b0319909316815291859052506040902080546001600160b01b03191690558061084c81610cb4565b915050610621565b6001600160a01b038216610866575050565b610888826040518060600160405280602881526020016110396028913961091a565b600080836001600160a01b0316836040516108a39190610e6f565b600060405180830381855af49150503d80600081146108de576040519150601f19603f3d011682016040523d82523d6000602084013e6108e3565b606091505b5091509150816105c5578051156108fd5780518082602001fd5b838360405163192105d760e01b8152600401610149929190610e8b565b813b600081900361028057828260405163919834b960e01b8152600401610149929190610e8b565b634e487b7160e01b600052604160045260246000fd5b604051606081016001600160401b038111828210171561097a5761097a610942565b60405290565b604051601f8201601f191681016001600160401b03811182821017156109a8576109a8610942565b604052919050565b60006001600160401b038211156109c9576109c9610942565b5060051b60200190565b80516001600160a01b03811681146109ea57600080fd5b919050565b60005b83811015610a0a5781810151838201526020016109f2565b50506000910152565b600060608284031215610a2557600080fd5b610a2d610958565b9050610a38826109d3565b81526020610a478184016109d3565b8282015260408301516001600160401b0380821115610a6557600080fd5b818501915085601f830112610a7957600080fd5b815181811115610a8b57610a8b610942565b610a9d601f8201601f19168501610980565b91508082528684828501011115610ab357600080fd5b610ac2818584018686016109ef565b50604084015250909392505050565b60008060408385031215610ae457600080fd5b82516001600160401b0380821115610afb57600080fd5b818501915085601f830112610b0f57600080fd5b81516020610b24610b1f836109b0565b610980565b82815260059290921b84018101918181019089841115610b4357600080fd5b8286015b84811015610c4157805186811115610b5e57600080fd5b87016060818d03601f19011215610b7457600080fd5b610b7c610958565b610b878683016109d3565b8152604082015160038110610b9b57600080fd5b81870152606082015188811115610bb157600080fd5b8083019250508c603f830112610bc657600080fd5b85820151610bd6610b1f826109b0565b81815260059190911b830160400190878101908f831115610bf657600080fd5b6040850194505b82851015610c2c5784516001600160e01b031981168114610c1d57600080fd5b82529388019390880190610bfd565b60408401525050845250918301918301610b47565b5091880151919650909350505080821115610c5b57600080fd5b50610c6885828601610a13565b9150509250929050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052602160045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600060018201610cc657610cc6610c9e565b5060010190565b600081518084526020808501945080840160005b83811015610d075781516001600160e01b03191687529582019590820190600101610ce1565b509495945050505050565b60008151808452610d2a8160208601602086016109ef565b601f01601f19169290920160200192915050565b6000606080830181845280875180835260808601915060808160051b87010192506020808a016000805b84811015610dd757898703607f19018652825180516001600160a01b031688528481015160038110610da857634e487b7160e01b84526021600452602484fd5b88860152604090810151908801899052610dc489890182610ccd565b9750509483019491830191600101610d68565b5050506001600160a01b0389169087015250508381036040850152610dfc8186610d12565b979650505050505050565b602081526000610e1a6020830184610ccd565b9392505050565b600061ffff808316818103610e3857610e38610c9e565b6001019392505050565b600081610e5157610e51610c9e565b506000190190565b634e487b7160e01b600052603160045260246000fd5b60008251610e818184602087016109ef565b9190910192915050565b6001600160a01b0383168152604060208201819052600090610eaf90830184610d12565b949350505050565b61012f80610ec66000396000f3fe608060405236600a57005b600080357fffffffff000000000000000000000000000000000000000000000000000000001681527fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131c6020819052604090912054819073ffffffffffffffffffffffffffffffffffffffff168060d6576040517f5416eb980000000000000000000000000000000000000000000000000000000081527fffffffff0000000000000000000000000000000000000000000000000000000060003516600482015260240160405180910390fd5b3660008037600080366000845af43d6000803e80801560f4573d6000f35b3d6000fdfea26469706673582212205402da28629df4dee599262396698f912954d547c34e6fc31a3aa416ddd4948d64736f6c63430008140033c8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131c4c69624469616d6f6e644375743a2041646420666163657420686173206e6f20636f64654c69624469616d6f6e644375743a205f696e6974206164647265737320686173206e6f20636f6465c8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131d4c69624469616d6f6e644375743a205265706c61636520666163657420686173206e6f20636f64650000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000050000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000012000000000000000000000000000000000000000000000000000000000000002400000000000000000000000000000000000000000000000000000000000000300000000000000000000000000ef8695e53e4d562eb9404b05e6fbbe70bf30ee9d0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000011f931c1c00000000000000000000000000000000000000000000000000000000000000000000000000000000828b50b86f58f64a89e45f1d0b888b36cdca907b000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000005cdffacc60000000000000000000000000000000000000000000000000000000052ef6b2c00000000000000000000000000000000000000000000000000000000adfca15e000000000000000000000000000000000000000000000000000000007a0ed6270000000000000000000000000000000000000000000000000000000001ffc9a70000000000000000000000000000000000000000000000000000000000000000000000000000000044adc3f9a68b8e14bb31a253064afda9ecae330e0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000028da5cb5b00000000000000000000000000000000000000000000000000000000f2fde38b000000000000000000000000000000000000000000000000000000000000000000000000000000006febc1e43d75f2c414eb63e3743bf4da8661a7500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000099299e552000000000000000000000000000000000000000000000000000000009057f289000000000000000000000000000000000000000000000000000000001d72b53700000000000000000000000000000000000000000000000000000000fa7ab3af000000000000000000000000000000000000000000000000000000006a742eed00000000000000000000000000000000000000000000000000000000f611273f00000000000000000000000000000000000000000000000000000000c618d0ec0000000000000000000000000000000000000000000000000000000081d0f1d3000000000000000000000000000000000000000000000000000000005d984e9400000000000000000000000000000000000000000000000000000000000000000000000000000000cb3d31dcad4047b82ab49202df1c5fdbf79e0639000000000000000000000000799d30da32689167c54ac7a4e33f19a4922c24a400000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000004e1c7392a00000000000000000000000000000000000000000000000000000000

Deployed Bytecode

0x608060405236600a57005b600080357fffffffff000000000000000000000000000000000000000000000000000000001681527fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131c6020819052604090912054819073ffffffffffffffffffffffffffffffffffffffff168060d6576040517f5416eb980000000000000000000000000000000000000000000000000000000081527fffffffff0000000000000000000000000000000000000000000000000000000060003516600482015260240160405180910390fd5b3660008037600080366000845af43d6000803e80801560f4573d6000f35b3d6000fdfea26469706673582212205402da28629df4dee599262396698f912954d547c34e6fc31a3aa416ddd4948d64736f6c63430008140033

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

0000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000050000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000012000000000000000000000000000000000000000000000000000000000000002400000000000000000000000000000000000000000000000000000000000000300000000000000000000000000ef8695e53e4d562eb9404b05e6fbbe70bf30ee9d0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000011f931c1c00000000000000000000000000000000000000000000000000000000000000000000000000000000828b50b86f58f64a89e45f1d0b888b36cdca907b000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000005cdffacc60000000000000000000000000000000000000000000000000000000052ef6b2c00000000000000000000000000000000000000000000000000000000adfca15e000000000000000000000000000000000000000000000000000000007a0ed6270000000000000000000000000000000000000000000000000000000001ffc9a70000000000000000000000000000000000000000000000000000000000000000000000000000000044adc3f9a68b8e14bb31a253064afda9ecae330e0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000028da5cb5b00000000000000000000000000000000000000000000000000000000f2fde38b000000000000000000000000000000000000000000000000000000000000000000000000000000006febc1e43d75f2c414eb63e3743bf4da8661a7500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000099299e552000000000000000000000000000000000000000000000000000000009057f289000000000000000000000000000000000000000000000000000000001d72b53700000000000000000000000000000000000000000000000000000000fa7ab3af000000000000000000000000000000000000000000000000000000006a742eed00000000000000000000000000000000000000000000000000000000f611273f00000000000000000000000000000000000000000000000000000000c618d0ec0000000000000000000000000000000000000000000000000000000081d0f1d3000000000000000000000000000000000000000000000000000000005d984e9400000000000000000000000000000000000000000000000000000000000000000000000000000000cb3d31dcad4047b82ab49202df1c5fdbf79e0639000000000000000000000000799d30da32689167c54ac7a4e33f19a4922c24a400000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000004e1c7392a00000000000000000000000000000000000000000000000000000000

-----Decoded View---------------
Arg [0] : _diamondCut (tuple[]): System.Collections.Generic.List`1[Nethereum.ABI.FunctionEncoding.ParameterOutput],System.Collections.Generic.List`1[Nethereum.ABI.FunctionEncoding.ParameterOutput],System.Collections.Generic.List`1[Nethereum.ABI.FunctionEncoding.ParameterOutput],System.Collections.Generic.List`1[Nethereum.ABI.FunctionEncoding.ParameterOutput]
Arg [1] : _args (tuple): System.Collections.Generic.List`1[Nethereum.ABI.FunctionEncoding.ParameterOutput]

-----Encoded View---------------
45 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000040
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000500
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000004
Arg [3] : 0000000000000000000000000000000000000000000000000000000000000080
Arg [4] : 0000000000000000000000000000000000000000000000000000000000000120
Arg [5] : 0000000000000000000000000000000000000000000000000000000000000240
Arg [6] : 0000000000000000000000000000000000000000000000000000000000000300
Arg [7] : 000000000000000000000000ef8695e53e4d562eb9404b05e6fbbe70bf30ee9d
Arg [8] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [9] : 0000000000000000000000000000000000000000000000000000000000000060
Arg [10] : 0000000000000000000000000000000000000000000000000000000000000001
Arg [11] : 1f931c1c00000000000000000000000000000000000000000000000000000000
Arg [12] : 000000000000000000000000828b50b86f58f64a89e45f1d0b888b36cdca907b
Arg [13] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [14] : 0000000000000000000000000000000000000000000000000000000000000060
Arg [15] : 0000000000000000000000000000000000000000000000000000000000000005
Arg [16] : cdffacc600000000000000000000000000000000000000000000000000000000
Arg [17] : 52ef6b2c00000000000000000000000000000000000000000000000000000000
Arg [18] : adfca15e00000000000000000000000000000000000000000000000000000000
Arg [19] : 7a0ed62700000000000000000000000000000000000000000000000000000000
Arg [20] : 01ffc9a700000000000000000000000000000000000000000000000000000000
Arg [21] : 00000000000000000000000044adc3f9a68b8e14bb31a253064afda9ecae330e
Arg [22] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [23] : 0000000000000000000000000000000000000000000000000000000000000060
Arg [24] : 0000000000000000000000000000000000000000000000000000000000000002
Arg [25] : 8da5cb5b00000000000000000000000000000000000000000000000000000000
Arg [26] : f2fde38b00000000000000000000000000000000000000000000000000000000
Arg [27] : 0000000000000000000000006febc1e43d75f2c414eb63e3743bf4da8661a750
Arg [28] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [29] : 0000000000000000000000000000000000000000000000000000000000000060
Arg [30] : 0000000000000000000000000000000000000000000000000000000000000009
Arg [31] : 9299e55200000000000000000000000000000000000000000000000000000000
Arg [32] : 9057f28900000000000000000000000000000000000000000000000000000000
Arg [33] : 1d72b53700000000000000000000000000000000000000000000000000000000
Arg [34] : fa7ab3af00000000000000000000000000000000000000000000000000000000
Arg [35] : 6a742eed00000000000000000000000000000000000000000000000000000000
Arg [36] : f611273f00000000000000000000000000000000000000000000000000000000
Arg [37] : c618d0ec00000000000000000000000000000000000000000000000000000000
Arg [38] : 81d0f1d300000000000000000000000000000000000000000000000000000000
Arg [39] : 5d984e9400000000000000000000000000000000000000000000000000000000
Arg [40] : 000000000000000000000000cb3d31dcad4047b82ab49202df1c5fdbf79e0639
Arg [41] : 000000000000000000000000799d30da32689167c54ac7a4e33f19a4922c24a4
Arg [42] : 0000000000000000000000000000000000000000000000000000000000000060
Arg [43] : 0000000000000000000000000000000000000000000000000000000000000004
Arg [44] : e1c7392a00000000000000000000000000000000000000000000000000000000


Block Transaction Gas Used Reward
view all blocks produced

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

Validator Index Block Amount
View All Withdrawals

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