ETH Price: $3,503.45 (+4.36%)
Gas: 4 Gwei

Token

Zunami ETH APS (apsZunETH)
 

Overview

Max Total Supply

96.76134809982713481 apsZunETH

Holders

3

Market

Onchain Market Cap

$0.00

Circulating Supply Market Cap

-

Other Info

Token Contract (WITH 18 Decimals)

Balance
96.76134809982713281 apsZunETH

Value
$0.00
0xd8132d8cfca9ed8c95e46cb59ae6e2c9963da61f
Loading...
Loading
Loading...
Loading
Loading...
Loading

Click here to update the token information / general information
# Exchange Pair Price  24H Volume % Volume

Contract Source Code Verified (Exact Match)

Contract Name:
ZunamiPoolApsZunETH

Compiler Version
v0.8.23+commit.f704f362

Optimization Enabled:
Yes with 200 runs

Other Settings:
paris EvmVersion
File 1 of 18 : AccessControl.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (access/AccessControl.sol)

pragma solidity ^0.8.20;

import {IAccessControl} from "./IAccessControl.sol";
import {Context} from "../utils/Context.sol";
import {ERC165} from "../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 account => bool) hasRole;
        bytes32 adminRole;
    }

    mapping(bytes32 role => RoleData) private _roles;

    bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;

    /**
     * @dev Modifier that checks that an account has a specific role. Reverts
     * with an {AccessControlUnauthorizedAccount} error including the required role.
     */
    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 returns (bool) {
        return _roles[role].hasRole[account];
    }

    /**
     * @dev Reverts with an {AccessControlUnauthorizedAccount} error if `_msgSender()`
     * is missing `role`. Overriding this function changes the behavior of the {onlyRole} modifier.
     */
    function _checkRole(bytes32 role) internal view virtual {
        _checkRole(role, _msgSender());
    }

    /**
     * @dev Reverts with an {AccessControlUnauthorizedAccount} error if `account`
     * is missing `role`.
     */
    function _checkRole(bytes32 role, address account) internal view virtual {
        if (!hasRole(role, account)) {
            revert AccessControlUnauthorizedAccount(account, role);
        }
    }

    /**
     * @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 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 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 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 `callerConfirmation`.
     *
     * May emit a {RoleRevoked} event.
     */
    function renounceRole(bytes32 role, address callerConfirmation) public virtual {
        if (callerConfirmation != _msgSender()) {
            revert AccessControlBadConfirmation();
        }

        _revokeRole(role, callerConfirmation);
    }

    /**
     * @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 Attempts to grant `role` to `account` and returns a boolean indicating if `role` was granted.
     *
     * Internal function without access restriction.
     *
     * May emit a {RoleGranted} event.
     */
    function _grantRole(bytes32 role, address account) internal virtual returns (bool) {
        if (!hasRole(role, account)) {
            _roles[role].hasRole[account] = true;
            emit RoleGranted(role, account, _msgSender());
            return true;
        } else {
            return false;
        }
    }

    /**
     * @dev Attempts to revoke `role` to `account` and returns a boolean indicating if `role` was revoked.
     *
     * Internal function without access restriction.
     *
     * May emit a {RoleRevoked} event.
     */
    function _revokeRole(bytes32 role, address account) internal virtual returns (bool) {
        if (hasRole(role, account)) {
            _roles[role].hasRole[account] = false;
            emit RoleRevoked(role, account, _msgSender());
            return true;
        } else {
            return false;
        }
    }
}

File 2 of 18 : IAccessControl.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (access/IAccessControl.sol)

pragma solidity ^0.8.20;

/**
 * @dev External interface of AccessControl declared to support ERC165 detection.
 */
interface IAccessControl {
    /**
     * @dev The `account` is missing a role.
     */
    error AccessControlUnauthorizedAccount(address account, bytes32 neededRole);

    /**
     * @dev The caller of a function is not the expected one.
     *
     * NOTE: Don't confuse with {AccessControlUnauthorizedAccount}.
     */
    error AccessControlBadConfirmation();

    /**
     * @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.
     */
    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 `callerConfirmation`.
     */
    function renounceRole(bytes32 role, address callerConfirmation) external;
}

File 3 of 18 : draft-IERC6093.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/draft-IERC6093.sol)
pragma solidity ^0.8.20;

/**
 * @dev Standard ERC20 Errors
 * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC20 tokens.
 */
interface IERC20Errors {
    /**
     * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers.
     * @param sender Address whose tokens are being transferred.
     * @param balance Current balance for the interacting account.
     * @param needed Minimum amount required to perform a transfer.
     */
    error ERC20InsufficientBalance(address sender, uint256 balance, uint256 needed);

    /**
     * @dev Indicates a failure with the token `sender`. Used in transfers.
     * @param sender Address whose tokens are being transferred.
     */
    error ERC20InvalidSender(address sender);

    /**
     * @dev Indicates a failure with the token `receiver`. Used in transfers.
     * @param receiver Address to which tokens are being transferred.
     */
    error ERC20InvalidReceiver(address receiver);

    /**
     * @dev Indicates a failure with the `spender`’s `allowance`. Used in transfers.
     * @param spender Address that may be allowed to operate on tokens without being their owner.
     * @param allowance Amount of tokens a `spender` is allowed to operate with.
     * @param needed Minimum amount required to perform a transfer.
     */
    error ERC20InsufficientAllowance(address spender, uint256 allowance, uint256 needed);

    /**
     * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.
     * @param approver Address initiating an approval operation.
     */
    error ERC20InvalidApprover(address approver);

    /**
     * @dev Indicates a failure with the `spender` to be approved. Used in approvals.
     * @param spender Address that may be allowed to operate on tokens without being their owner.
     */
    error ERC20InvalidSpender(address spender);
}

/**
 * @dev Standard ERC721 Errors
 * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC721 tokens.
 */
interface IERC721Errors {
    /**
     * @dev Indicates that an address can't be an owner. For example, `address(0)` is a forbidden owner in EIP-20.
     * Used in balance queries.
     * @param owner Address of the current owner of a token.
     */
    error ERC721InvalidOwner(address owner);

    /**
     * @dev Indicates a `tokenId` whose `owner` is the zero address.
     * @param tokenId Identifier number of a token.
     */
    error ERC721NonexistentToken(uint256 tokenId);

    /**
     * @dev Indicates an error related to the ownership over a particular token. Used in transfers.
     * @param sender Address whose tokens are being transferred.
     * @param tokenId Identifier number of a token.
     * @param owner Address of the current owner of a token.
     */
    error ERC721IncorrectOwner(address sender, uint256 tokenId, address owner);

    /**
     * @dev Indicates a failure with the token `sender`. Used in transfers.
     * @param sender Address whose tokens are being transferred.
     */
    error ERC721InvalidSender(address sender);

    /**
     * @dev Indicates a failure with the token `receiver`. Used in transfers.
     * @param receiver Address to which tokens are being transferred.
     */
    error ERC721InvalidReceiver(address receiver);

    /**
     * @dev Indicates a failure with the `operator`’s approval. Used in transfers.
     * @param operator Address that may be allowed to operate on tokens without being their owner.
     * @param tokenId Identifier number of a token.
     */
    error ERC721InsufficientApproval(address operator, uint256 tokenId);

    /**
     * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.
     * @param approver Address initiating an approval operation.
     */
    error ERC721InvalidApprover(address approver);

    /**
     * @dev Indicates a failure with the `operator` to be approved. Used in approvals.
     * @param operator Address that may be allowed to operate on tokens without being their owner.
     */
    error ERC721InvalidOperator(address operator);
}

/**
 * @dev Standard ERC1155 Errors
 * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC1155 tokens.
 */
interface IERC1155Errors {
    /**
     * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers.
     * @param sender Address whose tokens are being transferred.
     * @param balance Current balance for the interacting account.
     * @param needed Minimum amount required to perform a transfer.
     * @param tokenId Identifier number of a token.
     */
    error ERC1155InsufficientBalance(address sender, uint256 balance, uint256 needed, uint256 tokenId);

    /**
     * @dev Indicates a failure with the token `sender`. Used in transfers.
     * @param sender Address whose tokens are being transferred.
     */
    error ERC1155InvalidSender(address sender);

    /**
     * @dev Indicates a failure with the token `receiver`. Used in transfers.
     * @param receiver Address to which tokens are being transferred.
     */
    error ERC1155InvalidReceiver(address receiver);

    /**
     * @dev Indicates a failure with the `operator`’s approval. Used in transfers.
     * @param operator Address that may be allowed to operate on tokens without being their owner.
     * @param owner Address of the current owner of a token.
     */
    error ERC1155MissingApprovalForAll(address operator, address owner);

    /**
     * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.
     * @param approver Address initiating an approval operation.
     */
    error ERC1155InvalidApprover(address approver);

    /**
     * @dev Indicates a failure with the `operator` to be approved. Used in approvals.
     * @param operator Address that may be allowed to operate on tokens without being their owner.
     */
    error ERC1155InvalidOperator(address operator);

    /**
     * @dev Indicates an array length mismatch between ids and values in a safeBatchTransferFrom operation.
     * Used in batch transfers.
     * @param idsLength Length of the array of token identifiers
     * @param valuesLength Length of the array of token amounts
     */
    error ERC1155InvalidArrayLength(uint256 idsLength, uint256 valuesLength);
}

File 4 of 18 : ERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/ERC20.sol)

pragma solidity ^0.8.20;

import {IERC20} from "./IERC20.sol";
import {IERC20Metadata} from "./extensions/IERC20Metadata.sol";
import {Context} from "../../utils/Context.sol";
import {IERC20Errors} from "../../interfaces/draft-IERC6093.sol";

/**
 * @dev Implementation of the {IERC20} interface.
 *
 * This implementation is agnostic to the way tokens are created. This means
 * that a supply mechanism has to be added in a derived contract using {_mint}.
 *
 * TIP: For a detailed writeup see our guide
 * https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How
 * to implement supply mechanisms].
 *
 * The default value of {decimals} is 18. To change this, you should override
 * this function so it returns a different value.
 *
 * We have followed general OpenZeppelin Contracts guidelines: functions revert
 * instead returning `false` on failure. This behavior is nonetheless
 * conventional and does not conflict with the expectations of ERC20
 * applications.
 *
 * Additionally, an {Approval} event is emitted on calls to {transferFrom}.
 * This allows applications to reconstruct the allowance for all accounts just
 * by listening to said events. Other implementations of the EIP may not emit
 * these events, as it isn't required by the specification.
 */
