ETH Price: $3,253.32 (+2.45%)
Gas: 3 Gwei

Contract

0x0BbB93c5d118D1dee49e96BCAdc161403f4F8612
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Purchase191652032024-02-05 23:02:35171 days ago1707174155IN
0x0BbB93c5...03f4F8612
0 ETH0.0089715122.37325573
Purchase191644192024-02-05 20:24:35171 days ago1707164675IN
0x0BbB93c5...03f4F8612
0 ETH0.0209529851.99343329
Purchase191635972024-02-05 17:38:23171 days ago1707154703IN
0x0BbB93c5...03f4F8612
0 ETH0.0085800421.87329799
Purchase191635922024-02-05 17:37:23171 days ago1707154643IN
0x0BbB93c5...03f4F8612
0 ETH0.009232322.37630085
Purchase191631472024-02-05 16:06:47171 days ago1707149207IN
0x0BbB93c5...03f4F8612
0 ETH0.0141696835.66271663
Purchase191625092024-02-05 13:56:47171 days ago1707141407IN
0x0BbB93c5...03f4F8612
0 ETH0.0091066123.48730008
Purchase191610812024-02-05 9:07:35171 days ago1707124055IN
0x0BbB93c5...03f4F8612
0 ETH0.0061805915.33673117
Purchase191610612024-02-05 9:03:35171 days ago1707123815IN
0x0BbB93c5...03f4F8612
0 ETH0.006165615.71812018
Purchase191604192024-02-05 6:53:47172 days ago1707116027IN
0x0BbB93c5...03f4F8612
0 ETH0.0046733111.9137916
Purchase191595632024-02-05 4:00:47172 days ago1707105647IN
0x0BbB93c5...03f4F8612
0 ETH0.0051990512.60092372
Purchase191560282024-02-04 16:06:35172 days ago1707062795IN
0x0BbB93c5...03f4F8612
0 ETH0.0078581919.49958316
Purchase191560052024-02-04 16:01:59172 days ago1707062519IN
0x0BbB93c5...03f4F8612
0 ETH0.0079608919.29478271
Purchase191535262024-02-04 7:40:23173 days ago1707032423IN
0x0BbB93c5...03f4F8612
0 ETH0.0054321113.47943789
Purchase191477712024-02-03 12:16:11173 days ago1706962571IN
0x0BbB93c5...03f4F8612
0 ETH0.005782714.34938921
Purchase191469712024-02-03 9:34:35173 days ago1706952875IN
0x0BbB93c5...03f4F8612
0 ETH0.0060580915.06895118
Purchase191456132024-02-03 4:59:11174 days ago1706936351IN
0x0BbB93c5...03f4F8612
0 ETH0.0051592913.30659299
Purchase191448522024-02-03 2:24:35174 days ago1706927075IN
0x0BbB93c5...03f4F8612
0 ETH0.0104607826.97990215
Purchase To191433262024-02-02 21:15:35174 days ago1706908535IN
0x0BbB93c5...03f4F8612
0 ETH0.0086907320.80428401
Purchase191430232024-02-02 20:14:23174 days ago1706904863IN
0x0BbB93c5...03f4F8612
0 ETH0.0083789720.54712268
Purchase191430212024-02-02 20:13:59174 days ago1706904839IN
0x0BbB93c5...03f4F8612
0 ETH0.0086389821.74285659
Purchase191429422024-02-02 19:58:11174 days ago1706903891IN
0x0BbB93c5...03f4F8612
0 ETH0.007912520.17154208
Purchase191428612024-02-02 19:41:47174 days ago1706902907IN
0x0BbB93c5...03f4F8612
0 ETH0.006296315.62384757
Purchase191428052024-02-02 19:30:35174 days ago1706902235IN
0x0BbB93c5...03f4F8612
0 ETH0.0085201421.14217113
Purchase191408122024-02-02 12:48:47174 days ago1706878127IN
0x0BbB93c5...03f4F8612
0 ETH0.0095882523.79261366
Purchase191408112024-02-02 12:48:35174 days ago1706878115IN
0x0BbB93c5...03f4F8612
0 ETH0.0100610624.38495256
View all transactions

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
MinterSetPriceERC20V1

Compiler Version
v0.8.9+commit.e5eed63a

Optimization Enabled:
Yes with 100 runs

Other Settings:
default evmVersion
File 1 of 6 : MinterSetPriceERC20V1.sol
// SPDX-License-Identifier: LGPL-3.0-only
// Created By: Art Blocks Inc.

import "../interfaces/0.8.x/IGenArt721CoreContractV1.sol";
import "../interfaces/0.8.x/IMinterFilterV0.sol";
import "../interfaces/0.8.x/IFilteredMinterV0.sol";

import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";

pragma solidity 0.8.9;

/**
 * @title Filtered Minter contract that allows tokens to be minted with ETH
 * or any ERC-20 token.
 * @author Art Blocks Inc.
 */
