ETH Price: $2,590.18 (-2.55%)

Contract

0x0Cb0475C7CEb543f1292965b1CB4899410584189
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Mint128011972021-07-10 18:14:311178 days ago1625940871IN
0x0Cb0475C...410584189
0.3325625 ETH0.0019014711
Mint127853622021-07-08 7:22:401180 days ago1625728960IN
0x0Cb0475C...410584189
0.3320415 ETH0.0033617730
Mint127853612021-07-08 7:22:391180 days ago1625728959IN
0x0Cb0475C...410584189
0.3320415 ETH0.0050129629
Mint127841852021-07-08 2:58:361180 days ago1625713116IN
0x0Cb0475C...410584189
0.3320415 ETH0.0051858330
Mint127720212021-07-06 5:25:231182 days ago1625549123IN
0x0Cb0475C...410584189
0.331781 ETH0.0017133711
Mint127380312021-06-30 22:16:151188 days ago1625091375IN
0x0Cb0475C...410584189
0.3315205 ETH0.0070344640.7
Mint127240642021-06-28 18:18:361190 days ago1624904316IN
0x0Cb0475C...410584189
0.3299575 ETH0.0044547628.6
Mint127240642021-06-28 18:18:361190 days ago1624904316IN
0x0Cb0475C...410584189
0.329697 ETH0.004361328
Mint126992942021-06-24 21:38:571194 days ago1624570737IN
0x0Cb0475C...410584189
0.3294365 ETH0.0043215225
Mint126911542021-06-23 15:27:091195 days ago1624462029IN
0x0Cb0475C...410584189
0.329176 ETH0.0043536727.951
Mint126408172021-06-15 18:57:241203 days ago1623783444IN
0x0Cb0475C...410584189
0.3289155 ETH0.0063958537
Mint125287642021-05-29 10:41:581220 days ago1622284918IN
0x0Cb0475C...410584189
0.328655 ETH0.0028036918
Mint125286322021-05-29 10:15:071220 days ago1622283307IN
0x0Cb0475C...410584189
0.3283945 ETH0.003232518.7
Mint125233202021-05-28 14:20:341221 days ago1622211634IN
0x0Cb0475C...410584189
0.328134 ETH0.0062225636
Mint125229932021-05-28 13:07:181221 days ago1622207238IN
0x0Cb0475C...410584189
0.3278735 ETH0.0068534844
Mint125074912021-05-26 3:20:191223 days ago1621999219IN
0x0Cb0475C...410584189
0.327613 ETH0.0077880550
Mint125049322021-05-25 17:49:291224 days ago1621964969IN
0x0Cb0475C...410584189
0.3273525 ETH0.0087226156
Mint125003332021-05-25 0:34:541224 days ago1621902894IN
0x0Cb0475C...410584189
0.327092 ETH0.0084701849
Mint124497402021-05-17 4:21:191232 days ago1621225279IN
0x0Cb0475C...410584189
0.3268315 ETH0.0342241198
Mint124490982021-05-17 1:52:091232 days ago1621216329IN
0x0Cb0475C...410584189
0.326571 ETH0.0108526462.7825
Mint124465282021-05-16 16:15:341233 days ago1621181734IN
0x0Cb0475C...410584189
0.3263105 ETH0.0124459972
Mint124276142021-05-13 18:20:071236 days ago1620930007IN
0x0Cb0475C...410584189
0.32605 ETH0.02552922163.9
Mint124264882021-05-13 14:10:521236 days ago1620915052IN
0x0Cb0475C...410584189
0.3257895 ETH0.02258534145
Mint124264752021-05-13 14:08:161236 days ago1620914896IN
0x0Cb0475C...410584189
0.325529 ETH0.01791251115
Mint124264542021-05-13 14:04:541236 days ago1620914694IN
0x0Cb0475C...410584189
0.3252685 ETH0.01884708121
View all transactions

Latest 25 internal transactions (View All)

Advanced mode:
Parent Transaction Hash Block From To
128011972021-07-10 18:14:311178 days ago1625940871
0x0Cb0475C...410584189
0.001042 ETH
128011972021-07-10 18:14:311178 days ago1625940871
0x0Cb0475C...410584189
0.3315205 ETH
127853622021-07-08 7:22:401180 days ago1625728960
0x0Cb0475C...410584189
0.000521 ETH
127853622021-07-08 7:22:401180 days ago1625728960
0x0Cb0475C...410584189
0.3315205 ETH
127853612021-07-08 7:22:391180 days ago1625728959
0x0Cb0475C...410584189
0.0007815 ETH
127853612021-07-08 7:22:391180 days ago1625728959
0x0Cb0475C...410584189
0.33126 ETH
127841852021-07-08 2:58:361180 days ago1625713116
0x0Cb0475C...410584189
0.001042 ETH
127841852021-07-08 2:58:361180 days ago1625713116
0x0Cb0475C...410584189
0.3309995 ETH
127720212021-07-06 5:25:231182 days ago1625549123
0x0Cb0475C...410584189
0.001042 ETH
127720212021-07-06 5:25:231182 days ago1625549123
0x0Cb0475C...410584189
0.330739 ETH
127380312021-06-30 22:16:151188 days ago1625091375
0x0Cb0475C...410584189
0.001042 ETH
127380312021-06-30 22:16:151188 days ago1625091375
0x0Cb0475C...410584189
0.3304785 ETH
127240642021-06-28 18:18:361190 days ago1624904316
0x0Cb0475C...410584189
0.001042 ETH
127240642021-06-28 18:18:361190 days ago1624904316
0x0Cb0475C...410584189
0.3289155 ETH
127240642021-06-28 18:18:361190 days ago1624904316
0x0Cb0475C...410584189
0.001042 ETH
127240642021-06-28 18:18:361190 days ago1624904316
0x0Cb0475C...410584189
0.328655 ETH
126992942021-06-24 21:38:571194 days ago1624570737
0x0Cb0475C...410584189
0.001042 ETH
126992942021-06-24 21:38:571194 days ago1624570737
0x0Cb0475C...410584189
0.3283945 ETH
126911542021-06-23 15:27:091195 days ago1624462029
0x0Cb0475C...410584189
0.001042 ETH
126911542021-06-23 15:27:091195 days ago1624462029
0x0Cb0475C...410584189
0.328134 ETH
126408172021-06-15 18:57:241203 days ago1623783444
0x0Cb0475C...410584189
0.001042 ETH
126408172021-06-15 18:57:241203 days ago1623783444
0x0Cb0475C...410584189
0.3278735 ETH
125287642021-05-29 10:41:581220 days ago1622284918
0x0Cb0475C...410584189
0.001042 ETH
125287642021-05-29 10:41:581220 days ago1622284918
0x0Cb0475C...410584189
0.327613 ETH
125286322021-05-29 10:15:071220 days ago1622283307
0x0Cb0475C...410584189
0.001042 ETH
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
SagaHistoricMinter

Compiler Version
v0.7.3+commit.9bfce1f6

Optimization Enabled:
No with 200 runs

Other Settings:
default evmVersion
File 1 of 19 : SagaHistoricMinter.sol
pragma solidity ^0.7.0;
pragma experimental ABIEncoderV2;

import "../library/LibSafeMath.sol";
import "../ERC1155Mintable.sol";
import "../mixin/MixinOwnable.sol";
import "../mixin/MixinPausable.sol";
import "../HashRegistry.sol";

contract SagaHistoricMinter is Ownable, MixinPausable {
  using LibSafeMath for uint256;

  uint256 public tokenType;

  ERC1155Mintable public mintableErc1155;
  HashRegistry public registry;

  // historic pricing params
  uint256 immutable public startingPriceForHistoric;
  uint256 immutable public pricePerMintForHistoric;

  // max total minting supply
  uint256 immutable maxMintingSupply;

  address payable public treasury;

  constructor(
    address _registry,
    address _mintableErc1155,
    address payable _treasury,
    uint256 _tokenType,
    uint256 _startingPriceForHistoric,
    uint256 _pricePerMintForHistoric,
    uint256 _maxMintingSupply
  ) {
    registry = HashRegistry(_registry);
    mintableErc1155 = ERC1155Mintable(_mintableErc1155);
    treasury = _treasury;
    tokenType = _tokenType;
    startingPriceForHistoric = _startingPriceForHistoric;
    pricePerMintForHistoric = _pricePerMintForHistoric;
    maxMintingSupply = _maxMintingSupply;
  }

  modifier onlyUnderMaxSupply(uint256 mintingAmount) {
    require(maxIndex() + mintingAmount <= maxMintingSupply, 'max supply minted');
    _;
  }

  function pause() external onlyOwner() {
    _pause();
  } 

  function unpause() external onlyOwner() {
    _unpause();
  }  

  function setTreasury(address payable _treasury) external onlyOwner() {
    treasury = _treasury;
  }

  function maxIndex() public view returns (uint256) {
    return mintableErc1155.maxIndex(tokenType);
  }

  function pricingCurveForHistoric(uint256 _maxIndex) public view returns (uint256) {
    return _maxIndex.safeMul(pricePerMintForHistoric).safeAdd(startingPriceForHistoric); 
  }

  function mint(address[] calldata _dsts, uint256[] calldata _txHashes) public payable whenNotPaused() onlyUnderMaxSupply(_dsts.length) {
    require(_dsts.length == _txHashes.length, "dsts, txhashes length mismatch");
    // verify and transfer fee
    uint256 price = 0;
    for (uint256 i = 0; i < _dsts.length; ++i) {
      price += pricingCurveForHistoric(maxIndex() + i);
    }
    require(price <= msg.value, "insufficient funds to pay for mint");
    treasury.transfer(price);
    msg.sender.transfer(msg.value.safeSub(price));
    _mint(_dsts, _txHashes);
  }

  function _mint(address[] memory dsts, uint256[] memory txHashes) internal {
    uint256[] memory tokenIds = new uint256[](dsts.length);
    for (uint256 i = 0; i < dsts.length; ++i) {
      uint256 index = maxIndex() + 1 + i;
      uint256 tokenId  = tokenType | index;
      tokenIds[i] = tokenId;
    }
    mintableErc1155.mintNonFungible(tokenType, dsts);
    registry.writeToRegistry(tokenIds, txHashes);
  }
}