abstract contract ERC20 is Context, IERC20, IERC20Metadata, IERC20Errors {
    mapping(address account => uint256) private _balances;

    mapping(address account => mapping(address spender => uint256)) private _allowances;

    uint256 private _totalSupply;

    string private _name;
    string private _symbol;

    /**
     * @dev Sets the values for {name} and {symbol}.
     *
     * All two of these values are immutable: they can only be set once during
     * construction.
     */
    constructor(string memory name_, string memory symbol_) {
        _name = name_;
        _symbol = symbol_;
    }

    /**
     * @dev Returns the name of the token.
     */
    function name() public view virtual returns (string memory) {
        return _name;
    }

    /**
     * @dev Returns the symbol of the token, usually a shorter version of the
     * name.
     */
    function symbol() public view virtual returns (string memory) {
        return _symbol;
    }

    /**
     * @dev Returns the number of decimals used to get its user representation.
     * For example, if `decimals` equals `2`, a balance of `505` tokens should
     * be displayed to a user as `5.05` (`505 / 10 ** 2`).
     *
     * Tokens usually opt for a value of 18, imitating the relationship between
     * Ether and Wei. This is the default value returned by this function, unless
     * it's overridden.
     *
     * NOTE: This information is only used for _display_ purposes: it in
     * no way affects any of the arithmetic of the contract, including
     * {IERC20-balanceOf} and {IERC20-transfer}.
     */
    function decimals() public view virtual returns (uint8) {
        return 18;
    }

    /**
     * @dev See {IERC20-totalSupply}.
     */
    function totalSupply() public view virtual returns (uint256) {
        return _totalSupply;
    }

    /**
     * @dev See {IERC20-balanceOf}.
     */
    function balanceOf(address account) public view virtual returns (uint256) {
        return _balances[account];
    }

    /**
     * @dev See {IERC20-transfer}.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - the caller must have a balance of at least `value`.
     */
    function transfer(address to, uint256 value) public virtual returns (bool) {
        address owner = _msgSender();
        _transfer(owner, to, value);
        return true;
    }

    /**
     * @dev See {IERC20-allowance}.
     */
    function allowance(address owner, address spender) public view virtual returns (uint256) {
        return _allowances[owner][spender];
    }

    /**
     * @dev See {IERC20-approve}.
     *
     * NOTE: If `value` is the maximum `uint256`, the allowance is not updated on
     * `transferFrom`. This is semantically equivalent to an infinite approval.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function approve(address spender, uint256 value) public virtual returns (bool) {
        address owner = _msgSender();
        _approve(owner, spender, value);
        return true;
    }

    /**
     * @dev See {IERC20-transferFrom}.
     *
     * Emits an {Approval} event indicating the updated allowance. This is not
     * required by the EIP. See the note at the beginning of {ERC20}.
     *
     * NOTE: Does not update the allowance if the current allowance
     * is the maximum `uint256`.
     *
     * Requirements:
     *
     * - `from` and `to` cannot be the zero address.
     * - `from` must have a balance of at least `value`.
     * - the caller must have allowance for ``from``'s tokens of at least
     * `value`.
     */
    function transferFrom(address from, address to, uint256 value) public virtual returns (bool) {
        address spender = _msgSender();
        _spendAllowance(from, spender, value);
        _transfer(from, to, value);
        return true;
    }

    /**
     * @dev Moves a `value` amount of tokens from `from` to `to`.
     *
     * This internal function is equivalent to {transfer}, and can be used to
     * e.g. implement automatic token fees, slashing mechanisms, etc.
     *
     * Emits a {Transfer} event.
     *
     * NOTE: This function is not virtual, {_update} should be overridden instead.
     */
    function _transfer(address from, address to, uint256 value) internal {
        if (from == address(0)) {
            revert ERC20InvalidSender(address(0));
        }
        if (to == address(0)) {
            revert ERC20InvalidReceiver(address(0));
        }
        _update(from, to, value);
    }

    /**
     * @dev Transfers a `value` amount of tokens from `from` to `to`, or alternatively mints (or burns) if `from`
     * (or `to`) is the zero address. All customizations to transfers, mints, and burns should be done by overriding
     * this function.
     *
     * Emits a {Transfer} event.
     */
    function _update(address from, address to, uint256 value) internal virtual {
        if (from == address(0)) {
            // Overflow check required: The rest of the code assumes that totalSupply never overflows
            _totalSupply += value;
        } else {
            uint256 fromBalance = _balances[from];
            if (fromBalance < value) {
                revert ERC20InsufficientBalance(from, fromBalance, value);
            }
            unchecked {
                // Overflow not possible: value <= fromBalance <= totalSupply.
                _balances[from] = fromBalance - value;
            }
        }

        if (to == address(0)) {
            unchecked {
                // Overflow not possible: value <= totalSupply or value <= fromBalance <= totalSupply.
                _totalSupply -= value;
            }
        } else {
            unchecked {
                // Overflow not possible: balance + value is at most totalSupply, which we know fits into a uint256.
                _balances[to] += value;
            }
        }

        emit Transfer(from, to, value);
    }

    /**
     * @dev Creates a `value` amount of tokens and assigns them to `account`, by transferring it from address(0).
     * Relies on the `_update` mechanism
     *
     * Emits a {Transfer} event with `from` set to the zero address.
     *
     * NOTE: This function is not virtual, {_update} should be overridden instead.
     */
    function _mint(address account, uint256 value) internal {
        if (account == address(0)) {
            revert ERC20InvalidReceiver(address(0));
        }
        _update(address(0), account, value);
    }

    /**
     * @dev Destroys a `value` amount of tokens from `account`, lowering the total supply.
     * Relies on the `_update` mechanism.
     *
     * Emits a {Transfer} event with `to` set to the zero address.
     *
     * NOTE: This function is not virtual, {_update} should be overridden instead
     */
    function _burn(address account, uint256 value) internal {
        if (account == address(0)) {
            revert ERC20InvalidSender(address(0));
        }
        _update(account, address(0), value);
    }

    /**
     * @dev Sets `value` as the allowance of `spender` over the `owner` s tokens.
     *
     * This internal function is equivalent to `approve`, and can be used to
     * e.g. set automatic allowances for certain subsystems, etc.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `owner` cannot be the zero address.
     * - `spender` cannot be the zero address.
     *
     * Overrides to this logic should be done to the variant with an additional `bool emitEvent` argument.
     */
    function _approve(address owner, address spender, uint256 value) internal {
        _approve(owner, spender, value, true);
    }

    /**
     * @dev Variant of {_approve} with an optional flag to enable or disable the {Approval} event.
     *
     * By default (when calling {_approve}) the flag is set to true. On the other hand, approval changes made by
     * `_spendAllowance` during the `transferFrom` operation set the flag to false. This saves gas by not emitting any
     * `Approval` event during `transferFrom` operations.
     *
     * Anyone who wishes to continue emitting `Approval` events on the`transferFrom` operation can force the flag to
     * true using the following override:
     * ```
     * function _approve(address owner, address spender, uint256 value, bool) internal virtual override {
     *     super._approve(owner, spender, value, true);
     * }
     * ```
     *
     * Requirements are the same as {_approve}.
     */
    function _approve(address owner, address spender, uint256 value, bool emitEvent) internal virtual {
        if (owner == address(0)) {
            revert ERC20InvalidApprover(address(0));
        }
        if (spender == address(0)) {
            revert ERC20InvalidSpender(address(0));
        }
        _allowances[owner][spender] = value;
        if (emitEvent) {
            emit Approval(owner, spender, value);
        }
    }

    /**
     * @dev Updates `owner` s allowance for `spender` based on spent `value`.
     *
     * Does not update the allowance value in case of infinite allowance.
     * Revert if not enough allowance is available.
     *
     * Does not emit an {Approval} event.
     */
    function _spendAllowance(address owner, address spender, uint256 value) internal virtual {
        uint256 currentAllowance = allowance(owner, spender);
        if (currentAllowance != type(uint256).max) {
            if (currentAllowance < value) {
                revert ERC20InsufficientAllowance(spender, currentAllowance, value);
            }
            unchecked {
                _approve(owner, spender, currentAllowance - value, false);
            }
        }
    }
}

File 5 of 18 : IERC20Metadata.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/extensions/IERC20Metadata.sol)

pragma solidity ^0.8.20;

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

/**
 * @dev Interface for the optional metadata functions from the ERC20 standard.
 */
interface IERC20Metadata is IERC20 {
    /**
     * @dev Returns the name of the token.
     */
    function name() external view returns (string memory);

    /**
     * @dev Returns the symbol of the token.
     */
    function symbol() external view returns (string memory);

    /**
     * @dev Returns the decimals places of the token.
     */
    function decimals() external view returns (uint8);
}

File 6 of 18 : IERC20Permit.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/extensions/IERC20Permit.sol)

pragma solidity ^0.8.20;

/**
 * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in
 * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].
 *
 * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by
 * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't
 * need to send a transaction, and thus is not required to hold Ether at all.
 *
 * ==== Security Considerations
 *
 * There are two important considerations concerning the use of `permit`. The first is that a valid permit signature
 * expresses an allowance, and it should not be assumed to convey additional meaning. In particular, it should not be
 * considered as an intention to spend the allowance in any specific way. The second is that because permits have
 * built-in replay protection and can be submitted by anyone, they can be frontrun. A protocol that uses permits should
 * take this into consideration and allow a `permit` call to fail. Combining these two aspects, a pattern that may be
 * generally recommended is:
 *
 * ```solidity
 * function doThingWithPermit(..., uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) public {
 *     try token.permit(msg.sender, address(this), value, deadline, v, r, s) {} catch {}
 *     doThing(..., value);
 * }
 *
 * function doThing(..., uint256 value) public {
 *     token.safeTransferFrom(msg.sender, address(this), value);
 *     ...
 * }
 * ```
 *
 * Observe that: 1) `msg.sender` is used as the owner, leaving no ambiguity as to the signer intent, and 2) the use of
 * `try/catch` allows the permit to fail and makes the code tolerant to frontrunning. (See also
 * {SafeERC20-safeTransferFrom}).
 *
 * Additionally, note that smart contract wallets (such as Argent or Safe) are not able to produce permit signatures, so
 * contracts should have entry points that don't rely on permit.
 */
interface IERC20Permit {
    /**
     * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,
     * given ``owner``'s signed approval.
     *
     * IMPORTANT: The same issues {IERC20-approve} has related to transaction
     * ordering also apply here.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     * - `deadline` must be a timestamp in the future.
     * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`
     * over the EIP712-formatted function arguments.
     * - the signature must use ``owner``'s current nonce (see {nonces}).
     *
     * For more information on the signature format, see the
     * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP
     * section].
     *
     * CAUTION: See Security Considerations above.
     */
    function permit(
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external;

    /**
     * @dev Returns the current nonce for `owner`. This value must be
     * included whenever a signature is generated for {permit}.
     *
     * Every successful call to {permit} increases ``owner``'s nonce by one. This
     * prevents a signature from being used multiple times.
     */
    function nonces(address owner) external view returns (uint256);

    /**
     * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.
     */
    // solhint-disable-next-line func-name-mixedcase
    function DOMAIN_SEPARATOR() external view returns (bytes32);
}

File 7 of 18 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.20;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

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

    /**
     * @dev Returns the value of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

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

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

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

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

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

File 8 of 18 : SafeERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/utils/SafeERC20.sol)

pragma solidity ^0.8.20;

import {IERC20} from "../IERC20.sol";
import {IERC20Permit} from "../extensions/IERC20Permit.sol";
import {Address} from "../../../utils/Address.sol";

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

    /**
     * @dev An operation with an ERC20 token failed.
     */
    error SafeERC20FailedOperation(address token);

    /**
     * @dev Indicates a failed `decreaseAllowance` request.
     */
    error SafeERC20FailedDecreaseAllowance(address spender, uint256 currentAllowance, uint256 requestedDecrease);

    /**
     * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value,
     * non-reverting calls are assumed to be successful.
     */
    function safeTransfer(IERC20 token, address to, uint256 value) internal {
        _callOptionalReturn(token, abi.encodeCall(token.transfer, (to, value)));
    }

    /**
     * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the
     * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful.
     */
    function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {
        _callOptionalReturn(token, abi.encodeCall(token.transferFrom, (from, to, value)));
    }

    /**
     * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value,
     * non-reverting calls are assumed to be successful.
     */
    function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {
        uint256 oldAllowance = token.allowance(address(this), spender);
        forceApprove(token, spender, oldAllowance + value);
    }

    /**
     * @dev Decrease the calling contract's allowance toward `spender` by `requestedDecrease`. If `token` returns no
     * value, non-reverting calls are assumed to be successful.
     */
    function safeDecreaseAllowance(IERC20 token, address spender, uint256 requestedDecrease) internal {
        unchecked {
            uint256 currentAllowance = token.allowance(address(this), spender);
            if (currentAllowance < requestedDecrease) {
                revert SafeERC20FailedDecreaseAllowance(spender, currentAllowance, requestedDecrease);
            }
            forceApprove(token, spender, currentAllowance - requestedDecrease);
        }
    }

    /**
     * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value,
     * non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval
     * to be set to zero before setting it to a non-zero value, such as USDT.
     */
    function forceApprove(IERC20 token, address spender, uint256 value) internal {
        bytes memory approvalCall = abi.encodeCall(token.approve, (spender, value));

        if (!_callOptionalReturnBool(token, approvalCall)) {
            _callOptionalReturn(token, abi.encodeCall(token.approve, (spender, 0)));
            _callOptionalReturn(token, approvalCall);
        }
    }

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

        bytes memory returndata = address(token).functionCall(data);
        if (returndata.length != 0 && !abi.decode(returndata, (bool))) {
            revert SafeERC20FailedOperation(address(token));
        }
    }

    /**
     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
     * on the return value: the return value is optional (but if data is returned, it must not be false).
     * @param token The token targeted by the call.
     * @param data The call data (encoded using abi.encode or one of its variants).
     *
     * This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead.
     */
    function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {
        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
        // we're implementing it ourselves. We cannot use {Address-functionCall} here since this should return false
        // and not revert is the subcall reverts.

        (bool success, bytes memory returndata) = address(token).call(data);
        return success && (returndata.length == 0 || abi.decode(returndata, (bool))) && address(token).code.length > 0;
    }
}

File 9 of 18 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/Address.sol)

pragma solidity ^0.8.20;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev The ETH balance of the account is not enough to perform the operation.
     */
    error AddressInsufficientBalance(address account);

    /**
     * @dev There's no code at `target` (it is not a contract).
     */
    error AddressEmptyCode(address target);

    /**
     * @dev A call to an address target failed. The target may have reverted.
     */
    error FailedInnerCall();

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

        (bool success, ) = recipient.call{value: amount}("");
        if (!success) {
            revert FailedInnerCall();
        }
    }

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

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but also transferring `value` wei to `target`.
     *
     * Requirements:
     *
     * - the calling contract must have an ETH balance of at least `value`.
     * - the called Solidity function must be `payable`.
     */
    function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
        if (address(this).balance < value) {
            revert AddressInsufficientBalance(address(this));
        }
        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResultFromTarget(target, success, returndata);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a static call.
     */
    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResultFromTarget(target, success, returndata);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a delegate call.
     */
    function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResultFromTarget(target, success, returndata);
    }

    /**
     * @dev Tool to verify that a low level call to smart-contract was successful, and reverts if the target
     * was not a contract or bubbling up the revert reason (falling back to {FailedInnerCall}) in case of an
     * unsuccessful call.
     */
    function verifyCallResultFromTarget(
        address target,
        bool success,
        bytes memory returndata
    ) internal view returns (bytes memory) {
        if (!success) {
            _revert(returndata);
        } else {
            // only check if target is a contract if the call was successful and the return data is empty
            // otherwise we already know that it was a contract
            if (returndata.length == 0 && target.code.length == 0) {
                revert AddressEmptyCode(target);
            }
            return returndata;
        }
    }

    /**
     * @dev Tool to verify that a low level call was successful, and reverts if it wasn't, either by bubbling the
     * revert reason or with a default {FailedInnerCall} error.
     */
    function verifyCallResult(bool success, bytes memory returndata) internal pure returns (bytes memory) {
        if (!success) {
            _revert(returndata);
        } else {
            return returndata;
        }
    }

    /**
     * @dev Reverts with returndata if present. Otherwise reverts with {FailedInnerCall}.
     */
    function _revert(bytes memory returndata) private pure {
        // Look for revert reason and bubble it up if present
        if (returndata.length > 0) {
            // The easiest way to bubble the revert reason is using memory via assembly
            /// @solidity memory-safe-assembly
            assembly {
                let returndata_size := mload(returndata)
                revert(add(32, returndata), returndata_size)
            }
        } else {
            revert FailedInnerCall();
        }
    }
}

File 10 of 18 : Context.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/Context.sol)

pragma solidity ^0.8.20;

/**
 * @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 11 of 18 : ERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/ERC165.sol)

pragma solidity ^0.8.20;

import {IERC165} from "./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);
 * }
 * ```
 */
abstract contract ERC165 is IERC165 {
    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual returns (bool) {
        return interfaceId == type(IERC165).interfaceId;
    }
}

File 12 of 18 : IERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/IERC165.sol)

pragma solidity ^0.8.20;

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

File 13 of 18 : Pausable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/Pausable.sol)

pragma solidity ^0.8.20;