contract MinterSetPriceERC20V1 is ReentrancyGuard, IFilteredMinterV0 {
    /// Core contract address this minter interacts with
    address public immutable genArt721CoreAddress;

    /// This contract handles cores with interface IV1
    IGenArt721CoreContractV1 private immutable genArtCoreContract;

    /// Minter filter address this minter interacts with
    address public immutable minterFilterAddress;

    /// Minter filter this minter may interact with.
    IMinterFilterV0 private immutable minterFilter;

    /// minterType for this minter
    string public constant minterType = "MinterSetPriceERC20V1";

    uint256 constant ONE_MILLION = 1_000_000;

    /// projectId => has project reached its maximum number of invocations?
    mapping(uint256 => bool) public projectMaxHasBeenInvoked;
    /// projectId => project's maximum number of invocations
    mapping(uint256 => uint256) public projectMaxInvocations;
    /// projectId => price per token in wei - supersedes any defined core price
    mapping(uint256 => uint256) private projectIdToPricePerTokenInWei;
    /// projectId => price per token has been configured on this minter
    mapping(uint256 => bool) private projectIdToPriceIsConfigured;
    /// projectId => currency symbol - supersedes any defined core value
    mapping(uint256 => string) private projectIdToCurrencySymbol;
    /// projectId => currency address - supersedes any defined core value
    mapping(uint256 => address) private projectIdToCurrencyAddress;

    modifier onlyCoreWhitelisted() {
        require(
            genArtCoreContract.isWhitelisted(msg.sender),
            "Only Core whitelisted"
        );
        _;
    }

    modifier onlyArtist(uint256 _projectId) {
        require(
            msg.sender ==
                genArtCoreContract.projectIdToArtistAddress(_projectId),
            "Only Artist"
        );
        _;
    }

    /**
     * @notice Initializes contract to be a Filtered Minter for
     * `_minterFilter`, integrated with Art Blocks core contract
     * at address `_genArt721Address`.
     * @param _genArt721Address Art Blocks core contract for which this
     * contract will be a minter.
     * @param _minterFilter Minter filter for which
     * this will a filtered minter.
     */
    constructor(address _genArt721Address, address _minterFilter)
        ReentrancyGuard()
    {
        genArt721CoreAddress = _genArt721Address;
        genArtCoreContract = IGenArt721CoreContractV1(_genArt721Address);
        minterFilterAddress = _minterFilter;
        minterFilter = IMinterFilterV0(_minterFilter);
        require(
            minterFilter.genArt721CoreAddress() == _genArt721Address,
            "Illegal contract pairing"
        );
    }

    /**
     * @notice Gets your balance of the ERC-20 token currently set
     * as the payment currency for project `_projectId`.
     * @param _projectId Project ID to be queried.
     * @return balance Balance of ERC-20
     */
    function getYourBalanceOfProjectERC20(uint256 _projectId)
        external
        view
        returns (uint256 balance)
    {
        balance = IERC20(projectIdToCurrencyAddress[_projectId]).balanceOf(
            msg.sender
        );
        return balance;
    }

    /**
     * @notice Gets your allowance for this minter of the ERC-20
     * token currently set as the payment currency for project
     * `_projectId`.
     * @param _projectId Project ID to be queried.
     * @return remaining Remaining allowance of ERC-20
     */
    function checkYourAllowanceOfProjectERC20(uint256 _projectId)
        external
        view
        returns (uint256 remaining)
    {
        remaining = IERC20(projectIdToCurrencyAddress[_projectId]).allowance(
            msg.sender,
            address(this)
        );
        return remaining;
    }

    /**
     * @notice Sets the maximum invocations of project `_projectId` based
     * on the value currently defined in the core contract.
     * @param _projectId Project ID to set the maximum invocations for.
     * @dev also checks and may refresh projectMaxHasBeenInvoked for project
     * @dev this enables gas reduction after maxInvocations have been reached -
     * core contracts shall still enforce a maxInvocation check during mint.
     */
    function setProjectMaxInvocations(uint256 _projectId)
        external
        onlyCoreWhitelisted
    {
        uint256 invocations;
        uint256 maxInvocations;
        (, , invocations, maxInvocations, , , , , ) = genArtCoreContract
            .projectTokenInfo(_projectId);
        // update storage with results
        projectMaxInvocations[_projectId] = maxInvocations;
        if (invocations < maxInvocations) {
            projectMaxHasBeenInvoked[_projectId] = false;
        }
    }

    /**
     * @notice Warning: Disabling purchaseTo is not supported on this minter.
     * This method exists purely for interface-conformance purposes.
     */
    function togglePurchaseToDisabled(uint256 _projectId)
        external
        view
        onlyArtist(_projectId)
    {
        revert("Action not supported");
    }

    /**
     * @notice Updates this minter's price per token of project `_projectId`
     * to be '_pricePerTokenInWei`, in Wei.
     * This price supersedes any legacy core contract price per token value.
     */
    function updatePricePerTokenInWei(
        uint256 _projectId,
        uint256 _pricePerTokenInWei
    ) external onlyArtist(_projectId) {
        projectIdToPricePerTokenInWei[_projectId] = _pricePerTokenInWei;
        projectIdToPriceIsConfigured[_projectId] = true;
        emit PricePerTokenInWeiUpdated(_projectId, _pricePerTokenInWei);
    }

    /**
     * @notice Updates payment currency of project `_projectId` to be
     * `_currencySymbol` at address `_currencyAddress`.
     * @param _projectId Project ID to update.
     * @param _currencySymbol Currency symbol.
     * @param _currencyAddress Currency address.
     */
    function updateProjectCurrencyInfo(
        uint256 _projectId,
        string memory _currencySymbol,
        address _currencyAddress
    ) external onlyArtist(_projectId) {
        // require null address if symbol is "ETH"
        require(
            (keccak256(abi.encodePacked(_currencySymbol)) ==
                keccak256(abi.encodePacked("ETH"))) ==
                (_currencyAddress == address(0)),
            "ETH is only null address"
        );
        projectIdToCurrencySymbol[_projectId] = _currencySymbol;
        projectIdToCurrencyAddress[_projectId] = _currencyAddress;
        emit ProjectCurrencyInfoUpdated(
            _projectId,
            _currencyAddress,
            _currencySymbol
        );
    }

    /**
     * @notice Purchases a token from project `_projectId`.
     * @param _projectId Project ID to mint a token on.
     * @return tokenId Token ID of minted token
     */
    function purchase(uint256 _projectId)
        external
        payable
        returns (uint256 tokenId)
    {
        tokenId = purchaseTo(msg.sender, _projectId);
        return tokenId;
    }

    /**
     * @notice Purchases a token from project `_projectId` and sets
     * the token's owner to `_to`.
     * @param _to Address to be the new token's owner.
     * @param _projectId Project ID to mint a token on.
     * @return tokenId Token ID of minted token
     */
    function purchaseTo(address _to, uint256 _projectId)
        public
        payable
        nonReentrant
        returns (uint256 tokenId)
    {
        // CHECKS
        require(
            !projectMaxHasBeenInvoked[_projectId],
            "Maximum number of invocations reached"
        );

        // require artist to have configured price of token on this minter
        require(
            projectIdToPriceIsConfigured[_projectId],
            "Price not configured"
        );

        // EFFECTS
        tokenId = minterFilter.mint(_to, _projectId, msg.sender);
        // what if projectMaxInvocations[_projectId] is 0 (default value)?
        // that is intended, so that by default the minter allows infinite transactions,
        // allowing the artblocks contract to stop minting
        // uint256 tokenInvocation = tokenId % ONE_MILLION;
        if (
            projectMaxInvocations[_projectId] > 0 &&
            tokenId % ONE_MILLION == projectMaxInvocations[_projectId] - 1
        ) {
            projectMaxHasBeenInvoked[_projectId] = true;
        }

        // INTERACTIONS
        if (projectIdToCurrencyAddress[_projectId] != address(0)) {
            require(
                msg.value == 0,
                "this project accepts a different currency and cannot accept ETH"
            );
            require(
                IERC20(projectIdToCurrencyAddress[_projectId]).allowance(
                    msg.sender,
                    address(this)
                ) >= projectIdToPricePerTokenInWei[_projectId],
                "Insufficient Funds Approved for TX"
            );
            require(
                IERC20(projectIdToCurrencyAddress[_projectId]).balanceOf(
                    msg.sender
                ) >= projectIdToPricePerTokenInWei[_projectId],
                "Insufficient balance."
            );
            _splitFundsERC20(_projectId);
        } else {
            require(
                msg.value >= projectIdToPricePerTokenInWei[_projectId],
                "Must send minimum value to mint!"
            );
            _splitFundsETH(_projectId);
        }

        return tokenId;
    }

    /**
     * @dev splits ETH funds between sender (if refund), foundation,
     * artist, and artist's additional payee for a token purchased on
     * project `_projectId`.
     * @dev utilizes transfer() to send ETH, so access lists may need to be
     * populated when purchasing tokens.
     */
    function _splitFundsETH(uint256 _projectId) internal {
        if (msg.value > 0) {
            uint256 pricePerTokenInWei = projectIdToPricePerTokenInWei[
                _projectId
            ];
            uint256 refund = msg.value - pricePerTokenInWei;
            if (refund > 0) {
                (bool success_, ) = msg.sender.call{value: refund}("");
                require(success_, "Refund failed");
            }
            uint256 foundationAmount = (pricePerTokenInWei *
                genArtCoreContract.artblocksPercentage()) / 100;
            if (foundationAmount > 0) {
                (bool success_, ) = genArtCoreContract.artblocksAddress().call{
                    value: foundationAmount
                }("");
                require(success_, "Foundation payment failed");
            }
            uint256 projectFunds = pricePerTokenInWei - foundationAmount;
            uint256 additionalPayeeAmount;
            if (
                genArtCoreContract.projectIdToAdditionalPayeePercentage(
                    _projectId
                ) > 0
            ) {
                additionalPayeeAmount =
                    (projectFunds *
                        genArtCoreContract.projectIdToAdditionalPayeePercentage(
                            _projectId
                        )) /
                    100;
                if (additionalPayeeAmount > 0) {
                    (bool success_, ) = genArtCoreContract
                        .projectIdToAdditionalPayee(_projectId)
                        .call{value: additionalPayeeAmount}("");
                    require(success_, "Additional payment failed");
                }
            }
            uint256 creatorFunds = projectFunds - additionalPayeeAmount;
            if (creatorFunds > 0) {
                (bool success_, ) = genArtCoreContract
                    .projectIdToArtistAddress(_projectId)
                    .call{value: creatorFunds}("");
                require(success_, "Artist payment failed");
            }
        }
    }

    /**
     * @dev splits ERC-20 funds between foundation, artist, and artist's
     * additional payee, for a token purchased on project `_projectId`.
     */
    function _splitFundsERC20(uint256 _projectId) internal {
        uint256 pricePerTokenInWei = projectIdToPricePerTokenInWei[_projectId];
        uint256 foundationAmount = (pricePerTokenInWei *
            genArtCoreContract.artblocksPercentage()) / 100;
        if (foundationAmount > 0) {
            IERC20(projectIdToCurrencyAddress[_projectId]).transferFrom(
                msg.sender,
                genArtCoreContract.artblocksAddress(),
                foundationAmount
            );
        }
        uint256 projectFunds = pricePerTokenInWei - foundationAmount;
        uint256 additionalPayeeAmount;
        if (
            genArtCoreContract.projectIdToAdditionalPayeePercentage(
                _projectId
            ) > 0
        ) {
            additionalPayeeAmount =
                (projectFunds *
                    genArtCoreContract.projectIdToAdditionalPayeePercentage(
                        _projectId
                    )) /
                100;
            if (additionalPayeeAmount > 0) {
                IERC20(projectIdToCurrencyAddress[_projectId]).transferFrom(
                    msg.sender,
                    genArtCoreContract.projectIdToAdditionalPayee(_projectId),
                    additionalPayeeAmount
                );
            }
        }
        uint256 creatorFunds = projectFunds - additionalPayeeAmount;
        if (creatorFunds > 0) {
            IERC20(projectIdToCurrencyAddress[_projectId]).transferFrom(
                msg.sender,
                genArtCoreContract.projectIdToArtistAddress(_projectId),
                creatorFunds
            );
        }
    }

    /**
     * @notice Gets if price of token is configured, price of minting a
     * token on project `_projectId`, and currency symbol and address to be
     * used as payment. Supersedes any core contract price information.
     * @param _projectId Project ID to get price information for.
     * @return isConfigured true only if token price has been configured on
     * this minter
     * @return tokenPriceInWei current price of token on this minter - invalid
     * if price has not yet been configured
     * @return currencySymbol currency symbol for purchases of project on this
     * minter. "ETH" reserved for ether.
     * @return currencyAddress currency address for purchases of project on
     * this minter. Null address reserved for ether.
     */
    function getPriceInfo(uint256 _projectId)
        external
        view
        returns (
            bool isConfigured,
            uint256 tokenPriceInWei,
            string memory currencySymbol,
            address currencyAddress
        )
    {
        isConfigured = projectIdToPriceIsConfigured[_projectId];
        tokenPriceInWei = projectIdToPricePerTokenInWei[_projectId];
        currencyAddress = projectIdToCurrencyAddress[_projectId];
        if (currencyAddress == address(0)) {
            // defaults to ETH
            currencySymbol = "ETH";
        } else {
            currencySymbol = projectIdToCurrencySymbol[_projectId];
        }
    }
}

