Address Contract Verified
Address
0x38Ab3f2CE00973A51d3A2A04d634C9bcbf20e4e1
Balance
0 ETH
Nonce
4
Code Size
4368 bytes
Creator
0xDB1fa656...CA80 at tx 0x0ea86e84...60e2af
Indexed Transactions
0 (4 on-chain, 1.2% indexed)
Contract Bytecode
4368 bytes
0x608060405260043610610093575f3560e01c80638da5cb5b11610066578063e30c39781161004c578063e30c397814610165578063f2fde38b1461018f578063fb237eb2146101ae575f80fd5b80638da5cb5b14610129578063bba155f414610152575f80fd5b8063200d9b1714610097578063715018a6146100b857806379ba5097146100cc5780637fde56da146100e0575b5f80fd5b3480156100a2575f80fd5b506100b66100b13660046109c4565b6101ec565b005b3480156100c3575f80fd5b506100b661027d565b3480156100d7575f80fd5b506100b6610290565b3480156100eb575f80fd5b506100ff6100fa3660046109ff565b61030c565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b348015610134575f80fd5b505f5473ffffffffffffffffffffffffffffffffffffffff166100ff565b6100ff610160366004610a88565b61031c565b348015610170575f80fd5b5060015473ffffffffffffffffffffffffffffffffffffffff166100ff565b34801561019a575f80fd5b506100b66101a9366004610bcc565b610464565b3480156101b9575f80fd5b506101dc6101c8366004610bcc565b60036020525f908152604090205460ff1681565b6040519015158152602001610120565b6101f4610513565b73ffffffffffffffffffffffffffffffffffffffff82165f8181526003602090815260409182902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001685151590811790915591519182527ff6019ec0a78d156d249a1ec7579e2321f6ac7521d6e1d2eacf90ba4a184dcceb910160405180910390a25050565b610285610513565b61028e5f610565565b565b600154339073ffffffffffffffffffffffffffffffffffffffff168114610300576040517f118cdaa700000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff821660048201526024015b60405180910390fd5b61030981610565565b50565b5f61031682610596565b92915050565b335f9081526003602052604081205460ff16610364576040517f584a793800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61036c6106fe565b8651602088012086146103ab576040517f8e3edfca00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b346103b68387610bee565b146103ed576040517f0bc185b700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6103fb88888787878761073f565b604080518a81526020810189905291925073ffffffffffffffffffffffffffffffffffffffff8316917f9f9c566772ebd31147263ece7c6da0220df641c474d0fb11b7691471022ca1f9910160405180910390a26104596001600255565b979650505050505050565b61046c610513565b6001805473ffffffffffffffffffffffffffffffffffffffff83167fffffffffffffffffffffffff000000000000000000000000000000000000000090911681179091556104ce5f5473ffffffffffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a350565b5f5473ffffffffffffffffffffffffffffffffffffffff16331461028e576040517f118cdaa70000000000000000000000000000000000000000000000000000000081523360048201526024016102f7565b600180547fffffffffffffffffffffffff000000000000000000000000000000000000000016905561030981610922565b5f803083604051806020016105aa90610996565b6020820181038252601f19601f8201166040525080519060200120604051602001610635939291907fff00000000000000000000000000000000000000000000000000000000000000815260609390931b7fffffffffffffffffffffffffffffffffffffffff0000000000000000000000001660018401526015830191909152603582015260550190565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815282825280516020918201207fd6940000000000000000000000000000000000000000000000000000000000008285015260601b7fffffffffffffffffffffffffffffffffffffffff0000000000000000000000001660228401527f0100000000000000000000000000000000000000000000000000000000000000603684015281516017818503018152603790930190915281519101209392505050565b6002805403610739576040517f3ee5aeb500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60028055565b5f806040518060200161075190610996565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe082820381018352601f9091011660405290505f61078e89610596565b9050803b156107c9576040517fcd43efa100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f898351602085015ff5905073ffffffffffffffffffffffffffffffffffffffff8116610822576040517fbbd2fe8700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8116634e8fec4a610848878b610bee565b8b8b8b8b8b6040518763ffffffff1660e01b815260040161086d959493929190610c26565b60206040518083038185885af1158015610889573d5f803e3d5ffd5b50505050506040513d601f19601f820116820180604052508101906108ae9190610cd4565b93508373ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614610915576040517f53de54b900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5050509695505050505050565b5f805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6103eb80610cf083390190565b73ffffffffffffffffffffffffffffffffffffffff81168114610309575f80fd5b5f80604083850312156109d5575f80fd5b82356109e0816109a3565b9150602083013580151581146109f4575f80fd5b809150509250929050565b5f60208284031215610a0f575f80fd5b5035919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b5f8083601f840112610a53575f80fd5b50813567ffffffffffffffff811115610a6a575f80fd5b602083019150836020828501011115610a81575f80fd5b9250929050565b5f805f805f805f60c0888a031215610a9e575f80fd5b87359650602088013567ffffffffffffffff811115610abb575f80fd5b8801601f81018a13610acb575f80fd5b803567ffffffffffffffff811115610ae557610ae5610a16565b6040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0603f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8501160116810181811067ffffffffffffffff82111715610b5157610b51610a16565b6040528181528282016020018c1015610b68575f80fd5b816020840160208301375f918101602001919091529650506040880135945060608801359350608088013567ffffffffffffffff811115610ba7575f80fd5b610bb38a828b01610a43565b989b979a5095989497959660a090950135949350505050565b5f60208284031215610bdc575f80fd5b8135610be7816109a3565b9392505050565b80820180821115610316577f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b608081525f8651806080840152806020890160a085015e5f60a082850101527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8201168301905086602084015260a08382030160408401528460a0820152848660c08301375f60c08287018101919091526060939093019390935250601f9092017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01601019392505050565b5f60208284031215610ce4575f80fd5b8151610be7816109a356fe60a0604052348015600e575f80fd5b50336080526080516103bb6100305f395f81816079015260b401526103bb5ff3fe608060405260043610610028575f3560e01c80634e8fec4a1461002c57806360f96a8f14610068575b5f80fd5b61003f61003a36600461024d565b61009b565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b348015610073575f80fd5b5061003f7f000000000000000000000000000000000000000000000000000000000000000081565b5f3373ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000161461010b576040517f283acf1800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b85516020870186f0905082156101d2575f808273ffffffffffffffffffffffffffffffffffffffff16848787604051610145929190610376565b5f6040518083038185875af1925050503d805f811461017f576040519150601f19603f3d011682016040523d82523d5f602084013e610184565b606091505b5091509150816101cf5780511561019d57805160208201fd5b6040517f957fa3a800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50505b95945050505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b5f8083601f840112610218575f80fd5b50813567ffffffffffffffff81111561022f575f80fd5b602083019150836020828501011115610246575f80fd5b9250929050565b5f805f805f60808688031215610261575f80fd5b853567ffffffffffffffff811115610277575f80fd5b8601601f81018813610287575f80fd5b803567ffffffffffffffff8111156102a1576102a16101db565b6040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0603f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8501160116810181811067ffffffffffffffff8211171561030d5761030d6101db565b6040528181528282016020018a1015610324575f80fd5b816020840160208301375f60209282018301529650870135945050604086013567ffffffffffffffff811115610358575f80fd5b61036488828901610208565b96999598509660600135949350505050565b818382375f910190815291905056fea2646970667358221220d1043c1189413e03f7a60d9f5a1efde954b166ae0e61fd8f55211f1d7f75aa6664736f6c634300081a0033a264697066735822122072f0e272875cf109b39f051495857c2545186b4ab4dfea71614725bc4bf5f48164736f6c634300081a0033
Verified Source Code Full Match
Compiler: v0.8.26+commit.8a97fa7a
EVM: cancun
Optimization: Yes (30000 runs)
Create3Factory.sol 57 lines
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.26;
import {ICreate3Factory} from "./interfaces/ICreate3Factory.sol";
import {Ownable2Step, Ownable} from "@openzeppelin/contracts/access/Ownable2Step.sol";
import {Create3} from "./libraries/Create3.sol";
import {ReentrancyGuard} from "@openzeppelin/contracts/utils/ReentrancyGuard.sol";
/// @notice Deploy contracts in a deterministic way using CREATE3
/// @dev ensure this contract is deployed on multiple chain with the same address
contract Create3Factory is ICreate3Factory, Ownable2Step, ReentrancyGuard {
event SetWhitelist(address indexed user, bool isWhitelist);
event Deployed(address indexed deployed, bytes32 salt, bytes32 creationCodeHash);
// Only whitelisted user can interact with create2Factory
mapping(address user => bool isWhitelisted) public isUserWhitelisted;
modifier onlyWhitelisted() {
if (!isUserWhitelisted[msg.sender]) revert NotWhitelisted();
_;
}
constructor() Ownable(msg.sender) {
isUserWhitelisted[msg.sender] = true;
}
/// @inheritdoc ICreate3Factory
function deploy(
bytes32 salt,
bytes memory creationCode,
bytes32 creationCodeHash,
uint256 creationFund,
bytes calldata afterDeploymentExecutionPayload,
uint256 afterDeploymentExecutionFund
) external payable onlyWhitelisted nonReentrant returns (address deployed) {
if (creationCodeHash != keccak256(creationCode)) revert CreationCodeHashMismatch();
if (creationFund + afterDeploymentExecutionFund != msg.value) revert FundsAmountMismatch();
deployed = Create3.create3(
salt, creationCode, creationFund, afterDeploymentExecutionPayload, afterDeploymentExecutionFund
);
emit Deployed(deployed, salt, creationCodeHash);
}
/// @inheritdoc ICreate3Factory
function computeAddress(bytes32 salt) public view returns (address) {
return Create3.addressOf(salt);
}
/// @inheritdoc ICreate3Factory
function setWhitelistUser(address user, bool isWhiteList) external onlyOwner {
isUserWhitelisted[user] = isWhiteList;
emit SetWhitelist(user, isWhiteList);
}
}
ICreate3Factory.sol 34 lines
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
interface ICreate3Factory {
error NotWhitelisted();
error CreationCodeHashMismatch();
error FundsAmountMismatch();
/**
* @notice create3 deploy a contract
* @dev So long the same salt is used, the contract will be deployed at the same address on other chain
* @param salt Salt of the contract creation, resulting address will be derived from this value only
* @param creationCode Creation code (constructor + args) of the contract to be deployed, this value doesn't affect the resulting address
* @param creationCodeHash Hash of the creation code, it can be used to verify the creation code
* @param creationFund In WEI of ETH to be forwarded to target contract constructor
* @param afterDeploymentExecutionPayload Payload to be executed after contract creation
* @param afterDeploymentExecutionFund In WEI of ETH to be forwarded to when executing after deployment initialization
* @return deployed of the deployed contract, reverts on error
*/
function deploy(
bytes32 salt,
bytes memory creationCode,
bytes32 creationCodeHash,
uint256 creationFund,
bytes calldata afterDeploymentExecutionPayload,
uint256 afterDeploymentExecutionFund
) external payable returns (address deployed);
/// @notice compute the create3 address based on salt
function computeAddress(bytes32 salt) external view returns (address);
/// @notice set user as whitelisted
function setWhitelistUser(address user, bool isWhiteList) external;
}
Ownable2Step.sol 59 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable2Step.sol)
pragma solidity ^0.8.20;
import {Ownable} from "./Ownable.sol";
/**
* @dev Contract module which provides access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* The initial owner is specified at deployment time in the constructor for `Ownable`. This
* can later be changed with {transferOwnership} and {acceptOwnership}.
*
* This module is used through inheritance. It will make available all functions
* from parent (Ownable).
*/
abstract contract Ownable2Step is Ownable {
address private _pendingOwner;
event OwnershipTransferStarted(address indexed previousOwner, address indexed newOwner);
/**
* @dev Returns the address of the pending owner.
*/
function pendingOwner() public view virtual returns (address) {
return _pendingOwner;
}
/**
* @dev Starts the ownership transfer of the contract to a new account. Replaces the pending transfer if there is one.
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public virtual override onlyOwner {
_pendingOwner = newOwner;
emit OwnershipTransferStarted(owner(), newOwner);
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`) and deletes any pending owner.
* Internal function without access restriction.
*/
function _transferOwnership(address newOwner) internal virtual override {
delete _pendingOwner;
super._transferOwnership(newOwner);
}
/**
* @dev The new owner accepts the ownership transfer.
*/
function acceptOwnership() public virtual {
address sender = _msgSender();
if (pendingOwner() != sender) {
revert OwnableUnauthorizedAccount(sender);
}
_transferOwnership(sender);
}
}
Create3.sol 84 lines
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.26;
import {CustomizedProxyChild} from "../CustomizedProxyChild.sol";
/**
* @dev Referenced from https://github.com/0xsequence/create3/blob/master/contracts/Create3.sol
* Updated PROXY_CHILD_BYTECODE to support customized deployment logic
* @title A library for deploying contracts EIP-3171 style.
* @author Agustin Aguilar <[email protected]>
*/
library Create3 {
error ErrorCreatingProxy();
error ErrorCreatingContract();
error TargetAlreadyExists();
bytes internal constant PROXY_CHILD_BYTECODE = type(CustomizedProxyChild).creationCode;
bytes32 internal constant KECCAK256_PROXY_CHILD_BYTECODE = keccak256(PROXY_CHILD_BYTECODE);
/**
* @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 derived from this value only
* @param _creationCode Creation code (constructor) of the contract to be deployed, this value doesn't affect the resulting address
* @param _creationFund In WEI of ETH to be forwarded to target contract constructor
* @param _afterDeploymentExecutionPayload Payload to be executed after contract creation
* @param _afterDeploymentExecutionFund In WEI of ETH to be forwarded to when executing after deployment initialization
* @return addr of the deployed contract, reverts on error
*/
function create3(
bytes32 _salt,
bytes memory _creationCode,
uint256 _creationFund,
bytes calldata _afterDeploymentExecutionPayload,
uint256 _afterDeploymentExecutionFund
) internal returns (address addr) {
// Creation code
bytes memory proxyCreationCode = PROXY_CHILD_BYTECODE;
// Get target final address
address preCalculatedAddr = addressOf(_salt);
if (codeSize(preCalculatedAddr) != 0) revert TargetAlreadyExists();
// Create CREATE2 proxy
address proxy;
assembly {
proxy := create2(0, add(proxyCreationCode, 32), mload(proxyCreationCode), _salt)
}
if (proxy == address(0)) revert ErrorCreatingProxy();
// Call proxy with final init code to deploy target contract
addr = CustomizedProxyChild(proxy).deploy{value: _creationFund + _afterDeploymentExecutionFund}(
_creationCode, _creationFund, _afterDeploymentExecutionPayload, _afterDeploymentExecutionFund
);
if (preCalculatedAddr != addr) revert ErrorCreatingContract();
}
/**
* @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 derived from this value only
* @return addr 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) {
address proxy = address(
uint160(uint256(keccak256(abi.encodePacked(hex"ff", address(this), _salt, KECCAK256_PROXY_CHILD_BYTECODE))))
);
return address(uint160(uint256(keccak256(abi.encodePacked(hex"d694", proxy, hex"01")))));
}
}
ReentrancyGuard.sol 84 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/ReentrancyGuard.sol)
pragma solidity ^0.8.20;
/**
* @dev Contract module that helps prevent reentrant calls to a function.
*
* Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
* available, which can be applied to functions to make sure there are no nested
* (reentrant) calls to them.
*
* Note that because there is a single `nonReentrant` guard, functions marked as
* `nonReentrant` may not call one another. This can be worked around by making
* those functions `private`, and then adding `external` `nonReentrant` entry
* points to them.
*
* TIP: If you would like to learn more about reentrancy and alternative ways
* to protect against it, check out our blog post
* https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
*/
abstract contract ReentrancyGuard {
// Booleans are more expensive than uint256 or any type that takes up a full
// word because each write operation emits an extra SLOAD to first read the
// slot's contents, replace the bits taken up by the boolean, and then write
// back. This is the compiler's defense against contract upgrades and
// pointer aliasing, and it cannot be disabled.
// The values being non-zero value makes deployment a bit more expensive,
// but in exchange the refund on every call to nonReentrant will be lower in
// amount. Since refunds are capped to a percentage of the total
// transaction's gas, it is best to keep them low in cases like this one, to
// increase the likelihood of the full refund coming into effect.
uint256 private constant NOT_ENTERED = 1;
uint256 private constant ENTERED = 2;
uint256 private _status;
/**
* @dev Unauthorized reentrant call.
*/
error ReentrancyGuardReentrantCall();
constructor() {
_status = NOT_ENTERED;
}
/**
* @dev Prevents a contract from calling itself, directly or indirectly.
* Calling a `nonReentrant` function from another `nonReentrant`
* function is not supported. It is possible to prevent this from happening
* by making the `nonReentrant` function external, and making it call a
* `private` function that does the actual work.
*/
modifier nonReentrant() {
_nonReentrantBefore();
_;
_nonReentrantAfter();
}
function _nonReentrantBefore() private {
// On the first call to nonReentrant, _status will be NOT_ENTERED
if (_status == ENTERED) {
revert ReentrancyGuardReentrantCall();
}
// Any calls to nonReentrant after this point will fail
_status = ENTERED;
}
function _nonReentrantAfter() private {
// By storing the original value once again, a refund is triggered (see
// https://eips.ethereum.org/EIPS/eip-2200)
_status = NOT_ENTERED;
}
/**
* @dev Returns true if the reentrancy guard is currently set to "entered", which indicates there is a
* `nonReentrant` function in the call stack.
*/
function _reentrancyGuardEntered() internal view returns (bool) {
return _status == ENTERED;
}
}
Ownable.sol 100 lines
// 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);
}
}
CustomizedProxyChild.sol 44 lines
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.0;
contract CustomizedProxyChild {
error NotFromParent();
error BackrunExecutionFailed();
address public immutable parent;
constructor() {
parent = msg.sender;
}
function deploy(bytes memory creationCode, uint256 creationFund, bytes calldata backRunPayload, uint256 backRunFund)
external
payable
returns (address addr)
{
// make sure only Create3Factory can deploy contract in case of unauthorized deployment
if (msg.sender != parent) {
revert NotFromParent();
}
assembly {
/// @dev create with creation code, deterministic addr since create(thisAddr=fixed, nonce=0)
addr := create(creationFund, add(creationCode, 32), mload(creationCode))
}
if (backRunPayload.length != 0) {
/// @dev This could be helpful when newly deployed contract
/// needs to run some initialization logic for example owner update
(bool success, bytes memory reason) = addr.call{value: backRunFund}(backRunPayload);
if (!success) {
// bubble up the revert reason from backrun if any
if (reason.length > 0) {
assembly {
revert(add(reason, 32), mload(reason))
}
}
revert BackrunExecutionFailed();
}
}
}
}
Context.sol 28 lines
// 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;
}
}
Read Contract
computeAddress 0x7fde56da → address
isUserWhitelisted 0xfb237eb2 → bool
owner 0x8da5cb5b → address
pendingOwner 0xe30c3978 → address
Write Contract 5 functions
These functions modify contract state and require a wallet transaction to execute.
acceptOwnership 0x79ba5097
No parameters
deploy 0xbba155f4
bytes32 salt
bytes creationCode
bytes32 creationCodeHash
uint256 creationFund
bytes afterDeploymentExecutionPayload
uint256 afterDeploymentExecutionFund
returns: address
renounceOwnership 0x715018a6
No parameters
setWhitelistUser 0x200d9b17
address user
bool isWhiteList
transferOwnership 0xf2fde38b
address newOwner
Recent Transactions
This address has 4 on-chain transactions, but only 1.2% of the chain is indexed. Transactions will appear as indexing progresses. View on Etherscan →