import {Context} from "../utils/Context.sol";

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

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

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

    /**
     * @dev The operation failed because the contract is paused.
     */
    error EnforcedPause();

    /**
     * @dev The operation failed because the contract is not paused.
     */
    error ExpectedPause();

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

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

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

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

    /**
     * @dev Throws if the contract is paused.
     */
    function _requireNotPaused() internal view virtual {
        if (paused()) {
            revert EnforcedPause();
        }
    }

    /**
     * @dev Throws if the contract is not paused.
     */
    function _requirePaused() internal view virtual {
        if (!paused()) {
            revert ExpectedPause();
        }
    }

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

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

File 14 of 18 : ZunamiPoolApsZunETH.sol
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.23;

import '../../ZunamiPool.sol';
import '../../utils/Constants.sol';

contract ZunamiPoolApsZunETH is ZunamiPool {
    constructor() ZunamiPool('Zunami ETH APS', 'apsZunETH') {
        address[POOL_ASSETS] memory tokens;
        tokens[0] = Constants.zunETH_ADDRESS;

        uint256[POOL_ASSETS] memory tokenDecimalMultipliers;
        tokenDecimalMultipliers[0] = 1;

        _setTokens(tokens, tokenDecimalMultipliers);
    }
}

File 15 of 18 : IPool.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.23;

import { IERC20 } from '@openzeppelin/contracts/token/ERC20/IERC20.sol';
import { IStrategy } from './IStrategy.sol';

interface IPool is IERC20 {
    error WrongDeposit(uint256 sid, uint256[5] amounts);
    error AbsentStrategy(uint256 sid);
    error NotStartedStrategy(uint256 sid);
    error DisabledStrategy(uint256 sid);
    error WrongAmount();
    error WrongWithdrawParams(uint256 sid);
    error WrongRatio();
    error ZeroAddress();
    error DuplicatedStrategy();
    error IncorrectArguments();
    error WrongWithdrawPercent();
    error WrongReceiver();
    error IncorrectSid();
    error WrongTokens();
    error WrongDecimalMultipliers();

    struct StrategyInfo {
        IStrategy strategy;
        uint256 startTime;
        uint256 minted;
        bool enabled;
    }

    event Deposited(
        address indexed depositor,
        uint256 deposited,
        uint256[5] amounts,
        uint256 indexed sid
    );

    event Withdrawn(address indexed withdrawer, uint256 withdrawn, uint256 indexed sid);

    event FailedWithdrawal(address indexed withdrawer, uint256[5] amounts, uint256 withdrawn);

    event AddedStrategy(uint256 indexed sid, address indexed strategyAddr, uint256 startTime);
    event ClaimedRewards(address indexed receiver, IERC20[] rewardTokens);
    event ClaimedExtraGains(address indexed receiver, uint256 amount);
    event EnabledStrategy(address indexed pool);
    event DisableStrategy(address indexed pool);
    event UpdatedToken(
        uint256 indexed tid,
        address indexed token,
        uint256 tokenDecimalMultiplier,
        address tokenOld
    );

    function tokens() external view returns (IERC20[5] memory);

    function token(uint256 tid) external view returns (IERC20);

    function tokenDecimalsMultipliers() external view returns (uint256[5] memory);

    function strategyInfo(uint256 sid) external view returns (StrategyInfo memory);

    function claimRewards(address receiver, IERC20[] memory rewardTokens) external;

    function totalHoldings() external view returns (uint256);

    function strategyCount() external view returns (uint256);

    function deposit(
        uint256 sid,
        uint256[5] memory amounts,
        address receiver
    ) external returns (uint256);

    function depositStrategy(uint256 sid, uint256[5] memory amounts) external returns (uint256);

    function withdraw(
        uint256 sid,
        uint256 stableAmount,
        uint256[5] memory minTokenAmounts,
        address receiver
    ) external;

    function mintAndClaimExtraGains(address receiver) external;
}

File 16 of 18 : IStrategy.sol
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.23;

import { IERC20 } from '@openzeppelin/contracts/token/ERC20/IERC20.sol';

interface IStrategy {
    function deposit(uint256[5] memory amounts) external returns (uint256);

    function withdraw(
        address receiver,
        uint256 userDepositRatio, // multiplied by 1e18
        uint256[5] memory minTokenAmounts
    ) external returns (bool);

    function withdrawAll(uint256[5] memory minTokenAmounts) external;

    function totalHoldings() external view returns (uint256);

    function claimRewards(address receiver, IERC20[] memory rewardTokens) external;

    function calcTokenAmount(
        uint256[5] memory tokenAmounts,
        bool isDeposit
    ) external view returns (uint256 sharesAmount);
}

File 17 of 18 : Constants.sol
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.23;

library Constants {
    address internal constant CRVUSD_ADDRESS = 0xf939E0A03FB07F59A73314E73794Be0E57ac1b4E;
    address internal constant USDC_ADDRESS = 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48;
    address internal constant USDT_ADDRESS = 0xdAC17F958D2ee523a2206206994597C13D831ec7;
    address internal constant DAI_ADDRESS = 0x6B175474E89094C44Da98b954EedeAC495271d0F;
    address internal constant FRX_ETH_ADDRESS = 0x5E8422345238F34275888049021821E8E08CAa1f;
    address internal constant WETH_ADDRESS = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2;
    address internal constant CVX_ADDRESS = 0x4e3FBD56CD56c3e72c1403e103b45Db9da5B9D2B;
    address internal constant CRV_ADDRESS = 0xD533a949740bb3306d119CC777fa900bA034cd52;
    address internal constant FXS_ADDRESS = 0x3432B6A60D23Ca0dFCa7761B7ab56459D9C964D0;
    address internal constant SPELL_ADDRESS = 0x090185f2135308BaD17527004364eBcC2D37e5F6;
    address internal constant SDT_ADDRESS = 0x73968b9a57c6E53d41345FD57a6E6ae27d6CDB2F;
    address internal constant SFRXETH_ADDRESS = 0xac3E018457B222d93114458476f3E3416Abbe38F;
    // Will be added after deployment of zunUSD v2 pool
    address internal constant ZUNUSD_ADDRESS = 0x8C0D76C9B18779665475F3E212D9Ca1Ed6A1A0e6;
    // Will be added after deployment of zunUSD v2 pool controller
    address internal constant zunUSD_CONTROLLER_ADDRESS =
        0x618eee502CDF6b46A2199C21D1411f3F6065c940;
    // Will be added after deployment of zunETH v2 pool
    address internal constant zunETH_ADDRESS = 0xc2e660C62F72c2ad35AcE6DB78a616215E2F2222;
    address internal constant zunETH_CONTROLLER_ADDRESS = 0x54A00DA65c79DDCe24E7fe4691737FD70F7797DF;

    address public constant CHAINLINK_FEED_REGISTRY_ETH_ADDRESS =
        0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE;

    address internal constant CRV_3POOL_ADDRESS = 0xbEbc44782C7dB0a1A60Cb6fe97d0b483032FF1C7;
    address internal constant CRV_3POOL_LP_ADDRESS = 0x6c3F90f043a72FA612cbac8115EE7e52BDe6E490;

    address internal constant CRV_TRICRYPTO2_ADDRESS = 0xD51a44d3FaE010294C616388b506AcdA1bfAAE46;

    address internal constant ETH_frxETH_ADDRESS = 0xa1F8A6807c402E4A15ef4EBa36528A3FED24E577;
    address internal constant ETH_frxETH_LP_ADDRESS = 0xf43211935C781D5ca1a41d2041F397B8A7366C7A;

    address internal constant WETH_frxETH_ADDRESS = 0x9c3B46C0Ceb5B9e304FCd6D88Fc50f7DD24B31Bc;
    address internal constant WETH_frxETH_LP_ADDRESS = 0x9c3B46C0Ceb5B9e304FCd6D88Fc50f7DD24B31Bc;

    address internal constant CRV_FRAX_USDC_POOL_ADDRESS =
        0xDcEF968d416a41Cdac0ED8702fAC8128A64241A2;
    address internal constant CRV_FRAX_USDC_POOL_LP_ADDRESS =
        0x3175Df0976dFA876431C2E9eE6Bc45b65d3473CC;

    address internal constant SDT_CRVUSD_USDT_VAULT_ADDRESS =
        0x37b24ac19504C0c6FC1ADc8deb5D24f5C4F6A2f2;
    address internal constant CRV_CRVUSD_USDT_LP_ADDRESS =
        0x390f3595bCa2Df7d23783dFd126427CCeb997BF4;
    address internal constant CRV_CRVUSD_USDT_ADDRESS = 0x390f3595bCa2Df7d23783dFd126427CCeb997BF4;

    address internal constant SDT_CRVUSD_USDC_VAULT_ADDRESS =
        0xb618EA40cb1F5b08839Ba228C8dd58AC3DCA12F3;
    address internal constant CRV_CRVUSD_USDC_LP_ADDRESS =
        0x4DEcE678ceceb27446b35C672dC7d61F30bAD69E;
    address internal constant CRV_CRVUSD_USDC_ADDRESS = 0x4DEcE678ceceb27446b35C672dC7d61F30bAD69E;

    address internal constant CRV_BOOSTER_ADDRESS = 0xF403C135812408BFbE8713b5A23a04b3D48AAE31;

    address internal constant CRV_ETH_stETH_ADDRESS = 0x21E27a5E5513D6e65C4f830167390997aA84843a;
    address internal constant CRV_ETH_stETH_LP_ADDRESS = 0x21E27a5E5513D6e65C4f830167390997aA84843a;
    address internal constant CVX_ETH_stETH_REWARDS_ADDRESS =
        0x6B27D7BC63F1999D14fF9bA900069ee516669ee8;
    uint256 internal constant CVX_ETH_stETH_PID = 177;

    // Will be added after deployment of zunUSD v2 pool and curve pool for zunUSD
    address internal constant CRV_zunUSD_crvFRAX_ADDRESS = address(0);
    address internal constant CRV_zunUSD_crvFRAX_LP_ADDRESS = address(0);
    address internal constant CVX_zunUSD_crvFRAX_REWARDS_ADDRESS = address(0);
    uint256 internal constant CVX_zunUSD_crvFRAX_PID = 0;

    address internal constant CRV_zunUSD_crvUSD_ADDRESS =
        0x8C24b3213FD851db80245FCCc42c40B94Ac9a745;
    address internal constant CRV_zunUSD_crvUSD_LP_ADDRESS =
        0x8C24b3213FD851db80245FCCc42c40B94Ac9a745;
    address internal constant CVX_zunUSD_crvUSD_REWARDS_ADDRESS =
        0xB0408d1477554268Ece9b0a40290C345196fBf1B;
    uint256 internal constant CVX_zunUSD_crvUSD_PID = 309;

    address internal constant CRV_USDT_crvUSD_ADDRESS = 0x390f3595bCa2Df7d23783dFd126427CCeb997BF4;
}

File 18 of 18 : ZunamiPool.sol
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.23;

import '@openzeppelin/contracts/token/ERC20/ERC20.sol';
import '@openzeppelin/contracts/token/ERC20/IERC20.sol';
import '@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol';
import '@openzeppelin/contracts/utils/Pausable.sol';
import '@openzeppelin/contracts/access/AccessControl.sol';
import './interfaces/IStrategy.sol';
import './interfaces/IPool.sol';

/**
 *
 * @title Zunami Protocol v2
 *
 */