File 2 of 19 : LibSafeMath.sol
pragma solidity ^0.7.0;

import "./LibRichErrors.sol";
import "./LibSafeMathRichErrors.sol";

library LibSafeMath {

    function safeMul(uint256 a, uint256 b)
        internal
        pure
        returns (uint256)
    {
        if (a == 0) {
            return 0;
        }
        uint256 c = a * b;
        if (c / a != b) {
            LibRichErrors.rrevert(LibSafeMathRichErrors.Uint256BinOpError(
                LibSafeMathRichErrors.BinOpErrorCodes.MULTIPLICATION_OVERFLOW,
                a,
                b
            ));
        }
        return c;
    }

    function safeDiv(uint256 a, uint256 b)
        internal
        pure
        returns (uint256)
    {
        if (b == 0) {
            LibRichErrors.rrevert(LibSafeMathRichErrors.Uint256BinOpError(
                LibSafeMathRichErrors.BinOpErrorCodes.DIVISION_BY_ZERO,
                a,
                b
            ));
        }
        uint256 c = a / b;
        return c;
    }

    function safeSub(uint256 a, uint256 b)
        internal
        pure
        returns (uint256)
    {
        if (b > a) {
            LibRichErrors.rrevert(LibSafeMathRichErrors.Uint256BinOpError(
                LibSafeMathRichErrors.BinOpErrorCodes.SUBTRACTION_UNDERFLOW,
                a,
                b
            ));
        }
        return a - b;
    }

    function safeAdd(uint256 a, uint256 b)
        internal
        pure
        returns (uint256)
    {
        uint256 c = a + b;
        if (c < a) {
            LibRichErrors.rrevert(LibSafeMathRichErrors.Uint256BinOpError(
                LibSafeMathRichErrors.BinOpErrorCodes.ADDITION_OVERFLOW,
                a,
                b
            ));
        }
        return c;
    }

    function max256(uint256 a, uint256 b)
        internal
        pure
        returns (uint256)
    {
        return a >= b ? a : b;
    }

    function min256(uint256 a, uint256 b)
        internal
        pure
        returns (uint256)
    {
        return a < b ? a : b;
    }
}

File 3 of 19 : ERC1155Mintable.sol
pragma solidity ^0.7.0;

import "./library/LibSafeMath.sol";
import "./library/LibAddress.sol";
import "./ERC1155.sol";
import "./interface/IERC1155Mintable.sol";
import "./mixin/MixinOwnable.sol";
import "./mixin/MixinContractURI.sol";
import "./mixin/MixinTokenURI.sol";

/// @dev Mintable form of ERC1155
/// Shows how easy it is to mint new items
contract ERC1155Mintable is
    IERC1155Mintable,
    ERC1155,
    MixinContractURI,
    MixinTokenURI
{
    using LibSafeMath for uint256;
    using LibAddress for address;

    uint256 internal nonce;

    /// mapping from token to max index
    mapping (uint256 => uint256) public maxIndex;

    mapping (uint256 => mapping(address => bool)) internal creatorApproval;

    modifier onlyCreator(uint256 _id) {
        require(creatorApproval[_id][msg.sender], "not an approved creator of id");
        _;
    }

    function setCreatorApproval(uint256 id, address creator, bool status) external onlyCreator(id) {
        creatorApproval[id][creator] = status;
    }

    /// @dev creates a new token
    /// @param isNF is non-fungible token
    /// @return type_ of token (a unique identifier)
    function create(
        bool isNF
    )
        external
        override
        onlyOwner()
        returns (uint256 type_)
    {
        // Store the type in the upper 128 bits
        type_ = (++nonce << 128);

        // Set a flag if this is an NFI.
        if (isNF) {
            type_ = type_ | TYPE_NF_BIT;
        }

        creatorApproval[type_][msg.sender] = true;

        // emit a Transfer event with Create semantic to help with discovery.
        emit TransferSingle(
            msg.sender,
            address(0x0),
            address(0x0),
            type_,
            0
        );

        emit URI(uri(type_), type_);
    }

    /// @dev creates a new token
    /// @param type_ of token
    function createWithType(
        uint256 type_
    )
        external
        onlyOwner()
    {

        creatorApproval[type_][msg.sender] = true;

        // emit a Transfer event with Create semantic to help with discovery.
        emit TransferSingle(
            msg.sender,
            address(0x0),
            address(0x0),
            type_,
            0
        );

        emit URI(uri(type_), type_);
    }

    /// @dev mints fungible tokens
    /// @param id token type
    /// @param to beneficiaries of minted tokens
    /// @param quantities amounts of minted tokens
    function mintFungible(
        uint256 id,
        address[] calldata to,
        uint256[] calldata quantities
    )
        external
        override
        onlyCreator(id)
    {
        // sanity checks
        require(
            isFungible(id),
            "TRIED_TO_MINT_FUNGIBLE_FOR_NON_FUNGIBLE_TOKEN"
        );

        // mint tokens
        for (uint256 i = 0; i < to.length; ++i) {
            // cache to reduce number of loads
            address dst = to[i];
            uint256 quantity = quantities[i];

            // Grant the items to the caller
            balances[id][dst] = quantity.safeAdd(balances[id][dst]);

            // Emit the Transfer/Mint event.
            // the 0x0 source address implies a mint
            // It will also provide the circulating supply info.
            emit TransferSingle(
                msg.sender,
                address(0x0),
                dst,
                id,
                quantity
            );

            // if `to` is a contract then trigger its callback
            if (dst.isContract()) {
                bytes4 callbackReturnValue = IERC1155Receiver(dst).onERC1155Received(
                    msg.sender,
                    msg.sender,
                    id,
                    quantity,
                    ""
                );
                require(
                    callbackReturnValue == ERC1155_RECEIVED,
                    "BAD_RECEIVER_RETURN_VALUE"
                );
            }
        }
    }

    /// @dev mints a non-fungible token
    /// @param type_ token type
    /// @param to beneficiaries of minted tokens
    function mintNonFungible(
        uint256 type_,
        address[] calldata to
    )
        external
        override
        onlyCreator(type_)
    {
        require(
            isNonFungible(type_),
            "TRIED_TO_MINT_NON_FUNGIBLE_FOR_FUNGIBLE_TOKEN"
        );

        // Index are 1-based.
        uint256 index = maxIndex[type_] + 1;

        for (uint256 i = 0; i < to.length; ++i) {
            // cache to reduce number of loads
            address dst = to[i];
            uint256 id  = type_ | index + i;

            nfOwners[id] = dst;

            // You could use base-type id to store NF type balances if you wish.
            balances[type_][dst] = balances[type_][dst].safeAdd(1);

            emit TransferSingle(msg.sender, address(0x0), dst, id, 1);

            // if `to` is a contract then trigger its callback
            if (dst.isContract()) {
                bytes4 callbackReturnValue = IERC1155Receiver(dst).onERC1155Received(
                    msg.sender,
                    msg.sender,
                    id,
                    1,
                    ""
                );
                require(
                    callbackReturnValue == ERC1155_RECEIVED,
                    "BAD_RECEIVER_RETURN_VALUE"
                );
            }
        }

        // record the `maxIndex` of this nft type
        // this allows us to mint more nft's of this type in a subsequent call.
        maxIndex[type_] = to.length.safeAdd(maxIndex[type_]);
    }
}

File 4 of 19 : MixinOwnable.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.7.0;

import "./Context.sol";

/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * By default, the owner account will be the one that deploys the contract. This
 * can later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
