Abstract Testnet

Contract

0xE267122501767005E3044332305D6c4Aa00b45e4

Overview

ETH Balance

0 ETH

Multichain Info

N/A
Transaction Hash
Method
Block
From
To
Grant Role48165862025-01-21 17:02:502 days ago1737478970IN
0xE2671225...Aa00b45e4
0 ETH0.000003360.025
Update Default I...48165682025-01-21 17:02:292 days ago1737478949IN
0xE2671225...Aa00b45e4
0 ETH0.000002520.025

Latest 23 internal transactions

Parent Transaction Hash Block From To
48165862025-01-21 17:02:502 days ago1737478970
0xE2671225...Aa00b45e4
0 ETH
48165862025-01-21 17:02:502 days ago1737478970
0xE2671225...Aa00b45e4
0 ETH
48165862025-01-21 17:02:502 days ago1737478970
0xE2671225...Aa00b45e4
0 ETH
48165862025-01-21 17:02:502 days ago1737478970
0xE2671225...Aa00b45e4
0 ETH
48165862025-01-21 17:02:502 days ago1737478970
0xE2671225...Aa00b45e4
0 ETH
48165862025-01-21 17:02:502 days ago1737478970
0xE2671225...Aa00b45e4
0 ETH
48165862025-01-21 17:02:502 days ago1737478970
0xE2671225...Aa00b45e4
0 ETH
48165862025-01-21 17:02:502 days ago1737478970
0xE2671225...Aa00b45e4
0 ETH
48165862025-01-21 17:02:502 days ago1737478970
0xE2671225...Aa00b45e4
0 ETH
48165862025-01-21 17:02:502 days ago1737478970
0xE2671225...Aa00b45e4
0 ETH
48165862025-01-21 17:02:502 days ago1737478970
0xE2671225...Aa00b45e4
0 ETH
48165862025-01-21 17:02:502 days ago1737478970
0xE2671225...Aa00b45e4
0 ETH
48165862025-01-21 17:02:502 days ago1737478970
0xE2671225...Aa00b45e4
0 ETH
48165682025-01-21 17:02:292 days ago1737478949
0xE2671225...Aa00b45e4
0 ETH
48165682025-01-21 17:02:292 days ago1737478949
0xE2671225...Aa00b45e4
0 ETH
48165682025-01-21 17:02:292 days ago1737478949
0xE2671225...Aa00b45e4
0 ETH
48161612025-01-21 16:55:142 days ago1737478514
0xE2671225...Aa00b45e4
0 ETH
48161612025-01-21 16:55:142 days ago1737478514
0xE2671225...Aa00b45e4
0 ETH
48161612025-01-21 16:55:142 days ago1737478514
0xE2671225...Aa00b45e4
0 ETH
48161612025-01-21 16:55:142 days ago1737478514
0xE2671225...Aa00b45e4
0 ETH
48161612025-01-21 16:55:142 days ago1737478514
0xE2671225...Aa00b45e4
0 ETH
48161612025-01-21 16:55:142 days ago1737478514
0xE2671225...Aa00b45e4
0 ETH
48161612025-01-21 16:55:142 days ago1737478514  Contract Creation0 ETH
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
INOFactory

Compiler Version
v0.8.23+commit.f704f362

ZkSolc Version
v1.5.7

Optimization Enabled:
Yes with Mode 3

Other Settings:
shanghai EvmVersion

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 25 : INOFactory.sol
// SPDX-License-Identifier: UNLICENSED
pragma solidity 0.8.23;

import {AccessControlEnumerable} from "openzeppelin-contracts/access/AccessControlEnumerable.sol";
import {Clones} from "openzeppelin-contracts/proxy/Clones.sol";
import {ReentrancyGuard} from "openzeppelin-contracts/security/ReentrancyGuard.sol";

import {IINOFactory} from "./IINOFactory.sol";
import {IINOFactoryInternal} from "./IINOFactoryInternal.sol";
import {IHost} from "../lzApp/interfaces/IHost.sol";
import {IRestrictedWritable} from "../common/writable/restricted/IRestrictedWritable.sol";
import {IINORestricted} from "../ino/writable/restricted/IINORestricted.sol";

import {INOPhase} from "../ino/INOStruct.sol";

import {LzStorage} from "../lzApp/LzStorage.sol";

import {INOStorage} from "../ino/INOStorage.sol";
import {SaleStorage} from "../common/SaleStorage.sol";

/**
 * @title INOFactory
 * @notice Deploy {INO} in single transaction through {createINO}.
 */
contract INOFactory is
    IINOFactory, // 1 inherited component
    IINOFactoryInternal, // 1 inherited component
    AccessControlEnumerable, // 7 inherited component
    ReentrancyGuard // 1 inherited component
{
    /// @inheritdoc IINOFactory
    uint256 public override maxLoop = 100;

    INODetail[] internal _inoDetails;
    mapping(string => address) internal _inoNames;

    /// @inheritdoc IINOFactory
    address public override defaultINO;

    constructor() {
        _grantRole(DEFAULT_ADMIN_ROLE, _msgSender());
    }

    /// @inheritdoc IINOFactory
    function createINO(
        string calldata inoName,
        INOStorage.SetUp calldata inoSetUp,
        SaleStorage.SetUp memory saleSetUp,
        string[] calldata phaseIds,
        INOPhase[] calldata phases
    )
        external
        override
        nonReentrant
        onlyRole(DEFAULT_ADMIN_ROLE)
        returns (address ino)
    {
        (ino) = _createINO(inoName, inoSetUp, saleSetUp, phaseIds, phases);

        emit INOCreated(inoName, ino);
    }

    /// @inheritdoc IINOFactory
    function updateDefaultINO(
        address newDefaultINO
    ) external override onlyRole(DEFAULT_ADMIN_ROLE) {
        if (newDefaultINO == address(0))
            revert INOFactory_DefaultINO_ZeroAddr();

        emit DefaultINOUpdated(defaultINO, newDefaultINO);
        defaultINO = newDefaultINO;
    }

    /// @inheritdoc IINOFactory
    function setMaxLoop(
        uint256 newMaxLoop
    ) external override onlyRole(DEFAULT_ADMIN_ROLE) {
        maxLoop = newMaxLoop;
    }

    /// @inheritdoc IINOFactory
    function getInosDetails(
        uint256 from,
        uint256 to
    )
        external
        view
        override
        returns (
            INODetail[] memory inos,
            uint256 lastEvaludatedIndex,
            uint256 totalItems
        )
    {
        if (from > to) revert INOFactory_IndexesReversed();

        unchecked {
            if ((to - from) > maxLoop) to = from + maxLoop;
            if (to > _inoDetails.length) to = _inoDetails.length;

            inos = new INODetail[](to - from);
            for (uint256 i = from; i < to; ++i) {
                inos[i - from] = _inoDetails[i];
            }
            // loop end when i == to, but last call is _inoDetails[to - 1]
            lastEvaludatedIndex = --to;
        }

        totalItems = _inoDetails.length;
    }

    ///  @dev `saleSetUp` must be `memory` type as it is updated inside the function.
    function _createINO(
        string calldata inoName,
        INOStorage.SetUp calldata inoSetUp,
        SaleStorage.SetUp memory saleSetUp,
        string[] calldata phaseIds,
        INOPhase[] calldata phases
    ) internal returns (address ino) {
        if (address(_inoNames[inoName]) != address(0)) {
            revert INOFactory_INONameExists(inoName);
        }
        if (defaultINO == address(0)) {
            revert INOFactory_DefaultINO_NotSet();
        }

        bytes32 salt = keccak256(abi.encodePacked(_msgSender(), inoName));

        ino = Clones.cloneDeterministic(defaultINO, salt);

        _inoNames[inoName] = ino;
        _inoDetails.push(INODetail(inoName, ino, inoSetUp, saleSetUp));

        IINORestricted(ino).initialize(
            saleSetUp,
            _msgSender(),
            inoSetUp,
            phaseIds,
            phases
        );
    }
}

File 2 of 25 : 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 3 of 25 : Clones.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (proxy/Clones.sol)

pragma solidity ^0.8.0;

/**
 * @dev https://eips.ethereum.org/EIPS/eip-1167[EIP 1167] is a standard for
 * deploying minimal proxy contracts, also known as "clones".
 *
 * > To simply and cheaply clone contract functionality in an immutable way, this standard specifies
 * > a minimal bytecode implementation that delegates all calls to a known, fixed address.
 *
 * The library includes functions to deploy a proxy using either `create` (traditional deployment) or `create2`
 * (salted deterministic deployment). It also includes functions to predict the addresses of clones deployed using the
 * deterministic method.
 *
 * _Available since v3.4._
 */
library Clones {
    /**
     * @dev Deploys and returns the address of a clone that mimics the behaviour of `implementation`.
     *
     * This function uses the create opcode, which should never revert.
     */
    function clone(address implementation) internal returns (address instance) {
        /// @solidity memory-safe-assembly
        assembly {
            // Cleans the upper 96 bits of the `implementation` word, then packs the first 3 bytes
            // of the `implementation` address with the bytecode before the address.
            mstore(0x00, or(shr(0xe8, shl(0x60, implementation)), 0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000))
            // Packs the remaining 17 bytes of `implementation` with the bytecode after the address.
            mstore(0x20, or(shl(0x78, implementation), 0x5af43d82803e903d91602b57fd5bf3))
            instance := create(0, 0x09, 0x37)
        }
        require(instance != address(0), "ERC1167: create failed");
    }

    /**
     * @dev Deploys and returns the address of a clone that mimics the behaviour of `implementation`.
     *
     * This function uses the create2 opcode and a `salt` to deterministically deploy
     * the clone. Using the same `implementation` and `salt` multiple time will revert, since
     * the clones cannot be deployed twice at the same address.
     */
    function cloneDeterministic(address implementation, bytes32 salt) internal returns (address instance) {
        /// @solidity memory-safe-assembly
        assembly {
            // Cleans the upper 96 bits of the `implementation` word, then packs the first 3 bytes
            // of the `implementation` address with the bytecode before the address.
            mstore(0x00, or(shr(0xe8, shl(0x60, implementation)), 0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000))
            // Packs the remaining 17 bytes of `implementation` with the bytecode after the address.
            mstore(0x20, or(shl(0x78, implementation), 0x5af43d82803e903d91602b57fd5bf3))
            instance := create2(0, 0x09, 0x37, salt)
        }
        require(instance != address(0), "ERC1167: create2 failed");
    }

    /**
     * @dev Computes the address of a clone deployed using {Clones-cloneDeterministic}.
     */
    function predictDeterministicAddress(
        address implementation,
        bytes32 salt,
        address deployer
    ) internal pure returns (address predicted) {
        /// @solidity memory-safe-assembly
        assembly {
            let ptr := mload(0x40)
            mstore(add(ptr, 0x38), deployer)
            mstore(add(ptr, 0x24), 0x5af43d82803e903d91602b57fd5bf3ff)
            mstore(add(ptr, 0x14), implementation)
            mstore(ptr, 0x3d602d80600a3d3981f3363d3d373d3d3d363d73)
            mstore(add(ptr, 0x58), salt)
            mstore(add(ptr, 0x78), keccak256(add(ptr, 0x0c), 0x37))
            predicted := keccak256(add(ptr, 0x43), 0x55)
        }
    }

    /**
     * @dev Computes the address of a clone deployed using {Clones-cloneDeterministic}.
     */
    function predictDeterministicAddress(
        address implementation,
        bytes32 salt
    ) internal view returns (address predicted) {
        return predictDeterministicAddress(implementation, salt, address(this));
    }
}

File 4 of 25 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (security/ReentrancyGuard.sol)

pragma solidity ^0.8.0;

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

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

    uint256 private _status;

    constructor() {
        _status = _NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and making it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        _nonReentrantBefore();
        _;
        _nonReentrantAfter();
    }

    function _nonReentrantBefore() private {
        // On the first call to nonReentrant, _status will be _NOT_ENTERED
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

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

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

    /**
     * @dev Returns true if the reentrancy guard is currently set to "entered", which indicates there is a
     * `nonReentrant` function in the call stack.
     */
    function _reentrancyGuardEntered() internal view returns (bool) {
        return _status == _ENTERED;
    }
}

File 5 of 25 : IINOFactory.sol
// SPDX-License-Identifier: UNLICENSED
pragma solidity 0.8.23;

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

import {INOStorage} from "../ino/INOStorage.sol";
import {SaleStorage} from "../common/SaleStorage.sol";

import {INOPhase} from "../ino/INOStruct.sol";