contract ZunamiPool is IPool, ERC20, Pausable, AccessControl {
    using SafeERC20 for IERC20;

    uint8 public constant POOL_ASSETS = 5;

    bytes32 public constant EMERGENCY_ADMIN_ROLE = keccak256('EMERGENCY_ADMIN_ROLE');
    bytes32 public constant CONTROLLER_ROLE = keccak256('CONTROLLER_ROLE');
    uint256 public constant RATIO_MULTIPLIER = 1e18;
    uint256 public constant MIN_LOCK_TIME = 1 days;
    uint256 public constant FUNDS_DENOMINATOR = 1e18;
    uint256 public constant MINIMUM_LIQUIDITY = 1e3;
    address public constant MINIMUM_LIQUIDITY_LOCKER = 0x000000000000000000000000000000000000dEaD;

    StrategyInfo[] private _strategyInfo;

    IERC20[POOL_ASSETS] private _tokens;
    uint256[POOL_ASSETS] private _decimalsMultipliers;

    uint256 public extraGains;
    uint256 public extraGainsMintedBlock;
    bool public launched;

    constructor(string memory name_, string memory symbol_) ERC20(name_, symbol_) {
        _grantRole(DEFAULT_ADMIN_ROLE, msg.sender);
        _grantRole(EMERGENCY_ADMIN_ROLE, msg.sender);
    }

    function _checkStrategyExisted(uint256 sid) internal view {
        if (sid >= _strategyInfo.length) revert AbsentStrategy(sid);
    }

    function _checkStrategyStarted(uint256 sid) internal view {
        if (block.timestamp < _strategyInfo[sid].startTime) revert NotStartedStrategy(sid);
    }

    function _checkStrategyEnabled(uint256 sid) internal view {
        if (!_strategyInfo[sid].enabled) revert DisabledStrategy(sid);
    }

    function strategyInfo(uint256 sid) external view returns (StrategyInfo memory) {
        return _strategyInfo[sid];
    }

    function tokens() external view returns (IERC20[POOL_ASSETS] memory) {
        return _tokens;
    }

    function token(uint256 tid) external view returns (IERC20) {
        return _tokens[tid];
    }

    function tokenDecimalsMultipliers() external view returns (uint256[POOL_ASSETS] memory) {
        return _decimalsMultipliers;
    }

    function _setTokens(
        address[POOL_ASSETS] memory tokens_,
        uint256[POOL_ASSETS] memory tokenDecimalsMultipliers_
    ) internal {
        bool otherZeros = false;
        for (uint256 i = 0; i < POOL_ASSETS; i++) {
            if (otherZeros && address(tokens_[i]) != address(0)) revert WrongTokens();
            if (address(tokens_[i]) == address(0)) otherZeros = true;
            if (
                (address(tokens_[i]) != address(0) && tokenDecimalsMultipliers_[i] == 0) ||
                (address(tokens_[i]) == address(0) && tokenDecimalsMultipliers_[i] != 0)
            ) revert WrongDecimalMultipliers();
            address oldToken = address(_tokens[i]);
            _tokens[i] = IERC20(tokens_[i]);
            _decimalsMultipliers[i] = tokenDecimalsMultipliers_[i];
            emit UpdatedToken(i, tokens_[i], tokenDecimalsMultipliers_[i], oldToken);
        }
    }

    function setTokens(
        address[POOL_ASSETS] memory tokens_,
        uint256[POOL_ASSETS] memory tokenDecimalMultipliers_
    ) external onlyRole(DEFAULT_ADMIN_ROLE) {
        _setTokens(tokens_, tokenDecimalMultipliers_);
    }

    function pause() external onlyRole(EMERGENCY_ADMIN_ROLE) {
        _pause();
    }

    function unpause() external onlyRole(DEFAULT_ADMIN_ROLE) {
        _unpause();
    }

    function claimRewards(
        address receiver,
        IERC20[] memory rewardTokens
    ) external onlyRole(CONTROLLER_ROLE) {
        _mintExtraGains();
        _claimExtraGains(receiver);

        for (uint256 i = 0; i < _strategyInfo.length; i++) {
            StrategyInfo memory strategyInfo_ = _strategyInfo[i];
            if (strategyInfo_.minted > 0 && strategyInfo_.enabled) {
                strategyInfo_.strategy.claimRewards(receiver, rewardTokens);
            }
        }
        emit ClaimedRewards(receiver, rewardTokens);
    }

    /// @dev mint extra gains if any and weren't minted in this block
    function _mintExtraGains() internal {
        // return if gains were minted in this block
        if (extraGainsMintedBlock == block.number) return;

        uint256 gains;
        uint256 strategyGains_;
        for (uint256 sid = 0; sid < _strategyInfo.length; sid++) {
            StrategyInfo storage strategyInfo_ = _strategyInfo[sid];
            if (strategyInfo_.minted > 0 && strategyInfo_.enabled) {
                uint256 holdings = strategyInfo_.strategy.totalHoldings();
                uint256 minted = strategyInfo_.minted;
                //check if gains are present
                if (holdings <= minted) continue;

                unchecked {
                    strategyGains_ = holdings - minted;
                    strategyInfo_.minted += strategyGains_;
                    gains += strategyGains_;
                }
            }
        }

        if (gains == 0) return;
        extraGains += gains;
        extraGainsMintedBlock = block.number;
        _mint(address(this), gains);
    }

    /// @dev claim extra gains if any
    function _claimExtraGains(address receiver) internal {
        if (extraGains == 0) return;

        uint256 _extraGains = extraGains;
        extraGains = 0;
        IERC20(address(this)).transfer(receiver, _extraGains);
        emit ClaimedExtraGains(receiver, _extraGains);
    }

    function mintAndClaimExtraGains(address receiver) external onlyRole(CONTROLLER_ROLE) {
        _mintExtraGains();
        _claimExtraGains(receiver);
    }

    function totalHoldings() public view returns (uint256) {
        uint256 length = _strategyInfo.length;
        uint256 total;
        for (uint256 sid = 0; sid < length; sid++) {
            StrategyInfo memory strategyInfo_ = _strategyInfo[sid];
            if (strategyInfo_.minted > 0 && strategyInfo_.enabled) {
                total += strategyInfo_.strategy.totalHoldings();
            }
        }
        return total;
    }

    function strategyCount() external view returns (uint256) {
        return _strategyInfo.length;
    }

    function deposit(
        uint256 sid,
        uint256[POOL_ASSETS] memory amounts,
        address receiver
    ) external whenNotPaused onlyRole(CONTROLLER_ROLE) returns (uint256) {
        _checkStrategyExisted(sid);
        _checkStrategyStarted(sid);
        _checkStrategyEnabled(sid);

        if (receiver == address(0)) {
            receiver = _msgSender();
        }

        _mintExtraGains();

        uint256 depositedValue = doDepositStrategy(sid, amounts);
        return processSuccessfulDeposit(receiver, depositedValue, amounts, sid);
    }

    function depositStrategy(
        uint256 sid,
        uint256[POOL_ASSETS] memory amounts
    ) external whenNotPaused onlyRole(CONTROLLER_ROLE) returns (uint256) {
        _checkStrategyExisted(sid);
        _checkStrategyStarted(sid);

        return doDepositStrategy(sid, amounts);
    }

    function doDepositStrategy(
        uint256 sid,
        uint256[POOL_ASSETS] memory amounts
    ) internal returns (uint256 depositedValue) {
        IStrategy strategy = _strategyInfo[sid].strategy;

        for (uint256 i = 0; i < amounts.length; i++) {
            if (amounts[i] > 0) {
                IERC20(_tokens[i]).safeTransfer(address(strategy), amounts[i]);
            }
        }

        _mintExtraGains();

        depositedValue = strategy.deposit(amounts);

        if (depositedValue == 0) revert WrongDeposit(sid, amounts);
    }

    function processSuccessfulDeposit(
        address receiver,
        uint256 depositedValue,
        uint256[POOL_ASSETS] memory depositedTokens,
        uint256 sid
    ) internal returns (uint256) {
        uint256 locked = 0;
        if (totalSupply() == 0) {
            if (depositedValue <= MINIMUM_LIQUIDITY) revert WrongAmount();
            locked = MINIMUM_LIQUIDITY;
            _mint(MINIMUM_LIQUIDITY_LOCKER, MINIMUM_LIQUIDITY); // permanently lock the first MINIMUM_LIQUIDITY tokens
        }
        uint256 depositedValueSubLocked = depositedValue - locked;
        _mint(receiver, depositedValueSubLocked);
        _strategyInfo[sid].minted += depositedValue;

        emit Deposited(receiver, depositedValue, depositedTokens, sid);

        return depositedValueSubLocked;
    }

    function withdraw(
        uint256 sid,
        uint256 stableAmount,
        uint256[POOL_ASSETS] memory tokenAmounts,
        address receiver
    ) external whenNotPaused onlyRole(CONTROLLER_ROLE) {
        _checkStrategyExisted(sid);
        _checkStrategyStarted(sid);
        _checkStrategyEnabled(sid);

        IStrategy strategy = _strategyInfo[sid].strategy;
        address controllerAddr = _msgSender();

        if (balanceOf(controllerAddr) < stableAmount) revert WrongAmount();

        _mintExtraGains();

        if (
            !strategy.withdraw(
                receiver == address(0) ? controllerAddr : receiver,
                calcRatioSafe(stableAmount, _strategyInfo[sid].minted),
                tokenAmounts
            )
        ) revert WrongWithdrawParams(sid);

        processSuccessfulWithdrawal(controllerAddr, stableAmount, sid);
    }

    function processSuccessfulWithdrawal(address user, uint256 stableAmount, uint256 sid) internal {
        _burn(user, stableAmount);
        _strategyInfo[sid].minted -= stableAmount;
        emit Withdrawn(user, stableAmount, sid);
    }

    function calcRatioSafe(
        uint256 outAmount,
        uint256 strategyDeposited
    ) internal pure returns (uint256 ratio) {
        ratio = (outAmount * RATIO_MULTIPLIER) / strategyDeposited;
        if (ratio == 0 || ratio > RATIO_MULTIPLIER) revert WrongRatio();
    }

    /**
     * @dev add a new strategy, deposits in the new strategy are blocked for one day for safety
     * @param _strategyAddr - the new strategy strategy address
     */
    function addStrategy(address _strategyAddr) external onlyRole(DEFAULT_ADMIN_ROLE) {
        if (_strategyAddr == address(0)) revert ZeroAddress();
        for (uint256 i = 0; i < _strategyInfo.length; i++) {
            if (_strategyAddr == address(_strategyInfo[i].strategy)) revert DuplicatedStrategy();
        }

        uint256 startTime = block.timestamp + (launched ? MIN_LOCK_TIME : 0);
        _strategyInfo.push(
            StrategyInfo({
                strategy: IStrategy(_strategyAddr),
                startTime: startTime,
                minted: 0,
                enabled: true
            })
        );
        emit AddedStrategy(_strategyInfo.length - 1, _strategyAddr, startTime);
    }

    function launch() external onlyRole(DEFAULT_ADMIN_ROLE) {
        launched = true;
    }

    /**
     * @dev dev can transfer funds from few strategy's to one strategy for better APY
     * @param _strategies - array of strategy's, from which funds are withdrawn
     * @param _withdrawalsPercents - A percentage of the funds that should be transferred
     * @param _receiverStrategy - number strategy, to which funds are deposited
     * @param _minAmounts - minimum amount of tokens that should be received from each strategy
     */
    function moveFundsBatch(
        uint256[] memory _strategies,
        uint256[] memory _withdrawalsPercents,
        uint256 _receiverStrategy,
        uint256[POOL_ASSETS][] memory _minAmounts
    ) external onlyRole(EMERGENCY_ADMIN_ROLE) {
        if (_strategies.length != _withdrawalsPercents.length) revert IncorrectArguments();
        if (_receiverStrategy >= _strategyInfo.length) revert WrongReceiver();

        _checkStrategyExisted(_receiverStrategy);
        _checkStrategyEnabled(_receiverStrategy);

        uint256 sid;
        uint256 zunamiStables;
        for (uint256 i = 0; i < _strategies.length; i++) {
            sid = _strategies[i];
            zunamiStables += _moveFunds(sid, _withdrawalsPercents[i], _minAmounts[i]);
        }
        _strategyInfo[_receiverStrategy].minted += zunamiStables;

        uint256[POOL_ASSETS] memory tokensRemainder;
        for (uint256 i = 0; i < POOL_ASSETS; i++) {
            IERC20 token_ = _tokens[i];
            if (address(token_) == address(0)) break;
            tokensRemainder[i] = token_.balanceOf(address(this));
            if (tokensRemainder[i] > 0) {
                token_.safeTransfer(
                    address(_strategyInfo[_receiverStrategy].strategy),
                    tokensRemainder[i]
                );
            }
        }

        if (_strategyInfo[_receiverStrategy].strategy.deposit(tokensRemainder) == 0)
            revert WrongDeposit(_receiverStrategy, tokensRemainder);
    }

    function _moveFunds(
        uint256 sid,
        uint256 withdrawPercent,
        uint256[POOL_ASSETS] memory minAmounts
    ) private returns (uint256 stableAmount) {
        if (withdrawPercent == 0 || withdrawPercent > FUNDS_DENOMINATOR)
            revert WrongWithdrawPercent();

        if (withdrawPercent == FUNDS_DENOMINATOR) {
            stableAmount = _strategyInfo[sid].minted;
            _strategyInfo[sid].minted = 0;
            _strategyInfo[sid].strategy.withdrawAll(minAmounts);
        } else {
            stableAmount = (_strategyInfo[sid].minted * withdrawPercent) / FUNDS_DENOMINATOR;
            _strategyInfo[sid].minted -= stableAmount;

            if (!_strategyInfo[sid].strategy.withdraw(address(this), withdrawPercent, minAmounts))
                revert WrongWithdrawParams(sid);
        }

        return stableAmount;
    }

    function enableStrategy(uint256 _sid) external onlyRole(DEFAULT_ADMIN_ROLE) {
        if (_sid >= _strategyInfo.length) revert IncorrectSid();

        _strategyInfo[_sid].enabled = true;

        emit EnabledStrategy(address(_strategyInfo[_sid].strategy));
    }

    function disableStrategy(uint256 _sid) external onlyRole(EMERGENCY_ADMIN_ROLE) {
        if (_sid >= _strategyInfo.length) revert IncorrectSid();

        _strategyInfo[_sid].enabled = false;

        emit DisableStrategy(address(_strategyInfo[_sid].strategy));
    }
}

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

Contract Security Audit

Contract ABI