File 2 of 6 : IGenArt721CoreContractV1.sol
// SPDX-License-Identifier: LGPL-3.0-only
// Created By: Art Blocks Inc.

pragma solidity ^0.8.0;

interface IGenArt721CoreContractV1 {
    event Mint(
        address indexed _to,
        uint256 indexed _tokenId,
        uint256 indexed _projectId
    );

    // getter function of public variable
    function admin() external view returns (address);

    // getter function of public variable
    function nextProjectId() external view returns (uint256);

    // getter function of public mapping
    function tokenIdToProjectId(uint256 tokenId)
        external
        view
        returns (uint256 projectId);

    function isWhitelisted(address sender) external view returns (bool);

    // @dev this is not available in V0
    function isMintWhitelisted(address minter) external view returns (bool);

    function projectIdToArtistAddress(uint256 _projectId)
        external
        view
        returns (address payable);

    function projectIdToAdditionalPayee(uint256 _projectId)
        external
        view
        returns (address payable);

    function projectIdToAdditionalPayeePercentage(uint256 _projectId)
        external
        view
        returns (uint256);

    function projectTokenInfo(uint256 _projectId)
        external
        view
        returns (
            address,
            uint256,
            uint256,
            uint256,
            bool,
            address,
            uint256,
            string memory,
            address
        );

    function artblocksAddress() external view returns (address payable);

    function artblocksPercentage() external view returns (uint256);

    function mint(
        address _to,
        uint256 _projectId,
        address _by
    ) external returns (uint256 tokenId);

    function getRoyaltyData(uint256 _tokenId)
        external
        view
        returns (
            address artistAddress,
            address additionalPayee,
            uint256 additionalPayeePercentage,
            uint256 royaltyFeeByID
        );
}

File 3 of 6 : IMinterFilterV0.sol
// SPDX-License-Identifier: LGPL-3.0-only
// Created By: Art Blocks Inc.

pragma solidity ^0.8.0;

interface IMinterFilterV0 {
    /**
     * @notice Approved minter `_minterAddress`.
     */
    event MinterApproved(address indexed _minterAddress, string _minterType);

    /**
     * @notice Revoked approval for minter `_minterAddress`
     */
    event MinterRevoked(address indexed _minterAddress);

    /**
     * @notice Minter `_minterAddress` of type `_minterType`
     * registered for project `_projectId`.
     */
    event ProjectMinterRegistered(
        uint256 indexed _projectId,
        address indexed _minterAddress,
        string _minterType
    );

    /**
     * @notice Any active minter removed for project `_projectId`.
     */
    event ProjectMinterRemoved(uint256 indexed _projectId);

    function genArt721CoreAddress() external returns (address);

    function setMinterForProject(uint256, address) external;

    function removeMinterForProject(uint256) external;

    function mint(
        address _to,
        uint256 _projectId,
        address sender
    ) external returns (uint256);

    function getMinterForProject(uint256) external view returns (address);

    function projectHasMinter(uint256) external view returns (bool);
}

File 4 of 6 : IFilteredMinterV0.sol
// SPDX-License-Identifier: LGPL-3.0-only
// Created By: Art Blocks Inc.

pragma solidity ^0.8.0;

interface IFilteredMinterV0 {
    /**
     * @notice Price per token in wei updated for project `_projectId` to
     * `_pricePerTokenInWei`.
     */
    event PricePerTokenInWeiUpdated(
        uint256 indexed _projectId,
        uint256 indexed _pricePerTokenInWei
    );

    /**
     * @notice Currency updated for project `_projectId` to symbol
     * `_currencySymbol` and address `_currencyAddress`.
     */
    event ProjectCurrencyInfoUpdated(
        uint256 indexed _projectId,
        address indexed _currencyAddress,
        string _currencySymbol
    );

    /// togglePurchaseToDisabled updated
    event PurchaseToDisabledUpdated(
        uint256 indexed _projectId,
        bool _purchaseToDisabled
    );

    // getter function of public variable
    function minterType() external view returns (string memory);

    function genArt721CoreAddress() external returns (address);

    function minterFilterAddress() external returns (address);

    // Triggers a purchase of a token from the desired project, to the
    // TX-sending address.
    function purchase(uint256 _projectId)
        external
        payable
        returns (uint256 tokenId);

    // Triggers a purchase of a token from the desired project, to the specified
    // receiving address.
    function purchaseTo(address _to, uint256 _projectId)
        external
        payable
        returns (uint256 tokenId);

    // Toggles the ability for `purchaseTo` to be called directly with a
    // specified receiving address that differs from the TX-sending address.
    function togglePurchaseToDisabled(uint256 _projectId) external;

    // Called to make the minter contract aware of the max invocations for a
    // given project.
    function setProjectMaxInvocations(uint256 _projectId) external;

    // Gets if token price is configured, token price in wei, currency symbol,
    // and currency address, assuming this is project's minter.
    // Supersedes any defined core price.
    function getPriceInfo(uint256 _projectId)
        external
        view
        returns (
            bool isConfigured,
            uint256 tokenPriceInWei,
            string memory currencySymbol,
            address currencyAddress
        );
}

