ETH Price: $2,602.83 (-4.23%)
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Safe Mint152527302022-07-31 21:45:50926 days ago1659303950IN
0x9F0f87C5...07048AF06
0 ETH0.0026227911.05439723
Safe Mint152516902022-07-31 17:52:38926 days ago1659289958IN
0x9F0f87C5...07048AF06
0 ETH0.0033828912.4637191
Safe Mint152324672022-07-28 17:56:59929 days ago1659031019IN
0x9F0f87C5...07048AF06
0 ETH0.0099522941.94660803
Safe Mint152324422022-07-28 17:51:00929 days ago1659030660IN
0x9F0f87C5...07048AF06
0 ETH0.0105125341.3340879
Set Tier Swap Am...151275872022-07-12 11:37:29945 days ago1657625849IN
0x9F0f87C5...07048AF06
0 ETH0.0007652714.13165798
Set Tier Swap Am...151275752022-07-12 11:35:29945 days ago1657625729IN
0x9F0f87C5...07048AF06
0 ETH0.000741711.95116544
Set Tier Swap Am...151275662022-07-12 11:33:49945 days ago1657625629IN
0x9F0f87C5...07048AF06
0 ETH0.0004872613.15042945
Safe Mint150930892022-07-07 3:54:02951 days ago1657166042IN
0x9F0f87C5...07048AF06
0 ETH0.0039351916.58718629
Safe Mint150921642022-07-07 0:15:53951 days ago1657152953IN
0x9F0f87C5...07048AF06
0 ETH0.0128744550.61727528
Safe Mint150846812022-07-05 20:20:29952 days ago1657052429IN
0x9F0f87C5...07048AF06
0 ETH0.0084786835.74171004
Safe Mint150465412022-06-29 19:26:16958 days ago1656530776IN
0x9F0f87C5...07048AF06
0 ETH0.017005462.6509276
Safe Mint150037932022-06-21 19:17:08966 days ago1655839028IN
0x9F0f87C5...07048AF06
0 ETH0.0103752744.59627715
Safe Mint150037592022-06-21 19:09:38966 days ago1655838578IN
0x9F0f87C5...07048AF06
0 ETH0.0134262760.92134257
Safe Mint150037512022-06-21 19:07:18966 days ago1655838438IN
0x9F0f87C5...07048AF06
0 ETH0.0134316260.94839707
Safe Mint150037502022-06-21 19:06:26966 days ago1655838386IN
0x9F0f87C5...07048AF06
0 ETH0.0126452354.34906994
Set Tier Swap Am...150037332022-06-21 19:02:17966 days ago1655838137IN
0x9F0f87C5...07048AF06
0 ETH0.0026230670.79210877
Safe Mint150037262022-06-21 19:00:01966 days ago1655838001IN
0x9F0f87C5...07048AF06
0 ETH0.0117401153.28011894
Safe Mint150037242022-06-21 18:58:51966 days ago1655837931IN
0x9F0f87C5...07048AF06
0 ETH0.011177444.75491047
Safe Mint150033912022-06-21 17:28:16966 days ago1655832496IN
0x9F0f87C5...07048AF06
0 ETH0.0103564144.50523777
Safe Mint150032772022-06-21 16:58:09966 days ago1655830689IN
0x9F0f87C5...07048AF06
0 ETH0.0140002560.17241743
Safe Mint150032682022-06-21 16:54:46966 days ago1655830486IN
0x9F0f87C5...07048AF06
0 ETH0.011481253.26541931
Safe Mint150032422022-06-21 16:47:29966 days ago1655830049IN
0x9F0f87C5...07048AF06
0 ETH0.0115609952.46006078
Safe Mint150031592022-06-21 16:22:52966 days ago1655828572IN
0x9F0f87C5...07048AF06
0 ETH0.0137167557.76714389
Safe Mint150030692022-06-21 15:58:36966 days ago1655827116IN
0x9F0f87C5...07048AF06
0 ETH0.0093172540.03958654
Safe Mint150030662022-06-21 15:57:55966 days ago1655827075IN
0x9F0f87C5...07048AF06
0 ETH0.0080575837.3782027
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:
CreatiVerse

Compiler Version
v0.8.14+commit.80d49f37

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 10 : Main.sol
// SPDX-License-Identifier: BUSL-1.1
pragma solidity 0.8.14;

// PERSISTENCE ALONE IS OMNIPOTENT!

// S: CHIPAPIMONANO
// A: EMPATHETIC
// F: Pex-Pef
// E: ETHICAL

// ABOUT CREATIVERSE  https://nft.protoverse.ai
// CreatiVerse is a complete, “any-currency” NFT mintpad
// and management platform. It provides creators with sophisticated
// tools to mint, monetize, and fairly distribute NFTs.
// The platform also empowers users with automated
// peer-to-peer NFT scholarships and fixed rental escrows.

// ABOUT PROTOVERSE
// ProtoVerse fulfills projects’ wildest
// NFT and Play-To-Earn game development dreams.

// ProtoVerse’s dApps are custom-built in-house and
// certified by CertiK to ensure the utmost privacy, transparency, and security.
// They can be offered cost-effectively as whitelabel solutions to any qualified project.

// Website: ProtoVerse.ai

//    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#.,,,,,,,,,,,,,*@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
//    @@@@@@@@@@@@@@@@@@@@@@@##*.......,,,,,,,,,,,,,,,,,,,,,,*#@@@@@@@@@@@@@@@@@@@@@@@
//    @@@@@@@@@@@@@@@@@@@..............,,,,,,,,,,,,,,,,,,,,,,,,,,,,#@@@@@@@@@@@@@@@@@@
//    @@@@@@@@@@@@@@@%..............                   ..,,,,,,,,,,,,,#@@@@@@@@@@@@@@@
//    @@@@@@@@@@@@(...........                               .,,,,,,,,,,,*@@@@@@@@@@@@
//    @@@@@@@@@&,.........                            ............,,,,,,,***%@@@@@@@@@
//    @@@@@@@@,........                      ........................,,,,*****@@@@@@@@
//    @@@@@@(........               ...................................,,******/@@@@@@
//    @@@@#.......           . .........................,/###(,,,,,,,,,,,,,******/@@@@
//    @@@%.......     .............*(#(*..............,(%%#/%%%(,,,,,,,,,,,*******(@@@
//    @@(....... ................*#%%%%%%*.......,,,,,#&&(,,,#&&#,,,,,,,,,*********,@@
//    @#.........................*%&&&&&%*.,,,,,,,,,,/&@%*,,,*%@@/,,,,,,,***********/@
//    @............................,*/*,,,,,,,,,,,,,,%&@/,,,,,(@@%,,,,,,,************%
//    ........................,(&@@@@&%*,,,,,,,,,,,/@@&,,,,,,,&@@*,,,,,,*************
//    .....................,%@@@@@@@@&@@&/,,,,,,,,,#@&%,,,,,,,#@@(,,,,,,*************
//    .....................&@@&(&@@@@@&&&@@@&*,,,,,,%@@(,,,,,,,(@@%,,,,,,*************
//    ...................*&@&&,,&@&@&@&/.,(&&@&%,,,,%@&(,,,,,,,(&@%,,,,,,*,***********
//    .....................*,../@@@@@@#,,,,,,,,,,,,,#@@#,,,,,,,#@@#,,,,,,*************
//    .........................*%&@@@%*,,,,,,,,,,,,(@&%,,,,,,,&@@(,,,,,,*************
//    @.......................*&&*,/&@&@&(,,,,,,,,,,*@@@*,,,,,/@@@*,,,,,,************#
//    @*......................%@@@&..,%&@@&*,,,,,,,,,#&@(,,,,,#@@#,,,,,,,************&
//    @#....................*&@@@%,...,#@@@%*,,,,,,,,*&@&*,,,*&@&*,,,,,,,***********/@
//    @@@................../&@@@%,.....,&@@@(,,,,,,,,,(&@&*,*&@&(,,,,,,,,***********@@
//    @@@&................#@@@&/.......,*&@@&,,,,,,,,,,*&@&&&@&*,,,,,,,,,*********(@@@
//    @@@@@................/#(.........,,*##*,,,,,,,,,,,,*(%#*,,,,,,,,,,,*,*****,@@@@@
//    @@@@@@%..........................,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,******/@@@@@@
//    @@@@@@@@@........................,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,****#@@@@@@@@
//    @@@@@@@@@@%......................,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,**#@@@@@@@@@@
//    @@@@@@@@@@@@@,...................,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,*@@@@@@@@@@@@@
//    @@@@@@@@@@@@@@@@(................,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,/@@@@@@@@@@@@@@@@
//    @@@@@@@@@@@@@@@@@@@@/,...........,,,,,,,,,,,,,,,,,,,,,,,,,,*@@@@@@@@@@@@@@@@@@@@
//    @@@@@@@@@@@@@@@@@@@@@@@@@%(......,,,,,,,,,,,,,,,,,,,,/#%@@@@@@@@@@@@@@@@@@@@@@@@

