Source Code
Overview
ETH Balance
0 ETH
ETH Value
$0.00| Transaction Hash |
|
Block
|
From
|
To
|
|||||
|---|---|---|---|---|---|---|---|---|---|
Latest 1 internal transaction
Advanced mode:
| Parent Transaction Hash | Block | From | To | |||
|---|---|---|---|---|---|---|
| 13905220 | 84 days ago | Contract Creation | 0 ETH |
Cross-Chain Transactions
Loading...
Loading
Contract Name:
CREATE3Factory
Compiler Version
v0.8.27+commit.40a35a09
Optimization Enabled:
Yes with 100 runs
Other Settings:
cancun EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: AGPL-3.0
pragma solidity ^0.8.27;
import { CREATE3 } from "@solmate/utils/CREATE3.sol";
import { ICREATE3Factory } from "./ICREATE3Factory.sol";
/// @title Factory for deploying contracts to deterministic addresses via CREATE3
/// @author zefram.eth
/// @notice Enables deploying contracts using CREATE3. Each deployer (msg.sender) has
/// its own namespace for deployed addresses.
contract CREATE3Factory is ICREATE3Factory {
/// @inheritdoc ICREATE3Factory
function deploy(bytes32 salt, bytes memory creationCode) external payable override 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);
}
/// @inheritdoc ICREATE3Factory
function getDeployed(address deployer, bytes32 salt) external view override 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);
}
}// 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) {
return getDeployed(salt, address(this));
}
function getDeployed(bytes32 salt, address creator) internal pure returns (address) {
address proxy = keccak256(
abi.encodePacked(
// Prefix:
bytes1(0xFF),
// Creator:
creator,
// 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();
}
}// SPDX-License-Identifier: AGPL-3.0
pragma solidity >=0.6.0;
/// @title Factory for deploying contracts to deterministic addresses via CREATE3
/// @author zefram.eth
/// @notice Enables deploying contracts using CREATE3. Each deployer (msg.sender) has
/// its own namespace for deployed addresses.
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 deployed The address of the deployed contract
function deploy(bytes32 salt, bytes memory creationCode) external payable returns (address deployed);
/// @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);
}// 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));
}
}{
"remappings": [
"@CREATE3/=src/CREATE3/",
"@forge-std/=dependencies/forge-std-1.11.0/src/",
"@fun-contracts/=src/",
"@fun-test-contracts/=test/",
"@openzeppelin/contracts/=dependencies/@openzeppelin-contracts-5.4.0/",
"@solmate/=dependencies/solmate-89365b880c4f3c786bdd453d4b8e8fe410344a69/src/",
"CREATE3-1.0.0/=dependencies/CREATE3-1.0.0/",
"forge-std/=dependencies/forge-std-1.11.0/src/",
"@openzeppelin-contracts-5.4.0/=dependencies/@openzeppelin-contracts-5.4.0/",
"forge-std-1.11.0/=dependencies/forge-std-1.11.0/src/",
"solmate-89365b880c4f3c786bdd453d4b8e8fe410344a69/=dependencies/solmate-89365b880c4f3c786bdd453d4b8e8fe410344a69/src/"
],
"optimizer": {
"enabled": true,
"runs": 100
},
"metadata": {
"useLiteralContent": false,
"bytecodeHash": "ipfs",
"appendCBOR": true
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
},
"evmVersion": "cancun",
"viaIR": true,
"debug": {
"revertStrings": "debug"
}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"bytes32","name":"salt","type":"bytes32"},{"internalType":"bytes","name":"creationCode","type":"bytes"}],"name":"deploy","outputs":[{"internalType":"address","name":"deployed","type":"address"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"deployer","type":"address"},{"internalType":"bytes32","name":"salt","type":"bytes32"}],"name":"getDeployed","outputs":[{"internalType":"address","name":"deployed","type":"address"}],"stateMutability":"view","type":"function"}]Contract Creation Code
608080604052346018576040516105ac90816100668239f35b62461bcd60e51b815260206004820152602260248201527f45746865722073656e7420746f206e6f6e2d70617961626c652066756e63746960448201526137b760f11b6064820152608490fdfe6080806040526004361015610072575b60405162461bcd60e51b815260206004820152603560248201527f436f6e747261637420646f6573206e6f7420686176652066616c6c6261636b206044820152746e6f7220726563656976652066756e6374696f6e7360581b6064820152608490fd5b5f3560e01c90816350f1c4641461033d575063cdcb760a14610094575f61000f565b60403660031901126103385760243567ffffffffffffffff81116102e8573660238201121561028f578060040135906100cc8261048a565b916100da6040519384610454565b8083526020830191366024838301011161023a57815f926024602093018537840101526040513360601b6001600160601b0319166020820190815260043560348301529061013581605481015b03601f198101835282610454565b519020806101416104a6565b6020815191015ff56001600160a01b03811615610201575f92610166849330906104d4565b94519134905af13d156101fc573d61017d8161048a565b9061018b6040519283610454565b81525f60203d92013e5b806101f2575b156101b5576040516001600160a01b039091168152602090f35b60405162461bcd60e51b815260206004820152601560248201527412539255125053125690551253d397d19052531151605a1b6044820152606490fd5b50803b151561019b565b610195565b60405162461bcd60e51b81526020600482015260116024820152701111541313d65351539517d19052531151607a1b6044820152606490fd5b60405162461bcd60e51b815260206004820152602760248201527f414249206465636f64696e673a20696e76616c69642062797465206172726179604482015266040d8cadccee8d60cb1b6064820152608490fd5b60405162461bcd60e51b815260206004820152602b60248201527f414249206465636f64696e673a20696e76616c69642063616c6c64617461206160448201526a1c9c985e481bd9999cd95d60aa1b6064820152608490fd5b60405162461bcd60e51b815260206004820152602260248201527f414249206465636f64696e673a20696e76616c6964207475706c65206f666673604482015261195d60f21b6064820152608490fd5b610404565b346103b7576040366003190112610338576004356001600160a01b03811681036103b35760405160609190911b6001600160601b03191660208281019182526024356034840152916103a191906103978160548101610127565b51902030906104d4565b6040516001600160a01b039091168152f35b5f80fd5b62461bcd60e51b815260206004820152602260248201527f45746865722073656e7420746f206e6f6e2d70617961626c652066756e63746960448201526137b760f11b6064820152608490fd5b60405162461bcd60e51b815260206004820152602260248201527f414249206465636f64696e673a207475706c65206461746120746f6f2073686f6044820152611c9d60f21b6064820152608490fd5b90601f8019910116810190811067ffffffffffffffff82111761047657604052565b634e487b7160e01b5f52604160045260245ffd5b67ffffffffffffffff811161047657601f01601f191660200190565b604051906104b5604083610454565b601082526f67363d3d37363d34f03d5260086018f360801b6020830152565b6104dc6104a6565b6020815191012060405191602083019360ff60f81b85526bffffffffffffffffffffffff199060601b1660218401526035830152605582015260558152610524607582610454565b5190206040516135a560f21b6020820190815260609290921b6001600160601b0319166022820152600160f81b60368201526017815290610566603783610454565b905190206001600160a01b03169056fea26469706673582212205953ad4419db0c7f80b0a3583bb8493fd3bfcb1b01cd316985bc05fa976b01e864736f6c634300081b0033
Deployed Bytecode
0x6080806040526004361015610072575b60405162461bcd60e51b815260206004820152603560248201527f436f6e747261637420646f6573206e6f7420686176652066616c6c6261636b206044820152746e6f7220726563656976652066756e6374696f6e7360581b6064820152608490fd5b5f3560e01c90816350f1c4641461033d575063cdcb760a14610094575f61000f565b60403660031901126103385760243567ffffffffffffffff81116102e8573660238201121561028f578060040135906100cc8261048a565b916100da6040519384610454565b8083526020830191366024838301011161023a57815f926024602093018537840101526040513360601b6001600160601b0319166020820190815260043560348301529061013581605481015b03601f198101835282610454565b519020806101416104a6565b6020815191015ff56001600160a01b03811615610201575f92610166849330906104d4565b94519134905af13d156101fc573d61017d8161048a565b9061018b6040519283610454565b81525f60203d92013e5b806101f2575b156101b5576040516001600160a01b039091168152602090f35b60405162461bcd60e51b815260206004820152601560248201527412539255125053125690551253d397d19052531151605a1b6044820152606490fd5b50803b151561019b565b610195565b60405162461bcd60e51b81526020600482015260116024820152701111541313d65351539517d19052531151607a1b6044820152606490fd5b60405162461bcd60e51b815260206004820152602760248201527f414249206465636f64696e673a20696e76616c69642062797465206172726179604482015266040d8cadccee8d60cb1b6064820152608490fd5b60405162461bcd60e51b815260206004820152602b60248201527f414249206465636f64696e673a20696e76616c69642063616c6c64617461206160448201526a1c9c985e481bd9999cd95d60aa1b6064820152608490fd5b60405162461bcd60e51b815260206004820152602260248201527f414249206465636f64696e673a20696e76616c6964207475706c65206f666673604482015261195d60f21b6064820152608490fd5b610404565b346103b7576040366003190112610338576004356001600160a01b03811681036103b35760405160609190911b6001600160601b03191660208281019182526024356034840152916103a191906103978160548101610127565b51902030906104d4565b6040516001600160a01b039091168152f35b5f80fd5b62461bcd60e51b815260206004820152602260248201527f45746865722073656e7420746f206e6f6e2d70617961626c652066756e63746960448201526137b760f11b6064820152608490fd5b60405162461bcd60e51b815260206004820152602260248201527f414249206465636f64696e673a207475706c65206461746120746f6f2073686f6044820152611c9d60f21b6064820152608490fd5b90601f8019910116810190811067ffffffffffffffff82111761047657604052565b634e487b7160e01b5f52604160045260245ffd5b67ffffffffffffffff811161047657601f01601f191660200190565b604051906104b5604083610454565b601082526f67363d3d37363d34f03d5260086018f360801b6020830152565b6104dc6104a6565b6020815191012060405191602083019360ff60f81b85526bffffffffffffffffffffffff199060601b1660218401526035830152605582015260558152610524607582610454565b5190206040516135a560f21b6020820190815260609290921b6001600160601b0319166022820152600160f81b60368201526017815290610566603783610454565b905190206001600160a01b03169056fea26469706673582212205953ad4419db0c7f80b0a3583bb8493fd3bfcb1b01cd316985bc05fa976b01e864736f6c634300081b0033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 34 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|
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.