Source Code
Overview
ETH Balance
0 ETH
More Info
ContractCreator
Multichain Info
N/A
Latest 25 from a total of 49 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Deploy | 7846530 | 75 days ago | IN | 0 ETH | 0.0002817 | ||||
Deploy | 7634393 | 106 days ago | IN | 0 ETH | 0.0008644 | ||||
Deploy | 7611388 | 110 days ago | IN | 0 ETH | 0.00793419 | ||||
Deploy | 7611388 | 110 days ago | IN | 0 ETH | 0.00528973 | ||||
Deploy | 7597437 | 111 days ago | IN | 0 ETH | 0.00342078 | ||||
Deploy | 7597272 | 111 days ago | IN | 0 ETH | 0.00231898 | ||||
Deploy | 7597265 | 111 days ago | IN | 0 ETH | 0.00233127 | ||||
Deploy | 7592344 | 112 days ago | IN | 0 ETH | 0.00070551 | ||||
Deploy | 7592337 | 112 days ago | IN | 0 ETH | 0.0006409 | ||||
Deploy | 7563462 | 116 days ago | IN | 0 ETH | 0.00115781 | ||||
Deploy | 7563444 | 116 days ago | IN | 0 ETH | 0.00114904 | ||||
Deploy | 7563439 | 116 days ago | IN | 0 ETH | 0.00121193 | ||||
Deploy | 7563431 | 116 days ago | IN | 0 ETH | 0.00130558 | ||||
Deploy | 7563425 | 116 days ago | IN | 0 ETH | 0.00116598 | ||||
Deploy | 7563418 | 116 days ago | IN | 0 ETH | 0.00121753 | ||||
Deploy | 7563411 | 116 days ago | IN | 0 ETH | 0.00120872 | ||||
Deploy | 7563409 | 116 days ago | IN | 0 ETH | 0.00117496 | ||||
Deploy | 7563409 | 116 days ago | IN | 0 ETH | 0.00117496 | ||||
Deploy | 7563399 | 116 days ago | IN | 0 ETH | 0.0011855 | ||||
Deploy | 7563387 | 116 days ago | IN | 0 ETH | 0.00120499 | ||||
Deploy | 7563382 | 116 days ago | IN | 0 ETH | 0.00127494 | ||||
Deploy | 7563363 | 116 days ago | IN | 0 ETH | 0.00135129 | ||||
Deploy | 7563358 | 116 days ago | IN | 0 ETH | 0.00137529 | ||||
Deploy | 7541440 | 119 days ago | IN | 0 ETH | 0.00103639 | ||||
Deploy | 7541381 | 119 days ago | IN | 0 ETH | 0.00092713 |
Latest 25 internal transactions (View All)
Advanced mode:
Parent Transaction Hash | Method | Block |
From
|
To
|
|||
---|---|---|---|---|---|---|---|
0x60806040 | 8353602 | 3 days ago | Contract Creation | 0 ETH | |||
0x60806040 | 8353602 | 3 days ago | Contract Creation | 0 ETH | |||
0x60806040 | 8331347 | 6 days ago | Contract Creation | 0 ETH | |||
0x60806040 | 8331347 | 6 days ago | Contract Creation | 0 ETH | |||
0x60806040 | 8295719 | 11 days ago | Contract Creation | 0 ETH | |||
0x60806040 | 8295719 | 11 days ago | Contract Creation | 0 ETH | |||
0x60806040 | 8275963 | 14 days ago | Contract Creation | 0 ETH | |||
0x60806040 | 8275963 | 14 days ago | Contract Creation | 0 ETH | |||
0x60806040 | 8274789 | 14 days ago | Contract Creation | 0 ETH | |||
0x60806040 | 8274789 | 14 days ago | Contract Creation | 0 ETH | |||
0x60806040 | 8274603 | 14 days ago | Contract Creation | 0 ETH | |||
0x60806040 | 8274598 | 14 days ago | Contract Creation | 0 ETH | |||
0x60806040 | 8274598 | 14 days ago | Contract Creation | 0 ETH | |||
0x60806040 | 8228293 | 20 days ago | Contract Creation | 0 ETH | |||
0x60806040 | 8228293 | 20 days ago | Contract Creation | 0 ETH | |||
0x60806040 | 8228280 | 20 days ago | Contract Creation | 0 ETH | |||
0x60806040 | 8228262 | 20 days ago | Contract Creation | 0 ETH | |||
0x60806040 | 8228244 | 20 days ago | Contract Creation | 0 ETH | |||
0x60806040 | 8228243 | 20 days ago | Contract Creation | 0 ETH | |||
0x60806040 | 8228243 | 20 days ago | Contract Creation | 0 ETH | |||
0x60806040 | 8228228 | 20 days ago | Contract Creation | 0 ETH | |||
0x60806040 | 8228224 | 20 days ago | Contract Creation | 0 ETH | |||
0x60806040 | 8228222 | 20 days ago | Contract Creation | 0 ETH | |||
0x60806040 | 8228215 | 20 days ago | Contract Creation | 0 ETH | |||
0x60806040 | 8228215 | 20 days ago | Contract Creation | 0 ETH |
Loading...
Loading
Contract Source Code Verified (Exact Match)
Contract Name:
SimpleFactory
Compiler Version
v0.8.23+commit.f704f362
Optimization Enabled:
Yes with 200 runs
Other Settings:
london EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT AND Apache-2.0 pragma solidity 0.8.23; import { Create2 } from "@openzeppelin/contracts/utils/Create2.sol"; contract SimpleFactory { ////////////////////////////// Events ////////////////////////////// event Deployed(address indexed addr); ////////////////////////////// Custom Errors ////////////////////////////// /** * @dev The contract deployed is empty */ error SimpleFactoryEmptyContract(address deployed); ////////////////////////////// External Methods ////////////////////////////// /** * @notice Deploys a contract using create2 * @param _bytecode the bytecode of the contract to deploy * @param _salt the salt to use for create2 */ function deploy(bytes memory _bytecode, bytes32 _salt) external returns (address addr_) { addr_ = Create2.deploy(0, _salt, _bytecode); if (addr_.code.length == 0) revert SimpleFactoryEmptyContract(addr_); emit Deployed(addr_); } /** * @dev Returns the address where a contract will be stored if deployed via {deploy}. Any change in the * `bytecodeHash` or `salt` will result in a new destination address. */ function computeAddress(bytes32 _bytecodeHash, bytes32 _salt) external view returns (address addr_) { return Create2.computeAddress(_salt, _bytecodeHash); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/Create2.sol) pragma solidity ^0.8.20; /** * @dev Helper to make usage of the `CREATE2` EVM opcode easier and safer. * `CREATE2` can be used to compute in advance the address where a smart * contract will be deployed, which allows for interesting new mechanisms known * as 'counterfactual interactions'. * * See the https://eips.ethereum.org/EIPS/eip-1014#motivation[EIP] for more * information. */ library Create2 { /** * @dev Not enough balance for performing a CREATE2 deploy. */ error Create2InsufficientBalance(uint256 balance, uint256 needed); /** * @dev There's no code to deploy. */ error Create2EmptyBytecode(); /** * @dev The deployment failed. */ error Create2FailedDeployment(); /** * @dev Deploys a contract using `CREATE2`. The address where the contract * will be deployed can be known in advance via {computeAddress}. * * The bytecode for a contract can be obtained from Solidity with * `type(contractName).creationCode`. * * Requirements: * * - `bytecode` must not be empty. * - `salt` must have not been used for `bytecode` already. * - the factory must have a balance of at least `amount`. * - if `amount` is non-zero, `bytecode` must have a `payable` constructor. */ function deploy(uint256 amount, bytes32 salt, bytes memory bytecode) internal returns (address addr) { if (address(this).balance < amount) { revert Create2InsufficientBalance(address(this).balance, amount); } if (bytecode.length == 0) { revert Create2EmptyBytecode(); } /// @solidity memory-safe-assembly assembly { addr := create2(amount, add(bytecode, 0x20), mload(bytecode), salt) } if (addr == address(0)) { revert Create2FailedDeployment(); } } /** * @dev Returns the address where a contract will be stored if deployed via {deploy}. Any change in the * `bytecodeHash` or `salt` will result in a new destination address. */ function computeAddress(bytes32 salt, bytes32 bytecodeHash) internal view returns (address) { return computeAddress(salt, bytecodeHash, address(this)); } /** * @dev Returns the address where a contract will be stored if deployed via {deploy} from a contract located at * `deployer`. If `deployer` is this contract's address, returns the same value as {computeAddress}. */ function computeAddress(bytes32 salt, bytes32 bytecodeHash, address deployer) internal pure returns (address addr) { /// @solidity memory-safe-assembly assembly { let ptr := mload(0x40) // Get free memory pointer // | | ↓ ptr ... ↓ ptr + 0x0B (start) ... ↓ ptr + 0x20 ... ↓ ptr + 0x40 ... | // |-------------------|---------------------------------------------------------------------------| // | bytecodeHash | CCCCCCCCCCCCC...CC | // | salt | BBBBBBBBBBBBB...BB | // | deployer | 000000...0000AAAAAAAAAAAAAAAAAAA...AA | // | 0xFF | FF | // |-------------------|---------------------------------------------------------------------------| // | memory | 000000...00FFAAAAAAAAAAAAAAAAAAA...AABBBBBBBBBBBBB...BBCCCCCCCCCCCCC...CC | // | keccak(start, 85) | ↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑ | mstore(add(ptr, 0x40), bytecodeHash) mstore(add(ptr, 0x20), salt) mstore(ptr, deployer) // Right-aligned with 12 preceding garbage bytes let start := add(ptr, 0x0b) // The hashed data starts at the final garbage byte which we will set to 0xff mstore8(start, 0xff) addr := keccak256(start, 85) } } }
{ "remappings": [ "@account-abstraction/=lib/account-abstraction/contracts/", "@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/", "@openzeppelin/contracts-upgradeable/=lib/openzeppelin-upgradable-contracts/contracts/", "ds-test/=lib/forge-std/lib/ds-test/src/", "forge-std/=lib/forge-std/src/", "@solidity-stringutils/=lib/solidity-stringutils/src/", "@bytes-utils/=lib/solidity-bytes-utils/contracts/", "@freshCryptoLib/=lib/FreshCryptoLib/solidity/src/", "@erc7579/=lib/erc7579-implementation/src/", "FreshCryptoLib/=lib/FreshCryptoLib/solidity/src/", "account-abstraction/=lib/account-abstraction/contracts/", "erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/", "erc7579-implementation/=lib/erc7579-implementation/src/", "openzeppelin-contracts/=lib/openzeppelin-contracts/", "sentinellist/=lib/erc7579-implementation/node_modules/sentinellist/src/", "solady/=lib/erc7579-implementation/node_modules/solady/", "solarray/=lib/erc7579-implementation/node_modules/solarray/src/", "solidity-bytes-utils/=lib/solidity-bytes-utils/contracts/", "solidity-stringutils/=lib/solidity-stringutils/" ], "optimizer": { "enabled": true, "runs": 200 }, "metadata": { "useLiteralContent": false, "bytecodeHash": "ipfs", "appendCBOR": true }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "evmVersion": "london", "viaIR": false, "libraries": {} }
Contract ABI
API[{"inputs":[],"name":"Create2EmptyBytecode","type":"error"},{"inputs":[],"name":"Create2FailedDeployment","type":"error"},{"inputs":[{"internalType":"uint256","name":"balance","type":"uint256"},{"internalType":"uint256","name":"needed","type":"uint256"}],"name":"Create2InsufficientBalance","type":"error"},{"inputs":[{"internalType":"address","name":"deployed","type":"address"}],"name":"SimpleFactoryEmptyContract","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"addr","type":"address"}],"name":"Deployed","type":"event"},{"inputs":[{"internalType":"bytes32","name":"_bytecodeHash","type":"bytes32"},{"internalType":"bytes32","name":"_salt","type":"bytes32"}],"name":"computeAddress","outputs":[{"internalType":"address","name":"addr_","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"_bytecode","type":"bytes"},{"internalType":"bytes32","name":"_salt","type":"bytes32"}],"name":"deploy","outputs":[{"internalType":"address","name":"addr_","type":"address"}],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
608060405234801561001057600080fd5b506102ef806100206000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c8063481286e61461003b5780634af63f021461006a575b600080fd5b61004e6100493660046101cc565b61007d565b6040516001600160a01b03909116815260200160405180910390f35b61004e610078366004610204565b610090565b60006100898284610115565b9392505050565b600061009e60008385610122565b9050806001600160a01b03163b6000036100db576040516301e3495560e61b81526001600160a01b03821660048201526024015b60405180910390fd5b6040516001600160a01b038216907ff40fcec21964ffb566044d083b4073f29f7f7929110ea19e1b3ebe375d89055e90600090a292915050565b60006100898383306101a2565b60008347101561014e5760405163392efb2b60e21b8152476004820152602481018590526044016100d2565b815160000361017057604051631328927760e21b815260040160405180910390fd5b8282516020840186f590506001600160a01b03811661008957604051633a0ba96160e11b815260040160405180910390fd5b6000604051836040820152846020820152828152600b8101905060ff815360559020949350505050565b600080604083850312156101df57600080fd5b50508035926020909101359150565b634e487b7160e01b600052604160045260246000fd5b6000806040838503121561021757600080fd5b823567ffffffffffffffff8082111561022f57600080fd5b818501915085601f83011261024357600080fd5b813581811115610255576102556101ee565b604051601f8201601f19908116603f0116810190838211818310171561027d5761027d6101ee565b8160405282815288602084870101111561029657600080fd5b82602086016020830137600060209382018401529896909101359650505050505056fea2646970667358221220a4f98720e260ac7efccc9b974672f0f0444b653cb7fb85a3bcb7c283e5f7e1c564736f6c63430008170033
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106100365760003560e01c8063481286e61461003b5780634af63f021461006a575b600080fd5b61004e6100493660046101cc565b61007d565b6040516001600160a01b03909116815260200160405180910390f35b61004e610078366004610204565b610090565b60006100898284610115565b9392505050565b600061009e60008385610122565b9050806001600160a01b03163b6000036100db576040516301e3495560e61b81526001600160a01b03821660048201526024015b60405180910390fd5b6040516001600160a01b038216907ff40fcec21964ffb566044d083b4073f29f7f7929110ea19e1b3ebe375d89055e90600090a292915050565b60006100898383306101a2565b60008347101561014e5760405163392efb2b60e21b8152476004820152602481018590526044016100d2565b815160000361017057604051631328927760e21b815260040160405180910390fd5b8282516020840186f590506001600160a01b03811661008957604051633a0ba96160e11b815260040160405180910390fd5b6000604051836040820152846020820152828152600b8101905060ff815360559020949350505050565b600080604083850312156101df57600080fd5b50508035926020909101359150565b634e487b7160e01b600052604160045260246000fd5b6000806040838503121561021757600080fd5b823567ffffffffffffffff8082111561022f57600080fd5b818501915085601f83011261024357600080fd5b813581811115610255576102556101ee565b604051601f8201601f19908116603f0116810190838211818310171561027d5761027d6101ee565b8160405282815288602084870101111561029657600080fd5b82602086016020830137600060209382018401529896909101359650505050505056fea2646970667358221220a4f98720e260ac7efccc9b974672f0f0444b653cb7fb85a3bcb7c283e5f7e1c564736f6c63430008170033
Loading...
Loading
Loading...
Loading
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.