OP Sepolia Testnet

Contract

0x1d85d4FfE414C4e1C605Be4918d50deB75841Fd1

Overview

ETH Balance

0 ETH

More Info

Multichain Info

N/A
Transaction Hash
Method
Block
From
To

There are no matching entries

1 Internal Transaction found.

Latest 1 internal transaction

Advanced mode:
Parent Transaction Hash Block From To
226487432025-01-17 7:47:06122 days ago1737100026  Contract Creation0 ETH
Loading...
Loading

Similar Match Source Code
This contract matches the deployed Bytecode of the Source Code for Contract 0xbB0052a2...3Cbb5D2bb
The constructor portion of the code might be different and could alter the actual behaviour of the contract

Contract Name:
FactoryClones

Compiler Version
v0.8.4+commit.c7e474f2

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, MIT license

Contract Source Code (Solidity)

/**
 *Submitted for verification at sepolia-optimism.etherscan.io on 2025-01-14
*/

// File: @openzeppelin/contracts/proxy/Clones.sol

// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev 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));
    }
}

// File: contracts/Implementation.sol

pragma solidity 0.8.4;

interface IERC20 {
    function transfer(address recipient, uint256 amount) external returns (bool);
    function balanceOf(address account) external view returns (uint256);
}

contract  Implementation{
    function withdraw(address erc20TokenAddress, address recipient) external {
        // the target erc20 token address
        IERC20 erc20Token = IERC20(erc20TokenAddress);

        // get balance
        uint256 balance = erc20Token.balanceOf(address(this));

        // transfer
        if (balance > 0) {
            require(erc20Token.transfer(recipient, balance), "Transfer failed");
        }
    }
}

// File: contracts/FactoryClones.sol

pragma solidity 0.8.4;


contract FactoryClones {
    using Clones for address;

    function cloneDeterministic(address implementation, bytes32 salt) external returns (address) {
        return implementation.cloneDeterministic(salt);
    }

    function newCreate() external returns (address) {
        address wallet = address(new Implementation());
        return wallet;
    }

    function predictDeterministicAddress(
        address implementation,
        bytes32 salt,
        address deployer
    ) external pure returns (address){
        return implementation.predictDeterministicAddress(salt, deployer);
    }

    function predictDeterministicAddress(
        address implementation,
        bytes32 salt
    ) external view returns (address){
        return implementation.predictDeterministicAddress(salt);
    }
}

Contract ABI

