ETH Price: $2,689.03 (-0.29%)
Gas: 0.77 Gwei

Contract

0xe67193CA18132E1cCB59Ee745B388CECCe37cC4C
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Create Vault Wit...216768192025-01-22 1:43:3526 days ago1737510215IN
0xe67193CA...CCe37cC4C
0 ETH0.0297451610.8892333
Create Vault216675342025-01-20 18:36:1127 days ago1737398171IN
0xe67193CA...CCe37cC4C
0 ETH0.0972927233.33968275
Create Vault214768372024-12-25 3:35:3554 days ago1735097735IN
0xe67193CA...CCe37cC4C
0.01479825 ETH0.013638084.41344434
Create Vault Wit...213830452024-12-12 1:08:4767 days ago1733965727IN
0xe67193CA...CCe37cC4C
0 ETH0.0257823914.41499845
Create Vault Wit...213830212024-12-12 1:03:5967 days ago1733965439IN
0xe67193CA...CCe37cC4C
0 ETH0.0286077415.84319125
Create Vault Wit...212757442024-11-27 1:15:4782 days ago1732670147IN
0xe67193CA...CCe37cC4C
0 ETH0.0308155210.79249429
Create Vault Wit...212616362024-11-25 1:58:2384 days ago1732499903IN
0xe67193CA...CCe37cC4C
0 ETH0.023510828.21969006
Create Vault212021842024-11-16 18:54:5992 days ago1731783299IN
0xe67193CA...CCe37cC4C
0 ETH0.0570187416.8703852
Create Vault211053902024-11-03 6:42:23106 days ago1730616143IN
0xe67193CA...CCe37cC4C
0.02097932 ETH0.014375954.649684
Create Vault Wit...210796612024-10-30 16:31:59109 days ago1730305919IN
0xe67193CA...CCe37cC4C
0.01924201 ETH0.063427221.29082011
Create Vault Wit...210796562024-10-30 16:30:59109 days ago1730305859IN
0xe67193CA...CCe37cC4C
0.01924201 ETH0.0487679119.22997724
Create Vault Wit...210796522024-10-30 16:30:11109 days ago1730305811IN
0xe67193CA...CCe37cC4C
0.01924201 ETH0.0600359720.1525559
Create Vault Wit...210796442024-10-30 16:28:23109 days ago1730305703IN
0xe67193CA...CCe37cC4C
0.01924201 ETH0.060815820.41432428
Create Vault Wit...210796352024-10-30 16:26:35109 days ago1730305595IN
0xe67193CA...CCe37cC4C
0.01924201 ETH0.0636271921.35795023
Create Vault Wit...210796262024-10-30 16:24:47109 days ago1730305487IN
0xe67193CA...CCe37cC4C
0.01924201 ETH0.0705829422.73005724
Create Vault Wit...210296052024-10-23 16:52:47116 days ago1729702367IN
0xe67193CA...CCe37cC4C
0.02054581 ETH0.0863867134.64764013
Create Vault Wit...210295922024-10-23 16:50:11116 days ago1729702211IN
0xe67193CA...CCe37cC4C
0.02054581 ETH0.0787375131.5797261
Create Vault Wit...210258712024-10-23 4:23:47117 days ago1729657427IN
0xe67193CA...CCe37cC4C
0.01970868 ETH0.02426628.34529182
Create Vault Wit...208785292024-10-02 14:51:47137 days ago1727880707IN
0xe67193CA...CCe37cC4C
0 ETH0.028911610.50753396
Create Vault Wit...208633002024-09-30 11:54:23139 days ago1727697263IN
0xe67193CA...CCe37cC4C
0 ETH0.018485357.35857802
Create Vault Wit...208632832024-09-30 11:50:59139 days ago1727697059IN
0xe67193CA...CCe37cC4C
0 ETH0.021426477.78716294
Create Vault208621942024-09-30 8:12:47140 days ago1727683967IN
0xe67193CA...CCe37cC4C
0.01951955 ETH0.023751327.57154423
Create Vault Wit...208379852024-09-26 23:10:11143 days ago1727392211IN
0xe67193CA...CCe37cC4C
0 ETH0.0491392518.0838521
Create Vault Wit...208304502024-09-25 21:57:47144 days ago1727301467IN
0xe67193CA...CCe37cC4C
0 ETH0.0410506914.16615998
Create Vault Wit...208301272024-09-25 20:53:11144 days ago1727297591IN
0xe67193CA...CCe37cC4C
0 ETH0.0684104938.24899041
View all transactions

Latest 25 internal transactions (View All)

Advanced mode:
Parent Transaction Hash Block
From
To
214768372024-12-25 3:35:3554 days ago1735097735
0xe67193CA...CCe37cC4C
0.01479825 ETH
211053902024-11-03 6:42:23106 days ago1730616143
0xe67193CA...CCe37cC4C
0.02097932 ETH
210796612024-10-30 16:31:59109 days ago1730305919
0xe67193CA...CCe37cC4C
0.01924201 ETH
210796562024-10-30 16:30:59109 days ago1730305859
0xe67193CA...CCe37cC4C
0.01924201 ETH
210796522024-10-30 16:30:11109 days ago1730305811
0xe67193CA...CCe37cC4C
0.01924201 ETH
210796442024-10-30 16:28:23109 days ago1730305703
0xe67193CA...CCe37cC4C
0.01924201 ETH
210796352024-10-30 16:26:35109 days ago1730305595
0xe67193CA...CCe37cC4C
0.01924201 ETH
210796262024-10-30 16:24:47109 days ago1730305487
0xe67193CA...CCe37cC4C
0.01924201 ETH
210296052024-10-23 16:52:47116 days ago1729702367
0xe67193CA...CCe37cC4C
0.02054581 ETH
210295922024-10-23 16:50:11116 days ago1729702211
0xe67193CA...CCe37cC4C
0.02054581 ETH
210258712024-10-23 4:23:47117 days ago1729657427
0xe67193CA...CCe37cC4C
0.01970868 ETH
208621942024-09-30 8:12:47140 days ago1727683967
0xe67193CA...CCe37cC4C
0.01951955 ETH
207631882024-09-16 12:30:35153 days ago1726489835
0xe67193CA...CCe37cC4C
0.02231787 ETH
207616102024-09-16 7:11:23154 days ago1726470683
0xe67193CA...CCe37cC4C
0.02246867 ETH
207568622024-09-15 15:18:11154 days ago1726413491
0xe67193CA...CCe37cC4C
0.02138926 ETH
207423452024-09-13 14:39:23156 days ago1726238363
0xe67193CA...CCe37cC4C
0.02185601 ETH
207419692024-09-13 13:23:35156 days ago1726233815
0xe67193CA...CCe37cC4C
0.02191736 ETH
207401952024-09-13 7:26:35157 days ago1726212395
0xe67193CA...CCe37cC4C
0.02201146 ETH
207401882024-09-13 7:25:11157 days ago1726212311
0xe67193CA...CCe37cC4C
0.02201146 ETH
207191452024-09-10 8:53:11159 days ago1725958391
0xe67193CA...CCe37cC4C
0.02179368 ETH
206475862024-08-31 9:14:11169 days ago1725095651
0xe67193CA...CCe37cC4C
0.02047702 ETH
205964952024-08-24 5:53:11177 days ago1724478791
0xe67193CA...CCe37cC4C
0.0187364 ETH
205748602024-08-21 5:19:23180 days ago1724217563
0xe67193CA...CCe37cC4C
0.01987741 ETH
205590512024-08-19 0:18:59182 days ago1724026739
0xe67193CA...CCe37cC4C
0.0196899 ETH
205512822024-08-17 22:19:23183 days ago1723933163
0xe67193CA...CCe37cC4C
0.01974692 ETH
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
VaultFactory

Compiler Version
v0.8.4+commit.c7e474f2

Optimization Enabled:
Yes with 800 runs

Other Settings:
istanbul EvmVersion, MIT license
File 1 of 19 : VaultFactory.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.4;

import { IVaultFactory } from "./interfaces/IVaultFactory.sol";
import { IVaultDeployer } from "./interfaces/IVaultDeployer.sol";
import { IPaymentModule } from "./interfaces/IPaymentModule.sol";
import { IVault } from "./interfaces/IVault.sol";
import { IVaultKey } from "../common/interfaces/IVaultKey.sol";
import { Whitelist } from "../common/utils/Whitelist.sol";

