Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Latest 1 internal transaction
Advanced mode:
Parent Transaction Hash | Block |
From
|
To
|
|||
---|---|---|---|---|---|---|
12136677 | 1397 days ago | Contract Creation | 0 ETH |
Loading...
Loading
This contract may be a proxy contract. Click on More Options and select Is this a proxy? to confirm and enable the "Read as Proxy" & "Write as Proxy" tabs.
Contract Source Code Verified (Exact Match)
Contract Name:
MinimalProxyFactory
Compiler Version
v0.6.2+commit.bacdbe57
Contract Source Code (Solidity)
/** *Submitted for verification at Etherscan.io on 2021-03-29 */ // File: @openzeppelin/contracts/utils/Create2.sol // SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <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"); // solhint-disable-next-line no-inline-assembly 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))); } } // File: contracts/helpers/MinimalProxyFactory.sol pragma solidity 0.6.2; contract MinimalProxyFactory { event MinimalProxyCreated(address minimalProxy); function computeAddress(uint256 salt, address implementation) public view returns (address) { return Create2.computeAddress( keccak256(abi.encodePacked(salt)), keccak256(getContractCreationCode(implementation)), address(this) ); } function deploy( uint256 salt, address implementation ) public returns(address) { address minimalProxy = Create2.deploy( 0, keccak256(abi.encodePacked(salt)), getContractCreationCode(implementation) ); emit MinimalProxyCreated(minimalProxy); return minimalProxy; } function getContractCreationCode(address logic) internal pure returns (bytes memory) { bytes10 creation = 0x3d602d80600a3d3981f3; bytes10 prefix = 0x363d3d373d3d3d363d73; bytes20 targetBytes = bytes20(logic); bytes15 suffix = 0x5af43d82803e903d91602b57fd5bf3; return abi.encodePacked(creation, prefix, targetBytes, suffix); } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"minimalProxy","type":"address"}],"name":"MinimalProxyCreated","type":"event"},{"inputs":[{"internalType":"uint256","name":"salt","type":"uint256"},{"internalType":"address","name":"implementation","type":"address"}],"name":"computeAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"salt","type":"uint256"},{"internalType":"address","name":"implementation","type":"address"}],"name":"deploy","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
608060405234801561001057600080fd5b50610396806100206000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c80632ee5001f1461003b578063df02995d14610083575b600080fd5b6100676004803603604081101561005157600080fd5b50803590602001356001600160a01b03166100af565b604080516001600160a01b039092168252519081900360200190f35b6100676004803603604081101561009957600080fd5b50803590602001356001600160a01b03166100f8565b60006100f18360405160200180828152602001915050604051602081830303815290604052805190602001206100e48461017c565b80519060200120306101ec565b9392505050565b60008061013560008560405160200180828152602001915050604051602081830303815290604052805190602001206101308661017c565b610247565b604080516001600160a01b038316815290519192507f16f1e151dcf4eb1663400df93379828c17dea844757ee03e3038178d0038c3a7919081900360200190a19392505050565b60408051693d602d80600a3d3981f360b01b602082015269363d3d373d3d3d363d7360b01b602a82015260609290921b6bffffffffffffffffffffffff191660348301526e5af43d82803e903d91602b57fd5bf360881b6048830152805180830360370181526057909201905290565b604080516001600160f81b031960208083019190915260609390931b6bffffffffffffffffffffffff191660218201526035810194909452605580850193909352805180850390930183526075909301909252805191012090565b6000808447101561029f576040805162461bcd60e51b815260206004820152601d60248201527f437265617465323a20696e73756666696369656e742062616c616e6365000000604482015290519081900360640190fd5b82516102f2576040805162461bcd60e51b815260206004820181905260248201527f437265617465323a2062797465636f6465206c656e677468206973207a65726f604482015290519081900360640190fd5b8383516020850187f590506001600160a01b038116610358576040805162461bcd60e51b815260206004820152601960248201527f437265617465323a204661696c6564206f6e206465706c6f7900000000000000604482015290519081900360640190fd5b94935050505056fea2646970667358221220d2cfd8528d05ab17336d63ce6a47d6b94303ed74fcf66d8ed623f10f001da83364736f6c63430006020033
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106100365760003560e01c80632ee5001f1461003b578063df02995d14610083575b600080fd5b6100676004803603604081101561005157600080fd5b50803590602001356001600160a01b03166100af565b604080516001600160a01b039092168252519081900360200190f35b6100676004803603604081101561009957600080fd5b50803590602001356001600160a01b03166100f8565b60006100f18360405160200180828152602001915050604051602081830303815290604052805190602001206100e48461017c565b80519060200120306101ec565b9392505050565b60008061013560008560405160200180828152602001915050604051602081830303815290604052805190602001206101308661017c565b610247565b604080516001600160a01b038316815290519192507f16f1e151dcf4eb1663400df93379828c17dea844757ee03e3038178d0038c3a7919081900360200190a19392505050565b60408051693d602d80600a3d3981f360b01b602082015269363d3d373d3d3d363d7360b01b602a82015260609290921b6bffffffffffffffffffffffff191660348301526e5af43d82803e903d91602b57fd5bf360881b6048830152805180830360370181526057909201905290565b604080516001600160f81b031960208083019190915260609390931b6bffffffffffffffffffffffff191660218201526035810194909452605580850193909352805180850390930183526075909301909252805191012090565b6000808447101561029f576040805162461bcd60e51b815260206004820152601d60248201527f437265617465323a20696e73756666696369656e742062616c616e6365000000604482015290519081900360640190fd5b82516102f2576040805162461bcd60e51b815260206004820181905260248201527f437265617465323a2062797465636f6465206c656e677468206973207a65726f604482015290519081900360640190fd5b8383516020850187f590506001600160a01b038116610358576040805162461bcd60e51b815260206004820152601960248201527f437265617465323a204661696c6564206f6e206465706c6f7900000000000000604482015290519081900360640190fd5b94935050505056fea2646970667358221220d2cfd8528d05ab17336d63ce6a47d6b94303ed74fcf66d8ed623f10f001da83364736f6c63430006020033
Deployed Bytecode Sourcemap
2653:1238:0:-:0;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2653:1238:0;;;;;;;;;;;;;;;;;;;;;;;;2745:353;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;2745:353:0;;;;;;-1:-1:-1;;;;;2745:353:0;;:::i;:::-;;;;-1:-1:-1;;;;;2745:353:0;;;;;;;;;;;;;;3106:367;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;3106:367:0;;;;;;-1:-1:-1;;;;;3106:367:0;;:::i;2745:353::-;2855:7;2900:190;2968:4;2951:22;;;;;;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;2951:22:0;;;2941:33;;;;;;3003:39;3027:14;3003:23;:39::i;:::-;2993:50;;;;;;3070:4;2900:22;:190::i;:::-;2880:210;2745:353;-1:-1:-1;;;2745:353:0:o;3106:367::-;3200:7;3220:20;3243:143;3272:1;3315:4;3298:22;;;;;;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;3298:22:0;;;3288:33;;;;;;3336:39;3360:14;3336:23;:39::i;:::-;3243:14;:143::i;:::-;3402:33;;;-1:-1:-1;;;;;3402:33:0;;;;;;3220:166;;-1:-1:-1;3402:33:0;;;;;;;;;;3453:12;3106:367;-1:-1:-1;;;3106:367:0:o;3481:407::-;3825:55;;;-1:-1:-1;;;3825:55:0;;;;-1:-1:-1;;;3825:55:0;;;;3579:12;3733:14;;;;-1:-1:-1;;3825:55:0;;;;;-1:-1:-1;;;3825:55:0;;;;;;26:21:-1;;;22:32;;6:49;;3825:55:0;;;;;;;3481:407::o;2274:290::-;2435:60;;;-1:-1:-1;;;;;;2435:60:0;;;;;;;;;;;;;-1:-1:-1;;2435:60:0;;;;;;;;;;;;;;;;;;;;;;26:21:-1;;;22:32;;;6:49;;2435:60:0;;;;;;;2411:95;;;;;;2274:290::o;1103:545::-;1190:7;1210:12;1266:6;1241:21;:31;;1233:73;;;;;-1:-1:-1;;;1233:73:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;1325:15;;1317:65;;;;;-1:-1:-1;;;1317:65:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1536:4;1525:8;1519:15;1512:4;1502:8;1498:19;1490:6;1482:59;1474:67;-1:-1:-1;;;;;;1570:18:0;;1562:56;;;;;-1:-1:-1;;;1562:56:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;1636:4;1103:545;-1:-1:-1;;;;1103:545:0:o
Swarm Source
ipfs://d2cfd8528d05ab17336d63ce6a47d6b94303ed74fcf66d8ed623f10f001da833
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.