import "./AppType.sol";
import "./App.sol";
import "./Batch.sol";

/// @custom:security-contact [email protected]
contract CreatiVerse {
    using App for AppType.State;
    using BatchFactory for AppType.State;
    AppType.State internal state;

    constructor(
        address dao,
        address feeWallet,
        uint256 chainId
    ) {
        state.initialize(dao, feeWallet, chainId);
    }

    function safeMint(
        AppType.NFT calldata nft,
        AppType.Pass calldata pass,
        AppType.Proof calldata proof
    ) external payable {
        uint256 newTokenId = state.authorizeMint(nft, pass, proof);
        INFT(state.batches[nft.batchId].collection).safeMint(
            msg.sender,
            newTokenId,
            nft.uri
        );
    }

    function setTierSwapAmount(
        uint256 tierId,
        address[] calldata swapTokens,
        uint256[] calldata swapAmounts
    ) external {
        state.setTierSwapAmount(tierId, swapTokens, swapAmounts);
    }

    function getTierSwapAmount(uint256 tierId, address swapToken)
        external
        view
        returns (uint256)
    {
        return state.tierSwapAmounts[tierId][swapToken];
    }

    function changeConfig(
        AppType.IConfigKey calldata key,
        AppType.IConfigValue calldata value
    ) external {
        state.changeConfig(key, value);
    }

    function getConfig(
        AppType.AddressConfig addressConfig,
        AppType.UintConfig uintConfig,
        AppType.BoolConfig boolConfig,
        AppType.StringConfig stringConfig
    )
        external
        view
        returns (
            address addressValue,
            uint256 uintValue,
            bool boolValue,
            string memory stringValue
        )
    {
        return
            state.getConfig(
                addressConfig,
                uintConfig,
                boolConfig,
                stringConfig
            );
    }

    function createBatch(
        AppType.BatchKind kind,
        uint256 isOpenAt,
        bool disabled,
        bytes32 root,
        address collection
    ) external {
        state.createBatch(kind, isOpenAt, disabled, root, collection);
    }

    function updateBatch(
        uint256 batchId,
        uint256 isOpenAt,
        bool disabled,
        bytes32 root,
        address collection
    ) external {
        state.updateBatch(batchId, isOpenAt, disabled, root, collection);
    }

    function readBatch(uint256 batchId)
        external
        view
        returns (
            AppType.BatchKind kind,
            uint256 isOpenAt,
            bool disabled,
            bytes32 root
        )
    {
        return state.readBatch(batchId);
    }

    function excludeNFTLeaf(AppType.NFT calldata nft, bool isExcluded)
        external
    {
        state.excludeNFTLeaf(nft, isExcluded);
    }

    function excludePassLeaf(AppType.Pass calldata pass, bool isExcluded)
        external
    {
        state.excludePassLeaf(pass, isExcluded);
    }

    function name() public view returns (string memory) {
        return state.config.strings[AppType.StringConfig.APP_NAME];
    }

    function withdrawDAO(address token, uint256 amount) external {
        state.safeWithdraw(token, amount);
    }
}

interface INFT {
    function safeMint(
        address to,
        uint256 newTokenId,
        string calldata uri
    ) external;
}

File 2 of 10 : AppType.sol
// SPDX-License-Identifier: BUSL-1.1
pragma solidity 0.8.14;

library AppType {
    enum BatchKind {
        PASS,
        NFT
    }

    enum Model {
        BATCH
    }

    enum AddressConfig {
        NONE,
        DAO,
        FEE_WALLET
    }

    enum UintConfig {
        NONE,
        CHAIN_ID
    }

    enum BoolConfig {
        NONE,
        ALLOW_MINT_WITHOUT_PASS,
        PAUSED
    }

    enum StringConfig {
        NONE,
        APP_NAME
    }

    struct IConfigKey {
        AddressConfig addressK;
        UintConfig uintK;
        BoolConfig boolK;
        StringConfig stringK;
    }

    struct IConfigValue {
        address addressV;
        uint256 uintV;
        bool boolV;
        string stringV;
    }

    struct Config {
        mapping(AddressConfig => address) addresses;
        mapping(UintConfig => uint256) uints;
        mapping(BoolConfig => bool) bools;
        mapping(StringConfig => string) strings;
    }

    struct NFT {
        uint256 batchId;
        uint256 tierId;
        string uri;
        address swapToken;
        uint96 royaltyPercent;
    }

    struct Pass {
        uint256 batchId;
        uint256 balance;
    }

    struct Proof {
        bytes32[] pass;
        bytes32[] nft;
    }

    struct Batch {
        BatchKind kind;
        uint256 id;
        uint256 isOpenAt;
        bool disabled;
        bytes32 root;
        address collection;
    }

    struct State {
        mapping(Model => uint256) id;
        mapping(uint256 => Batch) batches;
        mapping(bytes32 => bool) excludedLeaves;
        mapping(bytes32 => uint256) usedLeaves;
        mapping(uint256 => mapping(address => uint256)) tierSwapAmounts;
        Config config;
    }
}

File 3 of 10 : App.sol
// SPDX-License-Identifier: BUSL-1.1
pragma solidity 0.8.14;

import "@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol";
import "@openzeppelin/contracts-upgradeable/token/ERC20/utils/SafeERC20Upgradeable.sol";

import "./AppType.sol";

