Polygon Sponsored slots available. Book your slot here!
More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 31 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Deploy | 65271356 | 3 days ago | IN | 0 POL | 0.0392505 | ||||
Deploy | 60309417 | 127 days ago | IN | 0 POL | 0.08084212 | ||||
Deploy | 60307433 | 127 days ago | IN | 0 POL | 0.07876294 | ||||
Deploy | 58272181 | 178 days ago | IN | 0 POL | 0.09463856 | ||||
Deploy | 57985333 | 186 days ago | IN | 0 POL | 0.06963483 | ||||
Deploy | 55640187 | 247 days ago | IN | 0 POL | 0.05347418 | ||||
Deploy | 55640156 | 247 days ago | IN | 0 POL | 0.11115826 | ||||
Deploy | 55640112 | 247 days ago | IN | 0 POL | 0.10548768 | ||||
Deploy | 53512158 | 302 days ago | IN | 0 POL | 0.35490386 | ||||
Deploy | 53512154 | 302 days ago | IN | 0 POL | 0.12301446 | ||||
Update Deployer | 53509068 | 303 days ago | IN | 0 POL | 0.00385845 | ||||
Deploy | 45241619 | 513 days ago | IN | 0 POL | 0.2748911 | ||||
Deploy | 45241358 | 513 days ago | IN | 0 POL | 0.13960715 | ||||
Deploy | 45241353 | 513 days ago | IN | 0 POL | 0.62451049 | ||||
Deploy | 45241348 | 513 days ago | IN | 0 POL | 0.27182837 | ||||
Deploy | 45241343 | 513 days ago | IN | 0 POL | 0.90031653 | ||||
Deploy | 45241067 | 513 days ago | IN | 0 POL | 0.26119233 | ||||
Deploy | 45241062 | 513 days ago | IN | 0 POL | 0.13130373 | ||||
Deploy | 45241058 | 513 days ago | IN | 0 POL | 0.42385517 | ||||
Deploy | 45241054 | 513 days ago | IN | 0 POL | 0.11813735 | ||||
Deploy | 45241050 | 513 days ago | IN | 0 POL | 0.02302135 | ||||
Deploy | 45241045 | 513 days ago | IN | 0 POL | 0.32642303 | ||||
Deploy | 45241040 | 513 days ago | IN | 0 POL | 0.95792426 | ||||
Deploy | 45241036 | 513 days ago | IN | 0 POL | 0.23535186 | ||||
Deploy | 45241033 | 513 days ago | IN | 0 POL | 0.55569289 |
Latest 25 internal transactions (View All)
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 { function _msgSender() internal view virtual returns (address) { return msg.sender; } 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
[{"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
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
[ 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.