/**
 * @title IINOFactory
 * @notice Defines external and public functions for {INOFactory}.
 */
interface IINOFactory {
    /**
     * @notice Clone (minimal proxy - gas saving) and configure an {INO} with its {INOVesting} in a single
     *         transaction.
     * @dev `saleSetUp` must be `memory` type as it is updated in {_createINO}.
     *
     * @param inoName Name of the INO to create and configure.
     * @param inoSetUp Struct to initialize {INO} contract.
     * @param saleSetUp Struct to initialize {INO} contract with shared sale variables from
     *        {SaleWritableInternal}.
     * @param phaseIds Default phases/phase name to create at INO initialization.
     * @param phases Default phases/phase object to create at INO initialization.
     *
     * @return ino New cloned and configured {INO} contract.
     */
    function createINO(
        string calldata inoName,
        INOStorage.SetUp calldata inoSetUp,
        SaleStorage.SetUp memory saleSetUp,
        string[] calldata phaseIds,
        INOPhase[] calldata phases
    ) external returns (address ino);

    /**
     * @notice Update default {INO} to use in {createINO}.
     * @dev If not one of these or both not set, {createINO} will fail with:
     *      - {INOFactory_DefaultINO_NotSet} error.
     *
     * @param newDefaultINO Default {INO} to use for next {createINO} call.
     */
    function updateDefaultINO(address newDefaultINO) external;

    /// @notice Set the maxium amount of loops to be used in {getInosDetails}.
    function setMaxLoop(uint256 newMaxLoop) external;

    /**
     * @notice Get details of many {INO} by batch to index items on frontend.
     *
     * @param from Index to start reading from {_inoDetails}.
     * @param to Index to finish reading from {_inoDetails}.
     *
     * @return inos Details of {INO} requested, from `from` to `to`.
     * @return lastEvaludatedIndex Last index evaluated within the loop - should be `from`.
     * @return totalItems Total amount of {INODetail} fetched.
     */
    function getInosDetails(
        uint256 from,
        uint256 to
    )
        external
        view
        returns (
            IINOFactoryInternal.INODetail[] memory inos,
            uint256 lastEvaludatedIndex,
            uint256 totalItems
        );

    ///////////////// PUBLIC /////////////////
    /// @return return Default {INO}.
    function defaultINO() external returns (address);

    /// @return Maximum amount of loops to use per {getInosDetails} call.
    function maxLoop() external returns (uint256);
}

File 6 of 25 : IINOFactoryInternal.sol
// SPDX-License-Identifier: UNLICENSED
pragma solidity 0.8.23;

import {INOStorage} from "../ino/INOStorage.sol";
import {SaleStorage} from "../common/SaleStorage.sol";

/**
 * @title IINOFactoryInternal
 * @notice Internal interface of {INOFactory} which defines structures, events and errors.
 */
interface IINOFactoryInternal {
    /**
     * @notice Struct representing an INO cloned and created by {_createINO} function.
     *
     * @param name Name of the INO.
     * @param ino Address of the {INO} contract cloned.
     * @param inoSetUp Struct to set up newly deployed {INO}.
     * @param saleSetUp Struct to set up newly deployed {INO} with common sale variables.
     */
    struct INODetail {
        string name;
        address ino;
        INOStorage.SetUp inoSetUp;
        SaleStorage.SetUp saleSetUp;
    }

    /**
     * @notice Emitted only in {updateDefaultINO}.
     *
     * @param defaultINO Address of the old default {INO} contract.
     * @param newDefaultINO Address of the new default {INO} contract.
     */
    event DefaultINOUpdated(
        address indexed defaultINO,
        address indexed newDefaultINO
    );
    /**
     * @notice Emitted only in {createINO}.
     *
     * @param inoName Name of the INO.
     * @param ino Address of the {INO} contract cloned and initialized.
     */
    event INOCreated(string indexed inoName, address indexed ino);

    /// @notice Thrown when {defaultINO} is not set.
    error INOFactory_DefaultINO_NotSet();
    /// @notice Thrown when trying to set {defaultINO} as `address(0)` in {updateDefaultINO}.
    error INOFactory_DefaultINO_ZeroAddr();
    /// @notice Thrown when an INO with `name` has already been created.
    error INOFactory_INONameExists(string name);
    /// @notice Thrown when `from` is > `to` in {getInosDetails}.
    error INOFactory_IndexesReversed();
}

File 7 of 25 : IHost.sol
// SPDX-License-Identifier: UNLICENSED
pragma solidity 0.8.23;

/**
 * @title IHost
 * @notice Defines external and public functions for {LzVestingHostChain}.
 */
interface IHost {
    /**
     * @notice Initialize {LzVestingHostChain} contract.
     * @dev Use `reinitializer(2)` as we initialize contract in 2 times:
     * 1. Common parts shared between crosschain and not crosschain IGOVesting
     *    with `initializeCrowdfunding`
     * 2. Crosschain configuration with `init`
     *
     * We could have refactor this into a single function though this would
     * prevent us from using a common method in IGOFactory to deploy IGOs and
     * IGOVesting not matter if crosschain compatible or not.
     *
     * @param lzEndpoint_ Address of the {ILayerZeroEndpoint}, see the official doc:
     * https://layerzero.gitbook.io/docs/technical-reference/mainnet/supported-chain-ids
     * @param hostChain_ Current chain id of where the {IGO} and {LzVestingHostChain} are deployed, using
     *        nomenclature LayerZero.
     * @param targetChain_ Chain id where {LzClaimRefundTargetChain} is deployed, using LayerZero nomenclature.
     */
    function init(
        address lzEndpoint_,
        uint16 hostChain_,
        uint16 targetChain_
    ) external;

    /**
     * @notice Estimate fees for a crosschain transaction by requesting LayerZero endpoint.
     *
     * @param _dstChainId Chain id where the call will be made to, using  LayerZero nomenclature.
     * @param _payload Payload to send to the destination chain - abi.encode(...).
     * @param _useZro Whether to use ZERO token for fees or native (ETH, BNB, ARB, etc...).
     * @param _adapterParams Params to send to the destination chain adapter - abi.encode(...).
     */
    function estimateFee(
        uint16 _dstChainId,
        bytes calldata _payload,
        bool _useZro,
        bytes calldata _adapterParams
    ) external view returns (uint nativeFee, uint zroFee);

    /**
     * @notice Host chain where call are made from, using LayerZero nomenclature.
     */
    function getHostChain() external view returns (uint16);

    /**
     * @notice Target chain where call are made to, using LayerZero nomenclature.
     */
    function getTargetChain() external view returns (uint16);

    ///////////////// PUBLIC /////////////////
    /**
     * @notice Update vesting from crosschain call of {LzClaimRefundTargetChain} contract.
     * @dev Send a call back to target chain to release the right amount of tokens to `_wallet`. Only
     *      LayerZero endpoint can call this function.
     * @custom:audit The only reason this function is made public is to receive native tokens from
     *               LayerZero endpoint. This is a requirement for crosschain ping-pong calls.
     *
     * @param _wallet Address of the wallet which requested to claim their due on target chain from
     *        {LzClaimRefundTargetChain.claim}.
     */
    function hostClaimUpdate(address _wallet) external payable;
}

File 8 of 25 : IRestrictedWritable.sol
// SPDX-License-Identifier: UNLICENSED
pragma solidity 0.8.23;

import {IGOStorage} from "../../../igo/IGOStorage.sol";
import {SaleStorage} from "../../SaleStorage.sol";

// import struct
import {Phase} from "../../SaleStruct.sol";

/**
 * @title IRestrictedWritable
 * @notice Only the owner of the contract can call these methods.
 */
interface IRestrictedWritable {
    //////////////////////////// SHARED Sale DATA ////////////////////////////
    /**
     * @notice Close the sale for good.
     * @dev Can be closed at any point in time AND NOT reversible.
     */
    function closeSale() external;

    function openSale() external;

    function pauseSale() external;

    function resumeSale() external;

    /// @dev Retrieve any ERC20 sent to the contract by mistake.
    function recoverLostERC20(address token, address to) external;

    function closePhases(string[] calldata phaseIds) external;

    // TODO: UX choice to make here, do we need both phase single field update and phase batch update?
    //////////////////////////// PHASE SINGLE UPDATE ////////////////////////////
    /**
     * @custom:audit phase can be opened even if it does not exists but as only the owner can update this
     * method we make the asumption that the owner will always be aware of this to save gast costs and it
     * can be paused at any time to update its data so it does not pose a security risk.
     */
    function openPhase(string calldata phaseId) external;

    function pausePhase(string calldata phaseId) external;

    function resumePhase(string calldata phaseId) external;

    function updatePhaseEndDate(
        string calldata phaseId,
        uint128 endAt
    ) external;

    /**
     * @notice Update `maxPhaseCap` which is the maximum amount of tokens that can be sold in a phase
     *         and the merkle root of a phase to update a single or multiple wallet allocation,
     *         refund fee, etc.
     * @dev `maxPhaseCap` is expressed in {SaleStorage.SetUp.paymentToken}.
     *
     * @param phaseId Identifier of the phase.
     * @param merkleRoot New merkle root to be saved for this phase.
     */
    function updatePhaseMaxCapAndMerkleRoot(
        string calldata phaseId,
        uint256 maxPhaseCap,
        bytes32 merkleRoot
    ) external;

    /**
     * @notice Update the merkle root of a phase to update a single or multiple wallet allocation,
     *         refund fee, payment token etc.
     *
     * @param phaseId Identifier of the phase.
     * @param merkleRoot New merkle root to be saved for this phase.
     */
    function updatePhaseMerkleRoot(
        string calldata phaseId,
        bytes32 merkleRoot
    ) external;

    function updatePhaseStartDate(
        string calldata phaseId,
        uint128 startAt
    ) external;
}

File 9 of 25 : IINORestricted.sol
// SPDX-License-Identifier: UNLICENSED
pragma solidity 0.8.23;

// import struct
import {Phase} from "../../../common/SaleStruct.sol";
import {INOPhase} from "../../INOStruct.sol";

// storage
import {INOStorage} from "../../INOStorage.sol";
import {SaleStorage} from "../../../common/SaleStorage.sol";

/**
 * @title IINORestricted
 * @notice Only the owner of the contract can call these methods.
 */
interface IINORestricted {
    /**
     * @notice Some projects will only do the sale through INO and will handle the NFT minting themselves.
     *         Others will do the mint and sale through INO. This function is used to deploy the NFT
     *         collection for the second case.
     * @dev Use {reinitializer(2)} as {initialize} is called first.
     *
     * @param nftToClone The address of the NFT to use as an NFT base.
     * @param data Data of the NFT collection to be deployed.
     */
    function deployNftToSell(
        address nftToClone,
        INOStorage.NFTCollectionData calldata data
    ) external returns (address collection);

    /**
     * @notice Use a single token for the whole INO (never changed once set here).
     *
     * @param saleSetUp Data of the sale to be deployed - common logic shared between IGOs and INOs.
     * @param owner Owner of the INO.
     * @param inoSetUp Data of the INO to be deployed.
     * @param phaseIds Default list of phase identifiers - can be empty array `new string[](0)`
     * @param phases Default list of phases - can be empty array `new INOPhase[](0)`
     */
    function initialize(
        SaleStorage.SetUp calldata saleSetUp,
        address owner,
        INOStorage.SetUp calldata inoSetUp,
        string[] calldata phaseIds,
        INOPhase[] calldata phases
    ) external;

    /**
     * @dev Update or create a phase with all its data.
     *
     * @param phaseId_ Identifier of phase to set or update.
     * @param phase_ Struct {INOPhase} containing INO phase's data to be saved.
     */
    function updateSetPhase(
        string calldata phaseId_,
        INOPhase calldata phase_
    ) external;

    /**
     * @dev Update or create multiple phases with all their data.
     *
     * @param phaseIdentifiers_ Array of identifiers of `phases`.
     * @param phases_ Array of struct {INOPhase} containing phases' data to be saved.
     */
    function updateSetPhases(
        string[] calldata phaseIdentifiers_,
        INOPhase[] calldata phases_
    ) external;

    function updatePhaseMaxMintAndMerkleRoot(
        string calldata phaseId,
        uint256 phaseMaxMint,
        bytes32 merkleRoot
    ) external;
}

File 10 of 25 : INOStruct.sol
// SPDX-License-Identifier: UNLICENSED
pragma solidity 0.8.23;

import {Phase} from "../common/SaleStruct.sol";