library App {
    using SafeERC20Upgradeable for IERC20Upgradeable;
    event AppInitialized(uint256 chainId, string appName);
    event TierSwapAmountSet(
        uint256 tierId,
        address swapToken,
        uint256 swapAmount
    );
    event ConfigChanged(
        AppType.AddressConfig addressConfig,
        AppType.UintConfig uintConfig,
        AppType.BoolConfig boolConfig,
        AppType.StringConfig stringConfig,
        address addressValue,
        uint256 uintValue,
        bool boolValue,
        string stringValue
    );
    event WithdrawDAO(
        uint256 chainId,
        address token,
        uint256 amount,
        address account
    );

    function initialize(
        AppType.State storage state,
        address dao,
        address feeWallet,
        uint256 chainId
    ) public {
        state.config.addresses[AppType.AddressConfig.DAO] = dao;
        state.config.addresses[AppType.AddressConfig.FEE_WALLET] = feeWallet;
        state.config.uints[AppType.UintConfig.CHAIN_ID] = chainId;
        state.config.strings[AppType.StringConfig.APP_NAME] = "CreatiVerse";

        emit AppInitialized(
            state.config.uints[AppType.UintConfig.CHAIN_ID],
            state.config.strings[AppType.StringConfig.APP_NAME]
        );
    }

    function setTierSwapAmount(
        AppType.State storage state,
        uint256 tierId,
        address[] calldata swapTokens,
        uint256[] calldata swapAmounts
    ) external {
        require(
            msg.sender == state.config.addresses[AppType.AddressConfig.DAO],
            "E012"
        );

        for (uint256 i = 0; i < swapTokens.length; i++) {
            state.tierSwapAmounts[tierId][swapTokens[i]] = swapAmounts[i];
            emit TierSwapAmountSet(tierId, swapTokens[i], swapAmounts[i]);
        }
    }

    function changeConfig(
        AppType.State storage state,
        AppType.IConfigKey calldata key,
        AppType.IConfigValue calldata value
    ) public {
        require(
            msg.sender == state.config.addresses[AppType.AddressConfig.DAO],
            "E012"
        );

        state.config.addresses[key.addressK] = value.addressV;
        state.config.uints[key.uintK] = value.uintV;
        state.config.bools[key.boolK] = value.boolV;
        state.config.strings[key.stringK] = value.stringV;
        emit ConfigChanged(
            key.addressK,
            key.uintK,
            key.boolK,
            key.stringK,
            value.addressV,
            value.uintV,
            value.boolV,
            value.stringV
        );
    }

    function getConfig(
        AppType.State storage state,
        AppType.AddressConfig addressConfig,
        AppType.UintConfig uintConfig,
        AppType.BoolConfig boolConfig,
        AppType.StringConfig stringConfig
    )
        public
        view
        returns (
            address addressValue,
            uint256 uintValue,
            bool boolValue,
            string memory stringValue
        )
    {
        return (
            state.config.addresses[addressConfig],
            state.config.uints[uintConfig],
            state.config.bools[boolConfig],
            state.config.strings[stringConfig]
        );
    }

    function safeWithdraw(
        AppType.State storage state,
        address token,
        uint256 amount
    ) external {
        require(
            msg.sender == state.config.addresses[AppType.AddressConfig.DAO],
            "E012"
        );

        if (token == address(0)) {
            payable(state.config.addresses[AppType.AddressConfig.FEE_WALLET])
                .transfer(amount);
        } else {
            IERC20Upgradeable(token).safeTransfer(
                state.config.addresses[AppType.AddressConfig.FEE_WALLET],
                amount
            );
        }

        emit WithdrawDAO(
            state.config.uints[AppType.UintConfig.CHAIN_ID],
            token,
            amount,
            state.config.addresses[AppType.AddressConfig.FEE_WALLET]
        );
    }
}

File 4 of 10 : Batch.sol
// SPDX-License-Identifier: BUSL-1.1
pragma solidity 0.8.14;

import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "./AppType.sol";
import "./Utils.sol";

library BatchFactory {
    using LeafUtils for AppType.NFT;
    using LeafUtils for AppType.Pass;
    using MerkleProof for bytes32[];

    event BatchCreated(
        uint256 batchId,
        AppType.BatchKind kind,
        uint256 isOpenAt,
        bool disabled,
        bytes32 root,
        address collection
    );
    event BatchUpdated(
        uint256 batchId,
        uint256 isOpenAt,
        bool disabled,
        bytes32 root,
        address collection
    );
    event ExcludedLeaf(bytes32 leaf, uint256 batchId, bool isExcluded);
    event AuthorizedMint(
        uint256 nftBatchId,
        uint256 passBatchId,
        string nftUri,
        uint256 tierId,
        address swapToken,
        uint256 swapAmount,
        address account,
        uint256 newTokenId
    );

    function createBatch(
        AppType.State storage state,
        AppType.BatchKind kind,
        uint256 isOpenAt,
        bool disabled,
        bytes32 root,
        address collection
    ) public {
        require(
            msg.sender == state.config.addresses[AppType.AddressConfig.DAO],
            "E012"
        );
        uint256 newBatchId = ++state.id[AppType.Model.BATCH];
        state.batches[newBatchId] = AppType.Batch({
            id: newBatchId,
            kind: kind,
            isOpenAt: isOpenAt,
            disabled: disabled,
            root: root,
            collection: collection
        });
        emit BatchCreated(
            newBatchId,
            kind,
            isOpenAt,
            disabled,
            root,
            collection
        );
    }

    function updateBatch(
        AppType.State storage state,
        uint256 batchId,
        uint256 isOpenAt,
        bool disabled,
        bytes32 root,
        address collection
    ) public {
        require(
            msg.sender == state.config.addresses[AppType.AddressConfig.DAO],
            "E012"
        );

        require(state.batches[batchId].id == batchId, "E001");
        AppType.Batch storage batch = state.batches[batchId];
        batch.isOpenAt = isOpenAt;
        batch.disabled = disabled;
        batch.root = root;
        batch.collection = collection;
        emit BatchUpdated(batchId, isOpenAt, disabled, root, collection);
    }

    function readBatch(AppType.State storage state, uint256 batchId)
        public
        view
        returns (
            AppType.BatchKind kind,
            uint256 isOpenAt,
            bool disabled,
            bytes32 root
        )
    {
        require(state.batches[batchId].id == batchId, "E001");
        return (
            state.batches[batchId].kind,
            state.batches[batchId].isOpenAt,
            state.batches[batchId].disabled,
            state.batches[batchId].root
        );
    }

    function excludeNFTLeaf(
        AppType.State storage state,
        AppType.NFT memory nft,
        bool isExcluded
    ) public {
        require(
            msg.sender == state.config.addresses[AppType.AddressConfig.DAO],
            "E012"
        );

        bytes32 leaf = nft.nftLeaf(state);
        state.excludedLeaves[leaf] = isExcluded;
        emit ExcludedLeaf(leaf, nft.batchId, isExcluded);
    }

    function excludePassLeaf(
        AppType.State storage state,
        AppType.Pass memory pass,
        bool isExcluded
    ) public {
        require(
            msg.sender == state.config.addresses[AppType.AddressConfig.DAO],
            "E012"
        );

        bytes32 leaf = pass.passLeaf(state);
        state.excludedLeaves[leaf] = isExcluded;
        emit ExcludedLeaf(leaf, pass.batchId, isExcluded);
    }

    function authorizeMint(
        AppType.State storage state,
        AppType.NFT memory nft,
        AppType.Pass memory pass,
        AppType.Proof memory proof
    ) public returns (uint256 newTokenId) {
        require(!state.config.bools[AppType.BoolConfig.PAUSED], "E013");

        if (!state.config.bools[AppType.BoolConfig.ALLOW_MINT_WITHOUT_PASS]) {
            AppType.Batch storage passBatch = state.batches[pass.batchId];

            require(
                passBatch.id == pass.batchId &&
                    passBatch.kind == AppType.BatchKind.PASS &&
                    passBatch.isOpenAt <= block.timestamp &&
                    !passBatch.disabled,
                "E002"
            );

            bytes32 passLeaf = pass.passLeaf(state);
            require(state.usedLeaves[passLeaf] < pass.balance, "E003");

            require(proof.pass.verify(passBatch.root, passLeaf), "E004");
            require(state.excludedLeaves[passLeaf] == false, "E005");
            ++state.usedLeaves[passLeaf];
        }

        {
            AppType.Batch storage nftBatch = state.batches[nft.batchId];

            require(
                nftBatch.id == nft.batchId &&
                    nftBatch.kind == AppType.BatchKind.NFT &&
                    nftBatch.isOpenAt <= block.timestamp &&
                    !nftBatch.disabled,
                "E006"
            );

            bytes32 nftLeaf = nft.nftLeaf(state);
            require(state.usedLeaves[nftLeaf] == 0, "E007");
            require(proof.nft.verify(nftBatch.root, nftLeaf), "E008");
            require(state.excludedLeaves[nftLeaf] == false, "E009");
            ++state.usedLeaves[nftLeaf];
        }

        uint256 swapAmount = state.tierSwapAmounts[nft.tierId][nft.swapToken];

        {
            require(swapAmount > 0, "E010");

            if (nft.swapToken == address(0)) {
                require(msg.value >= swapAmount, "E011");
                payable(
                    state.config.addresses[AppType.AddressConfig.FEE_WALLET]
                ).transfer(swapAmount);
            } else {
                IERC20(nft.swapToken).transferFrom(
                    msg.sender,
                    state.config.addresses[AppType.AddressConfig.FEE_WALLET],
                    swapAmount
                );
            }
        }

        newTokenId = uint256(keccak256(abi.encode(nft.uri)));

        emit AuthorizedMint(
            nft.batchId,
            pass.batchId,
            nft.uri,
            nft.tierId,
            nft.swapToken,
            swapAmount,
            msg.sender,
            newTokenId
        );
    }
}

