Feature Tip: Add private address tag to any address under My Name Tag !
Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 6 from a total of 6 transactions
Latest 7 internal transactions
Advanced mode:
Parent Transaction Hash | Block |
From
|
To
|
|||
---|---|---|---|---|---|---|
21141298 | 82 days ago | Contract Creation | 0 ETH | |||
18119820 | 505 days ago | Contract Creation | 0 ETH | |||
18119816 | 505 days ago | Contract Creation | 0 ETH | |||
18119813 | 505 days ago | Contract Creation | 0 ETH | |||
18019689 | 519 days ago | Contract Creation | 0 ETH | |||
18019466 | 519 days ago | Contract Creation | 0 ETH | |||
18018683 | 519 days ago | Contract Creation | 0 ETH |
Loading...
Loading
Contract Source Code Verified (Exact Match)
Contract Name:
Create3Factory
Compiler Version
v0.8.19+commit.7dd6d404
Optimization Enabled:
Yes with 200 runs
Other Settings:
paris EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT // Modified from https://github.com/lifinance/create3-factory/blob/main/src/CREATE3Factory.sol pragma solidity ^0.8.0; import {Create3} from './Create3.sol'; import {Ownable} from '../oz-common/Ownable.sol'; import {ICreate3Factory} from './interfaces/ICreate3Factory.sol'; /** * @title Factory for deploying contracts to deterministic addresses via Create3 * @author BGD Labs * @notice Enables deploying contracts using CREATE3. Each deployer (msg.sender) has its own namespace for deployed addresses. */ contract Create3Factory is ICreate3Factory { /// @inheritdoc ICreate3Factory function create( bytes32 salt, bytes memory creationCode ) external payable returns (address) { // hash salt with the deployer address to give each deployer its own namespace salt = keccak256(abi.encodePacked(msg.sender, salt)); return Create3.create3(salt, creationCode, msg.value); } /// @inheritdoc ICreate3Factory function predictAddress( address deployer, bytes32 salt ) external view returns (address) { // hash salt with the deployer address to give each deployer its own namespace salt = keccak256(abi.encodePacked(deployer, salt)); return Create3.addressOf(salt); } }
//SPDX-License-Identifier: Unlicense // Modified from https://github.com/0xsequence/create3/blob/5a4a152e6be4e0ecfbbbe546992a5aaa43a4c1b0/contracts/Create3.sol by Agustin Aguilar <[email protected]> pragma solidity ^0.8.0; /** * @title A library for deploying contracts EIP-3171 style. * @author BGD Labs */ library Create3 { error ErrorCreatingProxy(); error ErrorCreatingContract(); error TargetAlreadyExists(); /** @notice The bytecode for a contract that proxies the creation of another contract @dev If this code is deployed using CREATE2 it can be used to decouple `creationCode` from the child contract address 0x00 0x63 0x63XXXXXX PUSH4 _code.length size 0x01 0x80 0x80 DUP1 size size 0x02 0x60 0x600e PUSH1 14 14 size size 0x03 0x60 0x6000 PUSH1 00 0 14 size size 0x04 0x39 0x39 CODECOPY size 0x05 0x60 0x6000 PUSH1 00 0 size 0x06 0xf3 0xf3 RETURN <--- CODE ---> 0x00 0x36 0x36 CALLDATASIZE cds 0x01 0x3d 0x3d RETURNDATASIZE 0 cds 0x02 0x80 0x80 DUP1 0 0 cds 0x03 0x37 0x37 CALLDATACOPY 0x04 0x36 0x36 CALLDATASIZE cds 0x05 0x3d 0x3d RETURNDATASIZE 0 cds 0x06 0x34 0x34 CALLVALUE val 0 cds 0x07 0xf0 0xf0 CREATE addr 0x08 0xff 0xff SELFDESTRUCT */ bytes internal constant PROXY_CHILD_BYTECODE = hex'63_00_00_00_09_80_60_0E_60_00_39_60_00_F3_36_3d_80_37_36_3d_34_f0_ff'; // KECCAK256_PROXY_CHILD_BYTECODE = keccak256(PROXY_CHILD_BYTECODE); bytes32 internal constant KECCAK256_PROXY_CHILD_BYTECODE = 0x68afe50fe78ae96feb6ec11f21f31fdd467c9fcc7add426282cfa3913daf04e9; /** * @notice Returns the size of the code on a given address * @param addr Address that may or may not contain code * @return size of the code on the given `_addr` */ function codeSize(address addr) internal view returns (uint256 size) { assembly { size := extcodesize(addr) } } /** * @notice Creates a new contract with given `_creationCode` and `_salt` * @param salt Salt of the contract creation, resulting address will be derivated from this value only * @param creationCode Creation code (constructor) of the contract to be deployed, this value doesn't affect the resulting address * @return address of the deployed contract, reverts on error */ function create3( bytes32 salt, bytes memory creationCode ) internal returns (address) { return create3(salt, creationCode, 0); } /** * @notice Creates a new contract with given `_creationCode` and `_salt` * @param salt Salt of the contract creation, resulting address will be derivated from this value only * @param creationCode Creation code (constructor) of the contract to be deployed, this value doesn't affect the resulting address * @param value In WEI of ETH to be forwarded to child contract * @return addr of the deployed contract, reverts on error */ function create3( bytes32 salt, bytes memory creationCode, uint256 value ) internal returns (address) { // Creation code bytes memory proxyCreationCode = PROXY_CHILD_BYTECODE; // Get target final address address deployedContract = addressOf(salt); if (codeSize(deployedContract) != 0) revert TargetAlreadyExists(); // Create CREATE2 proxy address proxy; assembly { proxy := create2( value, add(proxyCreationCode, 32), mload(proxyCreationCode), salt ) } if (proxy == address(0)) revert ErrorCreatingProxy(); // Call proxy with final init code (bool success, ) = proxy.call(creationCode); if (!success || codeSize(deployedContract) == 0) revert ErrorCreatingContract(); return deployedContract; } /** * @notice Computes the resulting address of a contract deployed using address(this) and the given `_salt` * @param salt Salt of the contract creation, resulting address will be derivated from this value only * @return address of the deployed contract, reverts on error * @dev The address creation formula is: keccak256(rlp([keccak256(0xff ++ address(this) ++ _salt ++ keccak256(childBytecode))[12:], 0x01])) */ function addressOf(bytes32 salt) internal view returns (address) { return addressOfWithPreDeployedFactory(salt, address(this)); } /** * @notice Computes the resulting address of a contract deployed using address of pre-deployed factory and the given `_salt` * @param salt Salt of the contract creation, resulting address will be derivated from this value only * @param preDeployedFactory address of a pre deployed create 3 factory (its the address that will be used to create the proxy) * @return address of the deployed contract, reverts on error * @dev The address creation formula is: keccak256(rlp([keccak256(0xff ++ address(preDeployedFactory) ++ _salt ++ keccak256(childBytecode))[12:], 0x01])) */ function addressOfWithPreDeployedFactory( bytes32 salt, address preDeployedFactory ) internal pure returns (address) { address proxy = address( uint160( uint256( keccak256( abi.encodePacked( hex'ff', preDeployedFactory, salt, KECCAK256_PROXY_CHILD_BYTECODE ) ) ) ) ); return address( uint160( uint256(keccak256(abi.encodePacked(hex'd6_94', proxy, hex'01'))) ) ); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol) // From commit https://github.com/OpenZeppelin/openzeppelin-contracts/commit/8b778fa20d6d76340c5fac1ed66c80273f05b95a pragma solidity ^0.8.0; import './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. * * By default, the owner account will be the one that deploys the contract. 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; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @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 { require(owner() == _msgSender(), 'Ownable: caller is not the owner'); } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing 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 { require(newOwner != address(0), 'Ownable: new owner is the zero address'); _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: AGPL-3.0 // Modified from https://github.com/lifinance/create3-factory/blob/main/src/ICREATE3Factory.sol pragma solidity >=0.6.0; /** * @title Factory for deploying contracts to deterministic addresses via Create3 * @author BGD Labs * @notice Defines the methods implemented on Create3Factory contract */ interface ICreate3Factory { /** * @notice Deploys a contract using Create3 * @dev The provided salt is hashed together with msg.sender to generate the final salt * @param salt The deployer-specific salt for determining the deployed contract's address * @param creationCode The creation code of the contract to deploy * @return The address of the deployed contract */ function create( bytes32 salt, bytes memory creationCode ) external payable returns (address); /** * @notice Predicts the address of a deployed contract * @dev The provided salt is hashed together with the deployer address to generate the final salt * @param deployer The deployer account that will call deploy() * @param salt The deployer-specific salt for determining the deployed contract's address * @return The address of the contract that will be deployed */ function predictAddress( address deployer, bytes32 salt ) external view returns (address); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) // From commit https://github.com/OpenZeppelin/openzeppelin-contracts/commit/8b778fa20d6d76340c5fac1ed66c80273f05b95a 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; } }
{ "remappings": [ "aave-address-book/=lib/aave-address-book/src/", "aave-crosschain-infra-scripts/=lib/aave-crosschain-infra/scripts/", "aave-crosschain-infra/=lib/aave-crosschain-infra/src/", "aave-token-v2/=lib/aave-token-v3/lib/aave-token-v2/contracts/", "aave-token-v3/=lib/aave-token-v3/src/", "aave-v3-core/=lib/aave-address-book/lib/aave-v3-core/", "ds-test/=lib/forge-std/lib/ds-test/src/", "erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/", "forge-std/=lib/forge-std/src/", "hyperlane-monorepo/=lib/aave-crosschain-infra/lib/hyperlane-monorepo/solidity/contracts/", "nitro-contracts/=lib/aave-crosschain-infra/lib/nitro-contracts/src/", "openzeppelin-contracts/=lib/openzeppelin-contracts/", "solidity-examples/=lib/aave-crosschain-infra/lib/solidity-examples/contracts/", "solidity-utils/=lib/solidity-utils/src/", "lib/aave-address-book:@aave/core-v3/=lib/aave-address-book/lib/aave-v3-core/", "lib/aave-address-book:@aave/periphery-v3/=lib/aave-address-book/lib/aave-v3-periphery/", "lib/aave-address-book:aave-v3-core/=lib/aave-address-book/lib/aave-v3-core/", "lib/aave-address-book:aave-v3-periphery/=lib/aave-address-book/lib/aave-v3-periphery/", "lib/aave-address-book:ds-test/=lib/aave-address-book/lib/forge-std/lib/ds-test/src/", "lib/aave-address-book:forge-std/=lib/aave-address-book/lib/forge-std/src/", "lib/aave-crosschain-infra:@aave/core-v3/=lib/aave-crosschain-infra/lib/aave-address-book/lib/aave-v3-core/", "lib/aave-crosschain-infra:@aave/periphery-v3/=lib/aave-crosschain-infra/lib/aave-address-book/lib/aave-v3-periphery/", "lib/aave-crosschain-infra:@openzeppelin/=lib/aave-crosschain-infra/lib/openzeppelin-contracts/", "lib/aave-crosschain-infra:aave-address-book/=lib/aave-crosschain-infra/lib/aave-address-book/src/", "lib/aave-crosschain-infra:aave-v3-core/=lib/aave-crosschain-infra/lib/aave-address-book/lib/aave-v3-core/", "lib/aave-crosschain-infra:aave-v3-periphery/=lib/aave-crosschain-infra/lib/aave-address-book/lib/aave-v3-periphery/", "lib/aave-crosschain-infra:ds-test/=lib/aave-crosschain-infra/lib/forge-std/lib/ds-test/src/", "lib/aave-crosschain-infra:forge-std/=lib/aave-crosschain-infra/lib/forge-std/src/", "lib/aave-crosschain-infra:hyperlane-monorepo/=lib/aave-crosschain-infra/lib/hyperlane-monorepo/solidity/contracts/", "lib/aave-crosschain-infra:nitro-contracts/=lib/aave-crosschain-infra/lib/nitro-contracts/src/", "lib/aave-crosschain-infra:openzeppelin-contracts/=lib/aave-crosschain-infra/lib/openzeppelin-contracts/", "lib/aave-crosschain-infra:solidity-examples/=lib/aave-crosschain-infra/lib/solidity-examples/contracts/", "lib/aave-crosschain-infra:solidity-utils/=lib/aave-crosschain-infra/lib/solidity-utils/src/", "lib/aave-token-v3:aave-token-v2/=lib/aave-token-v3/lib/aave-token-v2/contracts/", "lib/aave-token-v3:ds-test/=lib/aave-token-v3/lib/forge-std/lib/ds-test/src/", "lib/aave-token-v3:erc4626-tests/=lib/aave-token-v3/lib/openzeppelin-contracts/lib/erc4626-tests/", "lib/aave-token-v3:forge-std/=lib/aave-token-v3/lib/forge-std/src/", "lib/aave-token-v3:openzeppelin-contracts/=lib/aave-token-v3/lib/openzeppelin-contracts/", "lib/aave-token-v3:openzeppelin/=lib/aave-token-v3/lib/openzeppelin-contracts/contracts/", "lib/forge-std:ds-test/=lib/forge-std/lib/ds-test/src/", "lib/openzeppelin-contracts:ds-test/=lib/openzeppelin-contracts/lib/forge-std/lib/ds-test/src/", "lib/openzeppelin-contracts:erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/", "lib/openzeppelin-contracts:forge-std/=lib/openzeppelin-contracts/lib/forge-std/src/", "lib/openzeppelin-contracts:openzeppelin/=lib/openzeppelin-contracts/contracts/", "lib/solidity-utils:ds-test/=lib/solidity-utils/lib/forge-std/lib/ds-test/src/", "lib/solidity-utils:forge-std/=lib/solidity-utils/lib/forge-std/src/" ], "optimizer": { "enabled": true, "runs": 200 }, "metadata": { "useLiteralContent": false, "bytecodeHash": "ipfs", "appendCBOR": true }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "evmVersion": "paris", "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[],"name":"ErrorCreatingContract","type":"error"},{"inputs":[],"name":"ErrorCreatingProxy","type":"error"},{"inputs":[],"name":"TargetAlreadyExists","type":"error"},{"inputs":[{"internalType":"bytes32","name":"salt","type":"bytes32"},{"internalType":"bytes","name":"creationCode","type":"bytes"}],"name":"create","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"deployer","type":"address"},{"internalType":"bytes32","name":"salt","type":"bytes32"}],"name":"predictAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
608060405234801561001057600080fd5b50610458806100206000396000f3fe6080604052600436106100295760003560e01c80635b37e1501461002e578063cb1939421461005d575b600080fd5b61004161003c366004610300565b61007d565b6040516001600160a01b03909116815260200160405180910390f35b34801561006957600080fd5b506100416100783660046103bb565b6100ca565b6040516001600160601b03193360601b166020820152603481018390526000906054016040516020818303038152906040528051906020012092506100c383833461010f565b9392505050565b6040516001600160601b0319606084901b166020820152603481018290526000906054016040516020818303038152906040528051906020012091506100c38261023c565b60408051808201909152601781527f630000000980600e6000396000f3363d8037363d34f0ff0000000000000000006020820152600090816101508661023c565b9050803b156101725760405163cd43efa160e01b815260040160405180910390fd5b60008683516020850187f590506001600160a01b0381166101a65760405163bbd2fe8760e01b815260040160405180910390fd5b6000816001600160a01b0316876040516101c091906103f3565b6000604051808303816000865af19150503d80600081146101fd576040519150601f19603f3d011682016040523d82523d6000602084013e610202565b606091505b505090508015806102125750823b155b15610230576040516353de54b960e01b815260040160405180910390fd5b50909695505050505050565b604080516001600160f81b031960208083019190915230606090811b6001600160601b0319908116602185015260358401959095527f68afe50fe78ae96feb6ec11f21f31fdd467c9fcc7add426282cfa3913daf04e9605580850191909152845180850390910181526075840185528051908301206135a560f21b6095850152901b9093166097820152600160f81b60ab8201528151608c81830301815260ac909101909152805191012090565b634e487b7160e01b600052604160045260246000fd5b6000806040838503121561031357600080fd5b82359150602083013567ffffffffffffffff8082111561033257600080fd5b818501915085601f83011261034657600080fd5b813581811115610358576103586102ea565b604051601f8201601f19908116603f01168101908382118183101715610380576103806102ea565b8160405282815288602084870101111561039957600080fd5b8260208601602083013760006020848301015280955050505050509250929050565b600080604083850312156103ce57600080fd5b82356001600160a01b03811681146103e557600080fd5b946020939093013593505050565b6000825160005b8181101561041457602081860181015185830152016103fa565b50600092019182525091905056fea2646970667358221220e5cc0ba0a9ebc562dd1439f4b7c2377ac556cc4493ea5d5982deda365cbb3ab564736f6c63430008130033
Deployed Bytecode
0x6080604052600436106100295760003560e01c80635b37e1501461002e578063cb1939421461005d575b600080fd5b61004161003c366004610300565b61007d565b6040516001600160a01b03909116815260200160405180910390f35b34801561006957600080fd5b506100416100783660046103bb565b6100ca565b6040516001600160601b03193360601b166020820152603481018390526000906054016040516020818303038152906040528051906020012092506100c383833461010f565b9392505050565b6040516001600160601b0319606084901b166020820152603481018290526000906054016040516020818303038152906040528051906020012091506100c38261023c565b60408051808201909152601781527f630000000980600e6000396000f3363d8037363d34f0ff0000000000000000006020820152600090816101508661023c565b9050803b156101725760405163cd43efa160e01b815260040160405180910390fd5b60008683516020850187f590506001600160a01b0381166101a65760405163bbd2fe8760e01b815260040160405180910390fd5b6000816001600160a01b0316876040516101c091906103f3565b6000604051808303816000865af19150503d80600081146101fd576040519150601f19603f3d011682016040523d82523d6000602084013e610202565b606091505b505090508015806102125750823b155b15610230576040516353de54b960e01b815260040160405180910390fd5b50909695505050505050565b604080516001600160f81b031960208083019190915230606090811b6001600160601b0319908116602185015260358401959095527f68afe50fe78ae96feb6ec11f21f31fdd467c9fcc7add426282cfa3913daf04e9605580850191909152845180850390910181526075840185528051908301206135a560f21b6095850152901b9093166097820152600160f81b60ab8201528151608c81830301815260ac909101909152805191012090565b634e487b7160e01b600052604160045260246000fd5b6000806040838503121561031357600080fd5b82359150602083013567ffffffffffffffff8082111561033257600080fd5b818501915085601f83011261034657600080fd5b813581811115610358576103586102ea565b604051601f8201601f19908116603f01168101908382118183101715610380576103806102ea565b8160405282815288602084870101111561039957600080fd5b8260208601602083013760006020848301015280955050505050509250929050565b600080604083850312156103ce57600080fd5b82356001600160a01b03811681146103e557600080fd5b946020939093013593505050565b6000825160005b8181101561041457602081860181015185830152016103fa565b50600092019182525091905056fea2646970667358221220e5cc0ba0a9ebc562dd1439f4b7c2377ac556cc4493ea5d5982deda365cbb3ab564736f6c63430008130033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
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.