/**
 * @notice Struct representing a free allocation and user based for a specific phase of a sale.
 *         Whitelisted addresses will mint NFTs for free.
 *
 * @param phaseId Phase identifier of the current sale.
 * @param toMint Amount of NFT to be minted.
 * @param account Wallet address of the buyer.
 */
struct FreeAllocation {
    string phaseId;
    uint256 toMint;
    address account;
}

/**
 * @notice Struct representing the details of a public phase of a sale.
 *
 * @param phaseId Phase identifier of the current sale.
 * @param unitPrice Price of each NFT in this phase.
 * @param maxAllocationPerWallet Maximum amount of tokens that can be spent by a wallet in this phase,
 *          expressed in {SaleStorage.SetUp.paymentToken}.
 */
struct PublicPhaseDetails {
    string phaseId;
    uint256 unitPrice;
    uint256 maxAllocationPerWallet;
}

/**
 * @notice Struct representing a phase of an INO sale.
 *
 * @param base Phase struct from {SaleStruct} shared with IGO sales.
 * @param phaseMaxMint Maximum amount of NFTs that can be minted in this phase.
 */
struct INOPhase {
    Phase base;
    uint256 phaseMaxMint;
}

File 11 of 25 : LzStorage.sol
// SPDX-License-Identifier: UNLICENSED
pragma solidity 0.8.23;

/**
 * @title LzStorage
 * @notice Mapps the storage layout of LayerZero dependend contracts:
 *         - {LzClaimRefundTargetChain};
 *         - {LzVestingHostChain} contract;
 * @dev Diamond proxy (ERC-2535) storage style.
 */
library LzStorage {
    /**
     * @notice Struct reprensenting data required by all LayerZero calls.
     *
     * @param hostChain Chain id of where the {LzVestingHostChain} is deployed, using LayerZero's
     *        nomenclature.
     * @param targetChain Chain id of where the {LzClaimRefundTargetChain} is deployed, using
     *        LayerZero's nomenclature.
     * @param vestedToken Address of the token to release to the user in {LzClaimRefundTargetChain}.
     */
    struct LzStruct {
        uint16 hostChain;
        uint16 targetChain;
        address vestedToken;
    }

    /// @notice Storage position of {LzStorage} in contracts using it.
    bytes32 public constant LZ_STORAGE = keccak256("lz.storage");

    /**
     * @notice Custom selector to clone and configure {LzClaimRefundTargetChain}.
     * @dev `_crosschainCloneClaim` does not exists, though it helps to identify the
     *      methods to call in {ClaimFactory._nonblockingLzReceive}.
     */
    bytes4 public constant CROSSCHAIN_CLONE_CLAIM_SELECTOR =
        bytes4(
            keccak256(
                "_crosschainCloneClaim(string,address,address,uint16,uint16,address)"
            )
        );
    /**
     * @notice Custom selector to save cloned {LzClaimRefundTargetChain} in {IGOFactory} through
     *         crosschain call from {ClaimFactory.saveCrosschainClaimInHostFactory}.
     */
    bytes4 public constant LINK_CLAIM_TO_IGO__CALLBACK =
        bytes4(keccak256("LINK_CLAIM_TO_IGO__CALLBACK"));

    /// @dev Custom selector to update vesting schedule on host from crosschain call.
    bytes4 public constant LZ_HOSTCLAIM_SELECTOR =
        bytes4(keccak256("hostClaimUpdate(address)"));
    /// @dev Custom selector to release token to user on target chain from crosschain call.
    bytes4 public constant LZ_RELEASE_TOKEN_SELECTOR =
        bytes4(keccak256("_releaseTokenToUser(address,uint256)"));

    /// @dev Custom selector to refun tokens to user on host chain from crosschain call.
    bytes4 public constant LZ_REFUND_SELECTOR =
        bytes4(keccak256("_refundLz(string,address)"));

    /// @return lzStruct Whole storage of {LzClaimRefundTargetChain} and {LzVestingHostChain} contracts.
    function layout() internal pure returns (LzStruct storage lzStruct) {
        bytes32 position = LZ_STORAGE;
        assembly {
            lzStruct.slot := position
        }
    }
}

File 12 of 25 : INOStorage.sol
// SPDX-License-Identifier: UNLICENSED
pragma solidity 0.8.23;

/**
 * @title INOStorage
 * @notice Mapps the storage layout of the {INO} contract.
 * @dev Diamond proxy (ERC-2535) storage style.
 */
library INOStorage {
    /**
     * @notice Struct reprensenting the main setup of the INO.
     *
     * @param paymentReceiver The address which will receive the funds from the INO.
     * @param projectWallet The address of the project issuing NFTs - transfer ownership once sale closed.
     */
    struct SetUp {
        address paymentReceiver;
        address projectWallet;
    }

    /**
     * @notice Struct reprensenting the data of the NFT collection to be deployed through INO.
     *
     * @param name The name of the NFTs to be minted during the INO.
     * @param symbol The symbol of the NFTs to be minted during the INO.
     * @param uri The base URI of the NFTs to be minted during the INO - only used for reveal on minint,
     *        otherwise the uri will be an empty string (blackbox and reveal date cases).
     * @param maxCap The maximum number of NFTs to be minted during and after (if not sold out) the INO.
     * @param startTokenId The first token id to be minted during the INO.
     */
    struct NFTCollectionData {
        string name;
        string symbol;
        string uri;
        uint256 maxCap;
        uint256 startTokenId;
    }

    /**
     * @notice Struct reprensenting the whole storage layout of the INO contract.
     *
     * @param setUp Struct reprensenting the main setup of the INO - modified by owner interactions only.
     * @param nftData Struct reprensenting the data of the NFT collection to be deployed through INO
     *                - modified by owner interactions only.
     * @param collection The address of the NFT collection to be deployed and minted through INO - modified
     *                   by owner interactions only.
     * @param phaseMaxMint Maximum number of NFTs to be minted in a specific phase - modified by owner
     *                     interactions only.
     * @param mintedInPhase Number of NFTs minted in a specific phase - modified by INO contract
     *                      interaction.
     * @param totalMinted Total number of NFTs minted in the whole INO - modified by INO contract
     *                    interaction.
     */
    struct INOStruct {
        // modified by owner interactions only
        SetUp setUp;
        NFTCollectionData nftData;
        address collection;
        mapping(string => uint256) phaseMaxMint;
        // modified by INO contract interaction
        mapping(string => uint256) mintedInPhase;
        uint256 totalMinted;
    }

    /// @notice Storage position of {INOStruct} in {INO} contract.
    bytes32 public constant INO_STORAGE = keccak256("ino.storage");

    /**
     * @return inoStruct Whole storage of {INO} contract.
     */
    function layout() internal pure returns (INOStruct storage inoStruct) {
        bytes32 position = INO_STORAGE;
        assembly {
            inoStruct.slot := position
        }
    }
}

File 13 of 25 : SaleStorage.sol
// SPDX-License-Identifier: UNLICENSED
pragma solidity 0.8.23;

// import struct
import {Status, Phase} from "./SaleStruct.sol";

/**
 * @author https://github.com/Theo6890
 * @title SaleStorage
 * @notice Mapps the storage layout of the {Sale} contract.
 * @dev Diamond proxy (ERC-2535) storage style.
 */
library SaleStorage {
    /**
     * @notice Struct reprensenting the main setup of the Sale.
     *
     * @param paymentToken Address of the default token used to reserve allocation through the Sale.
     *                     If `address(0)`, it means native token of the chain (ETH, BNB, etc...).
     * @param permit2 Official address of the {Permit2} library deployed by Uniswap.
     */
    struct SetUp {
        address paymentToken;
        address permit2;
    }

    /**
     * @notice Struct reprensenting the setup of each phase of the Sale.
     * @dev Status of the phase is the only value that can be updated by Sale contract itself due to user's
     *      interactions with the contract.
     *
     * @param ids List of all phases identifiers.
     * @param data Mapping of data of each phases.
     */
    struct Phases {
        string[] ids;
        mapping(string => Phase) data;
    }

    /**
     * @notice Struct reprensenting data of the Sale which are always updated by user's interactions with
     *         the Sale contract.
     *
     * @param status Enum representing the current status of the Sale.
     * @param summedMaxPhaseCap Sum of maximum cap of each phase expressed in {SetUp.paymentToken}.
     * @param totalRaised Total amount of paymentToken raised for this Sale,
     *                    expressed in {SetUp.paymentToken}.
     * @param raisedInPhase Amount of paymentToken raised for each phase, expressed in {SetUp.paymentToken}.
     * @param allocationReservedByIn Amount of paymentToken paid by phase by each user,
     *                               expressed in {SetUp.paymentToken}.
     */
    struct Ledger {
        Status status;
        uint256 summedMaxPhaseCap;
        uint256 totalRaised;
        mapping(string => uint256) raisedInPhase;
        mapping(address => mapping(string => uint256)) allocationReservedByIn;
        mapping(address => mapping(string => uint256)) freeAllocationMintedBy;
    }

    /**
     * @notice Struct reprensenting the whole storage layout of the Sale contract.
     *
     * @param setUp reprensenting the main setup of the Sale.
     * @param phases reprensenting the setup of each phase of the Sale.
     * @param ledger reprensenting data of the Sale which are always updated by user's interactions with
     *        the Sale contract.
     */
    struct SaleStruct {
        SetUp setUp;
        Phases phases;
        Ledger ledger;
    }

    /// @notice Storage position of {SaleStruct} in {Sale} contract.
    bytes32 public constant Sale_STORAGE = keccak256("common.storage");

    /**
     * @return igoStruct Whole storage of {Sale} contract.
     */
    function layout() internal pure returns (SaleStruct storage igoStruct) {
        bytes32 position = Sale_STORAGE;
        assembly {
            igoStruct.slot := position
        }
    }
}

File 14 of 25 : 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 15 of 25 : AccessControl.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.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:
 *
 * ```solidity
 * 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}:
 *
 * ```solidity
 * 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. We recommend using {AccessControlDefaultAdminRules}
 * to enforce additional security measures for this role.
 */
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(account),
                        " 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 16 of 25 : EnumerableSet.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/structs/EnumerableSet.sol)