// Error Codes

// E001 - Batch not found
// E002 - Pass Batch not found
// E003 - Pass already used
// E004 - Pass not found
// E005 - Pass is excluded
// E006 - NFT Batch not found
// E007 - NFT already Minted
// E008 - NFT not found
// E009 - NFT is excluded
// E010 - swapAmount is 0
// E011 - Insufficient swap amount sent to mint
// E012 - Only DAO can perform this operation
// E013 - Minting is PAUSED

File 5 of 10 : IERC20Upgradeable.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 IERC20Upgradeable {
    /**
     * @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 10 : SafeERC20Upgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/utils/SafeERC20.sol)

pragma solidity ^0.8.0;

import "../IERC20Upgradeable.sol";
import "../../../utils/AddressUpgradeable.sol";

/**
 * @title SafeERC20
 * @dev Wrappers around ERC20 operations that throw on failure (when the token
 * contract returns false). Tokens that return no value (and instead revert or
 * throw on failure) are also supported, non-reverting calls are assumed to be
 * successful.
 * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,
 * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
 */
library SafeERC20Upgradeable {
    using AddressUpgradeable for address;

    function safeTransfer(
        IERC20Upgradeable token,
        address to,
        uint256 value
    ) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
    }

    function safeTransferFrom(
        IERC20Upgradeable token,
        address from,
        address to,
        uint256 value
    ) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
    }

    /**
     * @dev Deprecated. This function has issues similar to the ones found in
     * {IERC20-approve}, and its usage is discouraged.
     *
     * Whenever possible, use {safeIncreaseAllowance} and
     * {safeDecreaseAllowance} instead.
     */
    function safeApprove(
        IERC20Upgradeable token,
        address spender,
        uint256 value
    ) internal {
        // safeApprove should only be called when setting an initial allowance,
        // or when resetting it to zero. To increase and decrease it, use
        // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
        require(
            (value == 0) || (token.allowance(address(this), spender) == 0),
            "SafeERC20: approve from non-zero to non-zero allowance"
        );
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
    }

    function safeIncreaseAllowance(
        IERC20Upgradeable token,
        address spender,
        uint256 value
    ) internal {
        uint256 newAllowance = token.allowance(address(this), spender) + value;
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

    function safeDecreaseAllowance(
        IERC20Upgradeable token,
        address spender,
        uint256 value
    ) internal {
        unchecked {
            uint256 oldAllowance = token.allowance(address(this), spender);
            require(oldAllowance >= value, "SafeERC20: decreased allowance below zero");
            uint256 newAllowance = oldAllowance - value;
            _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
        }
    }

    /**
     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
     * on the return value: the return value is optional (but if data is returned, it must not be false).
     * @param token The token targeted by the call.
     * @param data The call data (encoded using abi.encode or one of its variants).
     */
    function _callOptionalReturn(IERC20Upgradeable token, bytes memory data) private {
        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
        // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that
        // the target address contains contract code and also asserts for success in the low-level call.

        bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed");
        if (returndata.length > 0) {
            // Return data is optional
            require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
        }
    }
}

File 7 of 10 : AddressUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol)

pragma solidity ^0.8.1;

/**
 * @dev Collection of functions related to the address type
 */
