Source Code
Overview
ETH Balance
0 ETH
More Info
ContractCreator
Multichain Info
N/A
Latest 25 from a total of 27 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Create | 2476173 | 68 days ago | IN | 0 ETH | 0.00000758 | ||||
Create | 2437482 | 74 days ago | IN | 0 ETH | 0.00009909 | ||||
Create | 2430801 | 75 days ago | IN | 0 ETH | 0.00005728 | ||||
Create | 2417361 | 77 days ago | IN | 0 ETH | 0.00011866 | ||||
Create | 2417264 | 77 days ago | IN | 0 ETH | 0.00011866 | ||||
Create | 2417214 | 77 days ago | IN | 0 ETH | 0.00011866 | ||||
Create | 2416797 | 77 days ago | IN | 0 ETH | 0.00011866 | ||||
Create | 2416683 | 77 days ago | IN | 0 ETH | 0.00011866 | ||||
Create | 2415927 | 77 days ago | IN | 0 ETH | 0.00011866 | ||||
Create | 2411988 | 78 days ago | IN | 0 ETH | 0.00005497 | ||||
Create | 2411979 | 78 days ago | IN | 0 ETH | 0.00005497 | ||||
Create | 2411973 | 78 days ago | IN | 0 ETH | 0.00005497 | ||||
Create | 2411939 | 78 days ago | IN | 0 ETH | 0.00005667 | ||||
Create | 2411929 | 78 days ago | IN | 0 ETH | 0.00005667 | ||||
Create | 2411725 | 78 days ago | IN | 0 ETH | 0.00006023 | ||||
Create | 2411721 | 78 days ago | IN | 0 ETH | 0.00006023 | ||||
Create | 2411635 | 78 days ago | IN | 0 ETH | 0.00006023 | ||||
Create | 2411621 | 78 days ago | IN | 0 ETH | 0.00006024 | ||||
Create | 2411610 | 78 days ago | IN | 0 ETH | 0.0000621 | ||||
Create | 2410719 | 78 days ago | IN | 0 ETH | 0.0001114 | ||||
Create | 2410659 | 78 days ago | IN | 0 ETH | 0.00008586 | ||||
Create | 2410647 | 78 days ago | IN | 0 ETH | 0.00011453 | ||||
Create | 2391543 | 81 days ago | IN | 0 ETH | 0.00008243 | ||||
Transfer Ownersh... | 2072257 | 130 days ago | IN | 0 ETH | 0.00000018 | ||||
Whitelist | 2072257 | 130 days ago | IN | 0 ETH | 0.00000058 |
Latest 25 internal transactions (View All)
Advanced mode:
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 Source Code Verified (Exact Match)
Contract Name:
DelegatorFactory
Compiler Version
v0.8.25+commit.b61c2a91
Optimization Enabled:
Yes with 200 runs
Other Settings:
paris EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: BUSL-1.1 pragma solidity 0.8.25; import {Factory} from "src/contracts/common/Factory.sol"; import {IDelegatorFactory} from "src/interfaces/IDelegatorFactory.sol"; contract DelegatorFactory is Factory, IDelegatorFactory { constructor(address owner_) Factory(owner_) {} }
// SPDX-License-Identifier: BUSL-1.1 pragma solidity 0.8.25; import {Registry} from "./Registry.sol"; import {IEntity} from "src/interfaces/common/IEntity.sol"; import {IFactory} from "src/interfaces/common/IFactory.sol"; import {Clones} from "@openzeppelin/contracts/proxy/Clones.sol"; import {EnumerableSet} from "@openzeppelin/contracts/utils/structs/EnumerableSet.sol"; import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol"; contract Factory is Registry, Ownable, IFactory { using EnumerableSet for EnumerableSet.AddressSet; using Clones for address; EnumerableSet.AddressSet private _whitelistedImplementations; constructor(address owner_) Ownable(owner_) {} /** * @inheritdoc IFactory */ function totalTypes() public view returns (uint64) { return uint64(_whitelistedImplementations.length()); } /** * @inheritdoc IFactory */ function implementation(uint64 type_) public view returns (address) { return _whitelistedImplementations.at(type_); } /** * @inheritdoc IFactory */ function whitelist(address implementation_) external onlyOwner { if (IEntity(implementation_).FACTORY() != address(this) || IEntity(implementation_).TYPE() != totalTypes()) { revert InvalidImplementation(); } if (!_whitelistedImplementations.add(implementation_)) { revert AlreadyWhitelisted(); } emit Whitelist(implementation_); } /** * @inheritdoc IFactory */ function create(uint64 type_, bool withInitialize, bytes calldata data) external returns (address entity_) { entity_ = implementation(type_).cloneDeterministic(keccak256(abi.encode(totalEntities(), type_, data))); _addEntity(entity_); if (withInitialize) { IEntity(entity_).initialize(data); } } }
// SPDX-License-Identifier: BUSL-1.1 pragma solidity 0.8.25; import {IFactory} from "src/interfaces/common/IFactory.sol"; interface IDelegatorFactory is IFactory {}
// SPDX-License-Identifier: BUSL-1.1 pragma solidity 0.8.25; import {IRegistry} from "src/interfaces/common/IRegistry.sol"; import {EnumerableSet} from "@openzeppelin/contracts/utils/structs/EnumerableSet.sol"; abstract contract Registry is IRegistry { using EnumerableSet for EnumerableSet.AddressSet; EnumerableSet.AddressSet private _entities; modifier checkEntity(address account) { _checkEntity(account); _; } /** * @inheritdoc IRegistry */ function isEntity(address entity_) public view returns (bool) { return _entities.contains(entity_); } /** * @inheritdoc IRegistry */ function totalEntities() public view returns (uint256) { return _entities.length(); } /** * @inheritdoc IRegistry */ function entity(uint256 index) public view returns (address) { return _entities.at(index); } function _addEntity(address entity_) internal { _entities.add(entity_); emit AddEntity(entity_); } function _checkEntity(address account) internal view { if (!isEntity(account)) { revert EntityNotExist(); } } }
// SPDX-License-Identifier: BUSL-1.1 pragma solidity 0.8.25; interface IEntity { /** * @notice Get the factory's address. * @return address of the factory */ function FACTORY() external view returns (address); /** * @notice Get the entity's type. * @return type of the entity */ function TYPE() external view returns (uint64); /** * @notice Initialize this entity contract by using a given data. * @param data some data to use */ function initialize(bytes calldata data) external; }
// SPDX-License-Identifier: BUSL-1.1 pragma solidity 0.8.25; import {IRegistry} from "./IRegistry.sol"; interface IFactory is IRegistry { error AlreadyWhitelisted(); error InvalidImplementation(); /** * @notice Emitted when a new type is whitelisted. * @param implementation address of the new implementation */ event Whitelist(address indexed implementation); /** * @notice Get the total number of whitelisted types. * @return total number of types */ function totalTypes() external view returns (uint64); /** * @notice Get the implementation for a given type. * @param type_ position to get the implementation at * @return address of the implementation */ function implementation(uint64 type_) external view returns (address); /** * @notice Whitelist a new type of entity. * @param implementation address of the new implementation */ function whitelist(address implementation) external; /** * @notice Create a new entity at the factory. * @param type_ type's implementation to use * @param withInitialize whether to call `initialize()` on the entity * @param data initial data for the entity creation * @return address of the entity */ function create(uint64 type_, bool withInitialize, bytes calldata data) external returns (address); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (proxy/Clones.sol) pragma solidity ^0.8.20; /** * @dev https://eips.ethereum.org/EIPS/eip-1167[EIP 1167] is a standard for * deploying minimal proxy contracts, also known as "clones". * * > To simply and cheaply clone contract functionality in an immutable way, this standard specifies * > a minimal bytecode implementation that delegates all calls to a known, fixed address. * * The library includes functions to deploy a proxy using either `create` (traditional deployment) or `create2` * (salted deterministic deployment). It also includes functions to predict the addresses of clones deployed using the * deterministic method. */ library Clones { /** * @dev A clone instance deployment failed. */ error ERC1167FailedCreateClone(); /** * @dev Deploys and returns the address of a clone that mimics the behaviour of `implementation`. * * This function uses the create opcode, which should never revert. */ function clone(address implementation) internal returns (address instance) { /// @solidity memory-safe-assembly assembly { // Cleans the upper 96 bits of the `implementation` word, then packs the first 3 bytes // of the `implementation` address with the bytecode before the address. mstore(0x00, or(shr(0xe8, shl(0x60, implementation)), 0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000)) // Packs the remaining 17 bytes of `implementation` with the bytecode after the address. mstore(0x20, or(shl(0x78, implementation), 0x5af43d82803e903d91602b57fd5bf3)) instance := create(0, 0x09, 0x37) } if (instance == address(0)) { revert ERC1167FailedCreateClone(); } } /** * @dev Deploys and returns the address of a clone that mimics the behaviour of `implementation`. * * This function uses the create2 opcode and a `salt` to deterministically deploy * the clone. Using the same `implementation` and `salt` multiple time will revert, since * the clones cannot be deployed twice at the same address. */ function cloneDeterministic(address implementation, bytes32 salt) internal returns (address instance) { /// @solidity memory-safe-assembly assembly { // Cleans the upper 96 bits of the `implementation` word, then packs the first 3 bytes // of the `implementation` address with the bytecode before the address. mstore(0x00, or(shr(0xe8, shl(0x60, implementation)), 0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000)) // Packs the remaining 17 bytes of `implementation` with the bytecode after the address. mstore(0x20, or(shl(0x78, implementation), 0x5af43d82803e903d91602b57fd5bf3)) instance := create2(0, 0x09, 0x37, salt) } if (instance == address(0)) { revert ERC1167FailedCreateClone(); } } /** * @dev Computes the address of a clone deployed using {Clones-cloneDeterministic}. */ function predictDeterministicAddress( address implementation, bytes32 salt, address deployer ) internal pure returns (address predicted) { /// @solidity memory-safe-assembly assembly { let ptr := mload(0x40) mstore(add(ptr, 0x38), deployer) mstore(add(ptr, 0x24), 0x5af43d82803e903d91602b57fd5bf3ff) mstore(add(ptr, 0x14), implementation) mstore(ptr, 0x3d602d80600a3d3981f3363d3d373d3d3d363d73) mstore(add(ptr, 0x58), salt) mstore(add(ptr, 0x78), keccak256(add(ptr, 0x0c), 0x37)) predicted := keccak256(add(ptr, 0x43), 0x55) } } /** * @dev Computes the address of a clone deployed using {Clones-cloneDeterministic}. */ function predictDeterministicAddress( address implementation, bytes32 salt ) internal view returns (address predicted) { return predictDeterministicAddress(implementation, salt, address(this)); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/structs/EnumerableSet.sol) // This file was procedurally generated from scripts/generate/templates/EnumerableSet.js. pragma solidity ^0.8.20; /** * @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 is the index of the value in the `values` array plus 1. // Position 0 is used to mean a value is not in the set. mapping(bytes32 value => uint256) _positions; } /** * @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._positions[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 cache the value's position to prevent multiple reads from the same storage slot uint256 position = set._positions[value]; if (position != 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 valueIndex = position - 1; uint256 lastIndex = set._values.length - 1; if (valueIndex != lastIndex) { bytes32 lastValue = set._values[lastIndex]; // Move the lastValue to the index where the value to delete is set._values[valueIndex] = lastValue; // Update the tracked position of the lastValue (that was just moved) set._positions[lastValue] = position; } // Delete the slot where the moved value was stored set._values.pop(); // Delete the tracked position for the deleted slot delete set._positions[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._positions[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 // OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol) pragma solidity ^0.8.20; import {Context} from "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * The initial owner is set to the address provided by the deployer. This can * later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; /** * @dev The caller account is not authorized to perform an operation. */ error OwnableUnauthorizedAccount(address account); /** * @dev The owner is not a valid owner account. (eg. `address(0)`) */ error OwnableInvalidOwner(address owner); event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the address provided by the deployer as the initial owner. */ constructor(address initialOwner) { if (initialOwner == address(0)) { revert OwnableInvalidOwner(address(0)); } _transferOwnership(initialOwner); } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { if (owner() != _msgSender()) { revert OwnableUnauthorizedAccount(_msgSender()); } } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby disabling any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { if (newOwner == address(0)) { revert OwnableInvalidOwner(address(0)); } _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: BUSL-1.1 pragma solidity 0.8.25; interface IRegistry { error EntityNotExist(); /** * @notice Emitted when an entity is added. * @param entity address of the added entity */ event AddEntity(address indexed entity); /** * @notice Get if a given address is an entity. * @param account address to check * @return if the given address is an entity */ function isEntity(address account) external view returns (bool); /** * @notice Get a total number of entities. * @return total number of entities added */ function totalEntities() external view returns (uint256); /** * @notice Get an entity given its index. * @param index index of the entity to get * @return address of the entity */ function entity(uint256 index) external view returns (address); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol) pragma solidity ^0.8.20; /** * @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; } function _contextSuffixLength() internal view virtual returns (uint256) { return 0; } }
{ "remappings": [ "forge-std/=lib/forge-std/src/", "@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/", "@openzeppelin/contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts/", "ds-test/=lib/openzeppelin-contracts/lib/forge-std/lib/ds-test/src/", "erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/", "openzeppelin-contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/", "openzeppelin-contracts/=lib/openzeppelin-contracts/" ], "optimizer": { "enabled": true, "runs": 200 }, "metadata": { "useLiteralContent": false, "bytecodeHash": "ipfs", "appendCBOR": true }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "evmVersion": "paris", "viaIR": true, "libraries": {} }
[{"inputs":[{"internalType":"address","name":"owner_","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"AlreadyWhitelisted","type":"error"},{"inputs":[],"name":"ERC1167FailedCreateClone","type":"error"},{"inputs":[],"name":"EntityNotExist","type":"error"},{"inputs":[],"name":"InvalidImplementation","type":"error"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"OwnableInvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"OwnableUnauthorizedAccount","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"entity","type":"address"}],"name":"AddEntity","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"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"implementation","type":"address"}],"name":"Whitelist","type":"event"},{"inputs":[{"internalType":"uint64","name":"type_","type":"uint64"},{"internalType":"bool","name":"withInitialize","type":"bool"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"create","outputs":[{"internalType":"address","name":"entity_","type":"address"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"entity","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint64","name":"type_","type":"uint64"}],"name":"implementation","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"entity_","type":"address"}],"name":"isEntity","outputs":[{"internalType":"bool","name":"","type":"bool"}],"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":[],"name":"totalEntities","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalTypes","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"implementation_","type":"address"}],"name":"whitelist","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60803460b757601f61093538819003918201601f19168301916001600160401b0383118484101760bc5780849260209460405283398101031260b757516001600160a01b03908181169081900360b7578015609e57600280546001600160a01b03198116831790915560405192167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a361086290816100d38239f35b604051631e4fbdf760e01b815260006004820152602490fd5b600080fd5b634e487b7160e01b600052604160045260246000fdfe6040608081526004908136101561001557600080fd5b600091823560e01c90816307f210f21461046957816314887c581461042d5781635cd8b15e14610410578163715018a6146103b35781638da5cb5b1461038a5781639b19251a146101fe578163b42ba2a21461018f578163f15df2e514610166578163f2fde38b146100ca575063f96616021461009157600080fd5b346100c65760203660031901126100c6576020906100b56100b061062d565b6106a2565b90516001600160a01b039091168152f35b5080fd5b91905034610162576020366003190112610162576001600160a01b0382358181169391929084900361015e576100fe610700565b8315610148575050600254826bffffffffffffffffffffffff60a01b821617600255167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08380a380f35b51631e4fbdf760e01b8152908101849052602490fd5b8480fd5b8280fd5b5050346100c657816003193601126100c65760209067ffffffffffffffff600354169051908152f35b8284346101fb5760203660031901126101fb5782359080548210156101e85780527f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e563015490516001600160a01b03909116815260209150f35b634e487b7160e01b815260328452602490fd5b80fd5b90503461016257602091826003193601126103865781356001600160a01b03818116949185900361038257610231610700565b82516202dd3160ec1b81529082828681895afa91821561037857879261033c575b50163014801591906102b5575b506102a85761026d836107c1565b1561029b5750507feb73900b98b6a3e2b8b01708fe544760cf570d21e7fbe5225f24e48b5b2b432e8280a280f35b5163b73e95e160e01b8152fd5b5163340aafcd60e11b8152fd5b8251635d927f4560e11b815290915081818581885afa9182156103325786926102f3575b505067ffffffffffffffff8060035416911614153861025f565b90809250813d831161032b575b61030a818361066a565b8101031261015e575167ffffffffffffffff8116810361015e5738806102d9565b503d610300565b83513d88823e3d90fd5b9091508281813d8311610371575b610354818361066a565b8101031261036d5751818116810361036d579038610252565b8680fd5b503d61034a565b84513d89823e3d90fd5b8580fd5b8380fd5b5050346100c657816003193601126100c65760025490516001600160a01b039091168152602090f35b83346101fb57806003193601126101fb576103cc610700565b600280546001600160a01b0319811690915581906001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a380f35b5050346100c657816003193601126100c657602091549051908152f35b90503461016257602036600319011261016257356001600160a01b03811690819003610162578282916020945260018452205415159051908152f35b8383346100c65760603660031901126100c65761048461062d565b916024359081151582036101fb5767ffffffffffffffff60443581811161016257366023820112156101625780870135958287116103865760248201916024883692010111610386576e5af43d82803e903d91602b57fd5bf36104e6826106a2565b918554908589519160208301938452168982015260608082015261052081610512608082018d89610649565b03601f19810183528261066a565b519020608883901c62ffffff16763d602d80600a3d3981f3363d3d373d3d3d363d7300000017865260789290921b176020526001600160a01b03906037600986f51695861561061d576105728761072c565b50855194877fb919910dcefbf753bfd926ab3b1d3f85d877190c3d01ba1bd585047b99b99f0b8680a26105aa575b6020878751908152f35b863b1561038657846105d38593829363439fab9160e01b845260208c8501526024840191610649565b038183895af18015610613576105eb575b80806105a0565b821161060057506020935081528380806105e4565b634e487b7160e01b815260418552602490fd5b84513d84823e3d90fd5b85516330be1a3d60e21b81528890fd5b6004359067ffffffffffffffff8216820361064457565b600080fd5b908060209392818452848401376000828201840152601f01601f1916010190565b90601f8019910116810190811067ffffffffffffffff82111761068c57604052565b634e487b7160e01b600052604160045260246000fd5b67ffffffffffffffff166003548110156106ea5760036000527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b01546001600160a01b031690565b634e487b7160e01b600052603260045260246000fd5b6002546001600160a01b0316330361071457565b60405163118cdaa760e01b8152336004820152602490fd5b6000818152600160205260408120546107bc578054600160401b8110156107a857600181018083558110156107945790826040927f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e5630155805492815260016020522055600190565b634e487b7160e01b82526032600452602482fd5b634e487b7160e01b82526041600452602482fd5b905090565b6000818152600460205260408120546107bc57600354600160401b8110156107a85760018101806003558110156107945790826040927fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b01556003549281526004602052205560019056fea2646970667358221220085692cfc5e93fc121b4cf38f5eca7b84b441eda0a937b255fb55e283d816aac64736f6c634300081900330000000000000000000000003a04064068e3465a00214b5cf57bfb0a6757f70c
Deployed Bytecode
0x6040608081526004908136101561001557600080fd5b600091823560e01c90816307f210f21461046957816314887c581461042d5781635cd8b15e14610410578163715018a6146103b35781638da5cb5b1461038a5781639b19251a146101fe578163b42ba2a21461018f578163f15df2e514610166578163f2fde38b146100ca575063f96616021461009157600080fd5b346100c65760203660031901126100c6576020906100b56100b061062d565b6106a2565b90516001600160a01b039091168152f35b5080fd5b91905034610162576020366003190112610162576001600160a01b0382358181169391929084900361015e576100fe610700565b8315610148575050600254826bffffffffffffffffffffffff60a01b821617600255167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08380a380f35b51631e4fbdf760e01b8152908101849052602490fd5b8480fd5b8280fd5b5050346100c657816003193601126100c65760209067ffffffffffffffff600354169051908152f35b8284346101fb5760203660031901126101fb5782359080548210156101e85780527f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e563015490516001600160a01b03909116815260209150f35b634e487b7160e01b815260328452602490fd5b80fd5b90503461016257602091826003193601126103865781356001600160a01b03818116949185900361038257610231610700565b82516202dd3160ec1b81529082828681895afa91821561037857879261033c575b50163014801591906102b5575b506102a85761026d836107c1565b1561029b5750507feb73900b98b6a3e2b8b01708fe544760cf570d21e7fbe5225f24e48b5b2b432e8280a280f35b5163b73e95e160e01b8152fd5b5163340aafcd60e11b8152fd5b8251635d927f4560e11b815290915081818581885afa9182156103325786926102f3575b505067ffffffffffffffff8060035416911614153861025f565b90809250813d831161032b575b61030a818361066a565b8101031261015e575167ffffffffffffffff8116810361015e5738806102d9565b503d610300565b83513d88823e3d90fd5b9091508281813d8311610371575b610354818361066a565b8101031261036d5751818116810361036d579038610252565b8680fd5b503d61034a565b84513d89823e3d90fd5b8580fd5b8380fd5b5050346100c657816003193601126100c65760025490516001600160a01b039091168152602090f35b83346101fb57806003193601126101fb576103cc610700565b600280546001600160a01b0319811690915581906001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a380f35b5050346100c657816003193601126100c657602091549051908152f35b90503461016257602036600319011261016257356001600160a01b03811690819003610162578282916020945260018452205415159051908152f35b8383346100c65760603660031901126100c65761048461062d565b916024359081151582036101fb5767ffffffffffffffff60443581811161016257366023820112156101625780870135958287116103865760248201916024883692010111610386576e5af43d82803e903d91602b57fd5bf36104e6826106a2565b918554908589519160208301938452168982015260608082015261052081610512608082018d89610649565b03601f19810183528261066a565b519020608883901c62ffffff16763d602d80600a3d3981f3363d3d373d3d3d363d7300000017865260789290921b176020526001600160a01b03906037600986f51695861561061d576105728761072c565b50855194877fb919910dcefbf753bfd926ab3b1d3f85d877190c3d01ba1bd585047b99b99f0b8680a26105aa575b6020878751908152f35b863b1561038657846105d38593829363439fab9160e01b845260208c8501526024840191610649565b038183895af18015610613576105eb575b80806105a0565b821161060057506020935081528380806105e4565b634e487b7160e01b815260418552602490fd5b84513d84823e3d90fd5b85516330be1a3d60e21b81528890fd5b6004359067ffffffffffffffff8216820361064457565b600080fd5b908060209392818452848401376000828201840152601f01601f1916010190565b90601f8019910116810190811067ffffffffffffffff82111761068c57604052565b634e487b7160e01b600052604160045260246000fd5b67ffffffffffffffff166003548110156106ea5760036000527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b01546001600160a01b031690565b634e487b7160e01b600052603260045260246000fd5b6002546001600160a01b0316330361071457565b60405163118cdaa760e01b8152336004820152602490fd5b6000818152600160205260408120546107bc578054600160401b8110156107a857600181018083558110156107945790826040927f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e5630155805492815260016020522055600190565b634e487b7160e01b82526032600452602482fd5b634e487b7160e01b82526041600452602482fd5b905090565b6000818152600460205260408120546107bc57600354600160401b8110156107a85760018101806003558110156107945790826040927fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b01556003549281526004602052205560019056fea2646970667358221220085692cfc5e93fc121b4cf38f5eca7b84b441eda0a937b255fb55e283d816aac64736f6c63430008190033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000003a04064068e3465a00214b5cf57bfb0a6757f70c
-----Decoded View---------------
Arg [0] : owner_ (address): 0x3a04064068E3465A00214b5Cf57bFB0a6757f70c
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 0000000000000000000000003a04064068e3465a00214b5cf57bfb0a6757f70c
Loading...
Loading
[ Download: CSV Export ]
[ 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.