Source Code
Latest 25 from a total of 27 transactions
| Transaction Hash |
|
Block
|
From
|
To
|
|||||
|---|---|---|---|---|---|---|---|---|---|
| Deploy | 13468904 | 413 days ago | IN | 0 FRAX | 0.001905 | ||||
| Deploy | 8122074 | 536 days ago | IN | 0 FRAX | 0.00660259 | ||||
| Deploy | 8119806 | 536 days ago | IN | 0 FRAX | 0.00658584 | ||||
| Deploy | 6207475 | 581 days ago | IN | 0 FRAX | 0.00194069 | ||||
| Deploy | 5990055 | 586 days ago | IN | 0 FRAX | 0.00319269 | ||||
| Deploy | 5954743 | 587 days ago | IN | 0 FRAX | 0.00635869 | ||||
| Deploy | 5954738 | 587 days ago | IN | 0 FRAX | 0.00223429 | ||||
| Deploy | 5954615 | 587 days ago | IN | 0 FRAX | 0.0040608 | ||||
| Deploy | 5954598 | 587 days ago | IN | 0 FRAX | 0.00224456 | ||||
| Deploy | 5954438 | 587 days ago | IN | 0 FRAX | 0.00873846 | ||||
| Deploy | 5954432 | 587 days ago | IN | 0 FRAX | 0.00292348 | ||||
| Deploy | 5953793 | 587 days ago | IN | 0 FRAX | 0.00341141 | ||||
| Deploy | 5953786 | 587 days ago | IN | 0 FRAX | 0.00173651 | ||||
| Deploy | 5953780 | 587 days ago | IN | 0 FRAX | 0.00586391 | ||||
| Deploy | 5953773 | 587 days ago | IN | 0 FRAX | 0.00158144 | ||||
| Deploy | 5953767 | 587 days ago | IN | 0 FRAX | 0.00029057 | ||||
| Deploy | 5953760 | 587 days ago | IN | 0 FRAX | 0.0039052 | ||||
| Deploy | 5953754 | 587 days ago | IN | 0 FRAX | 0.01145932 | ||||
| Deploy | 5953739 | 587 days ago | IN | 0 FRAX | 0.00303531 | ||||
| Deploy | 5953733 | 587 days ago | IN | 0 FRAX | 0.00855012 | ||||
| Deploy | 5953350 | 587 days ago | IN | 0 FRAX | 0.00770398 | ||||
| Deploy | 5953343 | 587 days ago | IN | 0 FRAX | 0.0101066 | ||||
| Deploy | 5953336 | 587 days ago | IN | 0 FRAX | 0.00394865 | ||||
| Update Deployer | 5948734 | 587 days ago | IN | 0 FRAX | 0.00000047 | ||||
| Update Deployer | 5948719 | 587 days ago | IN | 0 FRAX | 0.00011636 |
Latest 25 internal transactions (View All)
Advanced mode:
Cross-Chain Transactions
Loading...
Loading
Contract Name:
Create2Factory
Compiler Version
v0.8.11+commit.d7f03943
Optimization Enabled:
Yes with 800 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT
pragma solidity 0.8.11;
import { Create2 } from "@openzeppelin/contracts-0.8/utils/Create2.sol";
import { Ownable } from "@openzeppelin/contracts-0.8/access/Ownable.sol";
/**
* @title Create2Factory
* @author AuraFinance
* @notice Deploy contracts using CREATE2 opcode.
* @dev A factory contract that uses the CREATE2 opcode to deploy contracts with a deterministic address.
*/
contract Create2Factory is Ownable {
/**
* @dev Event emitted when a contract is successfully deployed.
* @param salt A unique value used as part of the computation to determine the contract's address.
* @param deployed The address where the contract has been deployed.
*/
event Deployed(bytes32 indexed salt, address deployed);
// mapping to track which addresses can deploy contracts.
mapping(address => bool) public deployer;
/**
* @dev Throws error if called by any account other than the deployer.
*/
modifier onlyDeployer() {
require(deployer[msg.sender], "!deployer");
_;
}
/**
* @notice Adds or remove an address from the deployers' whitelist
* @param _deployer address of the authorized deployer
* @param _authorized Whether to add or remove deployer
*/
function updateDeployer(address _deployer, bool _authorized) external onlyOwner {
deployer[_deployer] = _authorized;
}
/**
* @notice Deploys a contract using the CREATE2 opcode.
* @param amount The amount of Ether to be sent with the transaction deploying the contract.
* @param salt A unique value used as part of the computation to determine the contract's address.
* @param bytecode The bytecode that will be used to create the contract.
* @param callbacks Callbacks to execute after contract is created.
* @return The address where the contract has been deployed.
*/
function deploy(
uint256 amount,
bytes32 salt,
bytes calldata bytecode,
bytes[] calldata callbacks
) external onlyDeployer returns (address) {
address deployedAddress = Create2.deploy(amount, salt, bytecode);
uint256 len = callbacks.length;
if (len > 0) {
for (uint256 i = 0; i < len; i++) {
_execute(deployedAddress, callbacks[i]);
}
}
emit Deployed(salt, deployedAddress);
return deployedAddress;
}
function _execute(address _to, bytes calldata _data) private returns (bool, bytes memory) {
(bool success, bytes memory result) = _to.call(_data);
require(success, "!success");
return (success, result);
}
function computeAddress(bytes32 salt, bytes32 codeHash) external view returns (address) {
return Create2.computeAddress(salt, codeHash);
}
/**
*
*@dev Fallback function that accepts Ether.
*/
receive() external payable {}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)
pragma solidity ^0.8.0;
import "../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.
*
* 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 Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
return _owner;
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
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: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)
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 {
/**
* @notice This function returns the address of the sender of the message.
* @dev This function is an internal view function that returns the address of the sender of the message.
*/
function _msgSender() internal view virtual returns (address) {
return msg.sender;
}
/**
* @notice _msgData() is an internal view function that returns the calldata of the message.
* @dev This function is used to access the calldata of the message.
*/
function _msgData() internal view virtual returns (bytes calldata) {
return msg.data;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Create2.sol)
pragma solidity ^0.8.0;
/**
* @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 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) {
address addr;
require(address(this).balance >= amount, "Create2: insufficient balance");
require(bytecode.length != 0, "Create2: bytecode length is zero");
assembly {
addr := create2(amount, add(bytecode, 0x20), mload(bytecode), salt)
}
require(addr != address(0), "Create2: Failed on deploy");
return 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 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) {
bytes32 _data = keccak256(abi.encodePacked(bytes1(0xff), deployer, salt, bytecodeHash));
return address(uint160(uint256(_data)));
}
}{
"metadata": {
"bytecodeHash": "none"
},
"optimizer": {
"enabled": true,
"runs": 800
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
},
"libraries": {}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"salt","type":"bytes32"},{"indexed":false,"internalType":"address","name":"deployed","type":"address"}],"name":"Deployed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"inputs":[{"internalType":"bytes32","name":"salt","type":"bytes32"},{"internalType":"bytes32","name":"codeHash","type":"bytes32"}],"name":"computeAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes32","name":"salt","type":"bytes32"},{"internalType":"bytes","name":"bytecode","type":"bytes"},{"internalType":"bytes[]","name":"callbacks","type":"bytes[]"}],"name":"deploy","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"deployer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_deployer","type":"address"},{"internalType":"bool","name":"_authorized","type":"bool"}],"name":"updateDeployer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]Contract Creation Code
608060405234801561001057600080fd5b5061001a3361001f565b61006f565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6109978061007e6000396000f3fe6080604052600436106100745760003560e01c8063715018a61161004e578063715018a6146100ff5780638da5cb5b14610114578063b9caf9d914610132578063f2fde38b1461017257600080fd5b80632276f38314610080578063481286e6146100bd5780635449c62f146100dd57600080fd5b3661007b57005b600080fd5b34801561008c57600080fd5b506100a061009b3660046107ae565b610192565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156100c957600080fd5b506100a06100d836600461085f565b6102db565b3480156100e957600080fd5b506100fd6100f836600461089d565b6102ee565b005b34801561010b57600080fd5b506100fd610373565b34801561012057600080fd5b506000546001600160a01b03166100a0565b34801561013e57600080fd5b5061016261014d3660046108d9565b60016020526000908152604090205460ff1681565b60405190151581526020016100b4565b34801561017e57600080fd5b506100fd61018d3660046108d9565b6103d9565b3360009081526001602052604081205460ff166101f65760405162461bcd60e51b815260206004820152600960248201527f216465706c6f796572000000000000000000000000000000000000000000000060448201526064015b60405180910390fd5b6000610239888888888080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506104bb92505050565b90508280156102915760005b8181101561028f5761027a83878784818110610263576102636108f4565b9050602002810190610275919061090a565b6105c5565b5050808061028790610951565b915050610245565b505b6040516001600160a01b038316815288907fe491e278e37782abe0872fe7c7b549cd7b0713d0c5c1e84a81899a5fdf32087b9060200160405180910390a250979650505050505050565b60006102e78383610686565b9392505050565b6000546001600160a01b031633146103485760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016101ed565b6001600160a01b03919091166000908152600160205260409020805460ff1916911515919091179055565b6000546001600160a01b031633146103cd5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016101ed565b6103d760006106fa565b565b6000546001600160a01b031633146104335760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016101ed565b6001600160a01b0381166104af5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016101ed565b6104b8816106fa565b50565b6000808447101561050e5760405162461bcd60e51b815260206004820152601d60248201527f437265617465323a20696e73756666696369656e742062616c616e636500000060448201526064016101ed565b825161055c5760405162461bcd60e51b815260206004820181905260248201527f437265617465323a2062797465636f6465206c656e677468206973207a65726f60448201526064016101ed565b8383516020850187f590506001600160a01b0381166105bd5760405162461bcd60e51b815260206004820152601960248201527f437265617465323a204661696c6564206f6e206465706c6f790000000000000060448201526064016101ed565b949350505050565b60006060600080866001600160a01b031686866040516105e692919061097a565b6000604051808303816000865af19150503d8060008114610623576040519150601f19603f3d011682016040523d82523d6000602084013e610628565b606091505b50915091508161067a5760405162461bcd60e51b815260206004820152600860248201527f217375636365737300000000000000000000000000000000000000000000000060448201526064016101ed565b90969095509350505050565b604080517fff000000000000000000000000000000000000000000000000000000000000006020808301919091526bffffffffffffffffffffffff193060601b16602183015260358201859052605580830185905283518084039091018152607590920190925280519101206000906102e7565b600080546001600160a01b038381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60008083601f84011261077457600080fd5b50813567ffffffffffffffff81111561078c57600080fd5b6020830191508360208260051b85010111156107a757600080fd5b9250929050565b600080600080600080608087890312156107c757600080fd5b8635955060208701359450604087013567ffffffffffffffff808211156107ed57600080fd5b818901915089601f83011261080157600080fd5b81358181111561081057600080fd5b8a602082850101111561082257600080fd5b60208301965080955050606089013591508082111561084057600080fd5b5061084d89828a01610762565b979a9699509497509295939492505050565b6000806040838503121561087257600080fd5b50508035926020909101359150565b80356001600160a01b038116811461089857600080fd5b919050565b600080604083850312156108b057600080fd5b6108b983610881565b9150602083013580151581146108ce57600080fd5b809150509250929050565b6000602082840312156108eb57600080fd5b6102e782610881565b634e487b7160e01b600052603260045260246000fd5b6000808335601e1984360301811261092157600080fd5b83018035915067ffffffffffffffff82111561093c57600080fd5b6020019150368190038213156107a757600080fd5b600060001982141561097357634e487b7160e01b600052601160045260246000fd5b5060010190565b818382376000910190815291905056fea164736f6c634300080b000a
Deployed Bytecode
0x6080604052600436106100745760003560e01c8063715018a61161004e578063715018a6146100ff5780638da5cb5b14610114578063b9caf9d914610132578063f2fde38b1461017257600080fd5b80632276f38314610080578063481286e6146100bd5780635449c62f146100dd57600080fd5b3661007b57005b600080fd5b34801561008c57600080fd5b506100a061009b3660046107ae565b610192565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156100c957600080fd5b506100a06100d836600461085f565b6102db565b3480156100e957600080fd5b506100fd6100f836600461089d565b6102ee565b005b34801561010b57600080fd5b506100fd610373565b34801561012057600080fd5b506000546001600160a01b03166100a0565b34801561013e57600080fd5b5061016261014d3660046108d9565b60016020526000908152604090205460ff1681565b60405190151581526020016100b4565b34801561017e57600080fd5b506100fd61018d3660046108d9565b6103d9565b3360009081526001602052604081205460ff166101f65760405162461bcd60e51b815260206004820152600960248201527f216465706c6f796572000000000000000000000000000000000000000000000060448201526064015b60405180910390fd5b6000610239888888888080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506104bb92505050565b90508280156102915760005b8181101561028f5761027a83878784818110610263576102636108f4565b9050602002810190610275919061090a565b6105c5565b5050808061028790610951565b915050610245565b505b6040516001600160a01b038316815288907fe491e278e37782abe0872fe7c7b549cd7b0713d0c5c1e84a81899a5fdf32087b9060200160405180910390a250979650505050505050565b60006102e78383610686565b9392505050565b6000546001600160a01b031633146103485760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016101ed565b6001600160a01b03919091166000908152600160205260409020805460ff1916911515919091179055565b6000546001600160a01b031633146103cd5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016101ed565b6103d760006106fa565b565b6000546001600160a01b031633146104335760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016101ed565b6001600160a01b0381166104af5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016101ed565b6104b8816106fa565b50565b6000808447101561050e5760405162461bcd60e51b815260206004820152601d60248201527f437265617465323a20696e73756666696369656e742062616c616e636500000060448201526064016101ed565b825161055c5760405162461bcd60e51b815260206004820181905260248201527f437265617465323a2062797465636f6465206c656e677468206973207a65726f60448201526064016101ed565b8383516020850187f590506001600160a01b0381166105bd5760405162461bcd60e51b815260206004820152601960248201527f437265617465323a204661696c6564206f6e206465706c6f790000000000000060448201526064016101ed565b949350505050565b60006060600080866001600160a01b031686866040516105e692919061097a565b6000604051808303816000865af19150503d8060008114610623576040519150601f19603f3d011682016040523d82523d6000602084013e610628565b606091505b50915091508161067a5760405162461bcd60e51b815260206004820152600860248201527f217375636365737300000000000000000000000000000000000000000000000060448201526064016101ed565b90969095509350505050565b604080517fff000000000000000000000000000000000000000000000000000000000000006020808301919091526bffffffffffffffffffffffff193060601b16602183015260358201859052605580830185905283518084039091018152607590920190925280519101206000906102e7565b600080546001600160a01b038381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60008083601f84011261077457600080fd5b50813567ffffffffffffffff81111561078c57600080fd5b6020830191508360208260051b85010111156107a757600080fd5b9250929050565b600080600080600080608087890312156107c757600080fd5b8635955060208701359450604087013567ffffffffffffffff808211156107ed57600080fd5b818901915089601f83011261080157600080fd5b81358181111561081057600080fd5b8a602082850101111561082257600080fd5b60208301965080955050606089013591508082111561084057600080fd5b5061084d89828a01610762565b979a9699509497509295939492505050565b6000806040838503121561087257600080fd5b50508035926020909101359150565b80356001600160a01b038116811461089857600080fd5b919050565b600080604083850312156108b057600080fd5b6108b983610881565b9150602083013580151581146108ce57600080fd5b809150509250929050565b6000602082840312156108eb57600080fd5b6102e782610881565b634e487b7160e01b600052603260045260246000fd5b6000808335601e1984360301811261092157600080fd5b83018035915067ffffffffffffffff82111561093c57600080fd5b6020019150368190038213156107a757600080fd5b600060001982141561097357634e487b7160e01b600052601160045260246000fd5b5060010190565b818382376000910190815291905056fea164736f6c634300080b000a
Loading...
Loading
Loading...
Loading
Loading...
Loading
Net Worth in USD
$0.00
Net Worth in FRAX
0.000002
Token Allocations
FRAX
100.00%
Multichain Portfolio | 35 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|---|---|---|---|---|
| FRAXTAL | 100.00% | $0.801695 | 0.00000224 | $0.000002 |
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.