library AddressUpgradeable {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     *
     * [IMPORTANT]
     * ====
     * You shouldn't rely on `isContract` to protect against flash loan attacks!
     *
     * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
     * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
     * constructor.
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize/address.code.length, which returns 0
        // for contracts in construction, since the code is only stored at the end
        // of the constructor execution.

        return account.code.length > 0;
    }

    /**
     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to
     * `recipient`, forwarding all available gas and reverting on errors.
     *
     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
     * of certain opcodes, possibly making contracts go over the 2300 gas limit
     * imposed by `transfer`, making them unable to receive funds via
     * `transfer`. {sendValue} removes this limitation.
     *
     * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
     *
     * IMPORTANT: because control is transferred to `recipient`, care must be
     * taken to not create reentrancy vulnerabilities. Consider using
     * {ReentrancyGuard} or the
     * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        require(address(this).balance >= amount, "Address: insufficient balance");

        (bool success, ) = recipient.call{value: amount}("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }

    /**
     * @dev Performs a Solidity function call using a low level `call`. A
     * plain `call` is an unsafe replacement for a function call: use this
     * function instead.
     *
     * If `target` reverts with a revert reason, it is bubbled up by this
     * function (like regular Solidity function calls).
     *
     * Returns the raw returned data. To convert to the expected return value,
     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
     *
     * Requirements:
     *
     * - `target` must be a contract.
     * - calling `target` with `data` must not revert.
     *
     * _Available since v3.1._
     */
    function functionCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionCall(target, data, "Address: low-level call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
     * `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but also transferring `value` wei to `target`.
     *
     * Requirements:
     *
     * - the calling contract must have an ETH balance of at least `value`.
     * - the called Solidity function must be `payable`.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
    }

    /**
     * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
     * with `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(address(this).balance >= value, "Address: insufficient balance for call");
        require(isContract(target), "Address: call to non-contract");

        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
        return functionStaticCall(target, data, "Address: low-level static call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        require(isContract(target), "Address: static call to non-contract");

        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal pure returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            // Look for revert reason and bubble it up if present
            if (returndata.length > 0) {
                // The easiest way to bubble the revert reason is using memory via assembly

                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

File 8 of 10 : MerkleProof.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev These functions deal with verification of Merkle Trees proofs.
 *
 * The proofs can be generated using the JavaScript library
 * https://github.com/miguelmota/merkletreejs[merkletreejs].
 * Note: the hashing algorithm should be keccak256 and pair sorting should be enabled.
 *
 * See `test/utils/cryptography/MerkleProof.test.js` for some examples.
 */
library MerkleProof {
    /**
     * @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree
     * defined by `root`. For this, a `proof` must be provided, containing
     * sibling hashes on the branch from the leaf to the root of the tree. Each
     * pair of leaves and each pair of pre-images are assumed to be sorted.
     */
    function verify(
        bytes32[] memory proof,
        bytes32 root,
        bytes32 leaf
    ) internal pure returns (bool) {
        bytes32 computedHash = leaf;

        for (uint256 i = 0; i < proof.length; i++) {
            bytes32 proofElement = proof[i];

            if (computedHash <= proofElement) {
                // Hash(current computed hash + current element of the proof)
                computedHash = keccak256(abi.encodePacked(computedHash, proofElement));
            } else {
                // Hash(current element of the proof + current computed hash)
                computedHash = keccak256(abi.encodePacked(proofElement, computedHash));
            }
        }

        // Check if the computed hash (root) is equal to the provided root
        return computedHash == root;
    }
}

File 9 of 10 : IERC20.sol
// SPDX-License-Identifier: MIT

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 `recipient`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address recipient, 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 `sender` to `recipient` 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 sender,
        address recipient,
        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 10 of 10 : Utils.sol
// SPDX-License-Identifier: BUSL-1.1
pragma solidity 0.8.14;

import "./AppType.sol";

library LeafUtils {
    function nftLeaf(AppType.NFT memory nft, AppType.State storage state)
        public
        view
        returns (bytes32 leaf)
    {
        leaf = keccak256(
            abi.encodePacked(
                nft.batchId,
                uint256(AppType.BatchKind.NFT),
                nft.uri,
                nft.royaltyPercent,
                nft.tierId,
                state.config.strings[AppType.StringConfig.APP_NAME],
                state.config.uints[AppType.UintConfig.CHAIN_ID]
            )
        );
        return leaf;
    }

    function passLeaf(AppType.Pass memory pass, AppType.State storage state)
        public
        view
        returns (bytes32 leaf)
    {
        leaf = keccak256(
            abi.encodePacked(
                pass.batchId,
                uint256(AppType.BatchKind.PASS),
                msg.sender,
                pass.balance,
                state.config.strings[AppType.StringConfig.APP_NAME],
                state.config.uints[AppType.UintConfig.CHAIN_ID]
            )
        );
        return leaf;
    }
}

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "libraries": {
    "contracts/App.sol": {
      "App": "0x10122320698e8d8a9e77fcaaa0c2f61c5e3467dd"
    },
    "contracts/Batch.sol": {
      "BatchFactory": "0x8ac5096bbf5f8a60cbb50982d8890a69ce163150"
    }
  }
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"dao","type":"address"},{"internalType":"address","name":"feeWallet","type":"address"},{"internalType":"uint256","name":"chainId","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"components":[{"internalType":"enum AppType.AddressConfig","name":"addressK","type":"uint8"},{"internalType":"enum AppType.UintConfig","name":"uintK","type":"uint8"},{"internalType":"enum AppType.BoolConfig","name":"boolK","type":"uint8"},{"internalType":"enum AppType.StringConfig","name":"stringK","type":"uint8"}],"internalType":"struct AppType.IConfigKey","name":"key","type":"tuple"},{"components":[{"internalType":"address","name":"addressV","type":"address"},{"internalType":"uint256","name":"uintV","type":"uint256"},{"internalType":"bool","name":"boolV","type":"bool"},{"internalType":"string","name":"stringV","type":"string"}],"internalType":"struct AppType.IConfigValue","name":"value","type":"tuple"}],"name":"changeConfig","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"enum AppType.BatchKind","name":"kind","type":"uint8"},{"internalType":"uint256","name":"isOpenAt","type":"uint256"},{"internalType":"bool","name":"disabled","type":"bool"},{"internalType":"bytes32","name":"root","type":"bytes32"},{"internalType":"address","name":"collection","type":"address"}],"name":"createBatch","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint256","name":"batchId","type":"uint256"},{"internalType":"uint256","name":"tierId","type":"uint256"},{"internalType":"string","name":"uri","type":"string"},{"internalType":"address","name":"swapToken","type":"address"},{"internalType":"uint96","name":"royaltyPercent","type":"uint96"}],"internalType":"struct AppType.NFT","name":"nft","type":"tuple"},{"internalType":"bool","name":"isExcluded","type":"bool"}],"name":"excludeNFTLeaf","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint256","name":"batchId","type":"uint256"},{"internalType":"uint256","name":"balance","type":"uint256"}],"internalType":"struct AppType.Pass","name":"pass","type":"tuple"},{"internalType":"bool","name":"isExcluded","type":"bool"}],"name":"excludePassLeaf","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"enum AppType.AddressConfig","name":"addressConfig","type":"uint8"},{"internalType":"enum AppType.UintConfig","name":"uintConfig","type":"uint8"},{"internalType":"enum AppType.BoolConfig","name":"boolConfig","type":"uint8"},{"internalType":"enum AppType.StringConfig","name":"stringConfig","type":"uint8"}],"name":"getConfig","outputs":[{"internalType":"address","name":"addressValue","type":"address"},{"internalType":"uint256","name":"uintValue","type":"uint256"},{"internalType":"bool","name":"boolValue","type":"bool"},{"internalType":"string","name":"stringValue","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tierId","type":"uint256"},{"internalType":"address","name":"swapToken","type":"address"}],"name":"getTierSwapAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"batchId","type":"uint256"}],"name":"readBatch","outputs":[{"internalType":"enum AppType.BatchKind","name":"kind","type":"uint8"},{"internalType":"uint256","name":"isOpenAt","type":"uint256"},{"internalType":"bool","name":"disabled","type":"bool"},{"internalType":"bytes32","name":"root","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"uint256","name":"batchId","type":"uint256"},{"internalType":"uint256","name":"tierId","type":"uint256"},{"internalType":"string","name":"uri","type":"string"},{"internalType":"address","name":"swapToken","type":"address"},{"internalType":"uint96","name":"royaltyPercent","type":"uint96"}],"internalType":"struct AppType.NFT","name":"nft","type":"tuple"},{"components":[{"internalType":"uint256","name":"batchId","type":"uint256"},{"internalType":"uint256","name":"balance","type":"uint256"}],"internalType":"struct AppType.Pass","name":"pass","type":"tuple"},{"components":[{"internalType":"bytes32[]","name":"pass","type":"bytes32[]"},{"internalType":"bytes32[]","name":"nft","type":"bytes32[]"}],"internalType":"struct AppType.Proof","name":"proof","type":"tuple"}],"name":"safeMint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tierId","type":"uint256"},{"internalType":"address[]","name":"swapTokens","type":"address[]"},{"internalType":"uint256[]","name":"swapAmounts","type":"uint256[]"}],"name":"setTierSwapAmount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"batchId","type":"uint256"},{"internalType":"uint256","name":"isOpenAt","type":"uint256"},{"internalType":"bool","name":"disabled","type":"bool"},{"internalType":"bytes32","name":"root","type":"bytes32"},{"internalType":"address","name":"collection","type":"address"}],"name":"updateBatch","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdrawDAO","outputs":[],"stateMutability":"nonpayable","type":"function"}]