API
[{"inputs":[{"internalType":"address","name":"implementation","type":"address"},{"internalType":"bytes32","name":"salt","type":"bytes32"}],"name":"cloneDeterministic","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"newCreate","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"nonpayable","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"},{"inputs":[{"internalType":"address","name":"implementation","type":"address"},{"internalType":"bytes32","name":"salt","type":"bytes32"},{"internalType":"address","name":"deployer","type":"address"}],"name":"predictDeterministicAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"pure","type":"function"}]

Deployed Bytecode

0x608060405234801561001057600080fd5b506004361061004c5760003560e01c8063360d0fad1461005157806389aa88f41461008057806393a7e71114610088578063b86b2ceb1461009b575b600080fd5b61006461005f3660046102b3565b6100ae565b6040516001600160a01b03909116815260200160405180910390f35b61006461012d565b6100646100963660046102dc565b61015f565b6100646100a93660046102b3565b6101d6565b60006101246001600160a01b038416836000610124838330604051733d602d80600a3d3981f3363d3d373d3d3d363d7360601b8152606093841b60148201526f5af43d82803e903d91602b57fd5bf3ff60801b6028820152921b6038830152604c8201526037808220606c830152605591012090565b90505b92915050565b60008060405161013c9061028a565b604051809103906000f080158015610158573d6000803e3d6000fd5b5092915050565b60006101ce6001600160a01b0385168484604051733d602d80600a3d3981f3363d3d373d3d3d363d7360601b8152606093841b60148201526f5af43d82803e903d91602b57fd5bf3ff60801b6028820152921b6038830152604c8201526037808220606c830152605591012090565b949350505050565b60006101246001600160a01b038416836000604051733d602d80600a3d3981f3363d3d373d3d3d363d7360601b81528360601b60148201526e5af43d82803e903d91602b57fd5bf360881b6028820152826037826000f59150506001600160a01b0381166101275760405162461bcd60e51b815260206004820152601760248201527f455243313136373a2063726561746532206661696c6564000000000000000000604482015260640160405180910390fd5b6102768061031883390190565b80356001600160a01b03811681146102ae57600080fd5b919050565b600080604083850312156102c5578182fd5b6102ce83610297565b946020939093013593505050565b6000806000606084860312156102f0578081fd5b6102f984610297565b92506020840135915061030e60408501610297565b9050925092509256fe608060405234801561001057600080fd5b50610256806100206000396000f3fe608060405234801561001057600080fd5b506004361061002b5760003560e01c8063f940e38514610030575b600080fd5b61004361003e3660046101af565b610045565b005b6040516370a0823160e01b815230600482015282906000906001600160a01b038316906370a082319060240160206040518083038186803b15801561008957600080fd5b505afa15801561009d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906100c19190610208565b9050801561018d5760405163a9059cbb60e01b81526001600160a01b0384811660048301526024820183905283169063a9059cbb90604401602060405180830381600087803b15801561011357600080fd5b505af1158015610127573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061014b91906101e1565b61018d5760405162461bcd60e51b815260206004820152600f60248201526e151c985b9cd9995c8819985a5b1959608a1b604482015260640160405180910390fd5b50505050565b80356001600160a01b03811681146101aa57600080fd5b919050565b600080604083850312156101c1578182fd5b6101ca83610193565b91506101d860208401610193565b90509250929050565b6000602082840312156101f2578081fd5b81518015158114610201578182fd5b9392505050565b600060208284031215610219578081fd5b505191905056fea264697066735822122054e3415d13998c7b2b4e1bf4c97ede2ba2dcd98ebe6cf1d4e2cd54437e50933c64736f6c63430008040033a2646970667358221220426a1d8aaf4697ade8cdb95f52d1dbf8209b87e113c0be7c9d00eee703a7533a64736f6c63430008040033

Deployed Bytecode Sourcemap

4413:832:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5037:205;;;;;;:::i;:::-;;:::i;:::-;;;-1:-1:-1;;;;;968:32:1;;;950:51;;938:2;923:18;5037:205:0;;;;;;;4642:137;;;:::i;4787:242::-;;;;;;:::i;:::-;;:::i;4476:158::-;;;;;;:::i;:::-;;:::i;5037:205::-;5160:7;5186:48;-1:-1:-1;;;;;5186:42:0;;5229:4;3523:17;3565:64;3593:14;3609:4;3623;2785;2779:11;-1:-1:-1;;;2804:79:0;;2924:4;2920:25;;;2913:4;2904:14;;2897:49;-1:-1:-1;;;2976:4:0;2967:14;;2960:90;3087:19;;3080:4;3071:14;;3064:43;3137:4;3128:14;;3121:28;3201:4;3186:20;;;3179:4;3170:14;;3163:44;3260:4;3244:14;;3234:31;;2753:523;5186:48;5179:55;;5037:205;;;;;:::o;4642:137::-;4681:7;4701:14;4726:20;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;4701:46:0;4642:137;-1:-1:-1;;4642:137:0:o;4787:242::-;4937:7;4963:58;-1:-1:-1;;;;;4963:42:0;;5006:4;5012:8;2785:4;2779:11;-1:-1:-1;;;2804:79:0;;2924:4;2920:25;;;2913:4;2904:14;;2897:49;-1:-1:-1;;;2976:4:0;2967:14;;2960:90;3087:19;;3080:4;3071:14;;3064:43;3137:4;3128:14;;3121:28;3201:4;3186:20;;;3179:4;3170:14;;3163:44;3260:4;3244:14;;3234:31;;2753:523;4963:58;4956:65;4787:242;-1:-1:-1;;;;4787:242:0:o;4476:158::-;4560:7;4587:39;-1:-1:-1;;;;;4587:33:0;;4621:4;1974:16;2044:4;2038:11;-1:-1:-1;;;2070:3:0;2063:79;2189:14;2183:4;2179:25;2172:4;2167:3;2163:14;2156:49;-1:-1:-1;;;2235:4:0;2230:3;2226:14;2219:90;2357:4;2351;2346:3;2343:1;2335:27;2323:39;-1:-1:-1;;;;;;;2391:22:0;;2383:58;;;;-1:-1:-1;;;2383:58:0;;1214:2:1;2383:58:0;;;1196:21:1;1253:2;1233:18;;;1226:30;1292:25;1272:18;;;1265:53;1335:18;;2383:58:0;;;;;;;-1:-1:-1;;;;;;;;:::o;14:173:1:-;82:20;;-1:-1:-1;;;;;131:31:1;;121:42;;111:2;;177:1;174;167:12;111:2;63:124;;;:::o;192:264::-;260:6;268;321:2;309:9;300:7;296:23;292:32;289:2;;;342:6;334;327:22;289:2;370:29;389:9;370:29;:::i;:::-;360:39;446:2;431:18;;;;418:32;;-1:-1:-1;;;279:177:1:o;461:338::-;538:6;546;554;607:2;595:9;586:7;582:23;578:32;575:2;;;628:6;620;613:22;575:2;656:29;675:9;656:29;:::i;:::-;646:39;;732:2;721:9;717:18;704:32;694:42;;755:38;789:2;778:9;774:18;755:38;:::i;:::-;745:48;;565:234;;;;;:::o

Swarm Source

ipfs://426a1d8aaf4697ade8cdb95f52d1dbf8209b87e113c0be7c9d00eee703a7533a

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading
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.

OSZAR »