Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 318 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
Value | ||||
---|---|---|---|---|---|---|---|---|---|
Create | 16843450 | 482 days ago | IN | 0 ETH | 0.00447218 | ||||
Create | 15407066 | 685 days ago | IN | 0 ETH | 0.00235926 | ||||
Create | 15386824 | 689 days ago | IN | 0 ETH | 0.00062979 | ||||
Create | 15380390 | 690 days ago | IN | 0 ETH | 0.00249405 | ||||
Create | 15377112 | 690 days ago | IN | 0 ETH | 0.00156955 | ||||
Create | 15367042 | 692 days ago | IN | 0 ETH | 0.00265149 | ||||
Create | 15366888 | 692 days ago | IN | 0 ETH | 0.00354205 | ||||
Create | 15365387 | 692 days ago | IN | 0 ETH | 0.00194878 | ||||
Create | 15364683 | 692 days ago | IN | 0 ETH | 0.00142793 | ||||
Create | 15345138 | 695 days ago | IN | 0 ETH | 0.0026798 | ||||
Create | 15308150 | 701 days ago | IN | 0 ETH | 0.00215685 | ||||
Create | 15300388 | 702 days ago | IN | 0 ETH | 0.00230563 | ||||
Create | 15293650 | 703 days ago | IN | 0 ETH | 0.00133709 | ||||
Create | 15245694 | 711 days ago | IN | 0 ETH | 0.00346009 | ||||
Create | 15245685 | 711 days ago | IN | 0 ETH | 0.00284034 | ||||
Create | 15245661 | 711 days ago | IN | 0 ETH | 0.00173034 | ||||
Create | 15234818 | 712 days ago | IN | 0 ETH | 0.00318344 | ||||
Create | 15228213 | 713 days ago | IN | 0 ETH | 0.00312474 | ||||
Create | 15225530 | 714 days ago | IN | 0 ETH | 0.00947974 | ||||
Create | 15225172 | 714 days ago | IN | 0 ETH | 0.00366178 | ||||
Create | 15200739 | 718 days ago | IN | 0 ETH | 0.00189025 | ||||
Create | 15199248 | 718 days ago | IN | 0 ETH | 0.001781 | ||||
Create | 15197949 | 718 days ago | IN | 0 ETH | 0.00145674 | ||||
Create | 15197436 | 718 days ago | IN | 0 ETH | 0.00107186 | ||||
Create | 15197403 | 718 days ago | IN | 0 ETH | 0.00112514 |
Latest 25 internal transactions (View All)
Advanced mode:
Loading...
Loading
Contract Name:
ERC20Factory
Compiler Version
v0.8.10+commit.fc410830
Optimization Enabled:
Yes with 2000 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: GPL-3.0-or-later pragma solidity 0.8.10; import {IERC20Factory, IERC20FactoryEvents} from "./interface/IERC20Factory.sol"; import {IOwnableEvents} from "../../lib/Ownable.sol"; import {IERC20Events} from "./interface/IERC20.sol"; import {Clones} from "../Clones.sol"; interface IERC20 { function initialize( address owner_, string memory name_, string memory symbol_, uint256 totalSupply_, uint8 decimals_ ) external; } /** * @title ERC20Factory * @notice The `ERC20Factory` contract deploys ERC20 clones. After deployment, the * factory calls `initialize` to set up the ERC20 metadata and mint the initial total * supply to the owner's wallet. * @author MirrorXYZ */ contract ERC20Factory is IERC20Factory, IERC20FactoryEvents, IERC20Events, IOwnableEvents { /// @notice Address that holds the clone implementation address public immutable implementation; constructor(address implementation_) { implementation = implementation_; } //======== Deploy function ========= /// @notice Deploy an ERC20 clone. /// @param owner the owner of the ERC20 token /// @param name_ the ERC20 metadata name parameter /// @param symbol_ the ERC20 metadata symbol parameter /// @param totalSupply_ the ERC20 token initial supply, minted to `owner` /// @param decimals_ the ERC20 token decimals /// @param nonce an additional entropy input to the clones salt function create( address owner, string memory name_, string memory symbol_, uint256 totalSupply_, uint8 decimals_, uint256 nonce ) external override returns (address erc20Clone) { erc20Clone = Clones.cloneDeterministic( implementation, keccak256(abi.encode(owner, name_, symbol_, totalSupply_, nonce)) ); IERC20(erc20Clone).initialize( owner, name_, symbol_, totalSupply_, decimals_ ); emit ERC20Deployed(erc20Clone, name_, symbol_, owner); } function predictDeterministicAddress(address implementation_, bytes32 salt) external view override returns (address) { return Clones.predictDeterministicAddress( implementation_, salt, address(this) ); } }
// SPDX-License-Identifier: GPL-3.0-or-later pragma solidity 0.8.10; interface IERC20FactoryEvents { /// @notice New ERC20 clone deployed event ERC20Deployed( address clone, string name, string symbol, address operator ); } interface IERC20Factory { /// @notice Deploy a new clone function create( address operator, string memory name_, string memory symbol_, uint256 totalSupply_, uint8 decimals_, uint256 nonce ) external returns (address erc20Clone); function predictDeterministicAddress(address logic_, bytes32 salt) external view returns (address); }
// SPDX-License-Identifier: GPL-3.0-or-later pragma solidity 0.8.10; interface IOwnableEvents { event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); } contract Ownable is IOwnableEvents { address public owner; address private nextOwner; // modifiers modifier onlyOwner() { require(isOwner(), "caller is not the owner."); _; } modifier onlyNextOwner() { require(isNextOwner(), "current owner must set caller as next owner."); _; } /** * @dev Initialize contract by setting transaction submitter as initial owner. */ constructor(address owner_) { owner = owner_; emit OwnershipTransferred(address(0), owner); } /** * @dev Initiate ownership transfer by setting nextOwner. */ function transferOwnership(address nextOwner_) external onlyOwner { require(nextOwner_ != address(0), "Next owner is the zero address."); nextOwner = nextOwner_; } /** * @dev Cancel ownership transfer by deleting nextOwner. */ function cancelOwnershipTransfer() external onlyOwner { delete nextOwner; } /** * @dev Accepts ownership transfer by setting owner. */ function acceptOwnership() external onlyNextOwner { delete nextOwner; owner = msg.sender; emit OwnershipTransferred(owner, msg.sender); } /** * @dev Renounce ownership by setting owner to zero address. */ function renounceOwnership() external onlyOwner { _renounceOwnership(); } /** * @dev Returns true if the caller is the current owner. */ function isOwner() public view returns (bool) { return msg.sender == owner; } /** * @dev Returns true if the caller is the next owner. */ function isNextOwner() public view returns (bool) { return msg.sender == nextOwner; } function _setOwner(address previousOwner, address newOwner) internal { owner = newOwner; emit OwnershipTransferred(previousOwner, owner); } function _renounceOwnership() internal { emit OwnershipTransferred(owner, address(0)); owner = address(0); } }
// SPDX-License-Identifier: GPL-3.0-or-later pragma solidity 0.8.10; interface IERC20Events { /// @notice EIP-20 transfer event event Transfer(address indexed _from, address indexed _to, uint256 _value); /// @notice EIP-20 approval event event Approval( address indexed _owner, address indexed _spender, uint256 _value ); /// @notice Mint event event Mint(address indexed _to, uint256 _value); } interface IERC20 { function DOMAIN_SEPARATOR() external view returns (bytes32); function PERMIT_TYPEHASH() external view returns (bytes32); function initialize( address operator_, string memory name_, string memory symbol_, uint256 totalSupply_, uint8 decimals_ ) external returns (address); function setBurnable(bool canBurn) external; function name() external view returns (string memory); function symbol() external view returns (string memory); function decimals() external view returns (uint8); function totalSupply() external view returns (uint256); function balanceOf(address owner) external view returns (uint256); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 value) external returns (bool); function transfer(address to, uint256 value) external returns (bool); function transferFrom( address from, address to, uint256 amount ) external returns (bool); function permit( address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) external; function nonces(address owner) external view returns (uint256); function mint(address to, uint256 amount) external; function burn(uint256 amount) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (proxy/Clones.sol) pragma solidity ^0.8.0; /** * @dev Copy of OpenZeppelin's Clones contract * https://eips.ethereum.org/EIPS/eip-1167[EIP 1167] is a standard for * deploying minimal proxy contracts, also known as "clones". * * > To simply and cheaply clone contract functionality in an immutable way, this standard specifies * > a minimal bytecode implementation that delegates all calls to a known, fixed address. * * The library includes functions to deploy a proxy using either `create` (traditional deployment) or `create2` * (salted deterministic deployment). It also includes functions to predict the addresses of clones deployed using the * deterministic method. * * _Available since v3.4._ */ library Clones { /** * @dev Deploys and returns the address of a clone that mimics the behaviour of `implementation`. * * This function uses the create opcode, which should never revert. */ function clone(address implementation) internal returns (address instance) { assembly { let ptr := mload(0x40) mstore( ptr, 0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000000000000000000000 ) mstore(add(ptr, 0x14), shl(0x60, implementation)) mstore( add(ptr, 0x28), 0x5af43d82803e903d91602b57fd5bf30000000000000000000000000000000000 ) instance := create(0, ptr, 0x37) } require(instance != address(0), "ERC1167: create failed"); } /** * @dev Deploys and returns the address of a clone that mimics the behaviour of `implementation`. * * This function uses the create2 opcode and a `salt` to deterministically deploy * the clone. Using the same `implementation` and `salt` multiple time will revert, since * the clones cannot be deployed twice at the same address. */ function cloneDeterministic(address implementation, bytes32 salt) internal returns (address instance) { assembly { let ptr := mload(0x40) mstore( ptr, 0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000000000000000000000 ) mstore(add(ptr, 0x14), shl(0x60, implementation)) mstore( add(ptr, 0x28), 0x5af43d82803e903d91602b57fd5bf30000000000000000000000000000000000 ) instance := create2(0, ptr, 0x37, salt) } require(instance != address(0), "ERC1167: create2 failed"); } /** * @dev Computes the address of a clone deployed using {Clones-cloneDeterministic}. */ function predictDeterministicAddress( address implementation, bytes32 salt, address deployer ) internal pure returns (address predicted) { assembly { let ptr := mload(0x40) mstore( ptr, 0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000000000000000000000 ) mstore(add(ptr, 0x14), shl(0x60, implementation)) mstore( add(ptr, 0x28), 0x5af43d82803e903d91602b57fd5bf3ff00000000000000000000000000000000 ) mstore(add(ptr, 0x38), shl(0x60, deployer)) mstore(add(ptr, 0x4c), salt) mstore(add(ptr, 0x6c), keccak256(ptr, 0x37)) predicted := keccak256(add(ptr, 0x37), 0x55) } } /** * @dev Computes the address of a clone deployed using {Clones-cloneDeterministic}. */ function predictDeterministicAddress(address implementation, bytes32 salt) internal view returns (address predicted) { return predictDeterministicAddress(implementation, salt, address(this)); } }
{ "optimizer": { "enabled": true, "runs": 2000 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"implementation_","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_owner","type":"address"},{"indexed":true,"internalType":"address","name":"_spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"_value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"clone","type":"address"},{"indexed":false,"internalType":"string","name":"name","type":"string"},{"indexed":false,"internalType":"string","name":"symbol","type":"string"},{"indexed":false,"internalType":"address","name":"operator","type":"address"}],"name":"ERC20Deployed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_to","type":"address"},{"indexed":false,"internalType":"uint256","name":"_value","type":"uint256"}],"name":"Mint","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"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_from","type":"address"},{"indexed":true,"internalType":"address","name":"_to","type":"address"},{"indexed":false,"internalType":"uint256","name":"_value","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"string","name":"name_","type":"string"},{"internalType":"string","name":"symbol_","type":"string"},{"internalType":"uint256","name":"totalSupply_","type":"uint256"},{"internalType":"uint8","name":"decimals_","type":"uint8"},{"internalType":"uint256","name":"nonce","type":"uint256"}],"name":"create","outputs":[{"internalType":"address","name":"erc20Clone","type":"address"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"implementation","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"implementation_","type":"address"},{"internalType":"bytes32","name":"salt","type":"bytes32"}],"name":"predictDeterministicAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
60a060405234801561001057600080fd5b5060405161072138038061072183398101604081905261002f91610040565b6001600160a01b0316608052610070565b60006020828403121561005257600080fd5b81516001600160a01b038116811461006957600080fd5b9392505050565b608051610690610091600039600081816087015261014801526106906000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c8063360d0fad146100465780635c60da1b146100825780639178e90d146100a9575b600080fd5b61005961005436600461037c565b6100bc565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b6100597f000000000000000000000000000000000000000000000000000000000000000081565b6100596100b7366004610462565b610141565b60006101388383306040517f3d602d80600a3d3981f3363d3d373d3d3d363d730000000000000000000000008152606093841b60148201527f5af43d82803e903d91602b57fd5bf3ff000000000000000000000000000000006028820152921b6038830152604c8201526037808220606c830152605591012090565b90505b92915050565b600061019b7f00000000000000000000000000000000000000000000000000000000000000008888888887604051602001610180959493929190610550565b60405160208183030381529060405280519060200120610271565b6040517f4fd35acb00000000000000000000000000000000000000000000000000000000815290915073ffffffffffffffffffffffffffffffffffffffff821690634fd35acb906101f8908a908a908a908a908a906004016105a6565b600060405180830381600087803b15801561021257600080fd5b505af1158015610226573d6000803e3d6000fd5b505050507f7513f51c4585e1b3b02ac38c4ad53c34e2fc86e1727e8c83fad1bbae772911a48187878a60405161025f9493929190610603565b60405180910390a19695505050505050565b60006040517f3d602d80600a3d3981f3363d3d373d3d3d363d7300000000000000000000000081528360601b60148201527f5af43d82803e903d91602b57fd5bf300000000000000000000000000000000006028820152826037826000f591505073ffffffffffffffffffffffffffffffffffffffff811661013b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f455243313136373a2063726561746532206661696c6564000000000000000000604482015260640160405180910390fd5b803573ffffffffffffffffffffffffffffffffffffffff8116811461037757600080fd5b919050565b6000806040838503121561038f57600080fd5b61039883610353565b946020939093013593505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600082601f8301126103e657600080fd5b813567ffffffffffffffff80821115610401576104016103a6565b604051601f8301601f19908116603f01168101908282118183101715610429576104296103a6565b8160405283815286602085880101111561044257600080fd5b836020870160208301376000602085830101528094505050505092915050565b60008060008060008060c0878903121561047b57600080fd5b61048487610353565b9550602087013567ffffffffffffffff808211156104a157600080fd5b6104ad8a838b016103d5565b965060408901359150808211156104c357600080fd5b506104d089828a016103d5565b94505060608701359250608087013560ff811681146104ee57600080fd5b8092505060a087013590509295509295509295565b6000815180845260005b818110156105295760208185018101518683018201520161050d565b8181111561053b576000602083870101525b50601f01601f19169290920160200192915050565b73ffffffffffffffffffffffffffffffffffffffff8616815260a06020820152600061057f60a0830187610503565b82810360408401526105918187610503565b60608401959095525050608001529392505050565b73ffffffffffffffffffffffffffffffffffffffff8616815260a0602082015260006105d560a0830187610503565b82810360408401526105e78187610503565b91505083606083015260ff831660808301529695505050505050565b600073ffffffffffffffffffffffffffffffffffffffff8087168352608060208401526106336080840187610503565b83810360408501526106458187610503565b9250508084166060840152509594505050505056fea26469706673582212207c16131cde9e2fdf0a446a5aa0c42b88f977aca9fa238140333a16ea51e74b9d64736f6c634300080a003300000000000000000000000042ca48648b355e64ef68330e1743a4fa7e310e67
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106100415760003560e01c8063360d0fad146100465780635c60da1b146100825780639178e90d146100a9575b600080fd5b61005961005436600461037c565b6100bc565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b6100597f00000000000000000000000042ca48648b355e64ef68330e1743a4fa7e310e6781565b6100596100b7366004610462565b610141565b60006101388383306040517f3d602d80600a3d3981f3363d3d373d3d3d363d730000000000000000000000008152606093841b60148201527f5af43d82803e903d91602b57fd5bf3ff000000000000000000000000000000006028820152921b6038830152604c8201526037808220606c830152605591012090565b90505b92915050565b600061019b7f00000000000000000000000042ca48648b355e64ef68330e1743a4fa7e310e678888888887604051602001610180959493929190610550565b60405160208183030381529060405280519060200120610271565b6040517f4fd35acb00000000000000000000000000000000000000000000000000000000815290915073ffffffffffffffffffffffffffffffffffffffff821690634fd35acb906101f8908a908a908a908a908a906004016105a6565b600060405180830381600087803b15801561021257600080fd5b505af1158015610226573d6000803e3d6000fd5b505050507f7513f51c4585e1b3b02ac38c4ad53c34e2fc86e1727e8c83fad1bbae772911a48187878a60405161025f9493929190610603565b60405180910390a19695505050505050565b60006040517f3d602d80600a3d3981f3363d3d373d3d3d363d7300000000000000000000000081528360601b60148201527f5af43d82803e903d91602b57fd5bf300000000000000000000000000000000006028820152826037826000f591505073ffffffffffffffffffffffffffffffffffffffff811661013b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f455243313136373a2063726561746532206661696c6564000000000000000000604482015260640160405180910390fd5b803573ffffffffffffffffffffffffffffffffffffffff8116811461037757600080fd5b919050565b6000806040838503121561038f57600080fd5b61039883610353565b946020939093013593505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600082601f8301126103e657600080fd5b813567ffffffffffffffff80821115610401576104016103a6565b604051601f8301601f19908116603f01168101908282118183101715610429576104296103a6565b8160405283815286602085880101111561044257600080fd5b836020870160208301376000602085830101528094505050505092915050565b60008060008060008060c0878903121561047b57600080fd5b61048487610353565b9550602087013567ffffffffffffffff808211156104a157600080fd5b6104ad8a838b016103d5565b965060408901359150808211156104c357600080fd5b506104d089828a016103d5565b94505060608701359250608087013560ff811681146104ee57600080fd5b8092505060a087013590509295509295509295565b6000815180845260005b818110156105295760208185018101518683018201520161050d565b8181111561053b576000602083870101525b50601f01601f19169290920160200192915050565b73ffffffffffffffffffffffffffffffffffffffff8616815260a06020820152600061057f60a0830187610503565b82810360408401526105918187610503565b60608401959095525050608001529392505050565b73ffffffffffffffffffffffffffffffffffffffff8616815260a0602082015260006105d560a0830187610503565b82810360408401526105e78187610503565b91505083606083015260ff831660808301529695505050505050565b600073ffffffffffffffffffffffffffffffffffffffff8087168352608060208401526106336080840187610503565b83810360408501526106458187610503565b9250508084166060840152509594505050505056fea26469706673582212207c16131cde9e2fdf0a446a5aa0c42b88f977aca9fa238140333a16ea51e74b9d64736f6c634300080a0033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000042ca48648b355e64ef68330e1743a4fa7e310e67
-----Decoded View---------------
Arg [0] : implementation_ (address): 0x42ca48648b355e64ef68330e1743a4FA7e310e67
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 00000000000000000000000042ca48648b355e64ef68330e1743a4fa7e310e67
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 26 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
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.