608060405234801561001057600080fd5b506040516200144138038062001441833981016040819052610031916100d6565b60405163219e5aa360e01b8152600060048201526001600160a01b03808516602483015283166044820152606481018290527310122320698e8d8a9e77fcaaa0c2f61c5e3467dd9063219e5aa39060840160006040518083038186803b15801561009a57600080fd5b505af41580156100ae573d6000803e3d6000fd5b50505050505050610112565b80516001600160a01b03811681146100d157600080fd5b919050565b6000806000606084860312156100eb57600080fd5b6100f4846100ba565b9250610102602085016100ba565b9150604084015190509250925092565b61131f80620001226000396000f3fe6080604052600436106100a75760003560e01c80637e85828a116100645780637e85828a1461017c578063843d4266146101cd578063bd689c53146101ed578063cec0dec51461020d578063d0d77eb91461022d578063f06c41ce1461025d57600080fd5b806306fdde03146100ac5780630920253f146100d75780631c07d6d3146100f95780632c4a15231461010c5780634793efb91461012c578063508af53a1461015c575b600080fd5b3480156100b857600080fd5b506100c161027d565b6040516100ce9190610831565b60405180910390f35b3480156100e357600080fd5b506100f76100f2366004610863565b61033a565b005b6100f76101073660046108d6565b6103aa565b34801561011857600080fd5b506100f7610127366004610997565b6104bd565b34801561013857600080fd5b5061014c610147366004610a2e565b610536565b6040516100ce9493929190610a8a565b34801561016857600080fd5b506100f7610177366004610ad8565b6105d6565b34801561018857600080fd5b506101bf610197366004610b04565b60009182526004602090815260408084206001600160a01b0393909316845291905290205490565b6040519081526020016100ce565b3480156101d957600080fd5b506100f76101e8366004610b42565b610624565b3480156101f957600080fd5b506100f7610208366004610b89565b610660565b34801561021957600080fd5b506100f7610228366004610bdf565b6106c4565b34801561023957600080fd5b5061024d610248366004610c0c565b610700565b6040516100ce9493929190610c4b565b34801561026957600080fd5b506100f7610278366004610c74565b610793565b600160005260086020527fad67d757c34507f157cacfa2e3153e9f260a2244f30428821be7be64587ac55f8054606091906102b790610cae565b80601f01602080910402602001604051908101604052809291908181526020018280546102e390610cae565b80156103305780601f1061030557610100808354040283529160200191610330565b820191906000526020600020905b81548152906001019060200180831161031357829003601f168201915b5050505050905090565b604051632feccd0560e01b81527310122320698e8d8a9e77fcaaa0c2f61c5e3467dd90632feccd05906103769060009086908690600401610d61565b60006040518083038186803b15801561038e57600080fd5b505af41580156103a2573d6000803e3d6000fd5b505050505050565b6040516356a2b38b60e01b8152600090738ac5096bbf5f8a60cbb50982d8890a69ce163150906356a2b38b906103ea908490889088908890600401610f49565b602060405180830381865af4158015610407573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061042b9190610fc8565b843560009081526001602052604090819020600501549192506001600160a01b039091169063cd279c7c903390849061046690890189610fe1565b6040518563ffffffff1660e01b81526004016104859493929190611028565b600060405180830381600087803b15801561049f57600080fd5b505af11580156104b3573d6000803e3d6000fd5b5050505050505050565b604051632a7f82cf60e01b81527310122320698e8d8a9e77fcaaa0c2f61c5e3467dd90632a7f82cf906104ff9060009089908990899089908990600401611050565b60006040518083038186803b15801561051757600080fd5b505af415801561052b573d6000803e3d6000fd5b505050505050505050565b6000806000606060007310122320698e8d8a9e77fcaaa0c2f61c5e3467dd63b7db3c9a90918a8a8a8a6040518663ffffffff1660e01b815260040161057f9594939291906110c5565b600060405180830381865af415801561059c573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526105c49190810190611128565b929b919a509850909650945050505050565b604051630e3c433d60e21b8152600060048201526001600160a01b0383166024820152604481018290527310122320698e8d8a9e77fcaaa0c2f61c5e3467dd906338f10cf490606401610376565b604051634093d91f60e01b8152738ac5096bbf5f8a60cbb50982d8890a69ce16315090634093d91f906103769060009086908690600401611206565b604051638952e39f60e01b81526000600482015260248101869052604481018590528315156064820152608481018390526001600160a01b03821660a4820152738ac5096bbf5f8a60cbb50982d8890a69ce16315090638952e39f9060c4016104ff565b604051631945682760e31b8152738ac5096bbf5f8a60cbb50982d8890a69ce1631509063ca2b4138906103769060009086908690600401611231565b60405163fc760e8760e01b81526000600482018190526024820183905290819081908190738ac5096bbf5f8a60cbb50982d8890a69ce1631509063fc760e8790604401608060405180830381865af4158015610760573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610784919061125f565b93509350935093509193509193565b604051632da9425160e21b8152738ac5096bbf5f8a60cbb50982d8890a69ce1631509063b6a50944906104ff90600090899089908990899089906004016112a8565b60005b838110156107f05781810151838201526020016107d8565b838111156107ff576000848401525b50505050565b6000815180845261081d8160208601602086016107d5565b601f01601f19169290920160200192915050565b6020815260006108446020830184610805565b9392505050565b60006080828403121561085d57600080fd5b50919050565b60008060a0838503121561087657600080fd5b610880848461084b565b9150608083013567ffffffffffffffff81111561089c57600080fd5b6108a88582860161084b565b9150509250929050565b600060a0828403121561085d57600080fd5b60006040828403121561085d57600080fd5b6000806000608084860312156108eb57600080fd5b833567ffffffffffffffff8082111561090357600080fd5b61090f878388016108b2565b945061091e87602088016108c4565b9350606086013591508082111561093457600080fd5b50610941868287016108c4565b9150509250925092565b60008083601f84011261095d57600080fd5b50813567ffffffffffffffff81111561097557600080fd5b6020830191508360208260051b850101111561099057600080fd5b9250929050565b6000806000806000606086880312156109af57600080fd5b85359450602086013567ffffffffffffffff808211156109ce57600080fd5b6109da89838a0161094b565b909650945060408801359150808211156109f357600080fd5b50610a008882890161094b565b969995985093965092949392505050565b60038110610a1e57600080fd5b50565b60028110610a1e57600080fd5b60008060008060808587031215610a4457600080fd5b8435610a4f81610a11565b93506020850135610a5f81610a21565b92506040850135610a6f81610a11565b91506060850135610a7f81610a21565b939692955090935050565b60018060a01b03851681528360208201528215156040820152608060608201526000610ab96080830184610805565b9695505050505050565b6001600160a01b0381168114610a1e57600080fd5b60008060408385031215610aeb57600080fd5b8235610af681610ac3565b946020939093013593505050565b60008060408385031215610b1757600080fd5b823591506020830135610b2981610ac3565b809150509250929050565b8015158114610a1e57600080fd5b60008060408385031215610b5557600080fd5b823567ffffffffffffffff811115610b6c57600080fd5b610b78858286016108b2565b9250506020830135610b2981610b34565b600080600080600060a08688031215610ba157600080fd5b85359450602086013593506040860135610bba81610b34565b9250606086013591506080860135610bd181610ac3565b809150509295509295909350565b60008060608385031215610bf257600080fd5b610bfc84846108c4565b91506040830135610b2981610b34565b600060208284031215610c1e57600080fd5b5035919050565b634e487b7160e01b600052602160045260246000fd5b60028110610a1e57610a1e610c25565b60808101610c5886610c3b565b9481526020810193909352901515604083015260609091015290565b600080600080600060a08688031215610c8c57600080fd5b8535610c9781610a21565b9450602086013593506040860135610bba81610b34565b600181811c90821680610cc257607f821691505b60208210810361085d57634e487b7160e01b600052602260045260246000fd5b60038110610a1e57610a1e610c25565b6000808335601e19843603018112610d0957600080fd5b830160208101925035905067ffffffffffffffff811115610d2957600080fd5b80360382131561099057600080fd5b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b83815260008335610d7181610a11565b610d7a81610ce2565b806020840152506020840135610d8f81610a21565b610d9881610c3b565b806040840152506040840135610dad81610a11565b610db681610ce2565b806060840152506060840135610dcb81610a21565b610dd481610c3b565b608083015260c060a08301528235610deb81610ac3565b6001600160a01b031660c0830152602083013560e08301526040830135610e1181610b34565b1515610100830152610e266060840184610cf2565b6080610120850152610e3d61014085018284610d38565b979650505050505050565b80358252602081013560208301526000610e656040830183610cf2565b60a06040860152610e7a60a086018284610d38565b9150506060830135610e8b81610ac3565b6001600160a01b0316606085015260808301356bffffffffffffffffffffffff8116808214610eb957600080fd5b608095909501949094529392505050565b6000808335601e19843603018112610ee157600080fd5b830160208101925035905067ffffffffffffffff811115610f0157600080fd5b8060051b360382131561099057600080fd5b81835260006001600160fb1b03831115610f2c57600080fd5b8260051b8083602087013760009401602001938452509192915050565b84815260a060208201526000610f6260a0830186610e48565b84356040840152602085013560608401528281036080840152610f858485610eca565b60408352610f97604084018284610f13565b915050610fa76020860186610eca565b8383036020850152610fba838284610f13565b9a9950505050505050505050565b600060208284031215610fda57600080fd5b5051919050565b6000808335601e19843603018112610ff857600080fd5b83018035915067ffffffffffffffff82111561101357600080fd5b60200191503681900382131561099057600080fd5b60018060a01b0385168152836020820152606060408201526000610ab9606083018486610d38565b86815260208082018790526080604083018190528201859052600090869060a08401835b888110156110a257833561108781610ac3565b6001600160a01b031682529282019290820190600101611074565b5084810360608601526110b6818789610f13565b9b9a5050505050505050505050565b85815260a081016110d586610ce2565b8560208301526110e485610c3b565b8460408301526110f384610ce2565b83606083015261110283610c3b565b8260808301529695505050505050565b634e487b7160e01b600052604160045260246000fd5b6000806000806080858703121561113e57600080fd5b845161114981610ac3565b60208601516040870151919550935061116181610b34565b606086015190925067ffffffffffffffff8082111561117f57600080fd5b818701915087601f83011261119357600080fd5b8151818111156111a5576111a5611112565b604051601f8201601f19908116603f011681019083821181831017156111cd576111cd611112565b816040528281528a60208487010111156111e657600080fd5b6111f78360208301602088016107d5565b979a9699509497505050505050565b83815260606020820152600061121f6060830185610e48565b90508215156040830152949350505050565b8381526080810161124f602083018580358252602090810135910152565b8215156060830152949350505050565b6000806000806080858703121561127557600080fd5b845161128081610a21565b60208601516040870151919550935061129881610b34565b6060959095015193969295505050565b86815260c081016112b887610c3b565b60208201969096526040810194909452911515606084015260808301526001600160a01b031660a09091015291905056fea2646970667358221220190dbef5e220e0f54cdcd8a4c45c82b8257cc3d0819af6a6cad56ee3667548bc64736f6c634300080e00330000000000000000000000002895949ff8391d3f07531ab355c1a50eefadc2ed000000000000000000000000f65d3a99a57fe29144b2b6496309397941e20dc10000000000000000000000000000000000000000000000000000000000000001

