Address Contract Partially Verified
Address
0xe58e1002b51Bc5dDf941De3b900d7179e4ea97Bc
Balance
0 ETH
Nonce
8
Code Size
1202 bytes
Creator
0x992b9de7...b65B at tx 0xc480b78d...f5a618
Indexed Transactions
0
Contract Bytecode
1202 bytes
0x6080604052600436106100295760003560e01c806350f1c4641461002e578063cdcb760a1461006a575b600080fd5b34801561003a57600080fd5b5061004e610049366004610344565b61007d565b6040516001600160a01b03909116815260200160405180910390f35b61004e610078366004610392565b6100c9565b6040516001600160601b0319606084901b166020820152603481018290526000906054016040516020818303038152906040528051906020012091506100c28261010f565b9392505050565b6040516001600160601b03193360601b166020820152603481018390526000906054016040516020818303038152906040528051906020012092506100c28383346101e9565b604080518082018252601081526f67363d3d37363d34f03d5260086018f360801b60209182015290516001600160f81b0319918101919091526001600160601b03193060601b166021820152603581018290527f21c35dbe1b344a2488cf3321d6ce542f8e9f305544ff09e4993a62319a497c1f605582015260009081906101ae906075015b6040516020818303038152906040528051906020012090565b6040516135a560f21b60208201526001600160601b0319606083901b166022820152600160f81b60368201529091506100c290603701610195565b6000806040518060400160405280601081526020016f67363d3d37363d34f03d5260086018f360801b81525090506000858251602084016000f590506001600160a01b0381166102745760405162461bcd60e51b81526020600482015260116024820152701111541313d65351539517d19052531151607a1b60448201526064015b60405180910390fd5b61027d8661010f565b92506000816001600160a01b0316858760405161029a919061044d565b60006040518083038185875af1925050503d80600081146102d7576040519150601f19603f3d011682016040523d82523d6000602084013e6102dc565b606091505b505090508080156102f657506001600160a01b0384163b15155b61033a5760405162461bcd60e51b815260206004820152601560248201527412539255125053125690551253d397d19052531151605a1b604482015260640161026b565b5050509392505050565b6000806040838503121561035757600080fd5b82356001600160a01b038116811461036e57600080fd5b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b600080604083850312156103a557600080fd5b82359150602083013567ffffffffffffffff808211156103c457600080fd5b818501915085601f8301126103d857600080fd5b8135818111156103ea576103ea61037c565b604051601f8201601f19908116603f011681019083821181831017156104125761041261037c565b8160405282815288602084870101111561042b57600080fd5b8260208601602083013760006020848301015280955050505050509250929050565b6000825160005b8181101561046e5760208186018101518583015201610454565b50600092019182525091905056fea2646970667358221220718fe77a29851007aef939cd0f1b2ff53a267c7d604a98a074498aae8e5e9fd264736f6c63430008180033
Verified Source Code Partial Match
Compiler: v0.8.24+commit.e11b9ed9
EVM: paris
Optimization: Yes (200 runs)
Bytes32AddressLib.sol 14 lines
// SPDX-License-Identifier: AGPL-3.0-only
pragma solidity >=0.8.0;
/// @notice Library for converting between addresses and bytes32 values.
/// @author Solmate (https://github.com/transmissions11/solmate/blob/main/src/utils/Bytes32AddressLib.sol)
library Bytes32AddressLib {
function fromLast20Bytes(bytes32 bytesValue) internal pure returns (address) {
return address(uint160(uint256(bytesValue)));
}
function fillLast12Bytes(address addressValue) internal pure returns (bytes32) {
return bytes32(bytes20(addressValue));
}
}
CREATE3.sol 83 lines
// SPDX-License-Identifier: AGPL-3.0-only
pragma solidity >=0.8.0;
import {Bytes32AddressLib} from "./Bytes32AddressLib.sol";
/// @notice Deploy to deterministic addresses without an initcode factor.
/// @author Solmate (https://github.com/transmissions11/solmate/blob/main/src/utils/CREATE3.sol)
/// @author Modified from 0xSequence (https://github.com/0xSequence/create3/blob/master/contracts/Create3.sol)
library CREATE3 {
using Bytes32AddressLib for bytes32;
//--------------------------------------------------------------------------------//
// Opcode | Opcode + Arguments | Description | Stack View //
//--------------------------------------------------------------------------------//
// 0x36 | 0x36 | CALLDATASIZE | size //
// 0x3d | 0x3d | RETURNDATASIZE | 0 size //
// 0x3d | 0x3d | RETURNDATASIZE | 0 0 size //
// 0x37 | 0x37 | CALLDATACOPY | //
// 0x36 | 0x36 | CALLDATASIZE | size //
// 0x3d | 0x3d | RETURNDATASIZE | 0 size //
// 0x34 | 0x34 | CALLVALUE | value 0 size //
// 0xf0 | 0xf0 | CREATE | newContract //
//--------------------------------------------------------------------------------//
// Opcode | Opcode + Arguments | Description | Stack View //
//--------------------------------------------------------------------------------//
// 0x67 | 0x67XXXXXXXXXXXXXXXX | PUSH8 bytecode | bytecode //
// 0x3d | 0x3d | RETURNDATASIZE | 0 bytecode //
// 0x52 | 0x52 | MSTORE | //
// 0x60 | 0x6008 | PUSH1 08 | 8 //
// 0x60 | 0x6018 | PUSH1 18 | 24 8 //
// 0xf3 | 0xf3 | RETURN | //
//--------------------------------------------------------------------------------//
bytes internal constant PROXY_BYTECODE = hex"67_36_3d_3d_37_36_3d_34_f0_3d_52_60_08_60_18_f3";
bytes32 internal constant PROXY_BYTECODE_HASH = keccak256(PROXY_BYTECODE);
function deploy(
bytes32 salt,
bytes memory creationCode,
uint256 value
) internal returns (address deployed) {
bytes memory proxyChildBytecode = PROXY_BYTECODE;
address proxy;
/// @solidity memory-safe-assembly
assembly {
// Deploy a new contract with our pre-made bytecode via CREATE2.
// We start 32 bytes into the code to avoid copying the byte length.
proxy := create2(0, add(proxyChildBytecode, 32), mload(proxyChildBytecode), salt)
}
require(proxy != address(0), "DEPLOYMENT_FAILED");
deployed = getDeployed(salt);
(bool success, ) = proxy.call{value: value}(creationCode);
require(success && deployed.code.length != 0, "INITIALIZATION_FAILED");
}
function getDeployed(bytes32 salt) internal view returns (address) {
address proxy = keccak256(
abi.encodePacked(
// Prefix:
bytes1(0xFF),
// Creator:
address(this),
// Salt:
salt,
// Bytecode hash:
PROXY_BYTECODE_HASH
)
).fromLast20Bytes();
return
keccak256(
abi.encodePacked(
// 0xd6 = 0xc0 (short RLP prefix) + 0x16 (length of: 0x94 ++ proxy ++ 0x01)
// 0x94 = 0x80 + 0x14 (0x14 = the length of an address, 20 bytes, in hex)
hex"d6_94",
proxy,
hex"01" // Nonce of the proxy contract (1)
)
).fromLast20Bytes();
}
}
Create3.sol 40 lines
// SPDX-License-Identifier: AGPL-3.0
pragma solidity ^0.8.12;
import { CREATE3 } from "solmate/src/utils/CREATE3.sol";
/**
* @title Create3
* @notice Factory for deploying contracts to deterministic addresses via CREATE3 Enables deploying
* contracts using CREATE3. Each deployer (msg.sender) has its own namespace for deployed
* addresses.
* @author zefram.eth
* @custom:attribution zefram.eth (https://github.com/ZeframLou/create3-factory/blob/main/src/CREATE3Factory.sol)
*/
contract Create3 {
/**
* @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 deployed The address of the deployed contract
*/
function deploy(bytes32 salt, bytes memory creationCode) external payable returns (address deployed) {
// hash salt with the deployer address to give each deployer its own namespace
salt = keccak256(abi.encodePacked(msg.sender, salt));
return CREATE3.deploy(salt, creationCode, msg.value);
}
/**
* @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 deployed The address of the contract that will be deployed
*/
function getDeployed(address deployer, bytes32 salt) external view returns (address deployed) {
// hash salt with the deployer address to give each deployer its own namespace
salt = keccak256(abi.encodePacked(deployer, salt));
return CREATE3.getDeployed(salt);
}
}
Read Contract
getDeployed 0x50f1c464 → address
Write Contract 1 functions
These functions modify contract state and require a wallet transaction to execute.
deploy 0xcdcb760a
bytes32 salt
bytes creationCode
returns: address
Recent Transactions
No transactions found for this address