File 5 of 6 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns the amount of tokens owned by `account`.
     */
    function balanceOf(address account) external view returns (uint256);

    /**
     * @dev Moves `amount` tokens from the caller's account to `to`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address to, uint256 amount) external returns (bool);

    /**
     * @dev Returns the remaining number of tokens that `spender` will be
     * allowed to spend on behalf of `owner` through {transferFrom}. This is
     * zero by default.
     *
     * This value changes when {approve} or {transferFrom} are called.
     */
    function allowance(address owner, address spender) external view returns (uint256);

    /**
     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * IMPORTANT: Beware that changing an allowance with this method brings the risk
     * that someone may use both the old and the new allowance by unfortunate
     * transaction ordering. One possible solution to mitigate this race
     * condition is to first reduce the spender's allowance to 0 and set the
     * desired value afterwards:
     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
     *
     * Emits an {Approval} event.
     */
    function approve(address spender, uint256 amount) external returns (bool);

    /**
     * @dev Moves `amount` tokens from `from` to `to` using the
     * allowance mechanism. `amount` is then deducted from the caller's
     * allowance.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(
        address from,
        address to,
        uint256 amount
    ) external returns (bool);

    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to {approve}. `value` is the new allowance.
     */
    event Approval(address indexed owner, address indexed spender, uint256 value);
}

File 6 of 6 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol)

pragma solidity ^0.8.0;

/**
 * @dev Contract module that helps prevent reentrant calls to a function.
 *
 * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
 * available, which can be applied to functions to make sure there are no nested
 * (reentrant) calls to them.
 *
 * Note that because there is a single `nonReentrant` guard, functions marked as
 * `nonReentrant` may not call one another. This can be worked around by making
 * those functions `private`, and then adding `external` `nonReentrant` entry
 * points to them.
 *
 * TIP: If you would like to learn more about reentrancy and alternative ways
 * to protect against it, check out our blog post
 * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
 */
abstract contract ReentrancyGuard {
    // Booleans are more expensive than uint256 or any type that takes up a full
    // word because each write operation emits an extra SLOAD to first read the
    // slot's contents, replace the bits taken up by the boolean, and then write
    // back. This is the compiler's defense against contract upgrades and
    // pointer aliasing, and it cannot be disabled.

    // The values being non-zero value makes deployment a bit more expensive,
    // but in exchange the refund on every call to nonReentrant will be lower in
    // amount. Since refunds are capped to a percentage of the total
    // transaction's gas, it is best to keep them low in cases like this one, to
    // increase the likelihood of the full refund coming into effect.
    uint256 private constant _NOT_ENTERED = 1;
    uint256 private constant _ENTERED = 2;

    uint256 private _status;

    constructor() {
        _status = _NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and making it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        // On the first call to nonReentrant, _notEntered will be true
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

        // Any calls to nonReentrant after this point will fail
        _status = _ENTERED;

        _;

        // By storing the original value once again, a refund is triggered (see
        // https://eips.ethereum.org/EIPS/eip-2200)
        _status = _NOT_ENTERED;
    }
}

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 100
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_genArt721Address","type":"address"},{"internalType":"address","name":"_minterFilter","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"_projectId","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"_pricePerTokenInWei","type":"uint256"}],"name":"PricePerTokenInWeiUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"_projectId","type":"uint256"},{"indexed":true,"internalType":"address","name":"_currencyAddress","type":"address"},{"indexed":false,"internalType":"string","name":"_currencySymbol","type":"string"}],"name":"ProjectCurrencyInfoUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"_projectId","type":"uint256"},{"indexed":false,"internalType":"bool","name":"_purchaseToDisabled","type":"bool"}],"name":"PurchaseToDisabledUpdated","type":"event"},{"inputs":[{"internalType":"uint256","name":"_projectId","type":"uint256"}],"name":"checkYourAllowanceOfProjectERC20","outputs":[{"internalType":"uint256","name":"remaining","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"genArt721CoreAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_projectId","type":"uint256"}],"name":"getPriceInfo","outputs":[{"internalType":"bool","name":"isConfigured","type":"bool"},{"internalType":"uint256","name":"tokenPriceInWei","type":"uint256"},{"internalType":"string","name":"currencySymbol","type":"string"},{"internalType":"address","name":"currencyAddress","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_projectId","type":"uint256"}],"name":"getYourBalanceOfProjectERC20","outputs":[{"internalType":"uint256","name":"balance","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minterFilterAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minterType","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"projectMaxHasBeenInvoked","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"projectMaxInvocations","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_projectId","type":"uint256"}],"name":"purchase","outputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_projectId","type":"uint256"}],"name":"purchaseTo","outputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_projectId","type":"uint256"}],"name":"setProjectMaxInvocations","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_projectId","type":"uint256"}],"name":"togglePurchaseToDisabled","outputs":[],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_projectId","type":"uint256"},{"internalType":"uint256","name":"_pricePerTokenInWei","type":"uint256"}],"name":"updatePricePerTokenInWei","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_projectId","type":"uint256"},{"internalType":"string","name":"_currencySymbol","type":"string"},{"internalType":"address","name":"_currencyAddress","type":"address"}],"name":"updateProjectCurrencyInfo","outputs":[],"stateMutability":"nonpayable","type":"function"}]