Deployed Bytecode

0x6080604052600436106100a75760003560e01c80637e85828a116100645780637e85828a1461017c578063843d4266146101cd578063bd689c53146101ed578063cec0dec51461020d578063d0d77eb91461022d578063f06c41ce1461025d57600080fd5b806306fdde03146100ac5780630920253f146100d75780631c07d6d3146100f95780632c4a15231461010c5780634793efb91461012c578063508af53a1461015c575b600080fd5b3480156100b857600080fd5b506100c161027d565b6040516100ce9190610831565b60405180910390f35b3480156100e357600080fd5b506100f76100f2366004610863565b61033a565b005b6100f76101073660046108d6565b6103aa565b34801561011857600080fd5b506100f7610127366004610997565b6104bd565b34801561013857600080fd5b5061014c610147366004610a2e565b610536565b6040516100ce9493929190610a8a565b34801561016857600080fd5b506100f7610177366004610ad8565b6105d6565b34801561018857600080fd5b506101bf610197366004610b04565b60009182526004602090815260408084206001600160a01b0393909316845291905290205490565b6040519081526020016100ce565b3480156101d957600080fd5b506100f76101e8366004610b42565b610624565b3480156101f957600080fd5b506100f7610208366004610b89565b610660565b34801561021957600080fd5b506100f7610228366004610bdf565b6106c4565b34801561023957600080fd5b5061024d610248366004610c0c565b610700565b6040516100ce9493929190610c4b565b34801561026957600080fd5b506100f7610278366004610c74565b610793565b600160005260086020527fad67d757c34507f157cacfa2e3153e9f260a2244f30428821be7be64587ac55f8054606091906102b790610cae565b80601f01602080910402602001604051908101604052809291908181526020018280546102e390610cae565b80156103305780601f1061030557610100808354040283529160200191610330565b820191906000526020600020905b81548152906001019060200180831161031357829003601f168201915b5050505050905090565b604051632feccd0560e01b81527310122320698e8d8a9e77fcaaa0c2f61c5e3467dd90632feccd05906103769060009086908690600401610d61565b60006040518083038186803b15801561038e57600080fd5b505af41580156103a2573d6000803e3d6000fd5b505050505050565b6040516356a2b38b60e01b8152600090738ac5096bbf5f8a60cbb50982d8890a69ce163150906356a2b38b906103ea908490889088908890600401610f49565b602060405180830381865af4158015610407573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061042b9190610fc8565b843560009081526001602052604090819020600501549192506001600160a01b039091169063cd279c7c903390849061046690890189610fe1565b6040518563ffffffff1660e01b81526004016104859493929190611028565b600060405180830381600087803b15801561049f57600080fd5b505af11580156104b3573d6000803e3d6000fd5b5050505050505050565b604051632a7f82cf60e01b81527310122320698e8d8a9e77fcaaa0c2f61c5e3467dd90632a7f82cf906104ff9060009089908990899089908990600401611050565b60006040518083038186803b15801561051757600080fd5b505af415801561052b573d6000803e3d6000fd5b505050505050505050565b6000806000606060007310122320698e8d8a9e77fcaaa0c2f61c5e3467dd63b7db3c9a90918a8a8a8a6040518663ffffffff1660e01b815260040161057f9594939291906110c5565b600060405180830381865af415801561059c573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526105c49190810190611128565b929b919a509850909650945050505050565b604051630e3c433d60e21b8152600060048201526001600160a01b0383166024820152604481018290527310122320698e8d8a9e77fcaaa0c2f61c5e3467dd906338f10cf490606401610376565b604051634093d91f60e01b8152738ac5096bbf5f8a60cbb50982d8890a69ce16315090634093d91f906103769060009086908690600401611206565b604051638952e39f60e01b81526000600482015260248101869052604481018590528315156064820152608481018390526001600160a01b03821660a4820152738ac5096bbf5f8a60cbb50982d8890a69ce16315090638952e39f9060c4016104ff565b604051631945682760e31b8152738ac5096bbf5f8a60cbb50982d8890a69ce1631509063ca2b4138906103769060009086908690600401611231565b60405163fc760e8760e01b81526000600482018190526024820183905290819081908190738ac5096bbf5f8a60cbb50982d8890a69ce1631509063fc760e8790604401608060405180830381865af4158015610760573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610784919061125f565b93509350935093509193509193565b604051632da9425160e21b8152738ac5096bbf5f8a60cbb50982d8890a69ce1631509063b6a50944906104ff90600090899089908990899089906004016112a8565b60005b838110156107f05781810151838201526020016107d8565b838111156107ff576000848401525b50505050565b6000815180845261081d8160208601602086016107d5565b601f01601f19169290920160200192915050565b6020815260006108446020830184610805565b9392505050565b60006080828403121561085d57600080fd5b50919050565b60008060a0838503121561087657600080fd5b610880848461084b565b9150608083013567ffffffffffffffff81111561089c57600080fd5b6108a88582860161084b565b9150509250929050565b600060a0828403121561085d57600080fd5b60006040828403121561085d57600080fd5b6000806000608084860312156108eb57600080fd5b833567ffffffffffffffff8082111561090357600080fd5b61090f878388016108b2565b945061091e87602088016108c4565b9350606086013591508082111561093457600080fd5b50610941868287016108c4565b9150509250925092565b60008083601f84011261095d57600080fd5b50813567ffffffffffffffff81111561097557600080fd5b6020830191508360208260051b850101111561099057600080fd5b9250929050565b6000806000806000606086880312156109af57600080fd5b85359450602086013567ffffffffffffffff808211156109ce57600080fd5b6109da89838a0161094b565b909650945060408801359150808211156109f357600080fd5b50610a008882890161094b565b969995985093965092949392505050565b60038110610a1e57600080fd5b50565b60028110610a1e57600080fd5b60008060008060808587031215610a4457600080fd5b8435610a4f81610a11565b93506020850135610a5f81610a21565b92506040850135610a6f81610a11565b91506060850135610a7f81610a21565b939692955090935050565b60018060a01b03851681528360208201528215156040820152608060608201526000610ab96080830184610805565b9695505050505050565b6001600160a01b0381168114610a1e57600080fd5b60008060408385031215610aeb57600080fd5b8235610af681610ac3565b946020939093013593505050565b60008060408385031215610b1757600080fd5b823591506020830135610b2981610ac3565b809150509250929050565b8015158114610a1e57600080fd5b60008060408385031215610b5557600080fd5b823567ffffffffffffffff811115610b6c57600080fd5b610b78858286016108b2565b9250506020830135610b2981610b34565b600080600080600060a08688031215610ba157600080fd5b85359450602086013593506040860135610bba81610b34565b9250606086013591506080860135610bd181610ac3565b809150509295509295909350565b60008060608385031215610bf257600080fd5b610bfc84846108c4565b91506040830135610b2981610b34565b600060208284031215610c1e57600080fd5b5035919050565b634e487b7160e01b600052602160045260246000fd5b60028110610a1e57610a1e610c25565b60808101610c5886610c3b565b9481526020810193909352901515604083015260609091015290565b600080600080600060a08688031215610c8c57600080fd5b8535610c9781610a21565b9450602086013593506040860135610bba81610b34565b600181811c90821680610cc257607f821691505b60208210810361085d57634e487b7160e01b600052602260045260246000fd5b60038110610a1e57610a1e610c25565b6000808335601e19843603018112610d0957600080fd5b830160208101925035905067ffffffffffffffff811115610d2957600080fd5b80360382131561099057600080fd5b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b83815260008335610d7181610a11565b610d7a81610ce2565b806020840152506020840135610d8f81610a21565b610d9881610c3b565b806040840152506040840135610dad81610a11565b610db681610ce2565b806060840152506060840135610dcb81610a21565b610dd481610c3b565b608083015260c060a08301528235610deb81610ac3565b6001600160a01b031660c0830152602083013560e08301526040830135610e1181610b34565b1515610100830152610e266060840184610cf2565b6080610120850152610e3d61014085018284610d38565b979650505050505050565b80358252602081013560208301526000610e656040830183610cf2565b60a06040860152610e7a60a086018284610d38565b9150506060830135610e8b81610ac3565b6001600160a01b0316606085015260808301356bffffffffffffffffffffffff8116808214610eb957600080fd5b608095909501949094529392505050565b6000808335601e19843603018112610ee157600080fd5b830160208101925035905067ffffffffffffffff811115610f0157600080fd5b8060051b360382131561099057600080fd5b81835260006001600160fb1b03831115610f2c57600080fd5b8260051b8083602087013760009401602001938452509192915050565b84815260a060208201526000610f6260a0830186610e48565b84356040840152602085013560608401528281036080840152610f858485610eca565b60408352610f97604084018284610f13565b915050610fa76020860186610eca565b8383036020850152610fba838284610f13565b9a9950505050505050505050565b600060208284031215610fda57600080fd5b5051919050565b6000808335601e19843603018112610ff857600080fd5b83018035915067ffffffffffffffff82111561101357600080fd5b60200191503681900382131561099057600080fd5b60018060a01b0385168152836020820152606060408201526000610ab9606083018486610d38565b86815260208082018790526080604083018190528201859052600090869060a08401835b888110156110a257833561108781610ac3565b6001600160a01b031682529282019290820190600101611074565b5084810360608601526110b6818789610f13565b9b9a5050505050505050505050565b85815260a081016110d586610ce2565b8560208301526110e485610c3b565b8460408301526110f384610ce2565b83606083015261110283610c3b565b8260808301529695505050505050565b634e487b7160e01b600052604160045260246000fd5b6000806000806080858703121561113e57600080fd5b845161114981610ac3565b60208601516040870151919550935061116181610b34565b606086015190925067ffffffffffffffff8082111561117f57600080fd5b818701915087601f83011261119357600080fd5b8151818111156111a5576111a5611112565b604051601f8201601f19908116603f011681019083821181831017156111cd576111cd611112565b816040528281528a60208487010111156111e657600080fd5b6111f78360208301602088016107d5565b979a9699509497505050505050565b83815260606020820152600061121f6060830185610e48565b90508215156040830152949350505050565b8381526080810161124f602083018580358252602090810135910152565b8215156060830152949350505050565b6000806000806080858703121561127557600080fd5b845161128081610a21565b60208601516040870151919550935061129881610b34565b6060959095015193969295505050565b86815260c081016112b887610c3b565b60208201969096526040810194909452911515606084015260808301526001600160a01b031660a09091015291905056fea2646970667358221220190dbef5e220e0f54cdcd8a4c45c82b8257cc3d0819af6a6cad56ee3667548bc64736f6c634300080e0033

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

0000000000000000000000002895949ff8391d3f07531ab355c1a50eefadc2ed000000000000000000000000f65d3a99a57fe29144b2b6496309397941e20dc10000000000000000000000000000000000000000000000000000000000000001

-----Decoded View---------------
Arg [0] : dao (address): 0x2895949fF8391D3f07531aB355c1a50EeFadc2ed
Arg [1] : feeWallet (address): 0xf65D3a99A57fE29144b2b6496309397941E20dc1
Arg [2] : chainId (uint256): 1

-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 0000000000000000000000002895949ff8391d3f07531ab355c1a50eefadc2ed
Arg [1] : 000000000000000000000000f65d3a99a57fe29144b2b6496309397941e20dc1
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000001


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.