contract VaultFactory is Whitelist, IVaultFactory {
    address public constant burnAddress = 0x000000000000000000000000000000000000dEaD;

    enum VaultStatus {
        Inactive,
        Locked,
        Unlocked
    }
    mapping(uint256 => address) public vaultByKey;
    mapping(address => VaultStatus) public vaultStatus;

    address public override paymentModule;
    address public vaultDeployer;
    uint256 public maxTokensPerVault;

    uint256 public vaultUnlockedLastBlock;
    uint256 public vaultCreatedLastBlock;
    uint256 public vaultExtendedLastBlock;
    uint256 public vaultBurnedLastBlock;

    event MaxTokensUpdated(uint256 indexed oldMax, uint256 indexed newMax);
    event PaymentModuleUpdated(address indexed oldModule, address indexed newModule);
    event VaultDeployerUpdated(address indexed oldDeployer, address indexed newDeployer);
    event VaultUnlocked(uint256 previousBlock, address indexed vault, uint256 timestamp, bool isCompletelyUnlocked);

    event VaultCreated(
        uint256 previousBlock,
        address indexed vault,
        uint256 key,
        address benefactor,
        address indexed beneficiary,
        address indexed referrer,
        uint256 unlockTimestamp,
        FungibleTokenDeposit[] fungibleTokenDeposits,
        NonFungibleTokenDeposit[] nonFungibleTokenDeposits,
        MultiTokenDeposit[] multiTokenDeposits,
        bool isVesting
    );

    event TokensBurned(
        uint256 indexed previousBlock,
        address indexed benefactor,
        address indexed referrer,
        FungibleTokenDeposit[] fungibleTokenDeposits,
        NonFungibleTokenDeposit[] nonFungibleTokenDeposits,
        MultiTokenDeposit[] multiTokenDeposits
    );

    event VaultLockExtended(uint256 indexed previousBlock, address indexed vault, uint256 oldUnlockTimestamp, uint256 newUnlockTimestamp);

    constructor(address _paymentModule, uint256 maxTokens) {
        paymentModule = _paymentModule;
        maxTokensPerVault = maxTokens;
        _grantRole(DEFAULT_ADMIN_ROLE, msg.sender);
    }

    function setMaxTokensPerVault(uint256 newMax) external onlyRole(DEFAULT_ADMIN_ROLE) {
        uint256 oldMax = maxTokensPerVault;
        maxTokensPerVault = newMax;
        emit MaxTokensUpdated(oldMax, newMax);
    }

    function createVault(
        address referrer,
        address beneficiary,
        uint256 unlockTimestamp,
        FungibleTokenDeposit[] memory fungibleTokenDeposits,
        NonFungibleTokenDeposit[] memory nonFungibleTokenDeposits,
        MultiTokenDeposit[] memory multiTokenDeposits,
        bool isVesting
    ) external payable override onlyWhitelisted(msg.sender) {
        _createVault(referrer, beneficiary, unlockTimestamp, fungibleTokenDeposits, nonFungibleTokenDeposits, multiTokenDeposits, isVesting, true);
    }

    function createVaultWithoutKey(
        address referrer,
        address beneficiary,
        uint256 unlockTimestamp,
        FungibleTokenDeposit[] memory fungibleTokenDeposits,
        NonFungibleTokenDeposit[] memory nonFungibleTokenDeposits,
        MultiTokenDeposit[] memory multiTokenDeposits,
        bool isVesting
    ) external payable override onlyWhitelisted(msg.sender) {
        _createVault(referrer, beneficiary, unlockTimestamp, fungibleTokenDeposits, nonFungibleTokenDeposits, multiTokenDeposits, isVesting, false);
    }

    function _createVault(
        address referrer,
        address beneficiary,
        uint256 unlockTimestamp,
        FungibleTokenDeposit[] memory fungibleTokenDeposits,
        NonFungibleTokenDeposit[] memory nonFungibleTokenDeposits,
        MultiTokenDeposit[] memory multiTokenDeposits,
        bool isVesting,
        bool shouldMintKey
    ) private {
        require(unlockTimestamp >= block.timestamp, "VaultFactory:createVault:UNLOCK_IN_PAST");
        require(
            fungibleTokenDeposits.length > 0 || nonFungibleTokenDeposits.length > 0 || multiTokenDeposits.length > 0,
            "VaultFactory:createVault:NO_DEPOSITS"
        );
        require(
            fungibleTokenDeposits.length + nonFungibleTokenDeposits.length + multiTokenDeposits.length < maxTokensPerVault,
            "VaultFactory:createVault:MAX_DEPOSITS_EXCEEDED"
        );
        require(msg.sender != referrer, "VaultFactory:createVault:SELF_REFERRAL");
        require(beneficiary != referrer, "VaultFactory:createVault:REFERRER_IS_BENEFICIARY");
        for (uint256 i = 0; i < fungibleTokenDeposits.length; i++) {
            require(fungibleTokenDeposits[i].amount > 0, "VaultFactory:createVault:ZERO_DEPOSIT");
        }
        for (uint256 i = 0; i < multiTokenDeposits.length; i++) {
            require(multiTokenDeposits[i].amount > 0, "VaultFactory:createVault:ZERO_DEPOSIT");
        }

        // Early definition of vault address variable to allow usage by the
        // conditional branches of this function.
        address vault;

        if (isVesting) {
            require(nonFungibleTokenDeposits.length == 0 && multiTokenDeposits.length == 0, "VaultFactory:createVault:ONLY_FUNGIBLE_VESTING");
            vault = IVaultDeployer(vaultDeployer).createVestingVault(shouldMintKey, beneficiary, unlockTimestamp, abi.encode(fungibleTokenDeposits));
        } else {
            vault = IVaultDeployer(vaultDeployer).createBatchVault(
                shouldMintKey,
                beneficiary,
                unlockTimestamp,
                abi.encode(fungibleTokenDeposits),
                abi.encode(nonFungibleTokenDeposits),
                abi.encode(multiTokenDeposits)
            );
        }

        IPaymentModule(paymentModule).processPayment{ value: msg.value }(
            IPaymentModule.ProcessPaymentParams({
                vault: vault,
                user: msg.sender,
                referrer: referrer,
                fungibleTokenDeposits: fungibleTokenDeposits,
                nonFungibleTokenDeposits: nonFungibleTokenDeposits,
                multiTokenDeposits: multiTokenDeposits,
                isVesting: isVesting
            })
        );

        uint256 keyId = IVault(vault).vaultKeyId();
        if (keyId != 0) {
            vaultByKey[keyId] = vault;
        }
        vaultStatus[vault] = VaultStatus.Locked;

        emit VaultCreated(
            vaultCreatedLastBlock,
            vault,
            keyId,
            msg.sender,
            beneficiary,
            referrer,
            unlockTimestamp,
            fungibleTokenDeposits,
            nonFungibleTokenDeposits,
            multiTokenDeposits,
            isVesting
        );
        vaultCreatedLastBlock = block.number;
    }

    function burn(
        address referrer,
        FungibleTokenDeposit[] memory fungibleTokenDeposits,
        NonFungibleTokenDeposit[] memory nonFungibleTokenDeposits,
        MultiTokenDeposit[] memory multiTokenDeposits
    ) external payable override onlyWhitelisted(msg.sender) {
        require(
            fungibleTokenDeposits.length > 0 || nonFungibleTokenDeposits.length > 0 || multiTokenDeposits.length > 0,
            "VaultFactory:createVault:NO_DEPOSITS"
        );
        require(
            fungibleTokenDeposits.length + nonFungibleTokenDeposits.length + multiTokenDeposits.length < maxTokensPerVault,
            "VaultFactory:createVault:MAX_DEPOSITS_EXCEEDED"
        );
        require(msg.sender != referrer, "VaultFactory:createVault:SELF_REFERRAL");
        for (uint256 i = 0; i < fungibleTokenDeposits.length; i++) {
            require(fungibleTokenDeposits[i].amount > 0, "VaultFactory:createVault:ZERO_DEPOSIT");
        }
        for (uint256 i = 0; i < multiTokenDeposits.length; i++) {
            require(multiTokenDeposits[i].amount > 0, "VaultFactory:createVault:ZERO_DEPOSIT");
        }

        IPaymentModule(paymentModule).processPayment{ value: msg.value }(
            IPaymentModule.ProcessPaymentParams({
                vault: burnAddress,
                user: msg.sender,
                referrer: referrer,
                fungibleTokenDeposits: fungibleTokenDeposits,
                nonFungibleTokenDeposits: nonFungibleTokenDeposits,
                multiTokenDeposits: multiTokenDeposits,
                isVesting: false
            })
        );

        emit TokensBurned(vaultBurnedLastBlock, msg.sender, referrer, fungibleTokenDeposits, nonFungibleTokenDeposits, multiTokenDeposits);
        vaultBurnedLastBlock = block.number;
    }

    function notifyUnlock(bool isCompletelyUnlocked) external override {
        require(vaultStatus[msg.sender] == VaultStatus.Locked, "VaultFactory:notifyUnlock:ALREADY_FULL_UNLOCKED");

        if (isCompletelyUnlocked) {
            vaultStatus[msg.sender] = VaultStatus.Unlocked;
        }

        emit VaultUnlocked(vaultUnlockedLastBlock, msg.sender, block.timestamp, isCompletelyUnlocked);
        vaultUnlockedLastBlock = block.number;
    }

    function updatePaymentModule(address newModule) external onlyRole(DEFAULT_ADMIN_ROLE) {
        address oldModule = paymentModule;
        paymentModule = newModule;

        emit PaymentModuleUpdated(oldModule, newModule);
    }

    function updateVaultDeployer(address newDeployer) external onlyRole(DEFAULT_ADMIN_ROLE) {
        address oldDeployer = vaultDeployer;
        vaultDeployer = newDeployer;
        emit VaultDeployerUpdated(oldDeployer, newDeployer);
    }

    function lockExtended(uint256 oldUnlockTimestamp, uint256 newUnlockTimestamp) external override {
        require(vaultStatus[msg.sender] == VaultStatus.Locked, "VaultFactory:lockExtended:ALREADY_FULL_UNLOCKED");
        emit VaultLockExtended(vaultExtendedLastBlock, msg.sender, oldUnlockTimestamp, newUnlockTimestamp);
        vaultExtendedLastBlock = block.number;
    }
}

File 2 of 19 : AccessControl.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (access/AccessControl.sol)

pragma solidity ^0.8.0;

import "./IAccessControl.sol";
import "../utils/Context.sol";
import "../utils/Strings.sol";
import "../utils/introspection/ERC165.sol";

/**
 * @dev Contract module that allows children to implement role-based access
 * control mechanisms. This is a lightweight version that doesn't allow enumerating role
 * members except through off-chain means by accessing the contract event logs. Some
 * applications may benefit from on-chain enumerability, for those cases see
 * {AccessControlEnumerable}.
 *
 * Roles are referred to by their `bytes32` identifier. These should be exposed
 * in the external API and be unique. The best way to achieve this is by
 * using `public constant` hash digests:
 *
 * ```
 * bytes32 public constant MY_ROLE = keccak256("MY_ROLE");
 * ```
 *
 * Roles can be used to represent a set of permissions. To restrict access to a
 * function call, use {hasRole}:
 *
 * ```
 * function foo() public {
 *     require(hasRole(MY_ROLE, msg.sender));
 *     ...
 * }
 * ```
 *
 * Roles can be granted and revoked dynamically via the {grantRole} and
 * {revokeRole} functions. Each role has an associated admin role, and only
 * accounts that have a role's admin role can call {grantRole} and {revokeRole}.
 *
 * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means
 * that only accounts with this role will be able to grant or revoke other
 * roles. More complex role relationships can be created by using
 * {_setRoleAdmin}.
 *
 * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to
 * grant and revoke this role. Extra precautions should be taken to secure
 * accounts that have been granted it.
 */
abstract contract AccessControl is Context, IAccessControl, ERC165 {
    struct RoleData {
        mapping(address => bool) members;
        bytes32 adminRole;
    }

    mapping(bytes32 => RoleData) private _roles;

    bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;

    /**
     * @dev Modifier that checks that an account has a specific role. Reverts
     * with a standardized message including the required role.
     *
     * The format of the revert reason is given by the following regular expression:
     *
     *  /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/
     *
     * _Available since v4.1._
     */
    modifier onlyRole(bytes32 role) {
        _checkRole(role);
        _;
    }

    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
        return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId);
    }

    /**
     * @dev Returns `true` if `account` has been granted `role`.
     */
    function hasRole(bytes32 role, address account) public view virtual override returns (bool) {
        return _roles[role].members[account];
    }

    /**
     * @dev Revert with a standard message if `_msgSender()` is missing `role`.
     * Overriding this function changes the behavior of the {onlyRole} modifier.
     *
     * Format of the revert message is described in {_checkRole}.
     *
     * _Available since v4.6._
     */
    function _checkRole(bytes32 role) internal view virtual {
        _checkRole(role, _msgSender());
    }

    /**
     * @dev Revert with a standard message if `account` is missing `role`.
     *
     * The format of the revert reason is given by the following regular expression:
     *
     *  /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/
     */
    function _checkRole(bytes32 role, address account) internal view virtual {
        if (!hasRole(role, account)) {
            revert(
                string(
                    abi.encodePacked(
                        "AccessControl: account ",
                        Strings.toHexString(uint160(account), 20),
                        " is missing role ",
                        Strings.toHexString(uint256(role), 32)
                    )
                )
            );
        }
    }

    /**
     * @dev Returns the admin role that controls `role`. See {grantRole} and
     * {revokeRole}.
     *
     * To change a role's admin, use {_setRoleAdmin}.
     */
    function getRoleAdmin(bytes32 role) public view virtual override returns (bytes32) {
        return _roles[role].adminRole;
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     *
     * May emit a {RoleGranted} event.
     */
    function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {
        _grantRole(role, account);
    }

    /**
     * @dev Revokes `role` from `account`.
     *
     * If `account` had been granted `role`, emits a {RoleRevoked} event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     *
     * May emit a {RoleRevoked} event.
     */
    function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {
        _revokeRole(role, account);
    }

    /**
     * @dev Revokes `role` from the calling account.
     *
     * Roles are often managed via {grantRole} and {revokeRole}: this function's
     * purpose is to provide a mechanism for accounts to lose their privileges
     * if they are compromised (such as when a trusted device is misplaced).
     *
     * If the calling account had been revoked `role`, emits a {RoleRevoked}
     * event.
     *
     * Requirements:
     *
     * - the caller must be `account`.
     *
     * May emit a {RoleRevoked} event.
     */
    function renounceRole(bytes32 role, address account) public virtual override {
        require(account == _msgSender(), "AccessControl: can only renounce roles for self");

        _revokeRole(role, account);
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event. Note that unlike {grantRole}, this function doesn't perform any
     * checks on the calling account.
     *
     * May emit a {RoleGranted} event.
     *
     * [WARNING]
     * ====
     * This function should only be called from the constructor when setting
     * up the initial roles for the system.
     *
     * Using this function in any other way is effectively circumventing the admin
     * system imposed by {AccessControl}.
     * ====
     *
     * NOTE: This function is deprecated in favor of {_grantRole}.
     */
    function _setupRole(bytes32 role, address account) internal virtual {
        _grantRole(role, account);
    }

    /**
     * @dev Sets `adminRole` as ``role``'s admin role.
     *
     * Emits a {RoleAdminChanged} event.
     */
    function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {
        bytes32 previousAdminRole = getRoleAdmin(role);
        _roles[role].adminRole = adminRole;
        emit RoleAdminChanged(role, previousAdminRole, adminRole);
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * Internal function without access restriction.
     *
     * May emit a {RoleGranted} event.
     */
    function _grantRole(bytes32 role, address account) internal virtual {
        if (!hasRole(role, account)) {
            _roles[role].members[account] = true;
            emit RoleGranted(role, account, _msgSender());
        }
    }

    /**
     * @dev Revokes `role` from `account`.
     *
     * Internal function without access restriction.
     *
     * May emit a {RoleRevoked} event.
     */
    function _revokeRole(bytes32 role, address account) internal virtual {
        if (hasRole(role, account)) {
            _roles[role].members[account] = false;
            emit RoleRevoked(role, account, _msgSender());
        }
    }
}

File 3 of 19 : AccessControlEnumerable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (access/AccessControlEnumerable.sol)

pragma solidity ^0.8.0;

import "./IAccessControlEnumerable.sol";
import "./AccessControl.sol";
import "../utils/structs/EnumerableSet.sol";

/**
 * @dev Extension of {AccessControl} that allows enumerating the members of each role.
 */
abstract contract AccessControlEnumerable is IAccessControlEnumerable, AccessControl {
    using EnumerableSet for EnumerableSet.AddressSet;

    mapping(bytes32 => EnumerableSet.AddressSet) private _roleMembers;

    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
        return interfaceId == type(IAccessControlEnumerable).interfaceId || super.supportsInterface(interfaceId);
    }

    /**
     * @dev Returns one of the accounts that have `role`. `index` must be a
     * value between 0 and {getRoleMemberCount}, non-inclusive.
     *
     * Role bearers are not sorted in any particular way, and their ordering may
     * change at any point.
     *
     * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure
     * you perform all queries on the same block. See the following
     * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post]
     * for more information.
     */
    function getRoleMember(bytes32 role, uint256 index) public view virtual override returns (address) {
        return _roleMembers[role].at(index);
    }

    /**
     * @dev Returns the number of accounts that have `role`. Can be used
     * together with {getRoleMember} to enumerate all bearers of a role.
     */
    function getRoleMemberCount(bytes32 role) public view virtual override returns (uint256) {
        return _roleMembers[role].length();
    }

    /**
     * @dev Overload {_grantRole} to track enumerable memberships
     */
    function _grantRole(bytes32 role, address account) internal virtual override {
        super._grantRole(role, account);
        _roleMembers[role].add(account);
    }

    /**
     * @dev Overload {_revokeRole} to track enumerable memberships
     */
    function _revokeRole(bytes32 role, address account) internal virtual override {
        super._revokeRole(role, account);
        _roleMembers[role].remove(account);
    }
}

File 4 of 19 : IAccessControl.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol)