// This file was procedurally generated from scripts/generate/templates/EnumerableSet.js.

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.
 *
 * ```solidity
 * 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) {
        bytes32[] memory store = _values(set._inner);
        bytes32[] memory result;

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

        return result;
    }

    // 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 in 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 17 of 25 : IGOStorage.sol
// SPDX-License-Identifier: UNLICENSED
pragma solidity 0.8.23;

/**
 * @author https://github.com/Theo6890
 * @title IGOStorage
 * @notice Mapps the storage layout of the {IGO} contract.
 * @dev Diamond proxy (ERC-2535) storage style.
 */
library IGOStorage {
    /**
     * @notice Struct reprensenting the main setup of the IGO.
     *
     * @param vestingContract Address of the {IGOVesting} contract.
     * @param refundFeeDecimals Number of decimals used for {IIGOWritableInternal.Allocation.refundFee}.
     */
    struct SetUp {
        address vestingContract;
        uint256 refundFeeDecimals;
    }

    /**
     * @notice Struct reprensenting the whole storage layout of the IGO contract.
     *
     * @param setUp Struct reprensenting the main setup of the IGO.
     */
    struct IGOStruct {
        SetUp setUp;
    }

    /// @notice Storage position of {IGOStruct} in {IGO} contract.
    bytes32 public constant IGO_STORAGE = keccak256("igo.storage");

    /**
     * @return igoStruct Whole storage of {IGO} contract.
     */
    function layout() internal pure returns (IGOStruct storage igoStruct) {
        bytes32 position = IGO_STORAGE;
        assembly {
            igoStruct.slot := position
        }
    }
}

File 18 of 25 : SaleStruct.sol
// SPDX-License-Identifier: UNLICENSED
pragma solidity 0.8.23;

/**
 * @notice Shared enum representing the different status of a phase or the whole IGO.
 *
 * @custom:value NOT_STARTED IGO/Phase created but not started; allocations/buyAndMint are allowed.
 * @custom:value OPENED IGO/Phase started according to start date; allocations/buyAndMint are allowed.
 * @custom:value COMPLETED IGO/Phase everything has been sold or time has been elapsed;
 *               allocations/buyAndMint can't be reserved anymore.
 * @custom:value PAUSED IGO/Phase has been paused by the owner; allocations/buyAndMint can't be
 *               reserved until further notice.
 */
enum Status {
    NOT_STARTED,
    OPENED,
    COMPLETED,
    PAUSED
}

/**
 * @notice Struct representing an allocation of a wallet for a specific phase of a sale.
 *
 * @param phaseId Phase identifier of the in the current sale, e.g. "vpr-social-task",
 *        "sale-public-phase-1", "ino-public" etc...
 * @param maxAllocation Maximum amount to spend in {SaleStorage.SetUp.paymentToken}.
 * @param saleTokenPerPaymentToken Price per token/nft of the project behind the Sale, expressed in
 *        {SaleStorage.SetUp.paymentToken}.
 */
struct Allocation {
    string phaseId;
    uint256 maxAllocation;
    uint256 saleTokenPerPaymentToken;
}

/**
 * @notice Struct representing a buy permission signed by `msg.sender` for
 *         {SaleWritable.reserveAllocation} function to use with {Permit2} library.
 *
 * @dev Compulsory to interact with {Permit2.permitTransferFrom} in
 *      {SaleWritableInternal._reserveAllocation}.
 *
 * @param signature {Permit2} signature to transfer tokens from the buyer to {SaleVesting}.
 * @param deadline Seadline on the permit signature.
 * @param nonce Unique value for every token owner's signature to prevent signature replays.
 */
struct BuyPermission {
    bytes signature;
    uint256 deadline;
    uint256 nonce;
}

/**
 * @notice Shared struct representing the data of a phase.
 *
 * @param status Enum representing the current status of the phase.
 * @param rootHash Merkle root hash or hash of a metadata configuration:
          contains keccas256 hash of 3 encoded values:
            1. address(this)
            2. chainid
            3. any of: UserAllocationFee | FreeAllocation | PublicPhaseDetails
 * @param startAt Timestamp at which the phase will be opened to reserve allocation.
 * @param endAt Timestamp at which the phase will not accept allocation reservation anymore.
 * @param maxPhaseCap Maximum amount of {SaleStorage.SetUp.paymentToken} for this phase.
 */
struct Phase {
    Status status;
    bytes32 rootHash;
    uint128 startAt;
    uint128 endAt;
    uint256 maxPhaseCap;
}

File 19 of 25 : 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 20 of 25 : 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 21 of 25 : Strings.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/Strings.sol)

pragma solidity ^0.8.0;

import "./math/Math.sol";
import "./math/SignedMath.sol";

/**
 * @dev String operations.
 */
library Strings {
    bytes16 private constant _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) {
        unchecked {
            uint256 length = Math.log10(value) + 1;
            string memory buffer = new string(length);
            uint256 ptr;
            /// @solidity memory-safe-assembly
            assembly {
                ptr := add(buffer, add(32, length))
            }
            while (true) {
                ptr--;
                /// @solidity memory-safe-assembly
                assembly {
                    mstore8(ptr, byte(mod(value, 10), _SYMBOLS))
                }
                value /= 10;
                if (value == 0) break;
            }
            return buffer;
        }
    }

    /**
     * @dev Converts a `int256` to its ASCII `string` decimal representation.
     */
    function toString(int256 value) internal pure returns (string memory) {
        return string(abi.encodePacked(value < 0 ? "-" : "", toString(SignedMath.abs(value))));
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
     */
    function toHexString(uint256 value) internal pure returns (string memory) {
        unchecked {
            return toHexString(value, Math.log256(value) + 1);
        }
    }

    /**
     * @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] = _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);
    }

    /**
     * @dev Returns true if the two strings are equal.
     */
    function equal(string memory a, string memory b) internal pure returns (bool) {
        return keccak256(bytes(a)) == keccak256(bytes(b));
    }
}

File 22 of 25 : 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 23 of 25 : Math.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/Math.sol)

pragma solidity ^0.8.0;

/**
 * @dev Standard math utilities missing in the Solidity language.
 */
library Math {
    enum Rounding {
        Down, // Toward negative infinity
        Up, // Toward infinity
        Zero // Toward zero
    }

    /**
     * @dev Returns the largest of two numbers.
     */
    function max(uint256 a, uint256 b) internal pure returns (uint256) {
        return a > b ? a : b;
    }

    /**
     * @dev Returns the smallest of two numbers.
     */
    function min(uint256 a, uint256 b) internal pure returns (uint256) {
        return a < b ? a : b;
    }

    /**
     * @dev Returns the average of two numbers. The result is rounded towards
     * zero.
     */
    function average(uint256 a, uint256 b) internal pure returns (uint256) {
        // (a + b) / 2 can overflow.
        return (a & b) + (a ^ b) / 2;
    }

    /**
     * @dev Returns the ceiling of the division of two numbers.
     *
     * This differs from standard division with `/` in that it rounds up instead
     * of rounding down.
     */
    function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {
        // (a + b - 1) / b can overflow on addition, so we distribute.
        return a == 0 ? 0 : (a - 1) / b + 1;
    }

    /**
     * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0
     * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)
     * with further edits by Uniswap Labs also under MIT license.
     */
    function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) {
        unchecked {
            // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use
            // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256
            // variables such that product = prod1 * 2^256 + prod0.
            uint256 prod0; // Least significant 256 bits of the product
            uint256 prod1; // Most significant 256 bits of the product
            assembly {
                let mm := mulmod(x, y, not(0))
                prod0 := mul(x, y)
                prod1 := sub(sub(mm, prod0), lt(mm, prod0))
            }

            // Handle non-overflow cases, 256 by 256 division.
            if (prod1 == 0) {
                // Solidity will revert if denominator == 0, unlike the div opcode on its own.
                // The surrounding unchecked block does not change this fact.
                // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic.
                return prod0 / denominator;
            }

            // Make sure the result is less than 2^256. Also prevents denominator == 0.
            require(denominator > prod1, "Math: mulDiv overflow");

            ///////////////////////////////////////////////
            // 512 by 256 division.
            ///////////////////////////////////////////////

            // Make division exact by subtracting the remainder from [prod1 prod0].
            uint256 remainder;
            assembly {
                // Compute remainder using mulmod.
                remainder := mulmod(x, y, denominator)

                // Subtract 256 bit number from 512 bit number.
                prod1 := sub(prod1, gt(remainder, prod0))
                prod0 := sub(prod0, remainder)
            }

            // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.
            // See https://cs.stackexchange.com/q/138556/92363.

            // Does not overflow because the denominator cannot be zero at this stage in the function.
            uint256 twos = denominator & (~denominator + 1);
            assembly {
                // Divide denominator by twos.
                denominator := div(denominator, twos)

                // Divide [prod1 prod0] by twos.
                prod0 := div(prod0, twos)

                // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.
                twos := add(div(sub(0, twos), twos), 1)
            }

            // Shift in bits from prod1 into prod0.
            prod0 |= prod1 * twos;

            // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such
            // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for
            // four bits. That is, denominator * inv = 1 mod 2^4.
            uint256 inverse = (3 * denominator) ^ 2;

            // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works
            // in modular arithmetic, doubling the correct bits in each step.
            inverse *= 2 - denominator * inverse; // inverse mod 2^8
            inverse *= 2 - denominator * inverse; // inverse mod 2^16
            inverse *= 2 - denominator * inverse; // inverse mod 2^32
            inverse *= 2 - denominator * inverse; // inverse mod 2^64
            inverse *= 2 - denominator * inverse; // inverse mod 2^128
            inverse *= 2 - denominator * inverse; // inverse mod 2^256

            // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.
            // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is
            // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1
            // is no longer required.
            result = prod0 * inverse;
            return result;
        }
    }

    /**
     * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.
     */
    function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) {
        uint256 result = mulDiv(x, y, denominator);
        if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {
            result += 1;
        }
        return result;
    }

    /**
     * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.
     *
     * Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11).
     */
    function sqrt(uint256 a) internal pure returns (uint256) {
        if (a == 0) {
            return 0;
        }

        // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.
        //
        // We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have
        // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.
        //
        // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`
        // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`
        // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`
        //
        // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.
        uint256 result = 1 << (log2(a) >> 1);

        // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,
        // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at
        // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision
        // into the expected uint128 result.
        unchecked {
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            return min(result, a / result);
        }
    }

    /**
     * @notice Calculates sqrt(a), following the selected rounding direction.
     */
    function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = sqrt(a);
            return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 2, rounded down, of a positive value.
     * Returns 0 if given 0.
     */
    function log2(uint256 value) internal pure returns (uint256) {
        uint256 result = 0;
        unchecked {
            if (value >> 128 > 0) {
                value >>= 128;
                result += 128;
            }
            if (value >> 64 > 0) {
                value >>= 64;
                result += 64;
            }
            if (value >> 32 > 0) {
                value >>= 32;
                result += 32;
            }
            if (value >> 16 > 0) {
                value >>= 16;
                result += 16;
            }
            if (value >> 8 > 0) {
                value >>= 8;
                result += 8;
            }
            if (value >> 4 > 0) {
                value >>= 4;
                result += 4;
            }
            if (value >> 2 > 0) {
                value >>= 2;
                result += 2;
            }
            if (value >> 1 > 0) {
                result += 1;
            }
        }
        return result;
    }

    /**
     * @dev Return the log in base 2, following the selected rounding direction, of a positive value.
     * Returns 0 if given 0.
     */
    function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = log2(value);
            return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 10, rounded down, of a positive value.
     * Returns 0 if given 0.
     */
    function log10(uint256 value) internal pure returns (uint256) {
        uint256 result = 0;
        unchecked {
            if (value >= 10 ** 64) {
                value /= 10 ** 64;
                result += 64;
            }
            if (value >= 10 ** 32) {
                value /= 10 ** 32;
                result += 32;
            }
            if (value >= 10 ** 16) {
                value /= 10 ** 16;
                result += 16;
            }
            if (value >= 10 ** 8) {
                value /= 10 ** 8;
                result += 8;
            }
            if (value >= 10 ** 4) {
                value /= 10 ** 4;
                result += 4;
            }
            if (value >= 10 ** 2) {
                value /= 10 ** 2;
                result += 2;
            }
            if (value >= 10 ** 1) {
                result += 1;
            }
        }
        return result;
    }

    /**
     * @dev Return the log in base 10, following the selected rounding direction, of a positive value.
     * Returns 0 if given 0.
     */
    function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = log10(value);
            return result + (rounding == Rounding.Up && 10 ** result < value ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 256, rounded down, of a positive value.
     * Returns 0 if given 0.
     *
     * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.
     */
    function log256(uint256 value) internal pure returns (uint256) {
        uint256 result = 0;
        unchecked {
            if (value >> 128 > 0) {
                value >>= 128;
                result += 16;
            }
            if (value >> 64 > 0) {
                value >>= 64;
                result += 8;
            }
            if (value >> 32 > 0) {
                value >>= 32;
                result += 4;
            }
            if (value >> 16 > 0) {
                value >>= 16;
                result += 2;
            }
            if (value >> 8 > 0) {
                result += 1;
            }
        }
        return result;
    }

    /**
     * @dev Return the log in base 256, following the selected rounding direction, of a positive value.
     * Returns 0 if given 0.
     */
    function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = log256(value);
            return result + (rounding == Rounding.Up && 1 << (result << 3) < value ? 1 : 0);
        }
    }
}

File 24 of 25 : SignedMath.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SignedMath.sol)

pragma solidity ^0.8.0;

/**
 * @dev Standard signed math utilities missing in the Solidity language.
 */
library SignedMath {
    /**
     * @dev Returns the largest of two signed numbers.
     */
    function max(int256 a, int256 b) internal pure returns (int256) {
        return a > b ? a : b;
    }

    /**
     * @dev Returns the smallest of two signed numbers.
     */
    function min(int256 a, int256 b) internal pure returns (int256) {
        return a < b ? a : b;
    }

    /**
     * @dev Returns the average of two signed numbers without overflow.
     * The result is rounded towards zero.
     */
    function average(int256 a, int256 b) internal pure returns (int256) {
        // Formula from the book "Hacker's Delight"
        int256 x = (a & b) + ((a ^ b) >> 1);
        return x + (int256(uint256(x) >> 255) & (a ^ b));
    }

    /**
     * @dev Returns the absolute unsigned value of a signed value.
     */
    function abs(int256 n) internal pure returns (uint256) {
        unchecked {
            // must be unchecked in order to support `n = type(int256).min`
            return uint256(n >= 0 ? n : -n);
        }
    }
}

File 25 of 25 : 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);
}