6101006040523480156200001257600080fd5b506040516200244138038062002441833981016040819052620000359162000157565b600160009081556001600160a01b03808416608081905260a081905290831660c081905260e0819052604080516392a10f8360e01b81529051929391926392a10f8392600480840193602093929083900390910190829087803b1580156200009c57600080fd5b505af1158015620000b1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620000d791906200018f565b6001600160a01b031614620001325760405162461bcd60e51b815260206004820152601860248201527f496c6c6567616c20636f6e74726163742070616972696e670000000000000000604482015260640160405180910390fd5b5050620001b4565b80516001600160a01b03811681146200015257600080fd5b919050565b600080604083850312156200016b57600080fd5b62000176836200013a565b915062000186602084016200013a565b90509250929050565b600060208284031215620001a257600080fd5b620001ad826200013a565b9392505050565b60805160a05160c05160e0516121e36200025e60003960006107930152600061025a0152600081816103350152818161044701528181610c0101528181610e4901528181610f3501528181611012015281816110f4015281816111f5015281816112b001528181611388015281816114c3015281816116700152818161171f0152818161185f0152818161191a015281816119d10152611b1e015260006101d901526121e36000f3fe6080604052600436106100bd5760003560e01c8063a98096001161006f578063a980960014610208578063d195b36514610228578063dd85582f14610248578063e9d1e8ac1461027c578063efef39a1146102ca578063f4632103146102dd578063f7bd4b88146102fd57600080fd5b806340d1397e146100c2578063462add46146100e457806356690aaf146101295780636cb9b7ff14610164578063774159c614610184578063891407c0146101b457806392a10f83146101c7575b600080fd5b3480156100ce57600080fd5b506100e26100dd366004611cdc565b61031d565b005b3480156100f057600080fd5b506101146100ff366004611cdc565b60016020526000908152604090205460ff1681565b60405190151581526020015b60405180910390f35b34801561013557600080fd5b50610156610144366004611cdc565b60026020526000908152604090205481565b604051908152602001610120565b34801561017057600080fd5b506100e261017f366004611cf5565b61042f565b34801561019057600080fd5b506101a461019f366004611cdc565b61054e565b6040516101209493929190611d73565b6101566101c2366004611dc2565b61064b565b3480156101d357600080fd5b506101fb7f000000000000000000000000000000000000000000000000000000000000000081565b6040516101209190611dee565b34801561021457600080fd5b50610156610223366004611cdc565b610b57565b34801561023457600080fd5b506100e2610243366004611e71565b610be9565b34801561025457600080fd5b506101fb7f000000000000000000000000000000000000000000000000000000000000000081565b34801561028857600080fd5b506102bd604051806040016040528060158152602001744d696e74657253657450726963654552433230563160581b81525081565b6040516101209190611f0f565b6101566102d8366004611cdc565b610de4565b3480156102e957600080fd5b506101566102f8366004611cdc565b610df0565b34801561030957600080fd5b506100e2610318366004611cdc565b610e32565b60405163a47d29cb60e01b81526004810182905281907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063a47d29cb9060240160206040518083038186803b15801561037f57600080fd5b505afa158015610393573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103b79190611f29565b6001600160a01b0316336001600160a01b0316146103f05760405162461bcd60e51b81526004016103e790611f46565b60405180910390fd5b60405162461bcd60e51b81526020600482015260146024820152731058dd1a5bdb881b9bdd081cdd5c1c1bdc9d195960621b60448201526064016103e7565b60405163a47d29cb60e01b81526004810183905282907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063a47d29cb9060240160206040518083038186803b15801561049157600080fd5b505afa1580156104a5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104c99190611f29565b6001600160a01b0316336001600160a01b0316146104f95760405162461bcd60e51b81526004016103e790611f46565b60008381526003602090815260408083208590556004909152808220805460ff1916600117905551839185917f26118a27aca826f829f3bfe21b140b4455c00b434849bd0da50d1e1a9720fb5c9190a3505050565b6000818152600460209081526040808320546003835281842054600690935292205460ff909216916060906001600160a01b0316806105aa576040518060400160405280600381526020016208aa8960eb1b8152509150610644565b600085815260056020526040902080546105c390611f6b565b80601f01602080910402602001604051908101604052809291908181526020018280546105ef90611f6b565b801561063c5780601f106106115761010080835404028352916020019161063c565b820191906000526020600020905b81548152906001019060200180831161061f57829003601f168201915b505050505091505b9193509193565b6000600260005414156106a05760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016103e7565b600260009081558281526001602052604090205460ff16156107125760405162461bcd60e51b815260206004820152602560248201527f4d6178696d756d206e756d626572206f6620696e766f636174696f6e732072656044820152641858da195960da1b60648201526084016103e7565b60008281526004602052604090205460ff166107675760405162461bcd60e51b8152602060048201526014602482015273141c9a58d9481b9bdd0818dbdb999a59dd5c995960621b60448201526064016103e7565b604051630d4d151360e01b81526001600160a01b038481166004830152602482018490523360448301527f00000000000000000000000000000000000000000000000000000000000000001690630d4d151390606401602060405180830381600087803b1580156107d757600080fd5b505af11580156107eb573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061080f9190611fa6565b60008381526002602052604090205490915015801590610854575060008281526002602052604090205461084590600190611fd5565b610852620f424083612002565b145b15610876576000828152600160208190526040909120805460ff191690911790555b6000828152600660205260409020546001600160a01b031615610ae55734156109075760405162461bcd60e51b815260206004820152603f60248201527f746869732070726f6a6563742061636365707473206120646966666572656e7460448201527f2063757272656e637920616e642063616e6e6f7420616363657074204554480060648201526084016103e7565b600082815260036020908152604080832054600690925291829020549151636eb1769f60e11b815233600482015230602482015290916001600160a01b03169063dd62ed3e9060440160206040518083038186803b15801561096857600080fd5b505afa15801561097c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109a09190611fa6565b10156109f95760405162461bcd60e51b815260206004820152602260248201527f496e73756666696369656e742046756e647320417070726f76656420666f72206044820152610a8b60f31b60648201526084016103e7565b6000828152600360209081526040808320546006909252918290205491516370a0823160e01b815290916001600160a01b0316906370a0823190610a41903390600401611dee565b60206040518083038186803b158015610a5957600080fd5b505afa158015610a6d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a919190611fa6565b1015610ad75760405162461bcd60e51b815260206004820152601560248201527424b739bab33334b1b4b2b73a103130b630b731b29760591b60448201526064016103e7565b610ae082610ff4565b610b4c565b600082815260036020526040902054341015610b435760405162461bcd60e51b815260206004820181905260248201527f4d7573742073656e64206d696e696d756d2076616c756520746f206d696e742160448201526064016103e7565b610b4c826115b8565b600160005592915050565b6000818152600660205260408082205490516370a0823160e01b81526001600160a01b03909116906370a0823190610b93903390600401611dee565b60206040518083038186803b158015610bab57600080fd5b505afa158015610bbf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610be39190611fa6565b92915050565b60405163a47d29cb60e01b81526004810184905283907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063a47d29cb9060240160206040518083038186803b158015610c4b57600080fd5b505afa158015610c5f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c839190611f29565b6001600160a01b0316336001600160a01b031614610cb35760405162461bcd60e51b81526004016103e790611f46565b6040516208aa8960eb1b60208201526001600160a01b03831615906023016040516020818303038152906040528051906020012084604051602001610cf89190612016565b6040516020818303038152906040528051906020012014151514610d595760405162461bcd60e51b8152602060048201526018602482015277455448206973206f6e6c79206e756c6c206164647265737360401b60448201526064016103e7565b60008481526005602090815260409091208451610d7892860190611c43565b506000848152600660205260409081902080546001600160a01b0319166001600160a01b038516908117909155905185907fe6c8c6160f844a27204e2b7fb4b7fb9f10e5d322fa850096bef29dc1d0f445c190610dd6908790611f0f565b60405180910390a350505050565b6000610be3338361064b565b600081815260066020526040808220549051636eb1769f60e11b81523360048201523060248201526001600160a01b039091169063dd62ed3e90604401610b93565b604051633af32abf60e01b81526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690633af32abf90610e7e903390600401611dee565b60206040518083038186803b158015610e9657600080fd5b505afa158015610eaa573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ece9190612047565b610f125760405162461bcd60e51b815260206004820152601560248201527413db9b1e4810dbdc99481dda1a5d195b1a5cdd1959605a1b60448201526064016103e7565b6040516346161b1160e11b81526004810182905260009081906001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690638c2c36229060240160006040518083038186803b158015610f7757600080fd5b505afa158015610f8b573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610fb3919081019061206d565b505050600089815260026020526040902083905550919550935050505080821015610fef576000838152600160205260409020805460ff191690555b505050565b600060036000838152602001908152602001600020549050600060647f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316634f029c396040518163ffffffff1660e01b815260040160206040518083038186803b15801561106957600080fd5b505afa15801561107d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110a19190611fa6565b6110ab9084612156565b6110b59190612175565b905080156111e257600083815260066020908152604091829020548251631ca4fc8360e11b815292516001600160a01b03918216936323b872dd9333937f00000000000000000000000000000000000000000000000000000000000000001692633949f906926004808201939291829003018186803b15801561113757600080fd5b505afa15801561114b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061116f9190611f29565b846040518463ffffffff1660e01b815260040161118e93929190612189565b602060405180830381600087803b1580156111a857600080fd5b505af11580156111bc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111e09190612047565b505b60006111ee8284611fd5565b90506000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663cc74234b876040518263ffffffff1660e01b815260040161124191815260200190565b60206040518083038186803b15801561125957600080fd5b505afa15801561126d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112919190611fa6565b11156114755760405163cc74234b60e01b8152600481018690526064907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063cc74234b9060240160206040518083038186803b1580156112fa57600080fd5b505afa15801561130e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113329190611fa6565b61133c9084612156565b6113469190612175565b905080156114755760008581526006602052604090819020549051636bd8225b60e11b8152600481018790526001600160a01b03918216916323b872dd9133917f0000000000000000000000000000000000000000000000000000000000000000169063d7b044b69060240160206040518083038186803b1580156113ca57600080fd5b505afa1580156113de573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114029190611f29565b846040518463ffffffff1660e01b815260040161142193929190612189565b602060405180830381600087803b15801561143b57600080fd5b505af115801561144f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114739190612047565b505b60006114818284611fd5565b905080156115b0576000868152600660205260409081902054905163a47d29cb60e01b8152600481018890526001600160a01b03918216916323b872dd9133917f0000000000000000000000000000000000000000000000000000000000000000169063a47d29cb9060240160206040518083038186803b15801561150557600080fd5b505afa158015611519573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061153d9190611f29565b846040518463ffffffff1660e01b815260040161155c93929190612189565b602060405180830381600087803b15801561157657600080fd5b505af115801561158a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115ae9190612047565b505b505050505050565b3415611c4057600081815260036020526040812054906115d88234611fd5565b9050801561166a57604051600090339083908381818185875af1925050503d8060008114611622576040519150601f19603f3d011682016040523d82523d6000602084013e611627565b606091505b50509050806116685760405162461bcd60e51b815260206004820152600d60248201526c1499599d5b990819985a5b1959609a1b60448201526064016103e7565b505b600060647f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316634f029c396040518163ffffffff1660e01b815260040160206040518083038186803b1580156116c757600080fd5b505afa1580156116db573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116ff9190611fa6565b6117099085612156565b6117139190612175565b9050801561184c5760007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316633949f9066040518163ffffffff1660e01b815260040160206040518083038186803b15801561177657600080fd5b505afa15801561178a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117ae9190611f29565b6001600160a01b03168260405160006040518083038185875af1925050503d80600081146117f8576040519150601f19603f3d011682016040523d82523d6000602084013e6117fd565b606091505b505090508061184a5760405162461bcd60e51b8152602060048201526019602482015278119bdd5b99185d1a5bdb881c185e5b595b9d0819985a5b1959603a1b60448201526064016103e7565b505b60006118588285611fd5565b90506000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663cc74234b886040518263ffffffff1660e01b81526004016118ab91815260200190565b60206040518083038186803b1580156118c357600080fd5b505afa1580156118d7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118fb9190611fa6565b1115611af15760405163cc74234b60e01b8152600481018790526064907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063cc74234b9060240160206040518083038186803b15801561196457600080fd5b505afa158015611978573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061199c9190611fa6565b6119a69084612156565b6119b09190612175565b90508015611af157604051636bd8225b60e11b8152600481018790526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063d7b044b69060240160206040518083038186803b158015611a1b57600080fd5b505afa158015611a2f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a539190611f29565b6001600160a01b03168260405160006040518083038185875af1925050503d8060008114611a9d576040519150601f19603f3d011682016040523d82523d6000602084013e611aa2565b606091505b5050905080611aef5760405162461bcd60e51b81526020600482015260196024820152781059191a5d1a5bdb985b081c185e5b595b9d0819985a5b1959603a1b60448201526064016103e7565b505b6000611afd8284611fd5565b905080156115ae5760405163a47d29cb60e01b8152600481018890526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063a47d29cb9060240160206040518083038186803b158015611b6857600080fd5b505afa158015611b7c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ba09190611f29565b6001600160a01b03168260405160006040518083038185875af1925050503d8060008114611bea576040519150601f19603f3d011682016040523d82523d6000602084013e611bef565b606091505b5050905080611c385760405162461bcd60e51b8152602060048201526015602482015274105c9d1a5cdd081c185e5b595b9d0819985a5b1959605a1b60448201526064016103e7565b505050505050505b50565b828054611c4f90611f6b565b90600052602060002090601f016020900481019282611c715760008555611cb7565b82601f10611c8a57805160ff1916838001178555611cb7565b82800160010185558215611cb7579182015b82811115611cb7578251825591602001919060010190611c9c565b50611cc3929150611cc7565b5090565b5b80821115611cc35760008155600101611cc8565b600060208284031215611cee57600080fd5b5035919050565b60008060408385031215611d0857600080fd5b50508035926020909101359150565b60005b83811015611d32578181015183820152602001611d1a565b83811115611d41576000848401525b50505050565b60008151808452611d5f816020860160208601611d17565b601f01601f19169290920160200192915050565b8415158152836020820152608060408201526000611d946080830185611d47565b905060018060a01b038316606083015295945050505050565b6001600160a01b0381168114611c4057600080fd5b60008060408385031215611dd557600080fd5b8235611de081611dad565b946020939093013593505050565b6001600160a01b0391909116815260200190565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715611e4157611e41611e02565b604052919050565b600067ffffffffffffffff821115611e6357611e63611e02565b50601f01601f191660200190565b600080600060608486031215611e8657600080fd5b83359250602084013567ffffffffffffffff811115611ea457600080fd5b8401601f81018613611eb557600080fd5b8035611ec8611ec382611e49565b611e18565b818152876020838501011115611edd57600080fd5b816020840160208301376000602083830101528094505050506040840135611f0481611dad565b809150509250925092565b602081526000611f226020830184611d47565b9392505050565b600060208284031215611f3b57600080fd5b8151611f2281611dad565b6020808252600b908201526a13db9b1e48105c9d1a5cdd60aa1b604082015260600190565b600181811c90821680611f7f57607f821691505b60208210811415611fa057634e487b7160e01b600052602260045260246000fd5b50919050565b600060208284031215611fb857600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b600082821015611fe757611fe7611fbf565b500390565b634e487b7160e01b600052601260045260246000fd5b60008261201157612011611fec565b500690565b60008251612028818460208701611d17565b9190910192915050565b8051801515811461204257600080fd5b919050565b60006020828403121561205957600080fd5b611f2282612032565b805161204281611dad565b60008060008060008060008060006101208a8c03121561208c57600080fd5b895161209781611dad565b8099505060208a0151975060408a0151965060608a015195506120bc60808b01612032565b945060a08a01516120cc81611dad565b60c08b015160e08c0151919550935067ffffffffffffffff8111156120f057600080fd5b8a01601f81018c1361210157600080fd5b805161210f611ec382611e49565b8181528d602083850101111561212457600080fd5b612135826020830160208601611d17565b93506121479150506101008b01612062565b90509295985092959850929598565b600081600019048311821515161561217057612170611fbf565b500290565b60008261218457612184611fec565b500490565b6001600160a01b03938416815291909216602082015260408101919091526060019056fea2646970667358221220129ac0657310cab119ab9728c05feaf9f62e5ba564c91baf39e0c380002a3b3264736f6c63430008090033000000000000000000000000a7d8d9ef8d8ce8992df33d8b8cf4aebabd5bd2700000000000000000000000004aafce293b9b0fad169c78049a81e400f518e199