abstract contract Ownable is Context {
    address private _owner;

    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor () {
        address msgSender = _msgSender();
        _owner = msgSender;
        emit OwnershipTransferred(address(0), msgSender);
    }

    /**
     * @dev Returns the address of the current owner.
     */
    function owner() public view returns (address) {
        return _owner;
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        require(_owner == _msgSender(), "Ownable: caller is not the owner");
        _;
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions anymore. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby removing any functionality that is only available to the owner.
     */
    function renounceOwnership() public onlyOwner {
        emit OwnershipTransferred(_owner, address(0));
        _owner = address(0);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public onlyOwner {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        emit OwnershipTransferred(_owner, newOwner);
        _owner = newOwner;
    }
}

File 5 of 19 : MixinPausable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.7.0;

import "./Context.sol";

/**
 * @dev Contract module which allows children to implement an emergency stop
 * mechanism that can be triggered by an authorized account.
 *
 * This module is used through inheritance. It will make available the
 * modifiers `whenNotPaused` and `whenPaused`, which can be applied to
 * the functions of your contract. Note that they will not be pausable by
 * simply including this module, only once the modifiers are put in place.
 */
abstract contract MixinPausable is Context {
    /**
     * @dev Emitted when the pause is triggered by `account`.
     */
    event Paused(address account);

    /**
     * @dev Emitted when the pause is lifted by `account`.
     */
    event Unpaused(address account);

    bool private _paused;

    /**
     * @dev Initializes the contract in unpaused state.
     */
    constructor () {
        _paused = false;
    }

    /**
     * @dev Returns true if the contract is paused, and false otherwise.
     */
    function paused() public view virtual returns (bool) {
        return _paused;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is not paused.
     *
     * Requirements:
     *
     * - The contract must not be paused.
     */
    modifier whenNotPaused() {
        require(!paused(), "Pausable: paused");
        _;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is paused.
     *
     * Requirements:
     *
     * - The contract must be paused.
     */
    modifier whenPaused() {
        require(paused(), "Pausable: not paused");
        _;
    }

    /**
     * @dev Triggers stopped state.
     *
     * Requirements:
     *
     * - The contract must not be paused.
     */
    function _pause() internal virtual whenNotPaused {
        _paused = true;
        emit Paused(_msgSender());
    }

    /**
     * @dev Returns to normal state.
     *
     * Requirements:
     *
     * - The contract must be paused.
     */
    function _unpause() internal virtual whenPaused {
        _paused = false;
        emit Unpaused(_msgSender());
    }
}

File 6 of 19 : HashRegistry.sol
pragma solidity ^0.7.0;

import "./library/LibSafeMath.sol";
import "./ERC1155Mintable.sol";
import "./mixin/MixinOwnable.sol";

contract HashRegistry is Ownable {
  using LibSafeMath for uint256;

  ERC1155Mintable public mintableErc1155;

  mapping(uint256 => uint256) public tokenIdToTxHash;
  mapping(uint256 => uint256) public txHashToTokenId;
  mapping(address => bool) public permissedWriters;

  constructor(
    address _mintableErc1155
  ) {
    permissedWriters[msg.sender] = true;
    mintableErc1155 = ERC1155Mintable(_mintableErc1155);
  }

  event UpdatedRegistry(
      uint256 tokenId,
      uint256 txHash
  );

  modifier onlyIfPermissed(address writer) {
    require(permissedWriters[writer] == true, "writer can't write to registry");
    _;
  }

  function updatePermissedWriterStatus(address _writer, bool status) public onlyIfPermissed(msg.sender) {
    permissedWriters[_writer] = status;
  }

  function writeToRegistry(uint256[] memory tokenIds, uint256[] memory txHashes) public onlyIfPermissed(msg.sender) {
    require(tokenIds.length == txHashes.length, "tokenIds and txHashes size mismatch");
    for (uint256 i = 0; i < tokenIds.length; ++i) {
      uint256 tokenId = tokenIds[i];
      uint256 txHash = txHashes[i];
      require(mintableErc1155.ownerOf(tokenId) != address(0), 'token does not exist');
      require(txHashToTokenId[txHash] == 0, 'txHash already exists');
      require(tokenIdToTxHash[tokenId] == 0, 'tokenId already exists');
      tokenIdToTxHash[tokenId] = txHash;
      txHashToTokenId[txHash] = tokenId;
      emit UpdatedRegistry(tokenId, txHash); 
    }
  }
}

File 7 of 19 : LibRichErrors.sol
pragma solidity ^0.7.0;

library LibRichErrors {

    // bytes4(keccak256("Error(string)"))
    bytes4 internal constant STANDARD_ERROR_SELECTOR =
        0x08c379a0;

    // solhint-disable func-name-mixedcase
    /// @dev ABI encode a standard, string revert error payload.
    ///      This is the same payload that would be included by a `revert(string)`
    ///      solidity statement. It has the function signature `Error(string)`.
    /// @param message The error string.
    /// @return The ABI encoded error.
    function StandardError(
        string memory message
    )
        internal
        pure
        returns (bytes memory)
    {
        return abi.encodeWithSelector(
            STANDARD_ERROR_SELECTOR,
            bytes(message)
        );
    }
    // solhint-enable func-name-mixedcase

    /// @dev Reverts an encoded rich revert reason `errorData`.
    /// @param errorData ABI encoded error data.
    function rrevert(bytes memory errorData)
        internal
        pure
    {
        assembly {
            revert(add(errorData, 0x20), mload(errorData))
        }
    }
}

File 8 of 19 : LibSafeMathRichErrors.sol
pragma solidity ^0.7.0;


library LibSafeMathRichErrors {

    // bytes4(keccak256("Uint256BinOpError(uint8,uint256,uint256)"))
    bytes4 internal constant UINT256_BINOP_ERROR_SELECTOR =
        0xe946c1bb;

    // bytes4(keccak256("Uint256DowncastError(uint8,uint256)"))
    bytes4 internal constant UINT256_DOWNCAST_ERROR_SELECTOR =
        0xc996af7b;

    enum BinOpErrorCodes {
        ADDITION_OVERFLOW,
        MULTIPLICATION_OVERFLOW,
        SUBTRACTION_UNDERFLOW,
        DIVISION_BY_ZERO
    }

    enum DowncastErrorCodes {
        VALUE_TOO_LARGE_TO_DOWNCAST_TO_UINT32,
        VALUE_TOO_LARGE_TO_DOWNCAST_TO_UINT64,
        VALUE_TOO_LARGE_TO_DOWNCAST_TO_UINT96
    }

    // solhint-disable func-name-mixedcase
    function Uint256BinOpError(
        BinOpErrorCodes errorCode,
        uint256 a,
        uint256 b
    )
        internal
        pure
        returns (bytes memory)
    {
        return abi.encodeWithSelector(
            UINT256_BINOP_ERROR_SELECTOR,
            errorCode,
            a,
            b
        );
    }

    function Uint256DowncastError(
        DowncastErrorCodes errorCode,
        uint256 a
    )
        internal
        pure
        returns (bytes memory)
    {
        return abi.encodeWithSelector(
            UINT256_DOWNCAST_ERROR_SELECTOR,
            errorCode,
            a
        );
    }
}

File 9 of 19 : LibAddress.sol
pragma solidity ^0.7.0;


/**
 * Utility library of inline functions on addresses
 */
library LibAddress {

    /**
     * Returns whether the target address is a contract
     * @dev This function will return false if invoked during the constructor of a contract,
     * as the code is not actually created until after the constructor finishes.
     * @param account address of the account to check
     * @return whether the target address is a contract
     */
    function isContract(address account) internal view returns (bool) {
        uint256 size;
        // XXX Currently there is no better way to check if there is a contract in an address
        // than to check the size of the code at that address.
        // See https://ethereum.stackexchange.com/a/14016/36603
        // for more details about how this works.
        // TODO Check this again before the Serenity release, because all addresses will be
        // contracts then.
        // solium-disable-next-line security/no-inline-assembly
        assembly { size := extcodesize(account) }
        return size > 0;
    }

}

File 10 of 19 : ERC1155.sol
pragma solidity ^0.7.0;

import "./library/LibSafeMath.sol";
import "./library/LibAddress.sol";
import "./interface/IERC1155.sol";
import "./interface/IERC1155Receiver.sol";
import "./mixin/MixinNonFungibleToken.sol";
import "./mixin/MixinOwnable.sol";
import "./WhitelistExchangesProxy.sol";

contract ERC1155 is
    IERC1155,
    MixinNonFungibleToken,
    Ownable
{
    using LibAddress for address;
    using LibSafeMath for uint256;

    // selectors for receiver callbacks
    bytes4 constant public ERC1155_RECEIVED       = 0xf23a6e61;
    bytes4 constant public ERC1155_BATCH_RECEIVED = 0xbc197c81;

    // id => (owner => balance)
    mapping (uint256 => mapping(address => uint256)) internal balances;

    // owner => (operator => approved)
    mapping (address => mapping(address => bool)) internal operatorApproval;

    address public exchangesRegistry;

    function setExchangesRegistry(address newExchangesRegistry) external onlyOwner() {
        exchangesRegistry = newExchangesRegistry;
    }

    /// @notice Transfers value amount of an _id from the _from address to the _to address specified.
    /// @dev MUST emit TransferSingle event on success.
    /// Caller must be approved to manage the _from account's tokens (see isApprovedForAll).
    /// MUST throw if `_to` is the zero address.
    /// MUST throw if balance of sender for token `_id` is lower than the `_value` sent.
    /// MUST throw on any other error.
    /// When transfer is complete, this function MUST check if `_to` is a smart contract (code size > 0).
    /// If so, it MUST call `onERC1155Received` on `_to` and revert if the return value
    /// is not `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))`.
    /// @param from    Source address
    /// @param to      Target address
    /// @param id      ID of the token type
    /// @param value   Transfer amount
    /// @param data    Additional data with no specified format, sent in call to `_to`
    function safeTransferFrom(
        address from,
        address to,
        uint256 id,
        uint256 value,
        bytes calldata data
    )
        override
        external
    {
        // sanity checks
        require(
            to != address(0x0),
            "CANNOT_TRANSFER_TO_ADDRESS_ZERO"
        );
        require(
            from == msg.sender || isApprovedForAll(from, msg.sender),
            "INSUFFICIENT_ALLOWANCE"
        );

        // perform transfer
        if (isNonFungible(id)) {
            require(
                    value == 1,
                    "AMOUNT_EQUAL_TO_ONE_REQUIRED"
            );
            require(
                nfOwners[id] == from,
                "NFT_NOT_OWNED_BY_FROM_ADDRESS"
            );
            nfOwners[id] = to;
            // You could keep balance of NF type in base type id like so:
            // uint256 baseType = getNonFungibleBaseType(_id);
            // balances[baseType][_from] = balances[baseType][_from].safeSub(_value);
            // balances[baseType][_to]   = balances[baseType][_to].safeAdd(_value);
        } else {
            balances[id][from] = balances[id][from].safeSub(value);
            balances[id][to] = balances[id][to].safeAdd(value);
        }
        emit TransferSingle(msg.sender, from, to, id, value);

        // if `to` is a contract then trigger its callback
        if (to.isContract()) {
            bytes4 callbackReturnValue = IERC1155Receiver(to).onERC1155Received(
                msg.sender,
                from,
                id,
                value,
                data
            );
            require(
                callbackReturnValue == ERC1155_RECEIVED,
                "BAD_RECEIVER_RETURN_VALUE"
            );
        }
    }

    /// @notice Send multiple types of Tokens from a 3rd party in one transfer (with safety call).
    /// @dev MUST emit TransferBatch event on success.
    /// Caller must be approved to manage the _from account's tokens (see isApprovedForAll).
    /// MUST throw if `_to` is the zero address.
    /// MUST throw if length of `_ids` is not the same as length of `_values`.
    ///  MUST throw if any of the balance of sender for token `_ids` is lower than the respective `_values` sent.
    /// MUST throw on any other error.
    /// When transfer is complete, this function MUST check if `_to` is a smart contract (code size > 0).
    /// If so, it MUST call `onERC1155BatchReceived` on `_to` and revert if the return value
    /// is not `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))`.
    /// @param from    Source addresses
    /// @param to      Target addresses
    /// @param ids     IDs of each token type
    /// @param values  Transfer amounts per token type
    /// @param data    Additional data with no specified format, sent in call to `_to`
    function safeBatchTransferFrom(
        address from,
        address to,
        uint256[] calldata ids,
        uint256[] calldata values,
        bytes calldata data
    )
        override
        external
    {
        // sanity checks
        require(
            to != address(0x0),
            "CANNOT_TRANSFER_TO_ADDRESS_ZERO"
        );
        require(
            ids.length == values.length,
            "TOKEN_AND_VALUES_LENGTH_MISMATCH"
        );

        // Only supporting a global operator approval allows us to do
        // only 1 check and not to touch storage to handle allowances.
        require(
            from == msg.sender || isApprovedForAll(from, msg.sender),
            "INSUFFICIENT_ALLOWANCE"
        );

        // perform transfers
        for (uint256 i = 0; i < ids.length; ++i) {
            // Cache value to local variable to reduce read costs.
            uint256 id = ids[i];
            uint256 value = values[i];

            if (isNonFungible(id)) {
                require(
                    value == 1,
                    "AMOUNT_EQUAL_TO_ONE_REQUIRED"
                );
                require(
                    nfOwners[id] == from,
                    "NFT_NOT_OWNED_BY_FROM_ADDRESS"
                );
                nfOwners[id] = to;
            } else {
                balances[id][from] = balances[id][from].safeSub(value);
                balances[id][to] = balances[id][to].safeAdd(value);
            }
        }
        emit TransferBatch(msg.sender, from, to, ids, values);

        // if `to` is a contract then trigger its callback
        if (to.isContract()) {
            bytes4 callbackReturnValue = IERC1155Receiver(to).onERC1155BatchReceived(
                msg.sender,
                from,
                ids,
                values,
                data
            );
            require(
                callbackReturnValue == ERC1155_BATCH_RECEIVED,
                "BAD_RECEIVER_RETURN_VALUE"
            );
        }
    }

    /// @notice Enable or disable approval for a third party ("operator") to manage all of the caller's tokens.
    /// @dev MUST emit the ApprovalForAll event on success.
    /// @param operator  Address to add to the set of authorized operators
    /// @param approved  True if the operator is approved, false to revoke approval
    function setApprovalForAll(address operator, bool approved) external override {
        operatorApproval[msg.sender][operator] = approved;
        emit ApprovalForAll(msg.sender, operator, approved);
    }

    /// @notice Queries the approval status of an operator for a given owner.
    /// @param owner     The owner of the Tokens
    /// @param operator  Address of authorized operator
    /// @return           True if the operator is approved, false if not
    function isApprovedForAll(address owner, address operator) public override view returns (bool) {
        bool approved = operatorApproval[owner][operator];
        if (!approved && exchangesRegistry != address(0)) {
            return WhitelistExchangesProxy(exchangesRegistry).isAddressWhitelisted(operator) == true;
        }
        return approved;
    }

    /// @notice Get the balance of an account's Tokens.
    /// @param owner  The address of the token holder
    /// @param id     ID of the Token
    /// @return        The _owner's balance of the Token type requested
    function balanceOf(address owner, uint256 id) external override view returns (uint256) {
        if (isNonFungibleItem(id)) {
            return nfOwners[id] == owner ? 1 : 0;
        }
        return balances[id][owner];
    }

    /// @notice Get the balance of multiple account/token pairs
    /// @param owners The addresses of the token holders
    /// @param ids    ID of the Tokens
    /// @return balances_       The _owner's balance of the Token types requested
    function balanceOfBatch(address[] calldata owners, uint256[] calldata ids) external override view returns (uint256[] memory balances_) {
        // sanity check
        require(
            owners.length == ids.length,
            "OWNERS_AND_IDS_MUST_HAVE_SAME_LENGTH"
        );

        // get balances
        balances_ = new uint256[](owners.length);
        for (uint256 i = 0; i < owners.length; ++i) {
            uint256 id = ids[i];
            if (isNonFungibleItem(id)) {
                balances_[i] = nfOwners[id] == owners[i] ? 1 : 0;
            } else {
                balances_[i] = balances[id][owners[i]];
            }
        }

        return balances_;
    }

    bytes4 constant private INTERFACE_SIGNATURE_ERC165 = 0x01ffc9a7;
    bytes4 constant private INTERFACE_SIGNATURE_ERC1155 = 0xd9b67a26;

    function supportsInterface(bytes4 _interfaceID) external view returns (bool) {
        if (_interfaceID == INTERFACE_SIGNATURE_ERC165 ||
            _interfaceID == INTERFACE_SIGNATURE_ERC1155) {
        return true;
        }
        return false;
    }
}

File 11 of 19 : IERC1155Mintable.sol
/*

  Copyright 2019 ZeroEx Intl.

  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.

*/

pragma solidity ^0.7.0;

import "./IERC1155.sol";


/// @dev Mintable form of ERC1155
/// Shows how easy it is to mint new items
interface IERC1155Mintable is
    IERC1155
{

    /// @dev creates a new token
    /// @param isNF is non-fungible token
    /// @return type_ of token (a unique identifier)
    function create(
        bool isNF
    )
        external
        returns (uint256 type_);

    /// @dev mints fungible tokens
    /// @param id token type
    /// @param to beneficiaries of minted tokens
    /// @param quantities amounts of minted tokens
    function mintFungible(
        uint256 id,
        address[] calldata to,
        uint256[] calldata quantities
    )
        external;

    /// @dev mints a non-fungible token
    /// @param type_ token type
    /// @param to beneficiaries of minted tokens
    function mintNonFungible(
        uint256 type_,
        address[] calldata to
    )
        external;
}

File 12 of 19 : MixinContractURI.sol
pragma solidity ^0.7.0;

import "./MixinOwnable.sol";

contract MixinContractURI is Ownable {
    string public contractURI;

    function setContractURI(string calldata newContractURI) external onlyOwner() {
        contractURI = newContractURI;
    }
}

File 13 of 19 : MixinTokenURI.sol
pragma solidity ^0.7.0;

import "./MixinOwnable.sol";
import "../library/LibString.sol";

contract MixinTokenURI is Ownable {
    using LibString for string;

    string public baseMetadataURI = "";

    function setBaseMetadataURI(string memory newBaseMetadataURI) public onlyOwner() {
        baseMetadataURI = newBaseMetadataURI;
    }

    function uri(uint256 _id) public view returns (string memory) {
        return LibString.strConcat(
        baseMetadataURI,
        LibString.uint2hexstr(_id)
        );
    }
}

File 14 of 19 : IERC1155.sol
/*

  Copyright 2019 ZeroEx Intl.

  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.

*/

pragma solidity ^0.7.0;

/// @title ERC-1155 Multi Token Standard
/// @dev See https://github.com/ethereum/EIPs/blob/master/EIPS/eip-1155.md
/// Note: The ERC-165 identifier for this interface is 0xd9b67a26.
interface IERC1155 {

    /// @dev Either TransferSingle or TransferBatch MUST emit when tokens are transferred,
    ///      including zero value transfers as well as minting or burning.
    /// Operator will always be msg.sender.
    /// Either event from address `0x0` signifies a minting operation.
    /// An event to address `0x0` signifies a burning or melting operation.
    /// The total value transferred from address 0x0 minus the total value transferred to 0x0 may
    /// be used by clients and exchanges to be added to the "circulating supply" for a given token ID.
    /// To define a token ID with no initial balance, the contract SHOULD emit the TransferSingle event
    /// from `0x0` to `0x0`, with the token creator as `_operator`.
    event TransferSingle(
        address indexed _operator,
        address indexed _from,
        address indexed _to,
        uint256 _id,
        uint256 _value
    );

    /// @dev Either TransferSingle or TransferBatch MUST emit when tokens are transferred,
    ///      including zero value transfers as well as minting or burning.
    ///Operator will always be msg.sender.
    /// Either event from address `0x0` signifies a minting operation.
    /// An event to address `0x0` signifies a burning or melting operation.
    /// The total value transferred from address 0x0 minus the total value transferred to 0x0 may
    /// be used by clients and exchanges to be added to the "circulating supply" for a given token ID.
    /// To define multiple token IDs with no initial balance, this SHOULD emit the TransferBatch event
    /// from `0x0` to `0x0`, with the token creator as `_operator`.
    event TransferBatch(
        address indexed _operator,
        address indexed _from,
        address indexed _to,
        uint256[] _ids,
        uint256[] _values
    );

    /// @dev MUST emit when an approval is updated.
    event ApprovalForAll(
        address indexed _owner,
        address indexed _operator,
        bool _approved
    );

    /// @dev MUST emit when the URI is updated for a token ID.
    /// URIs are defined in RFC 3986.
    /// The URI MUST point a JSON file that conforms to the "ERC-1155 Metadata JSON Schema".
    event URI(
        string _value,
        uint256 indexed _id
    );

    /// @notice Transfers value amount of an _id from the _from address to the _to address specified.
    /// @dev MUST emit TransferSingle event on success.
    /// Caller must be approved to manage the _from account's tokens (see isApprovedForAll).
    /// MUST throw if `_to` is the zero address.
    /// MUST throw if balance of sender for token `_id` is lower than the `_value` sent.
    /// MUST throw on any other error.
    /// When transfer is complete, this function MUST check if `_to` is a smart contract (code size > 0).
    /// If so, it MUST call `onERC1155Received` on `_to` and revert if the return value
    /// is not `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))`.
    /// @param from    Source address
    /// @param to      Target address
    /// @param id      ID of the token type
    /// @param value   Transfer amount
    /// @param data    Additional data with no specified format, sent in call to `_to`
    function safeTransferFrom(
        address from,
        address to,
        uint256 id,
        uint256 value,
        bytes calldata data
    )
        external;

    /// @notice Send multiple types of Tokens from a 3rd party in one transfer (with safety call).
    /// @dev MUST emit TransferBatch event on success.
    /// Caller must be approved to manage the _from account's tokens (see isApprovedForAll).
    /// MUST throw if `_to` is the zero address.
    /// MUST throw if length of `_ids` is not the same as length of `_values`.
    ///  MUST throw if any of the balance of sender for token `_ids` is lower than the respective `_values` sent.
    /// MUST throw on any other error.
    /// When transfer is complete, this function MUST check if `_to` is a smart contract (code size > 0).
    /// If so, it MUST call `onERC1155BatchReceived` on `_to` and revert if the return value
    /// is not `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))`.
    /// @param from    Source addresses
    /// @param to      Target addresses
    /// @param ids     IDs of each token type
    /// @param values  Transfer amounts per token type
    /// @param data    Additional data with no specified format, sent in call to `_to`
    function safeBatchTransferFrom(
        address from,
        address to,
        uint256[] calldata ids,
        uint256[] calldata values,
        bytes calldata data
    )
        external;

    /// @notice Enable or disable approval for a third party ("operator") to manage all of the caller's tokens.
    /// @dev MUST emit the ApprovalForAll event on success.
    /// @param operator  Address to add to the set of authorized operators
    /// @param approved  True if the operator is approved, false to revoke approval
    function setApprovalForAll(address operator, bool approved) external;

    /// @notice Queries the approval status of an operator for a given owner.
    /// @param owner     The owner of the Tokens
    /// @param operator  Address of authorized operator
    /// @return           True if the operator is approved, false if not
    function isApprovedForAll(address owner, address operator) external view returns (bool);

    /// @notice Get the balance of an account's Tokens.
    /// @param owner  The address of the token holder
    /// @param id     ID of the Token
    /// @return        The _owner's balance of the Token type requested
    function balanceOf(address owner, uint256 id) external view returns (uint256);

    /// @notice Get the balance of multiple account/token pairs
    /// @param owners The addresses of the token holders
    /// @param ids    ID of the Tokens
    /// @return balances_ The _owner's balance of the Token types requested
    function balanceOfBatch(
        address[] calldata owners,
        uint256[] calldata ids
    )
        external
        view
        returns (uint256[] memory balances_);
}

File 15 of 19 : IERC1155Receiver.sol
/*

  Copyright 2019 ZeroEx Intl.

  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.

*/

pragma solidity ^0.7.0;


interface IERC1155Receiver {

    /// @notice Handle the receipt of a single ERC1155 token type
    /// @dev The smart contract calls this function on the recipient
    /// after a `safeTransferFrom`. This function MAY throw to revert and reject the
    /// transfer. Return of other than the magic value MUST result in the
    ///transaction being reverted
    /// Note: the contract address is always the message sender
    /// @param operator  The address which called `safeTransferFrom` function
    /// @param from      The address which previously owned the token
    /// @param id        An array containing the ids of the token being transferred
    /// @param value     An array containing the amount of tokens being transferred
    /// @param data      Additional data with no specified format
    /// @return          `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))`
    function onERC1155Received(
        address operator,
        address from,
        uint256 id,
        uint256 value,
        bytes calldata data
    )
        external
        returns(bytes4);

    /// @notice Handle the receipt of multiple ERC1155 token types
    /// @dev The smart contract calls this function on the recipient
    /// after a `safeTransferFrom`. This function MAY throw to revert and reject the
    /// transfer. Return of other than the magic value MUST result in the
    /// transaction being reverted
    /// Note: the contract address is always the message sender
    /// @param operator  The address which called `safeTransferFrom` function
    /// @param from      The address which previously owned the token
    /// @param ids       An array containing ids of each token being transferred
    /// @param values    An array containing amounts of each token being transferred
    /// @param data      Additional data with no specified format
    /// @return           `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))`
    function onERC1155BatchReceived(
        address operator,
        address from,
        uint256[] calldata ids,
        uint256[] calldata values,
        bytes calldata data
    )
        external
        returns(bytes4);
}

File 16 of 19 : MixinNonFungibleToken.sol
pragma solidity ^0.7.0;


contract MixinNonFungibleToken {
    uint256 constant internal TYPE_MASK = uint256(uint128(~0)) << 128;

    uint256 constant internal NF_INDEX_MASK = uint128(~0);

    uint256 constant internal TYPE_NF_BIT = 1 << 255;

    mapping (uint256 => address) internal nfOwners;

    /// @dev Returns true if token is non-fungible
    function isNonFungible(uint256 id) public pure returns(bool) {
        return id & TYPE_NF_BIT == TYPE_NF_BIT;
    }

    /// @dev Returns true if token is fungible
    function isFungible(uint256 id) public pure returns(bool) {
        return id & TYPE_NF_BIT == 0;
    }

    /// @dev Returns index of non-fungible token
    function getNonFungibleIndex(uint256 id) public pure returns(uint256) {
        return id & NF_INDEX_MASK;
    }

    /// @dev Returns base type of non-fungible token
    function getNonFungibleBaseType(uint256 id) public pure returns(uint256) {
        return id & TYPE_MASK;
    }

    /// @dev Returns true if input is base-type of a non-fungible token
    function isNonFungibleBaseType(uint256 id) public pure returns(bool) {
        // A base type has the NF bit but does not have an index.
        return (id & TYPE_NF_BIT == TYPE_NF_BIT) && (id & NF_INDEX_MASK == 0);
    }

    /// @dev Returns true if input is a non-fungible token
    function isNonFungibleItem(uint256 id) public pure returns(bool) {
        // A base type has the NF bit but does has an index.
        return (id & TYPE_NF_BIT == TYPE_NF_BIT) && (id & NF_INDEX_MASK != 0);
    }

    /// @dev returns owner of a non-fungible token
    function ownerOf(uint256 id) public view returns (address) {
        return nfOwners[id];
    }
}

File 17 of 19 : WhitelistExchangesProxy.sol
pragma solidity ^0.7.0;

import "./mixin/MixinOwnable.sol";

contract WhitelistExchangesProxy is Ownable {
    mapping(address => bool) internal proxies;

    bool public paused = true;
    
    function setPaused(bool newPaused) external onlyOwner() {
        paused = newPaused;
    }

    function updateProxyAddress(address proxy, bool status) external onlyOwner() {
        proxies[proxy] = status;
    }

    function isAddressWhitelisted(address proxy) external view returns (bool) {
        if (paused) {
            return false;
        } else {
            return proxies[proxy];
        }
    }
}

File 18 of 19 : Context.sol
pragma solidity ^0.7.0;

contract Context {
    function _msgSender() internal view returns (address payable) {
        return msg.sender;
    }

    function _msgData() internal view returns (bytes memory) {
        this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
        return msg.data;
    }
}

File 19 of 19 : LibString.sol
pragma solidity ^0.7.0;

library LibString {
  // via https://github.com/oraclize/ethereum-api/blob/master/oraclizeAPI_0.5.sol
  function strConcat(string memory _a, string memory _b, string memory _c, string memory _d, string memory _e) internal pure returns (string memory) {
      bytes memory _ba = bytes(_a);
      bytes memory _bb = bytes(_b);
      bytes memory _bc = bytes(_c);
      bytes memory _bd = bytes(_d);
      bytes memory _be = bytes(_e);
      string memory abcde = new string(_ba.length + _bb.length + _bc.length + _bd.length + _be.length);
      bytes memory babcde = bytes(abcde);
      uint k = 0;
      for (uint i = 0; i < _ba.length; i++) babcde[k++] = _ba[i];
      for (uint i = 0; i < _bb.length; i++) babcde[k++] = _bb[i];
      for (uint i = 0; i < _bc.length; i++) babcde[k++] = _bc[i];
      for (uint i = 0; i < _bd.length; i++) babcde[k++] = _bd[i];
      for (uint i = 0; i < _be.length; i++) babcde[k++] = _be[i];
      return string(babcde);
    }

    function strConcat(string memory _a, string memory _b, string memory _c, string memory _d) internal pure returns (string memory) {
        return strConcat(_a, _b, _c, _d, "");
    }

    function strConcat(string memory _a, string memory _b, string memory _c) internal pure returns (string memory) {
        return strConcat(_a, _b, _c, "", "");
    }

    function strConcat(string memory _a, string memory _b) internal pure returns (string memory) {
        return strConcat(_a, _b, "", "", "");
    }

    function uint2str(uint _i) internal pure returns (string memory _uintAsString) {
        if (_i == 0) {
            return "0";
        }
        uint j = _i;
        uint len;
        while (j != 0) {
            len++;
            j /= 10;
        }
        bytes memory bstr = new bytes(len);
        uint k = len - 1;
        while (_i != 0) {
            bstr[k--] = byte(uint8(48 + _i % 10));
            _i /= 10;
        }
        return string(bstr);
    }

    function uint2hexstr(uint i) internal pure returns (string memory) {
        if (i == 0) {
            return "0";
        }
        uint j = i;
        uint len;
        while (j != 0) {
            len++;
            j = j >> 4;
        }
        uint mask = 15;
        bytes memory bstr = new bytes(len);
        uint k = len - 1;
        while (i != 0){
            uint curr = (i & mask);
            bstr[k--] = curr > 9 ? byte(uint8(55 + curr)) : byte(uint8(48 + curr));
            i = i >> 4;
        }
        return string(bstr);
    }
}

Settings
{
  "optimizer": {
    "enabled": false,
    "runs": 200
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "abi"
      ]
    }
  },
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_registry","type":"address"},{"internalType":"address","name":"_mintableErc1155","type":"address"},{"internalType":"address payable","name":"_treasury","type":"address"},{"internalType":"uint256","name":"_tokenType","type":"uint256"},{"internalType":"uint256","name":"_startingPriceForHistoric","type":"uint256"},{"internalType":"uint256","name":"_pricePerMintForHistoric","type":"uint256"},{"internalType":"uint256","name":"_maxMintingSupply","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[],"name":"maxIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"_dsts","type":"address[]"},{"internalType":"uint256[]","name":"_txHashes","type":"uint256[]"}],"name":"mint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"mintableErc1155","outputs":[{"internalType":"contract ERC1155Mintable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pricePerMintForHistoric","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_maxIndex","type":"uint256"}],"name":"pricingCurveForHistoric","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"registry","outputs":[{"internalType":"contract HashRegistry","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"_treasury","type":"address"}],"name":"setTreasury","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"startingPriceForHistoric","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tokenType","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"treasury","outputs":[{"internalType":"address payable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60e06040523480156200001157600080fd5b5060405162001f5838038062001f5883398181016040528101906200003791906200023d565b600062000049620001f060201b60201c565b9050806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35060008060146101000a81548160ff02191690831515021790555086600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555085600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555084600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508360018190555082608081815250508160a081815250508060c08181525050505050505050506200038a565b600033905090565b60008151905062000209816200033c565b92915050565b600081519050620002208162000356565b92915050565b600081519050620002378162000370565b92915050565b600080600080600080600060e0888a0312156200025957600080fd5b6000620002698a828b01620001f8565b97505060206200027c8a828b01620001f8565b96505060406200028f8a828b016200020f565b9550506060620002a28a828b0162000226565b9450506080620002b58a828b0162000226565b93505060a0620002c88a828b0162000226565b92505060c0620002db8a828b0162000226565b91505092959891949750929550565b6000620002f78262000312565b9050919050565b60006200030b8262000312565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b6200034781620002ea565b81146200035357600080fd5b50565b6200036181620002fe565b81146200036d57600080fd5b50565b6200037b8162000332565b81146200038757600080fd5b50565b60805160a05160c051611b97620003c16000398061086b5250806107b652806107fb52508061044d52806107925250611b976000f3fe6080604052600436106100f35760003560e01c80637b1039991161008a578063c660e41111610059578063c660e411146102d2578063e467f7e0146102fd578063f0f4426014610319578063f2fde38b14610342576100f3565b80637b103999146102285780638456cb59146102535780638da5cb5b1461026a578063b857297314610295576100f3565b80633f4ba83a116100c65780633f4ba83a146101a45780635c975abb146101bb57806361d027b3146101e6578063715018a614610211576100f3565b80632269f9fb146100f85780632ca869bf1461012357806330fa738c1461014e57806337dd9de014610179575b600080fd5b34801561010457600080fd5b5061010d61036b565b60405161011a91906117ee565b60405180910390f35b34801561012f57600080fd5b50610138610391565b604051610145919061193b565b60405180910390f35b34801561015a57600080fd5b50610163610445565b604051610170919061193b565b60405180910390f35b34801561018557600080fd5b5061018e61044b565b60405161019b919061193b565b60405180910390f35b3480156101b057600080fd5b506101b961046f565b005b3480156101c757600080fd5b506101d061050e565b6040516101dd91906117d3565b60405180910390f35b3480156101f257600080fd5b506101fb610524565b6040516102089190611781565b60405180910390f35b34801561021d57600080fd5b5061022661054a565b005b34801561023457600080fd5b5061023d61069d565b60405161024a9190611809565b60405180910390f35b34801561025f57600080fd5b506102686106c3565b005b34801561027657600080fd5b5061027f610762565b60405161028c919061174b565b60405180910390f35b3480156102a157600080fd5b506102bc60048036038101906102b7919061136b565b61078b565b6040516102c9919061193b565b60405180910390f35b3480156102de57600080fd5b506102e76107f9565b6040516102f4919061193b565b60405180910390f35b610317600480360381019061031291906112f6565b61081d565b005b34801561032557600080fd5b50610340600480360381019061033b91906112cd565b610ae7565b005b34801561034e57600080fd5b50610369600480360381019061036491906112a4565b610bc0565b005b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166308d7d4696001546040518263ffffffff1660e01b81526004016103f0919061193b565b60206040518083038186803b15801561040857600080fd5b505afa15801561041c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104409190611394565b905090565b60015481565b7f000000000000000000000000000000000000000000000000000000000000000081565b610477610d82565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610504576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104fb9061191b565b60405180910390fd5b61050c610d8a565b565b60008060149054906101000a900460ff16905090565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b610552610d82565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146105df576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105d69061191b565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6106cb610d82565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610758576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161074f9061191b565b60405180910390fd5b610760610e2b565b565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60006107f27f00000000000000000000000000000000000000000000000000000000000000006107e47f000000000000000000000000000000000000000000000000000000000000000085610ece90919063ffffffff16565b610f1890919063ffffffff16565b9050919050565b7f000000000000000000000000000000000000000000000000000000000000000081565b61082561050e565b15610865576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161085c906118bb565b60405180910390fd5b838390507f000000000000000000000000000000000000000000000000000000000000000081610893610391565b0111156108d5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108cc906118fb565b60405180910390fd5b82829050858590501461091d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610914906118db565b60405180910390fd5b6000805b8686905081101561094d5761093e81610938610391565b0161078b565b82019150806001019050610921565b5034811115610991576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109889061189b565b60405180910390fd5b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f193505050501580156109f9573d6000803e3d6000fd5b503373ffffffffffffffffffffffffffffffffffffffff166108fc610a278334610f4790919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015610a52573d6000803e3d6000fd5b50610adf868680806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f82011690508083019250505050505050858580806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f82011690508083019250505050505050610f71565b505050505050565b610aef610d82565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610b7c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b739061191b565b60405180910390fd5b80600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b610bc8610d82565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610c55576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c4c9061191b565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610cc5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610cbc9061187b565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600033905090565b610d9261050e565b610dd1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610dc89061185b565b60405180910390fd5b60008060146101000a81548160ff0219169083151502179055507f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa610e14610d82565b604051610e219190611766565b60405180910390a1565b610e3361050e565b15610e73576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e6a906118bb565b60405180910390fd5b6001600060146101000a81548160ff0219169083151502179055507f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258610eb7610d82565b604051610ec49190611766565b60405180910390a1565b600080831415610ee15760009050610f12565b6000828402905082848281610ef257fe5b0414610f0d57610f0c610f076001868661112f565b6111b4565b5b809150505b92915050565b600080828401905083811015610f3d57610f3c610f376000868661112f565b6111b4565b5b8091505092915050565b600082821115610f6657610f65610f606002858561112f565b6111b4565b5b818303905092915050565b6060825167ffffffffffffffff81118015610f8b57600080fd5b50604051908082528060200260200182016040528015610fba5781602001602082028036833780820191505090505b50905060005b8351811015611009576000816001610fd6610391565b0101905060008160015417905080848481518110610ff057fe5b6020026020010181815250505050806001019050610fc0565b50600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f9419088600154856040518363ffffffff1660e01b8152600401611069929190611956565b600060405180830381600087803b15801561108357600080fd5b505af1158015611097573d6000803e3d6000fd5b50505050600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16633b5efd0382846040518363ffffffff1660e01b81526004016110f892919061179c565b600060405180830381600087803b15801561111257600080fd5b505af1158015611126573d6000803e3d6000fd5b50505050505050565b606063e946c1bb60e01b84848460405160240161114e93929190611824565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505090509392505050565b805160208201fd5b6000813590506111cb81611b1c565b92915050565b6000813590506111e081611b33565b92915050565b60008083601f8401126111f857600080fd5b8235905067ffffffffffffffff81111561121157600080fd5b60208301915083602082028301111561122957600080fd5b9250929050565b60008083601f84011261124257600080fd5b8235905067ffffffffffffffff81111561125b57600080fd5b60208301915083602082028301111561127357600080fd5b9250929050565b60008135905061128981611b4a565b92915050565b60008151905061129e81611b4a565b92915050565b6000602082840312156112b657600080fd5b60006112c4848285016111bc565b91505092915050565b6000602082840312156112df57600080fd5b60006112ed848285016111d1565b91505092915050565b6000806000806040858703121561130c57600080fd5b600085013567ffffffffffffffff81111561132657600080fd5b611332878288016111e6565b9450945050602085013567ffffffffffffffff81111561135157600080fd5b61135d87828801611230565b925092505092959194509250565b60006020828403121561137d57600080fd5b600061138b8482850161127a565b91505092915050565b6000602082840312156113a657600080fd5b60006113b48482850161128f565b91505092915050565b60006113c9838361140b565b60208301905092915050565b60006113e1838361172d565b60208301905092915050565b6113f681611a76565b82525050565b61140581611a1b565b82525050565b61141481611a09565b82525050565b61142381611a09565b82525050565b6000611434826119a6565b61143e81856119d6565b935061144983611986565b8060005b8381101561147a57815161146188826113bd565b975061146c836119bc565b92505060018101905061144d565b5085935050505092915050565b6000611492826119b1565b61149c81856119e7565b93506114a783611996565b8060005b838110156114d85781516114bf88826113d5565b97506114ca836119c9565b9250506001810190506114ab565b5085935050505092915050565b6114ee81611a2d565b82525050565b6114fd81611a88565b82525050565b61150c81611aac565b82525050565b61151b81611ad0565b82525050565b600061152e6014836119f8565b91507f5061757361626c653a206e6f74207061757365640000000000000000000000006000830152602082019050919050565b600061156e6026836119f8565b91507f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008301527f64647265737300000000000000000000000000000000000000000000000000006020830152604082019050919050565b60006115d46022836119f8565b91507f696e73756666696369656e742066756e647320746f2070617920666f72206d6960008301527f6e740000000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b600061163a6010836119f8565b91507f5061757361626c653a20706175736564000000000000000000000000000000006000830152602082019050919050565b600061167a601e836119f8565b91507f647374732c207478686173686573206c656e677468206d69736d6174636800006000830152602082019050919050565b60006116ba6011836119f8565b91507f6d617820737570706c79206d696e7465640000000000000000000000000000006000830152602082019050919050565b60006116fa6020836119f8565b91507f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726000830152602082019050919050565b61173681611a6c565b82525050565b61174581611a6c565b82525050565b6000602082019050611760600083018461141a565b92915050565b600060208201905061177b60008301846113ed565b92915050565b600060208201905061179660008301846113fc565b92915050565b600060408201905081810360008301526117b68185611487565b905081810360208301526117ca8184611487565b90509392505050565b60006020820190506117e860008301846114e5565b92915050565b600060208201905061180360008301846114f4565b92915050565b600060208201905061181e6000830184611503565b92915050565b60006060820190506118396000830186611512565b611846602083018561173c565b611853604083018461173c565b949350505050565b6000602082019050818103600083015261187481611521565b9050919050565b6000602082019050818103600083015261189481611561565b9050919050565b600060208201905081810360008301526118b4816115c7565b9050919050565b600060208201905081810360008301526118d48161162d565b9050919050565b600060208201905081810360008301526118f48161166d565b9050919050565b60006020820190508181036000830152611914816116ad565b9050919050565b60006020820190508181036000830152611934816116ed565b9050919050565b6000602082019050611950600083018461173c565b92915050565b600060408201905061196b600083018561173c565b818103602083015261197d8184611429565b90509392505050565b6000819050602082019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600082825260208201905092915050565b6000611a1482611a4c565b9050919050565b6000611a2682611a4c565b9050919050565b60008115159050919050565b6000819050611a4782611b08565b919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b6000611a8182611ae2565b9050919050565b6000611a9382611a9a565b9050919050565b6000611aa582611a4c565b9050919050565b6000611ab782611abe565b9050919050565b6000611ac982611a4c565b9050919050565b6000611adb82611a39565b9050919050565b6000611aed82611af4565b9050919050565b6000611aff82611a4c565b9050919050565bfe5b60048110611b1957611b18611b06565b5b50565b611b2581611a09565b8114611b3057600080fd5b50565b611b3c81611a1b565b8114611b4757600080fd5b50565b611b5381611a6c565b8114611b5e57600080fd5b5056fea2646970667358221220914c3dc494375babc17aaf91f1647aaef64a993205c223cab7e391330f40dd9564736f6c6343000703003300000000000000000000000029ca58d4a0857ae3f0608a546cde5f254a3f867a000000000000000000000000e18a32192ed95b0fe9d70d19e5025f103475d7ba00000000000000000000000028558ba4343feb2709ed7a9531b72402a7794d8d80000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000429d069189e00000000000000000000000000000000000000000000000000000000ecec61f6c80000000000000000000000000000000000000000000000000000000000000008ff

Deployed Bytecode

0x6080604052600436106100f35760003560e01c80637b1039991161008a578063c660e41111610059578063c660e411146102d2578063e467f7e0146102fd578063f0f4426014610319578063f2fde38b14610342576100f3565b80637b103999146102285780638456cb59146102535780638da5cb5b1461026a578063b857297314610295576100f3565b80633f4ba83a116100c65780633f4ba83a146101a45780635c975abb146101bb57806361d027b3146101e6578063715018a614610211576100f3565b80632269f9fb146100f85780632ca869bf1461012357806330fa738c1461014e57806337dd9de014610179575b600080fd5b34801561010457600080fd5b5061010d61036b565b60405161011a91906117ee565b60405180910390f35b34801561012f57600080fd5b50610138610391565b604051610145919061193b565b60405180910390f35b34801561015a57600080fd5b50610163610445565b604051610170919061193b565b60405180910390f35b34801561018557600080fd5b5061018e61044b565b60405161019b919061193b565b60405180910390f35b3480156101b057600080fd5b506101b961046f565b005b3480156101c757600080fd5b506101d061050e565b6040516101dd91906117d3565b60405180910390f35b3480156101f257600080fd5b506101fb610524565b6040516102089190611781565b60405180910390f35b34801561021d57600080fd5b5061022661054a565b005b34801561023457600080fd5b5061023d61069d565b60405161024a9190611809565b60405180910390f35b34801561025f57600080fd5b506102686106c3565b005b34801561027657600080fd5b5061027f610762565b60405161028c919061174b565b60405180910390f35b3480156102a157600080fd5b506102bc60048036038101906102b7919061136b565b61078b565b6040516102c9919061193b565b60405180910390f35b3480156102de57600080fd5b506102e76107f9565b6040516102f4919061193b565b60405180910390f35b610317600480360381019061031291906112f6565b61081d565b005b34801561032557600080fd5b50610340600480360381019061033b91906112cd565b610ae7565b005b34801561034e57600080fd5b50610369600480360381019061036491906112a4565b610bc0565b005b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166308d7d4696001546040518263ffffffff1660e01b81526004016103f0919061193b565b60206040518083038186803b15801561040857600080fd5b505afa15801561041c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104409190611394565b905090565b60015481565b7f0000000000000000000000000000000000000000000000000429d069189e000081565b610477610d82565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610504576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104fb9061191b565b60405180910390fd5b61050c610d8a565b565b60008060149054906101000a900460ff16905090565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b610552610d82565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146105df576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105d69061191b565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6106cb610d82565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610758576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161074f9061191b565b60405180910390fd5b610760610e2b565b565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60006107f27f0000000000000000000000000000000000000000000000000429d069189e00006107e47f0000000000000000000000000000000000000000000000000000ecec61f6c80085610ece90919063ffffffff16565b610f1890919063ffffffff16565b9050919050565b7f0000000000000000000000000000000000000000000000000000ecec61f6c80081565b61082561050e565b15610865576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161085c906118bb565b60405180910390fd5b838390507f00000000000000000000000000000000000000000000000000000000000008ff81610893610391565b0111156108d5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108cc906118fb565b60405180910390fd5b82829050858590501461091d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610914906118db565b60405180910390fd5b6000805b8686905081101561094d5761093e81610938610391565b0161078b565b82019150806001019050610921565b5034811115610991576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109889061189b565b60405180910390fd5b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f193505050501580156109f9573d6000803e3d6000fd5b503373ffffffffffffffffffffffffffffffffffffffff166108fc610a278334610f4790919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015610a52573d6000803e3d6000fd5b50610adf868680806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f82011690508083019250505050505050858580806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f82011690508083019250505050505050610f71565b505050505050565b610aef610d82565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610b7c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b739061191b565b60405180910390fd5b80600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b610bc8610d82565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610c55576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c4c9061191b565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610cc5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610cbc9061187b565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600033905090565b610d9261050e565b610dd1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610dc89061185b565b60405180910390fd5b60008060146101000a81548160ff0219169083151502179055507f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa610e14610d82565b604051610e219190611766565b60405180910390a1565b610e3361050e565b15610e73576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e6a906118bb565b60405180910390fd5b6001600060146101000a81548160ff0219169083151502179055507f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258610eb7610d82565b604051610ec49190611766565b60405180910390a1565b600080831415610ee15760009050610f12565b6000828402905082848281610ef257fe5b0414610f0d57610f0c610f076001868661112f565b6111b4565b5b809150505b92915050565b600080828401905083811015610f3d57610f3c610f376000868661112f565b6111b4565b5b8091505092915050565b600082821115610f6657610f65610f606002858561112f565b6111b4565b5b818303905092915050565b6060825167ffffffffffffffff81118015610f8b57600080fd5b50604051908082528060200260200182016040528015610fba5781602001602082028036833780820191505090505b50905060005b8351811015611009576000816001610fd6610391565b0101905060008160015417905080848481518110610ff057fe5b6020026020010181815250505050806001019050610fc0565b50600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f9419088600154856040518363ffffffff1660e01b8152600401611069929190611956565b600060405180830381600087803b15801561108357600080fd5b505af1158015611097573d6000803e3d6000fd5b50505050600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16633b5efd0382846040518363ffffffff1660e01b81526004016110f892919061179c565b600060405180830381600087803b15801561111257600080fd5b505af1158015611126573d6000803e3d6000fd5b50505050505050565b606063e946c1bb60e01b84848460405160240161114e93929190611824565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505090509392505050565b805160208201fd5b6000813590506111cb81611b1c565b92915050565b6000813590506111e081611b33565b92915050565b60008083601f8401126111f857600080fd5b8235905067ffffffffffffffff81111561121157600080fd5b60208301915083602082028301111561122957600080fd5b9250929050565b60008083601f84011261124257600080fd5b8235905067ffffffffffffffff81111561125b57600080fd5b60208301915083602082028301111561127357600080fd5b9250929050565b60008135905061128981611b4a565b92915050565b60008151905061129e81611b4a565b92915050565b6000602082840312156112b657600080fd5b60006112c4848285016111bc565b91505092915050565b6000602082840312156112df57600080fd5b60006112ed848285016111d1565b91505092915050565b6000806000806040858703121561130c57600080fd5b600085013567ffffffffffffffff81111561132657600080fd5b611332878288016111e6565b9450945050602085013567ffffffffffffffff81111561135157600080fd5b61135d87828801611230565b925092505092959194509250565b60006020828403121561137d57600080fd5b600061138b8482850161127a565b91505092915050565b6000602082840312156113a657600080fd5b60006113b48482850161128f565b91505092915050565b60006113c9838361140b565b60208301905092915050565b60006113e1838361172d565b60208301905092915050565b6113f681611a76565b82525050565b61140581611a1b565b82525050565b61141481611a09565b82525050565b61142381611a09565b82525050565b6000611434826119a6565b61143e81856119d6565b935061144983611986565b8060005b8381101561147a57815161146188826113bd565b975061146c836119bc565b92505060018101905061144d565b5085935050505092915050565b6000611492826119b1565b61149c81856119e7565b93506114a783611996565b8060005b838110156114d85781516114bf88826113d5565b97506114ca836119c9565b9250506001810190506114ab565b5085935050505092915050565b6114ee81611a2d565b82525050565b6114fd81611a88565b82525050565b61150c81611aac565b82525050565b61151b81611ad0565b82525050565b600061152e6014836119f8565b91507f5061757361626c653a206e6f74207061757365640000000000000000000000006000830152602082019050919050565b600061156e6026836119f8565b91507f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008301527f64647265737300000000000000000000000000000000000000000000000000006020830152604082019050919050565b60006115d46022836119f8565b91507f696e73756666696369656e742066756e647320746f2070617920666f72206d6960008301527f6e740000000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b600061163a6010836119f8565b91507f5061757361626c653a20706175736564000000000000000000000000000000006000830152602082019050919050565b600061167a601e836119f8565b91507f647374732c207478686173686573206c656e677468206d69736d6174636800006000830152602082019050919050565b60006116ba6011836119f8565b91507f6d617820737570706c79206d696e7465640000000000000000000000000000006000830152602082019050919050565b60006116fa6020836119f8565b91507f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726000830152602082019050919050565b61173681611a6c565b82525050565b61174581611a6c565b82525050565b6000602082019050611760600083018461141a565b92915050565b600060208201905061177b60008301846113ed565b92915050565b600060208201905061179660008301846113fc565b92915050565b600060408201905081810360008301526117b68185611487565b905081810360208301526117ca8184611487565b90509392505050565b60006020820190506117e860008301846114e5565b92915050565b600060208201905061180360008301846114f4565b92915050565b600060208201905061181e6000830184611503565b92915050565b60006060820190506118396000830186611512565b611846602083018561173c565b611853604083018461173c565b949350505050565b6000602082019050818103600083015261187481611521565b9050919050565b6000602082019050818103600083015261189481611561565b9050919050565b600060208201905081810360008301526118b4816115c7565b9050919050565b600060208201905081810360008301526118d48161162d565b9050919050565b600060208201905081810360008301526118f48161166d565b9050919050565b60006020820190508181036000830152611914816116ad565b9050919050565b60006020820190508181036000830152611934816116ed565b9050919050565b6000602082019050611950600083018461173c565b92915050565b600060408201905061196b600083018561173c565b818103602083015261197d8184611429565b90509392505050565b6000819050602082019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600082825260208201905092915050565b6000611a1482611a4c565b9050919050565b6000611a2682611a4c565b9050919050565b60008115159050919050565b6000819050611a4782611b08565b919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b6000611a8182611ae2565b9050919050565b6000611a9382611a9a565b9050919050565b6000611aa582611a4c565b9050919050565b6000611ab782611abe565b9050919050565b6000611ac982611a4c565b9050919050565b6000611adb82611a39565b9050919050565b6000611aed82611af4565b9050919050565b6000611aff82611a4c565b9050919050565bfe5b60048110611b1957611b18611b06565b5b50565b611b2581611a09565b8114611b3057600080fd5b50565b611b3c81611a1b565b8114611b4757600080fd5b50565b611b5381611a6c565b8114611b5e57600080fd5b5056fea2646970667358221220914c3dc494375babc17aaf91f1647aaef64a993205c223cab7e391330f40dd9564736f6c63430007030033

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

00000000000000000000000029ca58d4a0857ae3f0608a546cde5f254a3f867a000000000000000000000000e18a32192ed95b0fe9d70d19e5025f103475d7ba00000000000000000000000028558ba4343feb2709ed7a9531b72402a7794d8d80000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000429d069189e00000000000000000000000000000000000000000000000000000000ecec61f6c80000000000000000000000000000000000000000000000000000000000000008ff

-----Decoded View---------------
Arg [0] : _registry (address): 0x29ca58d4a0857Ae3F0608a546cdE5f254A3F867a
Arg [1] : _mintableErc1155 (address): 0xE18a32192ED95b0FE9D70D19e5025f103475d7BA
Arg [2] : _treasury (address): 0x28558Ba4343FeB2709ed7A9531B72402a7794D8D
Arg [3] : _tokenType (uint256): 57896044618658097711785492504343953927996121800504035873582290433683637665792
Arg [4] : _startingPriceForHistoric (uint256): 300000000000000000
Arg [5] : _pricePerMintForHistoric (uint256): 260500000000000
Arg [6] : _maxMintingSupply (uint256): 2303

-----Encoded View---------------
7 Constructor Arguments found :
Arg [0] : 00000000000000000000000029ca58d4a0857ae3f0608a546cde5f254a3f867a
Arg [1] : 000000000000000000000000e18a32192ed95b0fe9d70d19e5025f103475d7ba
Arg [2] : 00000000000000000000000028558ba4343feb2709ed7a9531b72402a7794d8d
Arg [3] : 8000000000000000000000000000000400000000000000000000000000000000
Arg [4] : 0000000000000000000000000000000000000000000000000429d069189e0000
Arg [5] : 0000000000000000000000000000000000000000000000000000ecec61f6c800
Arg [6] : 00000000000000000000000000000000000000000000000000000000000008ff


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
[ Download: CSV Export  ]
[ 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.