Settings
{
  "viaIR": true,
  "codegen": "yul",
  "remappings": [
    "forge-std/=lib/forge-std/src/",
    "hardhat/=node_modules/hardhat/",
    "murky/=lib/murky/",
    "permit2/=lib/permit2/src/",
    "solmate/=lib/solmate/",
    "vesting-schedule/=lib/vesting-schedule/src/",
    "layer0/=lib/layer-zero-examples/contracts/",
    "seadrop/=lib/seadrop/",
    "ERC721A/=lib/ERC721A/contracts/",
    "chainlink/=lib/chainlink-brownie-contracts/contracts/src/v0.8/",
    "@openzeppelin/contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts/",
    "openzeppelin-contracts/=lib/openzeppelin-contracts/contracts/",
    "openzeppelin-contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts/",
    "permit2-test/=lib/permit2/test/",
    "@ensdomains/=lib/vesting-schedule/node_modules/@ensdomains/",
    "@openzeppelin/=node_modules/@openzeppelin/",
    "@prb/test/=lib/vesting-schedule/lib/prb-test/src/",
    "@uniswap/=lib/layer-zero-examples/node_modules/@uniswap/",
    "ERC721A-Upgradeable/=lib/seadrop/lib/ERC721A-Upgradeable/contracts/",
    "chainlink-brownie-contracts/=lib/chainlink-brownie-contracts/contracts/src/v0.6/vendor/@arbitrum/nitro-contracts/src/",
    "create2-helpers/=lib/seadrop/lib/create2-helpers/",
    "create2-scripts/=lib/seadrop/lib/create2-helpers/script/",
    "ds-test/=lib/forge-std/lib/ds-test/src/",
    "erc4626-tests/=lib/openzeppelin-contracts-upgradeable/lib/erc4626-tests/",
    "eth-gas-reporter/=node_modules/eth-gas-reporter/",
    "forge-gas-snapshot/=lib/permit2/lib/forge-gas-snapshot/src/",
    "hardhat-deploy/=lib/layer-zero-examples/node_modules/hardhat-deploy/",
    "layer-zero-examples/=lib/layer-zero-examples/contracts/",
    "openzeppelin/=lib/openzeppelin-contracts-upgradeable/contracts/",
    "operator-filter-registry/=lib/seadrop/lib/operator-filter-registry/",
    "prb-test/=lib/vesting-schedule/lib/prb-test/src/",
    "utility-contracts/=lib/seadrop/lib/utility-contracts/"
  ],
  "evmVersion": "shanghai",
  "outputSelection": {
    "*": {
      "*": [
        "abi",
        "metadata"
      ],
      "": [
        "ast"
      ]
    }
  },
  "optimizer": {
    "enabled": true,
    "mode": "3",
    "fallback_to_optimizing_for_size": false,
    "disable_system_request_memoization": true
  },
  "metadata": {},
  "libraries": {},
  "enableEraVMExtensions": false,
  "forceEVMLA": false
}

Contract ABI