pragma solidity ^0.8.0;

/**
 * @dev External interface of AccessControl declared to support ERC165 detection.
 */
interface IAccessControl {
    /**
     * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`
     *
     * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite
     * {RoleAdminChanged} not being emitted signaling this.
     *
     * _Available since v3.1._
     */
    event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);

    /**
     * @dev Emitted when `account` is granted `role`.
     *
     * `sender` is the account that originated the contract call, an admin role
     * bearer except when using {AccessControl-_setupRole}.
     */
    event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);

    /**
     * @dev Emitted when `account` is revoked `role`.
     *
     * `sender` is the account that originated the contract call:
     *   - if using `revokeRole`, it is the admin role bearer
     *   - if using `renounceRole`, it is the role bearer (i.e. `account`)
     */
    event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);

    /**
     * @dev Returns `true` if `account` has been granted `role`.
     */
    function hasRole(bytes32 role, address account) external view returns (bool);

    /**
     * @dev Returns the admin role that controls `role`. See {grantRole} and
     * {revokeRole}.
     *
     * To change a role's admin, use {AccessControl-_setRoleAdmin}.
     */
    function getRoleAdmin(bytes32 role) external view returns (bytes32);

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function grantRole(bytes32 role, address account) external;

    /**
     * @dev Revokes `role` from `account`.
     *
     * If `account` had been granted `role`, emits a {RoleRevoked} event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function revokeRole(bytes32 role, address account) external;

    /**
     * @dev Revokes `role` from the calling account.
     *
     * Roles are often managed via {grantRole} and {revokeRole}: this function's
     * purpose is to provide a mechanism for accounts to lose their privileges
     * if they are compromised (such as when a trusted device is misplaced).
     *
     * If the calling account had been granted `role`, emits a {RoleRevoked}
     * event.
     *
     * Requirements:
     *
     * - the caller must be `account`.
     */
    function renounceRole(bytes32 role, address account) external;
}

File 5 of 19 : IAccessControlEnumerable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/IAccessControlEnumerable.sol)

pragma solidity ^0.8.0;

import "./IAccessControl.sol";

/**
 * @dev External interface of AccessControlEnumerable declared to support ERC165 detection.
 */
interface IAccessControlEnumerable is IAccessControl {
    /**
     * @dev Returns one of the accounts that have `role`. `index` must be a
     * value between 0 and {getRoleMemberCount}, non-inclusive.
     *
     * Role bearers are not sorted in any particular way, and their ordering may
     * change at any point.
     *
     * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure
     * you perform all queries on the same block. See the following
     * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post]
     * for more information.
     */
    function getRoleMember(bytes32 role, uint256 index) external view returns (address);

    /**
     * @dev Returns the number of accounts that have `role`. Can be used
     * together with {getRoleMember} to enumerate all bearers of a role.
     */
    function getRoleMemberCount(bytes32 role) external view returns (uint256);
}

File 6 of 19 : IERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC721/IERC721.sol)

pragma solidity ^0.8.0;

import "../../utils/introspection/IERC165.sol";

/**
 * @dev Required interface of an ERC721 compliant contract.
 */
interface IERC721 is IERC165 {
    /**
     * @dev Emitted when `tokenId` token is transferred from `from` to `to`.
     */
    event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);

    /**
     * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.
     */
    event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);

    /**
     * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.
     */
    event ApprovalForAll(address indexed owner, address indexed operator, bool approved);

    /**
     * @dev Returns the number of tokens in ``owner``'s account.
     */
    function balanceOf(address owner) external view returns (uint256 balance);

    /**
     * @dev Returns the owner of the `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function ownerOf(uint256 tokenId) external view returns (address owner);

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId,
        bytes calldata data
    ) external;

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients
     * are aware of the ERC721 protocol to prevent tokens from being forever locked.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or {setApprovalForAll}.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId
    ) external;

    /**
     * @dev Transfers `tokenId` token from `from` to `to`.
     *
     * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(
        address from,
        address to,
        uint256 tokenId
    ) external;

    /**
     * @dev Gives permission to `to` to transfer `tokenId` token to another account.
     * The approval is cleared when the token is transferred.
     *
     * Only a single account can be approved at a time, so approving the zero address clears previous approvals.
     *
     * Requirements:
     *
     * - The caller must own the token or be an approved operator.
     * - `tokenId` must exist.
     *
     * Emits an {Approval} event.
     */
    function approve(address to, uint256 tokenId) external;

    /**
     * @dev Approve or remove `operator` as an operator for the caller.
     * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.
     *
     * Requirements:
     *
     * - The `operator` cannot be the caller.
     *
     * Emits an {ApprovalForAll} event.
     */
    function setApprovalForAll(address operator, bool _approved) external;

    /**
     * @dev Returns the account approved for `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function getApproved(uint256 tokenId) external view returns (address operator);

    /**
     * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.
     *
     * See {setApprovalForAll}
     */
    function isApprovedForAll(address owner, address operator) external view returns (bool);
}

File 7 of 19 : IERC721Enumerable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC721/extensions/IERC721Enumerable.sol)

pragma solidity ^0.8.0;

import "../IERC721.sol";

/**
 * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension
 * @dev See https://eips.ethereum.org/EIPS/eip-721
 */
interface IERC721Enumerable is IERC721 {
    /**
     * @dev Returns the total amount of tokens stored by the contract.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns a token ID owned by `owner` at a given `index` of its token list.
     * Use along with {balanceOf} to enumerate all of ``owner``'s tokens.
     */
    function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256);

    /**
     * @dev Returns a token ID at a given `index` of all the tokens stored by the contract.
     * Use along with {totalSupply} to enumerate all tokens.
     */
    function tokenByIndex(uint256 index) external view returns (uint256);
}

File 8 of 19 : Context.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)

pragma solidity ^0.8.0;

/**
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
abstract contract Context {
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes calldata) {
        return msg.data;
    }
}

File 9 of 19 : Strings.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (utils/Strings.sol)

pragma solidity ^0.8.0;

/**
 * @dev String operations.
 */
library Strings {
    bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef";
    uint8 private constant _ADDRESS_LENGTH = 20;

    /**
     * @dev Converts a `uint256` to its ASCII `string` decimal representation.
     */
    function toString(uint256 value) internal pure returns (string memory) {
        // Inspired by OraclizeAPI's implementation - MIT licence
        // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol

        if (value == 0) {
            return "0";
        }
        uint256 temp = value;
        uint256 digits;
        while (temp != 0) {
            digits++;
            temp /= 10;
        }
        bytes memory buffer = new bytes(digits);
        while (value != 0) {
            digits -= 1;
            buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));
            value /= 10;
        }
        return string(buffer);
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
     */
    function toHexString(uint256 value) internal pure returns (string memory) {
        if (value == 0) {
            return "0x00";
        }
        uint256 temp = value;
        uint256 length = 0;
        while (temp != 0) {
            length++;
            temp >>= 8;
        }
        return toHexString(value, length);
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.
     */
    function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {
        bytes memory buffer = new bytes(2 * length + 2);
        buffer[0] = "0";
        buffer[1] = "x";
        for (uint256 i = 2 * length + 1; i > 1; --i) {
            buffer[i] = _HEX_SYMBOLS[value & 0xf];
            value >>= 4;
        }
        require(value == 0, "Strings: hex length insufficient");
        return string(buffer);
    }

    /**
     * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.
     */
    function toHexString(address addr) internal pure returns (string memory) {
        return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);
    }
}

File 10 of 19 : ERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)

pragma solidity ^0.8.0;

import "./IERC165.sol";

/**
 * @dev Implementation of the {IERC165} interface.
 *
 * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check
 * for the additional interface id that will be supported. For example:
 *
 * ```solidity
 * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
 *     return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);
 * }
 * ```
 *
 * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.
 */
abstract contract ERC165 is IERC165 {
    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
        return interfaceId == type(IERC165).interfaceId;
    }
}

File 11 of 19 : IERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC165 standard, as defined in the
 * https://eips.ethereum.org/EIPS/eip-165[EIP].
 *
 * Implementers can declare support of contract interfaces, which can then be
 * queried by others ({ERC165Checker}).
 *
 * For an implementation, see {ERC165}.
 */
interface IERC165 {
    /**
     * @dev Returns true if this contract implements the interface defined by
     * `interfaceId`. See the corresponding
     * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
     * to learn more about how these ids are created.
     *
     * This function call must use less than 30 000 gas.
     */
    function supportsInterface(bytes4 interfaceId) external view returns (bool);
}

File 12 of 19 : EnumerableSet.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (utils/structs/EnumerableSet.sol)

pragma solidity ^0.8.0;

/**
 * @dev Library for managing
 * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
 * types.
 *
 * Sets have the following properties:
 *
 * - Elements are added, removed, and checked for existence in constant time
 * (O(1)).
 * - Elements are enumerated in O(n). No guarantees are made on the ordering.
 *
 * ```
 * contract Example {
 *     // Add the library methods
 *     using EnumerableSet for EnumerableSet.AddressSet;
 *
 *     // Declare a set state variable
 *     EnumerableSet.AddressSet private mySet;
 * }
 * ```
 *
 * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)
 * and `uint256` (`UintSet`) are supported.
 *
 * [WARNING]
 * ====
 *  Trying to delete such a structure from storage will likely result in data corruption, rendering the structure unusable.
 *  See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.
 *
 *  In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an array of EnumerableSet.
 * ====
 */
