Warning! Contract bytecode has been changed and doesn't match the verified one. Therefore, interaction with this smart contract may be risky.
This contract has been partially verified via Sourcify.
View contract in Sourcify repository
- Contract name:
- CloneFactory
- Optimization enabled
- true
- Compiler version
- v0.6.9+commit.3e3065ac
- Optimization runs
- 200
- EVM Version
- istanbul
- Verified at
- 2026-04-19T01:18:20.034115Z
CloneFactory.sol
/*
Copyright 2020 DODO ZOO.
SPDX-License-Identifier: Apache-2.0
*/
pragma solidity 0.6.9;
pragma experimental ABIEncoderV2;
interface ICloneFactory {
function clone(address prototype) external returns (address proxy);
}
// introduction of proxy mode design: https://docs.openzeppelin.com/upgrades/2.8/
// minimum implementation of transparent proxy: https://eips.ethereum.org/EIPS/eip-1167
contract CloneFactory is ICloneFactory {
function clone(address prototype) external override returns (address proxy) {
bytes20 targetBytes = bytes20(prototype);
assembly {
let clone := mload(0x40)
mstore(clone, 0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000000000000000000000)
mstore(add(clone, 0x14), targetBytes)
mstore(
add(clone, 0x28),
0x5af43d82803e903d91602b57fd5bf30000000000000000000000000000000000
)
proxy := create(0, clone, 0x37)
}
return proxy;
}
}
Compiler Settings
{"remappings":[],"optimizer":{"runs":200,"enabled":true},"metadata":{"bytecodeHash":"ipfs"},"libraries":{},"evmVersion":"istanbul","compilationTarget":{"CloneFactory.sol":"CloneFactory"}}
Contract ABI
[{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"address","name":"proxy","internalType":"address"}],"name":"clone","inputs":[{"type":"address","name":"prototype","internalType":"address"}]}]
Contract Creation Code
0x608060405234801561001057600080fd5b50610118806100206000396000f3fe6080604052348015600f57600080fd5b506004361060285760003560e01c80638124b78e14602d575b600080fd5b603c603836600460a2565b6050565b6040516047919060ce565b60405180910390f35b6000808260601b9050604051733d602d80600a3d3981f3363d3d373d3d3d363d7360601b81528160148201526e5af43d82803e903d91602b57fd5bf360881b60288201526037816000f0949350505050565b60006020828403121560b2578081fd5b81356001600160a01b038116811460c7578182fd5b9392505050565b6001600160a01b039190911681526020019056fea2646970667358221220592e9bb078414ec822c4dd722a08b333e8a0faf4d9aec37951f73c5b14e89f8264736f6c63430006090033
Deployed ByteCode
0x6080604052348015600f57600080fd5b506004361060285760003560e01c80638124b78e14602d575b600080fd5b603c603836600460a2565b6050565b6040516047919060ce565b60405180910390f35b6000808260601b9050604051733d602d80600a3d3981f3363d3d373d3d3d363d7360601b81528160148201526e5af43d82803e903d91602b57fd5bf360881b60288201526037816000f0949350505050565b60006020828403121560b2578081fd5b81356001600160a01b038116811460c7578182fd5b9392505050565b6001600160a01b039190911681526020019056fea2646970667358221220592e9bb078414ec822c4dd722a08b333e8a0faf4d9aec37951f73c5b14e89f8264736f6c63430006090033