[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"INOFactory_DefaultINO_NotSet","type":"error"},{"inputs":[],"name":"INOFactory_DefaultINO_ZeroAddr","type":"error"},{"inputs":[{"internalType":"string","name":"name","type":"string"}],"name":"INOFactory_INONameExists","type":"error"},{"inputs":[],"name":"INOFactory_IndexesReversed","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"defaultINO","type":"address"},{"indexed":true,"internalType":"address","name":"newDefaultINO","type":"address"}],"name":"DefaultINOUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"string","name":"inoName","type":"string"},{"indexed":true,"internalType":"address","name":"ino","type":"address"}],"name":"INOCreated","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"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"inoName","type":"string"},{"components":[{"internalType":"address","name":"paymentReceiver","type":"address"},{"internalType":"address","name":"projectWallet","type":"address"}],"internalType":"struct INOStorage.SetUp","name":"inoSetUp","type":"tuple"},{"components":[{"internalType":"address","name":"paymentToken","type":"address"},{"internalType":"address","name":"permit2","type":"address"}],"internalType":"struct SaleStorage.SetUp","name":"saleSetUp","type":"tuple"},{"internalType":"string[]","name":"phaseIds","type":"string[]"},{"components":[{"components":[{"internalType":"enum Status","name":"status","type":"uint8"},{"internalType":"bytes32","name":"rootHash","type":"bytes32"},{"internalType":"uint128","name":"startAt","type":"uint128"},{"internalType":"uint128","name":"endAt","type":"uint128"},{"internalType":"uint256","name":"maxPhaseCap","type":"uint256"}],"internalType":"struct Phase","name":"base","type":"tuple"},{"internalType":"uint256","name":"phaseMaxMint","type":"uint256"}],"internalType":"struct INOPhase[]","name":"phases","type":"tuple[]"}],"name":"createINO","outputs":[{"internalType":"address","name":"ino","type":"address"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"defaultINO","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"from","type":"uint256"},{"internalType":"uint256","name":"to","type":"uint256"}],"name":"getInosDetails","outputs":[{"components":[{"internalType":"string","name":"name","type":"string"},{"internalType":"address","name":"ino","type":"address"},{"components":[{"internalType":"address","name":"paymentReceiver","type":"address"},{"internalType":"address","name":"projectWallet","type":"address"}],"internalType":"struct INOStorage.SetUp","name":"inoSetUp","type":"tuple"},{"components":[{"internalType":"address","name":"paymentToken","type":"address"},{"internalType":"address","name":"permit2","type":"address"}],"internalType":"struct SaleStorage.SetUp","name":"saleSetUp","type":"tuple"}],"internalType":"struct IINOFactoryInternal.INODetail[]","name":"inos","type":"tuple[]"},{"internalType":"uint256","name":"lastEvaludatedIndex","type":"uint256"},{"internalType":"uint256","name":"totalItems","type":"uint256"}],"stateMutability":"view","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":"maxLoop","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","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":"newMaxLoop","type":"uint256"}],"name":"setMaxLoop","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":"newDefaultINO","type":"address"}],"name":"updateDefaultINO","outputs":[],"stateMutability":"nonpayable","type":"function"}]

9c4d535b0000000000000000000000000000000000000000000000000000000000000000010002dfe233df9b7c38cb59c94702fc2f3da0d1fefe73c7cb5f4a621186c20a00000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000000

Deployed Bytecode

0x0002000000000002000d00000000000200010000000103550000006003100270000002810030019d0000008004000039000000400040043f0000000100200190000000370000c13d0000028102300197000000040020008c000005270000413d000000000301043b000000e0033002700000028b0030009c0000008c0000a13d0000028c0030009c000000a90000213d000002920030009c0000012d0000213d000002950030009c000002170000613d000002960030009c000005270000c13d000000440020008c000005270000413d0000000002000416000000000002004b000005270000c13d0000000402100370000000000202043b000000000020043f0000000102000039000000200020043f0000002401100370000000000101043b000d00000001001d0000004002000039000000000100001909fe09df0000040f0000000d0200002909fe09c30000040f0000000302200210000000000101041a000000000121022f000002a701100197000000ff0020008c0000000001002019000000400200043d0000000000120435000002810020009c00000281020080410000004001200210000002b1011001c7000009ff0001042e0000000001000416000000000001004b000005270000c13d00000001010000390000000202000039000000000012041b00000064010000390000000302000039000000000012041b0000000001000411000000000010043f0000028201000041000000200010043f0000000001000414000002810010009c0000028101008041000000c00110021000000283011001c7000080100200003909fe09f90000040f0000000100200190000005270000613d000000000101043b000000000101041a000000ff00100190000000710000c13d0000000001000411000000000010043f0000028201000041000000200010043f0000000001000414000002810010009c0000028101008041000000c00110021000000283011001c7000080100200003909fe09f90000040f0000000100200190000005270000613d000000000101043b000000000201041a000002d00220019700000001022001bf000000000021041b0000000001000414000002810010009c0000028101008041000000c00110021000000284011001c70000800d020000390000000403000039000002850400004100000000050000190000000006000411000000000706001909fe09f40000040f0000000100200190000005270000613d0000000001000411000000000010043f0000028601000041000000200010043f0000000001000414000002810010009c0000028101008041000000c00110021000000283011001c7000080100200003909fe09f90000040f0000000100200190000005270000613d000000000101043b000000000101041a000000000001004b0000028c0000c13d0000028701000041000000000201041a000002880020009c000002690000413d000002ac01000041000000000010043f0000004101000039000000040010043f000002ad0100004100000a0000010430000002970030009c000000c90000a13d000002980030009c000001200000213d0000029b0030009c0000014a0000613d0000029c0030009c000005270000c13d000000240020008c000005270000413d0000000002000416000000000002004b000005270000c13d0000000401100370000000000101043b000002a70010009c000005270000213d000d02a70010019b09fe074b0000040f0000000d0000006b000003500000c13d000000400100043d000002b8020000410000000000210435000002810010009c00000281010080410000004001100210000002b9011001c700000a00000104300000028d0030009c000001370000213d000002900030009c000002280000613d000002910030009c000005270000c13d000000440020008c000005270000413d0000000002000416000000000002004b000005270000c13d0000002402100370000000000202043b000d00000002001d000002a70020009c000005270000213d0000000401100370000000000101043b000c00000001001d000000000010043f000000200000043f0000004002000039000000000100001909fe09df0000040f0000000101100039000000000101041a09fe07fb0000040f0000000c010000290000000d0200002909fe08e10000040f0000000001000019000009ff0001042e0000029d0030009c0000025c0000613d0000029e0030009c0000020a0000613d0000029f0030009c000005270000c13d000000e40020008c000005270000413d0000000003000416000000000003004b000005270000c13d0000000403100370000000000303043b000002a00030009c000005270000213d0000002304300039000000000024004b000005270000813d000d00040030003d0000000d04100360000000000404043b000002a00040009c000005270000213d000c00240030003d0000000c03400029000000000023004b000005270000213d000000c003000039000000400030043f0000006403100370000000000303043b000002a70030009c000005270000213d000000800030043f0000008403100370000000000303043b000002a70030009c000005270000213d000000a00030043f000000a403100370000000000303043b000002a00030009c000005270000213d0000002304300039000000000024004b000005270000813d0000000404300039000000000441034f000000000404043b000002a00040009c000005270000213d000000050440021000000000034300190000002403300039000000000023004b000005270000213d000000c403100370000000000303043b000002a00030009c000005270000213d0000002304300039000000000024004b000005270000813d0000000404300039000000000141034f000000000101043b000002a00010009c000005270000213d000000c0011000c900000000011300190000002401100039000000000021004b000005270000213d0000000201000039000000000101041a000000020010008c000003df0000c13d000002b201000041000000c00010043f0000002001000039000000c40010043f0000001f01000039000000e40010043f000002ca01000041000001040010043f000002cb0100004100000a0000010430000002990030009c000001580000613d0000029a0030009c000005270000c13d0000000001000416000000000001004b000005270000c13d0000000601000039000000000101041a000002a701100197000000800010043f000002b001000041000009ff0001042e000002930030009c000002360000613d000002940030009c000005270000c13d0000000001000416000000000001004b000005270000c13d000000800000043f000002b001000041000009ff0001042e0000028e0030009c000002540000613d0000028f0030009c000005270000c13d000000440020008c000005270000413d0000000002000416000000000002004b000005270000c13d0000000402100370000000000802043b0000002401100370000000000101043b000000000281004b000002910000813d000002ae01000041000000800010043f000002af0100004100000a0000010430000000240020008c000005270000413d0000000002000416000000000002004b000005270000c13d0000000401100370000000000101043b000000000010043f000000200000043f0000004002000039000000000100001909fe09df0000040f0000000101100039000002580000013d000000440020008c000005270000413d0000000002000416000000000002004b000005270000c13d0000000402100370000000000202043b000d00000002001d0000002401100370000000000101043b000c00000001001d000002a70010009c000005270000213d0000000d01000029000000000010043f000000200000043f0000000001000414000002810010009c0000028101008041000000c00110021000000283011001c7000080100200003909fe09f90000040f0000000100200190000005270000613d000000000101043b0000000101100039000000000101041a09fe07fb0000040f0000000d01000029000000000010043f000000200000043f0000000001000414000002810010009c0000028101008041000000c00110021000000283011001c7000080100200003909fe09f90000040f0000000100200190000005270000613d000000000101043b0000000c02000029000000000020043f000000200010043f0000000001000414000002810010009c0000028101008041000000c00110021000000283011001c7000080100200003909fe09f90000040f0000000100200190000005270000613d000000000101043b000000000101041a000000ff00100190000001be0000c13d0000000d01000029000000000010043f000000200000043f0000000001000414000002810010009c0000028101008041000000c00110021000000283011001c7000080100200003909fe09f90000040f0000000100200190000005270000613d000000000101043b0000000c02000029000000000020043f000000200010043f0000000001000414000002810010009c0000028101008041000000c00110021000000283011001c7000080100200003909fe09f90000040f0000000100200190000005270000613d000000000101043b000000000201041a000002d00220019700000001022001bf000000000021041b0000000001000414000002810010009c0000028101008041000000c00110021000000284011001c70000800d020000390000000403000039000000000700041100000285040000410000000d050000290000000c0600002909fe09f40000040f0000000100200190000005270000613d0000000d01000029000000000010043f0000000101000039000000200010043f0000000001000414000002810010009c0000028101008041000000c00110021000000283011001c7000080100200003909fe09f90000040f0000000100200190000005270000613d000000000201043b0000000c01000029000000000010043f000d00000002001d0000000101200039000b00000001001d000000200010043f0000000001000414000002810010009c0000028101008041000000c00110021000000283011001c7000080100200003909fe09f90000040f0000000100200190000005270000613d000000000101043b000000000101041a000000000001004b000002080000c13d0000000d01000029000000000101041a000a00000001001d000002a00010009c000000860000213d0000000a0100002900000001011000390000000d02000029000000000012041b000000000020043f0000000001000414000002810010009c0000028101008041000000c00110021000000289011001c7000080100200003909fe09f90000040f0000000100200190000005270000613d000000000101043b0000000a011000290000000c02000029000000000021041b0000000d01000029000000000101041a000d00000001001d000000000020043f0000000b01000029000000200010043f0000000001000414000002810010009c0000028101008041000000c00110021000000283011001c7000080100200003909fe09f90000040f0000000100200190000005270000613d000000000101043b0000000d02000029000000000021041b0000000001000019000009ff0001042e000000240020008c000005270000413d0000000001000416000000000001004b000005270000c13d09fe074b0000040f00000004010000390000000101100367000000000101043b0000000302000039000000000012041b0000000001000019000009ff0001042e000000440020008c000005270000413d0000000002000416000000000002004b000005270000c13d0000002402100370000000000302043b000002a70030009c000005270000213d0000000002000411000000000023004b000003670000c13d0000000401100370000000000101043b09fe08e10000040f0000000001000019000009ff0001042e000000240020008c000005270000413d0000000002000416000000000002004b000005270000c13d0000000401100370000000000101043b000000000010043f0000000101000039000000200010043f0000004002000039000000000100001909fe09df0000040f000002580000013d000000440020008c000005270000413d0000000002000416000000000002004b000005270000c13d0000002402100370000000000202043b000d00000002001d000002a70020009c000005270000213d0000000401100370000000000101043b000000000010043f000000200000043f0000004002000039000000000100001909fe09df0000040f0000000d02000029000000000020043f000000200010043f0000000001000019000000400200003909fe09df0000040f000000000101041a000000ff001001900000000001000039000000010100c039000000800010043f000002b001000041000009ff0001042e0000000001000416000000000001004b000005270000c13d0000000301000039000000000101041a000000800010043f000002b001000041000009ff0001042e000000240020008c000005270000413d0000000002000416000000000002004b000005270000c13d0000000401100370000000000101043b000002cc00100198000005270000c13d000002cd0010009c000003730000c13d0000000102000039000003780000013d000d00000002001d0000000102200039000000000021041b000000000010043f0000000001000414000002810010009c0000028101008041000000c00110021000000289011001c7000080100200003909fe09f90000040f0000000100200190000005270000613d000000000101043b0000000d011000290000000002000411000000000021041b0000028701000041000000000101041a000d00000001001d000000000020043f0000028601000041000000200010043f0000000001000414000002810010009c0000028101008041000000c00110021000000283011001c7000080100200003909fe09f90000040f0000000100200190000005270000613d000000000101043b0000000d02000029000000000021041b0000002001000039000001000010044300000120000004430000028a01000041000009ff0001042e0000000303000039000000000303041a0000000007830019000000000032004b000000000701a0190000000409000039000000000109041a000000000017004b000700000001001d00000000070180190000000003870049000002a00030009c000000860000213d00000005013002100000003f02100039000002a104200197000002a20040009c000000860000213d0000008002400039000000400020043f000000800030043f000000000087004b0000037c0000c13d000000000087004b000800000007001d000003340000a13d000000200600008a0000000702000029000000000082004b000003d90000a13d000000000090043f000000400a00043d000002a200a0009c000000860000213d000000060b8000c9000002a501b0009a000000800ca000390000004000c0043f000000000301041a000000010430019000000001093002700000007f0990618f0000001f0090008c00000000050000390000000105002039000000000553013f00000001005001900000054d0000c13d00000000009c0435000000000004004b000002e90000613d000900000009001d000a0000000c001d000b0000000b001d000c0000000a001d000d00000008001d000000000010043f0000000001000414000002810010009c0000028101008041000000c00110021000000289011001c7000080100200003909fe09f90000040f0000000100200190000005270000613d0000000409000039000000000209041a000000090d00002900000000000d004b0000000807000029000002f10000613d0000000c0a000029000000a003a00039000000000401043b00000000010000190000000d080000290000000b0b0000290000000a0c0000290000000005130019000000000604041a0000000000650435000000010440003900000020011000390000000000d1004b000002e00000413d000000200600008a000002f70000013d000002d001300197000000a003a000390000000000130435000000000009004b000000200100003900000000010060390000000409000039000002f70000013d00000000010000190000000d08000029000000200600008a0000000c0a0000290000000b0b0000290000000a0c0000290000003f01100039000000000361016f0000000001c30019000000000031004b00000000030000390000000103004039000002a00010009c000000860000213d0000000100300190000000860000c13d000000400010043f0000000001ca0436000002a603b0009a000000000303041a000002a7033001970000000000310435000000400100043d000002a40010009c000000860000213d0000004003100039000000400030043f000002a803b0009a000000000303041a000002a7033001970000000003310436000002a904b0009a000000000404041a000002a70440019700000000004304350000004003a000390000000000130435000000400100043d000002a40010009c000000860000213d0000004003100039000000400030043f000002aa03b0009a000000000303041a000002a7033001970000000003310436000002ab04b0009a000000000404041a000002a70440019700000000004304350000006003a0003900000000001304350000000101900367000000000101043b0000000001180049000000800300043d000000000013004b000003d90000a13d0000000503100210000000a0033000390000000000a30435000000800300043d000000000013004b000003d90000a13d0000000108800039000000000078004b000002ad0000413d000000400100043d00000060020000390000000002210436000d00000002001d0000006002100039000000800300043d0000000000320435000000800510003900000005023002100000000004520019000000000003004b000003a10000c13d0000004002100039000000070300002900000000003204350000000802000029000000010220008a0000000d0300002900000000002304350000000002140049000002810020009c00000281020080410000006002200210000002810010009c00000281010080410000004001100210000000000112019f000009ff0001042e0000000601000039000000000201041a0000000001000414000002810010009c0000028101008041000000c00110021000000284011001c7000c00000002001d000002a7052001970000800d020000390000000303000039000002b6040000410000000d0600002909fe09f40000040f0000000100200190000005270000613d0000000c01000029000002b7011001970000000d011001af0000000602000039000000000012041b0000000001000019000009ff0001042e000002b201000041000000800010043f0000002001000039000000840010043f0000002f01000039000000a40010043f000002b301000041000000c40010043f000002b401000041000000e40010043f000002b50100004100000a0000010430000002ce0010009c00000000020000390000000102006039000002cf0010009c00000001022061bf000000010120018f000000800010043f000002b001000041000009ff0001042e000002a30040009c000000860000213d000000600300003900000000040000190000008005200039000000400050043f00000000053204360000000000050435000000400500043d000002a40050009c000000860000213d0000004006500039000000400060043f00000020065000390000000000060435000000000005043500000040062000390000000000560435000000400500043d000002a40050009c000000860000213d0000004006500039000000400060043f00000020065000390000000000060435000000000005043500000060062000390000000000560435000000a00540003900000000002504350000002004400039000000000014004b000002a80000813d000000400200043d000002a20020009c000003800000a13d000000860000013d000000a0060000390000000009000019000003c30000013d0000000002ba0019000000000002043500000000020e0433000002a70220019700000000002d04350000004002c0003900000000020204330000000072020434000002a702200197000000400840003900000000002804350000000002070433000002a702200197000000600740003900000000002704350000006002c0003900000000020204330000000072020434000002a70220019700000080084000390000000000280435000000a0024000390000000004070433000002a70440019700000000004204350000001f02a00039000002d1022001970000000004b200190000000109900039000000000039004b000003400000813d0000000002140049000000800220008a0000000005250436000000006c06043400000000e20c0434000000c007000039000000000d740436000000c00b40003900000000fa0204340000000000ab0435000000e00b40003900000000000a004b000003a40000613d00000000020000190000000007b2001900000000082f00190000000008080433000000000087043500000020022000390000000000a2004b000003d10000413d000003a40000013d000002ac01000041000000000010043f0000003201000039000000040010043f000002ad0100004100000a00000104300000000201000039000000000011041b09fe074b0000040f0000000d0300002900000001023003670000002003300039000b00000003001d0000000104300367000000000102043b000002d1051001980000001f0610018f000000400200043d0000000003520019000003f30000613d000000000704034f0000000008020019000000007907043c0000000008980436000000000038004b000003ef0000c13d000000000006004b000004000000613d000000000454034f0000000305600210000000000603043300000000065601cf000000000656022f000000000404043b0000010005500089000000000454022f00000000045401cf000000000464019f0000000000430435000000000321001900000005040000390000000000430435000002810020009c000002810200804100000040022002100000002001100039000002810010009c00000281010080410000006001100210000000000121019f0000000002000414000002810020009c0000028102008041000000c002200210000000000112019f00000284011001c7000080100200003909fe09f90000040f0000000100200190000005270000613d000000400b00043d000000000101043b000000000101041a000002a700100198000004260000c13d0000000601000039000000000101041a000c00000001001d000002a7001001980000043c0000c13d000002c90100004100000000001b04350000028100b0009c000002810b0080410000004001b00210000002b9011001c700000a0000010430000002ba01000041000a0000000b001d00000000001b04350000000401b00039000000200200003900000000002104350000000d010000290000000101100367000000000201043b0000002403b000390000000c0100002909fe08c20000040f0000000a020000290000000001210049000002810020009c00000281020080410000004002200210000002810010009c00000281010080410000006001100210000000000121019f00000a0000010430000000000100041100000060021002100000002001b0003900000000002104350000000b0300002900000001053003670000000d030000290000000102300367000000000202043b000002d1062001980000001f0720018f0000003403b000390000000004630019000004500000613d000000000805034f0000000009030019000000008a08043c0000000009a90436000000000049004b0000044c0000c13d000000000007004b0000045d0000613d000000000565034f0000000306700210000000000704043300000000076701cf000000000767022f000000000505043b0000010006600089000000000565022f00000000056501cf000000000575019f000000000054043500000000033200190000000000030435000000140320003900000000003b04350000005302200039000002d1032001970000000002b30019000000000032004b00000000030000390000000103004039000002a00020009c000000860000213d0000000100300190000000860000c13d000000400020043f000002810010009c0000028101008041000000400110021000000000020b0433000002810020009c00000281020080410000006002200210000000000112019f0000000002000414000002810020009c0000028102008041000000c002200210000000000112019f00000284011001c7000080100200003909fe09f90000040f0000000100200190000005270000613d000000000101043b0000000c030000290000008802300270000002bb02200197000002bc022001c7000000000020043f0000007802300210000002bd022001c7000000200020043f0000000002000414000002be03000041000000090030043f0000000d0010043f00000060010000390000004d0010043f0000004d0100008a0000006d0010043f000002810020009c0000028102008041000000c001200210000002bf011001c7000080060200003909fe09f40000040f00000001002001900000049a0000613d000000000101043b000802a70010019c000004ab0000c13d000000400100043d0000004402100039000002c7030000410000000000320435000000240210003900000017030000390000000000320435000002b2020000410000000000210435000000040210003900000020030000390000000000320435000002810010009c00000281010080410000004001100210000002c8011001c700000a00000104300000000b0200002900000001042003670000000d020000290000000101200367000000000101043b000002d1051001980000001f0610018f000000400200043d0000000003520019000004bb0000613d000000000704034f0000000008020019000000007907043c0000000008980436000000000038004b000004b70000c13d000000000006004b000004c80000613d000000000454034f0000000305600210000000000603043300000000065601cf000000000656022f000000000404043b0000010005500089000000000454022f00000000045401cf000000000464019f0000000000430435000000000321001900000005040000390000000000430435000002810020009c000002810200804100000040022002100000002001100039000002810010009c00000281010080410000006001100210000000000121019f0000000002000414000002810020009c0000028102008041000000c002200210000000000112019f00000284011001c7000080100200003909fe09f90000040f0000000100200190000005270000613d000000000101043b000000000201041a000002b70220019700000008022001af000000000021041b000000400100043d000002a20010009c000000860000213d0000008003100039000000400030043f00000001020003670000000d04200360000000000404043b0000001f05400039000002d1055001970000003f05500039000002d1065001970000000005360019000000000065004b00000000060000390000000106004039000002a00050009c000000860000213d0000000100600190000000860000c13d000000400050043f0000000b072003600000000000430435000002d1084001980000001f0940018f000000a0051000390000000006850019000005040000613d000000000a07034f000000000b05001900000000ac0a043c000000000bcb043600000000006b004b000005000000c13d000000000009004b000005110000613d000000000787034f0000000308900210000000000906043300000000098901cf000000000989022f000000000707043b0000010008800089000000000787022f00000000078701cf000000000797019f00000000007604350000000004540019000000000004043500000000043104360000000803000029000a00000004001d0000000000340435000000400300043d000002a40030009c000000860000213d0000004004300039000000400040043f0000002404200370000000000404043b000002a70040009c0000008005000039000005270000213d00000000044304360000004402200370000000000202043b000900000002001d000002a70020009c000005290000a13d000000000100001900000a0000010430000000090200002900000000002404350000006002100039000700000002001d00000000005204350000004002100039000600000002001d00000000003204350000000403000039000000000203041a000002a00020009c000000860000213d0000000104200039000000000043041b000000000030043f0000000001010433000c00000001001d0000000031010434000400000003001d000500000001001d000002a00010009c000000860000213d00000006012000c9000100000001001d000002a50110009a000300000001001d000000000101041a000000010210019000000001011002700000007f0110618f000200000001001d0000001f0010008c00000000010000390000000101002039000000000012004b000005530000613d000002ac01000041000000000010043f0000002201000039000000040010043f000002ad0100004100000a00000104300000000201000029000000200010008c000005720000413d0000000301000029000000000010043f0000000001000414000002810010009c0000028101008041000000c00110021000000289011001c7000080100200003909fe09f90000040f0000000100200190000005270000613d00000005030000290000001f023000390000000502200270000000200030008c0000000002004019000000000301043b00000002010000290000001f01100039000000050110027000000000011300190000000002230019000000000012004b000005720000813d000000000002041b0000000102200039000000000012004b0000056e0000413d00000005010000290000001f0010008c000005860000a13d0000000301000029000000000010043f0000000001000414000002810010009c0000028101008041000000c00110021000000289011001c7000080100200003909fe09f90000040f0000000100200190000005270000613d000000200200008a0000000503200180000000000101043b000005930000c13d00000020020000390000059f0000013d000000050000006b00000000010000190000058b0000613d0000000401000029000000000101043300000005040000290000000302400210000002d20220027f000002d202200167000000000121016f0000000102400210000000000121019f000005ad0000013d000000010230008a00000005022002700000000004210019000000200200003900000001044000390000000c052000290000000005050433000000000051041b00000020022000390000000101100039000000000041004b000005980000c13d000000050030006c000005aa0000813d00000005030000290000000303300210000000f80330018f000002d20330027f000002d2033001670000000c022000290000000002020433000000000232016f000000000021041b0000000501000029000000010110021000000001011001bf0000000302000029000000000012041b0000000a010000290000000001010433000002a7011001970000000105000029000002a60250009a000000000302041a000002b703300197000000000113019f000000000012041b000002a80150009a000000000201041a000002b702200197000000060300002900000000030304330000000043030434000002a703300197000000000232019f000000000021041b0000000001040433000002a701100197000002a90250009a000000000302041a000002b703300197000000000113019f000000000012041b000002aa0150009a000000000201041a000002b702200197000000070300002900000000030304330000000043030434000002a703300197000000000232019f000000000021041b000002ab0150009a0000000002040433000002a702200197000000000301041a000002b703300197000000000223019f000000000021041b000002c0010000410000000000100443000000080100002900000004001004430000000001000414000002810010009c0000028101008041000000c001100210000002c1011001c7000080020200003909fe09f90000040f0000000100200190000006a80000613d000000000101043b000000000001004b000005270000613d000000400400043d000002c2010000410000000000140435000000800100043d000002a701100197000000040240003900000000001204350000004401400039000000a00200043d00000000030004110000000000310435000002a701200197000c00000004001d0000002402400039000000000012043500000001010003670000002402100370000000000202043b000002a70020009c000005270000213d0000000c05000029000000a403500039000000e00400003900000000004304350000000903000029000002a7033001970000008404500039000000000034043500000064035000390000000000230435000000a402100370000000000202043b000a00000002001d0000000402200039000000000221034f000000000302043b000000e402500039000000000032043500000104045000390000000502300210000000000a420019000900000003001d000000000003004b000006a90000c13d0000000c0300002900000000023a0049000000040220008a000000c4033000390000000000230435000000c402100370000000000402043b0000000402400039000000000221034f000000000302043b00000000023a0436000000000003004b000006490000613d00000024044000390000000005000019000000000641034f000000000606043b000000030060008c000005270000213d00000000066204360000002007400039000000000771034f000000000707043b00000000007604350000004006400039000000000761034f000000000707043b000002c40070009c000005270000213d000000400820003900000000007804350000002006600039000000000761034f000000000707043b000002c40070009c000005270000213d000000600820003900000000007804350000002007600039000000000771034f000000000707043b000000800820003900000000007804350000004006600039000000000661034f000000000606043b000000a0072000390000000000670435000000c004400039000000c0022000390000000105500039000000000035004b000006230000413d00000000010004140000000803000029000000040030008c0000065e0000613d0000000c030000290000000002320049000002810020009c00000281020080410000006002200210000002810030009c00000281030080410000004003300210000000000232019f000002810010009c0000028101008041000000c001100210000000000112019f000000080200002909fe09f40000040f0000000100200190000006fa0000613d0000000c01000029000002a00010009c000000860000213d0000000c06000029000000400060043f0000000b0200002900000001032003670000000d020000290000000101200367000000000101043b000002d1041001980000001f0510018f0000000002460019000006720000613d000000000603034f0000000c07000029000000006806043c0000000007870436000000000027004b0000066e0000c13d000000000005004b0000067f0000613d000000000343034f0000000304500210000000000502043300000000054501cf000000000545022f000000000303043b0000010004400089000000000343022f00000000034301cf000000000353019f00000000003204350000000c0300002900000000023100190000000000020435000002810030009c00000281030080410000004002300210000002810010009c00000281010080410000006001100210000000000121019f0000000002000414000002810020009c0000028102008041000000c002200210000000000112019f00000284011001c7000080100200003909fe09f90000040f0000000100200190000005270000613d000000000501043b000000400100043d000d00000001001d0000000001000414000002810010009c0000028101008041000000c00110021000000284011001c70000800d020000390000000303000039000002c604000041000000080600002909fe09f40000040f0000000100200190000005270000613d00000001010000390000000202000039000000000012041b00000008010000290000000d02000029000000310000013d000000000001042f00000000050000310000000a0300002900000000023500490000002406300039000000430720008a000002c3087001970000000009000019000006ba0000013d0000001f03b00039000002d103300197000000000a2b001900000000000a0435000000000a23001900000020066000390000000109900039000000090090006c000006140000813d0000000c02a0006a000001040220008a0000000004240436000000000261034f000000000b02043b000002c302b00197000000000c82013f000000000082004b0000000002000019000002c30200204100000000007b004b000000000d000019000002c30d004041000002c300c0009c00000000020dc019000000000002004b000005270000613d0000000a02b00029000000240c200039000000000bc1034f000000000b0b043b000002a000b0009c000005270000213d0000004402200039000000000db500490000000000d2004b000000000e000019000002c30e002041000002c30dd00197000002c302200197000000000fd2013f0000000000d2004b0000000002000019000002c302004041000002c300f0009c00000000020ec019000000000002004b000005270000c13d0000002002c00039000000000d21034f0000000002ba0436000002d10eb00198000000000ce20019000006ec0000613d000000000f0d034f000000000a02001900000000f30f043c000000000a3a04360000000000ca004b000006e80000c13d0000001f0ab00190000006b10000613d0000000003ed034f000000030aa00210000000000d0c0433000000000dad01cf000000000dad022f000000000303043b000001000aa000890000000003a3022f0000000003a301cf0000000003d3019f00000000003c0435000006b10000013d00000060061002700000001f0460018f000002c505600198000000400200043d0000000003520019000007060000613d000000000701034f0000000008020019000000007907043c0000000008980436000000000038004b000007020000c13d0000028106600197000000000004004b000007140000613d000000000151034f0000000304400210000000000503043300000000054501cf000000000545022f000000000101043b0000010004400089000000000141022f00000000014101cf000000000151019f00000000001304350000006001600210000002810020009c00000281020080410000004002200210000000000112019f00000a00000104300000001f02200039000002d1022001970000000001120019000000000021004b00000000020000390000000102004039000002a00010009c000007260000213d0000000100200190000007260000c13d000000400010043f000000000001042d000002ac01000041000000000010043f0000004101000039000000040010043f000002ad0100004100000a0000010430000000000003004b000007360000613d000000000400001900000000052400190000000006140019000000000606043300000000006504350000002004400039000000000034004b0000072f0000413d00000000012300190000000000010435000000000001042d00000000430104340000000001320436000000000003004b000007450000613d000000000200001900000000051200190000000006240019000000000606043300000000006504350000002002200039000000000032004b0000073e0000413d000000000213001900000000000204350000001f02300039000002d1022001970000000001210019000000000001042d00040000000000020000000001000411000000000010043f0000028201000041000000200010043f0000000001000414000002810010009c0000028101008041000000c00110021000000283011001c7000080100200003909fe09f90000040f00000001002001900000075e0000613d000000000101043b000000000101041a000000ff00100190000007600000613d000000000001042d000000000100001900000a0000010430000000400200043d000002d30020009c000007690000413d000002ac01000041000000000010043f0000004101000039000000040010043f000002ad0100004100000a00000104300000006004200039000000400040043f0000002a01000039000000000112043600000000030000310000000103300367000000000503034f0000000006010019000000005705043c0000000006760436000000000046004b000007710000c13d0000000004010433000002d404400197000002d5044001c7000000000041043500000021042000390000000005040433000002d405500197000002d6055001c700000000005404350000002904000039000000000600041100000000050600190000000006020433000000000046004b000007e60000a13d00000000061400190000000007060433000002d4077001970000000308500210000000780880018f000002d70880021f000002d808800197000000000787019f00000000007604350000000406500270000000010440008a000000010040008c000007800000213d000000400700043d000000100050008c000007ec0000813d000002a20070009c000007630000213d0000008004700039000000400040043f000000420500003900000000055704360000000008050019000000003603043c0000000005650436000000000045004b0000079b0000c13d0000000003080433000002d403300197000002d5033001c70000000000380435000000000607001900000021037000390000000004030433000002d404400197000002d6044001c7000000000043043500000041030000390000000004060433000000000034004b000007e60000a13d00000000048300190000000005040433000002d405500197000002d5055001c70000000000540435000000010330008a000000010030008c000007aa0000213d000000400500043d000400000005001d0000002003500039000002da0400004100000000004304350000000003020433000300000003001d0000003702500039000100000006001d000200000008001d09fe072c0000040f000000030200002900000004012000290000003702100039000002db030000410000000000320435000000480210003900000001010000290000000003010433000100000003001d000000020100002909fe072c0000040f00000001020000290000000303200029000000280230003900000004010000290000000000210435000000480230003909fe071a0000040f000002b201000041000000400300043d000300000003001d00000000001304350000002001000039000000040230003900000000001204350000002402300039000000040100002909fe07390000040f00000003020000290000000001210049000002810010009c0000028101008041000002810020009c000002810200804100000060011002100000004002200210000000000121019f00000a0000010430000002ac01000041000000000010043f0000003201000039000000040010043f000002ad0100004100000a00000104300000004401700039000002d9020000410000000000210435000002b201000041000000000017043500000024017000390000002002000039000000000021043500000004017000390000000000210435000002810070009c00000281070080410000004001700210000002c8011001c700000a00000104300004000000000002000400000001001d000000000010043f000000200000043f0000000001000414000002810010009c0000028101008041000000c00110021000000283011001c7000080100200003909fe09f90000040f00000001002001900000081a0000613d000000000101043b0000000002000411000000000020043f000000200010043f0000000001000414000002810010009c0000028101008041000000c00110021000000283011001c7000080100200003909fe09f90000040f00000001002001900000081a0000613d000000000101043b000000000101041a000000ff001001900000081c0000613d000000000001042d000000000100001900000a0000010430000000400200043d000002d30020009c000008250000413d000002ac01000041000000000010043f0000004101000039000000040010043f000002ad0100004100000a00000104300000006004200039000000400040043f0000002a01000039000000000112043600000000030000310000000103300367000000000503034f0000000006010019000000005705043c0000000006760436000000000046004b0000082d0000c13d0000000004010433000002d404400197000002d5044001c7000000000041043500000021042000390000000005040433000002d405500197000002d6055001c700000000005404350000002904000039000000000600041100000000050600190000000006020433000000000046004b000008ac0000a13d00000000061400190000000007060433000002d4077001970000000308500210000000780880018f000002d70880021f000002d808800197000000000787019f00000000007604350000000406500270000000010440008a000000010040008c0000083c0000213d000000100050008c000008b20000813d000000400400043d000300000004001d000002a20040009c0000081f0000213d00000003060000290000008004600039000000400040043f00000042050000390000000005560436000200000005001d000000003603043c0000000005650436000000000045004b000008590000c13d00000002090000290000000003090433000002d403300197000002d5033001c70000000000390435000000030800002900000021038000390000000004030433000002d404400197000002d6044001c700000000004304350000004103000039000000040500002900000000040500190000000005080433000000000035004b000008ac0000a13d00000000059300190000000006050433000002d4066001970000000307400210000000780770018f000002d70770021f000002d807700197000000000667019f00000000006504350000000405400270000000010330008a000000010030008c0000086a0000213d000000100040008c000008b20000813d000000400500043d000400000005001d0000002003500039000002da0400004100000000004304350000000003020433000100000003001d000000370250003909fe072c0000040f000000010200002900000004012000290000003702100039000002db030000410000000000320435000000480210003900000003010000290000000003010433000300000003001d000000020100002909fe072c0000040f00000003020000290000000103200029000000280230003900000004010000290000000000210435000000480230003909fe071a0000040f000002b201000041000000400300043d000300000003001d00000000001304350000002001000039000000040230003900000000001204350000002402300039000000040100002909fe07390000040f00000003020000290000000001210049000002810010009c0000028101008041000002810020009c000002810200804100000060011002100000004002200210000000000121019f00000a0000010430000002ac01000041000000000010043f0000003201000039000000040010043f000002ad0100004100000a0000010430000000400100043d0000004402100039000002d9030000410000000000320435000002b202000041000000000021043500000024021000390000002003000039000000000032043500000004021000390000000000320435000002810010009c00000281010080410000004001100210000002c8011001c700000a00000104300000000003230436000002d1062001980000001f0720018f00000000056300190000000101100367000008ce0000613d000000000801034f0000000009030019000000008a08043c0000000009a90436000000000059004b000008ca0000c13d000000000007004b000008db0000613d000000000161034f0000000306700210000000000705043300000000076701cf000000000767022f000000000101043b0000010006600089000000000161022f00000000016101cf000000000171019f0000000000150435000000000123001900000000000104350000001f01200039000002d1011001970000000001130019000000000001042d0006000000000002000600000002001d000500000001001d000000000010043f000000200000043f0000000001000414000002810010009c0000028101008041000000c00110021000000283011001c7000080100200003909fe09f90000040f0000000100200190000009af0000613d000000000101043b0000000602000029000002a702200197000600000002001d000000000020043f000000200010043f0000000001000414000002810010009c0000028101008041000000c00110021000000283011001c7000080100200003909fe09f90000040f0000000100200190000009af0000613d000000000101043b000000000101041a000000ff001001900000092d0000613d0000000501000029000000000010043f000000200000043f0000000001000414000002810010009c0000028101008041000000c00110021000000283011001c7000080100200003909fe09f90000040f0000000100200190000009af0000613d000000000101043b0000000602000029000000000020043f000000200010043f0000000001000414000002810010009c0000028101008041000000c00110021000000283011001c7000080100200003909fe09f90000040f0000000100200190000009af0000613d000000000101043b000000000201041a000002d002200197000000000021041b0000000001000414000002810010009c0000028101008041000000c00110021000000284011001c70000800d0200003900000004030000390000000007000411000002dc040000410000000505000029000000060600002909fe09f40000040f0000000100200190000009af0000613d0000000501000029000000000010043f0000000101000039000000200010043f0000000001000414000002810010009c0000028101008041000000c00110021000000283011001c7000080100200003909fe09f90000040f0000000100200190000009af0000613d000000000201043b0000000601000029000000000010043f000500000002001d0000000101200039000300000001001d000000200010043f0000000001000414000002810010009c0000028101008041000000c00110021000000283011001c7000080100200003909fe09f90000040f0000000100200190000009af0000613d0000000503000029000000000101043b000000000101041a000000000001004b000009ae0000613d000000000203041a000000000002004b000009b10000613d000000000012004b000400000001001d0000098e0000613d000200000002001d000000000030043f0000000001000414000002810010009c0000028101008041000000c00110021000000289011001c7000080100200003909fe09f90000040f0000000100200190000009af0000613d00000004020000290001000100200092000000000101043b0000000504000029000000000204041a000000010020006c000009b70000a13d0000000202000029000000010220008a0000000001120019000000000101041a000200000001001d000000000040043f0000000001000414000002810010009c0000028101008041000000c00110021000000289011001c7000080100200003909fe09f90000040f0000000100200190000009af0000613d000000000101043b00000001011000290000000202000029000000000021041b000000000020043f0000000301000029000000200010043f0000000001000414000002810010009c0000028101008041000000c00110021000000283011001c7000080100200003909fe09f90000040f0000000100200190000009af0000613d000000000101043b0000000402000029000000000021041b0000000503000029000000000103041a000400000001001d000000000001004b000009bd0000613d000000000030043f0000000001000414000002810010009c0000028101008041000000c00110021000000289011001c7000080100200003909fe09f90000040f0000000100200190000009af0000613d0000000402000029000000010220008a000000000101043b0000000001210019000000000001041b0000000501000029000000000021041b0000000601000029000000000010043f0000000301000029000000200010043f0000000001000414000002810010009c0000028101008041000000c00110021000000283011001c7000080100200003909fe09f90000040f0000000100200190000009af0000613d000000000101043b000000000001041b000000000001042d000000000100001900000a0000010430000002ac01000041000000000010043f0000001101000039000000040010043f000002ad0100004100000a0000010430000002ac01000041000000000010043f0000003201000039000000040010043f000002ad0100004100000a0000010430000002ac01000041000000000010043f0000003101000039000000040010043f000002ad0100004100000a00000104300001000000000002000000000301041a000100000002001d000000000023004b000009d60000a13d000000000010043f0000000001000414000002810010009c0000028101008041000000c00110021000000289011001c7000080100200003909fe09f90000040f0000000100200190000009dc0000613d000000000101043b00000001011000290000000002000019000000000001042d000002ac01000041000000000010043f0000003201000039000000040010043f000002ad0100004100000a0000010430000000000100001900000a0000010430000000000001042f000002810010009c00000281010080410000004001100210000002810020009c00000281020080410000006002200210000000000112019f0000000002000414000002810020009c0000028102008041000000c002200210000000000112019f00000284011001c7000080100200003909fe09f90000040f0000000100200190000009f20000613d000000000101043b000000000001042d000000000100001900000a0000010430000009f7002104210000000102000039000000000001042d0000000002000019000000000001042d000009fc002104230000000102000039000000000001042d0000000002000019000000000001042d000009fe00000432000009ff0001042e00000a000001043000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffad3228b676f7d3cd4284a5443f17f1962b36e491b30a40b2405849e597ba5fb5020000000000000000000000000000000000004000000000000000000000000002000000000000000000000000000000000000000000000000000000000000002f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0da6eef7e35abe7026729641147f7915573c7e97b47efa546f5f6e3230263bcb4aa6eef7e35abe7026729641147f7915573c7e97b47efa546f5f6e3230263bcb490000000000000000000000000000000000000000000000010000000000000000020000000000000000000000000000000000002000000000000000000000000000000002000000000000000000000000000000400000010000000000000000000000000000000000000000000000000000000000000000000000000036568abd00000000000000000000000000000000000000000000000000000000ca15c87200000000000000000000000000000000000000000000000000000000ed4fe58800000000000000000000000000000000000000000000000000000000ed4fe58900000000000000000000000000000000000000000000000000000000f9f60f4100000000000000000000000000000000000000000000000000000000ca15c87300000000000000000000000000000000000000000000000000000000d547741f0000000000000000000000000000000000000000000000000000000091d148530000000000000000000000000000000000000000000000000000000091d1485400000000000000000000000000000000000000000000000000000000a217fddf0000000000000000000000000000000000000000000000000000000036568abe000000000000000000000000000000000000000000000000000000009010d07c00000000000000000000000000000000000000000000000000000000248a9ca2000000000000000000000000000000000000000000000000000000002f2ff15c000000000000000000000000000000000000000000000000000000002f2ff15d0000000000000000000000000000000000000000000000000000000031d66b6200000000000000000000000000000000000000000000000000000000248a9ca300000000000000000000000000000000000000000000000000000000296f5ae00000000000000000000000000000000000000000000000000000000001ffc9a70000000000000000000000000000000000000000000000000000000005f6711f00000000000000000000000000000000000000000000000000000000205b6bee000000000000000000000000000000000000000000000000ffffffffffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0000000000000000000000000000000000000000000000000ffffffffffffff7f000000000000000000000000000000000000000000000000fffffffffffffeff000000000000000000000000000000000000000000000000ffffffffffffffbf75ca53043ea007e5c65182cbb028f60d7179ff4b55739a3949b401801c942e6575ca53043ea007e5c65182cbb028f60d7179ff4b55739a3949b401801c942e64000000000000000000000000ffffffffffffffffffffffffffffffffffffffff75ca53043ea007e5c65182cbb028f60d7179ff4b55739a3949b401801c942e6375ca53043ea007e5c65182cbb028f60d7179ff4b55739a3949b401801c942e6275ca53043ea007e5c65182cbb028f60d7179ff4b55739a3949b401801c942e6175ca53043ea007e5c65182cbb028f60d7179ff4b55739a3949b401801c942e604e487b7100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002400000000000000000000000072f893640000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000008000000000000000000000000000000000000000000000000000000020000000800000000000000000000000000000000000000000000000000000002000000000000000000000000008c379a000000000000000000000000000000000000000000000000000000000416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636520726f6c657320666f722073656c6600000000000000000000000000000000000000000000000000000000000000000000000084000000800000000000000000b0a7b376836a16413995648d87348fb89d57f4bf17fac35f55708e81f2be6140ffffffffffffffffffffffff0000000000000000000000000000000000000000ce49214a00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000041e2f3f8000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffff0000000000000000003d602d80600a3d3981f3363d3d373d3d3d363d7300000000000000000000000000000000000000005af43d82803e903d91602b57fd5bf33cda33511d41a8a5431b1770c5bc0ddd62e1cd30555d16659b89c0d60f4f9f5702000000000000000000000000000000000000370000000900000000000000001806aa1896bbf26568e884a7374b41e002500962caba6a15023a8d90e8508b8302000002000000000000000000000000000000240000000000000000000000007f0bb8de00000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffffffffffff00000000000000000000000000000000000000000000000000000000ffffffe04b33c752e09f31d0dd77ae123750c1ac8e0636dd352b53f14c15104e973127a1455243313136373a2063726561746532206661696c656400000000000000000000000000000000000000000000000000000000640000000000000000000000004db52209000000000000000000000000000000000000000000000000000000005265656e7472616e637947756172643a207265656e7472616e742063616c6c000000000000000000000000000000000000000064000000c0000000000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffff5a05180f0000000000000000000000000000000000000000000000000000000001ffc9a7000000000000000000000000000000000000000000000000000000007965db0b00000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000000000000000000000000000000000000000000000ffffffffffffffa000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff3000000000000000000000000000000000000000000000000000000000000000780000000000000000000000000000000000000000000000000000000000000030313233343536373839616263646566000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000537472696e67733a20686578206c656e67746820696e73756666696369656e74416363657373436f6e74726f6c3a206163636f756e7420000000000000000000206973206d697373696e6720726f6c6520000000000000000000000000000000f6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b000000000000000000000000000000000000000000000000000000000000000057f51f6563e949bda0761a60124f6372261a6be24e216f20c5cb3f753c0ad597

Block Transaction 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
[ 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.