library EnumerableSet {
    // To implement this library for multiple types with as little code
    // repetition as possible, we write it in terms of a generic Set type with
    // bytes32 values.
    // The Set implementation uses private functions, and user-facing
    // implementations (such as AddressSet) are just wrappers around the
    // underlying Set.
    // This means that we can only create new EnumerableSets for types that fit
    // in bytes32.

    struct Set {
        // Storage of set values
        bytes32[] _values;
        // Position of the value in the `values` array, plus 1 because index 0
        // means a value is not in the set.
        mapping(bytes32 => uint256) _indexes;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function _add(Set storage set, bytes32 value) private returns (bool) {
        if (!_contains(set, value)) {
            set._values.push(value);
            // The value is stored at length-1, but we add 1 to all indexes
            // and use 0 as a sentinel value
            set._indexes[value] = set._values.length;
            return true;
        } else {
            return false;
        }
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function _remove(Set storage set, bytes32 value) private returns (bool) {
        // We read and store the value's index to prevent multiple reads from the same storage slot
        uint256 valueIndex = set._indexes[value];

        if (valueIndex != 0) {
            // Equivalent to contains(set, value)
            // To delete an element from the _values array in O(1), we swap the element to delete with the last one in
            // the array, and then remove the last element (sometimes called as 'swap and pop').
            // This modifies the order of the array, as noted in {at}.

            uint256 toDeleteIndex = valueIndex - 1;
            uint256 lastIndex = set._values.length - 1;

            if (lastIndex != toDeleteIndex) {
                bytes32 lastValue = set._values[lastIndex];

                // Move the last value to the index where the value to delete is
                set._values[toDeleteIndex] = lastValue;
                // Update the index for the moved value
                set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex
            }

            // Delete the slot where the moved value was stored
            set._values.pop();

            // Delete the index for the deleted slot
            delete set._indexes[value];

            return true;
        } else {
            return false;
        }
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function _contains(Set storage set, bytes32 value) private view returns (bool) {
        return set._indexes[value] != 0;
    }

    /**
     * @dev Returns the number of values on the set. O(1).
     */
    function _length(Set storage set) private view returns (uint256) {
        return set._values.length;
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function _at(Set storage set, uint256 index) private view returns (bytes32) {
        return set._values[index];
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function _values(Set storage set) private view returns (bytes32[] memory) {
        return set._values;
    }

    // Bytes32Set

    struct Bytes32Set {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {
        return _add(set._inner, value);
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {
        return _remove(set._inner, value);
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {
        return _contains(set._inner, value);
    }

    /**
     * @dev Returns the number of values in the set. O(1).
     */
    function length(Bytes32Set storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {
        return _at(set._inner, index);
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {
        return _values(set._inner);
    }

    // AddressSet

    struct AddressSet {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(AddressSet storage set, address value) internal returns (bool) {
        return _add(set._inner, bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(AddressSet storage set, address value) internal returns (bool) {
        return _remove(set._inner, bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(AddressSet storage set, address value) internal view returns (bool) {
        return _contains(set._inner, bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Returns the number of values in the set. O(1).
     */
    function length(AddressSet storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function at(AddressSet storage set, uint256 index) internal view returns (address) {
        return address(uint160(uint256(_at(set._inner, index))));
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function values(AddressSet storage set) internal view returns (address[] memory) {
        bytes32[] memory store = _values(set._inner);
        address[] memory result;

        /// @solidity memory-safe-assembly
        assembly {
            result := store
        }

        return result;
    }

    // UintSet

    struct UintSet {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(UintSet storage set, uint256 value) internal returns (bool) {
        return _add(set._inner, bytes32(value));
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(UintSet storage set, uint256 value) internal returns (bool) {
        return _remove(set._inner, bytes32(value));
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(UintSet storage set, uint256 value) internal view returns (bool) {
        return _contains(set._inner, bytes32(value));
    }

    /**
     * @dev Returns the number of values on the set. O(1).
     */
    function length(UintSet storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function at(UintSet storage set, uint256 index) internal view returns (uint256) {
        return uint256(_at(set._inner, index));
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function values(UintSet storage set) internal view returns (uint256[] memory) {
        bytes32[] memory store = _values(set._inner);
        uint256[] memory result;

        /// @solidity memory-safe-assembly
        assembly {
            result := store
        }

        return result;
    }
}

File 13 of 19 : IVaultKey.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.4;

import { IERC721Enumerable } from "@openzeppelin/contracts/token/ERC721/extensions/IERC721Enumerable.sol";

interface IVaultKey is IERC721Enumerable {
    function mintKey(address to, address vault) external;

    function lastMintedKeyId(address to) external view returns (uint256);

    event VaultKeyMinted(uint256 previousBlock, address indexed to, uint256 indexed tokenId, address indexed vault);
    event VaultKeyTransfer(uint256 previousBlock, address from, address indexed to, uint256 indexed tokenId);
}

File 14 of 19 : Whitelist.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.4;

import { AccessControlEnumerable } from "@openzeppelin/contracts/access/AccessControlEnumerable.sol";

contract Whitelist is AccessControlEnumerable {
    bytes32 public constant WHITELIST_ADMIN_ROLE = keccak256("WHITELIST_ADMIN_ROLE");

    mapping(address => bool) public whitelist;

    bool public isWhitelistEnabled;

    event WhitelistedAdded(address indexed account);
    event WhitelistedRemoved(address indexed account);

    constructor() {
        isWhitelistEnabled = true;
        _grantRole(WHITELIST_ADMIN_ROLE, msg.sender);
    }

    function addWhitelisted(address account) external onlyRole(WHITELIST_ADMIN_ROLE) {
        whitelist[account] = true;
        emit WhitelistedAdded(account);
    }

    function removeWhitelisted(address account) external onlyRole(WHITELIST_ADMIN_ROLE) {
        whitelist[account] = false;
        emit WhitelistedRemoved(account);
    }

    function setWhitelistEnabled(bool enabled) external onlyRole(WHITELIST_ADMIN_ROLE) {
        isWhitelistEnabled = enabled;
    }

    modifier onlyWhitelisted(address account) {
        require(!isWhitelistEnabled || whitelist[account], "Whitelist: caller is not whitelisted");
        _;
    }
}

File 15 of 19 : IDepositHandler.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.4;

interface IDepositHandler {
    struct FungibleTokenDeposit {
        address tokenAddress;
        uint256 amount;
        bool isLP;
    }

    struct NonFungibleTokenDeposit {
        address tokenAddress;
        uint256 tokenId;
    }

    struct MultiTokenDeposit {
        address tokenAddress;
        uint256 tokenId;
        uint256 amount;
    }

    struct V3LPData {
        address tokenAddress;
        address token0;
        address token1;
        uint128 liquidityToRemove;
        uint24 fee;
    }
}

File 16 of 19 : IPaymentModule.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.4;

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

interface IPaymentModule is IDepositHandler {
    struct PaymentHolder {
        address tokenAddress;
        uint256 amount;
        uint256 payment;
    }

    struct ProcessPaymentParams {
        address vault;
        address user;
        address referrer;
        FungibleTokenDeposit[] fungibleTokenDeposits;
        NonFungibleTokenDeposit[] nonFungibleTokenDeposits;
        MultiTokenDeposit[] multiTokenDeposits;
        bool isVesting;
    }

    function processPayment(ProcessPaymentParams memory params) external payable;
}

File 17 of 19 : IVault.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.4;

interface IVault {
    function getBeneficiary() external view returns (address);

    function mintKey(uint256 keyId) external;

    function vaultKeyId() external view returns (uint256);
}

File 18 of 19 : IVaultDeployer.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.4;

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

interface IVaultDeployer is IDepositHandler {
    function createVestingVault(
        bool shouldMintKey,
        address beneficiary,
        uint256 unlockTimestamp,
        bytes memory fungibleTokenDeposits
    ) external returns (address);

    function createBatchVault(
        bool shouldMintKey,
        address beneficiary,
        uint256 unlockTimestamp,
        bytes memory fungibleTokenDeposits,
        bytes memory nonFungibleTokenDeposits,
        bytes memory multiTokenDeposits
    ) external returns (address);
}

File 19 of 19 : IVaultFactory.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.4;

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

interface IVaultFactory is IDepositHandler {
    function createVault(
        address referrer,
        address beneficiary,
        uint256 unlockTimestamp,
        IDepositHandler.FungibleTokenDeposit[] memory fungibleTokenDeposits,
        IDepositHandler.NonFungibleTokenDeposit[] memory nonFungibleTokenDeposits,
        IDepositHandler.MultiTokenDeposit[] memory multiTokenDeposits,
        bool isVesting
    ) external payable;

    function createVaultWithoutKey(
        address referrer,
        address beneficiary,
        uint256 unlockTimestamp,
        IDepositHandler.FungibleTokenDeposit[] memory fungibleTokenDeposits,
        IDepositHandler.NonFungibleTokenDeposit[] memory nonFungibleTokenDeposits,
        IDepositHandler.MultiTokenDeposit[] memory multiTokenDeposits,
        bool isVesting
    ) external payable;

    function burn(
        address referrer,
        IDepositHandler.FungibleTokenDeposit[] memory fungibleTokenDeposits,
        IDepositHandler.NonFungibleTokenDeposit[] memory nonFungibleTokenDeposits,
        IDepositHandler.MultiTokenDeposit[] memory multiTokenDeposits
    ) external payable;

    function notifyUnlock(bool isCompletelyUnlocked) external;

    function lockExtended(uint256 oldUnlockTimestamp, uint256 newUnlockTimestamp) external;

    function paymentModule() external view returns (address);
}

Settings
{
  "evmVersion": "istanbul",
  "libraries": {},
  "metadata": {
    "bytecodeHash": "none",
    "useLiteralContent": true
  },
  "optimizer": {
    "enabled": true,
    "runs": 800
  },
  "remappings": [],
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  }
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_paymentModule","type":"address"},{"internalType":"uint256","name":"maxTokens","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"oldMax","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"newMax","type":"uint256"}],"name":"MaxTokensUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"oldModule","type":"address"},{"indexed":true,"internalType":"address","name":"newModule","type":"address"}],"name":"PaymentModuleUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"previousBlock","type":"uint256"},{"indexed":true,"internalType":"address","name":"benefactor","type":"address"},{"indexed":true,"internalType":"address","name":"referrer","type":"address"},{"components":[{"internalType":"address","name":"tokenAddress","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bool","name":"isLP","type":"bool"}],"indexed":false,"internalType":"struct IDepositHandler.FungibleTokenDeposit[]","name":"fungibleTokenDeposits","type":"tuple[]"},{"components":[{"internalType":"address","name":"tokenAddress","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"indexed":false,"internalType":"struct IDepositHandler.NonFungibleTokenDeposit[]","name":"nonFungibleTokenDeposits","type":"tuple[]"},{"components":[{"internalType":"address","name":"tokenAddress","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"}],"indexed":false,"internalType":"struct IDepositHandler.MultiTokenDeposit[]","name":"multiTokenDeposits","type":"tuple[]"}],"name":"TokensBurned","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"previousBlock","type":"uint256"},{"indexed":true,"internalType":"address","name":"vault","type":"address"},{"indexed":false,"internalType":"uint256","name":"key","type":"uint256"},{"indexed":false,"internalType":"address","name":"benefactor","type":"address"},{"indexed":true,"internalType":"address","name":"beneficiary","type":"address"},{"indexed":true,"internalType":"address","name":"referrer","type":"address"},{"indexed":false,"internalType":"uint256","name":"unlockTimestamp","type":"uint256"},{"components":[{"internalType":"address","name":"tokenAddress","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bool","name":"isLP","type":"bool"}],"indexed":false,"internalType":"struct IDepositHandler.FungibleTokenDeposit[]","name":"fungibleTokenDeposits","type":"tuple[]"},{"components":[{"internalType":"address","name":"tokenAddress","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"indexed":false,"internalType":"struct IDepositHandler.NonFungibleTokenDeposit[]","name":"nonFungibleTokenDeposits","type":"tuple[]"},{"components":[{"internalType":"address","name":"tokenAddress","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"}],"indexed":false,"internalType":"struct IDepositHandler.MultiTokenDeposit[]","name":"multiTokenDeposits","type":"tuple[]"},{"indexed":false,"internalType":"bool","name":"isVesting","type":"bool"}],"name":"VaultCreated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"oldDeployer","type":"address"},{"indexed":true,"internalType":"address","name":"newDeployer","type":"address"}],"name":"VaultDeployerUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"previousBlock","type":"uint256"},{"indexed":true,"internalType":"address","name":"vault","type":"address"},{"indexed":false,"internalType":"uint256","name":"oldUnlockTimestamp","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newUnlockTimestamp","type":"uint256"}],"name":"VaultLockExtended","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"previousBlock","type":"uint256"},{"indexed":true,"internalType":"address","name":"vault","type":"address"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"},{"indexed":false,"internalType":"bool","name":"isCompletelyUnlocked","type":"bool"}],"name":"VaultUnlocked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"}],"name":"WhitelistedAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"}],"name":"WhitelistedRemoved","type":"event"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"WHITELIST_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"addWhitelisted","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"referrer","type":"address"},{"components":[{"internalType":"address","name":"tokenAddress","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bool","name":"isLP","type":"bool"}],"internalType":"struct IDepositHandler.FungibleTokenDeposit[]","name":"fungibleTokenDeposits","type":"tuple[]"},{"components":[{"internalType":"address","name":"tokenAddress","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"internalType":"struct IDepositHandler.NonFungibleTokenDeposit[]","name":"nonFungibleTokenDeposits","type":"tuple[]"},{"components":[{"internalType":"address","name":"tokenAddress","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"}],"internalType":"struct IDepositHandler.MultiTokenDeposit[]","name":"multiTokenDeposits","type":"tuple[]"}],"name":"burn","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"burnAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"referrer","type":"address"},{"internalType":"address","name":"beneficiary","type":"address"},{"internalType":"uint256","name":"unlockTimestamp","type":"uint256"},{"components":[{"internalType":"address","name":"tokenAddress","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bool","name":"isLP","type":"bool"}],"internalType":"struct IDepositHandler.FungibleTokenDeposit[]","name":"fungibleTokenDeposits","type":"tuple[]"},{"components":[{"internalType":"address","name":"tokenAddress","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"internalType":"struct IDepositHandler.NonFungibleTokenDeposit[]","name":"nonFungibleTokenDeposits","type":"tuple[]"},{"components":[{"internalType":"address","name":"tokenAddress","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"}],"internalType":"struct IDepositHandler.MultiTokenDeposit[]","name":"multiTokenDeposits","type":"tuple[]"},{"internalType":"bool","name":"isVesting","type":"bool"}],"name":"createVault","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"referrer","type":"address"},{"internalType":"address","name":"beneficiary","type":"address"},{"internalType":"uint256","name":"unlockTimestamp","type":"uint256"},{"components":[{"internalType":"address","name":"tokenAddress","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bool","name":"isLP","type":"bool"}],"internalType":"struct IDepositHandler.FungibleTokenDeposit[]","name":"fungibleTokenDeposits","type":"tuple[]"},{"components":[{"internalType":"address","name":"tokenAddress","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"internalType":"struct IDepositHandler.NonFungibleTokenDeposit[]","name":"nonFungibleTokenDeposits","type":"tuple[]"},{"components":[{"internalType":"address","name":"tokenAddress","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"}],"internalType":"struct IDepositHandler.MultiTokenDeposit[]","name":"multiTokenDeposits","type":"tuple[]"},{"internalType":"bool","name":"isVesting","type":"bool"}],"name":"createVaultWithoutKey","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"getRoleMember","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleMemberCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isWhitelistEnabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"oldUnlockTimestamp","type":"uint256"},{"internalType":"uint256","name":"newUnlockTimestamp","type":"uint256"}],"name":"lockExtended","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"maxTokensPerVault","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bool","name":"isCompletelyUnlocked","type":"bool"}],"name":"notifyUnlock","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paymentModule","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"removeWhitelisted","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newMax","type":"uint256"}],"name":"setMaxTokensPerVault","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"enabled","type":"bool"}],"name":"setWhitelistEnabled","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newModule","type":"address"}],"name":"updatePaymentModule","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newDeployer","type":"address"}],"name":"updateVaultDeployer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"vaultBurnedLastBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"vaultByKey","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"vaultCreatedLastBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"vaultDeployer","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"vaultExtendedLastBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"vaultStatus","outputs":[{"internalType":"enum VaultFactory.VaultStatus","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"vaultUnlockedLastBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"whitelist","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"}]

60806040523480156200001157600080fd5b5060405162002b1838038062002b188339810160408190526200003491620001f8565b6003805460ff191660011790556200006d7f28f5a99355973cc89255b8c4ac88405f27c78ded7608b040ee77a8bdf44d15e233620000a2565b600680546001600160a01b0319166001600160a01b03841617905560088190556200009a600033620000a2565b505062000232565b620000b98282620000e560201b620011401760201c565b6000828152600160209081526040909120620000e0918390620011de62000186821b17901c565b505050565b6000828152602081815260408083206001600160a01b038516845290915290205460ff1662000182576000828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055620001413390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45b5050565b60006200019d836001600160a01b038416620001a6565b90505b92915050565b6000818152600183016020526040812054620001ef57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155620001a0565b506000620001a0565b600080604083850312156200020b578182fd5b82516001600160a01b038116811462000222578283fd5b6020939093015192949293505050565b6128d680620002426000396000f3fe6080604052600436106101fe5760003560e01c806378546fa21161011d578063cf39440a116100b0578063d913484f1161007f578063e46d96a211610064578063e46d96a214610624578063ea01a0e814610644578063f4ddaef31461066457600080fd5b8063d913484f146105ee578063de1db43a1461060457600080fd5b8063cf39440a1461055b578063d0cf00541461057b578063d39f56de146105b8578063d547741f146105ce57600080fd5b80639b19251a116100ec5780639b19251a146104c0578063a217fddf146104f0578063b9f53fc314610505578063ca15c8731461053b57600080fd5b806378546fa2146104335780639010d07c14610449578063919ba2e71461046957806391d148541461047c57600080fd5b80632f2ff15d1161019557806354202c4e1161016457806354202c4e146103bd5780636183a98a146103f157806364e1d9a21461040757806370d5ae051461041d57600080fd5b80632f2ff15d1461033d57806330a1cc961461035d57806336568abe1461037d5780633cf57c611461039d57600080fd5b80631ace5699116101d15780631ace569914610294578063248a9ca3146102a7578063291d9549146102e55780632f17e0301461030557600080fd5b806301ffc9a714610203578063052d9e7e1461023857806310154bad1461025a578063184d69ab1461027a575b600080fd5b34801561020f57600080fd5b5061022361021e3660046122ec565b610677565b60405190151581526020015b60405180910390f35b34801561024457600080fd5b5061025861025336600461226a565b6106a2565b005b34801561026657600080fd5b506102586102753660046120d7565b6106e0565b34801561028657600080fd5b506003546102239060ff1681565b6102586102a236600461210f565b610757565b3480156102b357600080fd5b506102d76102c2366004612284565b60009081526020819052604090206001015490565b60405190815260200161022f565b3480156102f157600080fd5b506102586103003660046120d7565b6107fb565b34801561031157600080fd5b50600754610325906001600160a01b031681565b6040516001600160a01b03909116815260200161022f565b34801561034957600080fd5b5061025861035836600461229c565b61086f565b34801561036957600080fd5b50600654610325906001600160a01b031681565b34801561038957600080fd5b5061025861039836600461229c565b610899565b3480156103a957600080fd5b506102586103b8366004612284565b610925565b3480156103c957600080fd5b506102d77f28f5a99355973cc89255b8c4ac88405f27c78ded7608b040ee77a8bdf44d15e281565b3480156103fd57600080fd5b506102d7600a5481565b34801561041357600080fd5b506102d760095481565b34801561042957600080fd5b5061032561dead81565b34801561043f57600080fd5b506102d760085481565b34801561045557600080fd5b506103256104643660046122cb565b61096a565b6102586104773660046121d3565b610989565b34801561048857600080fd5b5061022361049736600461229c565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b3480156104cc57600080fd5b506102236104db3660046120d7565b60026020526000908152604090205460ff1681565b3480156104fc57600080fd5b506102d7600081565b34801561051157600080fd5b50610325610520366004612284565b6004602052600090815260409020546001600160a01b031681565b34801561054757600080fd5b506102d7610556366004612284565b610db2565b34801561056757600080fd5b506102586105763660046120d7565b610dc9565b34801561058757600080fd5b506105ab6105963660046120d7565b60056020526000908152604090205460ff1681565b60405161022f91906125d4565b3480156105c457600080fd5b506102d7600b5481565b3480156105da57600080fd5b506102586105e936600461229c565b610e34565b3480156105fa57600080fd5b506102d7600c5481565b34801561061057600080fd5b5061025861061f3660046120d7565b610e59565b34801561063057600080fd5b5061025861063f36600461226a565b610ec4565b34801561065057600080fd5b5061025861065f3660046122cb565b610fcb565b61025861067236600461210f565b6110ab565b60006001600160e01b03198216635a05180f60e01b148061069c575061069c826111f3565b92915050565b7f28f5a99355973cc89255b8c4ac88405f27c78ded7608b040ee77a8bdf44d15e26106cc81611228565b506003805460ff1916911515919091179055565b7f28f5a99355973cc89255b8c4ac88405f27c78ded7608b040ee77a8bdf44d15e261070a81611228565b6001600160a01b038216600081815260026020526040808220805460ff19166001179055517fee1504a83b6d4a361f4c1dc78ab59bfa30d6a3b6612c403e86bb01ef2984295f9190a25050565b600354339060ff16158061078357506001600160a01b03811660009081526002602052604090205460ff165b6107e05760405162461bcd60e51b8152602060048201526024808201527f57686974656c6973743a2063616c6c6572206973206e6f742077686974656c696044820152631cdd195960e21b60648201526084015b60405180910390fd5b6107f1888888888888886000611235565b5050505050505050565b7f28f5a99355973cc89255b8c4ac88405f27c78ded7608b040ee77a8bdf44d15e261082581611228565b6001600160a01b038216600081815260026020526040808220805460ff19169055517f270d9b30cf5b0793bbfd54c9d5b94aeb49462b8148399000265144a8722da6b69190a25050565b60008281526020819052604090206001015461088a81611228565b61089483836119f6565b505050565b6001600160a01b03811633146109175760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c66000000000000000000000000000000000060648201526084016107d7565b6109218282611a18565b5050565b600061093081611228565b6008805490839055604051839082907fed0b12faffd2cf512a39ed490e2449ef21e0fceb01dfbd1b163d455947cde7bb90600090a3505050565b60008281526001602052604081206109829083611a3a565b9392505050565b600354339060ff1615806109b557506001600160a01b03811660009081526002602052604090205460ff165b610a0d5760405162461bcd60e51b8152602060048201526024808201527f57686974656c6973743a2063616c6c6572206973206e6f742077686974656c696044820152631cdd195960e21b60648201526084016107d7565b600084511180610a1e575060008351115b80610a2a575060008251115b610a825760405162461bcd60e51b8152602060048201526024808201527f5661756c74466163746f72793a6372656174655661756c743a4e4f5f4445504f6044820152635349545360e01b60648201526084016107d7565b600854825184518651610a9591906127d8565b610a9f91906127d8565b10610b035760405162461bcd60e51b815260206004820152602e60248201527f5661756c74466163746f72793a6372656174655661756c743a4d41585f44455060448201526d13d4d25514d7d15610d15151115160921b60648201526084016107d7565b336001600160a01b0386161415610b6b5760405162461bcd60e51b815260206004820152602660248201527f5661756c74466163746f72793a6372656174655661756c743a53454c465f524560448201526511915494905360d21b60648201526084016107d7565b60005b8451811015610c12576000858281518110610b9957634e487b7160e01b600052603260045260246000fd5b60200260200101516020015111610c005760405162461bcd60e51b815260206004820152602560248201527f5661756c74466163746f72793a6372656174655661756c743a5a45524f5f44456044820152641413d4d25560da1b60648201526084016107d7565b80610c0a8161286d565b915050610b6e565b5060005b8251811015610cba576000838281518110610c4157634e487b7160e01b600052603260045260246000fd5b60200260200101516040015111610ca85760405162461bcd60e51b815260206004820152602560248201527f5661756c74466163746f72793a6372656174655661756c743a5a45524f5f44456044820152641413d4d25560da1b60648201526084016107d7565b80610cb28161286d565b915050610c16565b506006546040805160e08101825261dead81523360208201526001600160a01b0388811682840152606082018890526080820187905260a08201869052600060c0830152915163967737c960e01b8152919092169163967737c9913491610d239160040161260f565b6000604051808303818588803b158015610d3c57600080fd5b505af1158015610d50573d6000803e3d6000fd5b5050505050846001600160a01b0316336001600160a01b0316600c547fef46f8b2c97944bff8580793ccae0a22b61472c761e02493a20f860d6d462b1d878787604051610d9f939291906124d8565b60405180910390a4505043600c55505050565b600081815260016020526040812061069c90611a46565b6000610dd481611228565b600780546001600160a01b0384811673ffffffffffffffffffffffffffffffffffffffff19831681179093556040519116919082907f59ad64a1ab3be29ccfaed6ba5087596b0eb2f48f8cad53582715c8be48cbacb590600090a3505050565b600082815260208190526040902060010154610e4f81611228565b6108948383611a18565b6000610e6481611228565b600680546001600160a01b0384811673ffffffffffffffffffffffffffffffffffffffff19831681179093556040519116919082907fb9cd00730add6e591032c866c4356d07d8e8a417427b3898f6b2a3f451c13b9d90600090a3505050565b60013360009081526005602052604090205460ff166002811115610ef857634e487b7160e01b600052602160045260246000fd5b14610f5d5760405162461bcd60e51b815260206004820152602f60248201527f5661756c74466163746f72793a6e6f74696679556e6c6f636b3a414c5245414460448201526e1657d195531317d5539313d0d2d151608a1b60648201526084016107d7565b8015610f7e57336000908152600560205260409020805460ff191660021790555b600954604080519182524260208301528215159082015233907f7301e817558ac55a934632b4d6881c5e77e3eca6bc45e38106297b3f6846f8f09060600160405180910390a25043600955565b60013360009081526005602052604090205460ff166002811115610fff57634e487b7160e01b600052602160045260246000fd5b146110645760405162461bcd60e51b815260206004820152602f60248201527f5661756c74466163746f72793a6c6f636b457874656e6465643a414c5245414460448201526e1657d195531317d5539313d0d2d151608a1b60648201526084016107d7565b600b5460408051848152602081018490523392917f5d496a622973c74cc5df343adb5c6b3acc8e4e3d3a0a39b031be7dde2e40e60d910160405180910390a3505043600b55565b600354339060ff1615806110d757506001600160a01b03811660009081526002602052604090205460ff165b61112f5760405162461bcd60e51b8152602060048201526024808201527f57686974656c6973743a2063616c6c6572206973206e6f742077686974656c696044820152631cdd195960e21b60648201526084016107d7565b6107f1888888888888886001611235565b6000828152602081815260408083206001600160a01b038516845290915290205460ff16610921576000828152602081815260408083206001600160a01b03851684529091529020805460ff1916600117905561119a3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000610982836001600160a01b038416611a50565b60006001600160e01b03198216637965db0b60e01b148061069c57506301ffc9a760e01b6001600160e01b031983161461069c565b6112328133611a9f565b50565b428610156112ab5760405162461bcd60e51b815260206004820152602760248201527f5661756c74466163746f72793a6372656174655661756c743a554e4c4f434b5f60448201527f494e5f504153540000000000000000000000000000000000000000000000000060648201526084016107d7565b6000855111806112bc575060008451115b806112c8575060008351115b6113205760405162461bcd60e51b8152602060048201526024808201527f5661756c74466163746f72793a6372656174655661756c743a4e4f5f4445504f6044820152635349545360e01b60648201526084016107d7565b60085483518551875161133391906127d8565b61133d91906127d8565b106113a15760405162461bcd60e51b815260206004820152602e60248201527f5661756c74466163746f72793a6372656174655661756c743a4d41585f44455060448201526d13d4d25514d7d15610d15151115160921b60648201526084016107d7565b336001600160a01b03891614156114095760405162461bcd60e51b815260206004820152602660248201527f5661756c74466163746f72793a6372656174655661756c743a53454c465f524560448201526511915494905360d21b60648201526084016107d7565b876001600160a01b0316876001600160a01b031614156114915760405162461bcd60e51b815260206004820152603060248201527f5661756c74466163746f72793a6372656174655661756c743a5245464552524560448201527f525f49535f42454e45464943494152590000000000000000000000000000000060648201526084016107d7565b60005b85518110156115385760008682815181106114bf57634e487b7160e01b600052603260045260246000fd5b602002602001015160200151116115265760405162461bcd60e51b815260206004820152602560248201527f5661756c74466163746f72793a6372656174655661756c743a5a45524f5f44456044820152641413d4d25560da1b60648201526084016107d7565b806115308161286d565b915050611494565b5060005b83518110156115e057600084828151811061156757634e487b7160e01b600052603260045260246000fd5b602002602001015160400151116115ce5760405162461bcd60e51b815260206004820152602560248201527f5661756c74466163746f72793a6372656174655661756c743a5a45524f5f44456044820152641413d4d25560da1b60648201526084016107d7565b806115d88161286d565b91505061153c565b506000821561171c5784511580156115f757508351155b6116695760405162461bcd60e51b815260206004820152602e60248201527f5661756c74466163746f72793a6372656174655661756c743a4f4e4c595f465560448201527f4e4749424c455f56455354494e4700000000000000000000000000000000000060648201526084016107d7565b6007546040516001600160a01b039091169063f509ebfc9084908b908b90611695908c906020016124c5565b6040516020818303038152906040526040518563ffffffff1660e01b81526004016116c39493929190612541565b602060405180830381600087803b1580156116dd57600080fd5b505af11580156116f1573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061171591906120f3565b905061180d565b6007546040516001600160a01b039091169063e5de32659084908b908b90611748908c906020016124c5565b6040516020818303038152906040528a604051602001611768919061252e565b6040516020818303038152906040528a604051602001611788919061251b565b6040516020818303038152906040526040518763ffffffff1660e01b81526004016117b896959493929190612571565b602060405180830381600087803b1580156117d257600080fd5b505af11580156117e6573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061180a91906120f3565b90505b6006546040805160e0810182526001600160a01b0384811682523360208301528c811682840152606082018a90526080820189905260a0820188905286151560c0830152915163967737c960e01b8152919092169163967737c99134916118769160040161260f565b6000604051808303818588803b15801561188f57600080fd5b505af11580156118a3573d6000803e3d6000fd5b50505050506000816001600160a01b031663e4dfeac06040518163ffffffff1660e01b815260040160206040518083038186803b1580156118e357600080fd5b505afa1580156118f7573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061191b9190612314565b90508015611958576000818152600460205260409020805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0384161790555b6001600160a01b038216600090815260056020526040902080546001919060ff191682800217905550896001600160a01b0316896001600160a01b0316836001600160a01b03167f7a89dae678345f4c1e6fc361a48ecddf1290fe10bbb57d27012a394a57fd3303600a5485338e8e8e8e8e6040516119de9897969594939291906126c2565b60405180910390a4505043600a555050505050505050565b611a008282611140565b600082815260016020526040902061089490826111de565b611a228282611b1d565b60008281526001602052604090206108949082611b9c565b60006109828383611bb1565b600061069c825490565b6000818152600183016020526040812054611a975750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915561069c565b50600061069c565b6000828152602081815260408083206001600160a01b038516845290915290205460ff1661092157611adb816001600160a01b03166014611be9565b611ae6836020611be9565b604051602001611af7929190612444565b60408051601f198184030181529082905262461bcd60e51b82526107d7916004016125fc565b6000828152602081815260408083206001600160a01b038516845290915290205460ff1615610921576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6000610982836001600160a01b038416611dd8565b6000826000018281548110611bd657634e487b7160e01b600052603260045260246000fd5b9060005260206000200154905092915050565b60606000611bf88360026127f0565b611c039060026127d8565b67ffffffffffffffff811115611c2957634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015611c53576020820181803683370190505b509050600360fc1b81600081518110611c7c57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110611cb957634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a9053506000611cdd8460026127f0565b611ce89060016127d8565b90505b6001811115611d89577f303132333435363738396162636465660000000000000000000000000000000085600f1660108110611d3757634e487b7160e01b600052603260045260246000fd5b1a60f81b828281518110611d5b57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a90535060049490941c93611d8281612856565b9050611ceb565b5083156109825760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016107d7565b60008181526001830160205260408120548015611eeb576000611dfc60018361280f565b8554909150600090611e109060019061280f565b9050818114611e91576000866000018281548110611e3e57634e487b7160e01b600052603260045260246000fd5b9060005260206000200154905080876000018481548110611e6f57634e487b7160e01b600052603260045260246000fd5b6000918252602080832090910192909255918252600188019052604090208390555b8554869080611eb057634e487b7160e01b600052603160045260246000fd5b60019003818190600052602060002001600090559055856001016000868152602001908152602001600020600090556001935050505061069c565b600091505061069c565b600082601f830112611f05578081fd5b81356020611f1a611f15836127b4565b612783565b82815281810190858301606080860288018501891015611f38578687fd5b865b86811015611f905781838b031215611f50578788fd5b611f58612737565b8335611f63816128b4565b815283870135878201526040611f7a8186016120c2565b9082015285529385019391810191600101611f3a565b509198975050505050505050565b600082601f830112611fae578081fd5b81356020611fbe611f15836127b4565b82815281810190858301606080860288018501891015611fdc578687fd5b865b86811015611f905781838b031215611ff4578788fd5b611ffc612737565b8335612007816128b4565b815283870135878201526040808501359082015285529385019391810191600101611fde565b600082601f83011261203d578081fd5b8135602061204d611f15836127b4565b80838252828201915082860187848660061b890101111561206c578586fd5b855b858110156120b557604080838b031215612086578788fd5b61208e612760565b8335612099816128b4565b815283870135878201528552938501939091019060010161206e565b5090979650505050505050565b803580151581146120d257600080fd5b919050565b6000602082840312156120e8578081fd5b8135610982816128b4565b600060208284031215612104578081fd5b8151610982816128b4565b600080600080600080600060e0888a031215612129578283fd5b8735612134816128b4565b96506020880135612144816128b4565b955060408801359450606088013567ffffffffffffffff80821115612167578485fd5b6121738b838c01611ef5565b955060808a0135915080821115612188578485fd5b6121948b838c0161202d565b945060a08a01359150808211156121a9578384fd5b506121b68a828b01611f9e565b9250506121c560c089016120c2565b905092959891949750929550565b600080600080608085870312156121e8578384fd5b84356121f3816128b4565b9350602085013567ffffffffffffffff8082111561220f578485fd5b61221b88838901611ef5565b94506040870135915080821115612230578384fd5b61223c8883890161202d565b93506060870135915080821115612251578283fd5b5061225e87828801611f9e565b91505092959194509250565b60006020828403121561227b578081fd5b610982826120c2565b600060208284031215612295578081fd5b5035919050565b600080604083850312156122ae578182fd5b8235915060208301356122c0816128b4565b809150509250929050565b600080604083850312156122dd578182fd5b50508035926020909101359150565b6000602082840312156122fd578081fd5b81356001600160e01b031981168114610982578182fd5b600060208284031215612325578081fd5b5051919050565b6000815180845260208085019450808401835b8381101561237c57815180516001600160a01b0316885283810151848901526040908101511515908801526060909601959082019060010161233f565b509495945050505050565b6000815180845260208085019450808401835b8381101561237c57815180516001600160a01b031688528381015184890152604090810151908801526060909601959082019060010161239a565b6000815180845260208085019450808401835b8381101561237c57815180516001600160a01b0316885283015183880152604090960195908201906001016123e8565b60008151808452612430816020860160208601612826565b601f01601f19169290920160200192915050565b7f416363657373436f6e74726f6c3a206163636f756e742000000000000000000081526000835161247c816017850160208801612826565b7f206973206d697373696e6720726f6c652000000000000000000000000000000060179184019182015283516124b9816028840160208801612826565b01602801949350505050565b602081526000610982602083018461232c565b6060815260006124eb606083018661232c565b82810360208401526124fd81866123d5565b905082810360408401526125118185612387565b9695505050505050565b6020815260006109826020830184612387565b60208152600061098260208301846123d5565b84151581526001600160a01b03841660208201528260408201526080606082015260006125116080830184612418565b86151581526001600160a01b038616602082015284604082015260c0606082015260006125a160c0830186612418565b82810360808401526125b38186612418565b905082810360a08401526125c78185612418565b9998505050505050505050565b60208101600383106125f657634e487b7160e01b600052602160045260246000fd5b91905290565b6020815260006109826020830184612418565b6020815260006001600160a01b0380845116602084015280602085015116604084015250604083015161264d60608401826001600160a01b03169052565b50606083015160e0608084015261266861010084018261232c565b90506080840151601f19808584030160a086015261268683836123d5565b925060a08601519150808584030160c0860152506126a48282612387565b91505060c08401516126ba60e085018215159052565b509392505050565b60006101008a83528960208401526001600160a01b03891660408401528760608401528060808401526126f78184018861232c565b905082810360a084015261270b81876123d5565b905082810360c084015261271f8186612387565b91505082151560e08301529998505050505050505050565b6040516060810167ffffffffffffffff8111828210171561275a5761275a61289e565b60405290565b6040805190810167ffffffffffffffff8111828210171561275a5761275a61289e565b604051601f8201601f1916810167ffffffffffffffff811182821017156127ac576127ac61289e565b604052919050565b600067ffffffffffffffff8211156127ce576127ce61289e565b5060051b60200190565b600082198211156127eb576127eb612888565b500190565b600081600019048311821515161561280a5761280a612888565b500290565b60008282101561282157612821612888565b500390565b60005b83811015612841578181015183820152602001612829565b83811115612850576000848401525b50505050565b60008161286557612865612888565b506000190190565b600060001982141561288157612881612888565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b038116811461123257600080fdfea164736f6c6343000804000a00000000000000000000000028dc7cea1a442bddbce26ca641b5d60f0a003efd0000000000000000000000000000000000000000000000000000000000000064

Deployed Bytecode

0x6080604052600436106101fe5760003560e01c806378546fa21161011d578063cf39440a116100b0578063d913484f1161007f578063e46d96a211610064578063e46d96a214610624578063ea01a0e814610644578063f4ddaef31461066457600080fd5b8063d913484f146105ee578063de1db43a1461060457600080fd5b8063cf39440a1461055b578063d0cf00541461057b578063d39f56de146105b8578063d547741f146105ce57600080fd5b80639b19251a116100ec5780639b19251a146104c0578063a217fddf146104f0578063b9f53fc314610505578063ca15c8731461053b57600080fd5b806378546fa2146104335780639010d07c14610449578063919ba2e71461046957806391d148541461047c57600080fd5b80632f2ff15d1161019557806354202c4e1161016457806354202c4e146103bd5780636183a98a146103f157806364e1d9a21461040757806370d5ae051461041d57600080fd5b80632f2ff15d1461033d57806330a1cc961461035d57806336568abe1461037d5780633cf57c611461039d57600080fd5b80631ace5699116101d15780631ace569914610294578063248a9ca3146102a7578063291d9549146102e55780632f17e0301461030557600080fd5b806301ffc9a714610203578063052d9e7e1461023857806310154bad1461025a578063184d69ab1461027a575b600080fd5b34801561020f57600080fd5b5061022361021e3660046122ec565b610677565b60405190151581526020015b60405180910390f35b34801561024457600080fd5b5061025861025336600461226a565b6106a2565b005b34801561026657600080fd5b506102586102753660046120d7565b6106e0565b34801561028657600080fd5b506003546102239060ff1681565b6102586102a236600461210f565b610757565b3480156102b357600080fd5b506102d76102c2366004612284565b60009081526020819052604090206001015490565b60405190815260200161022f565b3480156102f157600080fd5b506102586103003660046120d7565b6107fb565b34801561031157600080fd5b50600754610325906001600160a01b031681565b6040516001600160a01b03909116815260200161022f565b34801561034957600080fd5b5061025861035836600461229c565b61086f565b34801561036957600080fd5b50600654610325906001600160a01b031681565b34801561038957600080fd5b5061025861039836600461229c565b610899565b3480156103a957600080fd5b506102586103b8366004612284565b610925565b3480156103c957600080fd5b506102d77f28f5a99355973cc89255b8c4ac88405f27c78ded7608b040ee77a8bdf44d15e281565b3480156103fd57600080fd5b506102d7600a5481565b34801561041357600080fd5b506102d760095481565b34801561042957600080fd5b5061032561dead81565b34801561043f57600080fd5b506102d760085481565b34801561045557600080fd5b506103256104643660046122cb565b61096a565b6102586104773660046121d3565b610989565b34801561048857600080fd5b5061022361049736600461229c565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b3480156104cc57600080fd5b506102236104db3660046120d7565b60026020526000908152604090205460ff1681565b3480156104fc57600080fd5b506102d7600081565b34801561051157600080fd5b50610325610520366004612284565b6004602052600090815260409020546001600160a01b031681565b34801561054757600080fd5b506102d7610556366004612284565b610db2565b34801561056757600080fd5b506102586105763660046120d7565b610dc9565b34801561058757600080fd5b506105ab6105963660046120d7565b60056020526000908152604090205460ff1681565b60405161022f91906125d4565b3480156105c457600080fd5b506102d7600b5481565b3480156105da57600080fd5b506102586105e936600461229c565b610e34565b3480156105fa57600080fd5b506102d7600c5481565b34801561061057600080fd5b5061025861061f3660046120d7565b610e59565b34801561063057600080fd5b5061025861063f36600461226a565b610ec4565b34801561065057600080fd5b5061025861065f3660046122cb565b610fcb565b61025861067236600461210f565b6110ab565b60006001600160e01b03198216635a05180f60e01b148061069c575061069c826111f3565b92915050565b7f28f5a99355973cc89255b8c4ac88405f27c78ded7608b040ee77a8bdf44d15e26106cc81611228565b506003805460ff1916911515919091179055565b7f28f5a99355973cc89255b8c4ac88405f27c78ded7608b040ee77a8bdf44d15e261070a81611228565b6001600160a01b038216600081815260026020526040808220805460ff19166001179055517fee1504a83b6d4a361f4c1dc78ab59bfa30d6a3b6612c403e86bb01ef2984295f9190a25050565b600354339060ff16158061078357506001600160a01b03811660009081526002602052604090205460ff165b6107e05760405162461bcd60e51b8152602060048201526024808201527f57686974656c6973743a2063616c6c6572206973206e6f742077686974656c696044820152631cdd195960e21b60648201526084015b60405180910390fd5b6107f1888888888888886000611235565b5050505050505050565b7f28f5a99355973cc89255b8c4ac88405f27c78ded7608b040ee77a8bdf44d15e261082581611228565b6001600160a01b038216600081815260026020526040808220805460ff19169055517f270d9b30cf5b0793bbfd54c9d5b94aeb49462b8148399000265144a8722da6b69190a25050565b60008281526020819052604090206001015461088a81611228565b61089483836119f6565b505050565b6001600160a01b03811633146109175760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c66000000000000000000000000000000000060648201526084016107d7565b6109218282611a18565b5050565b600061093081611228565b6008805490839055604051839082907fed0b12faffd2cf512a39ed490e2449ef21e0fceb01dfbd1b163d455947cde7bb90600090a3505050565b60008281526001602052604081206109829083611a3a565b9392505050565b600354339060ff1615806109b557506001600160a01b03811660009081526002602052604090205460ff165b610a0d5760405162461bcd60e51b8152602060048201526024808201527f57686974656c6973743a2063616c6c6572206973206e6f742077686974656c696044820152631cdd195960e21b60648201526084016107d7565b600084511180610a1e575060008351115b80610a2a575060008251115b610a825760405162461bcd60e51b8152602060048201526024808201527f5661756c74466163746f72793a6372656174655661756c743a4e4f5f4445504f6044820152635349545360e01b60648201526084016107d7565b600854825184518651610a9591906127d8565b610a9f91906127d8565b10610b035760405162461bcd60e51b815260206004820152602e60248201527f5661756c74466163746f72793a6372656174655661756c743a4d41585f44455060448201526d13d4d25514d7d15610d15151115160921b60648201526084016107d7565b336001600160a01b0386161415610b6b5760405162461bcd60e51b815260206004820152602660248201527f5661756c74466163746f72793a6372656174655661756c743a53454c465f524560448201526511915494905360d21b60648201526084016107d7565b60005b8451811015610c12576000858281518110610b9957634e487b7160e01b600052603260045260246000fd5b60200260200101516020015111610c005760405162461bcd60e51b815260206004820152602560248201527f5661756c74466163746f72793a6372656174655661756c743a5a45524f5f44456044820152641413d4d25560da1b60648201526084016107d7565b80610c0a8161286d565b915050610b6e565b5060005b8251811015610cba576000838281518110610c4157634e487b7160e01b600052603260045260246000fd5b60200260200101516040015111610ca85760405162461bcd60e51b815260206004820152602560248201527f5661756c74466163746f72793a6372656174655661756c743a5a45524f5f44456044820152641413d4d25560da1b60648201526084016107d7565b80610cb28161286d565b915050610c16565b506006546040805160e08101825261dead81523360208201526001600160a01b0388811682840152606082018890526080820187905260a08201869052600060c0830152915163967737c960e01b8152919092169163967737c9913491610d239160040161260f565b6000604051808303818588803b158015610d3c57600080fd5b505af1158015610d50573d6000803e3d6000fd5b5050505050846001600160a01b0316336001600160a01b0316600c547fef46f8b2c97944bff8580793ccae0a22b61472c761e02493a20f860d6d462b1d878787604051610d9f939291906124d8565b60405180910390a4505043600c55505050565b600081815260016020526040812061069c90611a46565b6000610dd481611228565b600780546001600160a01b0384811673ffffffffffffffffffffffffffffffffffffffff19831681179093556040519116919082907f59ad64a1ab3be29ccfaed6ba5087596b0eb2f48f8cad53582715c8be48cbacb590600090a3505050565b600082815260208190526040902060010154610e4f81611228565b6108948383611a18565b6000610e6481611228565b600680546001600160a01b0384811673ffffffffffffffffffffffffffffffffffffffff19831681179093556040519116919082907fb9cd00730add6e591032c866c4356d07d8e8a417427b3898f6b2a3f451c13b9d90600090a3505050565b60013360009081526005602052604090205460ff166002811115610ef857634e487b7160e01b600052602160045260246000fd5b14610f5d5760405162461bcd60e51b815260206004820152602f60248201527f5661756c74466163746f72793a6e6f74696679556e6c6f636b3a414c5245414460448201526e1657d195531317d5539313d0d2d151608a1b60648201526084016107d7565b8015610f7e57336000908152600560205260409020805460ff191660021790555b600954604080519182524260208301528215159082015233907f7301e817558ac55a934632b4d6881c5e77e3eca6bc45e38106297b3f6846f8f09060600160405180910390a25043600955565b60013360009081526005602052604090205460ff166002811115610fff57634e487b7160e01b600052602160045260246000fd5b146110645760405162461bcd60e51b815260206004820152602f60248201527f5661756c74466163746f72793a6c6f636b457874656e6465643a414c5245414460448201526e1657d195531317d5539313d0d2d151608a1b60648201526084016107d7565b600b5460408051848152602081018490523392917f5d496a622973c74cc5df343adb5c6b3acc8e4e3d3a0a39b031be7dde2e40e60d910160405180910390a3505043600b55565b600354339060ff1615806110d757506001600160a01b03811660009081526002602052604090205460ff165b61112f5760405162461bcd60e51b8152602060048201526024808201527f57686974656c6973743a2063616c6c6572206973206e6f742077686974656c696044820152631cdd195960e21b60648201526084016107d7565b6107f1888888888888886001611235565b6000828152602081815260408083206001600160a01b038516845290915290205460ff16610921576000828152602081815260408083206001600160a01b03851684529091529020805460ff1916600117905561119a3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000610982836001600160a01b038416611a50565b60006001600160e01b03198216637965db0b60e01b148061069c57506301ffc9a760e01b6001600160e01b031983161461069c565b6112328133611a9f565b50565b428610156112ab5760405162461bcd60e51b815260206004820152602760248201527f5661756c74466163746f72793a6372656174655661756c743a554e4c4f434b5f60448201527f494e5f504153540000000000000000000000000000000000000000000000000060648201526084016107d7565b6000855111806112bc575060008451115b806112c8575060008351115b6113205760405162461bcd60e51b8152602060048201526024808201527f5661756c74466163746f72793a6372656174655661756c743a4e4f5f4445504f6044820152635349545360e01b60648201526084016107d7565b60085483518551875161133391906127d8565b61133d91906127d8565b106113a15760405162461bcd60e51b815260206004820152602e60248201527f5661756c74466163746f72793a6372656174655661756c743a4d41585f44455060448201526d13d4d25514d7d15610d15151115160921b60648201526084016107d7565b336001600160a01b03891614156114095760405162461bcd60e51b815260206004820152602660248201527f5661756c74466163746f72793a6372656174655661756c743a53454c465f524560448201526511915494905360d21b60648201526084016107d7565b876001600160a01b0316876001600160a01b031614156114915760405162461bcd60e51b815260206004820152603060248201527f5661756c74466163746f72793a6372656174655661756c743a5245464552524560448201527f525f49535f42454e45464943494152590000000000000000000000000000000060648201526084016107d7565b60005b85518110156115385760008682815181106114bf57634e487b7160e01b600052603260045260246000fd5b602002602001015160200151116115265760405162461bcd60e51b815260206004820152602560248201527f5661756c74466163746f72793a6372656174655661756c743a5a45524f5f44456044820152641413d4d25560da1b60648201526084016107d7565b806115308161286d565b915050611494565b5060005b83518110156115e057600084828151811061156757634e487b7160e01b600052603260045260246000fd5b602002602001015160400151116115ce5760405162461bcd60e51b815260206004820152602560248201527f5661756c74466163746f72793a6372656174655661756c743a5a45524f5f44456044820152641413d4d25560da1b60648201526084016107d7565b806115d88161286d565b91505061153c565b506000821561171c5784511580156115f757508351155b6116695760405162461bcd60e51b815260206004820152602e60248201527f5661756c74466163746f72793a6372656174655661756c743a4f4e4c595f465560448201527f4e4749424c455f56455354494e4700000000000000000000000000000000000060648201526084016107d7565b6007546040516001600160a01b039091169063f509ebfc9084908b908b90611695908c906020016124c5565b6040516020818303038152906040526040518563ffffffff1660e01b81526004016116c39493929190612541565b602060405180830381600087803b1580156116dd57600080fd5b505af11580156116f1573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061171591906120f3565b905061180d565b6007546040516001600160a01b039091169063e5de32659084908b908b90611748908c906020016124c5565b6040516020818303038152906040528a604051602001611768919061252e565b6040516020818303038152906040528a604051602001611788919061251b565b6040516020818303038152906040526040518763ffffffff1660e01b81526004016117b896959493929190612571565b602060405180830381600087803b1580156117d257600080fd5b505af11580156117e6573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061180a91906120f3565b90505b6006546040805160e0810182526001600160a01b0384811682523360208301528c811682840152606082018a90526080820189905260a0820188905286151560c0830152915163967737c960e01b8152919092169163967737c99134916118769160040161260f565b6000604051808303818588803b15801561188f57600080fd5b505af11580156118a3573d6000803e3d6000fd5b50505050506000816001600160a01b031663e4dfeac06040518163ffffffff1660e01b815260040160206040518083038186803b1580156118e357600080fd5b505afa1580156118f7573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061191b9190612314565b90508015611958576000818152600460205260409020805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0384161790555b6001600160a01b038216600090815260056020526040902080546001919060ff191682800217905550896001600160a01b0316896001600160a01b0316836001600160a01b03167f7a89dae678345f4c1e6fc361a48ecddf1290fe10bbb57d27012a394a57fd3303600a5485338e8e8e8e8e6040516119de9897969594939291906126c2565b60405180910390a4505043600a555050505050505050565b611a008282611140565b600082815260016020526040902061089490826111de565b611a228282611b1d565b60008281526001602052604090206108949082611b9c565b60006109828383611bb1565b600061069c825490565b6000818152600183016020526040812054611a975750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915561069c565b50600061069c565b6000828152602081815260408083206001600160a01b038516845290915290205460ff1661092157611adb816001600160a01b03166014611be9565b611ae6836020611be9565b604051602001611af7929190612444565b60408051601f198184030181529082905262461bcd60e51b82526107d7916004016125fc565b6000828152602081815260408083206001600160a01b038516845290915290205460ff1615610921576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6000610982836001600160a01b038416611dd8565b6000826000018281548110611bd657634e487b7160e01b600052603260045260246000fd5b9060005260206000200154905092915050565b60606000611bf88360026127f0565b611c039060026127d8565b67ffffffffffffffff811115611c2957634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015611c53576020820181803683370190505b509050600360fc1b81600081518110611c7c57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110611cb957634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a9053506000611cdd8460026127f0565b611ce89060016127d8565b90505b6001811115611d89577f303132333435363738396162636465660000000000000000000000000000000085600f1660108110611d3757634e487b7160e01b600052603260045260246000fd5b1a60f81b828281518110611d5b57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a90535060049490941c93611d8281612856565b9050611ceb565b5083156109825760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016107d7565b60008181526001830160205260408120548015611eeb576000611dfc60018361280f565b8554909150600090611e109060019061280f565b9050818114611e91576000866000018281548110611e3e57634e487b7160e01b600052603260045260246000fd5b9060005260206000200154905080876000018481548110611e6f57634e487b7160e01b600052603260045260246000fd5b6000918252602080832090910192909255918252600188019052604090208390555b8554869080611eb057634e487b7160e01b600052603160045260246000fd5b60019003818190600052602060002001600090559055856001016000868152602001908152602001600020600090556001935050505061069c565b600091505061069c565b600082601f830112611f05578081fd5b81356020611f1a611f15836127b4565b612783565b82815281810190858301606080860288018501891015611f38578687fd5b865b86811015611f905781838b031215611f50578788fd5b611f58612737565b8335611f63816128b4565b815283870135878201526040611f7a8186016120c2565b9082015285529385019391810191600101611f3a565b509198975050505050505050565b600082601f830112611fae578081fd5b81356020611fbe611f15836127b4565b82815281810190858301606080860288018501891015611fdc578687fd5b865b86811015611f905781838b031215611ff4578788fd5b611ffc612737565b8335612007816128b4565b815283870135878201526040808501359082015285529385019391810191600101611fde565b600082601f83011261203d578081fd5b8135602061204d611f15836127b4565b80838252828201915082860187848660061b890101111561206c578586fd5b855b858110156120b557604080838b031215612086578788fd5b61208e612760565b8335612099816128b4565b815283870135878201528552938501939091019060010161206e565b5090979650505050505050565b803580151581146120d257600080fd5b919050565b6000602082840312156120e8578081fd5b8135610982816128b4565b600060208284031215612104578081fd5b8151610982816128b4565b600080600080600080600060e0888a031215612129578283fd5b8735612134816128b4565b96506020880135612144816128b4565b955060408801359450606088013567ffffffffffffffff80821115612167578485fd5b6121738b838c01611ef5565b955060808a0135915080821115612188578485fd5b6121948b838c0161202d565b945060a08a01359150808211156121a9578384fd5b506121b68a828b01611f9e565b9250506121c560c089016120c2565b905092959891949750929550565b600080600080608085870312156121e8578384fd5b84356121f3816128b4565b9350602085013567ffffffffffffffff8082111561220f578485fd5b61221b88838901611ef5565b94506040870135915080821115612230578384fd5b61223c8883890161202d565b93506060870135915080821115612251578283fd5b5061225e87828801611f9e565b91505092959194509250565b60006020828403121561227b578081fd5b610982826120c2565b600060208284031215612295578081fd5b5035919050565b600080604083850312156122ae578182fd5b8235915060208301356122c0816128b4565b809150509250929050565b600080604083850312156122dd578182fd5b50508035926020909101359150565b6000602082840312156122fd578081fd5b81356001600160e01b031981168114610982578182fd5b600060208284031215612325578081fd5b5051919050565b6000815180845260208085019450808401835b8381101561237c57815180516001600160a01b0316885283810151848901526040908101511515908801526060909601959082019060010161233f565b509495945050505050565b6000815180845260208085019450808401835b8381101561237c57815180516001600160a01b031688528381015184890152604090810151908801526060909601959082019060010161239a565b6000815180845260208085019450808401835b8381101561237c57815180516001600160a01b0316885283015183880152604090960195908201906001016123e8565b60008151808452612430816020860160208601612826565b601f01601f19169290920160200192915050565b7f416363657373436f6e74726f6c3a206163636f756e742000000000000000000081526000835161247c816017850160208801612826565b7f206973206d697373696e6720726f6c652000000000000000000000000000000060179184019182015283516124b9816028840160208801612826565b01602801949350505050565b602081526000610982602083018461232c565b6060815260006124eb606083018661232c565b82810360208401526124fd81866123d5565b905082810360408401526125118185612387565b9695505050505050565b6020815260006109826020830184612387565b60208152600061098260208301846123d5565b84151581526001600160a01b03841660208201528260408201526080606082015260006125116080830184612418565b86151581526001600160a01b038616602082015284604082015260c0606082015260006125a160c0830186612418565b82810360808401526125b38186612418565b905082810360a08401526125c78185612418565b9998505050505050505050565b60208101600383106125f657634e487b7160e01b600052602160045260246000fd5b91905290565b6020815260006109826020830184612418565b6020815260006001600160a01b0380845116602084015280602085015116604084015250604083015161264d60608401826001600160a01b03169052565b50606083015160e0608084015261266861010084018261232c565b90506080840151601f19808584030160a086015261268683836123d5565b925060a08601519150808584030160c0860152506126a48282612387565b91505060c08401516126ba60e085018215159052565b509392505050565b60006101008a83528960208401526001600160a01b03891660408401528760608401528060808401526126f78184018861232c565b905082810360a084015261270b81876123d5565b905082810360c084015261271f8186612387565b91505082151560e08301529998505050505050505050565b6040516060810167ffffffffffffffff8111828210171561275a5761275a61289e565b60405290565b6040805190810167ffffffffffffffff8111828210171561275a5761275a61289e565b604051601f8201601f1916810167ffffffffffffffff811182821017156127ac576127ac61289e565b604052919050565b600067ffffffffffffffff8211156127ce576127ce61289e565b5060051b60200190565b600082198211156127eb576127eb612888565b500190565b600081600019048311821515161561280a5761280a612888565b500290565b60008282101561282157612821612888565b500390565b60005b83811015612841578181015183820152602001612829565b83811115612850576000848401525b50505050565b60008161286557612865612888565b506000190190565b600060001982141561288157612881612888565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b038116811461123257600080fdfea164736f6c6343000804000a

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

00000000000000000000000028dc7cea1a442bddbce26ca641b5d60f0a003efd0000000000000000000000000000000000000000000000000000000000000064

-----Decoded View---------------
Arg [0] : _paymentModule (address): 0x28Dc7CEa1A442bDdBce26cA641b5d60f0A003EFd
Arg [1] : maxTokens (uint256): 100

-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 00000000000000000000000028dc7cea1a442bddbce26ca641b5d60f0a003efd
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000064


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading
[ Download: CSV Export  ]
[ Download: CSV Export  ]

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.