Deployed Bytecode

0x6080604052600436106100bd5760003560e01c8063a98096001161006f578063a980960014610208578063d195b36514610228578063dd85582f14610248578063e9d1e8ac1461027c578063efef39a1146102ca578063f4632103146102dd578063f7bd4b88146102fd57600080fd5b806340d1397e146100c2578063462add46146100e457806356690aaf146101295780636cb9b7ff14610164578063774159c614610184578063891407c0146101b457806392a10f83146101c7575b600080fd5b3480156100ce57600080fd5b506100e26100dd366004611cdc565b61031d565b005b3480156100f057600080fd5b506101146100ff366004611cdc565b60016020526000908152604090205460ff1681565b60405190151581526020015b60405180910390f35b34801561013557600080fd5b50610156610144366004611cdc565b60026020526000908152604090205481565b604051908152602001610120565b34801561017057600080fd5b506100e261017f366004611cf5565b61042f565b34801561019057600080fd5b506101a461019f366004611cdc565b61054e565b6040516101209493929190611d73565b6101566101c2366004611dc2565b61064b565b3480156101d357600080fd5b506101fb7f000000000000000000000000a7d8d9ef8d8ce8992df33d8b8cf4aebabd5bd27081565b6040516101209190611dee565b34801561021457600080fd5b50610156610223366004611cdc565b610b57565b34801561023457600080fd5b506100e2610243366004611e71565b610be9565b34801561025457600080fd5b506101fb7f0000000000000000000000004aafce293b9b0fad169c78049a81e400f518e19981565b34801561028857600080fd5b506102bd604051806040016040528060158152602001744d696e74657253657450726963654552433230563160581b81525081565b6040516101209190611f0f565b6101566102d8366004611cdc565b610de4565b3480156102e957600080fd5b506101566102f8366004611cdc565b610df0565b34801561030957600080fd5b506100e2610318366004611cdc565b610e32565b60405163a47d29cb60e01b81526004810182905281907f000000000000000000000000a7d8d9ef8d8ce8992df33d8b8cf4aebabd5bd2706001600160a01b03169063a47d29cb9060240160206040518083038186803b15801561037f57600080fd5b505afa158015610393573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103b79190611f29565b6001600160a01b0316336001600160a01b0316146103f05760405162461bcd60e51b81526004016103e790611f46565b60405180910390fd5b60405162461bcd60e51b81526020600482015260146024820152731058dd1a5bdb881b9bdd081cdd5c1c1bdc9d195960621b60448201526064016103e7565b60405163a47d29cb60e01b81526004810183905282907f000000000000000000000000a7d8d9ef8d8ce8992df33d8b8cf4aebabd5bd2706001600160a01b03169063a47d29cb9060240160206040518083038186803b15801561049157600080fd5b505afa1580156104a5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104c99190611f29565b6001600160a01b0316336001600160a01b0316146104f95760405162461bcd60e51b81526004016103e790611f46565b60008381526003602090815260408083208590556004909152808220805460ff1916600117905551839185917f26118a27aca826f829f3bfe21b140b4455c00b434849bd0da50d1e1a9720fb5c9190a3505050565b6000818152600460209081526040808320546003835281842054600690935292205460ff909216916060906001600160a01b0316806105aa576040518060400160405280600381526020016208aa8960eb1b8152509150610644565b600085815260056020526040902080546105c390611f6b565b80601f01602080910402602001604051908101604052809291908181526020018280546105ef90611f6b565b801561063c5780601f106106115761010080835404028352916020019161063c565b820191906000526020600020905b81548152906001019060200180831161061f57829003601f168201915b505050505091505b9193509193565b6000600260005414156106a05760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016103e7565b600260009081558281526001602052604090205460ff16156107125760405162461bcd60e51b815260206004820152602560248201527f4d6178696d756d206e756d626572206f6620696e766f636174696f6e732072656044820152641858da195960da1b60648201526084016103e7565b60008281526004602052604090205460ff166107675760405162461bcd60e51b8152602060048201526014602482015273141c9a58d9481b9bdd0818dbdb999a59dd5c995960621b60448201526064016103e7565b604051630d4d151360e01b81526001600160a01b038481166004830152602482018490523360448301527f0000000000000000000000004aafce293b9b0fad169c78049a81e400f518e1991690630d4d151390606401602060405180830381600087803b1580156107d757600080fd5b505af11580156107eb573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061080f9190611fa6565b60008381526002602052604090205490915015801590610854575060008281526002602052604090205461084590600190611fd5565b610852620f424083612002565b145b15610876576000828152600160208190526040909120805460ff191690911790555b6000828152600660205260409020546001600160a01b031615610ae55734156109075760405162461bcd60e51b815260206004820152603f60248201527f746869732070726f6a6563742061636365707473206120646966666572656e7460448201527f2063757272656e637920616e642063616e6e6f7420616363657074204554480060648201526084016103e7565b600082815260036020908152604080832054600690925291829020549151636eb1769f60e11b815233600482015230602482015290916001600160a01b03169063dd62ed3e9060440160206040518083038186803b15801561096857600080fd5b505afa15801561097c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109a09190611fa6565b10156109f95760405162461bcd60e51b815260206004820152602260248201527f496e73756666696369656e742046756e647320417070726f76656420666f72206044820152610a8b60f31b60648201526084016103e7565b6000828152600360209081526040808320546006909252918290205491516370a0823160e01b815290916001600160a01b0316906370a0823190610a41903390600401611dee565b60206040518083038186803b158015610a5957600080fd5b505afa158015610a6d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a919190611fa6565b1015610ad75760405162461bcd60e51b815260206004820152601560248201527424b739bab33334b1b4b2b73a103130b630b731b29760591b60448201526064016103e7565b610ae082610ff4565b610b4c565b600082815260036020526040902054341015610b435760405162461bcd60e51b815260206004820181905260248201527f4d7573742073656e64206d696e696d756d2076616c756520746f206d696e742160448201526064016103e7565b610b4c826115b8565b600160005592915050565b6000818152600660205260408082205490516370a0823160e01b81526001600160a01b03909116906370a0823190610b93903390600401611dee565b60206040518083038186803b158015610bab57600080fd5b505afa158015610bbf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610be39190611fa6565b92915050565b60405163a47d29cb60e01b81526004810184905283907f000000000000000000000000a7d8d9ef8d8ce8992df33d8b8cf4aebabd5bd2706001600160a01b03169063a47d29cb9060240160206040518083038186803b158015610c4b57600080fd5b505afa158015610c5f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c839190611f29565b6001600160a01b0316336001600160a01b031614610cb35760405162461bcd60e51b81526004016103e790611f46565b6040516208aa8960eb1b60208201526001600160a01b03831615906023016040516020818303038152906040528051906020012084604051602001610cf89190612016565b6040516020818303038152906040528051906020012014151514610d595760405162461bcd60e51b8152602060048201526018602482015277455448206973206f6e6c79206e756c6c206164647265737360401b60448201526064016103e7565b60008481526005602090815260409091208451610d7892860190611c43565b506000848152600660205260409081902080546001600160a01b0319166001600160a01b038516908117909155905185907fe6c8c6160f844a27204e2b7fb4b7fb9f10e5d322fa850096bef29dc1d0f445c190610dd6908790611f0f565b60405180910390a350505050565b6000610be3338361064b565b600081815260066020526040808220549051636eb1769f60e11b81523360048201523060248201526001600160a01b039091169063dd62ed3e90604401610b93565b604051633af32abf60e01b81526001600160a01b037f000000000000000000000000a7d8d9ef8d8ce8992df33d8b8cf4aebabd5bd2701690633af32abf90610e7e903390600401611dee565b60206040518083038186803b158015610e9657600080fd5b505afa158015610eaa573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ece9190612047565b610f125760405162461bcd60e51b815260206004820152601560248201527413db9b1e4810dbdc99481dda1a5d195b1a5cdd1959605a1b60448201526064016103e7565b6040516346161b1160e11b81526004810182905260009081906001600160a01b037f000000000000000000000000a7d8d9ef8d8ce8992df33d8b8cf4aebabd5bd2701690638c2c36229060240160006040518083038186803b158015610f7757600080fd5b505afa158015610f8b573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610fb3919081019061206d565b505050600089815260026020526040902083905550919550935050505080821015610fef576000838152600160205260409020805460ff191690555b505050565b600060036000838152602001908152602001600020549050600060647f000000000000000000000000a7d8d9ef8d8ce8992df33d8b8cf4aebabd5bd2706001600160a01b0316634f029c396040518163ffffffff1660e01b815260040160206040518083038186803b15801561106957600080fd5b505afa15801561107d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110a19190611fa6565b6110ab9084612156565b6110b59190612175565b905080156111e257600083815260066020908152604091829020548251631ca4fc8360e11b815292516001600160a01b03918216936323b872dd9333937f000000000000000000000000a7d8d9ef8d8ce8992df33d8b8cf4aebabd5bd2701692633949f906926004808201939291829003018186803b15801561113757600080fd5b505afa15801561114b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061116f9190611f29565b846040518463ffffffff1660e01b815260040161118e93929190612189565b602060405180830381600087803b1580156111a857600080fd5b505af11580156111bc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111e09190612047565b505b60006111ee8284611fd5565b90506000807f000000000000000000000000a7d8d9ef8d8ce8992df33d8b8cf4aebabd5bd2706001600160a01b031663cc74234b876040518263ffffffff1660e01b815260040161124191815260200190565b60206040518083038186803b15801561125957600080fd5b505afa15801561126d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112919190611fa6565b11156114755760405163cc74234b60e01b8152600481018690526064907f000000000000000000000000a7d8d9ef8d8ce8992df33d8b8cf4aebabd5bd2706001600160a01b03169063cc74234b9060240160206040518083038186803b1580156112fa57600080fd5b505afa15801561130e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113329190611fa6565b61133c9084612156565b6113469190612175565b905080156114755760008581526006602052604090819020549051636bd8225b60e11b8152600481018790526001600160a01b03918216916323b872dd9133917f000000000000000000000000a7d8d9ef8d8ce8992df33d8b8cf4aebabd5bd270169063d7b044b69060240160206040518083038186803b1580156113ca57600080fd5b505afa1580156113de573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114029190611f29565b846040518463ffffffff1660e01b815260040161142193929190612189565b602060405180830381600087803b15801561143b57600080fd5b505af115801561144f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114739190612047565b505b60006114818284611fd5565b905080156115b0576000868152600660205260409081902054905163a47d29cb60e01b8152600481018890526001600160a01b03918216916323b872dd9133917f000000000000000000000000a7d8d9ef8d8ce8992df33d8b8cf4aebabd5bd270169063a47d29cb9060240160206040518083038186803b15801561150557600080fd5b505afa158015611519573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061153d9190611f29565b846040518463ffffffff1660e01b815260040161155c93929190612189565b602060405180830381600087803b15801561157657600080fd5b505af115801561158a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115ae9190612047565b505b505050505050565b3415611c4057600081815260036020526040812054906115d88234611fd5565b9050801561166a57604051600090339083908381818185875af1925050503d8060008114611622576040519150601f19603f3d011682016040523d82523d6000602084013e611627565b606091505b50509050806116685760405162461bcd60e51b815260206004820152600d60248201526c1499599d5b990819985a5b1959609a1b60448201526064016103e7565b505b600060647f000000000000000000000000a7d8d9ef8d8ce8992df33d8b8cf4aebabd5bd2706001600160a01b0316634f029c396040518163ffffffff1660e01b815260040160206040518083038186803b1580156116c757600080fd5b505afa1580156116db573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116ff9190611fa6565b6117099085612156565b6117139190612175565b9050801561184c5760007f000000000000000000000000a7d8d9ef8d8ce8992df33d8b8cf4aebabd5bd2706001600160a01b0316633949f9066040518163ffffffff1660e01b815260040160206040518083038186803b15801561177657600080fd5b505afa15801561178a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117ae9190611f29565b6001600160a01b03168260405160006040518083038185875af1925050503d80600081146117f8576040519150601f19603f3d011682016040523d82523d6000602084013e6117fd565b606091505b505090508061184a5760405162461bcd60e51b8152602060048201526019602482015278119bdd5b99185d1a5bdb881c185e5b595b9d0819985a5b1959603a1b60448201526064016103e7565b505b60006118588285611fd5565b90506000807f000000000000000000000000a7d8d9ef8d8ce8992df33d8b8cf4aebabd5bd2706001600160a01b031663cc74234b886040518263ffffffff1660e01b81526004016118ab91815260200190565b60206040518083038186803b1580156118c357600080fd5b505afa1580156118d7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118fb9190611fa6565b1115611af15760405163cc74234b60e01b8152600481018790526064907f000000000000000000000000a7d8d9ef8d8ce8992df33d8b8cf4aebabd5bd2706001600160a01b03169063cc74234b9060240160206040518083038186803b15801561196457600080fd5b505afa158015611978573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061199c9190611fa6565b6119a69084612156565b6119b09190612175565b90508015611af157604051636bd8225b60e11b8152600481018790526000907f000000000000000000000000a7d8d9ef8d8ce8992df33d8b8cf4aebabd5bd2706001600160a01b03169063d7b044b69060240160206040518083038186803b158015611a1b57600080fd5b505afa158015611a2f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a539190611f29565b6001600160a01b03168260405160006040518083038185875af1925050503d8060008114611a9d576040519150601f19603f3d011682016040523d82523d6000602084013e611aa2565b606091505b5050905080611aef5760405162461bcd60e51b81526020600482015260196024820152781059191a5d1a5bdb985b081c185e5b595b9d0819985a5b1959603a1b60448201526064016103e7565b505b6000611afd8284611fd5565b905080156115ae5760405163a47d29cb60e01b8152600481018890526000907f000000000000000000000000a7d8d9ef8d8ce8992df33d8b8cf4aebabd5bd2706001600160a01b03169063a47d29cb9060240160206040518083038186803b158015611b6857600080fd5b505afa158015611b7c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ba09190611f29565b6001600160a01b03168260405160006040518083038185875af1925050503d8060008114611bea576040519150601f19603f3d011682016040523d82523d6000602084013e611bef565b606091505b5050905080611c385760405162461bcd60e51b8152602060048201526015602482015274105c9d1a5cdd081c185e5b595b9d0819985a5b1959605a1b60448201526064016103e7565b505050505050505b50565b828054611c4f90611f6b565b90600052602060002090601f016020900481019282611c715760008555611cb7565b82601f10611c8a57805160ff1916838001178555611cb7565b82800160010185558215611cb7579182015b82811115611cb7578251825591602001919060010190611c9c565b50611cc3929150611cc7565b5090565b5b80821115611cc35760008155600101611cc8565b600060208284031215611cee57600080fd5b5035919050565b60008060408385031215611d0857600080fd5b50508035926020909101359150565b60005b83811015611d32578181015183820152602001611d1a565b83811115611d41576000848401525b50505050565b60008151808452611d5f816020860160208601611d17565b601f01601f19169290920160200192915050565b8415158152836020820152608060408201526000611d946080830185611d47565b905060018060a01b038316606083015295945050505050565b6001600160a01b0381168114611c4057600080fd5b60008060408385031215611dd557600080fd5b8235611de081611dad565b946020939093013593505050565b6001600160a01b0391909116815260200190565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715611e4157611e41611e02565b604052919050565b600067ffffffffffffffff821115611e6357611e63611e02565b50601f01601f191660200190565b600080600060608486031215611e8657600080fd5b83359250602084013567ffffffffffffffff811115611ea457600080fd5b8401601f81018613611eb557600080fd5b8035611ec8611ec382611e49565b611e18565b818152876020838501011115611edd57600080fd5b816020840160208301376000602083830101528094505050506040840135611f0481611dad565b809150509250925092565b602081526000611f226020830184611d47565b9392505050565b600060208284031215611f3b57600080fd5b8151611f2281611dad565b6020808252600b908201526a13db9b1e48105c9d1a5cdd60aa1b604082015260600190565b600181811c90821680611f7f57607f821691505b60208210811415611fa057634e487b7160e01b600052602260045260246000fd5b50919050565b600060208284031215611fb857600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b600082821015611fe757611fe7611fbf565b500390565b634e487b7160e01b600052601260045260246000fd5b60008261201157612011611fec565b500690565b60008251612028818460208701611d17565b9190910192915050565b8051801515811461204257600080fd5b919050565b60006020828403121561205957600080fd5b611f2282612032565b805161204281611dad565b60008060008060008060008060006101208a8c03121561208c57600080fd5b895161209781611dad565b8099505060208a0151975060408a0151965060608a015195506120bc60808b01612032565b945060a08a01516120cc81611dad565b60c08b015160e08c0151919550935067ffffffffffffffff8111156120f057600080fd5b8a01601f81018c1361210157600080fd5b805161210f611ec382611e49565b8181528d602083850101111561212457600080fd5b612135826020830160208601611d17565b93506121479150506101008b01612062565b90509295985092959850929598565b600081600019048311821515161561217057612170611fbf565b500290565b60008261218457612184611fec565b500490565b6001600160a01b03938416815291909216602082015260408101919091526060019056fea2646970667358221220129ac0657310cab119ab9728c05feaf9f62e5ba564c91baf39e0c380002a3b3264736f6c63430008090033

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

000000000000000000000000a7d8d9ef8d8ce8992df33d8b8cf4aebabd5bd2700000000000000000000000004aafce293b9b0fad169c78049a81e400f518e199

-----Decoded View---------------
Arg [0] : _genArt721Address (address): 0xa7d8d9ef8D8Ce8992Df33D8b8CF4Aebabd5bD270
Arg [1] : _minterFilter (address): 0x4aafCE293b9B0faD169c78049A81e400f518E199

-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 000000000000000000000000a7d8d9ef8d8ce8992df33d8b8cf4aebabd5bd270
Arg [1] : 0000000000000000000000004aafce293b9b0fad169c78049a81e400f518e199


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  ]

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.