[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"uint256","name":"sid","type":"uint256"}],"name":"AbsentStrategy","type":"error"},{"inputs":[],"name":"AccessControlBadConfirmation","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"bytes32","name":"neededRole","type":"bytes32"}],"name":"AccessControlUnauthorizedAccount","type":"error"},{"inputs":[{"internalType":"address","name":"target","type":"address"}],"name":"AddressEmptyCode","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"AddressInsufficientBalance","type":"error"},{"inputs":[{"internalType":"uint256","name":"sid","type":"uint256"}],"name":"DisabledStrategy","type":"error"},{"inputs":[],"name":"DuplicatedStrategy","type":"error"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"allowance","type":"uint256"},{"internalType":"uint256","name":"needed","type":"uint256"}],"name":"ERC20InsufficientAllowance","type":"error"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"uint256","name":"balance","type":"uint256"},{"internalType":"uint256","name":"needed","type":"uint256"}],"name":"ERC20InsufficientBalance","type":"error"},{"inputs":[{"internalType":"address","name":"approver","type":"address"}],"name":"ERC20InvalidApprover","type":"error"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"}],"name":"ERC20InvalidReceiver","type":"error"},{"inputs":[{"internalType":"address","name":"sender","type":"address"}],"name":"ERC20InvalidSender","type":"error"},{"inputs":[{"internalType":"address","name":"spender","type":"address"}],"name":"ERC20InvalidSpender","type":"error"},{"inputs":[],"name":"EnforcedPause","type":"error"},{"inputs":[],"name":"ExpectedPause","type":"error"},{"inputs":[],"name":"FailedInnerCall","type":"error"},{"inputs":[],"name":"IncorrectArguments","type":"error"},{"inputs":[],"name":"IncorrectSid","type":"error"},{"inputs":[{"internalType":"uint256","name":"sid","type":"uint256"}],"name":"NotStartedStrategy","type":"error"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"SafeERC20FailedOperation","type":"error"},{"inputs":[],"name":"WrongAmount","type":"error"},{"inputs":[],"name":"WrongDecimalMultipliers","type":"error"},{"inputs":[{"internalType":"uint256","name":"sid","type":"uint256"},{"internalType":"uint256[5]","name":"amounts","type":"uint256[5]"}],"name":"WrongDeposit","type":"error"},{"inputs":[],"name":"WrongRatio","type":"error"},{"inputs":[],"name":"WrongReceiver","type":"error"},{"inputs":[],"name":"WrongTokens","type":"error"},{"inputs":[{"internalType":"uint256","name":"sid","type":"uint256"}],"name":"WrongWithdrawParams","type":"error"},{"inputs":[],"name":"WrongWithdrawPercent","type":"error"},{"inputs":[],"name":"ZeroAddress","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"sid","type":"uint256"},{"indexed":true,"internalType":"address","name":"strategyAddr","type":"address"},{"indexed":false,"internalType":"uint256","name":"startTime","type":"uint256"}],"name":"AddedStrategy","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"receiver","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"ClaimedExtraGains","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"receiver","type":"address"},{"indexed":false,"internalType":"contract IERC20[]","name":"rewardTokens","type":"address[]"}],"name":"ClaimedRewards","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"depositor","type":"address"},{"indexed":false,"internalType":"uint256","name":"deposited","type":"uint256"},{"indexed":false,"internalType":"uint256[5]","name":"amounts","type":"uint256[5]"},{"indexed":true,"internalType":"uint256","name":"sid","type":"uint256"}],"name":"Deposited","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"pool","type":"address"}],"name":"DisableStrategy","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"pool","type":"address"}],"name":"EnabledStrategy","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"withdrawer","type":"address"},{"indexed":false,"internalType":"uint256[5]","name":"amounts","type":"uint256[5]"},{"indexed":false,"internalType":"uint256","name":"withdrawn","type":"uint256"}],"name":"FailedWithdrawal","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"tid","type":"uint256"},{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenDecimalMultiplier","type":"uint256"},{"indexed":false,"internalType":"address","name":"tokenOld","type":"address"}],"name":"UpdatedToken","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"withdrawer","type":"address"},{"indexed":false,"internalType":"uint256","name":"withdrawn","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"sid","type":"uint256"}],"name":"Withdrawn","type":"event"},{"inputs":[],"name":"CONTROLLER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"EMERGENCY_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"FUNDS_DENOMINATOR","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MINIMUM_LIQUIDITY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MINIMUM_LIQUIDITY_LOCKER","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MIN_LOCK_TIME","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"POOL_ASSETS","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"RATIO_MULTIPLIER","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_strategyAddr","type":"address"}],"name":"addStrategy","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"contract IERC20[]","name":"rewardTokens","type":"address[]"}],"name":"claimRewards","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"sid","type":"uint256"},{"internalType":"uint256[5]","name":"amounts","type":"uint256[5]"},{"internalType":"address","name":"receiver","type":"address"}],"name":"deposit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"sid","type":"uint256"},{"internalType":"uint256[5]","name":"amounts","type":"uint256[5]"}],"name":"depositStrategy","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_sid","type":"uint256"}],"name":"disableStrategy","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_sid","type":"uint256"}],"name":"enableStrategy","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"extraGains","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"extraGainsMintedBlock","outputs":[{"internalType":"uint256","name":"","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":"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":"launch","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"launched","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"}],"name":"mintAndClaimExtraGains","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_strategies","type":"uint256[]"},{"internalType":"uint256[]","name":"_withdrawalsPercents","type":"uint256[]"},{"internalType":"uint256","name":"_receiverStrategy","type":"uint256"},{"internalType":"uint256[5][]","name":"_minAmounts","type":"uint256[5][]"}],"name":"moveFundsBatch","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"callerConfirmation","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":"address[5]","name":"tokens_","type":"address[5]"},{"internalType":"uint256[5]","name":"tokenDecimalMultipliers_","type":"uint256[5]"}],"name":"setTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"strategyCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"sid","type":"uint256"}],"name":"strategyInfo","outputs":[{"components":[{"internalType":"contract IStrategy","name":"strategy","type":"address"},{"internalType":"uint256","name":"startTime","type":"uint256"},{"internalType":"uint256","name":"minted","type":"uint256"},{"internalType":"bool","name":"enabled","type":"bool"}],"internalType":"struct IPool.StrategyInfo","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tid","type":"uint256"}],"name":"token","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tokenDecimalsMultipliers","outputs":[{"internalType":"uint256[5]","name":"","type":"uint256[5]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tokens","outputs":[{"internalType":"contract IERC20[5]","name":"","type":"address[5]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalHoldings","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"sid","type":"uint256"},{"internalType":"uint256","name":"stableAmount","type":"uint256"},{"internalType":"uint256[5]","name":"tokenAmounts","type":"uint256[5]"},{"internalType":"address","name":"receiver","type":"address"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60806040523480156200001157600080fd5b506040518060400160405280600e81526020016d5a756e616d69204554482041505360901b815250604051806040016040528060098152602001680c2e0e6b4eadc8aa8960bb1b815250818181600390816200006e91906200050b565b5060046200007d82826200050b565b50506005805460ff1916905550620000976000336200010a565b50620000c47f5358bcfd81d1ef3da152b1755e1c3c6739686fa7e83dbcad0071568cc4b73a63336200010a565b505050620000d162000446565b73c2e660c62f72c2ad35ace6db78a616215e2f22228152620000f262000446565b60018152620001028282620001bd565b5050620005ed565b60008281526006602090815260408083206001600160a01b038516845290915281205460ff16620001b35760008381526006602090815260408083206001600160a01b03861684529091529020805460ff191660011790556200016a3390565b6001600160a01b0316826001600160a01b0316847f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a4506001620001b7565b5060005b92915050565b6000805b60058110156200044057818015620001fc57506000848260058110620001eb57620001eb620005d7565b60200201516001600160a01b031614155b156200021b57604051631d37a6fd60e11b815260040160405180910390fd5b6000848260058110620002325762000232620005d7565b60200201516001600160a01b0316036200024b57600191505b6000848260058110620002625762000262620005d7565b60200201516001600160a01b0316141580156200029657508281600581106200028f576200028f620005d7565b6020020151155b80620002e857506000848260058110620002b457620002b4620005d7565b60200201516001600160a01b0316148015620002e85750828160058110620002e057620002e0620005d7565b602002015115155b15620003075760405163bfa45dc560e01b815260040160405180910390fd5b6000600882600581106200031f576200031f620005d7565b01546001600160a01b03169050848260058110620003415762000341620005d7565b6020020151600883600581106200035c576200035c620005d7565b0180546001600160a01b0319166001600160a01b0392909216919091179055838260058110620003905762000390620005d7565b6020020151600d8360058110620003ab57620003ab620005d7565b0155848260058110620003c257620003c2620005d7565b60200201516001600160a01b0316827ff747b83f770806e3d1cf3aa94c1cbd9bebc565cd5a9fc5ec4668d7304321a86e868560058110620004075762000407620005d7565b6020020151846040516200042e9291909182526001600160a01b0316602082015260400190565b60405180910390a350600101620001c1565b50505050565b6040518060a001604052806005906020820280368337509192915050565b634e487b7160e01b600052604160045260246000fd5b600181811c908216806200048f57607f821691505b602082108103620004b057634e487b7160e01b600052602260045260246000fd5b50919050565b601f82111562000506576000816000526020600020601f850160051c81016020861015620004e15750805b601f850160051c820191505b818110156200050257828155600101620004ed565b5050505b505050565b81516001600160401b0381111562000527576200052762000464565b6200053f816200053884546200047a565b84620004b6565b602080601f8311600181146200057757600084156200055e5750858301515b600019600386901b1c1916600185901b17855562000502565b600085815260208120601f198616915b82811015620005a85788860151825594840194600190910190840162000587565b5085821015620005c75787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b634e487b7160e01b600052603260045260246000fd5b612f5280620005fd6000396000f3fe608060405234801561001057600080fd5b50600436106102955760003560e01c80636e76fc8f11610167578063a9059cbb116100ce578063bec5b69811610087578063bec5b698146105bf578063d547741f146105c8578063d5f651a41461053a578063dd62ed3e146105db578063e9ec2e9914610614578063f46a30201461061c57600080fd5b8063a9059cbb14610527578063ad5e34721461053a578063b549be3c14610549578063b6e432a91461055c578063ba9a7a5614610565578063bb91c3391461056e57600080fd5b806391d148541161012057806391d14854146104c957806395d89b41146104dc5780639d63848a146104e45780639d9a779c146104f9578063a217fddf1461050c578063a5e9dee41461051457600080fd5b80636e76fc8f1461045b57806370a082311461047057806375451b4f146104995780637aedb990146104a15780638091f3bf146104b45780638456cb59146104c157600080fd5b8063223e54791161020b578063391f8b96116101c4578063391f8b961461040f5780633f4ba83a146104225780633ff032071461042a5780635920192a146104345780635c975abb1461043d5780636766ea0f1461044857600080fd5b8063223e54791461038b57806323b872dd1461039e578063248a9ca3146103b15780632f2ff15d146103d4578063313ce567146103e757806336568abe146103fc57600080fd5b8063095ea7b31161025d578063095ea7b31461032f5780630ab5f869146103425780630d4b88071461035557806318160ddd146103685780632026ffa31461037057806322068b441461038357600080fd5b806301339c211461029a57806301ffc9a7146102a4578063044215c6146102cc57806306fdde03146102f7578063092c5b3b1461030c575b600080fd5b6102a2610631565b005b6102b76102b23660046126df565b61064c565b60405190151581526020015b60405180910390f35b6102df6102da366004612709565b610683565b6040516001600160a01b0390911681526020016102c3565b6102ff6106a9565b6040516102c39190612746565b610321600080516020612edd83398151915281565b6040519081526020016102c3565b6102b761033d36600461278e565b61073b565b61032161035036600461287a565b610753565b6102a261036336600461293a565b61079b565b600254610321565b6102a261037e366004612a31565b610aca565b600754610321565b6102a2610399366004612ae0565b610c30565b6102b76103ac366004612afd565b610e32565b6103216103bf366004612709565b60009081526006602052604090206001015490565b6102a26103e2366004612b3e565b610e58565b60125b60405160ff90911681526020016102c3565b6102a261040a366004612b3e565b610e83565b6102a261041d366004612b6e565b610ebb565b6102a2610ed0565b6103216201518081565b6102df61dead81565b60055460ff166102b7565b610321610456366004612be8565b610ee6565b610321600080516020612efd83398151915281565b61032161047e366004612ae0565b6001600160a01b031660009081526020819052604090205490565b6103ea600581565b6102a26104af366004612709565b610f61565b6014546102b79060ff1681565b6102a2611031565b6102b76104d7366004612b3e565b611051565b6102ff61107c565b6104ec61108b565b6040516102c39190612c29565b6102a2610507366004612709565b6110d0565b610321600081565b6102a2610522366004612ae0565b611193565b6102b761053536600461278e565b6111c0565b610321670de0b6b3a764000081565b6102a2610557366004612c63565b6111ce565b61032160135481565b6103216103e881565b61058161057c366004612709565b61136e565b6040516102c3919081516001600160a01b03168152602080830151908201526040808301519082015260609182015115159181019190915260800190565b61032160125481565b6102a26105d6366004612b3e565b6113fa565b6103216105e9366004612cad565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b61032161141f565b610624611528565b6040516102c39190612cfe565b600061063c81611563565b506014805460ff19166001179055565b60006001600160e01b03198216637965db0b60e01b148061067d57506301ffc9a760e01b6001600160e01b03198316145b92915050565b60006008826005811061069857610698612d0c565b01546001600160a01b031692915050565b6060600380546106b890612d22565b80601f01602080910402602001604051908101604052809291908181526020018280546106e490612d22565b80156107315780601f1061070657610100808354040283529160200191610731565b820191906000526020600020905b81548152906001019060200180831161071457829003601f168201915b5050505050905090565b60003361074981858561156d565b5060019392505050565b600061075d61157a565b600080516020612edd83398151915261077581611563565b61077e846115a0565b610787846115c5565b610791848461160d565b91505b5092915050565b600080516020612efd8339815191526107b381611563565b83518551146107d55760405163f9e0bc9b60e01b815260040160405180910390fd5b60075483106107f757604051631964c57360e11b815260040160405180910390fd5b610800836115a0565b6108098361174e565b60008060005b87518110156108855787818151811061082a5761082a612d0c565b602002602001015192506108718388838151811061084a5761084a612d0c565b602002602001015187848151811061086457610864612d0c565b6020026020010151611798565b61087b9083612d72565b915060010161080f565b50806007868154811061089a5761089a612d0c565b906000526020600020906004020160020160008282546108ba9190612d72565b909155506108c890506126c1565b60005b6005811015610a00576000600882600581106108e9576108e9612d0c565b01546001600160a01b03169050806109015750610a00565b6040516370a0823160e01b81523060048201526001600160a01b038216906370a0823190602401602060405180830381865afa158015610945573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109699190612d85565b83836005811061097b5761097b612d0c565b6020020152600083836005811061099457610994612d0c565b602002015111156109f7576109f7600789815481106109b5576109b5612d0c565b60009182526020909120600490910201546001600160a01b03168484600581106109e1576109e1612d0c565b60200201516001600160a01b03841691906119e7565b506001016108cb565b5060078681548110610a1457610a14612d0c565b600091825260209091206004918202015460405163b67d611d60e01b81526001600160a01b039091169163b67d611d91610a5091859101612cfe565b6020604051808303816000875af1158015610a6f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a939190612d85565b600003610ac05785816040516331ea9deb60e11b8152600401610ab7929190612d9e565b60405180910390fd5b5050505050505050565b600080516020612edd833981519152610ae281611563565b610aea611a39565b610af383611b6d565b60005b600754811015610be957600060078281548110610b1557610b15612d0c565b600091825260209182902060408051608081018252600490930290910180546001600160a01b03168352600181015493830193909352600283015490820181905260039092015460ff1615156060820152915015801590610b77575080606001515b15610be0578051604051632026ffa360e01b81526001600160a01b0390911690632026ffa390610bad9088908890600401612df7565b600060405180830381600087803b158015610bc757600080fd5b505af1158015610bdb573d6000803e3d6000fd5b505050505b50600101610af6565b50826001600160a01b03167fc40901f1d03c33b46234c92521befa858a2264a718b553a3d1d2fd284ad4424083604051610c239190612e1b565b60405180910390a2505050565b6000610c3b81611563565b6001600160a01b038216610c625760405163d92e233d60e01b815260040160405180910390fd5b60005b600754811015610cc75760078181548110610c8257610c82612d0c565b60009182526020909120600490910201546001600160a01b0390811690841603610cbf576040516303ee72d760e51b815260040160405180910390fd5b600101610c65565b5060145460009060ff16610cdc576000610ce1565b620151805b610ceb9042612d72565b604080516080810182526001600160a01b038681168083526020830185815260009484018581526001606086018181526007805480840182559881905296517fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c688600490990298890180546001600160a01b031916919097161790955591517fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c689870155517fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c68a86015591517fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c68b909401805460ff19169415159490941790935590549293509091610df99190612e2e565b6040518381527f3a64755f61c73ed1f60bd0a9660e9cb66aa01817ea10d5b44d216a3ff95cca0e906020015b60405180910390a3505050565b600033610e40858285611c3c565b610e4b858585611cb4565b60019150505b9392505050565b600082815260066020526040902060010154610e7381611563565b610e7d8383611d13565b50505050565b6001600160a01b0381163314610eac5760405163334bd91960e11b815260040160405180910390fd5b610eb68282611da7565b505050565b6000610ec681611563565b610eb68383611e14565b6000610edb81611563565b610ee3612066565b50565b6000610ef061157a565b600080516020612edd833981519152610f0881611563565b610f11856115a0565b610f1a856115c5565b610f238561174e565b6001600160a01b038316610f35573392505b610f3d611a39565b6000610f49868661160d565b9050610f57848287896120b8565b9695505050505050565b600080516020612efd833981519152610f7981611563565b6007548210610f9b5760405163a458994160e01b815260040160405180910390fd5b600060078381548110610fb057610fb0612d0c565b906000526020600020906004020160030160006101000a81548160ff02191690831515021790555060078281548110610feb57610feb612d0c565b600091825260208220600490910201546040516001600160a01b03909116917f8b35b417b16faa66c73c967944e5e1e2a14e1b75b0c047b18ac49c8e5f84799a91a25050565b600080516020612efd83398151915261104981611563565b610ee36121a0565b60009182526006602090815260408084206001600160a01b0393909316845291905290205460ff1690565b6060600480546106b890612d22565b6110936126c1565b6040805160a08101918290529060089060059082845b81546001600160a01b031681526001909101906020018083116110a9575050505050905090565b60006110db81611563565b60075482106110fd5760405163a458994160e01b815260040160405180910390fd5b60016007838154811061111257611112612d0c565b906000526020600020906004020160030160006101000a81548160ff0219169083151502179055506007828154811061114d5761114d612d0c565b600091825260208220600490910201546040516001600160a01b03909116917f532492ef4d4edd78444556c1b5038901e11c232361675fe6d5e6bea2f0864e1991a25050565b600080516020612edd8339815191526111ab81611563565b6111b3611a39565b6111bc82611b6d565b5050565b600033610749818585611cb4565b6111d661157a565b600080516020612edd8339815191526111ee81611563565b6111f7856115a0565b611200856115c5565b6112098561174e565b60006007868154811061121e5761121e612d0c565b600091825260208220600490910201546001600160a01b031691506112403390565b905085611262826001600160a01b031660009081526020819052604090205490565b1015611281576040516349986e7360e01b815260040160405180910390fd5b611289611a39565b6001600160a01b0380831690636d9164c6908616156112a857856112aa565b825b6112d88960078c815481106112c1576112c1612d0c565b9060005260206000209060040201600201546121dd565b886040518463ffffffff1660e01b81526004016112f793929190612e41565b6020604051808303816000875af1158015611316573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061133a9190612e65565b61135a5760405163ee9684e760e01b815260048101889052602401610ab7565b611365818789612230565b50505050505050565b604080516080810182526000808252602082018190529181018290526060810191909152600782815481106113a5576113a5612d0c565b600091825260209182902060408051608081018252600490930290910180546001600160a01b0316835260018101549383019390935260028301549082015260039091015460ff161515606082015292915050565b60008281526006602052604090206001015461141581611563565b610e7d8383611da7565b60075460009081805b828110156107945760006007828154811061144557611445612d0c565b600091825260209182902060408051608081018252600490930290910180546001600160a01b03168352600181015493830193909352600283015490820181905260039092015460ff16151560608201529150158015906114a7575080606001515b1561151f5780600001516001600160a01b031663e9ec2e996040518163ffffffff1660e01b8152600401602060405180830381865afa1580156114ee573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115129190612d85565b61151c9084612d72565b92505b50600101611428565b6115306126c1565b6040805160a081019182905290600d9060059082845b815481526020019060010190808311611546575050505050905090565b610ee381336122b0565b610eb683838360016122e9565b60055460ff161561159e5760405163d93c066560e01b815260040160405180910390fd5b565b6007548110610ee3576040516306796a2560e21b815260048101829052602401610ab7565b600781815481106115d8576115d8612d0c565b906000526020600020906004020160010154421015610ee357604051631744fd1760e21b815260048101829052602401610ab7565b6000806007848154811061162357611623612d0c565b600091825260208220600490910201546001600160a01b031691505b60058110156116af57600084826005811061165c5761165c612d0c565b602002015111156116a7576116a78285836005811061167d5761167d612d0c565b60200201516008846005811061169557611695612d0c565b01546001600160a01b031691906119e7565b60010161163f565b506116b8611a39565b60405163b67d611d60e01b81526001600160a01b0382169063b67d611d906116e4908690600401612cfe565b6020604051808303816000875af1158015611703573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117279190612d85565b9150816000036107945783836040516331ea9deb60e11b8152600401610ab7929190612d9e565b6007818154811061176157611761612d0c565b600091825260209091206003600490920201015460ff16610ee35760405163277d558560e21b815260048101829052602401610ab7565b60008215806117ae5750670de0b6b3a764000083115b156117cc576040516397a41b9760e01b815260040160405180910390fd5b670de0b6b3a764000083036118b257600784815481106117ee576117ee612d0c565b906000526020600020906004020160020154905060006007858154811061181757611817612d0c565b9060005260206000209060040201600201819055506007848154811061183f5761183f612d0c565b6000918252602090912060049182020154604051632069ee2560e21b81526001600160a01b03909116916381a7b8949161187b91869101612cfe565b600060405180830381600087803b15801561189557600080fd5b505af11580156118a9573d6000803e3d6000fd5b50505050610e51565b670de0b6b3a764000083600786815481106118cf576118cf612d0c565b9060005260206000209060040201600201546118eb9190612e87565b6118f59190612e9e565b9050806007858154811061190b5761190b612d0c565b9060005260206000209060040201600201600082825461192b9190612e2e565b9091555050600780548590811061194457611944612d0c565b60009182526020909120600491820201546040516336c8b26360e11b81526001600160a01b0390911691636d9164c6916119849130918891889101612e41565b6020604051808303816000875af11580156119a3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119c79190612e65565b610e515760405163ee9684e760e01b815260048101859052602401610ab7565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052610eb69084906123be565b4360135403611a4457565b60008060005b600754811015611b3b57600060078281548110611a6957611a69612d0c565b9060005260206000209060040201905060008160020154118015611a915750600381015460ff165b15611b315780546040805163e9ec2e9960e01b815290516000926001600160a01b03169163e9ec2e999160048083019260209291908290030181865afa158015611adf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b039190612d85565b6002830154909150808211611b1a57505050611b33565b600283018054919092039081019091559384019392505b505b600101611a4a565b5081600003611b48575050565b8160126000828254611b5a9190612d72565b9091555050436013556111bc3083612421565b601254600003611b7a5750565b60128054600090915560405163a9059cbb60e01b81526001600160a01b038316600482015260248101829052309063a9059cbb906044016020604051808303816000875af1158015611bd0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611bf49190612e65565b50816001600160a01b03167f679522ada03e2aff72b5376caa48a92d6cf1520bc5816e47488103cf974a3e2e82604051611c3091815260200190565b60405180910390a25050565b6001600160a01b038381166000908152600160209081526040808320938616835292905220546000198114610e7d5781811015611ca557604051637dc7a0d960e11b81526001600160a01b03841660048201526024810182905260448101839052606401610ab7565b610e7d848484840360006122e9565b6001600160a01b038316611cde57604051634b637e8f60e11b815260006004820152602401610ab7565b6001600160a01b038216611d085760405163ec442f0560e01b815260006004820152602401610ab7565b610eb6838383612453565b6000611d1f8383611051565b611d9f5760008381526006602090815260408083206001600160a01b03861684529091529020805460ff19166001179055611d573390565b6001600160a01b0316826001600160a01b0316847f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a450600161067d565b50600061067d565b6000611db38383611051565b15611d9f5760008381526006602090815260408083206001600160a01b0386168085529252808320805460ff1916905551339286917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a450600161067d565b6000805b6005811015610e7d57818015611e4e57506000848260058110611e3d57611e3d612d0c565b60200201516001600160a01b031614155b15611e6c57604051631d37a6fd60e11b815260040160405180910390fd5b6000848260058110611e8057611e80612d0c565b60200201516001600160a01b031603611e9857600191505b6000848260058110611eac57611eac612d0c565b60200201516001600160a01b031614158015611edc5750828160058110611ed557611ed5612d0c565b6020020151155b80611f2657506000848260058110611ef657611ef6612d0c565b60200201516001600160a01b0316148015611f265750828160058110611f1e57611f1e612d0c565b602002015115155b15611f445760405163bfa45dc560e01b815260040160405180910390fd5b600060088260058110611f5957611f59612d0c565b01546001600160a01b03169050848260058110611f7857611f78612d0c565b602002015160088360058110611f9057611f90612d0c565b0180546001600160a01b0319166001600160a01b0392909216919091179055838260058110611fc157611fc1612d0c565b6020020151600d8360058110611fd957611fd9612d0c565b0155848260058110611fed57611fed612d0c565b60200201516001600160a01b0316827ff747b83f770806e3d1cf3aa94c1cbd9bebc565cd5a9fc5ec4668d7304321a86e86856005811061202f5761202f612d0c565b6020020151846040516120559291909182526001600160a01b0316602082015260400190565b60405180910390a350600101611e18565b61206e612570565b6005805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b6000806120c460025490565b6000036120fd576103e885116120ed576040516349986e7360e01b815260040160405180910390fd5b506103e86120fd61dead82612421565b60006121098287612e2e565b90506121158782612421565b856007858154811061212957612129612d0c565b906000526020600020906004020160020160008282546121499190612d72565b9250508190555083876001600160a01b03167fa17ff9bbea81293417e3fe6571f199f77815934a9ca09121a83a4603cd83f3b7888860405161218c929190612d9e565b60405180910390a39150505b949350505050565b6121a861157a565b6005805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861209b3390565b6000816121f2670de0b6b3a764000085612e87565b6121fc9190612e9e565b90508015806122125750670de0b6b3a764000081115b1561067d57604051634aa3778b60e01b815260040160405180910390fd5b61223a8383612593565b816007828154811061224e5761224e612d0c565b9060005260206000209060040201600201600082825461226e9190612e2e565b909155505060405182815281906001600160a01b038516907f92ccf450a286a957af52509bc1c9939d1a6a481783e142e41e2499f0bb66ebc690602001610e25565b6122ba8282611051565b6111bc5760405163e2517d3f60e01b81526001600160a01b038216600482015260248101839052604401610ab7565b6001600160a01b0384166123135760405163e602df0560e01b815260006004820152602401610ab7565b6001600160a01b03831661233d57604051634a1406b160e11b815260006004820152602401610ab7565b6001600160a01b0380851660009081526001602090815260408083209387168352929052208290558015610e7d57826001600160a01b0316846001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040516123b091815260200190565b60405180910390a350505050565b60006123d36001600160a01b038416836125c9565b905080516000141580156123f85750808060200190518101906123f69190612e65565b155b15610eb657604051635274afe760e01b81526001600160a01b0384166004820152602401610ab7565b6001600160a01b03821661244b5760405163ec442f0560e01b815260006004820152602401610ab7565b6111bc600083835b6001600160a01b03831661247e5780600260008282546124739190612d72565b909155506124f09050565b6001600160a01b038316600090815260208190526040902054818110156124d15760405163391434e360e21b81526001600160a01b03851660048201526024810182905260448101839052606401610ab7565b6001600160a01b03841660009081526020819052604090209082900390555b6001600160a01b03821661250c5760028054829003905561252b565b6001600160a01b03821660009081526020819052604090208054820190555b816001600160a01b0316836001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef83604051610e2591815260200190565b60055460ff1661159e57604051638dfc202b60e01b815260040160405180910390fd5b6001600160a01b0382166125bd57604051634b637e8f60e11b815260006004820152602401610ab7565b6111bc82600083612453565b6060610e518383600084600080856001600160a01b031684866040516125ef9190612ec0565b60006040518083038185875af1925050503d806000811461262c576040519150601f19603f3d011682016040523d82523d6000602084013e612631565b606091505b5091509150610f578683836060826126515761264c82612698565b610e51565b815115801561266857506001600160a01b0384163b155b1561269157604051639996b31560e01b81526001600160a01b0385166004820152602401610ab7565b5080610e51565b8051156126a85780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b6040518060a001604052806005906020820280368337509192915050565b6000602082840312156126f157600080fd5b81356001600160e01b031981168114610e5157600080fd5b60006020828403121561271b57600080fd5b5035919050565b60005b8381101561273d578181015183820152602001612725565b50506000910152565b6020815260008251806020840152612765816040850160208701612722565b601f01601f19169190910160400192915050565b6001600160a01b0381168114610ee357600080fd5b600080604083850312156127a157600080fd5b82356127ac81612779565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b60405160a0810167ffffffffffffffff811182821017156127f3576127f36127ba565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715612822576128226127ba565b604052919050565b600082601f83011261283b57600080fd5b6128436127d0565b8060a084018581111561285557600080fd5b845b8181101561286f578035845260209384019301612857565b509095945050505050565b60008060c0838503121561288d57600080fd5b8235915061289e846020850161282a565b90509250929050565b600067ffffffffffffffff8211156128c1576128c16127ba565b5060051b60200190565b600082601f8301126128dc57600080fd5b813560206128f16128ec836128a7565b6127f9565b8083825260208201915060208460051b87010193508684111561291357600080fd5b602086015b8481101561292f5780358352918301918301612918565b509695505050505050565b6000806000806080858703121561295057600080fd5b843567ffffffffffffffff8082111561296857600080fd5b612974888389016128cb565b95506020915060208701358181111561298c57600080fd5b61299889828a016128cb565b955050604087013593506060870135818111156129b457600080fd5b87019050601f810188136129c757600080fd5b80356129d56128ec826128a7565b8082825260208201915060a0602060a0850286010193508b8411156129f957600080fd5b6020850194505b83851015612a2157612a128c8661282a565b83529384019391850191612a00565b50979a9699509497505050505050565b60008060408385031215612a4457600080fd5b8235612a4f81612779565b915060208381013567ffffffffffffffff811115612a6c57600080fd5b8401601f81018613612a7d57600080fd5b8035612a8b6128ec826128a7565b81815260059190911b82018301908381019088831115612aaa57600080fd5b928401925b82841015612ad1578335612ac281612779565b82529284019290840190612aaf565b80955050505050509250929050565b600060208284031215612af257600080fd5b8135610e5181612779565b600080600060608486031215612b1257600080fd5b8335612b1d81612779565b92506020840135612b2d81612779565b929592945050506040919091013590565b60008060408385031215612b5157600080fd5b823591506020830135612b6381612779565b809150509250929050565b6000806101408385031215612b8257600080fd5b83601f840112612b9157600080fd5b612b996127d0565b8060a0850186811115612bab57600080fd5b855b81811015612bce578035612bc081612779565b845260209384019301612bad565b50819450612bdc878261282a565b93505050509250929050565b600080600060e08486031215612bfd57600080fd5b83359250612c0e856020860161282a565b915060c0840135612c1e81612779565b809150509250925092565b60a08101818360005b6005811015612c5a5781516001600160a01b0316835260209283019290910190600101612c32565b50505092915050565b6000806000806101008587031215612c7a57600080fd5b8435935060208501359250612c92866040870161282a565b915060e0850135612ca281612779565b939692955090935050565b60008060408385031215612cc057600080fd5b8235612ccb81612779565b91506020830135612b6381612779565b8060005b6005811015610e7d578151845260209384019390910190600101612cdf565b60a0810161067d8284612cdb565b634e487b7160e01b600052603260045260246000fd5b600181811c90821680612d3657607f821691505b602082108103612d5657634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b8082018082111561067d5761067d612d5c565b600060208284031215612d9757600080fd5b5051919050565b82815260c08101610e516020830184612cdb565b60008151808452602080850194506020840160005b83811015612dec5781516001600160a01b031687529582019590820190600101612dc7565b509495945050505050565b6001600160a01b038316815260406020820181905260009061219890830184612db2565b602081526000610e516020830184612db2565b8181038181111561067d5761067d612d5c565b6001600160a01b03841681526020810183905260e081016121986040830184612cdb565b600060208284031215612e7757600080fd5b81518015158114610e5157600080fd5b808202811582820484141761067d5761067d612d5c565b600082612ebb57634e487b7160e01b600052601260045260246000fd5b500490565b60008251612ed2818460208701612722565b919091019291505056fe7b765e0e932d348852a6f810bfa1ab891e259123f02db8cdcde614c5702233575358bcfd81d1ef3da152b1755e1c3c6739686fa7e83dbcad0071568cc4b73a63a2646970667358221220b60ceec538bed813f61d45ae80ce928727f0fda8ac04ff3de3ca46398b8daebf64736f6c63430008170033

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106102955760003560e01c80636e76fc8f11610167578063a9059cbb116100ce578063bec5b69811610087578063bec5b698146105bf578063d547741f146105c8578063d5f651a41461053a578063dd62ed3e146105db578063e9ec2e9914610614578063f46a30201461061c57600080fd5b8063a9059cbb14610527578063ad5e34721461053a578063b549be3c14610549578063b6e432a91461055c578063ba9a7a5614610565578063bb91c3391461056e57600080fd5b806391d148541161012057806391d14854146104c957806395d89b41146104dc5780639d63848a146104e45780639d9a779c146104f9578063a217fddf1461050c578063a5e9dee41461051457600080fd5b80636e76fc8f1461045b57806370a082311461047057806375451b4f146104995780637aedb990146104a15780638091f3bf146104b45780638456cb59146104c157600080fd5b8063223e54791161020b578063391f8b96116101c4578063391f8b961461040f5780633f4ba83a146104225780633ff032071461042a5780635920192a146104345780635c975abb1461043d5780636766ea0f1461044857600080fd5b8063223e54791461038b57806323b872dd1461039e578063248a9ca3146103b15780632f2ff15d146103d4578063313ce567146103e757806336568abe146103fc57600080fd5b8063095ea7b31161025d578063095ea7b31461032f5780630ab5f869146103425780630d4b88071461035557806318160ddd146103685780632026ffa31461037057806322068b441461038357600080fd5b806301339c211461029a57806301ffc9a7146102a4578063044215c6146102cc57806306fdde03146102f7578063092c5b3b1461030c575b600080fd5b6102a2610631565b005b6102b76102b23660046126df565b61064c565b60405190151581526020015b60405180910390f35b6102df6102da366004612709565b610683565b6040516001600160a01b0390911681526020016102c3565b6102ff6106a9565b6040516102c39190612746565b610321600080516020612edd83398151915281565b6040519081526020016102c3565b6102b761033d36600461278e565b61073b565b61032161035036600461287a565b610753565b6102a261036336600461293a565b61079b565b600254610321565b6102a261037e366004612a31565b610aca565b600754610321565b6102a2610399366004612ae0565b610c30565b6102b76103ac366004612afd565b610e32565b6103216103bf366004612709565b60009081526006602052604090206001015490565b6102a26103e2366004612b3e565b610e58565b60125b60405160ff90911681526020016102c3565b6102a261040a366004612b3e565b610e83565b6102a261041d366004612b6e565b610ebb565b6102a2610ed0565b6103216201518081565b6102df61dead81565b60055460ff166102b7565b610321610456366004612be8565b610ee6565b610321600080516020612efd83398151915281565b61032161047e366004612ae0565b6001600160a01b031660009081526020819052604090205490565b6103ea600581565b6102a26104af366004612709565b610f61565b6014546102b79060ff1681565b6102a2611031565b6102b76104d7366004612b3e565b611051565b6102ff61107c565b6104ec61108b565b6040516102c39190612c29565b6102a2610507366004612709565b6110d0565b610321600081565b6102a2610522366004612ae0565b611193565b6102b761053536600461278e565b6111c0565b610321670de0b6b3a764000081565b6102a2610557366004612c63565b6111ce565b61032160135481565b6103216103e881565b61058161057c366004612709565b61136e565b6040516102c3919081516001600160a01b03168152602080830151908201526040808301519082015260609182015115159181019190915260800190565b61032160125481565b6102a26105d6366004612b3e565b6113fa565b6103216105e9366004612cad565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b61032161141f565b610624611528565b6040516102c39190612cfe565b600061063c81611563565b506014805460ff19166001179055565b60006001600160e01b03198216637965db0b60e01b148061067d57506301ffc9a760e01b6001600160e01b03198316145b92915050565b60006008826005811061069857610698612d0c565b01546001600160a01b031692915050565b6060600380546106b890612d22565b80601f01602080910402602001604051908101604052809291908181526020018280546106e490612d22565b80156107315780601f1061070657610100808354040283529160200191610731565b820191906000526020600020905b81548152906001019060200180831161071457829003601f168201915b5050505050905090565b60003361074981858561156d565b5060019392505050565b600061075d61157a565b600080516020612edd83398151915261077581611563565b61077e846115a0565b610787846115c5565b610791848461160d565b91505b5092915050565b600080516020612efd8339815191526107b381611563565b83518551146107d55760405163f9e0bc9b60e01b815260040160405180910390fd5b60075483106107f757604051631964c57360e11b815260040160405180910390fd5b610800836115a0565b6108098361174e565b60008060005b87518110156108855787818151811061082a5761082a612d0c565b602002602001015192506108718388838151811061084a5761084a612d0c565b602002602001015187848151811061086457610864612d0c565b6020026020010151611798565b61087b9083612d72565b915060010161080f565b50806007868154811061089a5761089a612d0c565b906000526020600020906004020160020160008282546108ba9190612d72565b909155506108c890506126c1565b60005b6005811015610a00576000600882600581106108e9576108e9612d0c565b01546001600160a01b03169050806109015750610a00565b6040516370a0823160e01b81523060048201526001600160a01b038216906370a0823190602401602060405180830381865afa158015610945573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109699190612d85565b83836005811061097b5761097b612d0c565b6020020152600083836005811061099457610994612d0c565b602002015111156109f7576109f7600789815481106109b5576109b5612d0c565b60009182526020909120600490910201546001600160a01b03168484600581106109e1576109e1612d0c565b60200201516001600160a01b03841691906119e7565b506001016108cb565b5060078681548110610a1457610a14612d0c565b600091825260209091206004918202015460405163b67d611d60e01b81526001600160a01b039091169163b67d611d91610a5091859101612cfe565b6020604051808303816000875af1158015610a6f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a939190612d85565b600003610ac05785816040516331ea9deb60e11b8152600401610ab7929190612d9e565b60405180910390fd5b5050505050505050565b600080516020612edd833981519152610ae281611563565b610aea611a39565b610af383611b6d565b60005b600754811015610be957600060078281548110610b1557610b15612d0c565b600091825260209182902060408051608081018252600490930290910180546001600160a01b03168352600181015493830193909352600283015490820181905260039092015460ff1615156060820152915015801590610b77575080606001515b15610be0578051604051632026ffa360e01b81526001600160a01b0390911690632026ffa390610bad9088908890600401612df7565b600060405180830381600087803b158015610bc757600080fd5b505af1158015610bdb573d6000803e3d6000fd5b505050505b50600101610af6565b50826001600160a01b03167fc40901f1d03c33b46234c92521befa858a2264a718b553a3d1d2fd284ad4424083604051610c239190612e1b565b60405180910390a2505050565b6000610c3b81611563565b6001600160a01b038216610c625760405163d92e233d60e01b815260040160405180910390fd5b60005b600754811015610cc75760078181548110610c8257610c82612d0c565b60009182526020909120600490910201546001600160a01b0390811690841603610cbf576040516303ee72d760e51b815260040160405180910390fd5b600101610c65565b5060145460009060ff16610cdc576000610ce1565b620151805b610ceb9042612d72565b604080516080810182526001600160a01b038681168083526020830185815260009484018581526001606086018181526007805480840182559881905296517fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c688600490990298890180546001600160a01b031916919097161790955591517fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c689870155517fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c68a86015591517fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c68b909401805460ff19169415159490941790935590549293509091610df99190612e2e565b6040518381527f3a64755f61c73ed1f60bd0a9660e9cb66aa01817ea10d5b44d216a3ff95cca0e906020015b60405180910390a3505050565b600033610e40858285611c3c565b610e4b858585611cb4565b60019150505b9392505050565b600082815260066020526040902060010154610e7381611563565b610e7d8383611d13565b50505050565b6001600160a01b0381163314610eac5760405163334bd91960e11b815260040160405180910390fd5b610eb68282611da7565b505050565b6000610ec681611563565b610eb68383611e14565b6000610edb81611563565b610ee3612066565b50565b6000610ef061157a565b600080516020612edd833981519152610f0881611563565b610f11856115a0565b610f1a856115c5565b610f238561174e565b6001600160a01b038316610f35573392505b610f3d611a39565b6000610f49868661160d565b9050610f57848287896120b8565b9695505050505050565b600080516020612efd833981519152610f7981611563565b6007548210610f9b5760405163a458994160e01b815260040160405180910390fd5b600060078381548110610fb057610fb0612d0c565b906000526020600020906004020160030160006101000a81548160ff02191690831515021790555060078281548110610feb57610feb612d0c565b600091825260208220600490910201546040516001600160a01b03909116917f8b35b417b16faa66c73c967944e5e1e2a14e1b75b0c047b18ac49c8e5f84799a91a25050565b600080516020612efd83398151915261104981611563565b610ee36121a0565b60009182526006602090815260408084206001600160a01b0393909316845291905290205460ff1690565b6060600480546106b890612d22565b6110936126c1565b6040805160a08101918290529060089060059082845b81546001600160a01b031681526001909101906020018083116110a9575050505050905090565b60006110db81611563565b60075482106110fd5760405163a458994160e01b815260040160405180910390fd5b60016007838154811061111257611112612d0c565b906000526020600020906004020160030160006101000a81548160ff0219169083151502179055506007828154811061114d5761114d612d0c565b600091825260208220600490910201546040516001600160a01b03909116917f532492ef4d4edd78444556c1b5038901e11c232361675fe6d5e6bea2f0864e1991a25050565b600080516020612edd8339815191526111ab81611563565b6111b3611a39565b6111bc82611b6d565b5050565b600033610749818585611cb4565b6111d661157a565b600080516020612edd8339815191526111ee81611563565b6111f7856115a0565b611200856115c5565b6112098561174e565b60006007868154811061121e5761121e612d0c565b600091825260208220600490910201546001600160a01b031691506112403390565b905085611262826001600160a01b031660009081526020819052604090205490565b1015611281576040516349986e7360e01b815260040160405180910390fd5b611289611a39565b6001600160a01b0380831690636d9164c6908616156112a857856112aa565b825b6112d88960078c815481106112c1576112c1612d0c565b9060005260206000209060040201600201546121dd565b886040518463ffffffff1660e01b81526004016112f793929190612e41565b6020604051808303816000875af1158015611316573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061133a9190612e65565b61135a5760405163ee9684e760e01b815260048101889052602401610ab7565b611365818789612230565b50505050505050565b604080516080810182526000808252602082018190529181018290526060810191909152600782815481106113a5576113a5612d0c565b600091825260209182902060408051608081018252600490930290910180546001600160a01b0316835260018101549383019390935260028301549082015260039091015460ff161515606082015292915050565b60008281526006602052604090206001015461141581611563565b610e7d8383611da7565b60075460009081805b828110156107945760006007828154811061144557611445612d0c565b600091825260209182902060408051608081018252600490930290910180546001600160a01b03168352600181015493830193909352600283015490820181905260039092015460ff16151560608201529150158015906114a7575080606001515b1561151f5780600001516001600160a01b031663e9ec2e996040518163ffffffff1660e01b8152600401602060405180830381865afa1580156114ee573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115129190612d85565b61151c9084612d72565b92505b50600101611428565b6115306126c1565b6040805160a081019182905290600d9060059082845b815481526020019060010190808311611546575050505050905090565b610ee381336122b0565b610eb683838360016122e9565b60055460ff161561159e5760405163d93c066560e01b815260040160405180910390fd5b565b6007548110610ee3576040516306796a2560e21b815260048101829052602401610ab7565b600781815481106115d8576115d8612d0c565b906000526020600020906004020160010154421015610ee357604051631744fd1760e21b815260048101829052602401610ab7565b6000806007848154811061162357611623612d0c565b600091825260208220600490910201546001600160a01b031691505b60058110156116af57600084826005811061165c5761165c612d0c565b602002015111156116a7576116a78285836005811061167d5761167d612d0c565b60200201516008846005811061169557611695612d0c565b01546001600160a01b031691906119e7565b60010161163f565b506116b8611a39565b60405163b67d611d60e01b81526001600160a01b0382169063b67d611d906116e4908690600401612cfe565b6020604051808303816000875af1158015611703573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117279190612d85565b9150816000036107945783836040516331ea9deb60e11b8152600401610ab7929190612d9e565b6007818154811061176157611761612d0c565b600091825260209091206003600490920201015460ff16610ee35760405163277d558560e21b815260048101829052602401610ab7565b60008215806117ae5750670de0b6b3a764000083115b156117cc576040516397a41b9760e01b815260040160405180910390fd5b670de0b6b3a764000083036118b257600784815481106117ee576117ee612d0c565b906000526020600020906004020160020154905060006007858154811061181757611817612d0c565b9060005260206000209060040201600201819055506007848154811061183f5761183f612d0c565b6000918252602090912060049182020154604051632069ee2560e21b81526001600160a01b03909116916381a7b8949161187b91869101612cfe565b600060405180830381600087803b15801561189557600080fd5b505af11580156118a9573d6000803e3d6000fd5b50505050610e51565b670de0b6b3a764000083600786815481106118cf576118cf612d0c565b9060005260206000209060040201600201546118eb9190612e87565b6118f59190612e9e565b9050806007858154811061190b5761190b612d0c565b9060005260206000209060040201600201600082825461192b9190612e2e565b9091555050600780548590811061194457611944612d0c565b60009182526020909120600491820201546040516336c8b26360e11b81526001600160a01b0390911691636d9164c6916119849130918891889101612e41565b6020604051808303816000875af11580156119a3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119c79190612e65565b610e515760405163ee9684e760e01b815260048101859052602401610ab7565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052610eb69084906123be565b4360135403611a4457565b60008060005b600754811015611b3b57600060078281548110611a6957611a69612d0c565b9060005260206000209060040201905060008160020154118015611a915750600381015460ff165b15611b315780546040805163e9ec2e9960e01b815290516000926001600160a01b03169163e9ec2e999160048083019260209291908290030181865afa158015611adf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b039190612d85565b6002830154909150808211611b1a57505050611b33565b600283018054919092039081019091559384019392505b505b600101611a4a565b5081600003611b48575050565b8160126000828254611b5a9190612d72565b9091555050436013556111bc3083612421565b601254600003611b7a5750565b60128054600090915560405163a9059cbb60e01b81526001600160a01b038316600482015260248101829052309063a9059cbb906044016020604051808303816000875af1158015611bd0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611bf49190612e65565b50816001600160a01b03167f679522ada03e2aff72b5376caa48a92d6cf1520bc5816e47488103cf974a3e2e82604051611c3091815260200190565b60405180910390a25050565b6001600160a01b038381166000908152600160209081526040808320938616835292905220546000198114610e7d5781811015611ca557604051637dc7a0d960e11b81526001600160a01b03841660048201526024810182905260448101839052606401610ab7565b610e7d848484840360006122e9565b6001600160a01b038316611cde57604051634b637e8f60e11b815260006004820152602401610ab7565b6001600160a01b038216611d085760405163ec442f0560e01b815260006004820152602401610ab7565b610eb6838383612453565b6000611d1f8383611051565b611d9f5760008381526006602090815260408083206001600160a01b03861684529091529020805460ff19166001179055611d573390565b6001600160a01b0316826001600160a01b0316847f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a450600161067d565b50600061067d565b6000611db38383611051565b15611d9f5760008381526006602090815260408083206001600160a01b0386168085529252808320805460ff1916905551339286917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a450600161067d565b6000805b6005811015610e7d57818015611e4e57506000848260058110611e3d57611e3d612d0c565b60200201516001600160a01b031614155b15611e6c57604051631d37a6fd60e11b815260040160405180910390fd5b6000848260058110611e8057611e80612d0c565b60200201516001600160a01b031603611e9857600191505b6000848260058110611eac57611eac612d0c565b60200201516001600160a01b031614158015611edc5750828160058110611ed557611ed5612d0c565b6020020151155b80611f2657506000848260058110611ef657611ef6612d0c565b60200201516001600160a01b0316148015611f265750828160058110611f1e57611f1e612d0c565b602002015115155b15611f445760405163bfa45dc560e01b815260040160405180910390fd5b600060088260058110611f5957611f59612d0c565b01546001600160a01b03169050848260058110611f7857611f78612d0c565b602002015160088360058110611f9057611f90612d0c565b0180546001600160a01b0319166001600160a01b0392909216919091179055838260058110611fc157611fc1612d0c565b6020020151600d8360058110611fd957611fd9612d0c565b0155848260058110611fed57611fed612d0c565b60200201516001600160a01b0316827ff747b83f770806e3d1cf3aa94c1cbd9bebc565cd5a9fc5ec4668d7304321a86e86856005811061202f5761202f612d0c565b6020020151846040516120559291909182526001600160a01b0316602082015260400190565b60405180910390a350600101611e18565b61206e612570565b6005805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b6000806120c460025490565b6000036120fd576103e885116120ed576040516349986e7360e01b815260040160405180910390fd5b506103e86120fd61dead82612421565b60006121098287612e2e565b90506121158782612421565b856007858154811061212957612129612d0c565b906000526020600020906004020160020160008282546121499190612d72565b9250508190555083876001600160a01b03167fa17ff9bbea81293417e3fe6571f199f77815934a9ca09121a83a4603cd83f3b7888860405161218c929190612d9e565b60405180910390a39150505b949350505050565b6121a861157a565b6005805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861209b3390565b6000816121f2670de0b6b3a764000085612e87565b6121fc9190612e9e565b90508015806122125750670de0b6b3a764000081115b1561067d57604051634aa3778b60e01b815260040160405180910390fd5b61223a8383612593565b816007828154811061224e5761224e612d0c565b9060005260206000209060040201600201600082825461226e9190612e2e565b909155505060405182815281906001600160a01b038516907f92ccf450a286a957af52509bc1c9939d1a6a481783e142e41e2499f0bb66ebc690602001610e25565b6122ba8282611051565b6111bc5760405163e2517d3f60e01b81526001600160a01b038216600482015260248101839052604401610ab7565b6001600160a01b0384166123135760405163e602df0560e01b815260006004820152602401610ab7565b6001600160a01b03831661233d57604051634a1406b160e11b815260006004820152602401610ab7565b6001600160a01b0380851660009081526001602090815260408083209387168352929052208290558015610e7d57826001600160a01b0316846001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040516123b091815260200190565b60405180910390a350505050565b60006123d36001600160a01b038416836125c9565b905080516000141580156123f85750808060200190518101906123f69190612e65565b155b15610eb657604051635274afe760e01b81526001600160a01b0384166004820152602401610ab7565b6001600160a01b03821661244b5760405163ec442f0560e01b815260006004820152602401610ab7565b6111bc600083835b6001600160a01b03831661247e5780600260008282546124739190612d72565b909155506124f09050565b6001600160a01b038316600090815260208190526040902054818110156124d15760405163391434e360e21b81526001600160a01b03851660048201526024810182905260448101839052606401610ab7565b6001600160a01b03841660009081526020819052604090209082900390555b6001600160a01b03821661250c5760028054829003905561252b565b6001600160a01b03821660009081526020819052604090208054820190555b816001600160a01b0316836001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef83604051610e2591815260200190565b60055460ff1661159e57604051638dfc202b60e01b815260040160405180910390fd5b6001600160a01b0382166125bd57604051634b637e8f60e11b815260006004820152602401610ab7565b6111bc82600083612453565b6060610e518383600084600080856001600160a01b031684866040516125ef9190612ec0565b60006040518083038185875af1925050503d806000811461262c576040519150601f19603f3d011682016040523d82523d6000602084013e612631565b606091505b5091509150610f578683836060826126515761264c82612698565b610e51565b815115801561266857506001600160a01b0384163b155b1561269157604051639996b31560e01b81526001600160a01b0385166004820152602401610ab7565b5080610e51565b8051156126a85780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b6040518060a001604052806005906020820280368337509192915050565b6000602082840312156126f157600080fd5b81356001600160e01b031981168114610e5157600080fd5b60006020828403121561271b57600080fd5b5035919050565b60005b8381101561273d578181015183820152602001612725565b50506000910152565b6020815260008251806020840152612765816040850160208701612722565b601f01601f19169190910160400192915050565b6001600160a01b0381168114610ee357600080fd5b600080604083850312156127a157600080fd5b82356127ac81612779565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b60405160a0810167ffffffffffffffff811182821017156127f3576127f36127ba565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715612822576128226127ba565b604052919050565b600082601f83011261283b57600080fd5b6128436127d0565b8060a084018581111561285557600080fd5b845b8181101561286f578035845260209384019301612857565b509095945050505050565b60008060c0838503121561288d57600080fd5b8235915061289e846020850161282a565b90509250929050565b600067ffffffffffffffff8211156128c1576128c16127ba565b5060051b60200190565b600082601f8301126128dc57600080fd5b813560206128f16128ec836128a7565b6127f9565b8083825260208201915060208460051b87010193508684111561291357600080fd5b602086015b8481101561292f5780358352918301918301612918565b509695505050505050565b6000806000806080858703121561295057600080fd5b843567ffffffffffffffff8082111561296857600080fd5b612974888389016128cb565b95506020915060208701358181111561298c57600080fd5b61299889828a016128cb565b955050604087013593506060870135818111156129b457600080fd5b87019050601f810188136129c757600080fd5b80356129d56128ec826128a7565b8082825260208201915060a0602060a0850286010193508b8411156129f957600080fd5b6020850194505b83851015612a2157612a128c8661282a565b83529384019391850191612a00565b50979a9699509497505050505050565b60008060408385031215612a4457600080fd5b8235612a4f81612779565b915060208381013567ffffffffffffffff811115612a6c57600080fd5b8401601f81018613612a7d57600080fd5b8035612a8b6128ec826128a7565b81815260059190911b82018301908381019088831115612aaa57600080fd5b928401925b82841015612ad1578335612ac281612779565b82529284019290840190612aaf565b80955050505050509250929050565b600060208284031215612af257600080fd5b8135610e5181612779565b600080600060608486031215612b1257600080fd5b8335612b1d81612779565b92506020840135612b2d81612779565b929592945050506040919091013590565b60008060408385031215612b5157600080fd5b823591506020830135612b6381612779565b809150509250929050565b6000806101408385031215612b8257600080fd5b83601f840112612b9157600080fd5b612b996127d0565b8060a0850186811115612bab57600080fd5b855b81811015612bce578035612bc081612779565b845260209384019301612bad565b50819450612bdc878261282a565b93505050509250929050565b600080600060e08486031215612bfd57600080fd5b83359250612c0e856020860161282a565b915060c0840135612c1e81612779565b809150509250925092565b60a08101818360005b6005811015612c5a5781516001600160a01b0316835260209283019290910190600101612c32565b50505092915050565b6000806000806101008587031215612c7a57600080fd5b8435935060208501359250612c92866040870161282a565b915060e0850135612ca281612779565b939692955090935050565b60008060408385031215612cc057600080fd5b8235612ccb81612779565b91506020830135612b6381612779565b8060005b6005811015610e7d578151845260209384019390910190600101612cdf565b60a0810161067d8284612cdb565b634e487b7160e01b600052603260045260246000fd5b600181811c90821680612d3657607f821691505b602082108103612d5657634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b8082018082111561067d5761067d612d5c565b600060208284031215612d9757600080fd5b5051919050565b82815260c08101610e516020830184612cdb565b60008151808452602080850194506020840160005b83811015612dec5781516001600160a01b031687529582019590820190600101612dc7565b509495945050505050565b6001600160a01b038316815260406020820181905260009061219890830184612db2565b602081526000610e516020830184612db2565b8181038181111561067d5761067d612d5c565b6001600160a01b03841681526020810183905260e081016121986040830184612cdb565b600060208284031215612e7757600080fd5b81518015158114610e5157600080fd5b808202811582820484141761067d5761067d612d5c565b600082612ebb57634e487b7160e01b600052601260045260246000fd5b500490565b60008251612ed2818460208701612722565b919091019291505056fe7b765e0e932d348852a6f810bfa1ab891e259123f02db8cdcde614c5702233575358bcfd81d1ef3da152b1755e1c3c6739686fa7e83dbcad0071568cc4b73a63a2646970667358221220b60ceec538bed813f61d45ae80ce928727f0fda8ac04ff3de3ca46398b8daebf64736f6c63430008170033

Loading...
Loading
Loading...
Loading
[ Download: CSV Export  ]
[ Download: CSV Export  ]

A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.