Source Code
Latest 25 from a total of 225,298 transactions
| Transaction Hash |
|
Block
|
From
|
To
|
|||||
|---|---|---|---|---|---|---|---|---|---|
| Open Session | 44846126 | 13 mins ago | IN | 0 ETH | 0.0000026 | ||||
| Close Session | 44846082 | 14 mins ago | IN | 0 ETH | 0.00000164 | ||||
| Close Session | 44845951 | 18 mins ago | IN | 0 ETH | 0.00000263 | ||||
| Close Session | 44845951 | 18 mins ago | IN | 0 ETH | 0.00000187 | ||||
| Close Session | 44845950 | 18 mins ago | IN | 0 ETH | 0.00000188 | ||||
| Open Session | 44845918 | 19 mins ago | IN | 0 ETH | 0.0000026 | ||||
| Open Session | 44845891 | 20 mins ago | IN | 0 ETH | 0.00000217 | ||||
| Open Session | 44845887 | 20 mins ago | IN | 0 ETH | 0.00000217 | ||||
| Close Session | 44845831 | 22 mins ago | IN | 0 ETH | 0.00000118 | ||||
| Close Session | 44845826 | 23 mins ago | IN | 0 ETH | 0.00000118 | ||||
| Open Session | 44845805 | 23 mins ago | IN | 0 ETH | 0.00000217 | ||||
| Close Session | 44845751 | 25 mins ago | IN | 0 ETH | 0.00000118 | ||||
| Open Session | 44845670 | 28 mins ago | IN | 0 ETH | 0.00000218 | ||||
| Close Session | 44845630 | 29 mins ago | IN | 0 ETH | 0.00000118 | ||||
| Open Session | 44845539 | 32 mins ago | IN | 0 ETH | 0.00000217 | ||||
| Open Session | 44845539 | 32 mins ago | IN | 0 ETH | 0.0000026 | ||||
| Open Session | 44845536 | 32 mins ago | IN | 0 ETH | 0.00000217 | ||||
| Open Session | 44845521 | 33 mins ago | IN | 0 ETH | 0.00000228 | ||||
| Close Session | 44845512 | 33 mins ago | IN | 0 ETH | 0.00000164 | ||||
| Close Session | 44845505 | 33 mins ago | IN | 0 ETH | 0.00000137 | ||||
| Open Session | 44845504 | 33 mins ago | IN | 0 ETH | 0.00000217 | ||||
| Open Session | 44845500 | 33 mins ago | IN | 0 ETH | 0.00000239 | ||||
| Close Session | 44845497 | 33 mins ago | IN | 0 ETH | 0.00000187 | ||||
| Close Session | 44845497 | 33 mins ago | IN | 0 ETH | 0.00000188 | ||||
| Open Session | 44845496 | 34 mins ago | IN | 0 ETH | 0.0000026 |
Cross-Chain Transactions
Loading...
Loading
This contract may be a proxy contract. Click on More Options and select Is this a proxy? to confirm and enable the "Read as Proxy" & "Write as Proxy" tabs.
Contract Name:
LumerinDiamond
Compiler Version
v0.8.24+commit.e11b9ed9
Optimization Enabled:
Yes with 200 runs
Other Settings:
paris EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.24;
import {Context} from "@openzeppelin/contracts/utils/Context.sol";
import {OwnableDiamond} from "@solarity/solidity-lib/diamond/presets/OwnableDiamond.sol";
import {DiamondOwnableStorage, OwnableDiamondStorage} from "./presets/OwnableDiamondStorage.sol";
contract LumerinDiamond is OwnableDiamond, OwnableDiamondStorage {
function __LumerinDiamond_init() external initializer(DIAMOND_OWNABLE_STORAGE_SLOT) {
__DiamondOwnable_init();
}
function _onlyOwner() internal view virtual override(DiamondOwnableStorage, OwnableDiamondStorage) {
OwnableDiamondStorage._onlyOwner();
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)
pragma solidity ^0.8.1;
/**
* @dev Collection of functions related to the address type
*/
library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will return false for the following
* types of addresses:
*
* - an externally-owned account
* - a contract in construction
* - an address where a contract will be created
* - an address where a contract lived, but was destroyed
*
* Furthermore, `isContract` will also return true if the target contract within
* the same transaction is already scheduled for destruction by `SELFDESTRUCT`,
* which only has an effect at the end of a transaction.
* ====
*
* [IMPORTANT]
* ====
* You shouldn't rely on `isContract` to protect against flash loan attacks!
*
* Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
* like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
* constructor.
* ====
*/
function isContract(address account) internal view returns (bool) {
// This method relies on extcodesize/address.code.length, which returns 0
// for contracts in construction, since the code is only stored at the end
// of the constructor execution.
return account.code.length > 0;
}
/**
* @dev Replacement for Solidity's `transfer`: sends `amount` wei to
* `recipient`, forwarding all available gas and reverting on errors.
*
* https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
* of certain opcodes, possibly making contracts go over the 2300 gas limit
* imposed by `transfer`, making them unable to receive funds via
* `transfer`. {sendValue} removes this limitation.
*
* https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].
*
* IMPORTANT: because control is transferred to `recipient`, care must be
* taken to not create reentrancy vulnerabilities. Consider using
* {ReentrancyGuard} or the
* https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
*/
function sendValue(address payable recipient, uint256 amount) internal {
require(address(this).balance >= amount, "Address: insufficient balance");
(bool success, ) = recipient.call{value: amount}("");
require(success, "Address: unable to send value, recipient may have reverted");
}
/**
* @dev Performs a Solidity function call using a low level `call`. A
* plain `call` is an unsafe replacement for a function call: use this
* function instead.
*
* If `target` reverts with a revert reason, it is bubbled up by this
* function (like regular Solidity function calls).
*
* Returns the raw returned data. To convert to the expected return value,
* use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
*
* Requirements:
*
* - `target` must be a contract.
* - calling `target` with `data` must not revert.
*
* _Available since v3.1._
*/
function functionCall(address target, bytes memory data) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0, "Address: low-level call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
* `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but also transferring `value` wei to `target`.
*
* Requirements:
*
* - the calling contract must have an ETH balance of at least `value`.
* - the called Solidity function must be `payable`.
*
* _Available since v3.1._
*/
function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
}
/**
* @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
* with `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCallWithValue(
address target,
bytes memory data,
uint256 value,
string memory errorMessage
) internal returns (bytes memory) {
require(address(this).balance >= value, "Address: insufficient balance for call");
(bool success, bytes memory returndata) = target.call{value: value}(data);
return verifyCallResultFromTarget(target, success, returndata, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/
function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
return functionStaticCall(target, data, "Address: low-level static call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/
function functionStaticCall(
address target,
bytes memory data,
string memory errorMessage
) internal view returns (bytes memory) {
(bool success, bytes memory returndata) = target.staticcall(data);
return verifyCallResultFromTarget(target, success, returndata, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.4._
*/
function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
return functionDelegateCall(target, data, "Address: low-level delegate call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.4._
*/
function functionDelegateCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
(bool success, bytes memory returndata) = target.delegatecall(data);
return verifyCallResultFromTarget(target, success, returndata, errorMessage);
}
/**
* @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling
* the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.
*
* _Available since v4.8._
*/
function verifyCallResultFromTarget(
address target,
bool success,
bytes memory returndata,
string memory errorMessage
) internal view returns (bytes memory) {
if (success) {
if (returndata.length == 0) {
// only check isContract if the call was successful and the return data is empty
// otherwise we already know that it was a contract
require(isContract(target), "Address: call to non-contract");
}
return returndata;
} else {
_revert(returndata, errorMessage);
}
}
/**
* @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the
* revert reason or using the provided one.
*
* _Available since v4.3._
*/
function verifyCallResult(
bool success,
bytes memory returndata,
string memory errorMessage
) internal pure returns (bytes memory) {
if (success) {
return returndata;
} else {
_revert(returndata, errorMessage);
}
}
function _revert(bytes memory returndata, string memory errorMessage) private pure {
// Look for revert reason and bubble it up if present
if (returndata.length > 0) {
// The easiest way to bubble the revert reason is using memory via assembly
/// @solidity memory-safe-assembly
assembly {
let returndata_size := mload(returndata)
revert(add(32, returndata), returndata_size)
}
} else {
revert(errorMessage);
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)
pragma solidity ^0.8.0;
/**
* @dev Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and msg.data, they should not be accessed in such a direct
* manner, since when dealing with meta-transactions the account sending and
* paying for execution may not be the actual sender (as far as an application
* is concerned).
*
* This contract is only required for intermediate, library-like contracts.
*/
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes calldata) {
return msg.data;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (utils/structs/EnumerableSet.sol)
// This file was procedurally generated from scripts/generate/templates/EnumerableSet.js.
pragma solidity ^0.8.0;
/**
* @dev Library for managing
* https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
* types.
*
* Sets have the following properties:
*
* - Elements are added, removed, and checked for existence in constant time
* (O(1)).
* - Elements are enumerated in O(n). No guarantees are made on the ordering.
*
* ```solidity
* contract Example {
* // Add the library methods
* using EnumerableSet for EnumerableSet.AddressSet;
*
* // Declare a set state variable
* EnumerableSet.AddressSet private mySet;
* }
* ```
*
* As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)
* and `uint256` (`UintSet`) are supported.
*
* [WARNING]
* ====
* Trying to delete such a structure from storage will likely result in data corruption, rendering the structure
* unusable.
* See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.
*
* In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an
* array of EnumerableSet.
* ====
*/
library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are just wrappers around the
// underlying Set.
// This means that we can only create new EnumerableSets for types that fit
// in bytes32.
struct Set {
// Storage of set values
bytes32[] _values;
// Position of the value in the `values` array, plus 1 because index 0
// means a value is not in the set.
mapping(bytes32 => uint256) _indexes;
}
/**
* @dev Add a value to a set. O(1).
*
* Returns true if the value was added to the set, that is if it was not
* already present.
*/
function _add(Set storage set, bytes32 value) private returns (bool) {
if (!_contains(set, value)) {
set._values.push(value);
// The value is stored at length-1, but we add 1 to all indexes
// and use 0 as a sentinel value
set._indexes[value] = set._values.length;
return true;
} else {
return false;
}
}
/**
* @dev Removes a value from a set. O(1).
*
* Returns true if the value was removed from the set, that is if it was
* present.
*/
function _remove(Set storage set, bytes32 value) private returns (bool) {
// We read and store the value's index to prevent multiple reads from the same storage slot
uint256 valueIndex = set._indexes[value];
if (valueIndex != 0) {
// Equivalent to contains(set, value)
// To delete an element from the _values array in O(1), we swap the element to delete with the last one in
// the array, and then remove the last element (sometimes called as 'swap and pop').
// This modifies the order of the array, as noted in {at}.
uint256 toDeleteIndex = valueIndex - 1;
uint256 lastIndex = set._values.length - 1;
if (lastIndex != toDeleteIndex) {
bytes32 lastValue = set._values[lastIndex];
// Move the last value to the index where the value to delete is
set._values[toDeleteIndex] = lastValue;
// Update the index for the moved value
set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex
}
// Delete the slot where the moved value was stored
set._values.pop();
// Delete the index for the deleted slot
delete set._indexes[value];
return true;
} else {
return false;
}
}
/**
* @dev Returns true if the value is in the set. O(1).
*/
function _contains(Set storage set, bytes32 value) private view returns (bool) {
return set._indexes[value] != 0;
}
/**
* @dev Returns the number of values on the set. O(1).
*/
function _length(Set storage set) private view returns (uint256) {
return set._values.length;
}
/**
* @dev Returns the value stored at position `index` in the set. O(1).
*
* Note that there are no guarantees on the ordering of values inside the
* array, and it may change when more values are added or removed.
*
* Requirements:
*
* - `index` must be strictly less than {length}.
*/
function _at(Set storage set, uint256 index) private view returns (bytes32) {
return set._values[index];
}
/**
* @dev Return the entire set in an array
*
* WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
* to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
* this function has an unbounded cost, and using it as part of a state-changing function may render the function
* uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
*/
function _values(Set storage set) private view returns (bytes32[] memory) {
return set._values;
}
// Bytes32Set
struct Bytes32Set {
Set _inner;
}
/**
* @dev Add a value to a set. O(1).
*
* Returns true if the value was added to the set, that is if it was not
* already present.
*/
function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {
return _add(set._inner, value);
}
/**
* @dev Removes a value from a set. O(1).
*
* Returns true if the value was removed from the set, that is if it was
* present.
*/
function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {
return _remove(set._inner, value);
}
/**
* @dev Returns true if the value is in the set. O(1).
*/
function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {
return _contains(set._inner, value);
}
/**
* @dev Returns the number of values in the set. O(1).
*/
function length(Bytes32Set storage set) internal view returns (uint256) {
return _length(set._inner);
}
/**
* @dev Returns the value stored at position `index` in the set. O(1).
*
* Note that there are no guarantees on the ordering of values inside the
* array, and it may change when more values are added or removed.
*
* Requirements:
*
* - `index` must be strictly less than {length}.
*/
function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {
return _at(set._inner, index);
}
/**
* @dev Return the entire set in an array
*
* WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
* to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
* this function has an unbounded cost, and using it as part of a state-changing function may render the function
* uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
*/
function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {
bytes32[] memory store = _values(set._inner);
bytes32[] memory result;
/// @solidity memory-safe-assembly
assembly {
result := store
}
return result;
}
// AddressSet
struct AddressSet {
Set _inner;
}
/**
* @dev Add a value to a set. O(1).
*
* Returns true if the value was added to the set, that is if it was not
* already present.
*/
function add(AddressSet storage set, address value) internal returns (bool) {
return _add(set._inner, bytes32(uint256(uint160(value))));
}
/**
* @dev Removes a value from a set. O(1).
*
* Returns true if the value was removed from the set, that is if it was
* present.
*/
function remove(AddressSet storage set, address value) internal returns (bool) {
return _remove(set._inner, bytes32(uint256(uint160(value))));
}
/**
* @dev Returns true if the value is in the set. O(1).
*/
function contains(AddressSet storage set, address value) internal view returns (bool) {
return _contains(set._inner, bytes32(uint256(uint160(value))));
}
/**
* @dev Returns the number of values in the set. O(1).
*/
function length(AddressSet storage set) internal view returns (uint256) {
return _length(set._inner);
}
/**
* @dev Returns the value stored at position `index` in the set. O(1).
*
* Note that there are no guarantees on the ordering of values inside the
* array, and it may change when more values are added or removed.
*
* Requirements:
*
* - `index` must be strictly less than {length}.
*/
function at(AddressSet storage set, uint256 index) internal view returns (address) {
return address(uint160(uint256(_at(set._inner, index))));
}
/**
* @dev Return the entire set in an array
*
* WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
* to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
* this function has an unbounded cost, and using it as part of a state-changing function may render the function
* uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
*/
function values(AddressSet storage set) internal view returns (address[] memory) {
bytes32[] memory store = _values(set._inner);
address[] memory result;
/// @solidity memory-safe-assembly
assembly {
result := store
}
return result;
}
// UintSet
struct UintSet {
Set _inner;
}
/**
* @dev Add a value to a set. O(1).
*
* Returns true if the value was added to the set, that is if it was not
* already present.
*/
function add(UintSet storage set, uint256 value) internal returns (bool) {
return _add(set._inner, bytes32(value));
}
/**
* @dev Removes a value from a set. O(1).
*
* Returns true if the value was removed from the set, that is if it was
* present.
*/
function remove(UintSet storage set, uint256 value) internal returns (bool) {
return _remove(set._inner, bytes32(value));
}
/**
* @dev Returns true if the value is in the set. O(1).
*/
function contains(UintSet storage set, uint256 value) internal view returns (bool) {
return _contains(set._inner, bytes32(value));
}
/**
* @dev Returns the number of values in the set. O(1).
*/
function length(UintSet storage set) internal view returns (uint256) {
return _length(set._inner);
}
/**
* @dev Returns the value stored at position `index` in the set. O(1).
*
* Note that there are no guarantees on the ordering of values inside the
* array, and it may change when more values are added or removed.
*
* Requirements:
*
* - `index` must be strictly less than {length}.
*/
function at(UintSet storage set, uint256 index) internal view returns (uint256) {
return uint256(_at(set._inner, index));
}
/**
* @dev Return the entire set in an array
*
* WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
* to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
* this function has an unbounded cost, and using it as part of a state-changing function may render the function
* uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
*/
function values(UintSet storage set) internal view returns (uint256[] memory) {
bytes32[] memory store = _values(set._inner);
uint256[] memory result;
/// @solidity memory-safe-assembly
assembly {
result := store
}
return result;
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
import {DiamondOwnableStorage} from "./DiamondOwnableStorage.sol";
/**
* @notice The Diamond standard module
*
* This is modified version of OpenZeppelin's Ownable contract to be used as a Storage contract
* by the Diamond Standard.
*/
contract DiamondOwnable is DiamondOwnableStorage {
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @notice Transfers ownership to `msg.sender`
*/
function __DiamondOwnable_init() internal onlyInitializing(DIAMOND_OWNABLE_STORAGE_SLOT) {
_transferOwnership(msg.sender);
}
/**
* @notice The function to transfer the Diamond ownership
* @param newOwner_ the new owner of the Diamond
*/
function transferOwnership(address newOwner_) public virtual onlyOwner {
require(newOwner_ != address(0), "DiamondOwnable: zero address owner");
_transferOwnership(newOwner_);
}
/**
* @notice The function to leave Diamond without an owner
*/
function renounceOwnership() public virtual onlyOwner {
_transferOwnership(address(0));
}
/**
* @notice The function to appoint a new Diamond owner
*/
function _transferOwnership(address newOwner_) internal virtual {
address previousOwner_ = _getDiamondOwnableStorage().owner;
_getDiamondOwnableStorage().owner = newOwner_;
emit OwnershipTransferred(previousOwner_, newOwner_);
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
import {InitializableStorage} from "../../utils/InitializableStorage.sol";
/**
* @notice The Diamond standard module
*
* This is an Ownable Storage contract with Diamond Standard support
*/
abstract contract DiamondOwnableStorage is InitializableStorage {
bytes32 public constant DIAMOND_OWNABLE_STORAGE_SLOT =
keccak256("diamond.standard.diamond.ownable.storage");
struct DOStorage {
address owner;
}
modifier onlyOwner() {
_onlyOwner();
_;
}
function _getDiamondOwnableStorage() internal pure returns (DOStorage storage _dos) {
bytes32 slot_ = DIAMOND_OWNABLE_STORAGE_SLOT;
assembly {
_dos.slot := slot_
}
}
/**
* @notice The function to get the Diamond owner
* @return the owner of the Diamond
*/
function owner() public view virtual returns (address) {
return _getDiamondOwnableStorage().owner;
}
/**
* @notice The function to check if `msg.sender` is the owner
*/
function _onlyOwner() internal view virtual {
require(owner() == msg.sender, "DiamondOwnable: not an owner");
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
import {Address} from "@openzeppelin/contracts/utils/Address.sol";
import {EnumerableSet} from "@openzeppelin/contracts/utils/structs/EnumerableSet.sol";
import {DiamondStorage} from "./DiamondStorage.sol";
/**
* @notice The Diamond standard module
*
* This is a custom, yet fully compatible, implementation of a [Diamond Proxy standard](https://eips.ethereum.org/EIPS/eip-2535).
*
* This contract acts as a highest level contract of that standard. Contrary to the EIP-2535, storage
* is defined in a separate contract that the facets have to inherit from, not use an internal library.
*
* As a convention, view and pure function are defined in the storage contract while function that modify state, in
* the facet itself.
*
* If you wish to add a receive() function, attach a "0x00000000" selector to a facet that has such a function.
*/
contract Diamond is DiamondStorage {
using Address for address;
using EnumerableSet for EnumerableSet.Bytes32Set;
using EnumerableSet for EnumerableSet.AddressSet;
enum FacetAction {
Add,
Replace,
Remove
}
struct Facet {
address facetAddress;
FacetAction action;
bytes4[] functionSelectors;
}
event DiamondCut(Facet[] facets, address initFacet, bytes initData);
/**
* @notice The payable fallback function that delegatecall's the facet with associated selector
*/
// solhint-disable-next-line
fallback() external payable virtual {
address facet_ = facetAddress(msg.sig);
require(facet_ != address(0), "Diamond: selector is not registered");
_beforeFallback(facet_, msg.sig);
assembly {
calldatacopy(0, 0, calldatasize())
let result_ := delegatecall(gas(), facet_, 0, calldatasize(), 0, 0)
returndatacopy(0, 0, returndatasize())
switch result_
case 0 {
revert(0, returndatasize())
}
default {
return(0, returndatasize())
}
}
}
/**
* @notice Add/replace/remove any number of functions and optionally execute a function with delegatecall
* @param facets_ Contains the facet addresses and function selectors
* @param initFacet_ The address of the contract or facet to execute initData_
* @param initData_ A function call, including function selector and arguments initData_ is executed with delegatecall on initFacet_
*/
function _diamondCut(
Facet[] memory facets_,
address initFacet_,
bytes memory initData_
) internal virtual {
for (uint256 i; i < facets_.length; i++) {
bytes4[] memory _functionSelectors = facets_[i].functionSelectors;
address _facetAddress = facets_[i].facetAddress;
FacetAction _action = facets_[i].action;
if (_action == FacetAction.Add) {
_addFacet(_facetAddress, _functionSelectors);
} else if (_action == FacetAction.Remove) {
_removeFacet(_facetAddress, _functionSelectors);
} else {
_updateFacet(_facetAddress, _functionSelectors);
}
}
emit DiamondCut(facets_, initFacet_, initData_);
_initializeDiamondCut(initFacet_, initData_);
}
/**
* @notice The internal function to add facets to a diamond (aka diamondCut())
* @param facet_ the implementation address
* @param selectors_ the function selectors the implementation has
*/
function _addFacet(address facet_, bytes4[] memory selectors_) internal virtual {
require(facet_ != address(0), "Diamond: facet cannot be zero address");
require(facet_.isContract(), "Diamond: facet is not a contract");
require(selectors_.length != 0, "Diamond: no selectors provided");
DStorage storage _ds = _getDiamondStorage();
for (uint256 i = 0; i < selectors_.length; i++) {
require(
_ds.selectorToFacet[selectors_[i]] == address(0),
"Diamond: selector already added"
);
_ds.selectorToFacet[selectors_[i]] = facet_;
_ds.facetToSelectors[facet_].add(bytes32(selectors_[i]));
}
_ds.facets.add(facet_);
}
/**
* @notice The internal function to remove facets from the diamond
* @param facet_ the implementation to be removed. The facet itself will be removed only if there are no selectors left
* @param selectors_ the selectors of that implementation to be removed
*/
function _removeFacet(address facet_, bytes4[] memory selectors_) internal virtual {
require(facet_ != address(0), "Diamond: facet cannot be zero address");
require(selectors_.length != 0, "Diamond: no selectors provided");
DStorage storage _ds = _getDiamondStorage();
for (uint256 i = 0; i < selectors_.length; i++) {
require(
_ds.selectorToFacet[selectors_[i]] == facet_,
"Diamond: selector from another facet"
);
_ds.selectorToFacet[selectors_[i]] = address(0);
_ds.facetToSelectors[facet_].remove(bytes32(selectors_[i]));
}
if (_ds.facetToSelectors[facet_].length() == 0) {
_ds.facets.remove(facet_);
}
}
/**
* @notice The internal function to update the facet selectors of the diamond
* @param facet_ the facet to update
* @param selectors_ the selectors of the facet
*/
function _updateFacet(address facet_, bytes4[] memory selectors_) internal virtual {
require(facet_ != address(0), "Diamond: facet cannot be zero address");
require(facet_.isContract(), "Diamond: facet is not a contract");
require(selectors_.length != 0, "Diamond: no selectors provided");
DStorage storage _ds = _getDiamondStorage();
for (uint256 i; i < selectors_.length; i++) {
bytes4 selector_ = selectors_[i];
address oldFacet_ = facetAddress(selector_);
require(oldFacet_ != facet_, "Diamond: cannot replace to the same facet");
require(oldFacet_ != address(0), "Diamond: no facet found for selector");
// replace old facet address
_ds.selectorToFacet[selector_] = facet_;
_ds.facetToSelectors[facet_].add(bytes32(selector_));
// remove old facet address
_ds.facetToSelectors[oldFacet_].remove(bytes32(selector_));
if (_ds.facetToSelectors[oldFacet_].length() == 0) {
_ds.facets.remove(oldFacet_);
}
}
_ds.facets.add(facet_);
}
/**
* @notice The internal function to initialize the diamond cut.
* @param initFacet_ the address of the contract or facet to execute initData_
* @param initData_ a function call, including function selector and arguments, to be executed with delegatecall on initFacet_
*/
function _initializeDiamondCut(address initFacet_, bytes memory initData_) internal virtual {
if (initFacet_ == address(0)) {
return;
}
require(initFacet_.isContract(), "Diamond: init_ address has no code");
(bool success_, bytes memory err_) = initFacet_.delegatecall(initData_);
if (!success_) {
require(err_.length > 0, "Diamond: initialization function reverted");
// bubble up error
// @solidity memory-safe-assembly
assembly {
revert(add(32, err_), mload(err_))
}
}
}
function _beforeFallback(address facet_, bytes4 selector_) internal virtual {}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
import {EnumerableSet} from "@openzeppelin/contracts/utils/structs/EnumerableSet.sol";
/**
* @notice The Diamond standard module
*
* This is the storage contract for the diamond proxy
*/
abstract contract DiamondStorage {
using EnumerableSet for EnumerableSet.Bytes32Set;
using EnumerableSet for EnumerableSet.AddressSet;
/**
* @notice The struct slot where the storage is
*/
bytes32 public constant DIAMOND_STORAGE_SLOT = keccak256("diamond.standard.diamond.storage");
/**
* @notice The storage of the Diamond proxy
*/
struct DStorage {
mapping(bytes4 => address) selectorToFacet;
mapping(address => EnumerableSet.Bytes32Set) facetToSelectors;
EnumerableSet.AddressSet facets;
}
struct FacetInfo {
address facetAddress;
bytes4[] functionSelectors;
}
/**
* @notice The internal function to get the diamond proxy storage
* @return _ds the struct from the DIAMOND_STORAGE_SLOT
*/
function _getDiamondStorage() internal pure returns (DStorage storage _ds) {
bytes32 slot_ = DIAMOND_STORAGE_SLOT;
assembly {
_ds.slot := slot_
}
}
/**
* @notice The function to get all the facets and their selectors
* @return facets_ the array of FacetInfo
*/
function facets() public view returns (FacetInfo[] memory facets_) {
EnumerableSet.AddressSet storage _facets = _getDiamondStorage().facets;
facets_ = new FacetInfo[](_facets.length());
for (uint256 i = 0; i < facets_.length; i++) {
address facet_ = _facets.at(i);
facets_[i].facetAddress = facet_;
facets_[i].functionSelectors = facetFunctionSelectors(facet_);
}
}
/**
* @notice The function to get all the selectors assigned to the facet
* @param facet_ the facet to get assigned selectors of
* @return selectors_ the array of assigned selectors
*/
function facetFunctionSelectors(
address facet_
) public view returns (bytes4[] memory selectors_) {
EnumerableSet.Bytes32Set storage _f2s = _getDiamondStorage().facetToSelectors[facet_];
selectors_ = new bytes4[](_f2s.length());
for (uint256 i = 0; i < selectors_.length; i++) {
selectors_[i] = bytes4(_f2s.at(i));
}
}
/**
* @notice The function to get all the facets of this diamond
* @return facets_ the array of facets' addresses
*/
function facetAddresses() public view returns (address[] memory facets_) {
return _getDiamondStorage().facets.values();
}
/**
* @notice The function to get associated facet by the selector
* @param selector_ the selector
* @return facet_ the associated facet address
*/
function facetAddress(bytes4 selector_) public view returns (address facet_) {
return _getDiamondStorage().selectorToFacet[selector_];
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
import {Diamond} from "../Diamond.sol";
import {DiamondOwnable} from "../access/ownable/DiamondOwnable.sol";
/**
* @notice The Diamond standard module
*
* The Ownable preset of Diamond proxy
*/
contract OwnableDiamond is Diamond, DiamondOwnable {
/**
* @notice The function to manipulate the Diamond contract, as defined in [EIP-2535](https://eips.ethereum.org/EIPS/eip-2535)
* @param facets_ the array of actions to be executed against the Diamond
*/
function diamondCut(Facet[] memory facets_) public onlyOwner {
diamondCut(facets_, address(0), "");
}
/**
* @notice The function to manipulate the Diamond contract, as defined in [EIP-2535](https://eips.ethereum.org/EIPS/eip-2535)
* @param facets_ the array of actions to be executed against the Diamond
* @param init_ the address of the init contract to be called via delegatecall
* @param initData_ the data the init address will be called with
*/
function diamondCut(
Facet[] memory facets_,
address init_,
bytes memory initData_
) public onlyOwner {
_diamondCut(facets_, init_, initData_);
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
/**
* @notice The Diamond standard module
*
* This is a modified version of the OpenZeppelin Initializable contract to be compatible
* with the Diamond Standard.
*/
abstract contract InitializableStorage {
bytes32 internal constant INITIALIZABLE_STORAGE_SLOT =
keccak256("diamond.standard.initializable.storage");
struct IStorage {
// storage slot => { 0: not initialized, 1: initializing, 2: initialized }
mapping(bytes32 => uint8) initializingStorage;
}
event Initialized(bytes32 storageSlot);
/**
* @dev A modifier that defines a protected initializer function that can be invoked at most
* once for a particular storage in a Diamond proxy that begins with {storageSlot_}.
* In its scope, `onlyInitializing` functions can be used to initialize parent contracts.
*
* Emits an {Initialized} event.
*/
modifier initializer(bytes32 storageSlot_) {
uint8 initializing_ = _getInitializing(storageSlot_);
require(initializing_ == 0, "Initializable: contract is already initialized");
_setInitializing(storageSlot_, 1);
_;
_setInitializing(storageSlot_, 2);
emit Initialized(storageSlot_);
}
/**
* @dev Modifier to protect an initialization function so that it can only be invoked by functions with the
* {initializer} modifier, directly or indirectly.
*/
modifier onlyInitializing(bytes32 storageSlot_) {
require(
_getInitializing(storageSlot_) == 1,
"Initializable: contract is not initializing"
);
_;
}
function _getInitializableStorage() internal pure returns (IStorage storage _iss) {
bytes32 slot_ = INITIALIZABLE_STORAGE_SLOT;
assembly {
_iss.slot := slot_
}
}
/**
* @dev Locks the contract.
* It is recommended to use this to lock Diamond Facets contracts.
*
* Emits an {Initialized} event the first time it is successfully executed.
*/
function _disableInitializers(bytes32 storageSlot_) internal virtual {
uint8 initializing_ = _getInitializing(storageSlot_);
require(initializing_ == 0, "Initializable: contract is initializing");
_setInitializing(storageSlot_, 2);
emit Initialized(storageSlot_);
}
/**
* @dev Internal function that returns the initializing for the specified storage slot.
*/
function _getInitializing(bytes32 storageSlot_) internal view returns (uint8) {
return _getInitializableStorage().initializingStorage[storageSlot_];
}
/**
* @dev Internal function that sets the initializingStorage value.
*/
function _setInitializing(bytes32 storageSlot_, uint8 value_) private {
_getInitializableStorage().initializingStorage[storageSlot_] = value_;
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
import {DiamondOwnableStorage} from "@solarity/solidity-lib/diamond/access/ownable/DiamondOwnableStorage.sol";
import {Context} from "@openzeppelin/contracts/utils/Context.sol";
abstract contract OwnableDiamondStorage is DiamondOwnableStorage, Context {
/**
* @dev The caller account is not authorized to perform an operation as owner.
*/
error OwnableUnauthorizedAccount(address account_);
function _onlyOwner() internal view virtual override {
if (owner() != _msgSender()) {
revert OwnableUnauthorizedAccount(_msgSender());
}
}
}{
"optimizer": {
"enabled": true,
"runs": 200
},
"evmVersion": "paris",
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"address","name":"account_","type":"address"}],"name":"OwnableUnauthorizedAccount","type":"error"},{"anonymous":false,"inputs":[{"components":[{"internalType":"address","name":"facetAddress","type":"address"},{"internalType":"enum Diamond.FacetAction","name":"action","type":"uint8"},{"internalType":"bytes4[]","name":"functionSelectors","type":"bytes4[]"}],"indexed":false,"internalType":"struct Diamond.Facet[]","name":"facets","type":"tuple[]"},{"indexed":false,"internalType":"address","name":"initFacet","type":"address"},{"indexed":false,"internalType":"bytes","name":"initData","type":"bytes"}],"name":"DiamondCut","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bytes32","name":"storageSlot","type":"bytes32"}],"name":"Initialized","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"},{"inputs":[],"name":"DIAMOND_OWNABLE_STORAGE_SLOT","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DIAMOND_STORAGE_SLOT","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"__LumerinDiamond_init","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"facetAddress","type":"address"},{"internalType":"enum Diamond.FacetAction","name":"action","type":"uint8"},{"internalType":"bytes4[]","name":"functionSelectors","type":"bytes4[]"}],"internalType":"struct Diamond.Facet[]","name":"facets_","type":"tuple[]"},{"internalType":"address","name":"init_","type":"address"},{"internalType":"bytes","name":"initData_","type":"bytes"}],"name":"diamondCut","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"facetAddress","type":"address"},{"internalType":"enum Diamond.FacetAction","name":"action","type":"uint8"},{"internalType":"bytes4[]","name":"functionSelectors","type":"bytes4[]"}],"internalType":"struct Diamond.Facet[]","name":"facets_","type":"tuple[]"}],"name":"diamondCut","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"selector_","type":"bytes4"}],"name":"facetAddress","outputs":[{"internalType":"address","name":"facet_","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"facetAddresses","outputs":[{"internalType":"address[]","name":"facets_","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"facet_","type":"address"}],"name":"facetFunctionSelectors","outputs":[{"internalType":"bytes4[]","name":"selectors_","type":"bytes4[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"facets","outputs":[{"components":[{"internalType":"address","name":"facetAddress","type":"address"},{"internalType":"bytes4[]","name":"functionSelectors","type":"bytes4[]"}],"internalType":"struct DiamondStorage.FacetInfo[]","name":"facets_","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner_","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]Contract Creation Code
608060405234801561001057600080fd5b50611b1f806100206000396000f3fe6080604052600436106100a75760003560e01c8063adfca15e11610064578063adfca15e1461023a578063cdffacc614610267578063e57e69c614610287578063e828c51f146102a7578063f2fde38b146102c9578063f81e0afd146102e9576100a7565b80631f931c1c1461014d5780634ac3371e1461016d57806352ef6b2c146101a2578063715018a6146101c45780637a0ed627146101d95780638da5cb5b146101fb575b60006100be6000356001600160e01b0319166102fe565b90506001600160a01b0381166101275760405162461bcd60e51b815260206004820152602360248201527f4469616d6f6e643a2073656c6563746f72206973206e6f7420726567697374656044820152621c995960ea1b60648201526084015b60405180910390fd5b3660008037600080366000845af43d6000803e808015610146573d6000f35b3d6000fd5b005b34801561015957600080fd5b5061014b610168366004611635565b610330565b34801561017957600080fd5b5061018f600080516020611aca83398151915281565b6040519081526020015b60405180910390f35b3480156101ae57600080fd5b506101b7610348565b60405161019991906116fc565b3480156101d057600080fd5b5061014b610378565b3480156101e557600080fd5b506101ee61038c565b604051610199919061178f565b34801561020757600080fd5b50600080516020611aca833981519152546001600160a01b03165b6040516001600160a01b039091168152602001610199565b34801561024657600080fd5b5061025a61025536600461180e565b610495565b6040516101999190611829565b34801561027357600080fd5b5061022261028236600461183c565b6102fe565b34801561029357600080fd5b5061014b6102a2366004611857565b61056c565b3480156102b357600080fd5b5061018f600080516020611aaa83398151915281565b3480156102d557600080fd5b5061014b6102e436600461180e565b610592565b3480156102f557600080fd5b5061014b610604565b6001600160e01b0319166000908152600080516020611aaa83398151915260205260409020546001600160a01b031690565b61033861071b565b610343838383610723565b505050565b60606103737fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131e61084c565b905090565b61038061071b565b61038a6000610860565b565b60607fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131e6103b8816108bf565b67ffffffffffffffff8111156103d0576103d061141c565b60405190808252806020026020018201604052801561041657816020015b6040805180820190915260008152606060208201528152602001906001900390816103ee5790505b50915060005b825181101561049057600061043183836108cf565b90508084838151811061044657610446611894565b60209081029190910101516001600160a01b03909116905261046781610495565b84838151811061047957610479611894565b60209081029190910181015101525060010161041c565b505090565b6001600160a01b03811660009081527fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131d602052604090206060906104d8816108bf565b67ffffffffffffffff8111156104f0576104f061141c565b604051908082528060200260200182016040528015610519578160200160208202803683370190505b50915060005b82518110156105655761053282826108cf565b83828151811061054457610544611894565b6001600160e01b03199092166020928302919091019091015260010161051f565b5050919050565b61057461071b565b61058f81600060405180602001604052806000815250610330565b50565b61059a61071b565b6001600160a01b0381166105fb5760405162461bcd60e51b815260206004820152602260248201527f4469616d6f6e644f776e61626c653a207a65726f2061646472657373206f776e60448201526132b960f11b606482015260840161011e565b61058f81610860565b600080516020611aca83398151915260008190527f18fcd6c4889f3ba2994b4297bd64a519c9c4e062f35921b9815f087f2d0d01756020527fefdc2cac8bf7ecdd6e119c3cb7b39875c30808645b2d65f81cd1db7654a1e3a75460ff1680156106c65760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b606482015260840161011e565b6106d18260016108db565b6106d961091c565b6106e48260026108db565b6040518281527fdc73717d728bcfa015e8117438a65319aa06e979ca324afa6e1ea645c28ea15d9060200160405180910390a15050565b61038a6109e8565b60005b835181101561080657600084828151811061074357610743611894565b6020026020010151604001519050600085838151811061076557610765611894565b6020026020010151600001519050600086848151811061078757610787611894565b6020026020010151602001519050600060028111156107a8576107a86118aa565b8160028111156107ba576107ba6118aa565b036107ce576107c98284610a31565b6107fb565b60028160028111156107e2576107e26118aa565b036107f1576107c98284610c58565b6107fb8284610e58565b505050600101610726565b507f8faa70878671ccd212d20771b795c50af8fd3ff6cf27f4bde57e5d4de0aeb67383838360405161083a93929190611910565b60405180910390a161034382826110ce565b6060600061085983611212565b9392505050565b600080516020611aca83398151915280546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60006108c9825490565b92915050565b6000610859838361126e565b60009182527f18fcd6c4889f3ba2994b4297bd64a519c9c4e062f35921b9815f087f2d0d01756020526040909120805460ff191660ff909216919091179055565b600080516020611aca83398151915260008190527f18fcd6c4889f3ba2994b4297bd64a519c9c4e062f35921b9815f087f2d0d01756020527fefdc2cac8bf7ecdd6e119c3cb7b39875c30808645b2d65f81cd1db7654a1e3a75460ff1660ff166001146109df5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b606482015260840161011e565b61058f33610860565b33610a08600080516020611aca833981519152546001600160a01b031690565b6001600160a01b03161461038a5760405163118cdaa760e01b815233600482015260240161011e565b6001600160a01b038216610a575760405162461bcd60e51b815260040161011e906119da565b6001600160a01b0382163b610aae5760405162461bcd60e51b815260206004820181905260248201527f4469616d6f6e643a206661636574206973206e6f74206120636f6e7472616374604482015260640161011e565b8051600003610acf5760405162461bcd60e51b815260040161011e90611a1f565b600080516020611aaa83398151915260005b8251811015610c445760006001600160a01b0316826000016000858481518110610b0d57610b0d611894565b6020908102919091018101516001600160e01b0319168252810191909152604001600020546001600160a01b031614610b885760405162461bcd60e51b815260206004820152601f60248201527f4469616d6f6e643a2073656c6563746f7220616c726561647920616464656400604482015260640161011e565b83826000016000858481518110610ba157610ba1611894565b60200260200101516001600160e01b0319166001600160e01b031916815260200190815260200160002060006101000a8154816001600160a01b0302191690836001600160a01b03160217905550610c3b838281518110610c0457610c04611894565b6020908102919091018101516001600160a01b0387166000908152600186019092526040909120906001600160e01b031916611298565b50600101610ae1565b50610c5260028201846112a4565b50505050565b6001600160a01b038216610c7e5760405162461bcd60e51b815260040161011e906119da565b8051600003610c9f5760405162461bcd60e51b815260040161011e90611a1f565b600080516020611aaa83398151915260005b8251811015610e2057836001600160a01b0316826000016000858481518110610cdc57610cdc611894565b6020908102919091018101516001600160e01b0319168252810191909152604001600020546001600160a01b031614610d635760405162461bcd60e51b8152602060048201526024808201527f4469616d6f6e643a2073656c6563746f722066726f6d20616e6f7468657220666044820152631858d95d60e21b606482015260840161011e565b6000826000016000858481518110610d7d57610d7d611894565b60200260200101516001600160e01b0319166001600160e01b031916815260200190815260200160002060006101000a8154816001600160a01b0302191690836001600160a01b03160217905550610e17838281518110610de057610de0611894565b6020908102919091018101516001600160a01b0387166000908152600186019092526040909120906001600160e01b0319166112b9565b50600101610cb1565b506001600160a01b03831660009081526001820160205260409020610e44906108bf565b60000361034357610c5260028201846112c5565b6001600160a01b038216610e7e5760405162461bcd60e51b815260040161011e906119da565b6001600160a01b0382163b610ed55760405162461bcd60e51b815260206004820181905260248201527f4469616d6f6e643a206661636574206973206e6f74206120636f6e7472616374604482015260640161011e565b8051600003610ef65760405162461bcd60e51b815260040161011e90611a1f565b600080516020611aaa83398151915260005b8251811015610c44576000838281518110610f2557610f25611894565b602002602001015190506000610f3a826102fe565b9050856001600160a01b0316816001600160a01b031603610faf5760405162461bcd60e51b815260206004820152602960248201527f4469616d6f6e643a2063616e6e6f74207265706c61636520746f207468652073604482015268185b5948199858d95d60ba1b606482015260840161011e565b6001600160a01b0381166110115760405162461bcd60e51b8152602060048201526024808201527f4469616d6f6e643a206e6f20666163657420666f756e6420666f722073656c6560448201526331ba37b960e11b606482015260840161011e565b6001600160e01b0319821660008181526020868152604080832080546001600160a01b0319166001600160a01b038c16908117909155835260018801909152902061105b91611298565b506001600160a01b0381166000908152600185016020526040902061108a906001600160e01b031984166112b9565b506001600160a01b038116600090815260018501602052604090206110ae906108bf565b6000036110c4576110c260028501826112c5565b505b5050600101610f08565b6001600160a01b0382166110e0575050565b6001600160a01b0382163b6111425760405162461bcd60e51b815260206004820152602260248201527f4469616d6f6e643a20696e69745f206164647265737320686173206e6f20636f604482015261646560f01b606482015260840161011e565b600080836001600160a01b03168360405161115d9190611a56565b600060405180830381855af49150503d8060008114611198576040519150601f19603f3d011682016040523d82523d6000602084013e61119d565b606091505b509150915081610c5257600081511161120a5760405162461bcd60e51b815260206004820152602960248201527f4469616d6f6e643a20696e697469616c697a6174696f6e2066756e6374696f6e604482015268081c995d995c9d195960ba1b606482015260840161011e565b805181602001fd5b60608160000180548060200260200160405190810160405280929190818152602001828054801561126257602002820191906000526020600020905b81548152602001906001019080831161124e575b50505050509050919050565b600082600001828154811061128557611285611894565b9060005260206000200154905092915050565b600061085983836112da565b6000610859836001600160a01b0384166112da565b60006108598383611329565b6000610859836001600160a01b038416611329565b6000818152600183016020526040812054611321575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556108c9565b5060006108c9565b6000818152600183016020526040812054801561141257600061134d600183611a72565b855490915060009061136190600190611a72565b90508181146113c657600086600001828154811061138157611381611894565b90600052602060002001549050808760000184815481106113a4576113a4611894565b6000918252602080832090910192909255918252600188019052604090208390555b85548690806113d7576113d7611a93565b6001900381819060005260206000200160009055905585600101600086815260200190815260200160002060009055600193505050506108c9565b60009150506108c9565b634e487b7160e01b600052604160045260246000fd5b6040516060810167ffffffffffffffff811182821017156114555761145561141c565b60405290565b604051601f8201601f1916810167ffffffffffffffff811182821017156114845761148461141c565b604052919050565b600067ffffffffffffffff8211156114a6576114a661141c565b5060051b60200190565b80356001600160a01b03811681146114c757600080fd5b919050565b80356001600160e01b0319811681146114c757600080fd5b600082601f8301126114f557600080fd5b8135602061150a6115058361148c565b61145b565b828152600592831b850182019282820191908785111561152957600080fd5b8387015b8581101561162857803567ffffffffffffffff8082111561154e5760008081fd5b908901906060828c03601f19018113156115685760008081fd5b611570611432565b61157b8985016114b0565b8152604080850135600381106115915760008081fd5b828b01529184013591838311156115a85760008081fd5b82850194508d603f8601126115bf57600093508384fd5b8985013593506115d16115058561148c565b84815293871b85018101938a810193508e8511156115ef5760008081fd5b948101945b8486101561161457611605866114cc565b8452948a0194928a01926115f4565b90820152875250505092840192840161152d565b5090979650505050505050565b60008060006060848603121561164a57600080fd5b833567ffffffffffffffff8082111561166257600080fd5b61166e878388016114e4565b94506020915061167f8287016114b0565b935060408601358181111561169357600080fd5b8601601f810188136116a457600080fd5b8035828111156116b6576116b661141c565b6116c8601f8201601f1916850161145b565b925080835288848284010111156116de57600080fd5b80848301858501376000848285010152505080925050509250925092565b6020808252825182820181905260009190848201906040850190845b8181101561173d5783516001600160a01b031683529284019291840191600101611718565b50909695505050505050565b60008151808452602080850194506020840160005b838110156117845781516001600160e01b0319168752958201959082019060010161175e565b509495945050505050565b600060208083018184528085518083526040925060408601915060408160051b87010184880160005b8381101561180057888303603f19018552815180516001600160a01b031684528701518784018790526117ed87850182611749565b95880195935050908601906001016117b8565b509098975050505050505050565b60006020828403121561182057600080fd5b610859826114b0565b6020815260006108596020830184611749565b60006020828403121561184e57600080fd5b610859826114cc565b60006020828403121561186957600080fd5b813567ffffffffffffffff81111561188057600080fd5b61188c848285016114e4565b949350505050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052602160045260246000fd5b60005b838110156118db5781810151838201526020016118c3565b50506000910152565b600081518084526118fc8160208601602086016118c0565b601f01601f19169290920160200192915050565b600060608083016060845280875180835260808601915060808160051b87010192506020808a016000805b848110156119aa57898703607f19018652825180516001600160a01b03168852848101516003811061197b57634e487b7160e01b84526021600452602484fd5b8886015260409081015190880189905261199789890182611749565b975050948301949183019160010161193b565b5050506001600160a01b03891690870152505083810360408501526119cf81866118e4565b979650505050505050565b60208082526025908201527f4469616d6f6e643a2066616365742063616e6e6f74206265207a65726f206164604082015264647265737360d81b606082015260800190565b6020808252601e908201527f4469616d6f6e643a206e6f2073656c6563746f72732070726f76696465640000604082015260600190565b60008251611a688184602087016118c0565b9190910192915050565b818103818111156108c957634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603160045260246000fdfec8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131cf06f6df34a5ac20ad3ef753effa51dd18670cb582ccbb9112141413f87f2de05a2646970667358221220bdb23dd4346c1223779abdc1a586e5713512ddce27a2259d943c4da580a384da64736f6c63430008180033
Deployed Bytecode
0x6080604052600436106100a75760003560e01c8063adfca15e11610064578063adfca15e1461023a578063cdffacc614610267578063e57e69c614610287578063e828c51f146102a7578063f2fde38b146102c9578063f81e0afd146102e9576100a7565b80631f931c1c1461014d5780634ac3371e1461016d57806352ef6b2c146101a2578063715018a6146101c45780637a0ed627146101d95780638da5cb5b146101fb575b60006100be6000356001600160e01b0319166102fe565b90506001600160a01b0381166101275760405162461bcd60e51b815260206004820152602360248201527f4469616d6f6e643a2073656c6563746f72206973206e6f7420726567697374656044820152621c995960ea1b60648201526084015b60405180910390fd5b3660008037600080366000845af43d6000803e808015610146573d6000f35b3d6000fd5b005b34801561015957600080fd5b5061014b610168366004611635565b610330565b34801561017957600080fd5b5061018f600080516020611aca83398151915281565b6040519081526020015b60405180910390f35b3480156101ae57600080fd5b506101b7610348565b60405161019991906116fc565b3480156101d057600080fd5b5061014b610378565b3480156101e557600080fd5b506101ee61038c565b604051610199919061178f565b34801561020757600080fd5b50600080516020611aca833981519152546001600160a01b03165b6040516001600160a01b039091168152602001610199565b34801561024657600080fd5b5061025a61025536600461180e565b610495565b6040516101999190611829565b34801561027357600080fd5b5061022261028236600461183c565b6102fe565b34801561029357600080fd5b5061014b6102a2366004611857565b61056c565b3480156102b357600080fd5b5061018f600080516020611aaa83398151915281565b3480156102d557600080fd5b5061014b6102e436600461180e565b610592565b3480156102f557600080fd5b5061014b610604565b6001600160e01b0319166000908152600080516020611aaa83398151915260205260409020546001600160a01b031690565b61033861071b565b610343838383610723565b505050565b60606103737fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131e61084c565b905090565b61038061071b565b61038a6000610860565b565b60607fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131e6103b8816108bf565b67ffffffffffffffff8111156103d0576103d061141c565b60405190808252806020026020018201604052801561041657816020015b6040805180820190915260008152606060208201528152602001906001900390816103ee5790505b50915060005b825181101561049057600061043183836108cf565b90508084838151811061044657610446611894565b60209081029190910101516001600160a01b03909116905261046781610495565b84838151811061047957610479611894565b60209081029190910181015101525060010161041c565b505090565b6001600160a01b03811660009081527fc8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131d602052604090206060906104d8816108bf565b67ffffffffffffffff8111156104f0576104f061141c565b604051908082528060200260200182016040528015610519578160200160208202803683370190505b50915060005b82518110156105655761053282826108cf565b83828151811061054457610544611894565b6001600160e01b03199092166020928302919091019091015260010161051f565b5050919050565b61057461071b565b61058f81600060405180602001604052806000815250610330565b50565b61059a61071b565b6001600160a01b0381166105fb5760405162461bcd60e51b815260206004820152602260248201527f4469616d6f6e644f776e61626c653a207a65726f2061646472657373206f776e60448201526132b960f11b606482015260840161011e565b61058f81610860565b600080516020611aca83398151915260008190527f18fcd6c4889f3ba2994b4297bd64a519c9c4e062f35921b9815f087f2d0d01756020527fefdc2cac8bf7ecdd6e119c3cb7b39875c30808645b2d65f81cd1db7654a1e3a75460ff1680156106c65760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b606482015260840161011e565b6106d18260016108db565b6106d961091c565b6106e48260026108db565b6040518281527fdc73717d728bcfa015e8117438a65319aa06e979ca324afa6e1ea645c28ea15d9060200160405180910390a15050565b61038a6109e8565b60005b835181101561080657600084828151811061074357610743611894565b6020026020010151604001519050600085838151811061076557610765611894565b6020026020010151600001519050600086848151811061078757610787611894565b6020026020010151602001519050600060028111156107a8576107a86118aa565b8160028111156107ba576107ba6118aa565b036107ce576107c98284610a31565b6107fb565b60028160028111156107e2576107e26118aa565b036107f1576107c98284610c58565b6107fb8284610e58565b505050600101610726565b507f8faa70878671ccd212d20771b795c50af8fd3ff6cf27f4bde57e5d4de0aeb67383838360405161083a93929190611910565b60405180910390a161034382826110ce565b6060600061085983611212565b9392505050565b600080516020611aca83398151915280546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60006108c9825490565b92915050565b6000610859838361126e565b60009182527f18fcd6c4889f3ba2994b4297bd64a519c9c4e062f35921b9815f087f2d0d01756020526040909120805460ff191660ff909216919091179055565b600080516020611aca83398151915260008190527f18fcd6c4889f3ba2994b4297bd64a519c9c4e062f35921b9815f087f2d0d01756020527fefdc2cac8bf7ecdd6e119c3cb7b39875c30808645b2d65f81cd1db7654a1e3a75460ff1660ff166001146109df5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b606482015260840161011e565b61058f33610860565b33610a08600080516020611aca833981519152546001600160a01b031690565b6001600160a01b03161461038a5760405163118cdaa760e01b815233600482015260240161011e565b6001600160a01b038216610a575760405162461bcd60e51b815260040161011e906119da565b6001600160a01b0382163b610aae5760405162461bcd60e51b815260206004820181905260248201527f4469616d6f6e643a206661636574206973206e6f74206120636f6e7472616374604482015260640161011e565b8051600003610acf5760405162461bcd60e51b815260040161011e90611a1f565b600080516020611aaa83398151915260005b8251811015610c445760006001600160a01b0316826000016000858481518110610b0d57610b0d611894565b6020908102919091018101516001600160e01b0319168252810191909152604001600020546001600160a01b031614610b885760405162461bcd60e51b815260206004820152601f60248201527f4469616d6f6e643a2073656c6563746f7220616c726561647920616464656400604482015260640161011e565b83826000016000858481518110610ba157610ba1611894565b60200260200101516001600160e01b0319166001600160e01b031916815260200190815260200160002060006101000a8154816001600160a01b0302191690836001600160a01b03160217905550610c3b838281518110610c0457610c04611894565b6020908102919091018101516001600160a01b0387166000908152600186019092526040909120906001600160e01b031916611298565b50600101610ae1565b50610c5260028201846112a4565b50505050565b6001600160a01b038216610c7e5760405162461bcd60e51b815260040161011e906119da565b8051600003610c9f5760405162461bcd60e51b815260040161011e90611a1f565b600080516020611aaa83398151915260005b8251811015610e2057836001600160a01b0316826000016000858481518110610cdc57610cdc611894565b6020908102919091018101516001600160e01b0319168252810191909152604001600020546001600160a01b031614610d635760405162461bcd60e51b8152602060048201526024808201527f4469616d6f6e643a2073656c6563746f722066726f6d20616e6f7468657220666044820152631858d95d60e21b606482015260840161011e565b6000826000016000858481518110610d7d57610d7d611894565b60200260200101516001600160e01b0319166001600160e01b031916815260200190815260200160002060006101000a8154816001600160a01b0302191690836001600160a01b03160217905550610e17838281518110610de057610de0611894565b6020908102919091018101516001600160a01b0387166000908152600186019092526040909120906001600160e01b0319166112b9565b50600101610cb1565b506001600160a01b03831660009081526001820160205260409020610e44906108bf565b60000361034357610c5260028201846112c5565b6001600160a01b038216610e7e5760405162461bcd60e51b815260040161011e906119da565b6001600160a01b0382163b610ed55760405162461bcd60e51b815260206004820181905260248201527f4469616d6f6e643a206661636574206973206e6f74206120636f6e7472616374604482015260640161011e565b8051600003610ef65760405162461bcd60e51b815260040161011e90611a1f565b600080516020611aaa83398151915260005b8251811015610c44576000838281518110610f2557610f25611894565b602002602001015190506000610f3a826102fe565b9050856001600160a01b0316816001600160a01b031603610faf5760405162461bcd60e51b815260206004820152602960248201527f4469616d6f6e643a2063616e6e6f74207265706c61636520746f207468652073604482015268185b5948199858d95d60ba1b606482015260840161011e565b6001600160a01b0381166110115760405162461bcd60e51b8152602060048201526024808201527f4469616d6f6e643a206e6f20666163657420666f756e6420666f722073656c6560448201526331ba37b960e11b606482015260840161011e565b6001600160e01b0319821660008181526020868152604080832080546001600160a01b0319166001600160a01b038c16908117909155835260018801909152902061105b91611298565b506001600160a01b0381166000908152600185016020526040902061108a906001600160e01b031984166112b9565b506001600160a01b038116600090815260018501602052604090206110ae906108bf565b6000036110c4576110c260028501826112c5565b505b5050600101610f08565b6001600160a01b0382166110e0575050565b6001600160a01b0382163b6111425760405162461bcd60e51b815260206004820152602260248201527f4469616d6f6e643a20696e69745f206164647265737320686173206e6f20636f604482015261646560f01b606482015260840161011e565b600080836001600160a01b03168360405161115d9190611a56565b600060405180830381855af49150503d8060008114611198576040519150601f19603f3d011682016040523d82523d6000602084013e61119d565b606091505b509150915081610c5257600081511161120a5760405162461bcd60e51b815260206004820152602960248201527f4469616d6f6e643a20696e697469616c697a6174696f6e2066756e6374696f6e604482015268081c995d995c9d195960ba1b606482015260840161011e565b805181602001fd5b60608160000180548060200260200160405190810160405280929190818152602001828054801561126257602002820191906000526020600020905b81548152602001906001019080831161124e575b50505050509050919050565b600082600001828154811061128557611285611894565b9060005260206000200154905092915050565b600061085983836112da565b6000610859836001600160a01b0384166112da565b60006108598383611329565b6000610859836001600160a01b038416611329565b6000818152600183016020526040812054611321575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556108c9565b5060006108c9565b6000818152600183016020526040812054801561141257600061134d600183611a72565b855490915060009061136190600190611a72565b90508181146113c657600086600001828154811061138157611381611894565b90600052602060002001549050808760000184815481106113a4576113a4611894565b6000918252602080832090910192909255918252600188019052604090208390555b85548690806113d7576113d7611a93565b6001900381819060005260206000200160009055905585600101600086815260200190815260200160002060009055600193505050506108c9565b60009150506108c9565b634e487b7160e01b600052604160045260246000fd5b6040516060810167ffffffffffffffff811182821017156114555761145561141c565b60405290565b604051601f8201601f1916810167ffffffffffffffff811182821017156114845761148461141c565b604052919050565b600067ffffffffffffffff8211156114a6576114a661141c565b5060051b60200190565b80356001600160a01b03811681146114c757600080fd5b919050565b80356001600160e01b0319811681146114c757600080fd5b600082601f8301126114f557600080fd5b8135602061150a6115058361148c565b61145b565b828152600592831b850182019282820191908785111561152957600080fd5b8387015b8581101561162857803567ffffffffffffffff8082111561154e5760008081fd5b908901906060828c03601f19018113156115685760008081fd5b611570611432565b61157b8985016114b0565b8152604080850135600381106115915760008081fd5b828b01529184013591838311156115a85760008081fd5b82850194508d603f8601126115bf57600093508384fd5b8985013593506115d16115058561148c565b84815293871b85018101938a810193508e8511156115ef5760008081fd5b948101945b8486101561161457611605866114cc565b8452948a0194928a01926115f4565b90820152875250505092840192840161152d565b5090979650505050505050565b60008060006060848603121561164a57600080fd5b833567ffffffffffffffff8082111561166257600080fd5b61166e878388016114e4565b94506020915061167f8287016114b0565b935060408601358181111561169357600080fd5b8601601f810188136116a457600080fd5b8035828111156116b6576116b661141c565b6116c8601f8201601f1916850161145b565b925080835288848284010111156116de57600080fd5b80848301858501376000848285010152505080925050509250925092565b6020808252825182820181905260009190848201906040850190845b8181101561173d5783516001600160a01b031683529284019291840191600101611718565b50909695505050505050565b60008151808452602080850194506020840160005b838110156117845781516001600160e01b0319168752958201959082019060010161175e565b509495945050505050565b600060208083018184528085518083526040925060408601915060408160051b87010184880160005b8381101561180057888303603f19018552815180516001600160a01b031684528701518784018790526117ed87850182611749565b95880195935050908601906001016117b8565b509098975050505050505050565b60006020828403121561182057600080fd5b610859826114b0565b6020815260006108596020830184611749565b60006020828403121561184e57600080fd5b610859826114cc565b60006020828403121561186957600080fd5b813567ffffffffffffffff81111561188057600080fd5b61188c848285016114e4565b949350505050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052602160045260246000fd5b60005b838110156118db5781810151838201526020016118c3565b50506000910152565b600081518084526118fc8160208601602086016118c0565b601f01601f19169290920160200192915050565b600060608083016060845280875180835260808601915060808160051b87010192506020808a016000805b848110156119aa57898703607f19018652825180516001600160a01b03168852848101516003811061197b57634e487b7160e01b84526021600452602484fd5b8886015260409081015190880189905261199789890182611749565b975050948301949183019160010161193b565b5050506001600160a01b03891690870152505083810360408501526119cf81866118e4565b979650505050505050565b60208082526025908201527f4469616d6f6e643a2066616365742063616e6e6f74206265207a65726f206164604082015264647265737360d81b606082015260800190565b6020808252601e908201527f4469616d6f6e643a206e6f2073656c6563746f72732070726f76696465640000604082015260600190565b60008251611a688184602087016118c0565b9190910192915050565b818103818111156108c957634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603160045260246000fdfec8fcad8db84d3cc18b4c41d551ea0ee66dd599cde068d998e57d5e09332c131cf06f6df34a5ac20ad3ef753effa51dd18670cb582ccbb9112141413f87f2de05a2646970667358221220bdb23dd4346c1223779abdc1a586e5713512ddce27a2259d943c4da580a384da64736f6c63430008180033
Loading...
Loading
Loading...
Loading
Loading...
Loading
Net Worth in USD
$61,906.62
Net Worth in ETH
25.591218
Token Allocations
MOR
100.00%
Multichain Portfolio | 32 Chains
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.