ERC1155SeaDropCloneFactory

0x00b19a5200a100e5fc4c9800772f4d002f218400

Verification
Verified
v0.8.19+commit.7dd6d404
Type
Contract
1,313 bytes
ABI entries
5
3 read · 1 write
License
none

Contract information

Address
0x00b19a5200a100e5fc4c9800772f4d002f218400
Chain
Robinhood Chain (4663)
Compiler
v0.8.19+commit.7dd6d404
Optimization
Enabled
Creation tx
0xc83f179d08…d6b1593f63

Token

Not a token

This contract does not expose ERC-20 metadata.

Read contract (3)

cloneableImplementation()address
configurer()address
seaport()address

ABI

[
  {
    "inputs": [
      {
        "internalType": "address",
        "name": "allowedSeaport",
        "type": "address"
      }
    ],
    "stateMutability": "nonpayable",
    "type": "constructor"
  },
  {
    "inputs": [],
    "name": "cloneableImplementation",
    "outputs": [
      {
        "internalType": "address",
        "name": "",
        "type": "address"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [],
    "name": "configurer",
    "outputs": [
      {
        "internalType": "address",
        "name": "",
        "type": "address"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "string",
        "name": "name",
        "type": "string"
      },
      {
        "internalType": "string",
        "name": "symbol",
        "type": "string"
      },
      {
        "internalType": "bytes32",
        "name": "salt",
        "type": "bytes32"
      }
    ],
    "name": "createClone",
    "outputs": [
      {
        "internalType": "address",
        "name": "instance",
        "type": "address"
      }
    ],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [],
    "name": "seaport",
    "outputs": [
      {
        "internalType": "address",
        "name": "",
        "type": "address"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  }
]

Source code

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.19;

import { ERC1155SeaDropCloneable } from "./ERC1155SeaDropCloneable.sol";

import { ERC1155SeaDropConfigurer } from "../lib/ERC1155SeaDropConfigurer.sol";

import { Clones } from "@openzeppelin/contracts/proxy/Clones.sol";

/**
 * @title  ERC1155SeaDropCloneFactory
 * @author James Wenzel (emo.eth)
 * @author Ryan Ghods (ralxz.eth)
 * @author Stephan Min (stephanm.eth)
 * @author Michael Cohen (notmichael.eth)
 * @notice A factory contract that deploys ERC1155 token contracts
 *         that can mint as Seaport contract offerers.
 */
contract ERC1155SeaDropCloneFactory {
    address public immutable seaport;
    address public immutable configurer;
    address public immutable cloneableImplementation;

    constructor(address allowedSeaport) {
        seaport = allowedSeaport;

        ERC1155SeaDropConfigurer config = new ERC1155SeaDropConfigurer();
        configurer = address(config);

        ERC1155SeaDropCloneable impl = new ERC1155SeaDropCloneable();
        impl.initialize(configurer, seaport, "", "", address(this));
        cloneableImplementation = address(impl);
    }

    function createClone(
        string memory name,
        string memory symbol,
        bytes32 salt
    ) external returns (address instance) {
        // Derive a pseudo-random salt, so clone addresses don't collide
        // across chains.
        bytes32 cloneSalt = keccak256(
            abi.encodePacked(salt, blockhash(block.number))
        );

        instance = Clones.cloneDeterministic(
            cloneableImplementation,
            cloneSalt
        );
        ERC1155SeaDropCloneable(instance).initialize(
            configurer,
            seaport,
            name,
            symbol,
            msg.sender
        );
    }
}
Chain explorer3035msChain node74ms