Overview
APE Balance
0 APE
APE Value
$0.00More Info
Private Name Tags
ContractCreator
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:
MintpadFactory
Compiler Version
v0.8.28+commit.7893614a
Optimization Enabled:
Yes with 200 runs
Other Settings:
paris EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity 0.8.28; import "@openzeppelin/contracts/proxy/Clones.sol"; import "../utils/Versioning.sol"; contract MintpadFactory is Versioning { // Event emitted when a clone is created event CloneCreated(address indexed cloneAddress, address indexed creator); // Platform address to receive the transaction fee address public platformAddress; // Fee in wei (equivalent to $1 in ETH at a fixed rate, e.g., 1 ETH = $2000) uint256 public constant TRANSACTION_FEE = 0.00030 ether; // Set the platform address of the contract constructor(address _platformAddress) { require(_platformAddress != address(0), "MintpadFactory: Invalid platform address"); platformAddress = _platformAddress; _setVersion("1.0.0"); } /** * @dev Creates a clone of the implementation contract and transfers the transaction fee. * @param _implementation The address of the implementation contract to clone. * @param _initData Initialization data for the cloned contract. * @return cloneAddress The address of the newly created clone. */ function clone( address _implementation, bytes memory _initData ) external payable returns (address cloneAddress) { require(_implementation != address(0), "MintpadFactory: Invalid implementation address"); require(msg.value >= TRANSACTION_FEE, "MintpadFactory: Insufficient transaction fee"); // Transfer the transaction fee to the platform address payable(platformAddress).transfer(TRANSACTION_FEE); // Clone the implementation contract cloneAddress = Clones.clone(_implementation); // Initialize the clone (bool success, ) = cloneAddress.call(_initData); require(success, "MintpadFactory: Failed to initialize clone"); // Emit an event for the new clone emit CloneCreated(cloneAddress, msg.sender); // Refund any excess ETH sent if (msg.value > TRANSACTION_FEE) { payable(msg.sender).transfer(msg.value - TRANSACTION_FEE); } } /** * @dev Updates the platform address to receive the transaction fee. * @param _platformAddress The new platform address. */ function setPlatformAddress(address _platformAddress) external { require(_platformAddress != address(0), "MintpadFactory: Invalid platform address"); require(msg.sender == platformAddress, "MintpadFactory: Only current platform can update address"); platformAddress = _platformAddress; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (proxy/Clones.sol) 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) { /// @solidity memory-safe-assembly assembly { // Cleans the upper 96 bits of the `implementation` word, then packs the first 3 bytes // of the `implementation` address with the bytecode before the address. mstore(0x00, or(shr(0xe8, shl(0x60, implementation)), 0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000)) // Packs the remaining 17 bytes of `implementation` with the bytecode after the address. mstore(0x20, or(shl(0x78, implementation), 0x5af43d82803e903d91602b57fd5bf3)) instance := create(0, 0x09, 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) { /// @solidity memory-safe-assembly assembly { // Cleans the upper 96 bits of the `implementation` word, then packs the first 3 bytes // of the `implementation` address with the bytecode before the address. mstore(0x00, or(shr(0xe8, shl(0x60, implementation)), 0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000)) // Packs the remaining 17 bytes of `implementation` with the bytecode after the address. mstore(0x20, or(shl(0x78, implementation), 0x5af43d82803e903d91602b57fd5bf3)) instance := create2(0, 0x09, 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) { /// @solidity memory-safe-assembly assembly { let ptr := mload(0x40) mstore(add(ptr, 0x38), deployer) mstore(add(ptr, 0x24), 0x5af43d82803e903d91602b57fd5bf3ff) mstore(add(ptr, 0x14), implementation) mstore(ptr, 0x3d602d80600a3d3981f3363d3d373d3d3d363d73) mstore(add(ptr, 0x58), salt) mstore(add(ptr, 0x78), keccak256(add(ptr, 0x0c), 0x37)) predicted := keccak256(add(ptr, 0x43), 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)); } }
// SPDX-License-Identifier: MIT pragma solidity 0.8.28; abstract contract Versioning { // The version of the contract string public version; constructor() {} // Set the version of the contract function _setVersion(string memory _version) internal { version = _version; } }
{ "optimizer": { "enabled": true, "runs": 200 }, "evmVersion": "paris", "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":"_platformAddress","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"cloneAddress","type":"address"},{"indexed":true,"internalType":"address","name":"creator","type":"address"}],"name":"CloneCreated","type":"event"},{"inputs":[],"name":"TRANSACTION_FEE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_implementation","type":"address"},{"internalType":"bytes","name":"_initData","type":"bytes"}],"name":"clone","outputs":[{"internalType":"address","name":"cloneAddress","type":"address"}],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"platformAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_platformAddress","type":"address"}],"name":"setPlatformAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"version","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
608060405234801561001057600080fd5b50604051610a5f380380610a5f83398101604081905261002f916100f0565b6001600160a01b03811661009a5760405162461bcd60e51b815260206004820152602860248201527f4d696e74706164466163746f72793a20496e76616c696420706c6174666f726d604482015267206164647265737360c01b606482015260840160405180910390fd5b600180546001600160a01b0319166001600160a01b0383161790556040805180820190915260058152640312e302e360dc1b60208201526100da906100e0565b5061027d565b60006100ec82826101bf565b5050565b60006020828403121561010257600080fd5b81516001600160a01b038116811461011957600080fd5b9392505050565b634e487b7160e01b600052604160045260246000fd5b600181811c9082168061014a57607f821691505b60208210810361016a57634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156101ba57806000526020600020601f840160051c810160208510156101975750805b601f840160051c820191505b818110156101b757600081556001016101a3565b50505b505050565b81516001600160401b038111156101d8576101d8610120565b6101ec816101e68454610136565b84610170565b6020601f82116001811461022057600083156102085750848201515b600019600385901b1c1916600184901b1784556101b7565b600084815260208120601f198516915b828110156102505787850151825560209485019460019092019101610230565b508482101561026e5786840151600019600387901b60f8161c191681555b50505050600190811b01905550565b6107d38061028c6000396000f3fe60806040526004361061004a5760003560e01c80630fbe133c1461004f57806354fd4d501461007f578063b1b23535146100a1578063cc03c342146100ca578063dbe55e56146100ec575b600080fd5b61006261005d3660046105dd565b61010c565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561008b57600080fd5b5061009461037f565b60405161007691906106cb565b3480156100ad57600080fd5b506100bc660110d9316ec00081565b604051908152602001610076565b3480156100d657600080fd5b506100ea6100e53660046106fe565b61040d565b005b3480156100f857600080fd5b50600154610062906001600160a01b031681565b60006001600160a01b0383166101805760405162461bcd60e51b815260206004820152602e60248201527f4d696e74706164466163746f72793a20496e76616c696420696d706c656d656e60448201526d746174696f6e206164647265737360901b60648201526084015b60405180910390fd5b660110d9316ec0003410156101ec5760405162461bcd60e51b815260206004820152602c60248201527f4d696e74706164466163746f72793a20496e73756666696369656e742074726160448201526b6e73616374696f6e2066656560a01b6064820152608401610177565b6001546040516001600160a01b0390911690600090660110d9316ec0009082818181858883f19350505050158015610228573d6000803e3d6000fd5b5061023283610516565b90506000816001600160a01b03168360405161024e9190610720565b6000604051808303816000865af19150503d806000811461028b576040519150601f19603f3d011682016040523d82523d6000602084013e610290565b606091505b50509050806102f45760405162461bcd60e51b815260206004820152602a60248201527f4d696e74706164466163746f72793a204661696c656420746f20696e697469616044820152696c697a6520636c6f6e6560b01b6064820152608401610177565b60405133906001600160a01b038416907f3d2b821286d97aa9d35330d87a82f7b548b9737b10e2d1ba59994edfd50e9d2b90600090a3660110d9316ec00034111561037857336108fc61034e660110d9316ec0003461073c565b6040518115909202916000818181858888f19350505050158015610376573d6000803e3d6000fd5b505b5092915050565b6000805461038c90610763565b80601f01602080910402602001604051908101604052809291908181526020018280546103b890610763565b80156104055780601f106103da57610100808354040283529160200191610405565b820191906000526020600020905b8154815290600101906020018083116103e857829003601f168201915b505050505081565b6001600160a01b0381166104745760405162461bcd60e51b815260206004820152602860248201527f4d696e74706164466163746f72793a20496e76616c696420706c6174666f726d604482015267206164647265737360c01b6064820152608401610177565b6001546001600160a01b031633146104f45760405162461bcd60e51b815260206004820152603860248201527f4d696e74706164466163746f72793a204f6e6c792063757272656e7420706c6160448201527f74666f726d2063616e20757064617465206164647265737300000000000000006064820152608401610177565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6000763d602d80600a3d3981f3363d3d373d3d3d363d730000008260601b60e81c176000526e5af43d82803e903d91602b57fd5bf38260781b17602052603760096000f090506001600160a01b0381166105ab5760405162461bcd60e51b8152602060048201526016602482015275115490cc4c4d8dce8818dc99585d194819985a5b195960521b6044820152606401610177565b919050565b80356001600160a01b03811681146105ab57600080fd5b634e487b7160e01b600052604160045260246000fd5b600080604083850312156105f057600080fd5b6105f9836105b0565b9150602083013567ffffffffffffffff81111561061557600080fd5b8301601f8101851361062657600080fd5b803567ffffffffffffffff811115610640576106406105c7565b604051601f8201601f19908116603f0116810167ffffffffffffffff8111828210171561066f5761066f6105c7565b60405281815282820160200187101561068757600080fd5b816020840160208301376000602083830101528093505050509250929050565b60005b838110156106c25781810151838201526020016106aa565b50506000910152565b60208152600082518060208401526106ea8160408501602087016106a7565b601f01601f19169190910160400192915050565b60006020828403121561071057600080fd5b610719826105b0565b9392505050565b600082516107328184602087016106a7565b9190910192915050565b8181038181111561075d57634e487b7160e01b600052601160045260246000fd5b92915050565b600181811c9082168061077757607f821691505b60208210810361079757634e487b7160e01b600052602260045260246000fd5b5091905056fea2646970667358221220952a6bd684eacd6a077a6d81d1e7cc6b84ec8b4759e660f0b6e1ccd603b730dd64736f6c634300081c0033000000000000000000000000dcc84f30fac85f5e8f7dcf80b154a05ad25d2824
Deployed Bytecode
0x60806040526004361061004a5760003560e01c80630fbe133c1461004f57806354fd4d501461007f578063b1b23535146100a1578063cc03c342146100ca578063dbe55e56146100ec575b600080fd5b61006261005d3660046105dd565b61010c565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561008b57600080fd5b5061009461037f565b60405161007691906106cb565b3480156100ad57600080fd5b506100bc660110d9316ec00081565b604051908152602001610076565b3480156100d657600080fd5b506100ea6100e53660046106fe565b61040d565b005b3480156100f857600080fd5b50600154610062906001600160a01b031681565b60006001600160a01b0383166101805760405162461bcd60e51b815260206004820152602e60248201527f4d696e74706164466163746f72793a20496e76616c696420696d706c656d656e60448201526d746174696f6e206164647265737360901b60648201526084015b60405180910390fd5b660110d9316ec0003410156101ec5760405162461bcd60e51b815260206004820152602c60248201527f4d696e74706164466163746f72793a20496e73756666696369656e742074726160448201526b6e73616374696f6e2066656560a01b6064820152608401610177565b6001546040516001600160a01b0390911690600090660110d9316ec0009082818181858883f19350505050158015610228573d6000803e3d6000fd5b5061023283610516565b90506000816001600160a01b03168360405161024e9190610720565b6000604051808303816000865af19150503d806000811461028b576040519150601f19603f3d011682016040523d82523d6000602084013e610290565b606091505b50509050806102f45760405162461bcd60e51b815260206004820152602a60248201527f4d696e74706164466163746f72793a204661696c656420746f20696e697469616044820152696c697a6520636c6f6e6560b01b6064820152608401610177565b60405133906001600160a01b038416907f3d2b821286d97aa9d35330d87a82f7b548b9737b10e2d1ba59994edfd50e9d2b90600090a3660110d9316ec00034111561037857336108fc61034e660110d9316ec0003461073c565b6040518115909202916000818181858888f19350505050158015610376573d6000803e3d6000fd5b505b5092915050565b6000805461038c90610763565b80601f01602080910402602001604051908101604052809291908181526020018280546103b890610763565b80156104055780601f106103da57610100808354040283529160200191610405565b820191906000526020600020905b8154815290600101906020018083116103e857829003601f168201915b505050505081565b6001600160a01b0381166104745760405162461bcd60e51b815260206004820152602860248201527f4d696e74706164466163746f72793a20496e76616c696420706c6174666f726d604482015267206164647265737360c01b6064820152608401610177565b6001546001600160a01b031633146104f45760405162461bcd60e51b815260206004820152603860248201527f4d696e74706164466163746f72793a204f6e6c792063757272656e7420706c6160448201527f74666f726d2063616e20757064617465206164647265737300000000000000006064820152608401610177565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6000763d602d80600a3d3981f3363d3d373d3d3d363d730000008260601b60e81c176000526e5af43d82803e903d91602b57fd5bf38260781b17602052603760096000f090506001600160a01b0381166105ab5760405162461bcd60e51b8152602060048201526016602482015275115490cc4c4d8dce8818dc99585d194819985a5b195960521b6044820152606401610177565b919050565b80356001600160a01b03811681146105ab57600080fd5b634e487b7160e01b600052604160045260246000fd5b600080604083850312156105f057600080fd5b6105f9836105b0565b9150602083013567ffffffffffffffff81111561061557600080fd5b8301601f8101851361062657600080fd5b803567ffffffffffffffff811115610640576106406105c7565b604051601f8201601f19908116603f0116810167ffffffffffffffff8111828210171561066f5761066f6105c7565b60405281815282820160200187101561068757600080fd5b816020840160208301376000602083830101528093505050509250929050565b60005b838110156106c25781810151838201526020016106aa565b50506000910152565b60208152600082518060208401526106ea8160408501602087016106a7565b601f01601f19169190910160400192915050565b60006020828403121561071057600080fd5b610719826105b0565b9392505050565b600082516107328184602087016106a7565b9190910192915050565b8181038181111561075d57634e487b7160e01b600052601160045260246000fd5b92915050565b600181811c9082168061077757607f821691505b60208210810361079757634e487b7160e01b600052602260045260246000fd5b5091905056fea2646970667358221220952a6bd684eacd6a077a6d81d1e7cc6b84ec8b4759e660f0b6e1ccd603b730dd64736f6c634300081c0033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000dcc84f30fac85f5e8f7dcf80b154a05ad25d2824
-----Decoded View---------------
Arg [0] : _platformAddress (address): 0xDCC84F30Fac85f5E8f7Dcf80B154A05AD25d2824
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 000000000000000000000000dcc84f30fac85f5e8f7dcf80b154a05ad25d2824
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
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.