Source Code
Overview
HYPE Balance
HYPE Value
$0.00Latest 1 from a total of 1 transactions
| Transaction Hash |
|
Block
|
From
|
To
|
|||||
|---|---|---|---|---|---|---|---|---|---|
| Deposit | 18745465 | 37 days ago | IN | 0 HYPE | 0.00000592 |
Cross-Chain Transactions
Loading...
Loading
This contract may be a proxy contract. Click on More Options and select Is this a proxy? to confirm and enable the "Read as Proxy" & "Write as Proxy" tabs.
Contract Source Code Verified (Exact Match)
Contract Name:
HypeStrategy
Compiler Version
v0.8.28+commit.7893614a
Contract Source Code (Solidity)
/**
*Submitted for verification at hyperevmscan.io on 2025-10-10
*/
// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity =0.8.28 >=0.4.11 >=0.4.16 >=0.6.2 >=0.8.4 ^0.8.20 ^0.8.21 ^0.8.22;
// src/strategies/Hyperliquid/libraries/Constants.sol
/**
* @title Constants
* @notice Centralized constants for Hyperliquid protocol integration
* @dev All protocol-specific addresses, indices, and constants in one place
*/
library Constants {
// Token Addresses
address internal constant HYPE = 0x5555555555555555555555555555555555555555;
address internal constant USDT0 = 0xB8CE59FC3717ada4C02eaDF9682A9e934F625ebb;
address internal constant USDT0_SYSTEM_ADDRESS = 0x200000000000000000000000000000000000010C;
// Token Indices
uint16 internal constant HYPE_PERP_INDEX = 159;
uint256 internal constant HYPE_SPOT_INDEX = 150;
uint64 internal constant USDT_TOKEN_ID = 268;
uint64 internal constant USDC_TOKEN_ID = 0;
// Protocol Parameters
uint256 internal constant BASE_BPS = 10_000;
uint256 internal constant MAX_WITHDRAWAL_FEE = 500; // 5%
uint24 internal constant POOL_FEE = 500; // 5%
// Swap Related
address internal constant HYPERSWAP_ROUTER = 0x6D99e7f6747AF2cDbB5164b6DD50e40D4fDe1e77;
// CoreWriter constants
address public constant CORE_WRITER = 0x3333333333333333333333333333333333333333;
address public constant HYPE_SYSTEM_ADDRESS = 0x2222222222222222222222222222222222222222;
}
// lib/openzeppelin-contracts/contracts/utils/Errors.sol
// OpenZeppelin Contracts (last updated v5.1.0) (utils/Errors.sol)
/**
* @dev Collection of common custom errors used in multiple contracts
*
* IMPORTANT: Backwards compatibility is not guaranteed in future versions of the library.
* It is recommended to avoid relying on the error API for critical functionality.
*
* _Available since v5.1._
*/
library Errors_0 {
/**
* @dev The ETH balance of the account is not enough to perform the operation.
*/
error InsufficientBalance(uint256 balance, uint256 needed);
/**
* @dev A call to an address target failed. The target may have reverted.
*/
error FailedCall();
/**
* @dev The deployment failed.
*/
error FailedDeployment();
/**
* @dev A necessary precompile is missing.
*/
error MissingPrecompile(address);
}
// src/strategies/Hyperliquid/libraries/Errors.sol
/**
* @title Errors
* @notice Centralized error definitions for Hyperliquid strategy contracts
* @dev All custom errors in one place for consistency and gas efficiency
*/
library Errors_1 {
// Strategy Errors
error NoWithdrawalRequest();
error WithdrawalAlreadyClaimed();
error EpochNotFinalized();
error InsufficientAssets();
error BelowMinimumDeposit();
error InvalidWithdrawalFee();
error InvalidEpoch();
error EpochAlreadyFinalized();
error ZeroWithdrawalForClaim();
error ZeroWithdrawal();
error PreviousEpochNotFinalized();
error InvalidHyperCoreDestination();
// Protocol Interaction Errors
error InsufficientBalance();
error ZeroAmount();
// Admin/Access Errors
error InvalidFeeRecipient();
error InvalidMinDeposit();
error NotAuthorized();
// General Errors
error InvalidAddress();
}
// lib/openzeppelin-contracts/contracts/access/IAccessControl.sol
// OpenZeppelin Contracts (last updated v5.4.0) (access/IAccessControl.sol)
/**
* @dev External interface of AccessControl declared to support ERC-165 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 to signal 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. This account bears the admin role (for the granted role).
* Expected in cases where the role was granted using the internal {AccessControl-_grantRole}.
*/
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;
}
// lib/openzeppelin-contracts/contracts/proxy/beacon/IBeacon.sol
// OpenZeppelin Contracts (last updated v5.4.0) (proxy/beacon/IBeacon.sol)
/**
* @dev This is the interface that {BeaconProxy} expects of its beacon.
*/
interface IBeacon {
/**
* @dev Must return an address that can be used as a delegate call target.
*
* {UpgradeableBeacon} will check that this address is a contract.
*/
function implementation() external view returns (address);
}
// src/strategies/Hyperliquid/interfaces/ICoreReader.sol
/**
* @title IHyperCoreReader
* @dev Interface for HyperCoreReader contract that provides access to Hyperliquid precompiled functions
* Used to read on-chain data from Hyperliquid's core systems including positions, balances, prices, and more
*/
interface ICoreReader {
// Structs
struct Position {
int64 szi;
uint64 entryNtl;
int64 isolatedRawUsd;
uint32 leverage;
bool isIsolated;
}
struct SpotBalance {
uint64 total;
uint64 hold;
uint64 entryNtl;
}
struct Withdrawable {
uint64 withdrawable;
}
struct Bbo {
uint64 bid;
uint64 ask;
}
struct AccountMarginSummary {
int64 accountValue;
uint64 marginUsed;
uint64 ntlPos;
int64 rawUsd;
}
struct CoreUserExists {
bool exists;
}
// Position Functions
/**
* @dev Get position information for a user on a specific perpetual market
* @param user The user address
* @param perp The perpetual market index
* @return Position struct containing position details
*/
function position(address user, uint16 perp) external view returns (Position memory);
// Balance Functions
/**
* @dev Get spot balance for a user on a specific token
* @param user The user address
* @param token The token ID
* @return SpotBalance struct containing balance details
*/
function spotBalance(address user, uint64 token) external view returns (SpotBalance memory);
/**
* @dev Get withdrawable amount for a user
* @param user The user address
* @return Withdrawable struct containing withdrawable amount
*/
function withdrawable(address user) external view returns (Withdrawable memory);
// Price Functions
/**
* @dev Get mark price for a specific asset index
* @param index The asset index
* @return Mark price as uint64
*/
function markPx(uint32 index) external view returns (uint64);
/**
* @dev Get oracle price for a specific asset index
* @param index The asset index
* @return Oracle price as uint64
*/
function oraclePx(uint32 index) external view returns (uint64);
/**
* @dev Get best bid and offer (BBO) for a specific asset
* @param asset The asset index
* @return Bbo struct containing bid and ask prices
*/
function bbo(uint32 asset) external view returns (Bbo memory);
// System Functions
/**
* @dev Get L1 block number
* @return L1 block number as uint64
*/
function l1BlockNumber() external view returns (uint64);
// Account Functions
/**
* @dev Get account margin summary for a user on a specific perpetual DEX
* @param perp_dex_index The perpetual DEX index
* @param user The user address
* @return AccountMarginSummary struct containing margin information
*/
function accountMarginSummary(
uint32 perp_dex_index,
address user
)
external
view
returns (AccountMarginSummary memory);
}
// src/strategies/Hyperliquid/interfaces/ICoreWriter.sol
/// @notice Minimal interface for the system contract that HyperCore watches.
interface ICoreWriter {
function sendRawAction(bytes calldata data) external;
}
// lib/openzeppelin-contracts/contracts/utils/introspection/IERC165.sol
// OpenZeppelin Contracts (last updated v5.4.0) (utils/introspection/IERC165.sol)
/**
* @dev Interface of the ERC-165 standard, as defined in the
* https://eips.ethereum.org/EIPS/eip-165[ERC].
*
* 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[ERC 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);
}
// lib/openzeppelin-contracts/contracts/interfaces/IERC1967.sol
// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC1967.sol)
/**
* @dev ERC-1967: Proxy Storage Slots. This interface contains the events defined in the ERC.
*/
interface IERC1967 {
/**
* @dev Emitted when the implementation is upgraded.
*/
event Upgraded(address indexed implementation);
/**
* @dev Emitted when the admin account has changed.
*/
event AdminChanged(address previousAdmin, address newAdmin);
/**
* @dev Emitted when the beacon is changed.
*/
event BeaconUpgraded(address indexed beacon);
}
// lib/openzeppelin-contracts/contracts/token/ERC20/IERC20.sol
// OpenZeppelin Contracts (last updated v5.4.0) (token/ERC20/IERC20.sol)
/**
* @dev Interface of the ERC-20 standard as defined in the ERC.
*/
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);
}
// src/strategies/Hyperliquid/interfaces/IHypeStrategy.sol
/**
* @title IHypeStrategy
* @author Raga Finance
* @dev Interface for the HypeStrategy ERC4626 vault with 2-phased withdrawals
* Implements delta-neutral strategy using short positions on Hyperliquid
*/
interface IHypeStrategy {
// Structs
struct EpochData {
uint32 epoch;
uint48 startTime;
uint48 endTime;
uint128 actualWithdrawnAssets;
uint256 totalWithdrawalShares;
bool finalized;
}
struct WithdrawalRequest {
uint128 shares;
uint32 epoch;
}
// Events
event WithdrawalRequested(address indexed user, uint256 shares, uint256 epoch);
event WithdrawalClaimed(address indexed user, uint256 shares, uint256 assets);
event MinDepositUpdated(uint256 minDeposit);
event EpochWithdrawalsProcessed(uint32 indexed epoch, uint128 amount);
event EpochUpdated(uint256 indexed epoch, uint256 startTime);
event FeeRecipientUpdated(address indexed oldRecipient, address indexed newRecipient);
event SwapExecuted(address indexed tokenIn, address indexed tokenOut, uint256 amountIn, uint256 amountOut);
event FundsTransferred(address indexed destination, uint256 amount);
event SpotSent(address indexed destination, uint64 tokenId, uint64 amount);
// Initialization
function initialize(
string memory name,
string memory symbol,
address _bot,
address _feeRecipient,
address _coreReader,
address _admin,
uint256 _performanceFee,
uint256 _minDeposit
)
external;
// Core Withdrawal System
function requestWithdrawal(uint128 shares) external;
function claimWithdrawal(address user) external;
// Bot Functions
function processEpochAndNotify(uint32 _epoch, uint128 _withdrawalAmount, uint128 _treasuryAssets) external;
function updateEpoch(uint128 _amountToSwap) external;
// Admin Functions
function updateFees(uint32 _performanceFee) external;
function updateFeeRecipient(address _feeRecipient) external;
function setMinDeposit(uint64 _minDeposit) external;
// View Functions - Strategy Data
function getHYPEValueInUSDC() external view returns (uint256);
// View Functions - Epoch Data
function getEpochData(uint128 epoch) external view returns (EpochData memory);
function getCurrentEpoch() external view returns (uint256);
function getScheduledWithdrawal() external view returns (uint256);
function getReservedAssets() external view returns (uint256);
function getScheduledWithdrawalAssets() external view returns (uint256);
// View Functions - User Data
function getUserWithdrawalRequests(address user) external view returns (WithdrawalRequest[] memory);
function getUserQueuedWithdrawal(address user) external view returns (uint256 shares, uint256 assets);
// View Functions - Asset Management
function getUnallocatedAssets() external view returns (uint256);
}
// src/strategies/Hyperliquid/interfaces/IHyperSwapRouter.sol
/**
* @title IHyperSwapRouter
* @notice Interface for HyperSwap V3 Router
*/
interface IHyperSwapRouter {
struct ExactInputSingleParams {
address tokenIn;
address tokenOut;
uint24 fee;
address recipient;
uint256 amountIn;
uint256 amountOutMinimum;
uint160 sqrtPriceLimitX96;
}
struct ExactOutputSingleParams {
address tokenIn;
address tokenOut;
uint24 fee;
address recipient;
uint256 amountOut;
uint256 amountInMaximum;
uint160 sqrtPriceLimitX96;
}
struct ExactOutputParams {
bytes path;
address recipient;
uint256 deadline;
uint256 amountOut;
uint256 amountInMaximum;
}
function exactOutputSingle(ExactOutputSingleParams calldata params) external returns (uint256 amountIn);
function exactInputSingle(ExactInputSingleParams calldata params) external payable returns (uint256 amountOut);
}
// lib/openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol
// OpenZeppelin Contracts (last updated v5.0.0) (proxy/utils/Initializable.sol)
/**
* @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed
* behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an
* external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer
* function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.
*
* The initialization functions use a version number. Once a version number is used, it is consumed and cannot be
* reused. This mechanism prevents re-execution of each "step" but allows the creation of new initialization steps in
* case an upgrade adds a module that needs to be initialized.
*
* For example:
*
* [.hljs-theme-light.nopadding]
* ```solidity
* contract MyToken is ERC20Upgradeable {
* function initialize() initializer public {
* __ERC20_init("MyToken", "MTK");
* }
* }
*
* contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {
* function initializeV2() reinitializer(2) public {
* __ERC20Permit_init("MyToken");
* }
* }
* ```
*
* TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as
* possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.
*
* CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure
* that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.
*
* [CAUTION]
* ====
* Avoid leaving a contract uninitialized.
*
* An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation
* contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke
* the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:
*
* [.hljs-theme-light.nopadding]
* ```
* /// @custom:oz-upgrades-unsafe-allow constructor
* constructor() {
* _disableInitializers();
* }
* ```
* ====
*/
abstract contract Initializable {
/**
* @dev Storage of the initializable contract.
*
* It's implemented on a custom ERC-7201 namespace to reduce the risk of storage collisions
* when using with upgradeable contracts.
*
* @custom:storage-location erc7201:openzeppelin.storage.Initializable
*/
struct InitializableStorage {
/**
* @dev Indicates that the contract has been initialized.
*/
uint64 _initialized;
/**
* @dev Indicates that the contract is in the process of being initialized.
*/
bool _initializing;
}
// keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.Initializable")) - 1)) & ~bytes32(uint256(0xff))
bytes32 private constant INITIALIZABLE_STORAGE = 0xf0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00;
/**
* @dev The contract is already initialized.
*/
error InvalidInitialization();
/**
* @dev The contract is not initializing.
*/
error NotInitializing();
/**
* @dev Triggered when the contract has been initialized or reinitialized.
*/
event Initialized(uint64 version);
/**
* @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,
* `onlyInitializing` functions can be used to initialize parent contracts.
*
* Similar to `reinitializer(1)`, except that in the context of a constructor an `initializer` may be invoked any
* number of times. This behavior in the constructor can be useful during testing and is not expected to be used in
* production.
*
* Emits an {Initialized} event.
*/
modifier initializer() {
// solhint-disable-next-line var-name-mixedcase
InitializableStorage storage $ = _getInitializableStorage();
// Cache values to avoid duplicated sloads
bool isTopLevelCall = !$._initializing;
uint64 initialized = $._initialized;
// Allowed calls:
// - initialSetup: the contract is not in the initializing state and no previous version was
// initialized
// - construction: the contract is initialized at version 1 (no reininitialization) and the
// current contract is just being deployed
bool initialSetup = initialized == 0 && isTopLevelCall;
bool construction = initialized == 1 && address(this).code.length == 0;
if (!initialSetup && !construction) {
revert InvalidInitialization();
}
$._initialized = 1;
if (isTopLevelCall) {
$._initializing = true;
}
_;
if (isTopLevelCall) {
$._initializing = false;
emit Initialized(1);
}
}
/**
* @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the
* contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be
* used to initialize parent contracts.
*
* A reinitializer may be used after the original initialization step. This is essential to configure modules that
* are added through upgrades and that require initialization.
*
* When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`
* cannot be nested. If one is invoked in the context of another, execution will revert.
*
* Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in
* a contract, executing them in the right order is up to the developer or operator.
*
* WARNING: Setting the version to 2**64 - 1 will prevent any future reinitialization.
*
* Emits an {Initialized} event.
*/
modifier reinitializer(uint64 version) {
// solhint-disable-next-line var-name-mixedcase
InitializableStorage storage $ = _getInitializableStorage();
if ($._initializing || $._initialized >= version) {
revert InvalidInitialization();
}
$._initialized = version;
$._initializing = true;
_;
$._initializing = false;
emit Initialized(version);
}
/**
* @dev Modifier to protect an initialization function so that it can only be invoked by functions with the
* {initializer} and {reinitializer} modifiers, directly or indirectly.
*/
modifier onlyInitializing() {
_checkInitializing();
_;
}
/**
* @dev Reverts if the contract is not in an initializing state. See {onlyInitializing}.
*/
function _checkInitializing() internal view virtual {
if (!_isInitializing()) {
revert NotInitializing();
}
}
/**
* @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.
* Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized
* to any version. It is recommended to use this to lock implementation contracts that are designed to be called
* through proxies.
*
* Emits an {Initialized} event the first time it is successfully executed.
*/
function _disableInitializers() internal virtual {
// solhint-disable-next-line var-name-mixedcase
InitializableStorage storage $ = _getInitializableStorage();
if ($._initializing) {
revert InvalidInitialization();
}
if ($._initialized != type(uint64).max) {
$._initialized = type(uint64).max;
emit Initialized(type(uint64).max);
}
}
/**
* @dev Returns the highest version that has been initialized. See {reinitializer}.
*/
function _getInitializedVersion() internal view returns (uint64) {
return _getInitializableStorage()._initialized;
}
/**
* @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.
*/
function _isInitializing() internal view returns (bool) {
return _getInitializableStorage()._initializing;
}
/**
* @dev Returns a pointer to the storage namespace.
*/
// solhint-disable-next-line var-name-mixedcase
function _getInitializableStorage() private pure returns (InitializableStorage storage $) {
assembly {
$.slot := INITIALIZABLE_STORAGE
}
}
}
// lib/openzeppelin-contracts/contracts/utils/Panic.sol
// OpenZeppelin Contracts (last updated v5.1.0) (utils/Panic.sol)
/**
* @dev Helper library for emitting standardized panic codes.
*
* ```solidity
* contract Example {
* using Panic for uint256;
*
* // Use any of the declared internal constants
* function foo() { Panic.GENERIC.panic(); }
*
* // Alternatively
* function foo() { Panic.panic(Panic.GENERIC); }
* }
* ```
*
* Follows the list from https://github.com/ethereum/solidity/blob/v0.8.24/libsolutil/ErrorCodes.h[libsolutil].
*
* _Available since v5.1._
*/
// slither-disable-next-line unused-state
library Panic {
/// @dev generic / unspecified error
uint256 internal constant GENERIC = 0x00;
/// @dev used by the assert() builtin
uint256 internal constant ASSERT = 0x01;
/// @dev arithmetic underflow or overflow
uint256 internal constant UNDER_OVERFLOW = 0x11;
/// @dev division or modulo by zero
uint256 internal constant DIVISION_BY_ZERO = 0x12;
/// @dev enum conversion error
uint256 internal constant ENUM_CONVERSION_ERROR = 0x21;
/// @dev invalid encoding in storage
uint256 internal constant STORAGE_ENCODING_ERROR = 0x22;
/// @dev empty array pop
uint256 internal constant EMPTY_ARRAY_POP = 0x31;
/// @dev array out of bounds access
uint256 internal constant ARRAY_OUT_OF_BOUNDS = 0x32;
/// @dev resource error (too large allocation or too large array)
uint256 internal constant RESOURCE_ERROR = 0x41;
/// @dev calling invalid internal function
uint256 internal constant INVALID_INTERNAL_FUNCTION = 0x51;
/// @dev Reverts with a panic code. Recommended to use with
/// the internal constants with predefined codes.
function panic(uint256 code) internal pure {
assembly ("memory-safe") {
mstore(0x00, 0x4e487b71)
mstore(0x20, code)
revert(0x1c, 0x24)
}
}
}
// lib/openzeppelin-contracts/contracts/utils/math/SafeCast.sol
// OpenZeppelin Contracts (last updated v5.1.0) (utils/math/SafeCast.sol)
// This file was procedurally generated from scripts/generate/templates/SafeCast.js.
/**
* @dev Wrappers over Solidity's uintXX/intXX/bool casting operators with added overflow
* checks.
*
* Downcasting from uint256/int256 in Solidity does not revert on overflow. This can
* easily result in undesired exploitation or bugs, since developers usually
* assume that overflows raise errors. `SafeCast` restores this intuition by
* reverting the transaction when such an operation overflows.
*
* Using this library instead of the unchecked operations eliminates an entire
* class of bugs, so it's recommended to use it always.
*/
library SafeCast {
/**
* @dev Value doesn't fit in an uint of `bits` size.
*/
error SafeCastOverflowedUintDowncast(uint8 bits, uint256 value);
/**
* @dev An int value doesn't fit in an uint of `bits` size.
*/
error SafeCastOverflowedIntToUint(int256 value);
/**
* @dev Value doesn't fit in an int of `bits` size.
*/
error SafeCastOverflowedIntDowncast(uint8 bits, int256 value);
/**
* @dev An uint value doesn't fit in an int of `bits` size.
*/
error SafeCastOverflowedUintToInt(uint256 value);
/**
* @dev Returns the downcasted uint248 from uint256, reverting on
* overflow (when the input is greater than largest uint248).
*
* Counterpart to Solidity's `uint248` operator.
*
* Requirements:
*
* - input must fit into 248 bits
*/
function toUint248(uint256 value) internal pure returns (uint248) {
if (value > type(uint248).max) {
revert SafeCastOverflowedUintDowncast(248, value);
}
return uint248(value);
}
/**
* @dev Returns the downcasted uint240 from uint256, reverting on
* overflow (when the input is greater than largest uint240).
*
* Counterpart to Solidity's `uint240` operator.
*
* Requirements:
*
* - input must fit into 240 bits
*/
function toUint240(uint256 value) internal pure returns (uint240) {
if (value > type(uint240).max) {
revert SafeCastOverflowedUintDowncast(240, value);
}
return uint240(value);
}
/**
* @dev Returns the downcasted uint232 from uint256, reverting on
* overflow (when the input is greater than largest uint232).
*
* Counterpart to Solidity's `uint232` operator.
*
* Requirements:
*
* - input must fit into 232 bits
*/
function toUint232(uint256 value) internal pure returns (uint232) {
if (value > type(uint232).max) {
revert SafeCastOverflowedUintDowncast(232, value);
}
return uint232(value);
}
/**
* @dev Returns the downcasted uint224 from uint256, reverting on
* overflow (when the input is greater than largest uint224).
*
* Counterpart to Solidity's `uint224` operator.
*
* Requirements:
*
* - input must fit into 224 bits
*/
function toUint224(uint256 value) internal pure returns (uint224) {
if (value > type(uint224).max) {
revert SafeCastOverflowedUintDowncast(224, value);
}
return uint224(value);
}
/**
* @dev Returns the downcasted uint216 from uint256, reverting on
* overflow (when the input is greater than largest uint216).
*
* Counterpart to Solidity's `uint216` operator.
*
* Requirements:
*
* - input must fit into 216 bits
*/
function toUint216(uint256 value) internal pure returns (uint216) {
if (value > type(uint216).max) {
revert SafeCastOverflowedUintDowncast(216, value);
}
return uint216(value);
}
/**
* @dev Returns the downcasted uint208 from uint256, reverting on
* overflow (when the input is greater than largest uint208).
*
* Counterpart to Solidity's `uint208` operator.
*
* Requirements:
*
* - input must fit into 208 bits
*/
function toUint208(uint256 value) internal pure returns (uint208) {
if (value > type(uint208).max) {
revert SafeCastOverflowedUintDowncast(208, value);
}
return uint208(value);
}
/**
* @dev Returns the downcasted uint200 from uint256, reverting on
* overflow (when the input is greater than largest uint200).
*
* Counterpart to Solidity's `uint200` operator.
*
* Requirements:
*
* - input must fit into 200 bits
*/
function toUint200(uint256 value) internal pure returns (uint200) {
if (value > type(uint200).max) {
revert SafeCastOverflowedUintDowncast(200, value);
}
return uint200(value);
}
/**
* @dev Returns the downcasted uint192 from uint256, reverting on
* overflow (when the input is greater than largest uint192).
*
* Counterpart to Solidity's `uint192` operator.
*
* Requirements:
*
* - input must fit into 192 bits
*/
function toUint192(uint256 value) internal pure returns (uint192) {
if (value > type(uint192).max) {
revert SafeCastOverflowedUintDowncast(192, value);
}
return uint192(value);
}
/**
* @dev Returns the downcasted uint184 from uint256, reverting on
* overflow (when the input is greater than largest uint184).
*
* Counterpart to Solidity's `uint184` operator.
*
* Requirements:
*
* - input must fit into 184 bits
*/
function toUint184(uint256 value) internal pure returns (uint184) {
if (value > type(uint184).max) {
revert SafeCastOverflowedUintDowncast(184, value);
}
return uint184(value);
}
/**
* @dev Returns the downcasted uint176 from uint256, reverting on
* overflow (when the input is greater than largest uint176).
*
* Counterpart to Solidity's `uint176` operator.
*
* Requirements:
*
* - input must fit into 176 bits
*/
function toUint176(uint256 value) internal pure returns (uint176) {
if (value > type(uint176).max) {
revert SafeCastOverflowedUintDowncast(176, value);
}
return uint176(value);
}
/**
* @dev Returns the downcasted uint168 from uint256, reverting on
* overflow (when the input is greater than largest uint168).
*
* Counterpart to Solidity's `uint168` operator.
*
* Requirements:
*
* - input must fit into 168 bits
*/
function toUint168(uint256 value) internal pure returns (uint168) {
if (value > type(uint168).max) {
revert SafeCastOverflowedUintDowncast(168, value);
}
return uint168(value);
}
/**
* @dev Returns the downcasted uint160 from uint256, reverting on
* overflow (when the input is greater than largest uint160).
*
* Counterpart to Solidity's `uint160` operator.
*
* Requirements:
*
* - input must fit into 160 bits
*/
function toUint160(uint256 value) internal pure returns (uint160) {
if (value > type(uint160).max) {
revert SafeCastOverflowedUintDowncast(160, value);
}
return uint160(value);
}
/**
* @dev Returns the downcasted uint152 from uint256, reverting on
* overflow (when the input is greater than largest uint152).
*
* Counterpart to Solidity's `uint152` operator.
*
* Requirements:
*
* - input must fit into 152 bits
*/
function toUint152(uint256 value) internal pure returns (uint152) {
if (value > type(uint152).max) {
revert SafeCastOverflowedUintDowncast(152, value);
}
return uint152(value);
}
/**
* @dev Returns the downcasted uint144 from uint256, reverting on
* overflow (when the input is greater than largest uint144).
*
* Counterpart to Solidity's `uint144` operator.
*
* Requirements:
*
* - input must fit into 144 bits
*/
function toUint144(uint256 value) internal pure returns (uint144) {
if (value > type(uint144).max) {
revert SafeCastOverflowedUintDowncast(144, value);
}
return uint144(value);
}
/**
* @dev Returns the downcasted uint136 from uint256, reverting on
* overflow (when the input is greater than largest uint136).
*
* Counterpart to Solidity's `uint136` operator.
*
* Requirements:
*
* - input must fit into 136 bits
*/
function toUint136(uint256 value) internal pure returns (uint136) {
if (value > type(uint136).max) {
revert SafeCastOverflowedUintDowncast(136, value);
}
return uint136(value);
}
/**
* @dev Returns the downcasted uint128 from uint256, reverting on
* overflow (when the input is greater than largest uint128).
*
* Counterpart to Solidity's `uint128` operator.
*
* Requirements:
*
* - input must fit into 128 bits
*/
function toUint128(uint256 value) internal pure returns (uint128) {
if (value > type(uint128).max) {
revert SafeCastOverflowedUintDowncast(128, value);
}
return uint128(value);
}
/**
* @dev Returns the downcasted uint120 from uint256, reverting on
* overflow (when the input is greater than largest uint120).
*
* Counterpart to Solidity's `uint120` operator.
*
* Requirements:
*
* - input must fit into 120 bits
*/
function toUint120(uint256 value) internal pure returns (uint120) {
if (value > type(uint120).max) {
revert SafeCastOverflowedUintDowncast(120, value);
}
return uint120(value);
}
/**
* @dev Returns the downcasted uint112 from uint256, reverting on
* overflow (when the input is greater than largest uint112).
*
* Counterpart to Solidity's `uint112` operator.
*
* Requirements:
*
* - input must fit into 112 bits
*/
function toUint112(uint256 value) internal pure returns (uint112) {
if (value > type(uint112).max) {
revert SafeCastOverflowedUintDowncast(112, value);
}
return uint112(value);
}
/**
* @dev Returns the downcasted uint104 from uint256, reverting on
* overflow (when the input is greater than largest uint104).
*
* Counterpart to Solidity's `uint104` operator.
*
* Requirements:
*
* - input must fit into 104 bits
*/
function toUint104(uint256 value) internal pure returns (uint104) {
if (value > type(uint104).max) {
revert SafeCastOverflowedUintDowncast(104, value);
}
return uint104(value);
}
/**
* @dev Returns the downcasted uint96 from uint256, reverting on
* overflow (when the input is greater than largest uint96).
*
* Counterpart to Solidity's `uint96` operator.
*
* Requirements:
*
* - input must fit into 96 bits
*/
function toUint96(uint256 value) internal pure returns (uint96) {
if (value > type(uint96).max) {
revert SafeCastOverflowedUintDowncast(96, value);
}
return uint96(value);
}
/**
* @dev Returns the downcasted uint88 from uint256, reverting on
* overflow (when the input is greater than largest uint88).
*
* Counterpart to Solidity's `uint88` operator.
*
* Requirements:
*
* - input must fit into 88 bits
*/
function toUint88(uint256 value) internal pure returns (uint88) {
if (value > type(uint88).max) {
revert SafeCastOverflowedUintDowncast(88, value);
}
return uint88(value);
}
/**
* @dev Returns the downcasted uint80 from uint256, reverting on
* overflow (when the input is greater than largest uint80).
*
* Counterpart to Solidity's `uint80` operator.
*
* Requirements:
*
* - input must fit into 80 bits
*/
function toUint80(uint256 value) internal pure returns (uint80) {
if (value > type(uint80).max) {
revert SafeCastOverflowedUintDowncast(80, value);
}
return uint80(value);
}
/**
* @dev Returns the downcasted uint72 from uint256, reverting on
* overflow (when the input is greater than largest uint72).
*
* Counterpart to Solidity's `uint72` operator.
*
* Requirements:
*
* - input must fit into 72 bits
*/
function toUint72(uint256 value) internal pure returns (uint72) {
if (value > type(uint72).max) {
revert SafeCastOverflowedUintDowncast(72, value);
}
return uint72(value);
}
/**
* @dev Returns the downcasted uint64 from uint256, reverting on
* overflow (when the input is greater than largest uint64).
*
* Counterpart to Solidity's `uint64` operator.
*
* Requirements:
*
* - input must fit into 64 bits
*/
function toUint64(uint256 value) internal pure returns (uint64) {
if (value > type(uint64).max) {
revert SafeCastOverflowedUintDowncast(64, value);
}
return uint64(value);
}
/**
* @dev Returns the downcasted uint56 from uint256, reverting on
* overflow (when the input is greater than largest uint56).
*
* Counterpart to Solidity's `uint56` operator.
*
* Requirements:
*
* - input must fit into 56 bits
*/
function toUint56(uint256 value) internal pure returns (uint56) {
if (value > type(uint56).max) {
revert SafeCastOverflowedUintDowncast(56, value);
}
return uint56(value);
}
/**
* @dev Returns the downcasted uint48 from uint256, reverting on
* overflow (when the input is greater than largest uint48).
*
* Counterpart to Solidity's `uint48` operator.
*
* Requirements:
*
* - input must fit into 48 bits
*/
function toUint48(uint256 value) internal pure returns (uint48) {
if (value > type(uint48).max) {
revert SafeCastOverflowedUintDowncast(48, value);
}
return uint48(value);
}
/**
* @dev Returns the downcasted uint40 from uint256, reverting on
* overflow (when the input is greater than largest uint40).
*
* Counterpart to Solidity's `uint40` operator.
*
* Requirements:
*
* - input must fit into 40 bits
*/
function toUint40(uint256 value) internal pure returns (uint40) {
if (value > type(uint40).max) {
revert SafeCastOverflowedUintDowncast(40, value);
}
return uint40(value);
}
/**
* @dev Returns the downcasted uint32 from uint256, reverting on
* overflow (when the input is greater than largest uint32).
*
* Counterpart to Solidity's `uint32` operator.
*
* Requirements:
*
* - input must fit into 32 bits
*/
function toUint32(uint256 value) internal pure returns (uint32) {
if (value > type(uint32).max) {
revert SafeCastOverflowedUintDowncast(32, value);
}
return uint32(value);
}
/**
* @dev Returns the downcasted uint24 from uint256, reverting on
* overflow (when the input is greater than largest uint24).
*
* Counterpart to Solidity's `uint24` operator.
*
* Requirements:
*
* - input must fit into 24 bits
*/
function toUint24(uint256 value) internal pure returns (uint24) {
if (value > type(uint24).max) {
revert SafeCastOverflowedUintDowncast(24, value);
}
return uint24(value);
}
/**
* @dev Returns the downcasted uint16 from uint256, reverting on
* overflow (when the input is greater than largest uint16).
*
* Counterpart to Solidity's `uint16` operator.
*
* Requirements:
*
* - input must fit into 16 bits
*/
function toUint16(uint256 value) internal pure returns (uint16) {
if (value > type(uint16).max) {
revert SafeCastOverflowedUintDowncast(16, value);
}
return uint16(value);
}
/**
* @dev Returns the downcasted uint8 from uint256, reverting on
* overflow (when the input is greater than largest uint8).
*
* Counterpart to Solidity's `uint8` operator.
*
* Requirements:
*
* - input must fit into 8 bits
*/
function toUint8(uint256 value) internal pure returns (uint8) {
if (value > type(uint8).max) {
revert SafeCastOverflowedUintDowncast(8, value);
}
return uint8(value);
}
/**
* @dev Converts a signed int256 into an unsigned uint256.
*
* Requirements:
*
* - input must be greater than or equal to 0.
*/
function toUint256(int256 value) internal pure returns (uint256) {
if (value < 0) {
revert SafeCastOverflowedIntToUint(value);
}
return uint256(value);
}
/**
* @dev Returns the downcasted int248 from int256, reverting on
* overflow (when the input is less than smallest int248 or
* greater than largest int248).
*
* Counterpart to Solidity's `int248` operator.
*
* Requirements:
*
* - input must fit into 248 bits
*/
function toInt248(int256 value) internal pure returns (int248 downcasted) {
downcasted = int248(value);
if (downcasted != value) {
revert SafeCastOverflowedIntDowncast(248, value);
}
}
/**
* @dev Returns the downcasted int240 from int256, reverting on
* overflow (when the input is less than smallest int240 or
* greater than largest int240).
*
* Counterpart to Solidity's `int240` operator.
*
* Requirements:
*
* - input must fit into 240 bits
*/
function toInt240(int256 value) internal pure returns (int240 downcasted) {
downcasted = int240(value);
if (downcasted != value) {
revert SafeCastOverflowedIntDowncast(240, value);
}
}
/**
* @dev Returns the downcasted int232 from int256, reverting on
* overflow (when the input is less than smallest int232 or
* greater than largest int232).
*
* Counterpart to Solidity's `int232` operator.
*
* Requirements:
*
* - input must fit into 232 bits
*/
function toInt232(int256 value) internal pure returns (int232 downcasted) {
downcasted = int232(value);
if (downcasted != value) {
revert SafeCastOverflowedIntDowncast(232, value);
}
}
/**
* @dev Returns the downcasted int224 from int256, reverting on
* overflow (when the input is less than smallest int224 or
* greater than largest int224).
*
* Counterpart to Solidity's `int224` operator.
*
* Requirements:
*
* - input must fit into 224 bits
*/
function toInt224(int256 value) internal pure returns (int224 downcasted) {
downcasted = int224(value);
if (downcasted != value) {
revert SafeCastOverflowedIntDowncast(224, value);
}
}
/**
* @dev Returns the downcasted int216 from int256, reverting on
* overflow (when the input is less than smallest int216 or
* greater than largest int216).
*
* Counterpart to Solidity's `int216` operator.
*
* Requirements:
*
* - input must fit into 216 bits
*/
function toInt216(int256 value) internal pure returns (int216 downcasted) {
downcasted = int216(value);
if (downcasted != value) {
revert SafeCastOverflowedIntDowncast(216, value);
}
}
/**
* @dev Returns the downcasted int208 from int256, reverting on
* overflow (when the input is less than smallest int208 or
* greater than largest int208).
*
* Counterpart to Solidity's `int208` operator.
*
* Requirements:
*
* - input must fit into 208 bits
*/
function toInt208(int256 value) internal pure returns (int208 downcasted) {
downcasted = int208(value);
if (downcasted != value) {
revert SafeCastOverflowedIntDowncast(208, value);
}
}
/**
* @dev Returns the downcasted int200 from int256, reverting on
* overflow (when the input is less than smallest int200 or
* greater than largest int200).
*
* Counterpart to Solidity's `int200` operator.
*
* Requirements:
*
* - input must fit into 200 bits
*/
function toInt200(int256 value) internal pure returns (int200 downcasted) {
downcasted = int200(value);
if (downcasted != value) {
revert SafeCastOverflowedIntDowncast(200, value);
}
}
/**
* @dev Returns the downcasted int192 from int256, reverting on
* overflow (when the input is less than smallest int192 or
* greater than largest int192).
*
* Counterpart to Solidity's `int192` operator.
*
* Requirements:
*
* - input must fit into 192 bits
*/
function toInt192(int256 value) internal pure returns (int192 downcasted) {
downcasted = int192(value);
if (downcasted != value) {
revert SafeCastOverflowedIntDowncast(192, value);
}
}
/**
* @dev Returns the downcasted int184 from int256, reverting on
* overflow (when the input is less than smallest int184 or
* greater than largest int184).
*
* Counterpart to Solidity's `int184` operator.
*
* Requirements:
*
* - input must fit into 184 bits
*/
function toInt184(int256 value) internal pure returns (int184 downcasted) {
downcasted = int184(value);
if (downcasted != value) {
revert SafeCastOverflowedIntDowncast(184, value);
}
}
/**
* @dev Returns the downcasted int176 from int256, reverting on
* overflow (when the input is less than smallest int176 or
* greater than largest int176).
*
* Counterpart to Solidity's `int176` operator.
*
* Requirements:
*
* - input must fit into 176 bits
*/
function toInt176(int256 value) internal pure returns (int176 downcasted) {
downcasted = int176(value);
if (downcasted != value) {
revert SafeCastOverflowedIntDowncast(176, value);
}
}
/**
* @dev Returns the downcasted int168 from int256, reverting on
* overflow (when the input is less than smallest int168 or
* greater than largest int168).
*
* Counterpart to Solidity's `int168` operator.
*
* Requirements:
*
* - input must fit into 168 bits
*/
function toInt168(int256 value) internal pure returns (int168 downcasted) {
downcasted = int168(value);
if (downcasted != value) {
revert SafeCastOverflowedIntDowncast(168, value);
}
}
/**
* @dev Returns the downcasted int160 from int256, reverting on
* overflow (when the input is less than smallest int160 or
* greater than largest int160).
*
* Counterpart to Solidity's `int160` operator.
*
* Requirements:
*
* - input must fit into 160 bits
*/
function toInt160(int256 value) internal pure returns (int160 downcasted) {
downcasted = int160(value);
if (downcasted != value) {
revert SafeCastOverflowedIntDowncast(160, value);
}
}
/**
* @dev Returns the downcasted int152 from int256, reverting on
* overflow (when the input is less than smallest int152 or
* greater than largest int152).
*
* Counterpart to Solidity's `int152` operator.
*
* Requirements:
*
* - input must fit into 152 bits
*/
function toInt152(int256 value) internal pure returns (int152 downcasted) {
downcasted = int152(value);
if (downcasted != value) {
revert SafeCastOverflowedIntDowncast(152, value);
}
}
/**
* @dev Returns the downcasted int144 from int256, reverting on
* overflow (when the input is less than smallest int144 or
* greater than largest int144).
*
* Counterpart to Solidity's `int144` operator.
*
* Requirements:
*
* - input must fit into 144 bits
*/
function toInt144(int256 value) internal pure returns (int144 downcasted) {
downcasted = int144(value);
if (downcasted != value) {
revert SafeCastOverflowedIntDowncast(144, value);
}
}
/**
* @dev Returns the downcasted int136 from int256, reverting on
* overflow (when the input is less than smallest int136 or
* greater than largest int136).
*
* Counterpart to Solidity's `int136` operator.
*
* Requirements:
*
* - input must fit into 136 bits
*/
function toInt136(int256 value) internal pure returns (int136 downcasted) {
downcasted = int136(value);
if (downcasted != value) {
revert SafeCastOverflowedIntDowncast(136, value);
}
}
/**
* @dev Returns the downcasted int128 from int256, reverting on
* overflow (when the input is less than smallest int128 or
* greater than largest int128).
*
* Counterpart to Solidity's `int128` operator.
*
* Requirements:
*
* - input must fit into 128 bits
*/
function toInt128(int256 value) internal pure returns (int128 downcasted) {
downcasted = int128(value);
if (downcasted != value) {
revert SafeCastOverflowedIntDowncast(128, value);
}
}
/**
* @dev Returns the downcasted int120 from int256, reverting on
* overflow (when the input is less than smallest int120 or
* greater than largest int120).
*
* Counterpart to Solidity's `int120` operator.
*
* Requirements:
*
* - input must fit into 120 bits
*/
function toInt120(int256 value) internal pure returns (int120 downcasted) {
downcasted = int120(value);
if (downcasted != value) {
revert SafeCastOverflowedIntDowncast(120, value);
}
}
/**
* @dev Returns the downcasted int112 from int256, reverting on
* overflow (when the input is less than smallest int112 or
* greater than largest int112).
*
* Counterpart to Solidity's `int112` operator.
*
* Requirements:
*
* - input must fit into 112 bits
*/
function toInt112(int256 value) internal pure returns (int112 downcasted) {
downcasted = int112(value);
if (downcasted != value) {
revert SafeCastOverflowedIntDowncast(112, value);
}
}
/**
* @dev Returns the downcasted int104 from int256, reverting on
* overflow (when the input is less than smallest int104 or
* greater than largest int104).
*
* Counterpart to Solidity's `int104` operator.
*
* Requirements:
*
* - input must fit into 104 bits
*/
function toInt104(int256 value) internal pure returns (int104 downcasted) {
downcasted = int104(value);
if (downcasted != value) {
revert SafeCastOverflowedIntDowncast(104, value);
}
}
/**
* @dev Returns the downcasted int96 from int256, reverting on
* overflow (when the input is less than smallest int96 or
* greater than largest int96).
*
* Counterpart to Solidity's `int96` operator.
*
* Requirements:
*
* - input must fit into 96 bits
*/
function toInt96(int256 value) internal pure returns (int96 downcasted) {
downcasted = int96(value);
if (downcasted != value) {
revert SafeCastOverflowedIntDowncast(96, value);
}
}
/**
* @dev Returns the downcasted int88 from int256, reverting on
* overflow (when the input is less than smallest int88 or
* greater than largest int88).
*
* Counterpart to Solidity's `int88` operator.
*
* Requirements:
*
* - input must fit into 88 bits
*/
function toInt88(int256 value) internal pure returns (int88 downcasted) {
downcasted = int88(value);
if (downcasted != value) {
revert SafeCastOverflowedIntDowncast(88, value);
}
}
/**
* @dev Returns the downcasted int80 from int256, reverting on
* overflow (when the input is less than smallest int80 or
* greater than largest int80).
*
* Counterpart to Solidity's `int80` operator.
*
* Requirements:
*
* - input must fit into 80 bits
*/
function toInt80(int256 value) internal pure returns (int80 downcasted) {
downcasted = int80(value);
if (downcasted != value) {
revert SafeCastOverflowedIntDowncast(80, value);
}
}
/**
* @dev Returns the downcasted int72 from int256, reverting on
* overflow (when the input is less than smallest int72 or
* greater than largest int72).
*
* Counterpart to Solidity's `int72` operator.
*
* Requirements:
*
* - input must fit into 72 bits
*/
function toInt72(int256 value) internal pure returns (int72 downcasted) {
downcasted = int72(value);
if (downcasted != value) {
revert SafeCastOverflowedIntDowncast(72, value);
}
}
/**
* @dev Returns the downcasted int64 from int256, reverting on
* overflow (when the input is less than smallest int64 or
* greater than largest int64).
*
* Counterpart to Solidity's `int64` operator.
*
* Requirements:
*
* - input must fit into 64 bits
*/
function toInt64(int256 value) internal pure returns (int64 downcasted) {
downcasted = int64(value);
if (downcasted != value) {
revert SafeCastOverflowedIntDowncast(64, value);
}
}
/**
* @dev Returns the downcasted int56 from int256, reverting on
* overflow (when the input is less than smallest int56 or
* greater than largest int56).
*
* Counterpart to Solidity's `int56` operator.
*
* Requirements:
*
* - input must fit into 56 bits
*/
function toInt56(int256 value) internal pure returns (int56 downcasted) {
downcasted = int56(value);
if (downcasted != value) {
revert SafeCastOverflowedIntDowncast(56, value);
}
}
/**
* @dev Returns the downcasted int48 from int256, reverting on
* overflow (when the input is less than smallest int48 or
* greater than largest int48).
*
* Counterpart to Solidity's `int48` operator.
*
* Requirements:
*
* - input must fit into 48 bits
*/
function toInt48(int256 value) internal pure returns (int48 downcasted) {
downcasted = int48(value);
if (downcasted != value) {
revert SafeCastOverflowedIntDowncast(48, value);
}
}
/**
* @dev Returns the downcasted int40 from int256, reverting on
* overflow (when the input is less than smallest int40 or
* greater than largest int40).
*
* Counterpart to Solidity's `int40` operator.
*
* Requirements:
*
* - input must fit into 40 bits
*/
function toInt40(int256 value) internal pure returns (int40 downcasted) {
downcasted = int40(value);
if (downcasted != value) {
revert SafeCastOverflowedIntDowncast(40, value);
}
}
/**
* @dev Returns the downcasted int32 from int256, reverting on
* overflow (when the input is less than smallest int32 or
* greater than largest int32).
*
* Counterpart to Solidity's `int32` operator.
*
* Requirements:
*
* - input must fit into 32 bits
*/
function toInt32(int256 value) internal pure returns (int32 downcasted) {
downcasted = int32(value);
if (downcasted != value) {
revert SafeCastOverflowedIntDowncast(32, value);
}
}
/**
* @dev Returns the downcasted int24 from int256, reverting on
* overflow (when the input is less than smallest int24 or
* greater than largest int24).
*
* Counterpart to Solidity's `int24` operator.
*
* Requirements:
*
* - input must fit into 24 bits
*/
function toInt24(int256 value) internal pure returns (int24 downcasted) {
downcasted = int24(value);
if (downcasted != value) {
revert SafeCastOverflowedIntDowncast(24, value);
}
}
/**
* @dev Returns the downcasted int16 from int256, reverting on
* overflow (when the input is less than smallest int16 or
* greater than largest int16).
*
* Counterpart to Solidity's `int16` operator.
*
* Requirements:
*
* - input must fit into 16 bits
*/
function toInt16(int256 value) internal pure returns (int16 downcasted) {
downcasted = int16(value);
if (downcasted != value) {
revert SafeCastOverflowedIntDowncast(16, value);
}
}
/**
* @dev Returns the downcasted int8 from int256, reverting on
* overflow (when the input is less than smallest int8 or
* greater than largest int8).
*
* Counterpart to Solidity's `int8` operator.
*
* Requirements:
*
* - input must fit into 8 bits
*/
function toInt8(int256 value) internal pure returns (int8 downcasted) {
downcasted = int8(value);
if (downcasted != value) {
revert SafeCastOverflowedIntDowncast(8, value);
}
}
/**
* @dev Converts an unsigned uint256 into a signed int256.
*
* Requirements:
*
* - input must be less than or equal to maxInt256.
*/
function toInt256(uint256 value) internal pure returns (int256) {
// Note: Unsafe cast below is okay because `type(int256).max` is guaranteed to be positive
if (value > uint256(type(int256).max)) {
revert SafeCastOverflowedUintToInt(value);
}
return int256(value);
}
/**
* @dev Cast a boolean (false or true) to a uint256 (0 or 1) with no jump.
*/
function toUint(bool b) internal pure returns (uint256 u) {
assembly ("memory-safe") {
u := iszero(iszero(b))
}
}
}
// lib/openzeppelin-contracts/contracts/utils/StorageSlot.sol
// OpenZeppelin Contracts (last updated v5.1.0) (utils/StorageSlot.sol)
// This file was procedurally generated from scripts/generate/templates/StorageSlot.js.
/**
* @dev Library for reading and writing primitive types to specific storage slots.
*
* Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.
* This library helps with reading and writing to such slots without the need for inline assembly.
*
* The functions in this library return Slot structs that contain a `value` member that can be used to read or write.
*
* Example usage to set ERC-1967 implementation slot:
* ```solidity
* contract ERC1967 {
* // Define the slot. Alternatively, use the SlotDerivation library to derive the slot.
* bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;
*
* function _getImplementation() internal view returns (address) {
* return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;
* }
*
* function _setImplementation(address newImplementation) internal {
* require(newImplementation.code.length > 0);
* StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;
* }
* }
* ```
*
* TIP: Consider using this library along with {SlotDerivation}.
*/
library StorageSlot {
struct AddressSlot {
address value;
}
struct BooleanSlot {
bool value;
}
struct Bytes32Slot {
bytes32 value;
}
struct Uint256Slot {
uint256 value;
}
struct Int256Slot {
int256 value;
}
struct StringSlot {
string value;
}
struct BytesSlot {
bytes value;
}
/**
* @dev Returns an `AddressSlot` with member `value` located at `slot`.
*/
function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {
assembly ("memory-safe") {
r.slot := slot
}
}
/**
* @dev Returns a `BooleanSlot` with member `value` located at `slot`.
*/
function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {
assembly ("memory-safe") {
r.slot := slot
}
}
/**
* @dev Returns a `Bytes32Slot` with member `value` located at `slot`.
*/
function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {
assembly ("memory-safe") {
r.slot := slot
}
}
/**
* @dev Returns a `Uint256Slot` with member `value` located at `slot`.
*/
function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {
assembly ("memory-safe") {
r.slot := slot
}
}
/**
* @dev Returns a `Int256Slot` with member `value` located at `slot`.
*/
function getInt256Slot(bytes32 slot) internal pure returns (Int256Slot storage r) {
assembly ("memory-safe") {
r.slot := slot
}
}
/**
* @dev Returns a `StringSlot` with member `value` located at `slot`.
*/
function getStringSlot(bytes32 slot) internal pure returns (StringSlot storage r) {
assembly ("memory-safe") {
r.slot := slot
}
}
/**
* @dev Returns an `StringSlot` representation of the string storage pointer `store`.
*/
function getStringSlot(string storage store) internal pure returns (StringSlot storage r) {
assembly ("memory-safe") {
r.slot := store.slot
}
}
/**
* @dev Returns a `BytesSlot` with member `value` located at `slot`.
*/
function getBytesSlot(bytes32 slot) internal pure returns (BytesSlot storage r) {
assembly ("memory-safe") {
r.slot := slot
}
}
/**
* @dev Returns an `BytesSlot` representation of the bytes storage pointer `store`.
*/
function getBytesSlot(bytes storage store) internal pure returns (BytesSlot storage r) {
assembly ("memory-safe") {
r.slot := store.slot
}
}
}
// lib/openzeppelin-contracts/contracts/interfaces/draft-IERC1822.sol
// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/draft-IERC1822.sol)
/**
* @dev ERC-1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified
* proxy whose upgrades are fully controlled by the current implementation.
*/
interface IERC1822Proxiable {
/**
* @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation
* address.
*
* IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks
* bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this
* function revert if invoked through a proxy.
*/
function proxiableUUID() external view returns (bytes32);
}
// lib/openzeppelin-contracts/contracts/interfaces/draft-IERC6093.sol
// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/draft-IERC6093.sol)
/**
* @dev Standard ERC-20 Errors
* Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC-20 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 ERC-721 Errors
* Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC-721 tokens.
*/
interface IERC721Errors {
/**
* @dev Indicates that an address can't be an owner. For example, `address(0)` is a forbidden owner in ERC-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 ERC-1155 Errors
* Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC-1155 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);
}
// lib/openzeppelin-contracts/contracts/utils/Address.sol
// OpenZeppelin Contracts (last updated v5.4.0) (utils/Address.sol)
/**
* @dev Collection of functions related to the address type
*/
library Address {
/**
* @dev There's no code at `target` (it is not a contract).
*/
error AddressEmptyCode(address target);
/**
* @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 Errors_0.InsufficientBalance(address(this).balance, amount);
}
(bool success, bytes memory returndata) = recipient.call{value: amount}("");
if (!success) {
_revert(returndata);
}
}
/**
* @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
* {Errors.FailedCall} 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 Errors_0.InsufficientBalance(address(this).balance, value);
}
(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 {Errors.FailedCall}) 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 {Errors.FailedCall} 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 {Errors.FailedCall}.
*/
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
assembly ("memory-safe") {
revert(add(returndata, 0x20), mload(returndata))
}
} else {
revert Errors_0.FailedCall();
}
}
}
// lib/openzeppelin-contracts-upgradeable/contracts/utils/ContextUpgradeable.sol
// OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol)
/**
* @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 ContextUpgradeable is Initializable {
function __Context_init() internal onlyInitializing {
}
function __Context_init_unchained() internal onlyInitializing {
}
function _msgSender() internal view virtual returns (address) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes calldata) {
return msg.data;
}
function _contextSuffixLength() internal view virtual returns (uint256) {
return 0;
}
}
// lib/openzeppelin-contracts/contracts/interfaces/IERC165.sol
// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC165.sol)
// lib/openzeppelin-contracts/contracts/interfaces/IERC20.sol
// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC20.sol)
// lib/openzeppelin-contracts/contracts/token/ERC20/extensions/IERC20Metadata.sol
// OpenZeppelin Contracts (last updated v5.4.0) (token/ERC20/extensions/IERC20Metadata.sol)
/**
* @dev Interface for the optional metadata functions from the ERC-20 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);
}
// lib/openzeppelin-contracts-upgradeable/contracts/utils/ReentrancyGuardUpgradeable.sol
// OpenZeppelin Contracts (last updated v5.1.0) (utils/ReentrancyGuard.sol)
/**
* @dev Contract module that helps prevent reentrant calls to a function.
*
* Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
* available, which can be applied to functions to make sure there are no nested
* (reentrant) calls to them.
*
* Note that because there is a single `nonReentrant` guard, functions marked as
* `nonReentrant` may not call one another. This can be worked around by making
* those functions `private`, and then adding `external` `nonReentrant` entry
* points to them.
*
* TIP: If EIP-1153 (transient storage) is available on the chain you're deploying at,
* consider using {ReentrancyGuardTransient} instead.
*
* TIP: If you would like to learn more about reentrancy and alternative ways
* to protect against it, check out our blog post
* https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
*/
abstract contract ReentrancyGuardUpgradeable is Initializable {
// Booleans are more expensive than uint256 or any type that takes up a full
// word because each write operation emits an extra SLOAD to first read the
// slot's contents, replace the bits taken up by the boolean, and then write
// back. This is the compiler's defense against contract upgrades and
// pointer aliasing, and it cannot be disabled.
// The values being non-zero value makes deployment a bit more expensive,
// but in exchange the refund on every call to nonReentrant will be lower in
// amount. Since refunds are capped to a percentage of the total
// transaction's gas, it is best to keep them low in cases like this one, to
// increase the likelihood of the full refund coming into effect.
uint256 private constant NOT_ENTERED = 1;
uint256 private constant ENTERED = 2;
/// @custom:storage-location erc7201:openzeppelin.storage.ReentrancyGuard
struct ReentrancyGuardStorage {
uint256 _status;
}
// keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.ReentrancyGuard")) - 1)) & ~bytes32(uint256(0xff))
bytes32 private constant ReentrancyGuardStorageLocation = 0x9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f00;
function _getReentrancyGuardStorage() private pure returns (ReentrancyGuardStorage storage $) {
assembly {
$.slot := ReentrancyGuardStorageLocation
}
}
/**
* @dev Unauthorized reentrant call.
*/
error ReentrancyGuardReentrantCall();
function __ReentrancyGuard_init() internal onlyInitializing {
__ReentrancyGuard_init_unchained();
}
function __ReentrancyGuard_init_unchained() internal onlyInitializing {
ReentrancyGuardStorage storage $ = _getReentrancyGuardStorage();
$._status = NOT_ENTERED;
}
/**
* @dev Prevents a contract from calling itself, directly or indirectly.
* Calling a `nonReentrant` function from another `nonReentrant`
* function is not supported. It is possible to prevent this from happening
* by making the `nonReentrant` function external, and making it call a
* `private` function that does the actual work.
*/
modifier nonReentrant() {
_nonReentrantBefore();
_;
_nonReentrantAfter();
}
function _nonReentrantBefore() private {
ReentrancyGuardStorage storage $ = _getReentrancyGuardStorage();
// On the first call to nonReentrant, _status will be NOT_ENTERED
if ($._status == ENTERED) {
revert ReentrancyGuardReentrantCall();
}
// Any calls to nonReentrant after this point will fail
$._status = ENTERED;
}
function _nonReentrantAfter() private {
ReentrancyGuardStorage storage $ = _getReentrancyGuardStorage();
// By storing the original value once again, a refund is triggered (see
// https://eips.ethereum.org/EIPS/eip-2200)
$._status = NOT_ENTERED;
}
/**
* @dev Returns true if the reentrancy guard is currently set to "entered", which indicates there is a
* `nonReentrant` function in the call stack.
*/
function _reentrancyGuardEntered() internal view returns (bool) {
ReentrancyGuardStorage storage $ = _getReentrancyGuardStorage();
return $._status == ENTERED;
}
}
// lib/openzeppelin-contracts-upgradeable/contracts/utils/introspection/ERC165Upgradeable.sol
// OpenZeppelin Contracts (last updated v5.1.0) (utils/introspection/ERC165.sol)
/**
* @dev Implementation of the {IERC165} interface.
*
* Contracts that want to implement ERC-165 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 ERC165Upgradeable is Initializable, IERC165 {
function __ERC165_init() internal onlyInitializing {
}
function __ERC165_init_unchained() internal onlyInitializing {
}
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 interfaceId) public view virtual returns (bool) {
return interfaceId == type(IERC165).interfaceId;
}
}
// lib/openzeppelin-contracts/contracts/interfaces/IERC4626.sol
// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC4626.sol)
/**
* @dev Interface of the ERC-4626 "Tokenized Vault Standard", as defined in
* https://eips.ethereum.org/EIPS/eip-4626[ERC-4626].
*/
interface IERC4626 is IERC20, IERC20Metadata {
event Deposit(address indexed sender, address indexed owner, uint256 assets, uint256 shares);
event Withdraw(
address indexed sender,
address indexed receiver,
address indexed owner,
uint256 assets,
uint256 shares
);
/**
* @dev Returns the address of the underlying token used for the Vault for accounting, depositing, and withdrawing.
*
* - MUST be an ERC-20 token contract.
* - MUST NOT revert.
*/
function asset() external view returns (address assetTokenAddress);
/**
* @dev Returns the total amount of the underlying asset that is “managed” by Vault.
*
* - SHOULD include any compounding that occurs from yield.
* - MUST be inclusive of any fees that are charged against assets in the Vault.
* - MUST NOT revert.
*/
function totalAssets() external view returns (uint256 totalManagedAssets);
/**
* @dev Returns the amount of shares that the Vault would exchange for the amount of assets provided, in an ideal
* scenario where all the conditions are met.
*
* - MUST NOT be inclusive of any fees that are charged against assets in the Vault.
* - MUST NOT show any variations depending on the caller.
* - MUST NOT reflect slippage or other on-chain conditions, when performing the actual exchange.
* - MUST NOT revert.
*
* NOTE: This calculation MAY NOT reflect the “per-user” price-per-share, and instead should reflect the
* “average-user’s” price-per-share, meaning what the average user should expect to see when exchanging to and
* from.
*/
function convertToShares(uint256 assets) external view returns (uint256 shares);
/**
* @dev Returns the amount of assets that the Vault would exchange for the amount of shares provided, in an ideal
* scenario where all the conditions are met.
*
* - MUST NOT be inclusive of any fees that are charged against assets in the Vault.
* - MUST NOT show any variations depending on the caller.
* - MUST NOT reflect slippage or other on-chain conditions, when performing the actual exchange.
* - MUST NOT revert.
*
* NOTE: This calculation MAY NOT reflect the “per-user” price-per-share, and instead should reflect the
* “average-user’s” price-per-share, meaning what the average user should expect to see when exchanging to and
* from.
*/
function convertToAssets(uint256 shares) external view returns (uint256 assets);
/**
* @dev Returns the maximum amount of the underlying asset that can be deposited into the Vault for the receiver,
* through a deposit call.
*
* - MUST return a limited value if receiver is subject to some deposit limit.
* - MUST return 2 ** 256 - 1 if there is no limit on the maximum amount of assets that may be deposited.
* - MUST NOT revert.
*/
function maxDeposit(address receiver) external view returns (uint256 maxAssets);
/**
* @dev Allows an on-chain or off-chain user to simulate the effects of their deposit at the current block, given
* current on-chain conditions.
*
* - MUST return as close to and no more than the exact amount of Vault shares that would be minted in a deposit
* call in the same transaction. I.e. deposit should return the same or more shares as previewDeposit if called
* in the same transaction.
* - MUST NOT account for deposit limits like those returned from maxDeposit and should always act as though the
* deposit would be accepted, regardless if the user has enough tokens approved, etc.
* - MUST be inclusive of deposit fees. Integrators should be aware of the existence of deposit fees.
* - MUST NOT revert.
*
* NOTE: any unfavorable discrepancy between convertToShares and previewDeposit SHOULD be considered slippage in
* share price or some other type of condition, meaning the depositor will lose assets by depositing.
*/
function previewDeposit(uint256 assets) external view returns (uint256 shares);
/**
* @dev Mints shares Vault shares to receiver by depositing exactly amount of underlying tokens.
*
* - MUST emit the Deposit event.
* - MAY support an additional flow in which the underlying tokens are owned by the Vault contract before the
* deposit execution, and are accounted for during deposit.
* - MUST revert if all of assets cannot be deposited (due to deposit limit being reached, slippage, the user not
* approving enough underlying tokens to the Vault contract, etc).
*
* NOTE: most implementations will require pre-approval of the Vault with the Vault’s underlying asset token.
*/
function deposit(uint256 assets, address receiver) external returns (uint256 shares);
/**
* @dev Returns the maximum amount of the Vault shares that can be minted for the receiver, through a mint call.
* - MUST return a limited value if receiver is subject to some mint limit.
* - MUST return 2 ** 256 - 1 if there is no limit on the maximum amount of shares that may be minted.
* - MUST NOT revert.
*/
function maxMint(address receiver) external view returns (uint256 maxShares);
/**
* @dev Allows an on-chain or off-chain user to simulate the effects of their mint at the current block, given
* current on-chain conditions.
*
* - MUST return as close to and no fewer than the exact amount of assets that would be deposited in a mint call
* in the same transaction. I.e. mint should return the same or fewer assets as previewMint if called in the
* same transaction.
* - MUST NOT account for mint limits like those returned from maxMint and should always act as though the mint
* would be accepted, regardless if the user has enough tokens approved, etc.
* - MUST be inclusive of deposit fees. Integrators should be aware of the existence of deposit fees.
* - MUST NOT revert.
*
* NOTE: any unfavorable discrepancy between convertToAssets and previewMint SHOULD be considered slippage in
* share price or some other type of condition, meaning the depositor will lose assets by minting.
*/
function previewMint(uint256 shares) external view returns (uint256 assets);
/**
* @dev Mints exactly shares Vault shares to receiver by depositing amount of underlying tokens.
*
* - MUST emit the Deposit event.
* - MAY support an additional flow in which the underlying tokens are owned by the Vault contract before the mint
* execution, and are accounted for during mint.
* - MUST revert if all of shares cannot be minted (due to deposit limit being reached, slippage, the user not
* approving enough underlying tokens to the Vault contract, etc).
*
* NOTE: most implementations will require pre-approval of the Vault with the Vault’s underlying asset token.
*/
function mint(uint256 shares, address receiver) external returns (uint256 assets);
/**
* @dev Returns the maximum amount of the underlying asset that can be withdrawn from the owner balance in the
* Vault, through a withdraw call.
*
* - MUST return a limited value if owner is subject to some withdrawal limit or timelock.
* - MUST NOT revert.
*/
function maxWithdraw(address owner) external view returns (uint256 maxAssets);
/**
* @dev Allows an on-chain or off-chain user to simulate the effects of their withdrawal at the current block,
* given current on-chain conditions.
*
* - MUST return as close to and no fewer than the exact amount of Vault shares that would be burned in a withdraw
* call in the same transaction. I.e. withdraw should return the same or fewer shares as previewWithdraw if
* called
* in the same transaction.
* - MUST NOT account for withdrawal limits like those returned from maxWithdraw and should always act as though
* the withdrawal would be accepted, regardless if the user has enough shares, etc.
* - MUST be inclusive of withdrawal fees. Integrators should be aware of the existence of withdrawal fees.
* - MUST NOT revert.
*
* NOTE: any unfavorable discrepancy between convertToShares and previewWithdraw SHOULD be considered slippage in
* share price or some other type of condition, meaning the depositor will lose assets by depositing.
*/
function previewWithdraw(uint256 assets) external view returns (uint256 shares);
/**
* @dev Burns shares from owner and sends exactly assets of underlying tokens to receiver.
*
* - MUST emit the Withdraw event.
* - MAY support an additional flow in which the underlying tokens are owned by the Vault contract before the
* withdraw execution, and are accounted for during withdraw.
* - MUST revert if all of assets cannot be withdrawn (due to withdrawal limit being reached, slippage, the owner
* not having enough shares, etc).
*
* Note that some implementations will require pre-requesting to the Vault before a withdrawal may be performed.
* Those methods should be performed separately.
*/
function withdraw(uint256 assets, address receiver, address owner) external returns (uint256 shares);
/**
* @dev Returns the maximum amount of Vault shares that can be redeemed from the owner balance in the Vault,
* through a redeem call.
*
* - MUST return a limited value if owner is subject to some withdrawal limit or timelock.
* - MUST return balanceOf(owner) if owner is not subject to any withdrawal limit or timelock.
* - MUST NOT revert.
*/
function maxRedeem(address owner) external view returns (uint256 maxShares);
/**
* @dev Allows an on-chain or off-chain user to simulate the effects of their redemption at the current block,
* given current on-chain conditions.
*
* - MUST return as close to and no more than the exact amount of assets that would be withdrawn in a redeem call
* in the same transaction. I.e. redeem should return the same or more assets as previewRedeem if called in the
* same transaction.
* - MUST NOT account for redemption limits like those returned from maxRedeem and should always act as though the
* redemption would be accepted, regardless if the user has enough shares, etc.
* - MUST be inclusive of withdrawal fees. Integrators should be aware of the existence of withdrawal fees.
* - MUST NOT revert.
*
* NOTE: any unfavorable discrepancy between convertToAssets and previewRedeem SHOULD be considered slippage in
* share price or some other type of condition, meaning the depositor will lose assets by redeeming.
*/
function previewRedeem(uint256 shares) external view returns (uint256 assets);
/**
* @dev Burns exactly shares from owner and sends assets of underlying tokens to receiver.
*
* - MUST emit the Withdraw event.
* - MAY support an additional flow in which the underlying tokens are owned by the Vault contract before the
* redeem execution, and are accounted for during redeem.
* - MUST revert if all of shares cannot be redeemed (due to withdrawal limit being reached, slippage, the owner
* not having enough shares, etc).
*
* NOTE: some implementations will require pre-requesting to the Vault before a withdrawal may be performed.
* Those methods should be performed separately.
*/
function redeem(uint256 shares, address receiver, address owner) external returns (uint256 assets);
}
// lib/openzeppelin-contracts/contracts/utils/math/Math.sol
// OpenZeppelin Contracts (last updated v5.3.0) (utils/math/Math.sol)
/**
* @dev Standard math utilities missing in the Solidity language.
*/
library Math {
enum Rounding {
Floor, // Toward negative infinity
Ceil, // Toward positive infinity
Trunc, // Toward zero
Expand // Away from zero
}
/**
* @dev Return the 512-bit addition of two uint256.
*
* The result is stored in two 256 variables such that sum = high * 2²⁵⁶ + low.
*/
function add512(uint256 a, uint256 b) internal pure returns (uint256 high, uint256 low) {
assembly ("memory-safe") {
low := add(a, b)
high := lt(low, a)
}
}
/**
* @dev Return the 512-bit multiplication of two uint256.
*
* The result is stored in two 256 variables such that product = high * 2²⁵⁶ + low.
*/
function mul512(uint256 a, uint256 b) internal pure returns (uint256 high, uint256 low) {
// 512-bit multiply [high low] = x * y. Compute the product mod 2²⁵⁶ and mod 2²⁵⁶ - 1, then use
// the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256
// variables such that product = high * 2²⁵⁶ + low.
assembly ("memory-safe") {
let mm := mulmod(a, b, not(0))
low := mul(a, b)
high := sub(sub(mm, low), lt(mm, low))
}
}
/**
* @dev Returns the addition of two unsigned integers, with a success flag (no overflow).
*/
function tryAdd(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {
unchecked {
uint256 c = a + b;
success = c >= a;
result = c * SafeCast.toUint(success);
}
}
/**
* @dev Returns the subtraction of two unsigned integers, with a success flag (no overflow).
*/
function trySub(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {
unchecked {
uint256 c = a - b;
success = c <= a;
result = c * SafeCast.toUint(success);
}
}
/**
* @dev Returns the multiplication of two unsigned integers, with a success flag (no overflow).
*/
function tryMul(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {
unchecked {
uint256 c = a * b;
assembly ("memory-safe") {
// Only true when the multiplication doesn't overflow
// (c / a == b) || (a == 0)
success := or(eq(div(c, a), b), iszero(a))
}
// equivalent to: success ? c : 0
result = c * SafeCast.toUint(success);
}
}
/**
* @dev Returns the division of two unsigned integers, with a success flag (no division by zero).
*/
function tryDiv(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {
unchecked {
success = b > 0;
assembly ("memory-safe") {
// The `DIV` opcode returns zero when the denominator is 0.
result := div(a, b)
}
}
}
/**
* @dev Returns the remainder of dividing two unsigned integers, with a success flag (no division by zero).
*/
function tryMod(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {
unchecked {
success = b > 0;
assembly ("memory-safe") {
// The `MOD` opcode returns zero when the denominator is 0.
result := mod(a, b)
}
}
}
/**
* @dev Unsigned saturating addition, bounds to `2²⁵⁶ - 1` instead of overflowing.
*/
function saturatingAdd(uint256 a, uint256 b) internal pure returns (uint256) {
(bool success, uint256 result) = tryAdd(a, b);
return ternary(success, result, type(uint256).max);
}
/**
* @dev Unsigned saturating subtraction, bounds to zero instead of overflowing.
*/
function saturatingSub(uint256 a, uint256 b) internal pure returns (uint256) {
(, uint256 result) = trySub(a, b);
return result;
}
/**
* @dev Unsigned saturating multiplication, bounds to `2²⁵⁶ - 1` instead of overflowing.
*/
function saturatingMul(uint256 a, uint256 b) internal pure returns (uint256) {
(bool success, uint256 result) = tryMul(a, b);
return ternary(success, result, type(uint256).max);
}
/**
* @dev Branchless ternary evaluation for `a ? b : c`. Gas costs are constant.
*
* IMPORTANT: This function may reduce bytecode size and consume less gas when used standalone.
* However, the compiler may optimize Solidity ternary operations (i.e. `a ? b : c`) to only compute
* one branch when needed, making this function more expensive.
*/
function ternary(bool condition, uint256 a, uint256 b) internal pure returns (uint256) {
unchecked {
// branchless ternary works because:
// b ^ (a ^ b) == a
// b ^ 0 == b
return b ^ ((a ^ b) * SafeCast.toUint(condition));
}
}
/**
* @dev Returns the largest of two numbers.
*/
function max(uint256 a, uint256 b) internal pure returns (uint256) {
return ternary(a > b, a, b);
}
/**
* @dev Returns the smallest of two numbers.
*/
function min(uint256 a, uint256 b) internal pure returns (uint256) {
return ternary(a < b, a, b);
}
/**
* @dev Returns the average of two numbers. The result is rounded towards
* zero.
*/
function average(uint256 a, uint256 b) internal pure returns (uint256) {
// (a + b) / 2 can overflow.
return (a & b) + (a ^ b) / 2;
}
/**
* @dev Returns the ceiling of the division of two numbers.
*
* This differs from standard division with `/` in that it rounds towards infinity instead
* of rounding towards zero.
*/
function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {
if (b == 0) {
// Guarantee the same behavior as in a regular Solidity division.
Panic.panic(Panic.DIVISION_BY_ZERO);
}
// The following calculation ensures accurate ceiling division without overflow.
// Since a is non-zero, (a - 1) / b will not overflow.
// The largest possible result occurs when (a - 1) / b is type(uint256).max,
// but the largest value we can obtain is type(uint256).max - 1, which happens
// when a = type(uint256).max and b = 1.
unchecked {
return SafeCast.toUint(a > 0) * ((a - 1) / b + 1);
}
}
/**
* @dev Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or
* denominator == 0.
*
* Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) with further edits by
* Uniswap Labs also under MIT license.
*/
function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) {
unchecked {
(uint256 high, uint256 low) = mul512(x, y);
// Handle non-overflow cases, 256 by 256 division.
if (high == 0) {
// Solidity will revert if denominator == 0, unlike the div opcode on its own.
// The surrounding unchecked block does not change this fact.
// See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic.
return low / denominator;
}
// Make sure the result is less than 2²⁵⁶. Also prevents denominator == 0.
if (denominator <= high) {
Panic.panic(ternary(denominator == 0, Panic.DIVISION_BY_ZERO, Panic.UNDER_OVERFLOW));
}
///////////////////////////////////////////////
// 512 by 256 division.
///////////////////////////////////////////////
// Make division exact by subtracting the remainder from [high low].
uint256 remainder;
assembly ("memory-safe") {
// Compute remainder using mulmod.
remainder := mulmod(x, y, denominator)
// Subtract 256 bit number from 512 bit number.
high := sub(high, gt(remainder, low))
low := sub(low, remainder)
}
// Factor powers of two out of denominator and compute largest power of two divisor of denominator.
// Always >= 1. See https://cs.stackexchange.com/q/138556/92363.
uint256 twos = denominator & (0 - denominator);
assembly ("memory-safe") {
// Divide denominator by twos.
denominator := div(denominator, twos)
// Divide [high low] by twos.
low := div(low, twos)
// Flip twos such that it is 2²⁵⁶ / twos. If twos is zero, then it becomes one.
twos := add(div(sub(0, twos), twos), 1)
}
// Shift in bits from high into low.
low |= high * twos;
// Invert denominator mod 2²⁵⁶. Now that denominator is an odd number, it has an inverse modulo 2²⁵⁶ such
// that denominator * inv ≡ 1 mod 2²⁵⁶. Compute the inverse by starting with a seed that is correct for
// four bits. That is, denominator * inv ≡ 1 mod 2⁴.
uint256 inverse = (3 * denominator) ^ 2;
// Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also
// works in modular arithmetic, doubling the correct bits in each step.
inverse *= 2 - denominator * inverse; // inverse mod 2⁸
inverse *= 2 - denominator * inverse; // inverse mod 2¹⁶
inverse *= 2 - denominator * inverse; // inverse mod 2³²
inverse *= 2 - denominator * inverse; // inverse mod 2⁶⁴
inverse *= 2 - denominator * inverse; // inverse mod 2¹²⁸
inverse *= 2 - denominator * inverse; // inverse mod 2²⁵⁶
// Because the division is now exact we can divide by multiplying with the modular inverse of denominator.
// This will give us the correct result modulo 2²⁵⁶. Since the preconditions guarantee that the outcome is
// less than 2²⁵⁶, this is the final result. We don't need to compute the high bits of the result and high
// is no longer required.
result = low * inverse;
return result;
}
}
/**
* @dev Calculates x * y / denominator with full precision, following the selected rounding direction.
*/
function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) {
return mulDiv(x, y, denominator) + SafeCast.toUint(unsignedRoundsUp(rounding) && mulmod(x, y, denominator) > 0);
}
/**
* @dev Calculates floor(x * y >> n) with full precision. Throws if result overflows a uint256.
*/
function mulShr(uint256 x, uint256 y, uint8 n) internal pure returns (uint256 result) {
unchecked {
(uint256 high, uint256 low) = mul512(x, y);
if (high >= 1 << n) {
Panic.panic(Panic.UNDER_OVERFLOW);
}
return (high << (256 - n)) | (low >> n);
}
}
/**
* @dev Calculates x * y >> n with full precision, following the selected rounding direction.
*/
function mulShr(uint256 x, uint256 y, uint8 n, Rounding rounding) internal pure returns (uint256) {
return mulShr(x, y, n) + SafeCast.toUint(unsignedRoundsUp(rounding) && mulmod(x, y, 1 << n) > 0);
}
/**
* @dev Calculate the modular multiplicative inverse of a number in Z/nZ.
*
* If n is a prime, then Z/nZ is a field. In that case all elements are inversible, except 0.
* If n is not a prime, then Z/nZ is not a field, and some elements might not be inversible.
*
* If the input value is not inversible, 0 is returned.
*
* NOTE: If you know for sure that n is (big) a prime, it may be cheaper to use Fermat's little theorem and get the
* inverse using `Math.modExp(a, n - 2, n)`. See {invModPrime}.
*/
function invMod(uint256 a, uint256 n) internal pure returns (uint256) {
unchecked {
if (n == 0) return 0;
// The inverse modulo is calculated using the Extended Euclidean Algorithm (iterative version)
// Used to compute integers x and y such that: ax + ny = gcd(a, n).
// When the gcd is 1, then the inverse of a modulo n exists and it's x.
// ax + ny = 1
// ax = 1 + (-y)n
// ax ≡ 1 (mod n) # x is the inverse of a modulo n
// If the remainder is 0 the gcd is n right away.
uint256 remainder = a % n;
uint256 gcd = n;
// Therefore the initial coefficients are:
// ax + ny = gcd(a, n) = n
// 0a + 1n = n
int256 x = 0;
int256 y = 1;
while (remainder != 0) {
uint256 quotient = gcd / remainder;
(gcd, remainder) = (
// The old remainder is the next gcd to try.
remainder,
// Compute the next remainder.
// Can't overflow given that (a % gcd) * (gcd // (a % gcd)) <= gcd
// where gcd is at most n (capped to type(uint256).max)
gcd - remainder * quotient
);
(x, y) = (
// Increment the coefficient of a.
y,
// Decrement the coefficient of n.
// Can overflow, but the result is casted to uint256 so that the
// next value of y is "wrapped around" to a value between 0 and n - 1.
x - y * int256(quotient)
);
}
if (gcd != 1) return 0; // No inverse exists.
return ternary(x < 0, n - uint256(-x), uint256(x)); // Wrap the result if it's negative.
}
}
/**
* @dev Variant of {invMod}. More efficient, but only works if `p` is known to be a prime greater than `2`.
*
* From https://en.wikipedia.org/wiki/Fermat%27s_little_theorem[Fermat's little theorem], we know that if p is
* prime, then `a**(p-1) ≡ 1 mod p`. As a consequence, we have `a * a**(p-2) ≡ 1 mod p`, which means that
* `a**(p-2)` is the modular multiplicative inverse of a in Fp.
*
* NOTE: this function does NOT check that `p` is a prime greater than `2`.
*/
function invModPrime(uint256 a, uint256 p) internal view returns (uint256) {
unchecked {
return Math.modExp(a, p - 2, p);
}
}
/**
* @dev Returns the modular exponentiation of the specified base, exponent and modulus (b ** e % m)
*
* Requirements:
* - modulus can't be zero
* - underlying staticcall to precompile must succeed
*
* IMPORTANT: The result is only valid if the underlying call succeeds. When using this function, make
* sure the chain you're using it on supports the precompiled contract for modular exponentiation
* at address 0x05 as specified in https://eips.ethereum.org/EIPS/eip-198[EIP-198]. Otherwise,
* the underlying function will succeed given the lack of a revert, but the result may be incorrectly
* interpreted as 0.
*/
function modExp(uint256 b, uint256 e, uint256 m) internal view returns (uint256) {
(bool success, uint256 result) = tryModExp(b, e, m);
if (!success) {
Panic.panic(Panic.DIVISION_BY_ZERO);
}
return result;
}
/**
* @dev Returns the modular exponentiation of the specified base, exponent and modulus (b ** e % m).
* It includes a success flag indicating if the operation succeeded. Operation will be marked as failed if trying
* to operate modulo 0 or if the underlying precompile reverted.
*
* IMPORTANT: The result is only valid if the success flag is true. When using this function, make sure the chain
* you're using it on supports the precompiled contract for modular exponentiation at address 0x05 as specified in
* https://eips.ethereum.org/EIPS/eip-198[EIP-198]. Otherwise, the underlying function will succeed given the lack
* of a revert, but the result may be incorrectly interpreted as 0.
*/
function tryModExp(uint256 b, uint256 e, uint256 m) internal view returns (bool success, uint256 result) {
if (m == 0) return (false, 0);
assembly ("memory-safe") {
let ptr := mload(0x40)
// | Offset | Content | Content (Hex) |
// |-----------|------------|--------------------------------------------------------------------|
// | 0x00:0x1f | size of b | 0x0000000000000000000000000000000000000000000000000000000000000020 |
// | 0x20:0x3f | size of e | 0x0000000000000000000000000000000000000000000000000000000000000020 |
// | 0x40:0x5f | size of m | 0x0000000000000000000000000000000000000000000000000000000000000020 |
// | 0x60:0x7f | value of b | 0x<.............................................................b> |
// | 0x80:0x9f | value of e | 0x<.............................................................e> |
// | 0xa0:0xbf | value of m | 0x<.............................................................m> |
mstore(ptr, 0x20)
mstore(add(ptr, 0x20), 0x20)
mstore(add(ptr, 0x40), 0x20)
mstore(add(ptr, 0x60), b)
mstore(add(ptr, 0x80), e)
mstore(add(ptr, 0xa0), m)
// Given the result < m, it's guaranteed to fit in 32 bytes,
// so we can use the memory scratch space located at offset 0.
success := staticcall(gas(), 0x05, ptr, 0xc0, 0x00, 0x20)
result := mload(0x00)
}
}
/**
* @dev Variant of {modExp} that supports inputs of arbitrary length.
*/
function modExp(bytes memory b, bytes memory e, bytes memory m) internal view returns (bytes memory) {
(bool success, bytes memory result) = tryModExp(b, e, m);
if (!success) {
Panic.panic(Panic.DIVISION_BY_ZERO);
}
return result;
}
/**
* @dev Variant of {tryModExp} that supports inputs of arbitrary length.
*/
function tryModExp(
bytes memory b,
bytes memory e,
bytes memory m
) internal view returns (bool success, bytes memory result) {
if (_zeroBytes(m)) return (false, new bytes(0));
uint256 mLen = m.length;
// Encode call args in result and move the free memory pointer
result = abi.encodePacked(b.length, e.length, mLen, b, e, m);
assembly ("memory-safe") {
let dataPtr := add(result, 0x20)
// Write result on top of args to avoid allocating extra memory.
success := staticcall(gas(), 0x05, dataPtr, mload(result), dataPtr, mLen)
// Overwrite the length.
// result.length > returndatasize() is guaranteed because returndatasize() == m.length
mstore(result, mLen)
// Set the memory pointer after the returned data.
mstore(0x40, add(dataPtr, mLen))
}
}
/**
* @dev Returns whether the provided byte array is zero.
*/
function _zeroBytes(bytes memory byteArray) private pure returns (bool) {
for (uint256 i = 0; i < byteArray.length; ++i) {
if (byteArray[i] != 0) {
return false;
}
}
return true;
}
/**
* @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded
* towards zero.
*
* This method is based on Newton's method for computing square roots; the algorithm is restricted to only
* using integer operations.
*/
function sqrt(uint256 a) internal pure returns (uint256) {
unchecked {
// Take care of easy edge cases when a == 0 or a == 1
if (a <= 1) {
return a;
}
// In this function, we use Newton's method to get a root of `f(x) := x² - a`. It involves building a
// sequence x_n that converges toward sqrt(a). For each iteration x_n, we also define the error between
// the current value as `ε_n = | x_n - sqrt(a) |`.
//
// For our first estimation, we consider `e` the smallest power of 2 which is bigger than the square root
// of the target. (i.e. `2**(e-1) ≤ sqrt(a) < 2**e`). We know that `e ≤ 128` because `(2¹²⁸)² = 2²⁵⁶` is
// bigger than any uint256.
//
// By noticing that
// `2**(e-1) ≤ sqrt(a) < 2**e → (2**(e-1))² ≤ a < (2**e)² → 2**(2*e-2) ≤ a < 2**(2*e)`
// we can deduce that `e - 1` is `log2(a) / 2`. We can thus compute `x_n = 2**(e-1)` using a method similar
// to the msb function.
uint256 aa = a;
uint256 xn = 1;
if (aa >= (1 << 128)) {
aa >>= 128;
xn <<= 64;
}
if (aa >= (1 << 64)) {
aa >>= 64;
xn <<= 32;
}
if (aa >= (1 << 32)) {
aa >>= 32;
xn <<= 16;
}
if (aa >= (1 << 16)) {
aa >>= 16;
xn <<= 8;
}
if (aa >= (1 << 8)) {
aa >>= 8;
xn <<= 4;
}
if (aa >= (1 << 4)) {
aa >>= 4;
xn <<= 2;
}
if (aa >= (1 << 2)) {
xn <<= 1;
}
// We now have x_n such that `x_n = 2**(e-1) ≤ sqrt(a) < 2**e = 2 * x_n`. This implies ε_n ≤ 2**(e-1).
//
// We can refine our estimation by noticing that the middle of that interval minimizes the error.
// If we move x_n to equal 2**(e-1) + 2**(e-2), then we reduce the error to ε_n ≤ 2**(e-2).
// This is going to be our x_0 (and ε_0)
xn = (3 * xn) >> 1; // ε_0 := | x_0 - sqrt(a) | ≤ 2**(e-2)
// From here, Newton's method give us:
// x_{n+1} = (x_n + a / x_n) / 2
//
// One should note that:
// x_{n+1}² - a = ((x_n + a / x_n) / 2)² - a
// = ((x_n² + a) / (2 * x_n))² - a
// = (x_n⁴ + 2 * a * x_n² + a²) / (4 * x_n²) - a
// = (x_n⁴ + 2 * a * x_n² + a² - 4 * a * x_n²) / (4 * x_n²)
// = (x_n⁴ - 2 * a * x_n² + a²) / (4 * x_n²)
// = (x_n² - a)² / (2 * x_n)²
// = ((x_n² - a) / (2 * x_n))²
// ≥ 0
// Which proves that for all n ≥ 1, sqrt(a) ≤ x_n
//
// This gives us the proof of quadratic convergence of the sequence:
// ε_{n+1} = | x_{n+1} - sqrt(a) |
// = | (x_n + a / x_n) / 2 - sqrt(a) |
// = | (x_n² + a - 2*x_n*sqrt(a)) / (2 * x_n) |
// = | (x_n - sqrt(a))² / (2 * x_n) |
// = | ε_n² / (2 * x_n) |
// = ε_n² / | (2 * x_n) |
//
// For the first iteration, we have a special case where x_0 is known:
// ε_1 = ε_0² / | (2 * x_0) |
// ≤ (2**(e-2))² / (2 * (2**(e-1) + 2**(e-2)))
// ≤ 2**(2*e-4) / (3 * 2**(e-1))
// ≤ 2**(e-3) / 3
// ≤ 2**(e-3-log2(3))
// ≤ 2**(e-4.5)
//
// For the following iterations, we use the fact that, 2**(e-1) ≤ sqrt(a) ≤ x_n:
// ε_{n+1} = ε_n² / | (2 * x_n) |
// ≤ (2**(e-k))² / (2 * 2**(e-1))
// ≤ 2**(2*e-2*k) / 2**e
// ≤ 2**(e-2*k)
xn = (xn + a / xn) >> 1; // ε_1 := | x_1 - sqrt(a) | ≤ 2**(e-4.5) -- special case, see above
xn = (xn + a / xn) >> 1; // ε_2 := | x_2 - sqrt(a) | ≤ 2**(e-9) -- general case with k = 4.5
xn = (xn + a / xn) >> 1; // ε_3 := | x_3 - sqrt(a) | ≤ 2**(e-18) -- general case with k = 9
xn = (xn + a / xn) >> 1; // ε_4 := | x_4 - sqrt(a) | ≤ 2**(e-36) -- general case with k = 18
xn = (xn + a / xn) >> 1; // ε_5 := | x_5 - sqrt(a) | ≤ 2**(e-72) -- general case with k = 36
xn = (xn + a / xn) >> 1; // ε_6 := | x_6 - sqrt(a) | ≤ 2**(e-144) -- general case with k = 72
// Because e ≤ 128 (as discussed during the first estimation phase), we know have reached a precision
// ε_6 ≤ 2**(e-144) < 1. Given we're operating on integers, then we can ensure that xn is now either
// sqrt(a) or sqrt(a) + 1.
return xn - SafeCast.toUint(xn > a / xn);
}
}
/**
* @dev Calculates sqrt(a), following the selected rounding direction.
*/
function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {
unchecked {
uint256 result = sqrt(a);
return result + SafeCast.toUint(unsignedRoundsUp(rounding) && result * result < a);
}
}
/**
* @dev Return the log in base 2 of a positive value rounded towards zero.
* Returns 0 if given 0.
*/
function log2(uint256 x) internal pure returns (uint256 r) {
// If value has upper 128 bits set, log2 result is at least 128
r = SafeCast.toUint(x > 0xffffffffffffffffffffffffffffffff) << 7;
// If upper 64 bits of 128-bit half set, add 64 to result
r |= SafeCast.toUint((x >> r) > 0xffffffffffffffff) << 6;
// If upper 32 bits of 64-bit half set, add 32 to result
r |= SafeCast.toUint((x >> r) > 0xffffffff) << 5;
// If upper 16 bits of 32-bit half set, add 16 to result
r |= SafeCast.toUint((x >> r) > 0xffff) << 4;
// If upper 8 bits of 16-bit half set, add 8 to result
r |= SafeCast.toUint((x >> r) > 0xff) << 3;
// If upper 4 bits of 8-bit half set, add 4 to result
r |= SafeCast.toUint((x >> r) > 0xf) << 2;
// Shifts value right by the current result and use it as an index into this lookup table:
//
// | x (4 bits) | index | table[index] = MSB position |
// |------------|---------|-----------------------------|
// | 0000 | 0 | table[0] = 0 |
// | 0001 | 1 | table[1] = 0 |
// | 0010 | 2 | table[2] = 1 |
// | 0011 | 3 | table[3] = 1 |
// | 0100 | 4 | table[4] = 2 |
// | 0101 | 5 | table[5] = 2 |
// | 0110 | 6 | table[6] = 2 |
// | 0111 | 7 | table[7] = 2 |
// | 1000 | 8 | table[8] = 3 |
// | 1001 | 9 | table[9] = 3 |
// | 1010 | 10 | table[10] = 3 |
// | 1011 | 11 | table[11] = 3 |
// | 1100 | 12 | table[12] = 3 |
// | 1101 | 13 | table[13] = 3 |
// | 1110 | 14 | table[14] = 3 |
// | 1111 | 15 | table[15] = 3 |
//
// The lookup table is represented as a 32-byte value with the MSB positions for 0-15 in the last 16 bytes.
assembly ("memory-safe") {
r := or(r, byte(shr(r, x), 0x0000010102020202030303030303030300000000000000000000000000000000))
}
}
/**
* @dev Return the log in base 2, following the selected rounding direction, of a positive value.
* Returns 0 if given 0.
*/
function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {
unchecked {
uint256 result = log2(value);
return result + SafeCast.toUint(unsignedRoundsUp(rounding) && 1 << result < value);
}
}
/**
* @dev Return the log in base 10 of a positive value rounded towards zero.
* Returns 0 if given 0.
*/
function log10(uint256 value) internal pure returns (uint256) {
uint256 result = 0;
unchecked {
if (value >= 10 ** 64) {
value /= 10 ** 64;
result += 64;
}
if (value >= 10 ** 32) {
value /= 10 ** 32;
result += 32;
}
if (value >= 10 ** 16) {
value /= 10 ** 16;
result += 16;
}
if (value >= 10 ** 8) {
value /= 10 ** 8;
result += 8;
}
if (value >= 10 ** 4) {
value /= 10 ** 4;
result += 4;
}
if (value >= 10 ** 2) {
value /= 10 ** 2;
result += 2;
}
if (value >= 10 ** 1) {
result += 1;
}
}
return result;
}
/**
* @dev Return the log in base 10, following the selected rounding direction, of a positive value.
* Returns 0 if given 0.
*/
function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {
unchecked {
uint256 result = log10(value);
return result + SafeCast.toUint(unsignedRoundsUp(rounding) && 10 ** result < value);
}
}
/**
* @dev Return the log in base 256 of a positive value rounded towards zero.
* Returns 0 if given 0.
*
* Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.
*/
function log256(uint256 x) internal pure returns (uint256 r) {
// If value has upper 128 bits set, log2 result is at least 128
r = SafeCast.toUint(x > 0xffffffffffffffffffffffffffffffff) << 7;
// If upper 64 bits of 128-bit half set, add 64 to result
r |= SafeCast.toUint((x >> r) > 0xffffffffffffffff) << 6;
// If upper 32 bits of 64-bit half set, add 32 to result
r |= SafeCast.toUint((x >> r) > 0xffffffff) << 5;
// If upper 16 bits of 32-bit half set, add 16 to result
r |= SafeCast.toUint((x >> r) > 0xffff) << 4;
// Add 1 if upper 8 bits of 16-bit half set, and divide accumulated result by 8
return (r >> 3) | SafeCast.toUint((x >> r) > 0xff);
}
/**
* @dev Return the log in base 256, following the selected rounding direction, of a positive value.
* Returns 0 if given 0.
*/
function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {
unchecked {
uint256 result = log256(value);
return result + SafeCast.toUint(unsignedRoundsUp(rounding) && 1 << (result << 3) < value);
}
}
/**
* @dev Returns whether a provided rounding mode is considered rounding up for unsigned integers.
*/
function unsignedRoundsUp(Rounding rounding) internal pure returns (bool) {
return uint8(rounding) % 2 == 1;
}
}
// lib/openzeppelin-contracts-upgradeable/contracts/utils/PausableUpgradeable.sol
// OpenZeppelin Contracts (last updated v5.0.0) (utils/Pausable.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 PausableUpgradeable is Initializable, ContextUpgradeable {
/// @custom:storage-location erc7201:openzeppelin.storage.Pausable
struct PausableStorage {
bool _paused;
}
// keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.Pausable")) - 1)) & ~bytes32(uint256(0xff))
bytes32 private constant PausableStorageLocation = 0xcd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f03300;
function _getPausableStorage() private pure returns (PausableStorage storage $) {
assembly {
$.slot := PausableStorageLocation
}
}
/**
* @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.
*/
function __Pausable_init() internal onlyInitializing {
__Pausable_init_unchained();
}
function __Pausable_init_unchained() internal onlyInitializing {
PausableStorage storage $ = _getPausableStorage();
$._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) {
PausableStorage storage $ = _getPausableStorage();
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 {
PausableStorage storage $ = _getPausableStorage();
$._paused = true;
emit Paused(_msgSender());
}
/**
* @dev Returns to normal state.
*
* Requirements:
*
* - The contract must be paused.
*/
function _unpause() internal virtual whenPaused {
PausableStorage storage $ = _getPausableStorage();
$._paused = false;
emit Unpaused(_msgSender());
}
}
// lib/openzeppelin-contracts/contracts/interfaces/IERC1363.sol
// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC1363.sol)
/**
* @title IERC1363
* @dev Interface of the ERC-1363 standard as defined in the https://eips.ethereum.org/EIPS/eip-1363[ERC-1363].
*
* Defines an extension interface for ERC-20 tokens that supports executing code on a recipient contract
* after `transfer` or `transferFrom`, or code on a spender contract after `approve`, in a single transaction.
*/
interface IERC1363 is IERC20, IERC165 {
/*
* Note: the ERC-165 identifier for this interface is 0xb0202a11.
* 0xb0202a11 ===
* bytes4(keccak256('transferAndCall(address,uint256)')) ^
* bytes4(keccak256('transferAndCall(address,uint256,bytes)')) ^
* bytes4(keccak256('transferFromAndCall(address,address,uint256)')) ^
* bytes4(keccak256('transferFromAndCall(address,address,uint256,bytes)')) ^
* bytes4(keccak256('approveAndCall(address,uint256)')) ^
* bytes4(keccak256('approveAndCall(address,uint256,bytes)'))
*/
/**
* @dev Moves a `value` amount of tokens from the caller's account to `to`
* and then calls {IERC1363Receiver-onTransferReceived} on `to`.
* @param to The address which you want to transfer to.
* @param value The amount of tokens to be transferred.
* @return A boolean value indicating whether the operation succeeded unless throwing.
*/
function transferAndCall(address to, uint256 value) external returns (bool);
/**
* @dev Moves a `value` amount of tokens from the caller's account to `to`
* and then calls {IERC1363Receiver-onTransferReceived} on `to`.
* @param to The address which you want to transfer to.
* @param value The amount of tokens to be transferred.
* @param data Additional data with no specified format, sent in call to `to`.
* @return A boolean value indicating whether the operation succeeded unless throwing.
*/
function transferAndCall(address to, uint256 value, bytes calldata data) external returns (bool);
/**
* @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism
* and then calls {IERC1363Receiver-onTransferReceived} on `to`.
* @param from The address which you want to send tokens from.
* @param to The address which you want to transfer to.
* @param value The amount of tokens to be transferred.
* @return A boolean value indicating whether the operation succeeded unless throwing.
*/
function transferFromAndCall(address from, address to, uint256 value) external returns (bool);
/**
* @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism
* and then calls {IERC1363Receiver-onTransferReceived} on `to`.
* @param from The address which you want to send tokens from.
* @param to The address which you want to transfer to.
* @param value The amount of tokens to be transferred.
* @param data Additional data with no specified format, sent in call to `to`.
* @return A boolean value indicating whether the operation succeeded unless throwing.
*/
function transferFromAndCall(address from, address to, uint256 value, bytes calldata data) external returns (bool);
/**
* @dev Sets a `value` amount of tokens as the allowance of `spender` over the
* caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.
* @param spender The address which will spend the funds.
* @param value The amount of tokens to be spent.
* @return A boolean value indicating whether the operation succeeded unless throwing.
*/
function approveAndCall(address spender, uint256 value) external returns (bool);
/**
* @dev Sets a `value` amount of tokens as the allowance of `spender` over the
* caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.
* @param spender The address which will spend the funds.
* @param value The amount of tokens to be spent.
* @param data Additional data with no specified format, sent in call to `spender`.
* @return A boolean value indicating whether the operation succeeded unless throwing.
*/
function approveAndCall(address spender, uint256 value, bytes calldata data) external returns (bool);
}
// src/strategies/Hyperliquid/libraries/SwapLib.sol
/**
* @title SwapLib
* @notice Library for handling swaps on Hyperliquid's HyperSwap V3
* @dev Provides utility functions for token swaps, particularly stHYPE to HYPE conversions
*/
library SwapLib {
/**
* @notice Generic swap function for any token pair
* @param tokenIn Input token address
* @param tokenOut Output token address
* @param amountIn Amount to swap
* @param minOut Minimum output amount
* @param fee Pool fee tier
* @return amountOut Amount received
*/
function swapExactInput(
address tokenIn,
address tokenOut,
uint256 amountIn,
uint256 minOut,
uint24 fee
)
internal
returns (uint256 amountOut)
{
if (amountIn == 0) revert Errors_1.ZeroAmount();
if (tokenIn == address(0) || tokenOut == address(0)) revert Errors_1.InvalidAddress();
IHyperSwapRouter.ExactInputSingleParams memory params = IHyperSwapRouter.ExactInputSingleParams({
tokenIn: tokenIn,
tokenOut: tokenOut,
fee: fee,
recipient: address(this),
amountIn: amountIn,
amountOutMinimum: minOut,
sqrtPriceLimitX96: 0
});
amountOut = IHyperSwapRouter(Constants.HYPERSWAP_ROUTER).exactInputSingle(params);
}
function swapExactOutput(
address tokenIn,
address tokenOut,
uint256 amountOut,
uint256 maxIn,
uint24 fee
)
internal
returns (uint256 amountIn)
{
if (amountOut == 0) revert Errors_1.ZeroAmount();
if (tokenIn == address(0) || tokenOut == address(0)) revert Errors_1.InvalidAddress();
IHyperSwapRouter.ExactOutputSingleParams memory params = IHyperSwapRouter.ExactOutputSingleParams({
tokenIn: tokenIn,
tokenOut: tokenOut,
fee: fee,
recipient: address(this),
amountOut: amountOut,
amountInMaximum: maxIn,
sqrtPriceLimitX96: 0
});
amountIn = IHyperSwapRouter(Constants.HYPERSWAP_ROUTER).exactOutputSingle(params);
}
}
// lib/openzeppelin-contracts-upgradeable/contracts/access/AccessControlUpgradeable.sol
// OpenZeppelin Contracts (last updated v5.0.0) (access/AccessControl.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 AccessControlUpgradeable is Initializable, ContextUpgradeable, IAccessControl, ERC165Upgradeable {
struct RoleData {
mapping(address account => bool) hasRole;
bytes32 adminRole;
}
bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;
/// @custom:storage-location erc7201:openzeppelin.storage.AccessControl
struct AccessControlStorage {
mapping(bytes32 role => RoleData) _roles;
}
// keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.AccessControl")) - 1)) & ~bytes32(uint256(0xff))
bytes32 private constant AccessControlStorageLocation = 0x02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b626800;
function _getAccessControlStorage() private pure returns (AccessControlStorage storage $) {
assembly {
$.slot := AccessControlStorageLocation
}
}
/**
* @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);
_;
}
function __AccessControl_init() internal onlyInitializing {
}
function __AccessControl_init_unchained() internal onlyInitializing {
}
/**
* @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) {
AccessControlStorage storage $ = _getAccessControlStorage();
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) {
AccessControlStorage storage $ = _getAccessControlStorage();
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 {
AccessControlStorage storage $ = _getAccessControlStorage();
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) {
AccessControlStorage storage $ = _getAccessControlStorage();
if (!hasRole(role, account)) {
$._roles[role].hasRole[account] = true;
emit RoleGranted(role, account, _msgSender());
return true;
} else {
return false;
}
}
/**
* @dev Attempts to revoke `role` from `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) {
AccessControlStorage storage $ = _getAccessControlStorage();
if (hasRole(role, account)) {
$._roles[role].hasRole[account] = false;
emit RoleRevoked(role, account, _msgSender());
return true;
} else {
return false;
}
}
}
// lib/openzeppelin-contracts/contracts/proxy/ERC1967/ERC1967Utils.sol
// OpenZeppelin Contracts (last updated v5.4.0) (proxy/ERC1967/ERC1967Utils.sol)
/**
* @dev This library provides getters and event emitting update functions for
* https://eips.ethereum.org/EIPS/eip-1967[ERC-1967] slots.
*/
library ERC1967Utils {
/**
* @dev Storage slot with the address of the current implementation.
* This is the keccak-256 hash of "eip1967.proxy.implementation" subtracted by 1.
*/
// solhint-disable-next-line private-vars-leading-underscore
bytes32 internal constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;
/**
* @dev The `implementation` of the proxy is invalid.
*/
error ERC1967InvalidImplementation(address implementation);
/**
* @dev The `admin` of the proxy is invalid.
*/
error ERC1967InvalidAdmin(address admin);
/**
* @dev The `beacon` of the proxy is invalid.
*/
error ERC1967InvalidBeacon(address beacon);
/**
* @dev An upgrade function sees `msg.value > 0` that may be lost.
*/
error ERC1967NonPayable();
/**
* @dev Returns the current implementation address.
*/
function getImplementation() internal view returns (address) {
return StorageSlot.getAddressSlot(IMPLEMENTATION_SLOT).value;
}
/**
* @dev Stores a new address in the ERC-1967 implementation slot.
*/
function _setImplementation(address newImplementation) private {
if (newImplementation.code.length == 0) {
revert ERC1967InvalidImplementation(newImplementation);
}
StorageSlot.getAddressSlot(IMPLEMENTATION_SLOT).value = newImplementation;
}
/**
* @dev Performs implementation upgrade with additional setup call if data is nonempty.
* This function is payable only if the setup call is performed, otherwise `msg.value` is rejected
* to avoid stuck value in the contract.
*
* Emits an {IERC1967-Upgraded} event.
*/
function upgradeToAndCall(address newImplementation, bytes memory data) internal {
_setImplementation(newImplementation);
emit IERC1967.Upgraded(newImplementation);
if (data.length > 0) {
Address.functionDelegateCall(newImplementation, data);
} else {
_checkNonPayable();
}
}
/**
* @dev Storage slot with the admin of the contract.
* This is the keccak-256 hash of "eip1967.proxy.admin" subtracted by 1.
*/
// solhint-disable-next-line private-vars-leading-underscore
bytes32 internal constant ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;
/**
* @dev Returns the current admin.
*
* TIP: To get this value clients can read directly from the storage slot shown below (specified by ERC-1967) using
* the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.
* `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`
*/
function getAdmin() internal view returns (address) {
return StorageSlot.getAddressSlot(ADMIN_SLOT).value;
}
/**
* @dev Stores a new address in the ERC-1967 admin slot.
*/
function _setAdmin(address newAdmin) private {
if (newAdmin == address(0)) {
revert ERC1967InvalidAdmin(address(0));
}
StorageSlot.getAddressSlot(ADMIN_SLOT).value = newAdmin;
}
/**
* @dev Changes the admin of the proxy.
*
* Emits an {IERC1967-AdminChanged} event.
*/
function changeAdmin(address newAdmin) internal {
emit IERC1967.AdminChanged(getAdmin(), newAdmin);
_setAdmin(newAdmin);
}
/**
* @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.
* This is the keccak-256 hash of "eip1967.proxy.beacon" subtracted by 1.
*/
// solhint-disable-next-line private-vars-leading-underscore
bytes32 internal constant BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;
/**
* @dev Returns the current beacon.
*/
function getBeacon() internal view returns (address) {
return StorageSlot.getAddressSlot(BEACON_SLOT).value;
}
/**
* @dev Stores a new beacon in the ERC-1967 beacon slot.
*/
function _setBeacon(address newBeacon) private {
if (newBeacon.code.length == 0) {
revert ERC1967InvalidBeacon(newBeacon);
}
StorageSlot.getAddressSlot(BEACON_SLOT).value = newBeacon;
address beaconImplementation = IBeacon(newBeacon).implementation();
if (beaconImplementation.code.length == 0) {
revert ERC1967InvalidImplementation(beaconImplementation);
}
}
/**
* @dev Change the beacon and trigger a setup call if data is nonempty.
* This function is payable only if the setup call is performed, otherwise `msg.value` is rejected
* to avoid stuck value in the contract.
*
* Emits an {IERC1967-BeaconUpgraded} event.
*
* CAUTION: Invoking this function has no effect on an instance of {BeaconProxy} since v5, since
* it uses an immutable beacon without looking at the value of the ERC-1967 beacon slot for
* efficiency.
*/
function upgradeBeaconToAndCall(address newBeacon, bytes memory data) internal {
_setBeacon(newBeacon);
emit IERC1967.BeaconUpgraded(newBeacon);
if (data.length > 0) {
Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);
} else {
_checkNonPayable();
}
}
/**
* @dev Reverts if `msg.value` is not zero. It can be used to avoid `msg.value` stuck in the contract
* if an upgrade doesn't perform an initialization call.
*/
function _checkNonPayable() private {
if (msg.value > 0) {
revert ERC1967NonPayable();
}
}
}
// lib/openzeppelin-contracts-upgradeable/contracts/token/ERC20/ERC20Upgradeable.sol
// OpenZeppelin Contracts (last updated v5.2.0) (token/ERC20/ERC20.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 ERC-20
* applications.
*/
abstract contract ERC20Upgradeable is Initializable, ContextUpgradeable, IERC20, IERC20Metadata, IERC20Errors {
/// @custom:storage-location erc7201:openzeppelin.storage.ERC20
struct ERC20Storage {
mapping(address account => uint256) _balances;
mapping(address account => mapping(address spender => uint256)) _allowances;
uint256 _totalSupply;
string _name;
string _symbol;
}
// keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.ERC20")) - 1)) & ~bytes32(uint256(0xff))
bytes32 private constant ERC20StorageLocation = 0x52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace00;
function _getERC20Storage() private pure returns (ERC20Storage storage $) {
assembly {
$.slot := ERC20StorageLocation
}
}
/**
* @dev Sets the values for {name} and {symbol}.
*
* All two of these values are immutable: they can only be set once during
* construction.
*/
function __ERC20_init(string memory name_, string memory symbol_) internal onlyInitializing {
__ERC20_init_unchained(name_, symbol_);
}
function __ERC20_init_unchained(string memory name_, string memory symbol_) internal onlyInitializing {
ERC20Storage storage $ = _getERC20Storage();
$._name = name_;
$._symbol = symbol_;
}
/**
* @dev Returns the name of the token.
*/
function name() public view virtual returns (string memory) {
ERC20Storage storage $ = _getERC20Storage();
return $._name;
}
/**
* @dev Returns the symbol of the token, usually a shorter version of the
* name.
*/
function symbol() public view virtual returns (string memory) {
ERC20Storage storage $ = _getERC20Storage();
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) {
ERC20Storage storage $ = _getERC20Storage();
return $._totalSupply;
}
/**
* @dev See {IERC20-balanceOf}.
*/
function balanceOf(address account) public view virtual returns (uint256) {
ERC20Storage storage $ = _getERC20Storage();
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) {
ERC20Storage storage $ = _getERC20Storage();
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}.
*
* Skips emitting an {Approval} event indicating an allowance update. This is not
* required by the ERC. See {xref-ERC20-_approve-address-address-uint256-bool-}[_approve].
*
* 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 {
ERC20Storage storage $ = _getERC20Storage();
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:
*
* ```solidity
* 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 {
ERC20Storage storage $ = _getERC20Storage();
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);
}
}
}
}
// lib/openzeppelin-contracts/contracts/token/ERC20/utils/SafeERC20.sol
// OpenZeppelin Contracts (last updated v5.3.0) (token/ERC20/utils/SafeERC20.sol)
/**
* @title SafeERC20
* @dev Wrappers around ERC-20 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 {
/**
* @dev An operation with an ERC-20 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 Variant of {safeTransfer} that returns a bool instead of reverting if the operation is not successful.
*/
function trySafeTransfer(IERC20 token, address to, uint256 value) internal returns (bool) {
return _callOptionalReturnBool(token, abi.encodeCall(token.transfer, (to, value)));
}
/**
* @dev Variant of {safeTransferFrom} that returns a bool instead of reverting if the operation is not successful.
*/
function trySafeTransferFrom(IERC20 token, address from, address to, uint256 value) internal returns (bool) {
return _callOptionalReturnBool(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.
*
* IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the "client"
* smart contract uses ERC-7674 to set temporary allowances, then the "client" smart contract should avoid using
* this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract
* that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior.
*/
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.
*
* IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the "client"
* smart contract uses ERC-7674 to set temporary allowances, then the "client" smart contract should avoid using
* this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract
* that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior.
*/
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.
*
* NOTE: If the token implements ERC-7674, this function will not modify any temporary allowance. This function
* only sets the "standard" allowance. Any temporary allowance will remain active, in addition to the value being
* set here.
*/
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 Performs an {ERC1363} transferAndCall, with a fallback to the simple {ERC20} transfer if the target has no
* code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when
* targeting contracts.
*
* Reverts if the returned value is other than `true`.
*/
function transferAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal {
if (to.code.length == 0) {
safeTransfer(token, to, value);
} else if (!token.transferAndCall(to, value, data)) {
revert SafeERC20FailedOperation(address(token));
}
}
/**
* @dev Performs an {ERC1363} transferFromAndCall, with a fallback to the simple {ERC20} transferFrom if the target
* has no code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when
* targeting contracts.
*
* Reverts if the returned value is other than `true`.
*/
function transferFromAndCallRelaxed(
IERC1363 token,
address from,
address to,
uint256 value,
bytes memory data
) internal {
if (to.code.length == 0) {
safeTransferFrom(token, from, to, value);
} else if (!token.transferFromAndCall(from, to, value, data)) {
revert SafeERC20FailedOperation(address(token));
}
}
/**
* @dev Performs an {ERC1363} approveAndCall, with a fallback to the simple {ERC20} approve if the target has no
* code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when
* targeting contracts.
*
* NOTE: When the recipient address (`to`) has no code (i.e. is an EOA), this function behaves as {forceApprove}.
* Opposedly, when the recipient address (`to`) has code, this function only attempts to call {ERC1363-approveAndCall}
* once without retrying, and relies on the returned value to be true.
*
* Reverts if the returned value is other than `true`.
*/
function approveAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal {
if (to.code.length == 0) {
forceApprove(token, to, value);
} else if (!token.approveAndCall(to, value, data)) {
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 {_callOptionalReturnBool} that reverts if call fails to meet the requirements.
*/
function _callOptionalReturn(IERC20 token, bytes memory data) private {
uint256 returnSize;
uint256 returnValue;
assembly ("memory-safe") {
let success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20)
// bubble errors
if iszero(success) {
let ptr := mload(0x40)
returndatacopy(ptr, 0, returndatasize())
revert(ptr, returndatasize())
}
returnSize := returndatasize()
returnValue := mload(0)
}
if (returnSize == 0 ? address(token).code.length == 0 : returnValue != 1) {
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 silently catches all reverts and returns a bool instead.
*/
function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {
bool success;
uint256 returnSize;
uint256 returnValue;
assembly ("memory-safe") {
success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20)
returnSize := returndatasize()
returnValue := mload(0)
}
return success && (returnSize == 0 ? address(token).code.length > 0 : returnValue == 1);
}
}
// lib/openzeppelin-contracts-upgradeable/contracts/proxy/utils/UUPSUpgradeable.sol
// OpenZeppelin Contracts (last updated v5.2.0) (proxy/utils/UUPSUpgradeable.sol)
/**
* @dev An upgradeability mechanism designed for UUPS proxies. The functions included here can perform an upgrade of an
* {ERC1967Proxy}, when this contract is set as the implementation behind such a proxy.
*
* A security mechanism ensures that an upgrade does not turn off upgradeability accidentally, although this risk is
* reinstated if the upgrade retains upgradeability but removes the security mechanism, e.g. by replacing
* `UUPSUpgradeable` with a custom implementation of upgrades.
*
* The {_authorizeUpgrade} function must be overridden to include access restriction to the upgrade mechanism.
*/
abstract contract UUPSUpgradeable is Initializable, IERC1822Proxiable {
/// @custom:oz-upgrades-unsafe-allow state-variable-immutable
address private immutable __self = address(this);
/**
* @dev The version of the upgrade interface of the contract. If this getter is missing, both `upgradeTo(address)`
* and `upgradeToAndCall(address,bytes)` are present, and `upgradeTo` must be used if no function should be called,
* while `upgradeToAndCall` will invoke the `receive` function if the second argument is the empty byte string.
* If the getter returns `"5.0.0"`, only `upgradeToAndCall(address,bytes)` is present, and the second argument must
* be the empty byte string if no function should be called, making it impossible to invoke the `receive` function
* during an upgrade.
*/
string public constant UPGRADE_INTERFACE_VERSION = "5.0.0";
/**
* @dev The call is from an unauthorized context.
*/
error UUPSUnauthorizedCallContext();
/**
* @dev The storage `slot` is unsupported as a UUID.
*/
error UUPSUnsupportedProxiableUUID(bytes32 slot);
/**
* @dev Check that the execution is being performed through a delegatecall call and that the execution context is
* a proxy contract with an implementation (as defined in ERC-1967) pointing to self. This should only be the case
* for UUPS and transparent proxies that are using the current contract as their implementation. Execution of a
* function through ERC-1167 minimal proxies (clones) would not normally pass this test, but is not guaranteed to
* fail.
*/
modifier onlyProxy() {
_checkProxy();
_;
}
/**
* @dev Check that the execution is not being performed through a delegate call. This allows a function to be
* callable on the implementing contract but not through proxies.
*/
modifier notDelegated() {
_checkNotDelegated();
_;
}
function __UUPSUpgradeable_init() internal onlyInitializing {
}
function __UUPSUpgradeable_init_unchained() internal onlyInitializing {
}
/**
* @dev Implementation of the ERC-1822 {proxiableUUID} function. This returns the storage slot used by the
* implementation. It is used to validate the implementation's compatibility when performing an upgrade.
*
* IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks
* bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this
* function revert if invoked through a proxy. This is guaranteed by the `notDelegated` modifier.
*/
function proxiableUUID() external view virtual notDelegated returns (bytes32) {
return ERC1967Utils.IMPLEMENTATION_SLOT;
}
/**
* @dev Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call
* encoded in `data`.
*
* Calls {_authorizeUpgrade}.
*
* Emits an {Upgraded} event.
*
* @custom:oz-upgrades-unsafe-allow-reachable delegatecall
*/
function upgradeToAndCall(address newImplementation, bytes memory data) public payable virtual onlyProxy {
_authorizeUpgrade(newImplementation);
_upgradeToAndCallUUPS(newImplementation, data);
}
/**
* @dev Reverts if the execution is not performed via delegatecall or the execution
* context is not of a proxy with an ERC-1967 compliant implementation pointing to self.
* See {_onlyProxy}.
*/
function _checkProxy() internal view virtual {
if (
address(this) == __self || // Must be called through delegatecall
ERC1967Utils.getImplementation() != __self // Must be called through an active proxy
) {
revert UUPSUnauthorizedCallContext();
}
}
/**
* @dev Reverts if the execution is performed via delegatecall.
* See {notDelegated}.
*/
function _checkNotDelegated() internal view virtual {
if (address(this) != __self) {
// Must not be called through delegatecall
revert UUPSUnauthorizedCallContext();
}
}
/**
* @dev Function that should revert when `msg.sender` is not authorized to upgrade the contract. Called by
* {upgradeToAndCall}.
*
* Normally, this function will use an xref:access.adoc[access control] modifier such as {Ownable-onlyOwner}.
*
* ```solidity
* function _authorizeUpgrade(address) internal onlyOwner {}
* ```
*/
function _authorizeUpgrade(address newImplementation) internal virtual;
/**
* @dev Performs an implementation upgrade with a security check for UUPS proxies, and additional setup call.
*
* As a security check, {proxiableUUID} is invoked in the new implementation, and the return value
* is expected to be the implementation slot in ERC-1967.
*
* Emits an {IERC1967-Upgraded} event.
*/
function _upgradeToAndCallUUPS(address newImplementation, bytes memory data) private {
try IERC1822Proxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {
if (slot != ERC1967Utils.IMPLEMENTATION_SLOT) {
revert UUPSUnsupportedProxiableUUID(slot);
}
ERC1967Utils.upgradeToAndCall(newImplementation, data);
} catch {
// The implementation is not UUPS
revert ERC1967Utils.ERC1967InvalidImplementation(newImplementation);
}
}
}
// src/strategies/Hyperliquid/BaseHypeStrategy.sol
// Custom imports
abstract contract BaseHypeStrategy is
Initializable,
AccessControlUpgradeable,
ReentrancyGuardUpgradeable,
PausableUpgradeable
{
// keccak256(abi.encode(uint256(keccak256("BaseHypeStrategy.storage")) - 1)) & ~bytes32(uint256(0xff))
bytes32 private constant HYPE_STRATEGY_STORAGE_SLOT =
0xe0361f59bd9cb7de6e2df4e9f3769c8d558e574a126af4e98958733da1cb9800;
// Role constants
bytes32 public constant ADMIN_ROLE = keccak256("ADMIN_ROLE");
bytes32 public constant BOT_ROLE = keccak256("BOT_ROLE");
// Events from HyperCoreActions
event FundsTransferred(address indexed from, address indexed to, uint256 amount, uint256 ntl);
event ApiWalletAdded(address indexed user, address indexed apiWallet, string apiWalletName);
event OrderCancelled(address indexed user, uint32 indexed asset, uint64 oid, uint128 cloid);
event USDT0TransferredToCore(address indexed user, uint256 amount);
event FeesUpdated(uint256 withdrawalFee);
struct BaseHypeStrategyStorage {
address bot;
address feeRecipient;
address admin;
// Fees
uint32 withdrawalFee; // basis points
// Limits
uint128 minDeposit;
// Helper
ICoreReader coreReader; // 160 bits
}
/// @custom:oz-upgrades-unsafe-allow constructor
constructor() {
_disableInitializers();
}
function _baseInit(
address _bot,
address _feeRecipient,
address _coreReader,
address _admin,
uint256 _withdrawalFee,
uint256 _minDeposit
)
internal
onlyInitializing
{
__AccessControl_init();
__ReentrancyGuard_init();
__Pausable_init();
BaseHypeStrategyStorage storage s = _getBaseStorage();
s.bot = _bot;
s.feeRecipient = _feeRecipient;
s.coreReader = ICoreReader(_coreReader);
s.admin = _admin;
s.minDeposit = uint64(_minDeposit);
s.withdrawalFee = uint32(_withdrawalFee);
}
/////////////////////////
// Admin Functions
/////////////////////////
function updateFees(uint32 _withdrawalFee) external virtual onlyRole(ADMIN_ROLE) {
if (_withdrawalFee > Constants.MAX_WITHDRAWAL_FEE) revert Errors_1.InvalidWithdrawalFee();
BaseHypeStrategyStorage storage s = _getBaseStorage();
s.withdrawalFee = _withdrawalFee;
emit FeesUpdated(_withdrawalFee);
}
function updateFeeRecipient(address _feeRecipient) external virtual onlyRole(ADMIN_ROLE) {
if (_feeRecipient == address(0)) revert Errors_1.InvalidFeeRecipient();
BaseHypeStrategyStorage storage s = _getBaseStorage();
s.feeRecipient = _feeRecipient;
}
function setAdmin(address _admin) external onlyRole(ADMIN_ROLE) {
_getBaseStorage().admin = _admin;
}
function pause() external virtual {
if (!hasRole(ADMIN_ROLE, msg.sender) && !hasRole(BOT_ROLE, msg.sender)) revert Errors_1.NotAuthorized();
_pause();
}
function unpause() external virtual {
if (!hasRole(ADMIN_ROLE, msg.sender) && !hasRole(BOT_ROLE, msg.sender)) revert Errors_1.NotAuthorized();
_unpause();
}
/////////////////////////
// Bot Functions (HyperCore Actions)
/////////////////////////
/// @notice Encode and push an action to HyperCore.
/// @param actionId 3-byte big-endian action identifier.
/// @param payload ABI-encoded fields specific to the action.
function _sendAction(uint24 actionId, bytes memory payload) internal {
// 1-byte version (0x01) + 3-byte ID + ABI payload
bytes memory full = abi.encodePacked(bytes1(0x01), bytes3(actionId), payload);
ICoreWriter(Constants.CORE_WRITER).sendRawAction(full);
}
// ===== Action-ID 1: limitOrder ==========================================
function placeLimitOrder(
uint32 asset, // Asset ID
bool isBuy, // false for short/sell
uint64 pxE8, // price × 1e8
uint64 szE8, // size × 1e8
bool reduceOnly,
uint8 tif, // 1=ALO, 2=GTC, 3=IOC
uint128 cloid // client-order-id (0 = none)
)
external
onlyRole(BOT_ROLE)
{
_sendAction(1, abi.encode(asset, isBuy, pxE8, szE8, reduceOnly, tif, cloid));
}
// ===== Action-ID 6: spotSend (bridge or Core→Core transfer) ============
/// @notice Use the token's *system* address (starts with 0x20) when
/// bridging into the EVM side.
function spotSend(address destination, uint64 tokenId, uint64 weiAmt) public virtual onlyRole(BOT_ROLE) {
_sendAction(6, abi.encode(destination, tokenId, weiAmt));
}
/// @notice Action-ID 7: USD class transfer
function usdClassTransfer(uint64 ntl, bool toPerp) external onlyRole(BOT_ROLE) {
_sendAction(7, abi.encode(ntl, toPerp));
emit FundsTransferred(msg.sender, address(0), 0, ntl);
}
/// @notice Action-ID 9: Add API wallet
function addApiWallet(address apiWallet, string calldata apiWalletName) external onlyRole(BOT_ROLE) {
_sendAction(9, abi.encode(apiWallet, apiWalletName));
emit ApiWalletAdded(msg.sender, apiWallet, apiWalletName);
}
/// @notice Action-ID 10: Cancel order by OID
function cancelOrderByOid(uint32 asset, uint64 oid) external onlyRole(BOT_ROLE) {
_sendAction(10, abi.encode(asset, oid));
emit OrderCancelled(msg.sender, asset, oid, 0);
}
/// @notice Action-ID 11: Cancel order by CLOID
function cancelOrderByCloid(uint32 asset, uint128 cloid) external onlyRole(BOT_ROLE) {
_sendAction(11, abi.encode(asset, cloid));
emit OrderCancelled(msg.sender, asset, 0, cloid);
}
/////////////////////////
// Bot Functions (Token Transfers)
/////////////////////////
function transferUSDT0ToCore(uint256 _amount) public virtual onlyRole(BOT_ROLE) {
if (_amount > IERC20(Constants.USDT0).balanceOf(address(this))) revert Errors_1.InsufficientBalance();
IERC20(Constants.USDT0).transfer(Constants.USDT0_SYSTEM_ADDRESS, _amount);
emit USDT0TransferredToCore(address(this), _amount);
}
function _calculateWithdrawalFee(uint128 _withdrawalAmt) internal view returns (uint256 fee) {
BaseHypeStrategyStorage storage s = _getBaseStorage();
fee = (s.withdrawalFee * _withdrawalAmt) / Constants.BASE_BPS;
}
function getCoreReader() external view returns (ICoreReader) {
return _getBaseStorage().coreReader;
}
function _getBaseStorage() internal pure returns (BaseHypeStrategyStorage storage s) {
bytes32 slot = HYPE_STRATEGY_STORAGE_SLOT;
assembly {
s.slot := slot
}
}
}
// lib/openzeppelin-contracts-upgradeable/contracts/token/ERC20/extensions/ERC4626Upgradeable.sol
// OpenZeppelin Contracts (last updated v5.1.0) (token/ERC20/extensions/ERC4626.sol)
/**
* @dev Implementation of the ERC-4626 "Tokenized Vault Standard" as defined in
* https://eips.ethereum.org/EIPS/eip-4626[ERC-4626].
*
* This extension allows the minting and burning of "shares" (represented using the ERC-20 inheritance) in exchange for
* underlying "assets" through standardized {deposit}, {mint}, {redeem} and {burn} workflows. This contract extends
* the ERC-20 standard. Any additional extensions included along it would affect the "shares" token represented by this
* contract and not the "assets" token which is an independent contract.
*
* [CAUTION]
* ====
* In empty (or nearly empty) ERC-4626 vaults, deposits are at high risk of being stolen through frontrunning
* with a "donation" to the vault that inflates the price of a share. This is variously known as a donation or inflation
* attack and is essentially a problem of slippage. Vault deployers can protect against this attack by making an initial
* deposit of a non-trivial amount of the asset, such that price manipulation becomes infeasible. Withdrawals may
* similarly be affected by slippage. Users can protect against this attack as well as unexpected slippage in general by
* verifying the amount received is as expected, using a wrapper that performs these checks such as
* https://github.com/fei-protocol/ERC4626#erc4626router-and-base[ERC4626Router].
*
* Since v4.9, this implementation introduces configurable virtual assets and shares to help developers mitigate that risk.
* The `_decimalsOffset()` corresponds to an offset in the decimal representation between the underlying asset's decimals
* and the vault decimals. This offset also determines the rate of virtual shares to virtual assets in the vault, which
* itself determines the initial exchange rate. While not fully preventing the attack, analysis shows that the default
* offset (0) makes it non-profitable even if an attacker is able to capture value from multiple user deposits, as a result
* of the value being captured by the virtual shares (out of the attacker's donation) matching the attacker's expected gains.
* With a larger offset, the attack becomes orders of magnitude more expensive than it is profitable. More details about the
* underlying math can be found xref:erc4626.adoc#inflation-attack[here].
*
* The drawback of this approach is that the virtual shares do capture (a very small) part of the value being accrued
* to the vault. Also, if the vault experiences losses, the users try to exit the vault, the virtual shares and assets
* will cause the first user to exit to experience reduced losses in detriment to the last users that will experience
* bigger losses. Developers willing to revert back to the pre-v4.9 behavior just need to override the
* `_convertToShares` and `_convertToAssets` functions.
*
* To learn more, check out our xref:ROOT:erc4626.adoc[ERC-4626 guide].
* ====
*/
abstract contract ERC4626Upgradeable is Initializable, ERC20Upgradeable, IERC4626 {
using Math for uint256;
/// @custom:storage-location erc7201:openzeppelin.storage.ERC4626
struct ERC4626Storage {
IERC20 _asset;
uint8 _underlyingDecimals;
}
// keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.ERC4626")) - 1)) & ~bytes32(uint256(0xff))
bytes32 private constant ERC4626StorageLocation = 0x0773e532dfede91f04b12a73d3d2acd361424f41f76b4fb79f090161e36b4e00;
function _getERC4626Storage() private pure returns (ERC4626Storage storage $) {
assembly {
$.slot := ERC4626StorageLocation
}
}
/**
* @dev Attempted to deposit more assets than the max amount for `receiver`.
*/
error ERC4626ExceededMaxDeposit(address receiver, uint256 assets, uint256 max);
/**
* @dev Attempted to mint more shares than the max amount for `receiver`.
*/
error ERC4626ExceededMaxMint(address receiver, uint256 shares, uint256 max);
/**
* @dev Attempted to withdraw more assets than the max amount for `receiver`.
*/
error ERC4626ExceededMaxWithdraw(address owner, uint256 assets, uint256 max);
/**
* @dev Attempted to redeem more shares than the max amount for `receiver`.
*/
error ERC4626ExceededMaxRedeem(address owner, uint256 shares, uint256 max);
/**
* @dev Set the underlying asset contract. This must be an ERC20-compatible contract (ERC-20 or ERC-777).
*/
function __ERC4626_init(IERC20 asset_) internal onlyInitializing {
__ERC4626_init_unchained(asset_);
}
function __ERC4626_init_unchained(IERC20 asset_) internal onlyInitializing {
ERC4626Storage storage $ = _getERC4626Storage();
(bool success, uint8 assetDecimals) = _tryGetAssetDecimals(asset_);
$._underlyingDecimals = success ? assetDecimals : 18;
$._asset = asset_;
}
/**
* @dev Attempts to fetch the asset decimals. A return value of false indicates that the attempt failed in some way.
*/
function _tryGetAssetDecimals(IERC20 asset_) private view returns (bool ok, uint8 assetDecimals) {
(bool success, bytes memory encodedDecimals) = address(asset_).staticcall(
abi.encodeCall(IERC20Metadata.decimals, ())
);
if (success && encodedDecimals.length >= 32) {
uint256 returnedDecimals = abi.decode(encodedDecimals, (uint256));
if (returnedDecimals <= type(uint8).max) {
return (true, uint8(returnedDecimals));
}
}
return (false, 0);
}
/**
* @dev Decimals are computed by adding the decimal offset on top of the underlying asset's decimals. This
* "original" value is cached during construction of the vault contract. If this read operation fails (e.g., the
* asset has not been created yet), a default of 18 is used to represent the underlying asset's decimals.
*
* See {IERC20Metadata-decimals}.
*/
function decimals() public view virtual override(IERC20Metadata, ERC20Upgradeable) returns (uint8) {
ERC4626Storage storage $ = _getERC4626Storage();
return $._underlyingDecimals + _decimalsOffset();
}
/** @dev See {IERC4626-asset}. */
function asset() public view virtual returns (address) {
ERC4626Storage storage $ = _getERC4626Storage();
return address($._asset);
}
/** @dev See {IERC4626-totalAssets}. */
function totalAssets() public view virtual returns (uint256) {
return IERC20(asset()).balanceOf(address(this));
}
/** @dev See {IERC4626-convertToShares}. */
function convertToShares(uint256 assets) public view virtual returns (uint256) {
return _convertToShares(assets, Math.Rounding.Floor);
}
/** @dev See {IERC4626-convertToAssets}. */
function convertToAssets(uint256 shares) public view virtual returns (uint256) {
return _convertToAssets(shares, Math.Rounding.Floor);
}
/** @dev See {IERC4626-maxDeposit}. */
function maxDeposit(address) public view virtual returns (uint256) {
return type(uint256).max;
}
/** @dev See {IERC4626-maxMint}. */
function maxMint(address) public view virtual returns (uint256) {
return type(uint256).max;
}
/** @dev See {IERC4626-maxWithdraw}. */
function maxWithdraw(address owner) public view virtual returns (uint256) {
return _convertToAssets(balanceOf(owner), Math.Rounding.Floor);
}
/** @dev See {IERC4626-maxRedeem}. */
function maxRedeem(address owner) public view virtual returns (uint256) {
return balanceOf(owner);
}
/** @dev See {IERC4626-previewDeposit}. */
function previewDeposit(uint256 assets) public view virtual returns (uint256) {
return _convertToShares(assets, Math.Rounding.Floor);
}
/** @dev See {IERC4626-previewMint}. */
function previewMint(uint256 shares) public view virtual returns (uint256) {
return _convertToAssets(shares, Math.Rounding.Ceil);
}
/** @dev See {IERC4626-previewWithdraw}. */
function previewWithdraw(uint256 assets) public view virtual returns (uint256) {
return _convertToShares(assets, Math.Rounding.Ceil);
}
/** @dev See {IERC4626-previewRedeem}. */
function previewRedeem(uint256 shares) public view virtual returns (uint256) {
return _convertToAssets(shares, Math.Rounding.Floor);
}
/** @dev See {IERC4626-deposit}. */
function deposit(uint256 assets, address receiver) public virtual returns (uint256) {
uint256 maxAssets = maxDeposit(receiver);
if (assets > maxAssets) {
revert ERC4626ExceededMaxDeposit(receiver, assets, maxAssets);
}
uint256 shares = previewDeposit(assets);
_deposit(_msgSender(), receiver, assets, shares);
return shares;
}
/** @dev See {IERC4626-mint}. */
function mint(uint256 shares, address receiver) public virtual returns (uint256) {
uint256 maxShares = maxMint(receiver);
if (shares > maxShares) {
revert ERC4626ExceededMaxMint(receiver, shares, maxShares);
}
uint256 assets = previewMint(shares);
_deposit(_msgSender(), receiver, assets, shares);
return assets;
}
/** @dev See {IERC4626-withdraw}. */
function withdraw(uint256 assets, address receiver, address owner) public virtual returns (uint256) {
uint256 maxAssets = maxWithdraw(owner);
if (assets > maxAssets) {
revert ERC4626ExceededMaxWithdraw(owner, assets, maxAssets);
}
uint256 shares = previewWithdraw(assets);
_withdraw(_msgSender(), receiver, owner, assets, shares);
return shares;
}
/** @dev See {IERC4626-redeem}. */
function redeem(uint256 shares, address receiver, address owner) public virtual returns (uint256) {
uint256 maxShares = maxRedeem(owner);
if (shares > maxShares) {
revert ERC4626ExceededMaxRedeem(owner, shares, maxShares);
}
uint256 assets = previewRedeem(shares);
_withdraw(_msgSender(), receiver, owner, assets, shares);
return assets;
}
/**
* @dev Internal conversion function (from assets to shares) with support for rounding direction.
*/
function _convertToShares(uint256 assets, Math.Rounding rounding) internal view virtual returns (uint256) {
return assets.mulDiv(totalSupply() + 10 ** _decimalsOffset(), totalAssets() + 1, rounding);
}
/**
* @dev Internal conversion function (from shares to assets) with support for rounding direction.
*/
function _convertToAssets(uint256 shares, Math.Rounding rounding) internal view virtual returns (uint256) {
return shares.mulDiv(totalAssets() + 1, totalSupply() + 10 ** _decimalsOffset(), rounding);
}
/**
* @dev Deposit/mint common workflow.
*/
function _deposit(address caller, address receiver, uint256 assets, uint256 shares) internal virtual {
// If asset() is ERC-777, `transferFrom` can trigger a reentrancy BEFORE the transfer happens through the
// `tokensToSend` hook. On the other hand, the `tokenReceived` hook, that is triggered after the transfer,
// calls the vault, which is assumed not malicious.
//
// Conclusion: we need to do the transfer before we mint so that any reentrancy would happen before the
// assets are transferred and before the shares are minted, which is a valid state.
// slither-disable-next-line reentrancy-no-eth
SafeERC20.safeTransferFrom(IERC20(asset()), caller, address(this), assets);
_mint(receiver, shares);
emit Deposit(caller, receiver, assets, shares);
}
/**
* @dev Withdraw/redeem common workflow.
*/
function _withdraw(
address caller,
address receiver,
address owner,
uint256 assets,
uint256 shares
) internal virtual {
if (caller != owner) {
_spendAllowance(owner, caller, shares);
}
// If asset() is ERC-777, `transfer` can trigger a reentrancy AFTER the transfer happens through the
// `tokensReceived` hook. On the other hand, the `tokensToSend` hook, that is triggered before the transfer,
// calls the vault, which is assumed not malicious.
//
// Conclusion: we need to do the transfer after the burn so that any reentrancy would happen after the
// shares are burned and after the assets are transferred, which is a valid state.
_burn(owner, shares);
SafeERC20.safeTransfer(IERC20(asset()), receiver, assets);
emit Withdraw(caller, receiver, owner, assets, shares);
}
function _decimalsOffset() internal view virtual returns (uint8) {
return 0;
}
}
// src/strategies/Hyperliquid/HypeStrategy.sol
/**
* @title HypeStrategy
* @author Raga Finance
* @notice ERC4626-based vault for Hyperliquid HYPE strategy with 2-phased withdrawals
* @dev Implements delta-neutral strategy using short positions on Hyperliquid and long positions on LoopedHype
*
* The contract follows a two-phase withdrawal process:
* 1. Request Phase: Users request withdrawals which are queued for the current epoch
* 2. Claim Phase: After epoch finalization, users can claim their processed withdrawals
*/
contract HypeStrategy is ERC4626Upgradeable, UUPSUpgradeable, BaseHypeStrategy, IHypeStrategy {
using SafeERC20 for IERC20;
/*//////////////////////////////////////////////////////////////
STATE VARIABLES
//////////////////////////////////////////////////////////////*/
/// @dev Storage slot for HypeStrategy storage
/// @dev keccak256(abi.encode(uint256(keccak256("HypeStrategy.storage")) - 1)) & ~bytes32(uint256(0xff))
bytes32 private constant HYPE_STRATEGY_STORAGE_SLOT =
0x76934c1406b8ac7d50d9b396bab4cebc7c7ad3ef4d39b66a41a1ce5d42c75600;
/// @dev Main storage struct for HypeStrategy
struct HypeStrategyStorage {
// Epoch tracking
uint32 lastFinalizedEpoch;
uint128 reservedAssets; // Total assets reserved for withdrawal
// Bot utility vars
uint128 reservedForSwap; // Assets reserved to be swapped in current epoch
uint128 usdtCurrentlySwapped; // USDT0 currently swapped in current epoch
uint256 hypeCurrentlySwapped; // HYPE currently swapped in current epoch
// Tracking variables
uint256 scheduledShares; // Total shares scheduled for withdrawal
// Data structures
EpochData[] epochs; // Array of epoch data
mapping(address user => WithdrawalRequest[] requests) withdrawalRequests; // User withdrawal requests
}
/*//////////////////////////////////////////////////////////////
CONSTRUCTOR
//////////////////////////////////////////////////////////////*/
/// @custom:oz-upgrades-unsafe-allow constructor
constructor() {
_disableInitializers();
}
/*//////////////////////////////////////////////////////////////
INITIALIZER
//////////////////////////////////////////////////////////////*/
/**
* @notice Initialize the strategy vault
* @param name The name of the ERC20 token
* @param symbol The symbol of the ERC20 token
* @param _bot Address of the bot role
* @param _feeRecipient Address to receive fees
* @param _admin Address of the admin
* @param _withdrawalFee Withdrawal fee in basis points
* @param _minDeposit Minimum deposit amount
*/
function initialize(
string memory name,
string memory symbol,
address _bot,
address _feeRecipient,
address _coreReader,
address _admin,
uint256 _withdrawalFee,
uint256 _minDeposit
)
public
virtual
initializer
{
__ERC4626_init(IERC20(Constants.USDT0));
__UUPSUpgradeable_init();
__ERC20_init(name, symbol);
// Sanity checks
if (_admin == address(0)) revert Errors_1.InvalidAddress();
if (_bot == address(0)) revert Errors_1.InvalidAddress();
if (_feeRecipient == address(0)) revert Errors_1.InvalidAddress();
if (_minDeposit > 1000 * 1e6) revert Errors_1.InvalidMinDeposit(); // not greater than 1000 USDT0
if (_withdrawalFee > Constants.MAX_WITHDRAWAL_FEE) revert Errors_1.InvalidWithdrawalFee();
// Initialize base strategy functionality
_baseInit(_bot, _feeRecipient, _coreReader, _admin, _withdrawalFee, _minDeposit);
HypeStrategyStorage storage s = _getStorage();
// Initialize first epoch
s.epochs.push(
EpochData({
epoch: 0,
startTime: uint48(block.timestamp),
endTime: 0,
totalWithdrawalShares: 0,
actualWithdrawnAssets: 0,
finalized: false
})
);
// Grant roles
_grantRole(DEFAULT_ADMIN_ROLE, _admin);
_grantRole(ADMIN_ROLE, _admin);
_grantRole(BOT_ROLE, _bot);
}
/*//////////////////////////////////////////////////////////////
EXTERNAL FUNCTIONS
//////////////////////////////////////////////////////////////*/
/**
* @notice Request withdrawal of shares (phase 1)
* @dev Burns shares immediately and queues withdrawal for current epoch
* @param shares The number of shares to withdraw
*/
function requestWithdrawal(uint128 shares) external nonReentrant whenNotPaused {
if (shares == 0) revert Errors_1.ZeroWithdrawal();
HypeStrategyStorage storage s = _getStorage();
address user = _msgSender();
uint32 epoch = uint32(s.epochs.length - 1);
// Burn shares immediately
_burn(user, shares);
uint256 totalRequests = s.withdrawalRequests[user].length;
// Add or update withdrawal request
if (totalRequests == 0) {
s.withdrawalRequests[user].push(WithdrawalRequest({ shares: shares, epoch: epoch }));
} else {
WithdrawalRequest storage recentRequest = s.withdrawalRequests[user][totalRequests - 1];
// If the most recent request was from the previous epochs
if (recentRequest.epoch < epoch) {
s.withdrawalRequests[user].push(WithdrawalRequest({ shares: shares, epoch: epoch }));
} else {
// Otherwise, add the shares to the most recent request
recentRequest.shares += shares;
}
}
// Update epoch state
s.epochs[epoch].totalWithdrawalShares += shares;
s.scheduledShares += shares;
emit WithdrawalRequested(user, shares, epoch);
}
/**
* @notice Claim processed withdrawals (phase 2)
* @dev Claims all finalized withdrawal requests for the user
* @param user Address of the user claiming withdrawals
*/
function claimWithdrawal(address user) external nonReentrant {
HypeStrategyStorage storage s = _getStorage();
BaseHypeStrategyStorage storage bs = _getBaseStorage();
WithdrawalRequest[] storage requests = s.withdrawalRequests[user];
// Validate requests exist
if (requests.length == 0) revert Errors_1.NoWithdrawalRequest();
uint256 withdrawalAmount = 0;
uint256 sharesClaimed = 0;
// Process unclaimed requests (iterate backwards)
uint256 i = requests.length;
do {
i--;
// If the epoch is not finalized then continue through the requests
if (!s.epochs[requests[i].epoch].finalized) continue;
withdrawalAmount += _calcWithdrawalAmt(requests[i]);
sharesClaimed += requests[i].shares;
// reset data
delete requests[i];
} while (i > 0);
if (withdrawalAmount == 0) revert Errors_1.ZeroWithdrawalForClaim();
// reset requests array state
{
while (requests.length > 0 && requests[requests.length - 1].shares == 0) requests.pop();
}
// Update reserved assets
s.reservedAssets -= uint128(withdrawalAmount);
// Calculate and transfer fee
uint256 fee = _calculateWithdrawalFee(uint128(withdrawalAmount));
IERC20(asset()).safeTransfer(bs.feeRecipient, fee);
uint256 userAmount = withdrawalAmount - fee;
// Transfer remaining amount to user
IERC20(asset()).safeTransfer(user, userAmount);
emit WithdrawalClaimed(user, sharesClaimed, userAmount);
}
/**
* @notice Process epoch and notify strategcy of completed withdrawals
* @dev Bot function to finalize epoch after processing withdrawals
* @param _epoch The epoch being finalized
* @param _withdrawalAmount Amount of USDT0 from the unallocated assets
* @param _treasuryAssets Amount of USDT0 from the treasury (for special cases)
*/
function processEpochAndNotify(
uint32 _epoch,
uint128 _withdrawalAmount,
uint128 _treasuryAssets
)
external
onlyRole(BOT_ROLE)
{
HypeStrategyStorage storage s = _getStorage();
// If the amount that allocated for withdrawal is greated than the total assets in the contract then revert
if (_withdrawalAmount + s.reservedAssets > (super.totalAssets())) revert Errors_1.InsufficientAssets();
// Epoch finalization must be sequential
if (_epoch != getCurrentEpoch() - 1) revert Errors_1.InvalidEpoch();
EpochData storage epoch = s.epochs[_epoch];
// Validate epoch
{
if (s.epochs.length > 0) {
if (_epoch >= uint32(s.epochs.length - 1)) revert Errors_1.InvalidEpoch();
} else {
if (_epoch != 0) revert Errors_1.InvalidEpoch();
}
if (epoch.finalized) revert Errors_1.EpochAlreadyFinalized();
}
// We may add assets from the treasury to reserved assets if the amount recovered is too far away from the
// amount user expects
if (_treasuryAssets > 0) {
IERC20(asset()).safeTransferFrom(msg.sender, address(this), _treasuryAssets);
s.reservedAssets += _treasuryAssets;
epoch.actualWithdrawnAssets += _treasuryAssets;
}
// Update epoch state
s.lastFinalizedEpoch = uint32(_epoch);
epoch.actualWithdrawnAssets += _withdrawalAmount;
s.scheduledShares -= epoch.totalWithdrawalShares;
s.reservedAssets += _withdrawalAmount;
epoch.finalized = true;
// reset
{
s.reservedForSwap = 0;
s.usdtCurrentlySwapped = 0;
s.hypeCurrentlySwapped = 0;
}
emit EpochWithdrawalsProcessed(_epoch, _withdrawalAmount);
}
/**
* @notice Update current epoch and start a new one
* @dev Bot function to transition between epochs
*/
function updateEpoch(uint128 _amountToSwap) external onlyRole(BOT_ROLE) {
HypeStrategyStorage storage s = _getStorage();
uint256 epoch = getCurrentEpoch();
uint48 timestamp = uint48(block.timestamp);
EpochData storage epochData = s.epochs[epoch];
epochData.endTime = timestamp;
if (epoch != 0 && !s.epochs[epoch - 1].finalized) revert Errors_1.PreviousEpochNotFinalized();
// Start new epoch
s.epochs.push(
EpochData({
epoch: uint32(epoch + 1),
startTime: timestamp,
endTime: 0,
totalWithdrawalShares: 0,
actualWithdrawnAssets: 0,
finalized: false
})
);
// Reset variables
{
s.reservedForSwap = _amountToSwap;
s.usdtCurrentlySwapped = 0;
s.hypeCurrentlySwapped = 0;
}
emit EpochUpdated(epoch + 1, uint48(block.timestamp));
}
/**
* @notice Swap USDT0 for exact amount of HYPE
* @dev Bot function to create long positions
* @param _maxUSDT0In Maximum USDT0 to spend
* @param _amountOutHype Exact amount of HYPE to receive
* @return Amount of USDT0 spent
*/
function swapUSDT0ForExactHype(
uint128 _maxUSDT0In,
uint256 _amountOutHype
)
external
onlyRole(BOT_ROLE)
whenNotPaused
nonReentrant
returns (uint256)
{
if (getUnallocatedAssets() < _maxUSDT0In) {
revert Errors_1.InsufficientAssets();
}
HypeStrategyStorage storage s = _getStorage();
IERC20(Constants.USDT0).forceApprove(Constants.HYPERSWAP_ROUTER, _maxUSDT0In);
uint256 usdt0In =
SwapLib.swapExactOutput(Constants.USDT0, Constants.HYPE, _amountOutHype, _maxUSDT0In, Constants.POOL_FEE);
s.usdtCurrentlySwapped += uint128(usdt0In);
s.hypeCurrentlySwapped += uint128(_amountOutHype);
emit SwapExecuted(Constants.USDT0, Constants.HYPE, usdt0In, _amountOutHype);
return uint128(usdt0In);
}
/*//////////////////////////////////////////////////////////////
EXTERNAL ADMIN FUNCTIONS
//////////////////////////////////////////////////////////////*/
/**
* @notice Update withdrawal fee
* @param _withdrawalFee New withdrawal fee in basis points
*/
function updateFees(uint32 _withdrawalFee)
external
override(BaseHypeStrategy, IHypeStrategy)
onlyRole(ADMIN_ROLE)
{
if (_withdrawalFee > Constants.MAX_WITHDRAWAL_FEE) revert Errors_1.InvalidWithdrawalFee();
BaseHypeStrategyStorage storage s = _getBaseStorage();
s.withdrawalFee = _withdrawalFee;
emit FeesUpdated(_withdrawalFee);
}
/**
* @notice Update fee recipient address
* @param _feeRecipient New fee recipient address
*/
function updateFeeRecipient(address _feeRecipient)
external
override(BaseHypeStrategy, IHypeStrategy)
onlyRole(ADMIN_ROLE)
{
if (_feeRecipient == address(0)) revert Errors_1.InvalidFeeRecipient();
BaseHypeStrategyStorage storage s = _getBaseStorage();
address oldRecipient = s.feeRecipient;
s.feeRecipient = _feeRecipient;
emit FeeRecipientUpdated(oldRecipient, _feeRecipient);
}
/**
* @notice Update minimum deposit
* @param _minDeposit New minimum deposit amount
*/
function setMinDeposit(uint64 _minDeposit) external onlyRole(ADMIN_ROLE) {
_getBaseStorage().minDeposit = _minDeposit;
emit MinDepositUpdated(_minDeposit);
}
function setSwapAmount(uint128 _swapAmount) external onlyRole(BOT_ROLE) {
_getStorage().reservedForSwap = _swapAmount;
}
/*//////////////////////////////////////////////////////////////
PUBLIC FUNCTIONS
//////////////////////////////////////////////////////////////*/
/**
* @notice Deposit assets and receive shares
* @param assets Amount of assets to deposit
* @param receiver Address to receive the shares
* @return shares Amount of shares minted
*/
function deposit(
uint256 assets,
address receiver
)
public
override(ERC4626Upgradeable)
nonReentrant
whenNotPaused
returns (uint256 shares)
{
BaseHypeStrategyStorage storage bs = _getBaseStorage();
if (receiver == address(0)) revert Errors_1.InvalidAddress();
if (assets < bs.minDeposit) revert Errors_1.BelowMinimumDeposit();
shares = super.deposit(assets, receiver);
return shares;
}
/**
* @notice Mint exact shares by depositing assets
* @param shares Amount of shares to mint
* @param receiver Address to receive the shares
* @return assets Amount of assets deposited
*/
function mint(
uint256 shares,
address receiver
)
public
override(ERC4626Upgradeable)
nonReentrant
whenNotPaused
returns (uint256 assets)
{
BaseHypeStrategyStorage storage bs = _getBaseStorage();
if (receiver == address(0)) revert Errors_1.InvalidAddress();
if (previewMint(shares) < bs.minDeposit) revert Errors_1.BelowMinimumDeposit();
assets = super.mint(shares, receiver);
return assets;
}
/**
* @notice Direct withdraw is disabled - use requestWithdrawal instead
*/
function withdraw(uint256, address, address) public pure override(ERC4626Upgradeable) returns (uint256) {
revert("Use requestWithdrawal");
}
/**
* @notice Direct redeem is disabled - use requestWithdrawal instead
*/
function redeem(uint256, address, address) public pure override(ERC4626Upgradeable) returns (uint256) {
revert("Use requestWithdrawal");
}
/**
* @notice Transfer USDT0 to HyperCore
* @dev Bot function to allocate funds for short positions
* @param _amount Amount of USDT0 to transfer
*/
function transferUSDT0ToCore(uint256 _amount) public override onlyRole(BOT_ROLE) {
if (_amount > getUnallocatedAssets()) revert Errors_1.InsufficientAssets();
super.transferUSDT0ToCore(_amount);
emit FundsTransferred(Constants.USDT0_SYSTEM_ADDRESS, _amount);
}
/**
* @notice Swap exact HYPE for USDT0
* @dev Bot function to close long positions
* @param _amountInHype Amount of HYPE to swap
* @param _minUSDT0Out Minimum USDT0 to receive
* @return Amount of USDT0 received
*/
function swapExactHypeToUSDT0(
uint256 _amountInHype,
uint128 _minUSDT0Out,
bool _forWithdrawalReserve
)
public
onlyRole(BOT_ROLE)
whenNotPaused
nonReentrant
returns (uint256)
{
if (IERC20(Constants.HYPE).balanceOf(address(this)) < _amountInHype) {
revert Errors_1.InsufficientAssets();
}
HypeStrategyStorage storage s = _getStorage();
IERC20(Constants.HYPE).forceApprove(Constants.HYPERSWAP_ROUTER, _amountInHype);
uint256 usdt0Amt =
SwapLib.swapExactInput(Constants.HYPE, Constants.USDT0, _amountInHype, _minUSDT0Out, Constants.POOL_FEE);
s.usdtCurrentlySwapped += uint128(usdt0Amt);
s.hypeCurrentlySwapped += uint128(_amountInHype);
if (_forWithdrawalReserve) {
s.reservedAssets += uint128(usdt0Amt);
}
emit SwapExecuted(Constants.HYPE, Constants.USDT0, _amountInHype, usdt0Amt);
return usdt0Amt;
}
function spotSend(
address destination,
uint64 tokenId,
uint64 weiAmt,
bool _reserverForWithdrawal
)
public
whenNotPaused
onlyRole(BOT_ROLE)
{
HypeStrategyStorage storage s = _getStorage();
if (destination != Constants.USDT0_SYSTEM_ADDRESS) revert Errors_1.InvalidHyperCoreDestination();
super.spotSend(destination, tokenId, weiAmt);
if (_reserverForWithdrawal) {
s.reservedAssets += uint128(weiAmt);
}
emit SpotSent(destination, tokenId, weiAmt);
}
/*//////////////////////////////////////////////////////////////
PUBLIC VIEW FUNCTIONS
//////////////////////////////////////////////////////////////*/
/**
* @notice Get total assets managed by the strategy
* @dev Includes vault balance, positions, and PnL minus scheduled withdrawals
* @return Total assets in USDT0
*/
function totalAssets() public view virtual override(ERC4626Upgradeable) returns (uint256) {
// total assets everywhere - assets reserved for withdrawal (after processing)
uint256 totalAssetsBeforeWithdrawal = getTotalAssetsBeforeWithdrawals();
// calculate assets for withdrawal dynamically for shares requested for withdrawal in current epoch
uint256 sharesForWithdrawal = getScheduledWithdrawal();
uint256 denom = totalSupply() + sharesForWithdrawal;
uint256 assetsForWithdrawal = denom > 0 ? (sharesForWithdrawal * totalAssetsBeforeWithdrawal) / denom : 0;
// Subtract scheduled withdrawals
return totalAssetsBeforeWithdrawal - assetsForWithdrawal;
}
/**
* @notice Get USDC balance on HyperCore (spot + perp)
* @return Balance in 6 decimals (USDT0 format)
*/
function getUSDCHyperCoreBalance() public view virtual returns (uint256) {
BaseHypeStrategyStorage storage bs = _getBaseStorage();
// Spot balance is 8 decimals
uint256 spotBalance = bs.coreReader.spotBalance(address(this), Constants.USDC_TOKEN_ID).total;
return (spotBalance / 1e2); // 6 decimals
}
/**
* @notice Get USDT balance on HyperCore spot account
* @return Balance in 6 decimals
*/
function getUSDTHyperCoreBalance() public view virtual returns (uint256) {
BaseHypeStrategyStorage storage bs = _getBaseStorage();
uint256 balance = bs.coreReader.spotBalance(address(this), Constants.USDT_TOKEN_ID).total;
return balance / 1e2;
}
/**
* @notice Get perp account value (can be negative if position has unrealized losses)
* @return Value in 6 decimals (signed)
*/
function getPerpAccountValue() public view virtual returns (int256) {
BaseHypeStrategyStorage storage bs = _getBaseStorage();
// account margin summary returns in 6 decimals
int64 val = bs.coreReader.accountMarginSummary(0, address(this)).accountValue;
return int256(val);
}
/**
* @notice Get HYPE value in USDC using oracle price
* @return Value in USDC (6 decimals)
*/
function getHYPEValueInUSDC() public view virtual returns (uint256) {
BaseHypeStrategyStorage storage bs = _getBaseStorage();
uint256 currentPrice = bs.coreReader.oraclePx(Constants.HYPE_PERP_INDEX); // 4 decimals
uint256 hypeAmt = IERC20(Constants.HYPE).balanceOf(address(this));
// currentPrice = 4 decimals
// hypeAmt = 18 decimals
// Final amount should be 6 decimals
// So we need to divide by 1e16
return (hypeAmt * currentPrice) / 1e16;
}
/**
* @notice Get current epoch number
* @return Current epoch index
*/
function getCurrentEpoch() public view returns (uint256) {
return _getStorage().epochs.length - 1;
}
/**
* @notice Get the last finalized epoch
* @return Last finalized epoch index
*/
function getLastFinalizedEpoch() public view returns (uint32) {
return _getStorage().lastFinalizedEpoch;
}
/**
* @notice Get user's queued withdrawal amounts
* @param user Address of the user
* @return shares Total shares queued
* @return assets Total assets queued
*/
function getUserQueuedWithdrawal(address user) public view returns (uint256 shares, uint256 assets) {
HypeStrategyStorage storage s = _getStorage();
WithdrawalRequest[] storage requests = s.withdrawalRequests[user];
uint256 totalSharesQueued = 0;
uint256 totalAssetsQueued = 0;
if (requests.length == 0) {
return (0, 0);
}
uint256 i = requests.length;
do {
i--;
if (requests[i].shares == 0) continue;
if (!s.epochs[requests[i].epoch].finalized) continue;
uint256 requestAmount = _calcWithdrawalAmt(requests[i]);
if (requestAmount > 0) {
totalAssetsQueued += requestAmount;
totalSharesQueued += requests[i].shares;
}
} while (i > 0);
return (totalSharesQueued, totalAssetsQueued);
}
/*//////////////////////////////////////////////////////////////
EXTERNAL VIEW FUNCTIONS
//////////////////////////////////////////////////////////////*/
/**
* @notice Get epoch data for a specific epoch
* @param epoch Epoch number
* @return Epoch data struct
*/
function getEpochData(uint128 epoch) external view returns (EpochData memory) {
return _getStorage().epochs[uint32(epoch)];
}
/**
* @notice Get total scheduled shares for withdrawal
* @return Total scheduled shares
*/
function getScheduledWithdrawal() public view returns (uint256) {
return _getStorage().scheduledShares;
}
/**
* @notice Get reserved assets
* @return Reserved assets
*/
function getReservedAssets() public view returns (uint256) {
return _getStorage().reservedAssets;
}
/// @notice Get total assets before queued shares withdrawals approximate
function getTotalAssetsBeforeWithdrawals() public view returns (uint256) {
// Get vault's USDT0 balance (minus reserved)
uint256 vaultBalance = IERC20(asset()).balanceOf(address(this));
HypeStrategyStorage storage s = _getStorage();
uint256 availableVaultBalance = vaultBalance - s.reservedAssets;
// Get all position values (perp can be negative in delta-neutral strategy)
int256 perpValue = getPerpAccountValue();
uint256 longValue = getHYPEValueInUSDC();
uint256 spotUSDC = getUSDCHyperCoreBalance();
uint256 spotUSDT = getUSDTHyperCoreBalance();
// Calculate total: vault balance + long positions + spot balances + perp value (can be negative)
// In delta-neutral strategy, negative perp is offset by long position gains
int256 totalSigned =
int256(availableVaultBalance) + int256(longValue) + int256(spotUSDC) + int256(spotUSDT) + perpValue;
// Ensure total doesn't go below zero
return totalSigned > 0 ? uint256(totalSigned) : 0;
}
/// @notice Get scheduled assets for withdrawal in the specific epoch
function getScheduledWithdrawalAssets(uint256 epoch) public view returns (uint256) {
if (epoch > getCurrentEpoch()) revert Errors_1.InvalidEpoch();
uint256 sharesForWithdrawal = _getStorage().epochs[uint32(epoch)].totalWithdrawalShares;
uint256 totalAssetsBeforeWithdrawals = getTotalAssetsBeforeWithdrawals();
uint256 denominator = totalSupply() + sharesForWithdrawal;
return denominator == 0 ? 0 : (sharesForWithdrawal * totalAssetsBeforeWithdrawals) / denominator;
}
/**
* @notice Get total scheduled withdrawal assets across all epochs
* @dev Implementation of IHypeStrategy interface
* @return Total assets scheduled for withdrawal
*/
function getScheduledWithdrawalAssets() external view returns (uint256) {
uint256 sharesForWithdrawal = getScheduledWithdrawal();
uint256 totalAssetsBeforeWithdrawals = getTotalAssetsBeforeWithdrawals();
uint256 denominator = totalSupply() + sharesForWithdrawal;
return denominator == 0 ? 0 : (sharesForWithdrawal * totalAssetsBeforeWithdrawals) / denominator;
}
/**
* @notice Get unallocated assets (not reserved for withdrawal)
* @return Amount of unallocated assets
*/
function getUnallocatedAssets() public view returns (uint256) {
return IERC20(asset()).balanceOf(address(this)) - _getStorage().reservedAssets;
}
/// @notice Get reserved assets for swap
function getReservedForSwap() external view returns (uint256) {
return _getStorage().reservedForSwap;
}
/// @notice Get USDT0 currently swapped
function getUsdt0CurrentlySwapped() external view returns (uint256) {
return _getStorage().usdtCurrentlySwapped;
}
/// @notice Get HYPE currently swapped
function getHypeCurrentlySwapped() external view returns (uint256) {
return _getStorage().hypeCurrentlySwapped;
}
/**
* @notice Get all withdrawal requests for a user
* @param user Address of the user
* @return Array of withdrawal requests
*/
function getUserWithdrawalRequests(address user) external view returns (WithdrawalRequest[] memory) {
return _getStorage().withdrawalRequests[user];
}
/*//////////////////////////////////////////////////////////////
PRIVATE FUNCTIONS | INTERNAL FUNCTIONS
//////////////////////////////////////////////////////////////*/
/**
* @notice Calculate withdrawal amount for a request
* @param request Withdrawal request to calculate
* @return withdrawalAmount Amount to withdraw
*/
function _calcWithdrawalAmt(WithdrawalRequest storage request) private view returns (uint256 withdrawalAmount) {
HypeStrategyStorage storage s = _getStorage();
EpochData storage epoch = s.epochs[request.epoch];
// If epoch is not finalized or there are no withdrawal shares, return 0
if (!epoch.finalized || epoch.totalWithdrawalShares == 0) {
return 0;
}
withdrawalAmount = (request.shares * epoch.actualWithdrawnAssets) / epoch.totalWithdrawalShares;
}
function _authorizeUpgrade(address newImplementation) internal override onlyRole(ADMIN_ROLE) { }
/**
* @notice Get HypeStrategy storage
* @return s Storage pointer
*/
function _getStorage() internal pure returns (HypeStrategyStorage storage s) {
bytes32 slot = HYPE_STRATEGY_STORAGE_SLOT;
assembly {
s.slot := slot
}
}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"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":[],"name":"BelowMinimumDeposit","type":"error"},{"inputs":[{"internalType":"address","name":"implementation","type":"address"}],"name":"ERC1967InvalidImplementation","type":"error"},{"inputs":[],"name":"ERC1967NonPayable","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":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint256","name":"assets","type":"uint256"},{"internalType":"uint256","name":"max","type":"uint256"}],"name":"ERC4626ExceededMaxDeposit","type":"error"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint256","name":"shares","type":"uint256"},{"internalType":"uint256","name":"max","type":"uint256"}],"name":"ERC4626ExceededMaxMint","type":"error"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"shares","type":"uint256"},{"internalType":"uint256","name":"max","type":"uint256"}],"name":"ERC4626ExceededMaxRedeem","type":"error"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"assets","type":"uint256"},{"internalType":"uint256","name":"max","type":"uint256"}],"name":"ERC4626ExceededMaxWithdraw","type":"error"},{"inputs":[],"name":"EnforcedPause","type":"error"},{"inputs":[],"name":"EpochAlreadyFinalized","type":"error"},{"inputs":[],"name":"ExpectedPause","type":"error"},{"inputs":[],"name":"FailedCall","type":"error"},{"inputs":[],"name":"InsufficientAssets","type":"error"},{"inputs":[],"name":"InsufficientBalance","type":"error"},{"inputs":[],"name":"InvalidAddress","type":"error"},{"inputs":[],"name":"InvalidEpoch","type":"error"},{"inputs":[],"name":"InvalidFeeRecipient","type":"error"},{"inputs":[],"name":"InvalidHyperCoreDestination","type":"error"},{"inputs":[],"name":"InvalidInitialization","type":"error"},{"inputs":[],"name":"InvalidMinDeposit","type":"error"},{"inputs":[],"name":"InvalidWithdrawalFee","type":"error"},{"inputs":[],"name":"NoWithdrawalRequest","type":"error"},{"inputs":[],"name":"NotAuthorized","type":"error"},{"inputs":[],"name":"NotInitializing","type":"error"},{"inputs":[],"name":"PreviousEpochNotFinalized","type":"error"},{"inputs":[],"name":"ReentrancyGuardReentrantCall","type":"error"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"SafeERC20FailedOperation","type":"error"},{"inputs":[],"name":"UUPSUnauthorizedCallContext","type":"error"},{"inputs":[{"internalType":"bytes32","name":"slot","type":"bytes32"}],"name":"UUPSUnsupportedProxiableUUID","type":"error"},{"inputs":[],"name":"ZeroAmount","type":"error"},{"inputs":[],"name":"ZeroWithdrawal","type":"error"},{"inputs":[],"name":"ZeroWithdrawalForClaim","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"address","name":"apiWallet","type":"address"},{"indexed":false,"internalType":"string","name":"apiWalletName","type":"string"}],"name":"ApiWalletAdded","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":"sender","type":"address"},{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":false,"internalType":"uint256","name":"assets","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"shares","type":"uint256"}],"name":"Deposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"epoch","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"startTime","type":"uint256"}],"name":"EpochUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint32","name":"epoch","type":"uint32"},{"indexed":false,"internalType":"uint128","name":"amount","type":"uint128"}],"name":"EpochWithdrawalsProcessed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"oldRecipient","type":"address"},{"indexed":true,"internalType":"address","name":"newRecipient","type":"address"}],"name":"FeeRecipientUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"withdrawalFee","type":"uint256"}],"name":"FeesUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"destination","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"FundsTransferred","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":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"ntl","type":"uint256"}],"name":"FundsTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint64","name":"version","type":"uint64"}],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"minDeposit","type":"uint256"}],"name":"MinDepositUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint32","name":"asset","type":"uint32"},{"indexed":false,"internalType":"uint64","name":"oid","type":"uint64"},{"indexed":false,"internalType":"uint128","name":"cloid","type":"uint128"}],"name":"OrderCancelled","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":"destination","type":"address"},{"indexed":false,"internalType":"uint64","name":"tokenId","type":"uint64"},{"indexed":false,"internalType":"uint64","name":"amount","type":"uint64"}],"name":"SpotSent","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"tokenIn","type":"address"},{"indexed":true,"internalType":"address","name":"tokenOut","type":"address"},{"indexed":false,"internalType":"uint256","name":"amountIn","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amountOut","type":"uint256"}],"name":"SwapExecuted","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":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"USDT0TransferredToCore","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"implementation","type":"address"}],"name":"Upgraded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":true,"internalType":"address","name":"receiver","type":"address"},{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":false,"internalType":"uint256","name":"assets","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"shares","type":"uint256"}],"name":"Withdraw","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"shares","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"assets","type":"uint256"}],"name":"WithdrawalClaimed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"shares","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"epoch","type":"uint256"}],"name":"WithdrawalRequested","type":"event"},{"inputs":[],"name":"ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"BOT_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":"UPGRADE_INTERFACE_VERSION","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"apiWallet","type":"address"},{"internalType":"string","name":"apiWalletName","type":"string"}],"name":"addApiWallet","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":[],"name":"asset","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint32","name":"asset","type":"uint32"},{"internalType":"uint128","name":"cloid","type":"uint128"}],"name":"cancelOrderByCloid","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint32","name":"asset","type":"uint32"},{"internalType":"uint64","name":"oid","type":"uint64"}],"name":"cancelOrderByOid","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"claimWithdrawal","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"shares","type":"uint256"}],"name":"convertToAssets","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"assets","type":"uint256"}],"name":"convertToShares","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"assets","type":"uint256"},{"internalType":"address","name":"receiver","type":"address"}],"name":"deposit","outputs":[{"internalType":"uint256","name":"shares","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getCoreReader","outputs":[{"internalType":"contract ICoreReader","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getCurrentEpoch","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint128","name":"epoch","type":"uint128"}],"name":"getEpochData","outputs":[{"components":[{"internalType":"uint32","name":"epoch","type":"uint32"},{"internalType":"uint48","name":"startTime","type":"uint48"},{"internalType":"uint48","name":"endTime","type":"uint48"},{"internalType":"uint128","name":"actualWithdrawnAssets","type":"uint128"},{"internalType":"uint256","name":"totalWithdrawalShares","type":"uint256"},{"internalType":"bool","name":"finalized","type":"bool"}],"internalType":"struct IHypeStrategy.EpochData","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getHYPEValueInUSDC","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getHypeCurrentlySwapped","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getLastFinalizedEpoch","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getPerpAccountValue","outputs":[{"internalType":"int256","name":"","type":"int256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getReservedAssets","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getReservedForSwap","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":[],"name":"getScheduledWithdrawal","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getScheduledWithdrawalAssets","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"epoch","type":"uint256"}],"name":"getScheduledWithdrawalAssets","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getTotalAssetsBeforeWithdrawals","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getUSDCHyperCoreBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getUSDTHyperCoreBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getUnallocatedAssets","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getUsdt0CurrentlySwapped","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"getUserQueuedWithdrawal","outputs":[{"internalType":"uint256","name":"shares","type":"uint256"},{"internalType":"uint256","name":"assets","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"getUserWithdrawalRequests","outputs":[{"components":[{"internalType":"uint128","name":"shares","type":"uint128"},{"internalType":"uint32","name":"epoch","type":"uint32"}],"internalType":"struct IHypeStrategy.WithdrawalRequest[]","name":"","type":"tuple[]"}],"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":[{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"symbol","type":"string"},{"internalType":"address","name":"_bot","type":"address"},{"internalType":"address","name":"_feeRecipient","type":"address"},{"internalType":"address","name":"_coreReader","type":"address"},{"internalType":"address","name":"_admin","type":"address"},{"internalType":"uint256","name":"_withdrawalFee","type":"uint256"},{"internalType":"uint256","name":"_minDeposit","type":"uint256"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"maxDeposit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"maxMint","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"maxRedeem","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"maxWithdraw","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"shares","type":"uint256"},{"internalType":"address","name":"receiver","type":"address"}],"name":"mint","outputs":[{"internalType":"uint256","name":"assets","type":"uint256"}],"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":"uint32","name":"asset","type":"uint32"},{"internalType":"bool","name":"isBuy","type":"bool"},{"internalType":"uint64","name":"pxE8","type":"uint64"},{"internalType":"uint64","name":"szE8","type":"uint64"},{"internalType":"bool","name":"reduceOnly","type":"bool"},{"internalType":"uint8","name":"tif","type":"uint8"},{"internalType":"uint128","name":"cloid","type":"uint128"}],"name":"placeLimitOrder","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"assets","type":"uint256"}],"name":"previewDeposit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"shares","type":"uint256"}],"name":"previewMint","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"shares","type":"uint256"}],"name":"previewRedeem","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"assets","type":"uint256"}],"name":"previewWithdraw","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint32","name":"_epoch","type":"uint32"},{"internalType":"uint128","name":"_withdrawalAmount","type":"uint128"},{"internalType":"uint128","name":"_treasuryAssets","type":"uint128"}],"name":"processEpochAndNotify","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"proxiableUUID","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"redeem","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"callerConfirmation","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint128","name":"shares","type":"uint128"}],"name":"requestWithdrawal","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","name":"_admin","type":"address"}],"name":"setAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint64","name":"_minDeposit","type":"uint64"}],"name":"setMinDeposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint128","name":"_swapAmount","type":"uint128"}],"name":"setSwapAmount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"destination","type":"address"},{"internalType":"uint64","name":"tokenId","type":"uint64"},{"internalType":"uint64","name":"weiAmt","type":"uint64"}],"name":"spotSend","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"destination","type":"address"},{"internalType":"uint64","name":"tokenId","type":"uint64"},{"internalType":"uint64","name":"weiAmt","type":"uint64"},{"internalType":"bool","name":"_reserverForWithdrawal","type":"bool"}],"name":"spotSend","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amountInHype","type":"uint256"},{"internalType":"uint128","name":"_minUSDT0Out","type":"uint128"},{"internalType":"bool","name":"_forWithdrawalReserve","type":"bool"}],"name":"swapExactHypeToUSDT0","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint128","name":"_maxUSDT0In","type":"uint128"},{"internalType":"uint256","name":"_amountOutHype","type":"uint256"}],"name":"swapUSDT0ForExactHype","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalAssets","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":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"transferUSDT0ToCore","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint128","name":"_amountToSwap","type":"uint128"}],"name":"updateEpoch","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_feeRecipient","type":"address"}],"name":"updateFeeRecipient","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint32","name":"_withdrawalFee","type":"uint32"}],"name":"updateFees","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newImplementation","type":"address"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"upgradeToAndCall","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint64","name":"ntl","type":"uint64"},{"internalType":"bool","name":"toPerp","type":"bool"}],"name":"usdClassTransfer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"withdraw","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"}]Contract Creation Code
60a060405230608052348015610013575f5ffd5b5061001c610029565b610024610029565b6100db565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805468010000000000000000900460ff16156100795760405163f92ee8a960e01b815260040160405180910390fd5b80546001600160401b03908116146100d85780546001600160401b0319166001600160401b0390811782556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50565b6080516159be6101015f395f81816139620152818161398b0152613ad001526159be5ff3fe6080604052600436106103e0575f3560e01c80639068cf0a11610205578063c6e6f59211610116578063deb88f43116100a4578063deb88f4314610bc9578063dfccd8e514610bdd578063e0336f4514610bfc578063e04a499014610c10578063e0f7bf5b14610c2f578063e840746b14610c4e578063ea051eff14610c6d578063ef8b30f714610aa9578063f160d36914610ca1578063fff1fb6e14610cc0575f5ffd5b8063c6e6f59214610aa9578063c8c3c6b614610ac8578063c99d682f14610ae7578063ce96cb7714610b06578063d148b81a14610b25578063d547741f14610b39578063d813746a14610b58578063d8481bd614610b77578063d905777e14610b8b578063dd62ed3e14610baa575f5ffd5b8063b150377411610193578063b1503774146109d1578063b3d7f6b9146109f1578063b460af9414610a10578063b7bb785f14610a2f578063b97dd9e214610a43578063b9ba6a3c14610a57578063ba08765214610a10578063ba9ed9f714610a76578063c63d75b61461062a578063c6e2973614610a8a575f5ffd5b80639068cf0a1461089757806391d14854146108b657806394bf804d146108d557806395d89b41146108f457806397a236ad146109085780639ff10ff414610931578063a217fddf14610950578063a3066aab14610963578063a9059cbb14610982578063ad3cb1cc146109a1575f5ffd5b8063402d267d116102ff5780636640e50d1161028d5780636640e50d1461077457806366ac5e14146107885780636c9302281461079c5780636ca4410d146107c85780636e553f65146107e7578063704b6c021461080657806370a0823114610825578063737870851461084457806375b238fc146108635780638456cb5914610883575f5ffd5b8063402d267d1461062a578063435354d3146106495780634cdad5061461045b5780634f017f32146106685780634f1ef286146106f257806352d1902d146107055780635a0874f9146107195780635a8b2b8e146107385780635bfaf16d1461074c5780635c975abb14610760575f5ffd5b806318160ddd1161037c57806318160ddd1461050c57806323b872dd14610520578063248a9ca31461053f5780632b28b28f1461055e5780632f2ff15d1461057d578063313ce5671461059c57806336568abe146105c257806338d52e0f146105e157806338e7531d146106025780633f4ba83a14610616575f5ffd5b806301e1d114146103e457806301ffc9a71461040b57806306fdde031461043a57806307a2d13a1461045b578063095ea7b31461047a5780630a28a477146104995780630b982273146104b85780630c5058e4146104cc578063152986af146104ed575b5f5ffd5b3480156103ef575f5ffd5b506103f8610cd4565b6040519081526020015b60405180910390f35b348015610416575f5ffd5b5061042a610425366004614b49565b610d39565b6040519015158152602001610402565b348015610445575f5ffd5b5061044e610d6f565b6040516104029190614b9e565b348015610466575f5ffd5b506103f8610475366004614bb0565b610e0d565b348015610485575f5ffd5b5061042a610494366004614be2565b610e18565b3480156104a4575f5ffd5b506103f86104b3366004614bb0565b610e2f565b3480156104c3575f5ffd5b506103f8610e3b565b3480156104d7575f5ffd5b506104eb6104e6366004614c33565b610e92565b005b3480156104f8575f5ffd5b506104eb610507366004614c87565b6111e5565b348015610517575f5ffd5b506103f861124e565b34801561052b575f5ffd5b5061042a61053a366004614ccd565b611262565b34801561054a575f5ffd5b506103f8610559366004614bb0565b611287565b348015610569575f5ffd5b506104eb610578366004614d07565b6112a5565b348015610588575f5ffd5b506104eb610597366004614d83565b611329565b3480156105a7575f5ffd5b506105b0611345565b60405160ff9091168152602001610402565b3480156105cd575f5ffd5b506104eb6105dc366004614d83565b61136e565b3480156105ec575f5ffd5b506105f56113a6565b6040516104029190614dad565b34801561060d575f5ffd5b506103f86113c0565b348015610621575f5ffd5b506104eb61145f565b348015610635575f5ffd5b506103f8610644366004614dc1565b6114bf565b348015610654575f5ffd5b506104eb610663366004614dda565b6114c5565b348015610673575f5ffd5b50610687610682366004614e02565b61155b565b60405161040291905f60c08201905063ffffffff835116825265ffffffffffff602084015116602083015265ffffffffffff604084015116604083015260018060801b0360608401511660608301526080830151608083015260a0830151151560a083015292915050565b6104eb610700366004614ea4565b611635565b348015610710575f5ffd5b506103f8611654565b348015610724575f5ffd5b506104eb610733366004614e02565b61166f565b348015610743575f5ffd5b506103f86116b4565b348015610757575f5ffd5b506103f8611742565b34801561076b575f5ffd5b5061042a61185a565b34801561077f575f5ffd5b506103f861186e565b348015610793575f5ffd5b506105f5611880565b3480156107a7575f5ffd5b506107bb6107b6366004614dc1565b61189b565b6040516104029190614f01565b3480156107d3575f5ffd5b506104eb6107e2366004614e02565b611931565b3480156107f2575f5ffd5b506103f8610801366004614d83565b611c1a565b348015610811575f5ffd5b506104eb610820366004614dc1565b611ca0565b348015610830575f5ffd5b506103f861083f366004614dc1565b611ce5565b34801561084f575f5ffd5b506104eb61085e366004614f7c565b611d0e565b34801561086e575f5ffd5b506103f85f5160206159295f395f51905f5281565b34801561088e575f5ffd5b506104eb612018565b3480156108a2575f5ffd5b506104eb6108b1366004615032565b612076565b3480156108c1575f5ffd5b5061042a6108d0366004614d83565b612120565b3480156108e0575f5ffd5b506103f86108ef366004614d83565b612154565b3480156108ff575f5ffd5b5061044e6121d7565b348015610913575f5ffd5b5061091c6121f3565b60405163ffffffff9091168152602001610402565b34801561093c575f5ffd5b506103f861094b366004615058565b612208565b34801561095b575f5ffd5b506103f85f81565b34801561096e575f5ffd5b506104eb61097d366004614dc1565b612450565b34801561098d575f5ffd5b5061042a61099c366004614be2565b612734565b3480156109ac575f5ffd5b5061044e604051806040016040528060058152602001640352e302e360dc1b81525081565b3480156109dc575f5ffd5b506103f85f5160206159695f395f51905f5281565b3480156109fc575f5ffd5b506103f8610a0b366004614bb0565b612741565b348015610a1b575f5ffd5b506103f8610a2a36600461508a565b61274d565b348015610a3a575f5ffd5b506103f8612794565b348015610a4e575f5ffd5b506103f86127d8565b348015610a62575f5ffd5b506104eb610a713660046150ba565b6127f6565b348015610a81575f5ffd5b506103f861287f565b348015610a95575f5ffd5b506104eb610aa4366004614e02565b612915565b348015610ab4575f5ffd5b506103f8610ac3366004614bb0565b612b2f565b348015610ad3575f5ffd5b506104eb610ae23660046150ef565b612b3a565b348015610af2575f5ffd5b506104eb610b0136600461510a565b612bc4565b348015610b11575f5ffd5b506103f8610b20366004614dc1565b612c46565b348015610b30575f5ffd5b506103f8612c59565b348015610b44575f5ffd5b506104eb610b53366004614d83565b612c7b565b348015610b63575f5ffd5b506103f8610b72366004614bb0565b612c97565b348015610b82575f5ffd5b506103f8612d41565b348015610b96575f5ffd5b506103f8610ba5366004614dc1565b612d53565b348015610bb5575f5ffd5b506103f8610bc436600461519a565b612d5d565b348015610bd4575f5ffd5b506103f8612d97565b348015610be8575f5ffd5b506104eb610bf73660046151c2565b612eb6565b348015610c07575f5ffd5b506103f8612f3b565b348015610c1b575f5ffd5b506104eb610c2a366004614bb0565b612f5a565b348015610c3a575f5ffd5b506104eb610c493660046151ee565b612fe4565b348015610c59575f5ffd5b506103f8610c68366004615245565b6130ed565b348015610c78575f5ffd5b50610c8c610c87366004614dc1565b613298565b60408051928352602083019190915201610402565b348015610cac575f5ffd5b506104eb610cbb366004614dc1565b6133e1565b348015610ccb575f5ffd5b506103f861347e565b5f5f610cde611742565b90505f610ce961186e565b90505f81610cf561124e565b610cff9190615273565b90505f5f8211610d0f575f610d24565b81610d1a8585615286565b610d2491906152b1565b9050610d3081856152c4565b94505050505090565b5f6001600160e01b03198216637965db0b60e01b1480610d6957506301ffc9a760e01b6001600160e01b03198316145b92915050565b60605f610d7a613499565b9050806003018054610d8b906152d7565b80601f0160208091040260200160405190810160405280929190818152602001828054610db7906152d7565b8015610e025780601f10610dd957610100808354040283529160200191610e02565b820191905f5260205f20905b815481529060010190602001808311610de557829003601f168201915b505050505091505090565b5f610d69825f6134bd565b5f33610e258185856134fa565b5060019392505050565b5f610d69826001613507565b5f5f610e4561186e565b90505f610e50611742565b90505f82610e5c61124e565b610e669190615273565b90508015610e885780610e798385615286565b610e8391906152b1565b610e8a565b5f5b935050505090565b5f5160206159695f395f51905f52610ea98161353b565b5f610eb2613545565b9050610ebc613569565b8154610ed890600160201b90046001600160801b03168661530f565b6001600160801b03161115610f00576040516396d8043360e01b815260040160405180910390fd5b6001610f0a6127d8565b610f1491906152c4565b8563ffffffff1614610f395760405163d5b25b6360e01b815260040160405180910390fd5b5f816004018663ffffffff1681548110610f5557610f5561532e565b5f91825260209091206004840154600390920201915015610fb1576004820154610f81906001906152c4565b63ffffffff168663ffffffff1610610fac5760405163d5b25b6360e01b815260040160405180910390fd5b610fd6565b63ffffffff861615610fd65760405163d5b25b6360e01b815260040160405180910390fd5b600281015460ff1615610ffc57604051630cd9898f60e21b815260040160405180910390fd5b6001600160801b038416156110c5576110333330866001600160801b03166110226113a6565b6001600160a01b03169291906135dc565b815484908390600490611057908490600160201b90046001600160801b031661530f565b92506101000a8154816001600160801b0302191690836001600160801b0316021790555083815f0160108282829054906101000a90046001600160801b03166110a0919061530f565b92506101000a8154816001600160801b0302191690836001600160801b031602179055505b815463ffffffff191663ffffffff87161782558054859082906010906110fc908490600160801b90046001600160801b031661530f565b92506101000a8154816001600160801b0302191690836001600160801b031602179055508060010154826003015f82825461113791906152c4565b9091555050815485908390600490611160908490600160201b90046001600160801b031661530f565b82546101009290920a6001600160801b038181021990931691831602179091556002838101805460ff191660019081179091555f90860181905590850155604051908716815263ffffffff881691507f5202080a63d65f360b8e184fda191173dee5658280e885e5713a040ee6f3fc8e906020015b60405180910390a2505050505050565b5f5160206159695f395f51905f526111fc8161353b565b604080516001600160a01b03861660208201526001600160401b03808616928201929092529083166060820152611248906006906080015b604051602081830303815290604052613643565b50505050565b5f5f611258613499565b6002015492915050565b5f3361126f8582856136d9565b61127a858585613724565b60019150505b9392505050565b5f5f611291613781565b5f9384526020525050604090206001015490565b5f5160206159695f395f51905f526112bc8161353b565b6112d660098585856040516020016112349392919061536a565b836001600160a01b0316336001600160a01b03167feb3129a9a680ca7fe98cb9d14a47fa51cbaac0dd96f7d56b07ef7898eba5d514858560405161131b92919061538e565b60405180910390a350505050565b61133282611287565b61133b8161353b565b61124883836137a5565b5f5f61134f613843565b90505f81546113689190600160a01b900460ff166153a1565b91505090565b6001600160a01b03811633146113975760405163334bd91960e11b815260040160405180910390fd5b6113a18282613867565b505050565b5f5f6113b0613843565b546001600160a01b031692915050565b5f5f6113ca6138dd565b60048082015460405163a69610d160e01b81529293505f926001600160a01b039091169163a69610d1916114029130918691016153ba565b606060405180830381865afa15801561141d573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061144191906153dc565b516001600160401b031690506114586064826152b1565b9250505090565b6114765f5160206159295f395f51905f5233612120565b15801561149757506114955f5160206159695f395f51905f5233612120565b155b156114b55760405163ea8e4eb560e01b815260040160405180910390fd5b6114bd613901565b565b505f1990565b5f5160206159695f395f51905f526114dc8161353b565b6040805163ffffffff851660208201526001600160801b0384169181019190915261150c90600b90606001611234565b8263ffffffff16336001600160a01b03167f310114285d26ecbdaa7df8aeb9387855fe707acc16b6a015104ec1813093a08e5f8560405161154e92919061544d565b60405180910390a3505050565b6040805160c0810182525f80825260208201819052918101829052606081018290526080810182905260a0810191909152611594613545565b6004018263ffffffff16815481106115ae576115ae61532e565b5f9182526020918290206040805160c081018252600393909302909101805463ffffffff81168452600160201b810465ffffffffffff90811695850195909552600160501b810490941691830191909152600160801b9092046001600160801b031660608201526001820154608082015260029091015460ff16151560a082015292915050565b61163d613957565b611646826139fb565b6116508282613a12565b5050565b5f61165d613ac5565b505f5160206159095f395f51905f5290565b5f5160206159695f395f51905f526116868161353b565b8161168f613545565b60010180546001600160801b0319166001600160801b03929092169190911790555050565b5f5f6116be6138dd565b600481810154604051634a27d29360e11b81525f92810183905230602482015292935090916001600160a01b039091169063944fa52690604401608060405180830381865afa158015611713573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906117379190615480565b5160070b9392505050565b5f5f61174c6113a6565b6001600160a01b03166370a08231306040518263ffffffff1660e01b81526004016117779190614dad565b602060405180830381865afa158015611792573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906117b69190615500565b90505f6117c1613545565b80549091505f906117e290600160201b90046001600160801b0316846152c4565b90505f6117ed6116b4565b90505f6117f8612d97565b90505f6118036113c0565b90505f61180e612794565b90505f84828461181e878a615517565b6118289190615517565b6118329190615517565b61183c9190615517565b90505f811361184b575f61184d565b805b9850505050505050505090565b5f5f611864613b0e565b5460ff1692915050565b5f611877613545565b60030154905090565b5f6118896138dd565b600401546001600160a01b0316919050565b60606118a5613545565b6001600160a01b0383165f9081526005919091016020908152604080832080548251818502810185019093528083529193909284015b82821015611926575f84815260209081902060408051808201909152908401546001600160801b0381168252600160801b900463ffffffff16818301528252600190920191016118db565b505050509050919050565b611939613b32565b611941613b67565b806001600160801b03165f0361196a57604051630318014360e61b815260040160405180910390fd5b5f611973613545565b600481015490915033905f9061198b906001906152c4565b90506119a082856001600160801b0316613b8d565b6001600160a01b0382165f90815260058401602052604081205490819003611a3a576001600160a01b0383165f908152600585016020908152604080832081518083019092526001600160801b03808a16835263ffffffff80881684860190815283546001810185559387529490952092519290910180549351909416600160801b026001600160a01b0319909316911617179055611b4f565b6001600160a01b0383165f9081526005850160205260408120611a5e6001846152c4565b81548110611a6e57611a6e61532e565b5f918252602090912001805490915063ffffffff808516600160801b909204161015611b0c576001600160a01b0384165f908152600586016020908152604080832081518083019092526001600160801b03808b16835263ffffffff80891684860190815283546001810185559387529490952092519290910180549351909416600160801b026001600160a01b0319909316911617179055611b4d565b8054869082905f90611b289084906001600160801b031661530f565b92506101000a8154816001600160801b0302191690836001600160801b031602179055505b505b846001600160801b0316846004018363ffffffff1681548110611b7457611b7461532e565b905f5260205f2090600302016001015f828254611b919190615273565b92505081905550846001600160801b0316846003015f828254611bb49190615273565b9091555050604080516001600160801b038716815263ffffffff841660208201526001600160a01b038516917f24b91f4f47caf44230a57777a9be744924e82bf666f2d5702faf97df35e60f9f910160405180910390a250505050611c17613bc1565b50565b5f611c23613b32565b611c2b613b67565b5f611c346138dd565b90506001600160a01b038316611c5d5760405163e6c4247b60e01b815260040160405180910390fd5b60038101546001600160801b0316841015611c8b57604051632ddf431160e11b815260040160405180910390fd5b611c958484613bd1565b915050610d69613bc1565b5f5160206159295f395f51905f52611cb78161353b565b81611cc06138dd565b60020180546001600160a01b0319166001600160a01b03929092169190911790555050565b5f5f611cef613499565b6001600160a01b039093165f9081526020939093525050604090205490565b5f611d17613c25565b805490915060ff600160401b82041615906001600160401b03165f81158015611d3d5750825b90505f826001600160401b03166001148015611d585750303b155b905081158015611d66575080155b15611d845760405163f92ee8a960e01b815260040160405180910390fd5b845467ffffffffffffffff191660011785558315611dae57845460ff60401b1916600160401b1785555b611dc45f5160206158e95f395f51905f52613c49565b611dcc613c5a565b611dd68d8d613c62565b6001600160a01b038816611dfd5760405163e6c4247b60e01b815260040160405180910390fd5b6001600160a01b038b16611e245760405163e6c4247b60e01b815260040160405180910390fd5b6001600160a01b038a16611e4b5760405163e6c4247b60e01b815260040160405180910390fd5b633b9aca00861115611e7057604051634f4940eb60e11b815260040160405180910390fd5b6101f4871115611e9357604051636be2692760e11b815260040160405180910390fd5b611ea18b8b8b8b8b8b613c74565b5f611eaa613545565b6040805160c0810182525f80825265ffffffffffff4281166020808501918252948401838152606085018481526080860185815260a0870186815260048a0180546001818101835591895299882098516003909a0290980180549551945193516001600160801b03908116600160801b02948816600160501b02166001600160501b0395909716600160201b026001600160501b031990961663ffffffff9a909a169990991794909417929092169390931792909217855590519284019290925590516002909201805492151560ff1990931692909217909155909150611f91908a6137a5565b50611fa95f5160206159295f395f51905f528a6137a5565b50611fc15f5160206159695f395f51905f528d6137a5565b5050831561200957845460ff60401b19168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50505050505050505050505050565b61202f5f5160206159295f395f51905f5233612120565b158015612050575061204e5f5160206159695f395f51905f5233612120565b155b1561206e5760405163ea8e4eb560e01b815260040160405180910390fd5b6114bd613d2f565b5f5160206159295f395f51905f5261208d8161353b565b6101f48263ffffffff1611156120b657604051636be2692760e11b815260040160405180910390fd5b5f6120bf6138dd565b60028101805463ffffffff60a01b1916600160a01b63ffffffff8716908102919091179091556040519081529091507f9fe6eeb0f0541c644a56c67efeb872dbadd803a60b909d7dde1b35a3fe230b0e9060200160405180910390a1505050565b5f5f61212a613781565b5f948552602090815260408086206001600160a01b03959095168652939052505090205460ff1690565b5f61215d613b32565b612165613b67565b5f61216e6138dd565b90506001600160a01b0383166121975760405163e6c4247b60e01b815260040160405180910390fd5b60038101546001600160801b03166121ae85612741565b10156121cd57604051632ddf431160e11b815260040160405180910390fd5b611c958484613d75565b60605f6121e2613499565b9050806004018054610d8b906152d7565b5f6121fc613545565b5463ffffffff16919050565b5f5f5160206159695f395f51905f526122208161353b565b612228613b67565b612230613b32565b6040516370a0823160e01b815285905f5160206159495f395f51905f52906370a0823190612262903090600401614dad565b602060405180830381865afa15801561227d573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906122a19190615500565b10156122c0576040516396d8043360e01b815260040160405180910390fd5b5f6122c9613545565b90506122f75f5160206159495f395f51905f52736d99e7f6747af2cdbb5164b6dd50e40d4fde1e7788613dc1565b5f61232a5f5160206159495f395f51905f525f5160206158e95f395f51905f5289896001600160801b03166101f4613e51565b9050808260010160108282829054906101000a90046001600160801b0316612352919061530f565b92506101000a8154816001600160801b0302191690836001600160801b03160217905550866001600160801b0316826002015f8282546123929190615273565b909155505084156123e6578154819083906004906123c1908490600160201b90046001600160801b031661530f565b92506101000a8154816001600160801b0302191690836001600160801b031602179055505b60408051888152602081018390525f5160206158e95f395f51905f52915f5160206159495f395f51905f52917fdd36740e2a012d93061a0d99eaa9107860955de4e90027d3cf465a055026c407910160405180910390a3925050612448613bc1565b509392505050565b612458613b32565b5f612461613545565b90505f61246c6138dd565b6001600160a01b0384165f908152600584016020526040812080549293509190036124aa5760405163a07ef18360e01b815260040160405180910390fd5b80545f9081905b806124bb8161553e565b915050856004018482815481106124d4576124d461532e565b5f918252602090912001548154600160801b90910463ffffffff169081106124fe576124fe61532e565b5f91825260209091206002600390920201015460ff16156125a45761253b84828154811061252e5761252e61532e565b905f5260205f2001613f70565b6125459084615273565b92508381815481106125595761255961532e565b5f91825260209091200154612577906001600160801b031683615273565b915083818154811061258b5761258b61532e565b5f91825260209091200180546001600160a01b03191690555b5f81116124b157825f036125cb5760405163898b3b5d60e01b815260040160405180910390fd5b83541580159061260c5750835484906125e6906001906152c4565b815481106125f6576125f661532e565b5f918252602090912001546001600160801b0316155b15612646578380548061262157612621615553565b5f8281526020902081015f1990810180546001600160a01b03191690550190556125cb565b85548390879060049061266a908490600160201b90046001600160801b0316615567565b92506101000a8154816001600160801b0302191690836001600160801b031602179055505f61269884614014565b60018701549091506126c6906001600160a01b0316826126b66113a6565b6001600160a01b03169190614055565b5f6126d182866152c4565b90506126e089826126b66113a6565b60408051858152602081018390526001600160a01b038b16917f2d43eb174787155132b52ddb6b346e2dca99302eac3df4466dbeff953d3c84d1910160405180910390a25050505050505050611c17613bc1565b5f33610e25818585613724565b5f610d698260016134bd565b60405162461bcd60e51b8152602060048201526015602482015274155cd9481c995c5d595cdd15da5d1a191c985dd85b605a1b60448201525f906064015b60405180910390fd5b5f5f61279e6138dd565b60048082015460405163a69610d160e01b81529293505f926001600160a01b039091169163a69610d19161140291309161010c91016153ba565b5f60016127e3613545565b600401546127f191906152c4565b905090565b5f5160206159695f395f51905f5261280d8161353b565b6040805163ffffffff851660208201526001600160401b0384169181019190915261283d90600a90606001611234565b8263ffffffff16336001600160a01b03167f310114285d26ecbdaa7df8aeb9387855fe707acc16b6a015104ec1813093a08e845f60405161154e92919061544d565b5f612888613545565b54600160201b90046001600160801b03166128a16113a6565b6001600160a01b03166370a08231306040518263ffffffff1660e01b81526004016128cc9190614dad565b602060405180830381865afa1580156128e7573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061290b9190615500565b6127f191906152c4565b5f5160206159695f395f51905f5261292c8161353b565b5f612935613545565b90505f6129406127d8565b90505f4290505f83600401838154811061295c5761295c61532e565b5f9182526020909120600390910201805465ffffffffffff60501b1916600160501b65ffffffffffff851602178155905082158015906129ce5750600484016129a66001856152c4565b815481106129b6576129b661532e565b5f91825260209091206002600390920201015460ff16155b156129ec57604051630a34cd9f60e41b815260040160405180910390fd5b836004016040518060c00160405280856001612a089190615273565b63ffffffff908116825265ffffffffffff8087166020808501919091525f60408086018290526060808701839052608080880184905260a0978801849052895460018181018c559a85528585208a516003909202018054968b0151948b0151938b01516001600160801b03908116600160801b02948916600160501b0281166001600160501b0396909916600160201b026001600160501b03199098169290991691909117959095179290921694909417939093178255918501518187015593909201516002938401805491151560ff1990921691909117905589168784015590860155612af7908490615273565b60405165ffffffffffff421681527fabb37912485bfb13380247be2f4101619759991c9a13ef282eeb05108378b579906020016111d5565b5f610d69825f613507565b5f5160206159295f395f51905f52612b518161353b565b816001600160401b0316612b636138dd565b60030180546001600160801b0319166001600160801b03929092169190911790556040516001600160401b03831681527f96a008f96f1c0ab9fa3d9ddd43cdfc614848c4d054d51f43662ed900e9d094c89060200160405180910390a15050565b5f5160206159695f395f51905f52612bdb8161353b565b6040805163ffffffff8a166020820152881515918101919091526001600160401b0380881660608301528616608082015284151560a082015260ff841660c08201526001600160801b03831660e0820152612c3c9060019061010001611234565b5050505050505050565b5f610d69612c5383611ce5565b5f6134bd565b5f612c62613545565b60010154600160801b90046001600160801b0316919050565b612c8482611287565b612c8d8161353b565b6112488383613867565b5f612ca06127d8565b821115612cc05760405163d5b25b6360e01b815260040160405180910390fd5b5f612cc9613545565b6004018363ffffffff1681548110612ce357612ce361532e565b905f5260205f2090600302016001015490505f612cfe611742565b90505f82612d0a61124e565b612d149190615273565b90508015612d365780612d278385615286565b612d3191906152b1565b612d38565b5f5b95945050505050565b5f612d4a613545565b60020154905090565b5f610d6982611ce5565b5f5f612d67613499565b6001600160a01b039485165f90815260019190910160209081526040808320959096168252939093525050205490565b5f5f612da16138dd565b60048181015460405163c0f0f5ef60e01b8152609f928101929092529192505f916001600160a01b03169063c0f0f5ef90602401602060405180830381865afa158015612df0573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612e149190615586565b6001600160401b031690505f5f5160206159495f395f51905f526001600160a01b03166370a08231306040518263ffffffff1660e01b8152600401612e599190614dad565b602060405180830381865afa158015612e74573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612e989190615500565b9050662386f26fc10000612eac8383615286565b610e8a91906152b1565b5f5160206159695f395f51905f52612ecd8161353b565b604080516001600160401b038516602082015283151591810191909152612ef990600790606001611234565b604080515f8082526001600160401b03861660208301529133917fbd8ba14b7834d50f4d38587359558952e7e638273e9c027fbfa7d41b364e9825910161154e565b5f612f44613545565b54600160201b90046001600160801b0316919050565b5f5160206159695f395f51905f52612f718161353b565b612f7961287f565b821115612f99576040516396d8043360e01b815260040160405180910390fd5b612fa28261407b565b60405182815261010c6001609d1b01907f8c9a4f13b67cb64d7c6aa1ae0c9bf07694af521a28b93e7060020810ab4bc59f906020015b60405180910390a25050565b612fec613b67565b5f5160206159695f395f51905f526130038161353b565b5f61300c613545565b90506001600160a01b03861661010c6001609d1b011461303f57604051630269316560e31b815260040160405180910390fd5b61304a8686866111e5565b82156130a25780546001600160401b03851690829060049061307d908490600160201b90046001600160801b031661530f565b92506101000a8154816001600160801b0302191690836001600160801b031602179055505b604080516001600160401b038088168252861660208201526001600160a01b038816917ff8b12d4095105942d7fcab8c9a49741e2c5f2ea4fffa95d8ea3465811e1fd32891016111d5565b5f5f5160206159695f395f51905f526131058161353b565b61310d613b67565b613115613b32565b836001600160801b031661312761287f565b1015613146576040516396d8043360e01b815260040160405180910390fd5b5f61314f613545565b90506131865f5160206158e95f395f51905f52736d99e7f6747af2cdbb5164b6dd50e40d4fde1e776001600160801b038816613dc1565b5f6131b95f5160206158e95f395f51905f525f5160206159495f395f51905f5287896001600160801b03166101f46141ce565b9050808260010160108282829054906101000a90046001600160801b03166131e1919061530f565b92506101000a8154816001600160801b0302191690836001600160801b03160217905550846001600160801b0316826002015f8282546132219190615273565b909155505060408051828152602081018790525f5160206159495f395f51905f52915f5160206158e95f395f51905f52917fdd36740e2a012d93061a0d99eaa9107860955de4e90027d3cf465a055026c407910160405180910390a36001600160801b0316925050613291613bc1565b5092915050565b5f5f5f6132a3613545565b6001600160a01b0385165f9081526005820160205260408120805492935091819081036132d857505f96879650945050505050565b82545b806132e58161553e565b9150508381815481106132fa576132fa61532e565b5f918252602090912001546001600160801b0316156133cd57846004018482815481106133295761332961532e565b5f918252602090912001548154600160801b90910463ffffffff169081106133535761335361532e565b5f91825260209091206002600390920201015460ff16156133cd575f61338485838154811061252e5761252e61532e565b905080156133cb576133968184615273565b92508482815481106133aa576133aa61532e565b5f918252602090912001546133c8906001600160801b031685615273565b93505b505b5f81116132db575090969095509350505050565b5f5160206159295f395f51905f526133f88161353b565b6001600160a01b03821661341f57604051630ed1b8b360e31b815260040160405180910390fd5b5f6134286138dd565b6001810180546001600160a01b038681166001600160a01b031983168117909355604051939450169182907faaebcf1bfa00580e41d966056b48521fa9f202645c86d4ddf28113e617c1b1d3905f90a350505050565b5f613487613545565b600101546001600160801b0316919050565b7f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace0090565b5f6112806134c9610cd4565b6134d4906001615273565b6134df5f600a615684565b6134e761124e565b6134f19190615273565b859190856142a2565b6113a183838360016142e4565b5f61128061351682600a615684565b61351e61124e565b6135289190615273565b613530610cd4565b6134f1906001615273565b611c1781336143c5565b7f76934c1406b8ac7d50d9b396bab4cebc7c7ad3ef4d39b66a41a1ce5d42c7560090565b5f6135726113a6565b6001600160a01b03166370a08231306040518263ffffffff1660e01b815260040161359d9190614dad565b602060405180830381865afa1580156135b8573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906127f19190615500565b6040516001600160a01b0384811660248301528381166044830152606482018390526112489186918216906323b872dd906084015b604051602081830303815290604052915060e01b6020820180516001600160e01b0383818316178352505050506143f0565b5f600160f81b8360e81b83604051602001613660939291906156a9565b60408051601f19818403018152908290526317938e1360e01b82529150733333333333333333333333333333333333333333906317938e13906136a7908490600401614b9e565b5f604051808303815f87803b1580156136be575f5ffd5b505af11580156136d0573d5f5f3e3d5ffd5b50505050505050565b5f6136e48484612d5d565b90505f19811015611248578181101561371657828183604051637dc7a0d960e11b815260040161278b939291906156d4565b61124884848484035f6142e4565b6001600160a01b03831661374d575f604051634b637e8f60e11b815260040161278b9190614dad565b6001600160a01b038216613776575f60405163ec442f0560e01b815260040161278b9190614dad565b6113a1838383614453565b7f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b62680090565b5f5f6137af613781565b90506137bb8484612120565b61383a575f848152602082815260408083206001600160a01b03871684529091529020805460ff191660011790556137f03390565b6001600160a01b0316836001600160a01b0316857f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a46001915050610d69565b5f915050610d69565b7f0773e532dfede91f04b12a73d3d2acd361424f41f76b4fb79f090161e36b4e0090565b5f5f613871613781565b905061387d8484612120565b1561383a575f848152602082815260408083206001600160a01b0387168085529252808320805460ff1916905551339287917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a46001915050610d69565b7fe0361f59bd9cb7de6e2df4e9f3769c8d558e574a126af4e98958733da1cb980090565b613909614568565b5f613912613b0e565b805460ff1916815590507f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b60405161394c9190614dad565b60405180910390a150565b306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614806139dd57507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166139d15f5160206159095f395f51905f52546001600160a01b031690565b6001600160a01b031614155b156114bd5760405163703e46dd60e11b815260040160405180910390fd5b5f5160206159295f395f51905f526116508161353b565b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015613a6c575060408051601f3d908101601f19168201909252613a6991810190615500565b60015b613a8b5781604051634c9c8ce360e01b815260040161278b9190614dad565b5f5160206159095f395f51905f528114613abb57604051632a87526960e21b81526004810182905260240161278b565b6113a1838361458d565b306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146114bd5760405163703e46dd60e11b815260040160405180910390fd5b7fcd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f0330090565b5f613b3b6145e2565b805490915060011901613b6157604051633ee5aeb560e01b815260040160405180910390fd5b60029055565b613b6f61185a565b156114bd5760405163d93c066560e01b815260040160405180910390fd5b6001600160a01b038216613bb6575f604051634b637e8f60e11b815260040161278b9190614dad565b611650825f83614453565b5f613bca6145e2565b6001905550565b5f5f613bdc836114bf565b905080841115613c0557828482604051633c8097d960e11b815260040161278b939291906156d4565b5f613c0f85612b2f565b9050613c1d33858784614606565b949350505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0090565b613c51614671565b611c1781614696565b6114bd614671565b613c6a614671565b6116508282614703565b613c7c614671565b613c84613c5a565b613c8c614733565b613c94614743565b5f613c9d6138dd565b80546001600160a01b039889166001600160a01b0319918216178255600182018054988a16988216989098179097556004810180549689169690971695909517909555600284018054600390950180546001600160801b0319166001600160401b039093169290921790915563ffffffff909116600160a01b026001600160c01b031990931691909416171790915550565b613d37613b67565b5f613d40613b0e565b805460ff1916600117815590507f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861393f3390565b5f5f613d80836114bf565b905080841115613da95782848260405163284ff66760e01b815260040161278b939291906156d4565b5f613db385612741565b9050613c1d33858388614606565b5f836001600160a01b031663095ea7b38484604051602401613de49291906156f5565b604051602081830303815290604052915060e01b6020820180516001600160e01b0383818316178352505050509050613e1d8482614753565b61124857613e4784856001600160a01b031663095ea7b3865f6040516024016136119291906156f5565b61124884826143f0565b5f835f03613e7257604051631f2a200560e01b815260040160405180910390fd5b6001600160a01b0386161580613e8f57506001600160a01b038516155b15613ead5760405163e6c4247b60e01b815260040160405180910390fd5b6040805160e0810182526001600160a01b0380891682528716602082015262ffffff8416818301523060608201526080810186905260a081018590525f60c082015290516304e45aaf60e01b8152736d99e7f6747af2cdbb5164b6dd50e40d4fde1e77906304e45aaf90613f2590849060040161570e565b6020604051808303815f875af1158015613f41573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190613f659190615500565b979650505050505050565b5f5f613f7a613545565b83546004820180549293505f929091600160801b900463ffffffff16908110613fa557613fa561532e565b5f9182526020909120600390910201600281015490915060ff161580613fcd57506001810154155b15613fdb57505f9392505050565b600181015481548554614001916001600160801b03600160801b9091048116911661576d565b6001600160801b0316613c1d91906152b1565b5f5f61401e6138dd565b600281015490915061271090614042908590600160a01b900463ffffffff1661576d565b6001600160801b031661128091906152b1565b6113a183846001600160a01b031663a9059cbb85856040516024016136119291906156f5565b5f5160206159695f395f51905f526140928161353b565b6040516370a0823160e01b81525f5160206158e95f395f51905f52906370a08231906140c2903090600401614dad565b602060405180830381865afa1580156140dd573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906141019190615500565b82111561412157604051631e9acf1760e31b815260040160405180910390fd5b60405163a9059cbb60e01b81525f5160206158e95f395f51905f529063a9059cbb9061415b9061010c6001609d1b019086906004016156f5565b6020604051808303815f875af1158015614177573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061419b919061578f565b5060405182815230907f7ee6ed2ea3d0c992b8fe7d2afcb1473e75ebe75d139fb75575de92589ac07dba90602001612fd8565b5f835f036141ef57604051631f2a200560e01b815260040160405180910390fd5b6001600160a01b038616158061420c57506001600160a01b038516155b1561422a5760405163e6c4247b60e01b815260040160405180910390fd5b6040805160e0810182526001600160a01b0380891682528716602082015262ffffff8416818301523060608201526080810186905260a081018590525f60c08201529051635023b4df60e01b8152736d99e7f6747af2cdbb5164b6dd50e40d4fde1e7790635023b4df90613f2590849060040161570e565b5f6142cf6142af8361479c565b80156142ca57505f84806142c5576142c561529d565b868809115b151590565b6142da8686866147c8565b612d389190615273565b5f6142ed613499565b90506001600160a01b038516614318575f60405163e602df0560e01b815260040161278b9190614dad565b6001600160a01b038416614341575f604051634a1406b160e11b815260040161278b9190614dad565b6001600160a01b038086165f908152600183016020908152604080832093881683529290522083905581156143be57836001600160a01b0316856001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925856040516143b591815260200190565b60405180910390a35b5050505050565b6143cf8282612120565b61165057808260405163e2517d3f60e01b815260040161278b9291906156f5565b5f5f60205f8451602086015f885af18061440f576040513d5f823e3d81fd5b50505f513d91508115614426578060011415614433565b6001600160a01b0384163b155b156112485783604051635274afe760e01b815260040161278b9190614dad565b5f61445c613499565b90506001600160a01b03841661448a5781816002015f82825461447f9190615273565b909155506144e79050565b6001600160a01b0384165f90815260208290526040902054828110156144c95784818460405163391434e360e21b815260040161278b939291906156d4565b6001600160a01b0385165f9081526020839052604090209083900390555b6001600160a01b038316614505576002810180548390039055614523565b6001600160a01b0383165f9081526020829052604090208054830190555b826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161131b91815260200190565b61457061185a565b6114bd57604051638dfc202b60e01b815260040160405180910390fd5b61459682614878565b6040516001600160a01b038316907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b905f90a28051156145da576113a182826148d2565b61165061493b565b7f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0090565b6146196146116113a6565b8530856135dc565b614623838261495a565b826001600160a01b0316846001600160a01b03167fdcbc1c05240f31ff3ad067ef1ee35ce4997762752e3a095284754544f4c709d7848460405161131b929190918252602082015260400190565b61467961498e565b6114bd57604051631afcd79f60e31b815260040160405180910390fd5b61469e614671565b5f6146a7613843565b90505f5f6146b4846149a7565b91509150816146c45760126146c6565b805b83546001600160a81b031916600160a01b60ff92909216919091026001600160a01b031916176001600160a01b0394909416939093179091555050565b61470b614671565b5f614714613499565b90506003810161472484826157ee565b506004810161124883826157ee565b61473b614671565b6114bd614a7d565b61474b614671565b6114bd614a85565b5f5f5f5f60205f8651602088015f8a5af192503d91505f519050828015614792575081156147845780600114614792565b5f866001600160a01b03163b115b9695505050505050565b5f60028260038111156147b1576147b16158a8565b6147bb91906158bc565b60ff166001149050919050565b5f5f5f6147d58686614aa1565b91509150815f036147f9578381816147ef576147ef61529d565b0492505050611280565b818411614810576148106003851502601118614abd565b5f848688095f868103871696879004966002600389028118808a02820302808a02820302808a02820302808a02820302808a02820302808a02909103029181900381900460010185841190960395909502919093039390930492909217029150509392505050565b806001600160a01b03163b5f036148a45780604051634c9c8ce360e01b815260040161278b9190614dad565b5f5160206159095f395f51905f5280546001600160a01b0319166001600160a01b0392909216919091179055565b60605f5f846001600160a01b0316846040516148ee91906158dd565b5f60405180830381855af49150503d805f8114614926576040519150601f19603f3d011682016040523d82523d5f602084013e61492b565b606091505b5091509150612d38858383614ace565b34156114bd5760405163b398979f60e01b815260040160405180910390fd5b6001600160a01b038216614983575f60405163ec442f0560e01b815260040161278b9190614dad565b6116505f8383614453565b5f614997613c25565b54600160401b900460ff16919050565b60408051600481526024810182526020810180516001600160e01b031663313ce56760e01b17905290515f918291829182916001600160a01b038716916149ed916158dd565b5f60405180830381855afa9150503d805f8114614a25576040519150601f19603f3d011682016040523d82523d5f602084013e614a2a565b606091505b5091509150818015614a3e57506020815110155b15614a71575f81806020019051810190614a589190615500565b905060ff8111614a6f576001969095509350505050565b505b505f9485945092505050565b613bc1614671565b614a8d614671565b5f614a96613b0e565b805460ff1916905550565b5f805f1983850993909202808410938190039390930393915050565b634e487b715f52806020526024601cfd5b606082614ae357614ade82614b21565b611280565b8151158015614afa57506001600160a01b0384163b155b15614b1a5783604051639996b31560e01b815260040161278b9190614dad565b5080611280565b805115614b3057805160208201fd5b60405163d6bda27560e01b815260040160405180910390fd5b5f60208284031215614b59575f5ffd5b81356001600160e01b031981168114611280575f5ffd5b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b602081525f6112806020830184614b70565b5f60208284031215614bc0575f5ffd5b5035919050565b80356001600160a01b0381168114614bdd575f5ffd5b919050565b5f5f60408385031215614bf3575f5ffd5b614bfc83614bc7565b946020939093013593505050565b803563ffffffff81168114614bdd575f5ffd5b80356001600160801b0381168114614bdd575f5ffd5b5f5f5f60608486031215614c45575f5ffd5b614c4e84614c0a565b9250614c5c60208501614c1d565b9150614c6a60408501614c1d565b90509250925092565b6001600160401b0381168114611c17575f5ffd5b5f5f5f60608486031215614c99575f5ffd5b614ca284614bc7565b92506020840135614cb281614c73565b91506040840135614cc281614c73565b809150509250925092565b5f5f5f60608486031215614cdf575f5ffd5b614ce884614bc7565b9250614cf660208501614bc7565b929592945050506040919091013590565b5f5f5f60408486031215614d19575f5ffd5b614d2284614bc7565b925060208401356001600160401b03811115614d3c575f5ffd5b8401601f81018613614d4c575f5ffd5b80356001600160401b03811115614d61575f5ffd5b866020828401011115614d72575f5ffd5b939660209190910195509293505050565b5f5f60408385031215614d94575f5ffd5b82359150614da460208401614bc7565b90509250929050565b6001600160a01b0391909116815260200190565b5f60208284031215614dd1575f5ffd5b61128082614bc7565b5f5f60408385031215614deb575f5ffd5b614df483614c0a565b9150614da460208401614c1d565b5f60208284031215614e12575f5ffd5b61128082614c1d565b634e487b7160e01b5f52604160045260245ffd5b5f5f6001600160401b03841115614e4857614e48614e1b565b50604051601f19601f85018116603f011681018181106001600160401b0382111715614e7657614e76614e1b565b604052838152905080828401851015614e8d575f5ffd5b838360208301375f60208583010152509392505050565b5f5f60408385031215614eb5575f5ffd5b614ebe83614bc7565b915060208301356001600160401b03811115614ed8575f5ffd5b8301601f81018513614ee8575f5ffd5b614ef785823560208401614e2f565b9150509250929050565b602080825282518282018190525f918401906040840190835b81811015614f5357835180516001600160801b0316845260209081015163ffffffff168185015290930192604090920191600101614f1a565b509095945050505050565b5f82601f830112614f6d575f5ffd5b61128083833560208501614e2f565b5f5f5f5f5f5f5f5f610100898b031215614f94575f5ffd5b88356001600160401b03811115614fa9575f5ffd5b614fb58b828c01614f5e565b98505060208901356001600160401b03811115614fd0575f5ffd5b614fdc8b828c01614f5e565b975050614feb60408a01614bc7565b9550614ff960608a01614bc7565b945061500760808a01614bc7565b935061501560a08a01614bc7565b979a969950949793969295929450505060c08201359160e0013590565b5f60208284031215615042575f5ffd5b61128082614c0a565b8015158114611c17575f5ffd5b5f5f5f6060848603121561506a575f5ffd5b8335925061507a60208501614c1d565b91506040840135614cc28161504b565b5f5f5f6060848603121561509c575f5ffd5b833592506150ac60208501614bc7565b9150614c6a60408501614bc7565b5f5f604083850312156150cb575f5ffd5b6150d483614c0a565b915060208301356150e481614c73565b809150509250929050565b5f602082840312156150ff575f5ffd5b813561128081614c73565b5f5f5f5f5f5f5f60e0888a031215615120575f5ffd5b61512988614c0a565b965060208801356151398161504b565b9550604088013561514981614c73565b9450606088013561515981614c73565b935060808801356151698161504b565b925060a088013560ff8116811461517e575f5ffd5b915061518c60c08901614c1d565b905092959891949750929550565b5f5f604083850312156151ab575f5ffd5b6151b483614bc7565b9150614da460208401614bc7565b5f5f604083850312156151d3575f5ffd5b82356151de81614c73565b915060208301356150e48161504b565b5f5f5f5f60808587031215615201575f5ffd5b61520a85614bc7565b9350602085013561521a81614c73565b9250604085013561522a81614c73565b9150606085013561523a8161504b565b939692955090935050565b5f5f60408385031215615256575f5ffd5b614bfc83614c1d565b634e487b7160e01b5f52601160045260245ffd5b80820180821115610d6957610d6961525f565b8082028115828204841417610d6957610d6961525f565b634e487b7160e01b5f52601260045260245ffd5b5f826152bf576152bf61529d565b500490565b81810381811115610d6957610d6961525f565b600181811c908216806152eb57607f821691505b60208210810361530957634e487b7160e01b5f52602260045260245ffd5b50919050565b6001600160801b038181168382160190811115610d6957610d6961525f565b634e487b7160e01b5f52603260045260245ffd5b81835281816020850137505f828201602090810191909152601f909101601f19169091010190565b6001600160a01b03841681526040602082018190525f90612d389083018486615342565b602081525f613c1d602083018486615342565b60ff8181168382160190811115610d6957610d6961525f565b6001600160a01b039290921682526001600160401b0316602082015260400190565b5f60608284031280156153ed575f5ffd5b50604051606081016001600160401b038111828210171561541057615410614e1b565b604052825161541e81614c73565b8152602083015161542e81614c73565b6020820152604083015161544181614c73565b60408201529392505050565b6001600160401b039290921682526001600160801b0316602082015260400190565b8051600781900b8114614bdd575f5ffd5b5f6080828403128015615491575f5ffd5b50604051608081016001600160401b03811182821017156154b4576154b4614e1b565b6040526154c08361546f565b815260208301516154d081614c73565b602082015260408301516154e381614c73565b60408201526154f46060840161546f565b60608201529392505050565b5f60208284031215615510575f5ffd5b5051919050565b8082018281125f8312801582168215821617156155365761553661525f565b505092915050565b5f8161554c5761554c61525f565b505f190190565b634e487b7160e01b5f52603160045260245ffd5b6001600160801b038281168282160390811115610d6957610d6961525f565b5f60208284031215615596575f5ffd5b815161128081614c73565b6001815b60018411156155dc578085048111156155c0576155c061525f565b60018416156155ce57908102905b60019390931c9280026155a5565b935093915050565b5f826155f257506001610d69565b816155fe57505f610d69565b8160018114615614576002811461561e5761563a565b6001915050610d69565b60ff84111561562f5761562f61525f565b50506001821b610d69565b5060208310610133831016604e8410600b841016171561565d575081810a610d69565b6156695f1984846155a1565b805f190482111561567c5761567c61525f565b029392505050565b5f61128060ff8416836155e4565b5f81518060208401855e5f93019283525090919050565b6001600160f81b0319841681526001600160e81b0319831660018201525f612d386004830184615692565b6001600160a01b039390931683526020830191909152604082015260600190565b6001600160a01b03929092168252602082015260400190565b60e08101610d69828480516001600160a01b03908116835260208083015182169084015260408083015162ffffff16908401526060808301518216908401526080808301519084015260a0828101519084015260c09182015116910152565b6001600160801b0381811683821602908116908181146132915761329161525f565b5f6020828403121561579f575f5ffd5b81516112808161504b565b601f8211156113a157805f5260205f20601f840160051c810160208510156157cf5750805b601f840160051c820191505b818110156143be575f81556001016157db565b81516001600160401b0381111561580757615807614e1b565b61581b8161581584546152d7565b846157aa565b6020601f82116001811461584d575f83156158365750848201515b5f19600385901b1c1916600184901b1784556143be565b5f84815260208120601f198516915b8281101561587c578785015182556020948501946001909201910161585c565b508482101561589957868401515f19600387901b60f8161c191681555b50505050600190811b01905550565b634e487b7160e01b5f52602160045260245ffd5b5f60ff8316806158ce576158ce61529d565b8060ff84160691505092915050565b5f611280828461569256fe000000000000000000000000b8ce59fc3717ada4c02eadf9682a9e934f625ebb360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177500000000000000000000000055555555555555555555555555555555555555556d5c9827c1f410bbb61d3b2a0a34b6b30492d9a1fd38588edca7ec4562ab9c9ba2646970667358221220025fa3c1e077c2646f9768b84cd727431600ce524cce6c8e2190752ba3b7fa9364736f6c634300081c0033
Deployed Bytecode
0x6080604052600436106103e0575f3560e01c80639068cf0a11610205578063c6e6f59211610116578063deb88f43116100a4578063deb88f4314610bc9578063dfccd8e514610bdd578063e0336f4514610bfc578063e04a499014610c10578063e0f7bf5b14610c2f578063e840746b14610c4e578063ea051eff14610c6d578063ef8b30f714610aa9578063f160d36914610ca1578063fff1fb6e14610cc0575f5ffd5b8063c6e6f59214610aa9578063c8c3c6b614610ac8578063c99d682f14610ae7578063ce96cb7714610b06578063d148b81a14610b25578063d547741f14610b39578063d813746a14610b58578063d8481bd614610b77578063d905777e14610b8b578063dd62ed3e14610baa575f5ffd5b8063b150377411610193578063b1503774146109d1578063b3d7f6b9146109f1578063b460af9414610a10578063b7bb785f14610a2f578063b97dd9e214610a43578063b9ba6a3c14610a57578063ba08765214610a10578063ba9ed9f714610a76578063c63d75b61461062a578063c6e2973614610a8a575f5ffd5b80639068cf0a1461089757806391d14854146108b657806394bf804d146108d557806395d89b41146108f457806397a236ad146109085780639ff10ff414610931578063a217fddf14610950578063a3066aab14610963578063a9059cbb14610982578063ad3cb1cc146109a1575f5ffd5b8063402d267d116102ff5780636640e50d1161028d5780636640e50d1461077457806366ac5e14146107885780636c9302281461079c5780636ca4410d146107c85780636e553f65146107e7578063704b6c021461080657806370a0823114610825578063737870851461084457806375b238fc146108635780638456cb5914610883575f5ffd5b8063402d267d1461062a578063435354d3146106495780634cdad5061461045b5780634f017f32146106685780634f1ef286146106f257806352d1902d146107055780635a0874f9146107195780635a8b2b8e146107385780635bfaf16d1461074c5780635c975abb14610760575f5ffd5b806318160ddd1161037c57806318160ddd1461050c57806323b872dd14610520578063248a9ca31461053f5780632b28b28f1461055e5780632f2ff15d1461057d578063313ce5671461059c57806336568abe146105c257806338d52e0f146105e157806338e7531d146106025780633f4ba83a14610616575f5ffd5b806301e1d114146103e457806301ffc9a71461040b57806306fdde031461043a57806307a2d13a1461045b578063095ea7b31461047a5780630a28a477146104995780630b982273146104b85780630c5058e4146104cc578063152986af146104ed575b5f5ffd5b3480156103ef575f5ffd5b506103f8610cd4565b6040519081526020015b60405180910390f35b348015610416575f5ffd5b5061042a610425366004614b49565b610d39565b6040519015158152602001610402565b348015610445575f5ffd5b5061044e610d6f565b6040516104029190614b9e565b348015610466575f5ffd5b506103f8610475366004614bb0565b610e0d565b348015610485575f5ffd5b5061042a610494366004614be2565b610e18565b3480156104a4575f5ffd5b506103f86104b3366004614bb0565b610e2f565b3480156104c3575f5ffd5b506103f8610e3b565b3480156104d7575f5ffd5b506104eb6104e6366004614c33565b610e92565b005b3480156104f8575f5ffd5b506104eb610507366004614c87565b6111e5565b348015610517575f5ffd5b506103f861124e565b34801561052b575f5ffd5b5061042a61053a366004614ccd565b611262565b34801561054a575f5ffd5b506103f8610559366004614bb0565b611287565b348015610569575f5ffd5b506104eb610578366004614d07565b6112a5565b348015610588575f5ffd5b506104eb610597366004614d83565b611329565b3480156105a7575f5ffd5b506105b0611345565b60405160ff9091168152602001610402565b3480156105cd575f5ffd5b506104eb6105dc366004614d83565b61136e565b3480156105ec575f5ffd5b506105f56113a6565b6040516104029190614dad565b34801561060d575f5ffd5b506103f86113c0565b348015610621575f5ffd5b506104eb61145f565b348015610635575f5ffd5b506103f8610644366004614dc1565b6114bf565b348015610654575f5ffd5b506104eb610663366004614dda565b6114c5565b348015610673575f5ffd5b50610687610682366004614e02565b61155b565b60405161040291905f60c08201905063ffffffff835116825265ffffffffffff602084015116602083015265ffffffffffff604084015116604083015260018060801b0360608401511660608301526080830151608083015260a0830151151560a083015292915050565b6104eb610700366004614ea4565b611635565b348015610710575f5ffd5b506103f8611654565b348015610724575f5ffd5b506104eb610733366004614e02565b61166f565b348015610743575f5ffd5b506103f86116b4565b348015610757575f5ffd5b506103f8611742565b34801561076b575f5ffd5b5061042a61185a565b34801561077f575f5ffd5b506103f861186e565b348015610793575f5ffd5b506105f5611880565b3480156107a7575f5ffd5b506107bb6107b6366004614dc1565b61189b565b6040516104029190614f01565b3480156107d3575f5ffd5b506104eb6107e2366004614e02565b611931565b3480156107f2575f5ffd5b506103f8610801366004614d83565b611c1a565b348015610811575f5ffd5b506104eb610820366004614dc1565b611ca0565b348015610830575f5ffd5b506103f861083f366004614dc1565b611ce5565b34801561084f575f5ffd5b506104eb61085e366004614f7c565b611d0e565b34801561086e575f5ffd5b506103f85f5160206159295f395f51905f5281565b34801561088e575f5ffd5b506104eb612018565b3480156108a2575f5ffd5b506104eb6108b1366004615032565b612076565b3480156108c1575f5ffd5b5061042a6108d0366004614d83565b612120565b3480156108e0575f5ffd5b506103f86108ef366004614d83565b612154565b3480156108ff575f5ffd5b5061044e6121d7565b348015610913575f5ffd5b5061091c6121f3565b60405163ffffffff9091168152602001610402565b34801561093c575f5ffd5b506103f861094b366004615058565b612208565b34801561095b575f5ffd5b506103f85f81565b34801561096e575f5ffd5b506104eb61097d366004614dc1565b612450565b34801561098d575f5ffd5b5061042a61099c366004614be2565b612734565b3480156109ac575f5ffd5b5061044e604051806040016040528060058152602001640352e302e360dc1b81525081565b3480156109dc575f5ffd5b506103f85f5160206159695f395f51905f5281565b3480156109fc575f5ffd5b506103f8610a0b366004614bb0565b612741565b348015610a1b575f5ffd5b506103f8610a2a36600461508a565b61274d565b348015610a3a575f5ffd5b506103f8612794565b348015610a4e575f5ffd5b506103f86127d8565b348015610a62575f5ffd5b506104eb610a713660046150ba565b6127f6565b348015610a81575f5ffd5b506103f861287f565b348015610a95575f5ffd5b506104eb610aa4366004614e02565b612915565b348015610ab4575f5ffd5b506103f8610ac3366004614bb0565b612b2f565b348015610ad3575f5ffd5b506104eb610ae23660046150ef565b612b3a565b348015610af2575f5ffd5b506104eb610b0136600461510a565b612bc4565b348015610b11575f5ffd5b506103f8610b20366004614dc1565b612c46565b348015610b30575f5ffd5b506103f8612c59565b348015610b44575f5ffd5b506104eb610b53366004614d83565b612c7b565b348015610b63575f5ffd5b506103f8610b72366004614bb0565b612c97565b348015610b82575f5ffd5b506103f8612d41565b348015610b96575f5ffd5b506103f8610ba5366004614dc1565b612d53565b348015610bb5575f5ffd5b506103f8610bc436600461519a565b612d5d565b348015610bd4575f5ffd5b506103f8612d97565b348015610be8575f5ffd5b506104eb610bf73660046151c2565b612eb6565b348015610c07575f5ffd5b506103f8612f3b565b348015610c1b575f5ffd5b506104eb610c2a366004614bb0565b612f5a565b348015610c3a575f5ffd5b506104eb610c493660046151ee565b612fe4565b348015610c59575f5ffd5b506103f8610c68366004615245565b6130ed565b348015610c78575f5ffd5b50610c8c610c87366004614dc1565b613298565b60408051928352602083019190915201610402565b348015610cac575f5ffd5b506104eb610cbb366004614dc1565b6133e1565b348015610ccb575f5ffd5b506103f861347e565b5f5f610cde611742565b90505f610ce961186e565b90505f81610cf561124e565b610cff9190615273565b90505f5f8211610d0f575f610d24565b81610d1a8585615286565b610d2491906152b1565b9050610d3081856152c4565b94505050505090565b5f6001600160e01b03198216637965db0b60e01b1480610d6957506301ffc9a760e01b6001600160e01b03198316145b92915050565b60605f610d7a613499565b9050806003018054610d8b906152d7565b80601f0160208091040260200160405190810160405280929190818152602001828054610db7906152d7565b8015610e025780601f10610dd957610100808354040283529160200191610e02565b820191905f5260205f20905b815481529060010190602001808311610de557829003601f168201915b505050505091505090565b5f610d69825f6134bd565b5f33610e258185856134fa565b5060019392505050565b5f610d69826001613507565b5f5f610e4561186e565b90505f610e50611742565b90505f82610e5c61124e565b610e669190615273565b90508015610e885780610e798385615286565b610e8391906152b1565b610e8a565b5f5b935050505090565b5f5160206159695f395f51905f52610ea98161353b565b5f610eb2613545565b9050610ebc613569565b8154610ed890600160201b90046001600160801b03168661530f565b6001600160801b03161115610f00576040516396d8043360e01b815260040160405180910390fd5b6001610f0a6127d8565b610f1491906152c4565b8563ffffffff1614610f395760405163d5b25b6360e01b815260040160405180910390fd5b5f816004018663ffffffff1681548110610f5557610f5561532e565b5f91825260209091206004840154600390920201915015610fb1576004820154610f81906001906152c4565b63ffffffff168663ffffffff1610610fac5760405163d5b25b6360e01b815260040160405180910390fd5b610fd6565b63ffffffff861615610fd65760405163d5b25b6360e01b815260040160405180910390fd5b600281015460ff1615610ffc57604051630cd9898f60e21b815260040160405180910390fd5b6001600160801b038416156110c5576110333330866001600160801b03166110226113a6565b6001600160a01b03169291906135dc565b815484908390600490611057908490600160201b90046001600160801b031661530f565b92506101000a8154816001600160801b0302191690836001600160801b0316021790555083815f0160108282829054906101000a90046001600160801b03166110a0919061530f565b92506101000a8154816001600160801b0302191690836001600160801b031602179055505b815463ffffffff191663ffffffff87161782558054859082906010906110fc908490600160801b90046001600160801b031661530f565b92506101000a8154816001600160801b0302191690836001600160801b031602179055508060010154826003015f82825461113791906152c4565b9091555050815485908390600490611160908490600160201b90046001600160801b031661530f565b82546101009290920a6001600160801b038181021990931691831602179091556002838101805460ff191660019081179091555f90860181905590850155604051908716815263ffffffff881691507f5202080a63d65f360b8e184fda191173dee5658280e885e5713a040ee6f3fc8e906020015b60405180910390a2505050505050565b5f5160206159695f395f51905f526111fc8161353b565b604080516001600160a01b03861660208201526001600160401b03808616928201929092529083166060820152611248906006906080015b604051602081830303815290604052613643565b50505050565b5f5f611258613499565b6002015492915050565b5f3361126f8582856136d9565b61127a858585613724565b60019150505b9392505050565b5f5f611291613781565b5f9384526020525050604090206001015490565b5f5160206159695f395f51905f526112bc8161353b565b6112d660098585856040516020016112349392919061536a565b836001600160a01b0316336001600160a01b03167feb3129a9a680ca7fe98cb9d14a47fa51cbaac0dd96f7d56b07ef7898eba5d514858560405161131b92919061538e565b60405180910390a350505050565b61133282611287565b61133b8161353b565b61124883836137a5565b5f5f61134f613843565b90505f81546113689190600160a01b900460ff166153a1565b91505090565b6001600160a01b03811633146113975760405163334bd91960e11b815260040160405180910390fd5b6113a18282613867565b505050565b5f5f6113b0613843565b546001600160a01b031692915050565b5f5f6113ca6138dd565b60048082015460405163a69610d160e01b81529293505f926001600160a01b039091169163a69610d1916114029130918691016153ba565b606060405180830381865afa15801561141d573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061144191906153dc565b516001600160401b031690506114586064826152b1565b9250505090565b6114765f5160206159295f395f51905f5233612120565b15801561149757506114955f5160206159695f395f51905f5233612120565b155b156114b55760405163ea8e4eb560e01b815260040160405180910390fd5b6114bd613901565b565b505f1990565b5f5160206159695f395f51905f526114dc8161353b565b6040805163ffffffff851660208201526001600160801b0384169181019190915261150c90600b90606001611234565b8263ffffffff16336001600160a01b03167f310114285d26ecbdaa7df8aeb9387855fe707acc16b6a015104ec1813093a08e5f8560405161154e92919061544d565b60405180910390a3505050565b6040805160c0810182525f80825260208201819052918101829052606081018290526080810182905260a0810191909152611594613545565b6004018263ffffffff16815481106115ae576115ae61532e565b5f9182526020918290206040805160c081018252600393909302909101805463ffffffff81168452600160201b810465ffffffffffff90811695850195909552600160501b810490941691830191909152600160801b9092046001600160801b031660608201526001820154608082015260029091015460ff16151560a082015292915050565b61163d613957565b611646826139fb565b6116508282613a12565b5050565b5f61165d613ac5565b505f5160206159095f395f51905f5290565b5f5160206159695f395f51905f526116868161353b565b8161168f613545565b60010180546001600160801b0319166001600160801b03929092169190911790555050565b5f5f6116be6138dd565b600481810154604051634a27d29360e11b81525f92810183905230602482015292935090916001600160a01b039091169063944fa52690604401608060405180830381865afa158015611713573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906117379190615480565b5160070b9392505050565b5f5f61174c6113a6565b6001600160a01b03166370a08231306040518263ffffffff1660e01b81526004016117779190614dad565b602060405180830381865afa158015611792573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906117b69190615500565b90505f6117c1613545565b80549091505f906117e290600160201b90046001600160801b0316846152c4565b90505f6117ed6116b4565b90505f6117f8612d97565b90505f6118036113c0565b90505f61180e612794565b90505f84828461181e878a615517565b6118289190615517565b6118329190615517565b61183c9190615517565b90505f811361184b575f61184d565b805b9850505050505050505090565b5f5f611864613b0e565b5460ff1692915050565b5f611877613545565b60030154905090565b5f6118896138dd565b600401546001600160a01b0316919050565b60606118a5613545565b6001600160a01b0383165f9081526005919091016020908152604080832080548251818502810185019093528083529193909284015b82821015611926575f84815260209081902060408051808201909152908401546001600160801b0381168252600160801b900463ffffffff16818301528252600190920191016118db565b505050509050919050565b611939613b32565b611941613b67565b806001600160801b03165f0361196a57604051630318014360e61b815260040160405180910390fd5b5f611973613545565b600481015490915033905f9061198b906001906152c4565b90506119a082856001600160801b0316613b8d565b6001600160a01b0382165f90815260058401602052604081205490819003611a3a576001600160a01b0383165f908152600585016020908152604080832081518083019092526001600160801b03808a16835263ffffffff80881684860190815283546001810185559387529490952092519290910180549351909416600160801b026001600160a01b0319909316911617179055611b4f565b6001600160a01b0383165f9081526005850160205260408120611a5e6001846152c4565b81548110611a6e57611a6e61532e565b5f918252602090912001805490915063ffffffff808516600160801b909204161015611b0c576001600160a01b0384165f908152600586016020908152604080832081518083019092526001600160801b03808b16835263ffffffff80891684860190815283546001810185559387529490952092519290910180549351909416600160801b026001600160a01b0319909316911617179055611b4d565b8054869082905f90611b289084906001600160801b031661530f565b92506101000a8154816001600160801b0302191690836001600160801b031602179055505b505b846001600160801b0316846004018363ffffffff1681548110611b7457611b7461532e565b905f5260205f2090600302016001015f828254611b919190615273565b92505081905550846001600160801b0316846003015f828254611bb49190615273565b9091555050604080516001600160801b038716815263ffffffff841660208201526001600160a01b038516917f24b91f4f47caf44230a57777a9be744924e82bf666f2d5702faf97df35e60f9f910160405180910390a250505050611c17613bc1565b50565b5f611c23613b32565b611c2b613b67565b5f611c346138dd565b90506001600160a01b038316611c5d5760405163e6c4247b60e01b815260040160405180910390fd5b60038101546001600160801b0316841015611c8b57604051632ddf431160e11b815260040160405180910390fd5b611c958484613bd1565b915050610d69613bc1565b5f5160206159295f395f51905f52611cb78161353b565b81611cc06138dd565b60020180546001600160a01b0319166001600160a01b03929092169190911790555050565b5f5f611cef613499565b6001600160a01b039093165f9081526020939093525050604090205490565b5f611d17613c25565b805490915060ff600160401b82041615906001600160401b03165f81158015611d3d5750825b90505f826001600160401b03166001148015611d585750303b155b905081158015611d66575080155b15611d845760405163f92ee8a960e01b815260040160405180910390fd5b845467ffffffffffffffff191660011785558315611dae57845460ff60401b1916600160401b1785555b611dc45f5160206158e95f395f51905f52613c49565b611dcc613c5a565b611dd68d8d613c62565b6001600160a01b038816611dfd5760405163e6c4247b60e01b815260040160405180910390fd5b6001600160a01b038b16611e245760405163e6c4247b60e01b815260040160405180910390fd5b6001600160a01b038a16611e4b5760405163e6c4247b60e01b815260040160405180910390fd5b633b9aca00861115611e7057604051634f4940eb60e11b815260040160405180910390fd5b6101f4871115611e9357604051636be2692760e11b815260040160405180910390fd5b611ea18b8b8b8b8b8b613c74565b5f611eaa613545565b6040805160c0810182525f80825265ffffffffffff4281166020808501918252948401838152606085018481526080860185815260a0870186815260048a0180546001818101835591895299882098516003909a0290980180549551945193516001600160801b03908116600160801b02948816600160501b02166001600160501b0395909716600160201b026001600160501b031990961663ffffffff9a909a169990991794909417929092169390931792909217855590519284019290925590516002909201805492151560ff1990931692909217909155909150611f91908a6137a5565b50611fa95f5160206159295f395f51905f528a6137a5565b50611fc15f5160206159695f395f51905f528d6137a5565b5050831561200957845460ff60401b19168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50505050505050505050505050565b61202f5f5160206159295f395f51905f5233612120565b158015612050575061204e5f5160206159695f395f51905f5233612120565b155b1561206e5760405163ea8e4eb560e01b815260040160405180910390fd5b6114bd613d2f565b5f5160206159295f395f51905f5261208d8161353b565b6101f48263ffffffff1611156120b657604051636be2692760e11b815260040160405180910390fd5b5f6120bf6138dd565b60028101805463ffffffff60a01b1916600160a01b63ffffffff8716908102919091179091556040519081529091507f9fe6eeb0f0541c644a56c67efeb872dbadd803a60b909d7dde1b35a3fe230b0e9060200160405180910390a1505050565b5f5f61212a613781565b5f948552602090815260408086206001600160a01b03959095168652939052505090205460ff1690565b5f61215d613b32565b612165613b67565b5f61216e6138dd565b90506001600160a01b0383166121975760405163e6c4247b60e01b815260040160405180910390fd5b60038101546001600160801b03166121ae85612741565b10156121cd57604051632ddf431160e11b815260040160405180910390fd5b611c958484613d75565b60605f6121e2613499565b9050806004018054610d8b906152d7565b5f6121fc613545565b5463ffffffff16919050565b5f5f5160206159695f395f51905f526122208161353b565b612228613b67565b612230613b32565b6040516370a0823160e01b815285905f5160206159495f395f51905f52906370a0823190612262903090600401614dad565b602060405180830381865afa15801561227d573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906122a19190615500565b10156122c0576040516396d8043360e01b815260040160405180910390fd5b5f6122c9613545565b90506122f75f5160206159495f395f51905f52736d99e7f6747af2cdbb5164b6dd50e40d4fde1e7788613dc1565b5f61232a5f5160206159495f395f51905f525f5160206158e95f395f51905f5289896001600160801b03166101f4613e51565b9050808260010160108282829054906101000a90046001600160801b0316612352919061530f565b92506101000a8154816001600160801b0302191690836001600160801b03160217905550866001600160801b0316826002015f8282546123929190615273565b909155505084156123e6578154819083906004906123c1908490600160201b90046001600160801b031661530f565b92506101000a8154816001600160801b0302191690836001600160801b031602179055505b60408051888152602081018390525f5160206158e95f395f51905f52915f5160206159495f395f51905f52917fdd36740e2a012d93061a0d99eaa9107860955de4e90027d3cf465a055026c407910160405180910390a3925050612448613bc1565b509392505050565b612458613b32565b5f612461613545565b90505f61246c6138dd565b6001600160a01b0384165f908152600584016020526040812080549293509190036124aa5760405163a07ef18360e01b815260040160405180910390fd5b80545f9081905b806124bb8161553e565b915050856004018482815481106124d4576124d461532e565b5f918252602090912001548154600160801b90910463ffffffff169081106124fe576124fe61532e565b5f91825260209091206002600390920201015460ff16156125a45761253b84828154811061252e5761252e61532e565b905f5260205f2001613f70565b6125459084615273565b92508381815481106125595761255961532e565b5f91825260209091200154612577906001600160801b031683615273565b915083818154811061258b5761258b61532e565b5f91825260209091200180546001600160a01b03191690555b5f81116124b157825f036125cb5760405163898b3b5d60e01b815260040160405180910390fd5b83541580159061260c5750835484906125e6906001906152c4565b815481106125f6576125f661532e565b5f918252602090912001546001600160801b0316155b15612646578380548061262157612621615553565b5f8281526020902081015f1990810180546001600160a01b03191690550190556125cb565b85548390879060049061266a908490600160201b90046001600160801b0316615567565b92506101000a8154816001600160801b0302191690836001600160801b031602179055505f61269884614014565b60018701549091506126c6906001600160a01b0316826126b66113a6565b6001600160a01b03169190614055565b5f6126d182866152c4565b90506126e089826126b66113a6565b60408051858152602081018390526001600160a01b038b16917f2d43eb174787155132b52ddb6b346e2dca99302eac3df4466dbeff953d3c84d1910160405180910390a25050505050505050611c17613bc1565b5f33610e25818585613724565b5f610d698260016134bd565b60405162461bcd60e51b8152602060048201526015602482015274155cd9481c995c5d595cdd15da5d1a191c985dd85b605a1b60448201525f906064015b60405180910390fd5b5f5f61279e6138dd565b60048082015460405163a69610d160e01b81529293505f926001600160a01b039091169163a69610d19161140291309161010c91016153ba565b5f60016127e3613545565b600401546127f191906152c4565b905090565b5f5160206159695f395f51905f5261280d8161353b565b6040805163ffffffff851660208201526001600160401b0384169181019190915261283d90600a90606001611234565b8263ffffffff16336001600160a01b03167f310114285d26ecbdaa7df8aeb9387855fe707acc16b6a015104ec1813093a08e845f60405161154e92919061544d565b5f612888613545565b54600160201b90046001600160801b03166128a16113a6565b6001600160a01b03166370a08231306040518263ffffffff1660e01b81526004016128cc9190614dad565b602060405180830381865afa1580156128e7573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061290b9190615500565b6127f191906152c4565b5f5160206159695f395f51905f5261292c8161353b565b5f612935613545565b90505f6129406127d8565b90505f4290505f83600401838154811061295c5761295c61532e565b5f9182526020909120600390910201805465ffffffffffff60501b1916600160501b65ffffffffffff851602178155905082158015906129ce5750600484016129a66001856152c4565b815481106129b6576129b661532e565b5f91825260209091206002600390920201015460ff16155b156129ec57604051630a34cd9f60e41b815260040160405180910390fd5b836004016040518060c00160405280856001612a089190615273565b63ffffffff908116825265ffffffffffff8087166020808501919091525f60408086018290526060808701839052608080880184905260a0978801849052895460018181018c559a85528585208a516003909202018054968b0151948b0151938b01516001600160801b03908116600160801b02948916600160501b0281166001600160501b0396909916600160201b026001600160501b03199098169290991691909117959095179290921694909417939093178255918501518187015593909201516002938401805491151560ff1990921691909117905589168784015590860155612af7908490615273565b60405165ffffffffffff421681527fabb37912485bfb13380247be2f4101619759991c9a13ef282eeb05108378b579906020016111d5565b5f610d69825f613507565b5f5160206159295f395f51905f52612b518161353b565b816001600160401b0316612b636138dd565b60030180546001600160801b0319166001600160801b03929092169190911790556040516001600160401b03831681527f96a008f96f1c0ab9fa3d9ddd43cdfc614848c4d054d51f43662ed900e9d094c89060200160405180910390a15050565b5f5160206159695f395f51905f52612bdb8161353b565b6040805163ffffffff8a166020820152881515918101919091526001600160401b0380881660608301528616608082015284151560a082015260ff841660c08201526001600160801b03831660e0820152612c3c9060019061010001611234565b5050505050505050565b5f610d69612c5383611ce5565b5f6134bd565b5f612c62613545565b60010154600160801b90046001600160801b0316919050565b612c8482611287565b612c8d8161353b565b6112488383613867565b5f612ca06127d8565b821115612cc05760405163d5b25b6360e01b815260040160405180910390fd5b5f612cc9613545565b6004018363ffffffff1681548110612ce357612ce361532e565b905f5260205f2090600302016001015490505f612cfe611742565b90505f82612d0a61124e565b612d149190615273565b90508015612d365780612d278385615286565b612d3191906152b1565b612d38565b5f5b95945050505050565b5f612d4a613545565b60020154905090565b5f610d6982611ce5565b5f5f612d67613499565b6001600160a01b039485165f90815260019190910160209081526040808320959096168252939093525050205490565b5f5f612da16138dd565b60048181015460405163c0f0f5ef60e01b8152609f928101929092529192505f916001600160a01b03169063c0f0f5ef90602401602060405180830381865afa158015612df0573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612e149190615586565b6001600160401b031690505f5f5160206159495f395f51905f526001600160a01b03166370a08231306040518263ffffffff1660e01b8152600401612e599190614dad565b602060405180830381865afa158015612e74573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612e989190615500565b9050662386f26fc10000612eac8383615286565b610e8a91906152b1565b5f5160206159695f395f51905f52612ecd8161353b565b604080516001600160401b038516602082015283151591810191909152612ef990600790606001611234565b604080515f8082526001600160401b03861660208301529133917fbd8ba14b7834d50f4d38587359558952e7e638273e9c027fbfa7d41b364e9825910161154e565b5f612f44613545565b54600160201b90046001600160801b0316919050565b5f5160206159695f395f51905f52612f718161353b565b612f7961287f565b821115612f99576040516396d8043360e01b815260040160405180910390fd5b612fa28261407b565b60405182815261010c6001609d1b01907f8c9a4f13b67cb64d7c6aa1ae0c9bf07694af521a28b93e7060020810ab4bc59f906020015b60405180910390a25050565b612fec613b67565b5f5160206159695f395f51905f526130038161353b565b5f61300c613545565b90506001600160a01b03861661010c6001609d1b011461303f57604051630269316560e31b815260040160405180910390fd5b61304a8686866111e5565b82156130a25780546001600160401b03851690829060049061307d908490600160201b90046001600160801b031661530f565b92506101000a8154816001600160801b0302191690836001600160801b031602179055505b604080516001600160401b038088168252861660208201526001600160a01b038816917ff8b12d4095105942d7fcab8c9a49741e2c5f2ea4fffa95d8ea3465811e1fd32891016111d5565b5f5f5160206159695f395f51905f526131058161353b565b61310d613b67565b613115613b32565b836001600160801b031661312761287f565b1015613146576040516396d8043360e01b815260040160405180910390fd5b5f61314f613545565b90506131865f5160206158e95f395f51905f52736d99e7f6747af2cdbb5164b6dd50e40d4fde1e776001600160801b038816613dc1565b5f6131b95f5160206158e95f395f51905f525f5160206159495f395f51905f5287896001600160801b03166101f46141ce565b9050808260010160108282829054906101000a90046001600160801b03166131e1919061530f565b92506101000a8154816001600160801b0302191690836001600160801b03160217905550846001600160801b0316826002015f8282546132219190615273565b909155505060408051828152602081018790525f5160206159495f395f51905f52915f5160206158e95f395f51905f52917fdd36740e2a012d93061a0d99eaa9107860955de4e90027d3cf465a055026c407910160405180910390a36001600160801b0316925050613291613bc1565b5092915050565b5f5f5f6132a3613545565b6001600160a01b0385165f9081526005820160205260408120805492935091819081036132d857505f96879650945050505050565b82545b806132e58161553e565b9150508381815481106132fa576132fa61532e565b5f918252602090912001546001600160801b0316156133cd57846004018482815481106133295761332961532e565b5f918252602090912001548154600160801b90910463ffffffff169081106133535761335361532e565b5f91825260209091206002600390920201015460ff16156133cd575f61338485838154811061252e5761252e61532e565b905080156133cb576133968184615273565b92508482815481106133aa576133aa61532e565b5f918252602090912001546133c8906001600160801b031685615273565b93505b505b5f81116132db575090969095509350505050565b5f5160206159295f395f51905f526133f88161353b565b6001600160a01b03821661341f57604051630ed1b8b360e31b815260040160405180910390fd5b5f6134286138dd565b6001810180546001600160a01b038681166001600160a01b031983168117909355604051939450169182907faaebcf1bfa00580e41d966056b48521fa9f202645c86d4ddf28113e617c1b1d3905f90a350505050565b5f613487613545565b600101546001600160801b0316919050565b7f52c63247e1f47db19d5ce0460030c497f067ca4cebf71ba98eeadabe20bace0090565b5f6112806134c9610cd4565b6134d4906001615273565b6134df5f600a615684565b6134e761124e565b6134f19190615273565b859190856142a2565b6113a183838360016142e4565b5f61128061351682600a615684565b61351e61124e565b6135289190615273565b613530610cd4565b6134f1906001615273565b611c1781336143c5565b7f76934c1406b8ac7d50d9b396bab4cebc7c7ad3ef4d39b66a41a1ce5d42c7560090565b5f6135726113a6565b6001600160a01b03166370a08231306040518263ffffffff1660e01b815260040161359d9190614dad565b602060405180830381865afa1580156135b8573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906127f19190615500565b6040516001600160a01b0384811660248301528381166044830152606482018390526112489186918216906323b872dd906084015b604051602081830303815290604052915060e01b6020820180516001600160e01b0383818316178352505050506143f0565b5f600160f81b8360e81b83604051602001613660939291906156a9565b60408051601f19818403018152908290526317938e1360e01b82529150733333333333333333333333333333333333333333906317938e13906136a7908490600401614b9e565b5f604051808303815f87803b1580156136be575f5ffd5b505af11580156136d0573d5f5f3e3d5ffd5b50505050505050565b5f6136e48484612d5d565b90505f19811015611248578181101561371657828183604051637dc7a0d960e11b815260040161278b939291906156d4565b61124884848484035f6142e4565b6001600160a01b03831661374d575f604051634b637e8f60e11b815260040161278b9190614dad565b6001600160a01b038216613776575f60405163ec442f0560e01b815260040161278b9190614dad565b6113a1838383614453565b7f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b62680090565b5f5f6137af613781565b90506137bb8484612120565b61383a575f848152602082815260408083206001600160a01b03871684529091529020805460ff191660011790556137f03390565b6001600160a01b0316836001600160a01b0316857f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a46001915050610d69565b5f915050610d69565b7f0773e532dfede91f04b12a73d3d2acd361424f41f76b4fb79f090161e36b4e0090565b5f5f613871613781565b905061387d8484612120565b1561383a575f848152602082815260408083206001600160a01b0387168085529252808320805460ff1916905551339287917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a46001915050610d69565b7fe0361f59bd9cb7de6e2df4e9f3769c8d558e574a126af4e98958733da1cb980090565b613909614568565b5f613912613b0e565b805460ff1916815590507f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b60405161394c9190614dad565b60405180910390a150565b306001600160a01b037f00000000000000000000000037b1670959ed87bed73b13951fde866bf47c80be1614806139dd57507f00000000000000000000000037b1670959ed87bed73b13951fde866bf47c80be6001600160a01b03166139d15f5160206159095f395f51905f52546001600160a01b031690565b6001600160a01b031614155b156114bd5760405163703e46dd60e11b815260040160405180910390fd5b5f5160206159295f395f51905f526116508161353b565b816001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015613a6c575060408051601f3d908101601f19168201909252613a6991810190615500565b60015b613a8b5781604051634c9c8ce360e01b815260040161278b9190614dad565b5f5160206159095f395f51905f528114613abb57604051632a87526960e21b81526004810182905260240161278b565b6113a1838361458d565b306001600160a01b037f00000000000000000000000037b1670959ed87bed73b13951fde866bf47c80be16146114bd5760405163703e46dd60e11b815260040160405180910390fd5b7fcd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f0330090565b5f613b3b6145e2565b805490915060011901613b6157604051633ee5aeb560e01b815260040160405180910390fd5b60029055565b613b6f61185a565b156114bd5760405163d93c066560e01b815260040160405180910390fd5b6001600160a01b038216613bb6575f604051634b637e8f60e11b815260040161278b9190614dad565b611650825f83614453565b5f613bca6145e2565b6001905550565b5f5f613bdc836114bf565b905080841115613c0557828482604051633c8097d960e11b815260040161278b939291906156d4565b5f613c0f85612b2f565b9050613c1d33858784614606565b949350505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0090565b613c51614671565b611c1781614696565b6114bd614671565b613c6a614671565b6116508282614703565b613c7c614671565b613c84613c5a565b613c8c614733565b613c94614743565b5f613c9d6138dd565b80546001600160a01b039889166001600160a01b0319918216178255600182018054988a16988216989098179097556004810180549689169690971695909517909555600284018054600390950180546001600160801b0319166001600160401b039093169290921790915563ffffffff909116600160a01b026001600160c01b031990931691909416171790915550565b613d37613b67565b5f613d40613b0e565b805460ff1916600117815590507f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861393f3390565b5f5f613d80836114bf565b905080841115613da95782848260405163284ff66760e01b815260040161278b939291906156d4565b5f613db385612741565b9050613c1d33858388614606565b5f836001600160a01b031663095ea7b38484604051602401613de49291906156f5565b604051602081830303815290604052915060e01b6020820180516001600160e01b0383818316178352505050509050613e1d8482614753565b61124857613e4784856001600160a01b031663095ea7b3865f6040516024016136119291906156f5565b61124884826143f0565b5f835f03613e7257604051631f2a200560e01b815260040160405180910390fd5b6001600160a01b0386161580613e8f57506001600160a01b038516155b15613ead5760405163e6c4247b60e01b815260040160405180910390fd5b6040805160e0810182526001600160a01b0380891682528716602082015262ffffff8416818301523060608201526080810186905260a081018590525f60c082015290516304e45aaf60e01b8152736d99e7f6747af2cdbb5164b6dd50e40d4fde1e77906304e45aaf90613f2590849060040161570e565b6020604051808303815f875af1158015613f41573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190613f659190615500565b979650505050505050565b5f5f613f7a613545565b83546004820180549293505f929091600160801b900463ffffffff16908110613fa557613fa561532e565b5f9182526020909120600390910201600281015490915060ff161580613fcd57506001810154155b15613fdb57505f9392505050565b600181015481548554614001916001600160801b03600160801b9091048116911661576d565b6001600160801b0316613c1d91906152b1565b5f5f61401e6138dd565b600281015490915061271090614042908590600160a01b900463ffffffff1661576d565b6001600160801b031661128091906152b1565b6113a183846001600160a01b031663a9059cbb85856040516024016136119291906156f5565b5f5160206159695f395f51905f526140928161353b565b6040516370a0823160e01b81525f5160206158e95f395f51905f52906370a08231906140c2903090600401614dad565b602060405180830381865afa1580156140dd573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906141019190615500565b82111561412157604051631e9acf1760e31b815260040160405180910390fd5b60405163a9059cbb60e01b81525f5160206158e95f395f51905f529063a9059cbb9061415b9061010c6001609d1b019086906004016156f5565b6020604051808303815f875af1158015614177573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061419b919061578f565b5060405182815230907f7ee6ed2ea3d0c992b8fe7d2afcb1473e75ebe75d139fb75575de92589ac07dba90602001612fd8565b5f835f036141ef57604051631f2a200560e01b815260040160405180910390fd5b6001600160a01b038616158061420c57506001600160a01b038516155b1561422a5760405163e6c4247b60e01b815260040160405180910390fd5b6040805160e0810182526001600160a01b0380891682528716602082015262ffffff8416818301523060608201526080810186905260a081018590525f60c08201529051635023b4df60e01b8152736d99e7f6747af2cdbb5164b6dd50e40d4fde1e7790635023b4df90613f2590849060040161570e565b5f6142cf6142af8361479c565b80156142ca57505f84806142c5576142c561529d565b868809115b151590565b6142da8686866147c8565b612d389190615273565b5f6142ed613499565b90506001600160a01b038516614318575f60405163e602df0560e01b815260040161278b9190614dad565b6001600160a01b038416614341575f604051634a1406b160e11b815260040161278b9190614dad565b6001600160a01b038086165f908152600183016020908152604080832093881683529290522083905581156143be57836001600160a01b0316856001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925856040516143b591815260200190565b60405180910390a35b5050505050565b6143cf8282612120565b61165057808260405163e2517d3f60e01b815260040161278b9291906156f5565b5f5f60205f8451602086015f885af18061440f576040513d5f823e3d81fd5b50505f513d91508115614426578060011415614433565b6001600160a01b0384163b155b156112485783604051635274afe760e01b815260040161278b9190614dad565b5f61445c613499565b90506001600160a01b03841661448a5781816002015f82825461447f9190615273565b909155506144e79050565b6001600160a01b0384165f90815260208290526040902054828110156144c95784818460405163391434e360e21b815260040161278b939291906156d4565b6001600160a01b0385165f9081526020839052604090209083900390555b6001600160a01b038316614505576002810180548390039055614523565b6001600160a01b0383165f9081526020829052604090208054830190555b826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161131b91815260200190565b61457061185a565b6114bd57604051638dfc202b60e01b815260040160405180910390fd5b61459682614878565b6040516001600160a01b038316907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b905f90a28051156145da576113a182826148d2565b61165061493b565b7f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0090565b6146196146116113a6565b8530856135dc565b614623838261495a565b826001600160a01b0316846001600160a01b03167fdcbc1c05240f31ff3ad067ef1ee35ce4997762752e3a095284754544f4c709d7848460405161131b929190918252602082015260400190565b61467961498e565b6114bd57604051631afcd79f60e31b815260040160405180910390fd5b61469e614671565b5f6146a7613843565b90505f5f6146b4846149a7565b91509150816146c45760126146c6565b805b83546001600160a81b031916600160a01b60ff92909216919091026001600160a01b031916176001600160a01b0394909416939093179091555050565b61470b614671565b5f614714613499565b90506003810161472484826157ee565b506004810161124883826157ee565b61473b614671565b6114bd614a7d565b61474b614671565b6114bd614a85565b5f5f5f5f60205f8651602088015f8a5af192503d91505f519050828015614792575081156147845780600114614792565b5f866001600160a01b03163b115b9695505050505050565b5f60028260038111156147b1576147b16158a8565b6147bb91906158bc565b60ff166001149050919050565b5f5f5f6147d58686614aa1565b91509150815f036147f9578381816147ef576147ef61529d565b0492505050611280565b818411614810576148106003851502601118614abd565b5f848688095f868103871696879004966002600389028118808a02820302808a02820302808a02820302808a02820302808a02820302808a02909103029181900381900460010185841190960395909502919093039390930492909217029150509392505050565b806001600160a01b03163b5f036148a45780604051634c9c8ce360e01b815260040161278b9190614dad565b5f5160206159095f395f51905f5280546001600160a01b0319166001600160a01b0392909216919091179055565b60605f5f846001600160a01b0316846040516148ee91906158dd565b5f60405180830381855af49150503d805f8114614926576040519150601f19603f3d011682016040523d82523d5f602084013e61492b565b606091505b5091509150612d38858383614ace565b34156114bd5760405163b398979f60e01b815260040160405180910390fd5b6001600160a01b038216614983575f60405163ec442f0560e01b815260040161278b9190614dad565b6116505f8383614453565b5f614997613c25565b54600160401b900460ff16919050565b60408051600481526024810182526020810180516001600160e01b031663313ce56760e01b17905290515f918291829182916001600160a01b038716916149ed916158dd565b5f60405180830381855afa9150503d805f8114614a25576040519150601f19603f3d011682016040523d82523d5f602084013e614a2a565b606091505b5091509150818015614a3e57506020815110155b15614a71575f81806020019051810190614a589190615500565b905060ff8111614a6f576001969095509350505050565b505b505f9485945092505050565b613bc1614671565b614a8d614671565b5f614a96613b0e565b805460ff1916905550565b5f805f1983850993909202808410938190039390930393915050565b634e487b715f52806020526024601cfd5b606082614ae357614ade82614b21565b611280565b8151158015614afa57506001600160a01b0384163b155b15614b1a5783604051639996b31560e01b815260040161278b9190614dad565b5080611280565b805115614b3057805160208201fd5b60405163d6bda27560e01b815260040160405180910390fd5b5f60208284031215614b59575f5ffd5b81356001600160e01b031981168114611280575f5ffd5b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b602081525f6112806020830184614b70565b5f60208284031215614bc0575f5ffd5b5035919050565b80356001600160a01b0381168114614bdd575f5ffd5b919050565b5f5f60408385031215614bf3575f5ffd5b614bfc83614bc7565b946020939093013593505050565b803563ffffffff81168114614bdd575f5ffd5b80356001600160801b0381168114614bdd575f5ffd5b5f5f5f60608486031215614c45575f5ffd5b614c4e84614c0a565b9250614c5c60208501614c1d565b9150614c6a60408501614c1d565b90509250925092565b6001600160401b0381168114611c17575f5ffd5b5f5f5f60608486031215614c99575f5ffd5b614ca284614bc7565b92506020840135614cb281614c73565b91506040840135614cc281614c73565b809150509250925092565b5f5f5f60608486031215614cdf575f5ffd5b614ce884614bc7565b9250614cf660208501614bc7565b929592945050506040919091013590565b5f5f5f60408486031215614d19575f5ffd5b614d2284614bc7565b925060208401356001600160401b03811115614d3c575f5ffd5b8401601f81018613614d4c575f5ffd5b80356001600160401b03811115614d61575f5ffd5b866020828401011115614d72575f5ffd5b939660209190910195509293505050565b5f5f60408385031215614d94575f5ffd5b82359150614da460208401614bc7565b90509250929050565b6001600160a01b0391909116815260200190565b5f60208284031215614dd1575f5ffd5b61128082614bc7565b5f5f60408385031215614deb575f5ffd5b614df483614c0a565b9150614da460208401614c1d565b5f60208284031215614e12575f5ffd5b61128082614c1d565b634e487b7160e01b5f52604160045260245ffd5b5f5f6001600160401b03841115614e4857614e48614e1b565b50604051601f19601f85018116603f011681018181106001600160401b0382111715614e7657614e76614e1b565b604052838152905080828401851015614e8d575f5ffd5b838360208301375f60208583010152509392505050565b5f5f60408385031215614eb5575f5ffd5b614ebe83614bc7565b915060208301356001600160401b03811115614ed8575f5ffd5b8301601f81018513614ee8575f5ffd5b614ef785823560208401614e2f565b9150509250929050565b602080825282518282018190525f918401906040840190835b81811015614f5357835180516001600160801b0316845260209081015163ffffffff168185015290930192604090920191600101614f1a565b509095945050505050565b5f82601f830112614f6d575f5ffd5b61128083833560208501614e2f565b5f5f5f5f5f5f5f5f610100898b031215614f94575f5ffd5b88356001600160401b03811115614fa9575f5ffd5b614fb58b828c01614f5e565b98505060208901356001600160401b03811115614fd0575f5ffd5b614fdc8b828c01614f5e565b975050614feb60408a01614bc7565b9550614ff960608a01614bc7565b945061500760808a01614bc7565b935061501560a08a01614bc7565b979a969950949793969295929450505060c08201359160e0013590565b5f60208284031215615042575f5ffd5b61128082614c0a565b8015158114611c17575f5ffd5b5f5f5f6060848603121561506a575f5ffd5b8335925061507a60208501614c1d565b91506040840135614cc28161504b565b5f5f5f6060848603121561509c575f5ffd5b833592506150ac60208501614bc7565b9150614c6a60408501614bc7565b5f5f604083850312156150cb575f5ffd5b6150d483614c0a565b915060208301356150e481614c73565b809150509250929050565b5f602082840312156150ff575f5ffd5b813561128081614c73565b5f5f5f5f5f5f5f60e0888a031215615120575f5ffd5b61512988614c0a565b965060208801356151398161504b565b9550604088013561514981614c73565b9450606088013561515981614c73565b935060808801356151698161504b565b925060a088013560ff8116811461517e575f5ffd5b915061518c60c08901614c1d565b905092959891949750929550565b5f5f604083850312156151ab575f5ffd5b6151b483614bc7565b9150614da460208401614bc7565b5f5f604083850312156151d3575f5ffd5b82356151de81614c73565b915060208301356150e48161504b565b5f5f5f5f60808587031215615201575f5ffd5b61520a85614bc7565b9350602085013561521a81614c73565b9250604085013561522a81614c73565b9150606085013561523a8161504b565b939692955090935050565b5f5f60408385031215615256575f5ffd5b614bfc83614c1d565b634e487b7160e01b5f52601160045260245ffd5b80820180821115610d6957610d6961525f565b8082028115828204841417610d6957610d6961525f565b634e487b7160e01b5f52601260045260245ffd5b5f826152bf576152bf61529d565b500490565b81810381811115610d6957610d6961525f565b600181811c908216806152eb57607f821691505b60208210810361530957634e487b7160e01b5f52602260045260245ffd5b50919050565b6001600160801b038181168382160190811115610d6957610d6961525f565b634e487b7160e01b5f52603260045260245ffd5b81835281816020850137505f828201602090810191909152601f909101601f19169091010190565b6001600160a01b03841681526040602082018190525f90612d389083018486615342565b602081525f613c1d602083018486615342565b60ff8181168382160190811115610d6957610d6961525f565b6001600160a01b039290921682526001600160401b0316602082015260400190565b5f60608284031280156153ed575f5ffd5b50604051606081016001600160401b038111828210171561541057615410614e1b565b604052825161541e81614c73565b8152602083015161542e81614c73565b6020820152604083015161544181614c73565b60408201529392505050565b6001600160401b039290921682526001600160801b0316602082015260400190565b8051600781900b8114614bdd575f5ffd5b5f6080828403128015615491575f5ffd5b50604051608081016001600160401b03811182821017156154b4576154b4614e1b565b6040526154c08361546f565b815260208301516154d081614c73565b602082015260408301516154e381614c73565b60408201526154f46060840161546f565b60608201529392505050565b5f60208284031215615510575f5ffd5b5051919050565b8082018281125f8312801582168215821617156155365761553661525f565b505092915050565b5f8161554c5761554c61525f565b505f190190565b634e487b7160e01b5f52603160045260245ffd5b6001600160801b038281168282160390811115610d6957610d6961525f565b5f60208284031215615596575f5ffd5b815161128081614c73565b6001815b60018411156155dc578085048111156155c0576155c061525f565b60018416156155ce57908102905b60019390931c9280026155a5565b935093915050565b5f826155f257506001610d69565b816155fe57505f610d69565b8160018114615614576002811461561e5761563a565b6001915050610d69565b60ff84111561562f5761562f61525f565b50506001821b610d69565b5060208310610133831016604e8410600b841016171561565d575081810a610d69565b6156695f1984846155a1565b805f190482111561567c5761567c61525f565b029392505050565b5f61128060ff8416836155e4565b5f81518060208401855e5f93019283525090919050565b6001600160f81b0319841681526001600160e81b0319831660018201525f612d386004830184615692565b6001600160a01b039390931683526020830191909152604082015260600190565b6001600160a01b03929092168252602082015260400190565b60e08101610d69828480516001600160a01b03908116835260208083015182169084015260408083015162ffffff16908401526060808301518216908401526080808301519084015260a0828101519084015260c09182015116910152565b6001600160801b0381811683821602908116908181146132915761329161525f565b5f6020828403121561579f575f5ffd5b81516112808161504b565b601f8211156113a157805f5260205f20601f840160051c810160208510156157cf5750805b601f840160051c820191505b818110156143be575f81556001016157db565b81516001600160401b0381111561580757615807614e1b565b61581b8161581584546152d7565b846157aa565b6020601f82116001811461584d575f83156158365750848201515b5f19600385901b1c1916600184901b1784556143be565b5f84815260208120601f198516915b8281101561587c578785015182556020948501946001909201910161585c565b508482101561589957868401515f19600387901b60f8161c191681555b50505050600190811b01905550565b634e487b7160e01b5f52602160045260245ffd5b5f60ff8316806158ce576158ce61529d565b8060ff84160691505092915050565b5f611280828461569256fe000000000000000000000000b8ce59fc3717ada4c02eadf9682a9e934f625ebb360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbca49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177500000000000000000000000055555555555555555555555555555555555555556d5c9827c1f410bbb61d3b2a0a34b6b30492d9a1fd38588edca7ec4562ab9c9ba2646970667358221220025fa3c1e077c2646f9768b84cd727431600ce524cce6c8e2190752ba3b7fa9364736f6c634300081c0033
Deployed Bytecode Sourcemap
212693:28959:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;231549:733;;;;;;;;;;;;;:::i;:::-;;;160:25:1;;;148:2;133:18;231549:733:0;;;;;;;;151649:204;;;;;;;;;;-1:-1:-1;151649:204:0;;;;;:::i;:::-;;:::i;:::-;;;652:14:1;;645:22;627:41;;615:2;600:18;151649:204:0;487:187:1;165267:147:0;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;205934:150::-;;;;;;;;;;-1:-1:-1;205934:150:0;;;;;:::i;:::-;;:::i;167840:190::-;;;;;;;;;;-1:-1:-1;167840:190:0;;;;;:::i;:::-;;:::i;207235:149::-;;;;;;;;;;-1:-1:-1;207235:149:0;;;;;:::i;:::-;;:::i;238758:403::-;;;;;;;;;;;;;:::i;220608:1930::-;;;;;;;;;;-1:-1:-1;220608:1930:0;;;;;:::i;:::-;;:::i;:::-;;196522:179;;;;;;;;;;-1:-1:-1;196522:179:0;;;;;:::i;:::-;;:::i;166481:155::-;;;;;;;;;;;;;:::i;168640:249::-;;;;;;;;;;-1:-1:-1;168640:249:0;;;;;:::i;:::-;;:::i;153001:194::-;;;;;;;;;;-1:-1:-1;153001:194:0;;;;;:::i;:::-;;:::i;197012:239::-;;;;;;;;;;-1:-1:-1;197012:239:0;;;;;:::i;:::-;;:::i;153505:138::-;;;;;;;;;;-1:-1:-1;153505:138:0;;;;;:::i;:::-;;:::i;205063:224::-;;;;;;;;;;;;;:::i;:::-;;;5127:4:1;5115:17;;;5097:36;;5085:2;5070:18;205063:224:0;4955:184:1;154642:251:0;;;;;;;;;;-1:-1:-1;154642:251:0;;;;;:::i;:::-;;:::i;205334:156::-;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;232421:340::-;;;;;;;;;;;;;:::i;194997:179::-;;;;;;;;;;;;;:::i;206136:110::-;;;;;;;;;;-1:-1:-1;206136:110:0;;;;;:::i;:::-;;:::i;197566:204::-;;;;;;;;;;-1:-1:-1;197566:204:0;;;;;:::i;:::-;;:::i;236187:139::-;;;;;;;;;;-1:-1:-1;236187:139:0;;;;;:::i;:::-;;:::i;:::-;;;;;;6141:4:1;6183:3;6172:9;6168:19;6160:27;;6233:10;6224:6;6218:13;6214:30;6203:9;6196:49;6313:14;6305:4;6297:6;6293:17;6287:24;6283:45;6276:4;6265:9;6261:20;6254:75;6397:14;6389:4;6381:6;6377:17;6371:24;6367:45;6360:4;6349:9;6345:20;6338:75;6498:1;6494;6489:3;6485:11;6481:19;6473:4;6465:6;6461:17;6455:24;6451:50;6444:4;6433:9;6429:20;6422:80;6558:4;6550:6;6546:17;6540:24;6533:4;6522:9;6518:20;6511:54;6635:4;6627:6;6623:17;6617:24;6610:32;6603:40;6596:4;6585:9;6581:20;6574:70;5997:653;;;;;189294:217:0;;;;;;:::i;:::-;;:::i;188827:136::-;;;;;;;;;;;;;:::i;226468:134::-;;;;;;;;;;-1:-1:-1;226468:134:0;;;;;:::i;:::-;;:::i;233323:315::-;;;;;;;;;;;;;:::i;236862:1087::-;;;;;;;;;;;;;:::i;140445:148::-;;;;;;;;;;;;;:::i;236449:119::-;;;;;;;;;;;;;:::i;198481:115::-;;;;;;;;;;;;;:::i;240157:164::-;;;;;;;;;;-1:-1:-1;240157:164:0;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;217014:1319::-;;;;;;;;;;-1:-1:-1;217014:1319:0;;;;;:::i;:::-;;:::i;227015:509::-;;;;;;;;;;-1:-1:-1;227015:509:0;;;;;:::i;:::-;;:::i;194691:115::-;;;;;;;;;;-1:-1:-1;194691:115:0;;;;;:::i;:::-;;:::i;166699:174::-;;;;;;;;;;-1:-1:-1;166699:174:0;;;;;:::i;:::-;;:::i;215020:1594::-;;;;;;;;;;-1:-1:-1;215020:1594:0;;;;;:::i;:::-;;:::i;192294:60::-;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;192294:60:0;;194814:175;;;;;;;;;;;;;:::i;225169:405::-;;;;;;;;;;-1:-1:-1;225169:405:0;;;;;:::i;:::-;;:::i;151945:210::-;;;;;;;;;;-1:-1:-1;151945:210:0;;;;;:::i;:::-;;:::i;227756:516::-;;;;;;;;;;-1:-1:-1;227756:516:0;;;;;:::i;:::-;;:::i;165533:151::-;;;;;;;;;;;;;:::i;234618:120::-;;;;;;;;;;;;;:::i;:::-;;;11226:10:1;11214:23;;;11196:42;;11184:2;11169:18;234618:120:0;11052:192:1;229521:1032:0;;;;;;;;;;-1:-1:-1;229521:1032:0;;;;;:::i;:::-;;:::i;150491:49::-;;;;;;;;;;-1:-1:-1;150491:49:0;150536:4;150491:49;;218541:1682;;;;;;;;;;-1:-1:-1;218541:1682:0;;;;;:::i;:::-;;:::i;167078:182::-;;;;;;;;;;-1:-1:-1;167078:182:0;;;;;:::i;:::-;;:::i;186892:58::-;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;186892:58:0;;;;;192361:56;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;192361:56:0;;207033:145;;;;;;;;;;-1:-1:-1;207033:145:0;;;;;:::i;:::-;;:::i;228374:154::-;;;;;;;;;;-1:-1:-1;228374:154:0;;;;;:::i;:::-;;:::i;232884:277::-;;;;;;;;;;;;;:::i;234390:114::-;;;;;;;;;;;;;:::i;197310:195::-;;;;;;;;;;-1:-1:-1;197310:195:0;;;;;:::i;:::-;;:::i;239301:159::-;;;;;;;;;;;;;:::i;222676:1021::-;;;;;;;;;;-1:-1:-1;222676:1021:0;;;;;:::i;:::-;;:::i;205727:150::-;;;;;;;;;;-1:-1:-1;205727:150:0;;;;;:::i;:::-;;:::i;226280:180::-;;;;;;;;;;-1:-1:-1;226280:180:0;;;;;:::i;:::-;;:::i;195856:457::-;;;;;;;;;;-1:-1:-1;195856:457:0;;;;;:::i;:::-;;:::i;206455:155::-;;;;;;;;;;-1:-1:-1;206455:155:0;;;;;:::i;:::-;;:::i;239684:128::-;;;;;;;;;;;;;:::i;153936:140::-;;;;;;;;;;-1:-1:-1;153936:140:0;;;;;:::i;:::-;;:::i;238032:519::-;;;;;;;;;;-1:-1:-1;238032:519:0;;;;;:::i;:::-;;:::i;239864:127::-;;;;;;;;;;;;;:::i;206661:114::-;;;;;;;;;;-1:-1:-1;206661:114:0;;;;;:::i;:::-;;:::i;167323:198::-;;;;;;;;;;-1:-1:-1;167323:198:0;;;;;:::i;:::-;;:::i;233765:522::-;;;;;;;;;;;;;:::i;196758:201::-;;;;;;;;;;-1:-1:-1;196758:201:0;;;;;:::i;:::-;;:::i;236662:113::-;;;;;;;;;;;;;:::i;228965:292::-;;;;;;;;;;-1:-1:-1;228965:292:0;;;;;:::i;:::-;;:::i;230561:594::-;;;;;;;;;;-1:-1:-1;230561:594:0;;;;;:::i;:::-;;:::i;223976:875::-;;;;;;;;;;-1:-1:-1;223976:875:0;;;;;:::i;:::-;;:::i;234943:909::-;;;;;;;;;;-1:-1:-1;234943:909:0;;;;;:::i;:::-;;:::i;:::-;;;;15465:25:1;;;15521:2;15506:18;;15499:34;;;;15438:18;234943:909:0;15291:248:1;225700:461:0;;;;;;;;;;-1:-1:-1;225700:461:0;;;;;:::i;:::-;;:::i;239514:117::-;;;;;;;;;;;;;:::i;231549:733::-;231630:7;231739:35;231777:33;:31;:33::i;:::-;231739:71;;231932:27;231962:24;:22;:24::i;:::-;231932:54;;231997:13;232029:19;232013:13;:11;:13::i;:::-;:35;;;;:::i;:::-;231997:51;;232059:27;232097:1;232089:5;:9;:75;;232163:1;232089:75;;;232155:5;232102:49;232124:27;232102:19;:49;:::i;:::-;232101:59;;;;:::i;:::-;232059:105;-1:-1:-1;232225:49:0;232059:105;232225:27;:49;:::i;:::-;232218:56;;;;;;231549:733;:::o;151649:204::-;151734:4;-1:-1:-1;;;;;;151758:47:0;;-1:-1:-1;;;151758:47:0;;:87;;-1:-1:-1;;;;;;;;;;92612:40:0;;;151809:36;151751:94;151649:204;-1:-1:-1;;151649:204:0:o;165267:147::-;165312:13;165338:22;165363:18;:16;:18::i;:::-;165338:43;;165399:1;:7;;165392:14;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;165267:147;:::o;205934:150::-;206004:7;206031:45;206048:6;206056:19;206031:16;:45::i;167840:190::-;167913:4;85764:10;167969:31;85764:10;167985:7;167994:5;167969:8;:31::i;:::-;-1:-1:-1;168018:4:0;;167840:190;-1:-1:-1;;;167840:190:0:o;207235:149::-;207305:7;207332:44;207349:6;207357:18;207332:16;:44::i;238758:403::-;238821:7;238841:27;238871:24;:22;:24::i;:::-;238841:54;;238906:36;238945:33;:31;:33::i;:::-;238906:72;;238989:19;239027;239011:13;:11;:13::i;:::-;:35;;;;:::i;:::-;238989:57;-1:-1:-1;239064:16:0;;:89;;239142:11;239088:50;239110:28;239088:19;:50;:::i;:::-;239087:66;;;;:::i;:::-;239064:89;;;239083:1;239064:89;239057:96;;;;;238758:403;:::o;220608:1930::-;-1:-1:-1;;;;;;;;;;;151385:16:0;151396:4;151385:10;:16::i;:::-;220802:29:::1;220834:13;:11;:13::i;:::-;220802:45;;221021:19;:17;:19::i;:::-;221001:16:::0;;220981:36:::1;::::0;-1:-1:-1;;;221001:16:0;::::1;-1:-1:-1::0;;;;;221001:16:0::1;220981:17:::0;:36:::1;:::i;:::-;-1:-1:-1::0;;;;;220981:60:0::1;;220977:102;;;221050:29;;-1:-1:-1::0;;;221050:29:0::1;;;;;;;;;;;220977:102;221176:1;221156:17;:15;:17::i;:::-;:21;;;;:::i;:::-;221146:6;:31;;;221142:67;;221186:23;;-1:-1:-1::0;;;221186:23:0::1;;;;;;;;;;;221142:67;221220:23;221246:1;:8;;221255:6;221246:16;;;;;;;;;;:::i;:::-;;::::0;;;::::1;::::0;;;221319:8:::1;::::0;::::1;:15:::0;221246:16:::1;::::0;;::::1;;::::0;-1:-1:-1;221319:19:0;221315:221:::1;;221380:8;::::0;::::1;:15:::0;:19:::1;::::0;221398:1:::1;::::0;221380:19:::1;:::i;:::-;221363:37;;:6;:37;;;221359:73;;221409:23;;-1:-1:-1::0;;;221409:23:0::1;;;;;;;;;;;221359:73;221315:221;;;221477:11;::::0;::::1;::::0;221473:47:::1;;221497:23;;-1:-1:-1::0;;;221497:23:0::1;;;;;;;;;;;221473:47;221556:15;::::0;::::1;::::0;::::1;;221552:60;;;221580:32;;-1:-1:-1::0;;;221580:32:0::1;;;;;;;;;;;221552:60;-1:-1:-1::0;;;;;221788:19:0;::::1;::::0;221784:239:::1;;221824:76;221857:10;221877:4;221884:15;-1:-1:-1::0;;;;;221824:76:0::1;221831:7;:5;:7::i;:::-;-1:-1:-1::0;;;;;221824:32:0::1;::::0;:76;;:32:::1;:76::i;:::-;221915:35:::0;;221935:15;;221915:35;;:16:::1;::::0;:35:::1;::::0;221935:15;;-1:-1:-1;;;221915:35:0;::::1;-1:-1:-1::0;;;;;221915:35:0::1;;:::i;:::-;;;;;;;;-1:-1:-1::0;;;;;221915:35:0::1;;;;;-1:-1:-1::0;;;;;221915:35:0::1;;;;;;221996:15;221965:5;:27;;;:46;;;;;;;;;;-1:-1:-1::0;;;;;221965:46:0::1;;;;;:::i;:::-;;;;;;;;-1:-1:-1::0;;;;;221965:46:0::1;;;;;-1:-1:-1::0;;;;;221965:46:0::1;;;;;;221784:239;222066:37:::0;;-1:-1:-1;;222066:37:0::1;;::::0;::::1;;::::0;;222114:48;;222145:17;;222114:48;;:27:::1;::::0;:48:::1;::::0;222145:17;;-1:-1:-1;;;222114:48:0;::::1;-1:-1:-1::0;;;;;222114:48:0::1;;:::i;:::-;;;;;;;;-1:-1:-1::0;;;;;222114:48:0::1;;;;;-1:-1:-1::0;;;;;222114:48:0::1;;;;;;222194:5;:27;;;222173:1;:17;;;:48;;;;;;;:::i;:::-;::::0;;;-1:-1:-1;;222232:37:0;;222252:17;;222232:37;;:16:::1;::::0;:37:::1;::::0;222252:17;;-1:-1:-1;;;222232:37:0;::::1;-1:-1:-1::0;;;;;222232:37:0::1;;:::i;:::-;::::0;;::::1;::::0;;;::::1;-1:-1:-1::0;;;;;222232:37:0;;::::1;;::::0;;::::1;::::0;;::::1;;;::::0;;;222280:15:::1;::::0;;::::1;:22:::0;;-1:-1:-1;;222280:22:0::1;-1:-1:-1::0;222280:22:0;;::::1;::::0;;;-1:-1:-1;222346:17:0;;::::1;222382:26:::0;;;222423:22;;::::1;:26:::0;222478:52:::1;::::0;17250:32:1;;;17232:51;;222478:52:0::1;::::0;::::1;::::0;-1:-1:-1;222478:52:0::1;::::0;17220:2:1;17205:18;222478:52:0::1;;;;;;;;220791:1747;;220608:1930:::0;;;;:::o;196522:179::-;-1:-1:-1;;;;;;;;;;;151385:16:0;151396:4;151385:10;:16::i;:::-;196652:40:::1;::::0;;-1:-1:-1;;;;;17510:32:1;;196652:40:0::1;::::0;::::1;17492:51:1::0;-1:-1:-1;;;;;17579:31:1;;;17559:18;;;17552:59;;;;17647:31;;;17627:18;;;17620:59;196637:56:0::1;::::0;196649:1:::1;::::0;17465:18:1;;196652:40:0::1;;;;;;;;;;;;;196637:11;:56::i;:::-;196522:179:::0;;;;:::o;166481:155::-;166533:7;166553:22;166578:18;:16;:18::i;:::-;166614:14;;;;166481:155;-1:-1:-1;;166481:155:0:o;168640:249::-;168727:4;85764:10;168785:37;168801:4;85764:10;168816:5;168785:15;:37::i;:::-;168833:26;168843:4;168849:2;168853:5;168833:9;:26::i;:::-;168877:4;168870:11;;;168640:249;;;;;;:::o;153001:194::-;153066:7;153086:30;153119:26;:24;:26::i;:::-;153163:8;:14;;;;;-1:-1:-1;;153163:14:0;;;:24;;;;153001:194::o;197012:239::-;-1:-1:-1;;;;;;;;;;;151385:16:0;151396:4;151385:10;:16::i;:::-;197123:52:::1;197135:1;197149:9;197160:13;;197138:36;;;;;;;;;;:::i;197123:52::-;197218:9;-1:-1:-1::0;;;;;197191:52:0::1;197206:10;-1:-1:-1::0;;;;;197191:52:0::1;;197229:13;;197191:52;;;;;;;:::i;:::-;;;;;;;;197012:239:::0;;;;:::o;153505:138::-;153579:18;153592:4;153579:12;:18::i;:::-;151385:16;151396:4;151385:10;:16::i;:::-;153610:25:::1;153621:4;153627:7;153610:10;:25::i;205063:224::-:0;205155:5;205173:24;205200:20;:18;:20::i;:::-;205173:47;-1:-1:-1;212104:5:0;205238:21;;:41;;;-1:-1:-1;;;205238:21:0;;;;:41;:::i;:::-;205231:48;;;205063:224;:::o;154642:251::-;-1:-1:-1;;;;;154736:34:0;;85764:10;154736:34;154732:104;;154794:30;;-1:-1:-1;;;154794:30:0;;;;;;;;;;;154732:104;154848:37;154860:4;154866:18;154848:11;:37::i;:::-;;154642:251;;:::o;205334:156::-;205380:7;205400:24;205427:20;:18;:20::i;:::-;205473:8;-1:-1:-1;;;;;205473:8:0;;205334:156;-1:-1:-1;;205334:156:0:o;232421:340::-;232485:7;232505:34;232542:17;:15;:17::i;:::-;232631:13;;;;;:65;;-1:-1:-1;;;232631:65:0;;232505:54;;-1:-1:-1;232609:19:0;;-1:-1:-1;;;;;232631:13:0;;;;:25;;:65;;232665:4;;232609:19;;232631:65;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;:71;-1:-1:-1;;;;;232609:93:0;;-1:-1:-1;232721:17:0;232735:3;232609:93;232721:17;:::i;:::-;232713:26;;;;232421:340;:::o;194997:179::-;195049:31;-1:-1:-1;;;;;;;;;;;195069:10:0;195049:7;:31::i;:::-;195048:32;:66;;;;;195085:29;-1:-1:-1;;;;;;;;;;;195103:10:0;195085:7;:29::i;:::-;195084:30;195048:66;195044:103;;;195123:24;;-1:-1:-1;;;195123:24:0;;;;;;;;;;;195044:103;195158:10;:8;:10::i;:::-;194997:179::o;206136:110::-;-1:-1:-1;;;206221:17:0;206136:110::o;197566:204::-;-1:-1:-1;;;;;;;;;;;151385:16:0;151396:4;151385:10;:16::i;:::-;197678:24:::1;::::0;;20055:10:1;20043:23;;197678:24:0::1;::::0;::::1;20025:42:1::0;-1:-1:-1;;;;;20103:32:1;;20083:18;;;20076:60;;;;197662:41:0::1;::::0;197674:2:::1;::::0;19998:18:1;;197678:24:0::1;19853:289:1::0;197662:41:0::1;197746:5;197719:43;;197734:10;-1:-1:-1::0;;;;;197719:43:0::1;;197753:1;197756:5;197719:43;;;;;;;:::i;:::-;;;;;;;;197566:204:::0;;;:::o;236187:139::-;-1:-1:-1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;236283:13:0;:11;:13::i;:::-;:20;;236311:5;236283:35;;;;;;;;;;:::i;:::-;;;;;;;;;;236276:42;;;;;;;;236283:35;;;;;;;;236276:42;;;;;;;-1:-1:-1;;;236276:42:0;;;;;;;;;;;;;-1:-1:-1;;;236276:42:0;;;;;;;;;;;;-1:-1:-1;;;236276:42:0;;;-1:-1:-1;;;;;236276:42:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;236187:139:0:o;189294:217::-;187748:13;:11;:13::i;:::-;189410:36:::1;189428:17;189410;:36::i;:::-;189457:46;189479:17;189498:4;189457:21;:46::i;:::-;189294:217:::0;;:::o;188827:136::-;188896:7;188028:20;:18;:20::i;:::-;-1:-1:-1;;;;;;;;;;;;188827:136:0;:::o;226468:134::-;-1:-1:-1;;;;;;;;;;;151385:16:0;151396:4;151385:10;:16::i;:::-;226583:11:::1;226551:13;:11;:13::i;:::-;:29;;:43:::0;;-1:-1:-1;;;;;;226551:43:0::1;-1:-1:-1::0;;;;;226551:43:0;;;::::1;::::0;;;::::1;::::0;;-1:-1:-1;;226468:134:0:o;233323:315::-;233383:6;233402:34;233439:17;:15;:17::i;:::-;233536:13;;;;;:52;;-1:-1:-1;;;233536:52:0;;233524:9;233536:52;;;20639:42:1;;;233582:4:0;20697:18:1;;;20690:60;233536:13:0;;-1:-1:-1;233524:9:0;;-1:-1:-1;;;;;233536:13:0;;;;:34;;20612:18:1;;233536:52:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;:65;233619:11;;;233323:315;-1:-1:-1;;;233323:315:0:o;236862:1087::-;236926:7;237001:20;237031:7;:5;:7::i;:::-;-1:-1:-1;;;;;237024:25:0;;237058:4;237024:40;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;237001:63;;237075:29;237107:13;:11;:13::i;:::-;237178:16;;;;-1:-1:-1;237131:29:0;;237163:31;;-1:-1:-1;;;237178:16:0;;-1:-1:-1;;;;;237178:16:0;237163:12;:31;:::i;:::-;237131:63;;237292:16;237311:21;:19;:21::i;:::-;237292:40;;237343:17;237363:20;:18;:20::i;:::-;237343:40;;237394:16;237413:25;:23;:25::i;:::-;237394:44;;237449:16;237468:25;:23;:25::i;:::-;237449:44;-1:-1:-1;237699:18:0;237823:9;237449:44;237792:8;237733:49;237772:9;237740:21;237733:49;:::i;:::-;:68;;;;:::i;:::-;:87;;;;:::i;:::-;:99;;;;:::i;:::-;237699:133;;237913:1;237899:11;:15;:42;;237940:1;237899:42;;;237925:11;237899:42;237892:49;;;;;;;;;;236862:1087;:::o;140445:148::-;140492:4;140509:25;140537:21;:19;:21::i;:::-;140576:9;;;;140445:148;-1:-1:-1;;140445:148:0:o;236449:119::-;236504:7;236531:13;:11;:13::i;:::-;:29;;;236524:36;;236449:119;:::o;198481:115::-;198529:11;198560:17;:15;:17::i;:::-;:28;;;-1:-1:-1;;;;;198560:28:0;;198481:115;-1:-1:-1;198481:115:0:o;240157:164::-;240229:26;240275:13;:11;:13::i;:::-;-1:-1:-1;;;;;240275:38:0;;;;;;:32;;;;;:38;;;;;;;;240268:45;;;;;;;;;;;;;;;;;;;240275:38;;240268:45;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;240268:45:0;;;;-1:-1:-1;;;240268:45:0;;;;;;;;;;;;;;;;;;;;;;;;;240157:164;;;:::o;217014:1319::-;90419:21;:19;:21::i;:::-;140050:19:::1;:17;:19::i;:::-;217108:6:::2;-1:-1:-1::0;;;;;217108:11:0::2;217118:1;217108:11:::0;217104:49:::2;;217128:25;;-1:-1:-1::0;;;217128:25:0::2;;;;;;;;;;;217104:49;217166:29;217198:13;:11;:13::i;:::-;217284:8;::::0;::::2;:15:::0;217166:45;;-1:-1:-1;85764:10:0;;217222:12:::2;::::0;217284:19:::2;::::0;217302:1:::2;::::0;217284:19:::2;:::i;:::-;217262:42;;217353:19;217359:4;217365:6;-1:-1:-1::0;;;;;217353:19:0::2;:5;:19::i;:::-;-1:-1:-1::0;;;;;217409:26:0;::::2;217385:21;217409:26:::0;;;:20:::2;::::0;::::2;:26;::::0;;;;:33;;217504:18;;;217500:639:::2;;-1:-1:-1::0;;;;;217539:26:0;::::2;;::::0;;;:20:::2;::::0;::::2;:26;::::0;;;;;;;217571:51;;;;::::2;::::0;;;-1:-1:-1;;;;;217571:51:0;;::::2;::::0;;::::2;::::0;;::::2;::::0;;::::2;::::0;;;217539:84;;::::2;::::0;::::2;::::0;;;;;;;;;;;;;;::::2;::::0;;;;;;::::2;-1:-1:-1::0;;;217539:84:0::2;-1:-1:-1::0;;;;;;217539:84:0;;;;::::2;::::0;::::2;::::0;;217500:639:::2;;;-1:-1:-1::0;;;;;217698:26:0;::::2;217656:39;217698:26:::0;;;:20:::2;::::0;::::2;:26;::::0;;;;217725:17:::2;217741:1;217725:13:::0;:17:::2;:::i;:::-;217698:45;;;;;;;;:::i;:::-;;::::0;;;::::2;::::0;;;::::2;217836:19:::0;;217698:45;;-1:-1:-1;217836:27:0::2;::::0;;::::2;-1:-1:-1::0;;;217836:19:0;;::::2;;:27;217832:296;;;-1:-1:-1::0;;;;;217884:26:0;::::2;;::::0;;;:20:::2;::::0;::::2;:26;::::0;;;;;;;217916:51;;;;::::2;::::0;;;-1:-1:-1;;;;;217916:51:0;;::::2;::::0;;::::2;::::0;;::::2;::::0;;::::2;::::0;;;217884:84;;::::2;::::0;::::2;::::0;;;;;;;;;;;;;;::::2;::::0;;;;;;::::2;-1:-1:-1::0;;;217884:84:0::2;-1:-1:-1::0;;;;;;217884:84:0;;;;::::2;::::0;::::2;::::0;;217832:296:::2;;;218082:30:::0;;218106:6;;218082:13;;:20:::2;::::0;:30:::2;::::0;218106:6;;-1:-1:-1;;;;;218082:30:0::2;;:::i;:::-;;;;;;;;-1:-1:-1::0;;;;;218082:30:0::2;;;;;-1:-1:-1::0;;;;;218082:30:0::2;;;;;;217832:296;217641:498;217500:639;218223:6;-1:-1:-1::0;;;;;218182:47:0::2;:1;:8;;218191:5;218182:15;;;;;;;;;;:::i;:::-;;;;;;;;;;;:37;;;:47;;;;;;;:::i;:::-;;;;;;;;218261:6;-1:-1:-1::0;;;;;218240:27:0::2;:1;:17;;;:27;;;;;;;:::i;:::-;::::0;;;-1:-1:-1;;218285:40:0::2;::::0;;-1:-1:-1;;;;;22408:32:1;;22390:51;;22489:10;22477:23;;22472:2;22457:18;;22450:51;-1:-1:-1;;;;;218285:40:0;::::2;::::0;::::2;::::0;22363:18:1;218285:40:0::2;;;;;;;217093:1240;;;;90463:20:::0;:18;:20::i;:::-;217014:1319;:::o;227015:509::-;227208:14;90419:21;:19;:21::i;:::-;140050:19:::1;:17;:19::i;:::-;227240:34:::2;227277:17;:15;:17::i;:::-;227240:54:::0;-1:-1:-1;;;;;;227309:22:0;::::2;227305:60;;227340:25;;-1:-1:-1::0;;;227340:25:0::2;;;;;;;;;;;227305:60;227389:13;::::0;::::2;::::0;-1:-1:-1;;;;;227389:13:0::2;227380:22:::0;::::2;227376:65;;;227411:30;;-1:-1:-1::0;;;227411:30:0::2;;;;;;;;;;;227376:65;227461:31;227475:6;227483:8;227461:13;:31::i;:::-;227452:40;;227503:13;90463:20:::0;:18;:20::i;194691:115::-;-1:-1:-1;;;;;;;;;;;151385:16:0;151396:4;151385:10;:16::i;:::-;194792:6:::1;194766:17;:15;:17::i;:::-;:23;;:32:::0;;-1:-1:-1;;;;;;194766:32:0::1;-1:-1:-1::0;;;;;194766:32:0;;;::::1;::::0;;;::::1;::::0;;-1:-1:-1;;194691:115:0:o;166699:174::-;166764:7;166784:22;166809:18;:16;:18::i;:::-;-1:-1:-1;;;;;166845:20:0;;;:11;:20;;;;;;;;-1:-1:-1;;166845:20:0;;;;;166699:174::o;215020:1594::-;23723:30;23756:26;:24;:26::i;:::-;23870:15;;23723:59;;-1:-1:-1;23870:15:0;-1:-1:-1;;;23870:15:0;;;23869:16;;-1:-1:-1;;;;;23917:14:0;23847:19;24302:16;;:34;;;;;24322:14;24302:34;24282:54;;24347:17;24367:11;-1:-1:-1;;;;;24367:16:0;24382:1;24367:16;:50;;;;-1:-1:-1;24395:4:0;24387:25;:30;24367:50;24347:70;;24435:12;24434:13;:30;;;;;24452:12;24451:13;24434:30;24430:93;;;24488:23;;-1:-1:-1;;;24488:23:0;;;;;;;;;;;24430:93;24533:18;;-1:-1:-1;;24533:18:0;24550:1;24533:18;;;24562:69;;;;24597:22;;-1:-1:-1;;;;24597:22:0;-1:-1:-1;;;24597:22:0;;;24562:69;215350:39:::1;-1:-1:-1::0;;;;;;;;;;;215350:14:0::1;:39::i;:::-;215400:24;:22;:24::i;:::-;215435:26;215448:4;215454:6;215435:12;:26::i;:::-;-1:-1:-1::0;;;;;215504:20:0;::::1;215500:58;;215533:25;;-1:-1:-1::0;;;215533:25:0::1;;;;;;;;;;;215500:58;-1:-1:-1::0;;;;;215573:18:0;::::1;215569:56;;215600:25;;-1:-1:-1::0;;;215600:25:0::1;;;;;;;;;;;215569:56;-1:-1:-1::0;;;;;215640:27:0;::::1;215636:65;;215676:25;;-1:-1:-1::0;;;215676:25:0::1;;;;;;;;;;;215636:65;215730:10;215716:11;:24;215712:65;;;215749:28;;-1:-1:-1::0;;;215749:28:0::1;;;;;;;;;;;215712:65;1039:3;215823:14;:45;215819:89;;;215877:31;;-1:-1:-1::0;;;215877:31:0::1;;;;;;;;;;;215819:89;215972:80;215982:4;215988:13;216003:11;216016:6;216024:14;216040:11;215972:9;:80::i;:::-;216065:29;216097:13;:11;:13::i;:::-;216186:256;::::0;;::::1;::::0;::::1;::::0;;-1:-1:-1;216186:256:0;;;::::1;216260:15;216186:256:::0;::::1;;::::0;;::::1;::::0;;;;;;;;;;;;;;;;;;;;;;;;;;;216158:8:::1;::::0;::::1;:295:::0;;216186:256;216158:295;;::::1;::::0;;;;;;;;;;::::1;::::0;;::::1;::::0;;::::1;::::0;;;;;;;;-1:-1:-1;;;;;216158:295:0;;::::1;-1:-1:-1::0;;;216158:295:0::1;::::0;;::::1;-1:-1:-1::0;;;216158:295:0::1;::::0;-1:-1:-1;;;;;216158:295:0;;;::::1;-1:-1:-1::0;;;216158:295:0::1;-1:-1:-1::0;;;;;;216158:295:0;;;216186:256:::1;216158:295:::0;;;::::1;::::0;;;;;;;::::1;::::0;;;;;;;;;;;::::1;::::0;;;;;;::::1;::::0;;;;;;::::1;::::0;;::::1;::::0;;;::::1;;-1:-1:-1::0;;216158:295:0;;::::1;::::0;;;::::1;::::0;;;216065:45;;-1:-1:-1;216490:38:0::1;::::0;216521:6;216490:10:::1;:38::i;:::-;;216539:30;-1:-1:-1::0;;;;;;;;;;;216562:6:0::1;216539:10;:30::i;:::-;;216580:26;-1:-1:-1::0;;;;;;;;;;;216601:4:0::1;216580:10;:26::i;:::-;;215339:1275;24657:14:::0;24653:104;;;24688:23;;-1:-1:-1;;;;24688:23:0;;;24731:14;;-1:-1:-1;22665:50:1;;24731:14:0;;22653:2:1;22638:18;24731:14:0;;;;;;;24653:104;23655:1109;;;;;215020:1594;;;;;;;;:::o;194814:175::-;194864:31;-1:-1:-1;;;;;;;;;;;194884:10:0;194864:7;:31::i;:::-;194863:32;:66;;;;;194900:29;-1:-1:-1;;;;;;;;;;;194918:10:0;194900:7;:29::i;:::-;194899:30;194863:66;194859:103;;;194938:24;;-1:-1:-1;;;194938:24:0;;;;;;;;;;;194859:103;194973:8;:6;:8::i;225169:405::-;-1:-1:-1;;;;;;;;;;;151385:16:0;151396:4;151385:10;:16::i;:::-;1039:3:::1;225331:14;:45;;;225327:89;;;225385:31;;-1:-1:-1::0;;;225385:31:0::1;;;;;;;;;;;225327:89;225427:33;225463:17;:15;:17::i;:::-;225491:15;::::0;::::1;:32:::0;;-1:-1:-1;;;;225491:32:0::1;-1:-1:-1::0;;;225491:32:0::1;::::0;::::1;::::0;;::::1;::::0;;;::::1;::::0;;;225539:27:::1;::::0;11196:42:1;;;225491:15:0;;-1:-1:-1;225539:27:0::1;::::0;11184:2:1;11169:18;225539:27:0::1;;;;;;;225316:258;225169:405:::0;;:::o;151945:210::-;152022:4;152039:30;152072:26;:24;:26::i;:::-;152116:8;:14;;;;;;;;;;;-1:-1:-1;;;;;152116:31:0;;;;;;;;;-1:-1:-1;;152116:31:0;;;;;;151945:210::o;227756:516::-;227946:14;90419:21;:19;:21::i;:::-;140050:19:::1;:17;:19::i;:::-;227978:34:::2;228015:17;:15;:17::i;:::-;227978:54:::0;-1:-1:-1;;;;;;228047:22:0;::::2;228043:60;;228078:25;;-1:-1:-1::0;;;228078:25:0::2;;;;;;;;;;;228043:60;228140:13;::::0;::::2;::::0;-1:-1:-1;;;;;228140:13:0::2;228118:19;228130:6:::0;228118:11:::2;:19::i;:::-;:35;228114:78;;;228162:30;;-1:-1:-1::0;;;228162:30:0::2;;;;;;;;;;;228114:78;228212:28;228223:6;228231:8;228212:10;:28::i;165533:151::-:0;165580:13;165606:22;165631:18;:16;:18::i;:::-;165606:43;;165667:1;:9;;165660:16;;;;;:::i;234618:120::-;234672:6;234698:13;:11;:13::i;:::-;:32;;;;234618:120;-1:-1:-1;234618:120:0:o;229521:1032::-;229765:7;-1:-1:-1;;;;;;;;;;;151385:16:0;151396:4;151385:10;:16::i;:::-;140050:19:::1;:17;:19::i;:::-;90419:21:::2;:19;:21::i;:::-;229794:47:::3;::::0;-1:-1:-1;;;229794:47:0;;229844:13;;-1:-1:-1;;;;;;;;;;;451:42:0;229794:32:::3;::::0;:47:::3;::::0;229835:4:::3;::::0;229794:47:::3;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;:63;229790:132;;;229881:29;;-1:-1:-1::0;;;229881:29:0::3;;;;;;;;;;;229790:132;229932:29;229964:13;:11;:13::i;:::-;229932:45:::0;-1:-1:-1;229990:78:0::3;-1:-1:-1::0;;;;;;;;;;;1175:42:0::3;230054:13:::0;229990:35:::3;:78::i;:::-;230079:16;230111:104;-1:-1:-1::0;;;;;;;;;;;;;;;;;;;;;;230167:13:0::3;230182:12;-1:-1:-1::0;;;;;230111:104:0::3;1091:3;230111:22;:104::i;:::-;230079:136;;230262:8;230228:1;:22;;;:43;;;;;;;;;;-1:-1:-1::0;;;;;230228:43:0::3;;;;;:::i;:::-;;;;;;;;-1:-1:-1::0;;;;;230228:43:0::3;;;;;-1:-1:-1::0;;;;;230228:43:0::3;;;;;;230316:13;-1:-1:-1::0;;;;;230282:48:0::3;:1;:22;;;:48;;;;;;;:::i;:::-;::::0;;;-1:-1:-1;;230341:91:0;::::3;;;230383:37:::0;;230411:8;;230383:37;;:16:::3;::::0;:37:::3;::::0;230411:8;;-1:-1:-1;;;230383:37:0;::::3;-1:-1:-1::0;;;;;230383:37:0::3;;:::i;:::-;;;;;;;;-1:-1:-1::0;;;;;230383:37:0::3;;;;;-1:-1:-1::0;;;;;230383:37:0::3;;;;;;230341:91;230449:70;::::0;;15465:25:1;;;15521:2;15506:18;;15499:34;;;-1:-1:-1;;;;;;;;;;;534:42:0;-1:-1:-1;;;;;;;;;;;451:42:0;230449:70:::3;::::0;15438:18:1;230449:70:0::3;;;;;;;230537:8:::0;-1:-1:-1;;90463:20:0::2;:18;:20::i;:::-;229521:1032:::0;;;;;;:::o;218541:1682::-;90419:21;:19;:21::i;:::-;218613:29:::1;218645:13;:11;:13::i;:::-;218613:45;;218669:34;218706:17;:15;:17::i;:::-;-1:-1:-1::0;;;;;218773:26:0;::::1;218734:36;218773:26:::0;;;:20:::1;::::0;::::1;:26;::::0;;;;218852:15;;218669:54;;-1:-1:-1;218773:26:0;218852:20;;218848:63:::1;;218881:30;;-1:-1:-1::0;;;218881:30:0::1;;;;;;;;;;;218848:63;219072:15:::0;;218924:24:::1;::::0;;;219098:374:::1;219116:3:::0;::::1;::::0;::::1;:::i;:::-;;;;219220:1;:8;;219229;219238:1;219229:11;;;;;;;;:::i;:::-;;::::0;;;::::1;::::0;;;::::1;:17:::0;219220:27;;-1:-1:-1;;;219229:17:0;;::::1;;;::::0;219220:27;::::1;;;;;:::i;:::-;;::::0;;;::::1;::::0;;;:37:::1;:27;::::0;;::::1;;:37;::::0;::::1;;219215:52:::0;219259:8:::1;219215:52;219304:31;219323:8;219332:1;219323:11;;;;;;;;:::i;:::-;;;;;;;;219304:18;:31::i;:::-;219284:51;::::0;;::::1;:::i;:::-;;;219367:8;219376:1;219367:11;;;;;;;;:::i;:::-;;::::0;;;::::1;::::0;;;::::1;:18:::0;219350:35:::1;::::0;-1:-1:-1;;;;;219367:18:0::1;219350:35:::0;::::1;:::i;:::-;;;219434:8;219443:1;219434:11;;;;;;;;:::i;:::-;;::::0;;;::::1;::::0;;;::::1;219427:18:::0;;-1:-1:-1;;;;;;219427:18:0;;;219098:374:::1;219469:1;219465;:5;219098:374;;219488:16;219508:1;219488:21:::0;219484:67:::1;;219518:33;;-1:-1:-1::0;;;219518:33:0::1;;;;;;;;;;;219484:67;219625:15:::0;;:19;;;;:64:::1;;-1:-1:-1::0;219657:15:0;;219648:8;;219657:19:::1;::::0;219675:1:::1;::::0;219657:19:::1;:::i;:::-;219648:29;;;;;;;;:::i;:::-;;::::0;;;::::1;::::0;;;::::1;:36:::0;-1:-1:-1;;;;;219648:36:0::1;:41:::0;219625:64:::1;219618:87;;;219691:8;:14;;;;;;;:::i;:::-;;::::0;;;::::1;::::0;;;;-1:-1:-1;;219691:14:0;;;;;-1:-1:-1;;;;;;219691:14:0;;;;;;219618:87:::1;;;219764:45:::0;;219792:16;;219764:45;;:16:::1;::::0;:45:::1;::::0;219792:16;;-1:-1:-1;;;219764:45:0;::::1;-1:-1:-1::0;;;;;219764:45:0::1;;:::i;:::-;;;;;;;;-1:-1:-1::0;;;;;219764:45:0::1;;;;;-1:-1:-1::0;;;;;219764:45:0::1;;;;;;219861:11;219875:50;219907:16;219875:23;:50::i;:::-;219965:15;::::0;::::1;::::0;219861:64;;-1:-1:-1;219936:50:0::1;::::0;-1:-1:-1;;;;;219965:15:0::1;219861:64:::0;219943:7:::1;:5;:7::i;:::-;-1:-1:-1::0;;;;;219936:28:0::1;::::0;:50;:28:::1;:50::i;:::-;219999:18;220020:22;220039:3:::0;220020:16;:22:::1;:::i;:::-;219999:43;;220101:46;220130:4;220136:10;220108:7;:5;:7::i;220101:46::-;220165:50;::::0;;15465:25:1;;;15521:2;15506:18;;15499:34;;;-1:-1:-1;;;;;220165:50:0;::::1;::::0;::::1;::::0;15438:18:1;220165:50:0::1;;;;;;;218602:1621;;;;;;;;90463:20:::0;:18;:20::i;167078:182::-;167147:4;85764:10;167203:27;85764:10;167220:2;167224:5;167203:9;:27::i;207033:145::-;207099:7;207126:44;207143:6;207151:18;207126:16;:44::i;228374:154::-;228489:31;;-1:-1:-1;;;228489:31:0;;23602:2:1;228489:31:0;;;23584:21:1;23641:2;23621:18;;;23614:30;-1:-1:-1;;;23660:18:1;;;23653:51;228469:7:0;;23721:18:1;;228489:31:0;;;;;;;;232884:277;232948:7;232968:34;233005:17;:15;:17::i;:::-;233051:13;;;;;:65;;-1:-1:-1;;;233051:65:0;;232968:54;;-1:-1:-1;233033:15:0;;-1:-1:-1;;;;;233051:13:0;;;;:25;;:65;;233085:4;;853:3;;233051:65;;:::i;234390:114::-;234438:7;234495:1;234465:13;:11;:13::i;:::-;:20;;:27;:31;;;;:::i;:::-;234458:38;;234390:114;:::o;197310:195::-;-1:-1:-1;;;;;;;;;;;151385:16:0;151396:4;151385:10;:16::i;:::-;197417:22:::1;::::0;;23950:10:1;23938:23;;197417:22:0::1;::::0;::::1;23920:42:1::0;-1:-1:-1;;;;;23998:31:1;;23978:18;;;23971:59;;;;197401:39:0::1;::::0;197413:2:::1;::::0;23893:18:1;;197417:22:0::1;23750:286:1::0;197401:39:0::1;197483:5;197456:41;;197471:10;-1:-1:-1::0;;;;;197456:41:0::1;;197490:3;197495:1;197456:41;;;;;;;:::i;239301:159::-:0;239354:7;239424:13;:11;:13::i;:::-;:28;-1:-1:-1;;;239424:28:0;;-1:-1:-1;;;;;239424:28:0;239388:7;:5;:7::i;:::-;-1:-1:-1;;;;;239381:25:0;;239415:4;239381:40;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;:71;;;;:::i;222676:1021::-;-1:-1:-1;;;;;;;;;;;151385:16:0;151396:4;151385:10;:16::i;:::-;222759:29:::1;222791:13;:11;:13::i;:::-;222759:45;;222817:13;222833:17;:15;:17::i;:::-;222817:33;;222861:16;222887:15;222861:42;;222914:27;222944:1;:8;;222953:5;222944:15;;;;;;;;:::i;:::-;;::::0;;;::::1;::::0;;;::::1;::::0;;::::1;;222970:29:::0;;-1:-1:-1;;;;222970:29:0::1;-1:-1:-1::0;;;222970:29:0::1;::::0;::::1;;;::::0;;222944:15;-1:-1:-1;223016:10:0;;;::::1;::::0;:44:::1;;-1:-1:-1::0;223031:8:0::1;::::0;::::1;223040:9;223048:1;223040:5:::0;:9:::1;:::i;:::-;223031:19;;;;;;;;:::i;:::-;;::::0;;;::::1;::::0;;;:29:::1;:19;::::0;;::::1;;:29;::::0;::::1;;223030:30;223016:44;223012:93;;;223069:36;;-1:-1:-1::0;;;223069:36:0::1;;;;;;;;;;;223012:93;223146:1;:8;;223174:258;;;;;;;;223217:5;223225:1;223217:9;;;;:::i;:::-;223174:258;::::0;;::::1;::::0;;::::1;::::0;;::::1;;::::0;;::::1;::::0;;;;-1:-1:-1;223174:258:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;223146:297;;223174:258;223146:297;;::::1;::::0;;;;;;;;;;::::1;::::0;;::::1;;::::0;;;;::::1;::::0;;;::::1;::::0;;;::::1;::::0;-1:-1:-1;;;;;223146:297:0;;::::1;-1:-1:-1::0;;;223146:297:0::1;::::0;;::::1;-1:-1:-1::0;;;223146:297:0::1;::::0;;-1:-1:-1;;;;;223146:297:0;;;::::1;-1:-1:-1::0;;;223146:297:0::1;-1:-1:-1::0;;;;;;223146:297:0;;;;;;::::1;::::0;;;;;;;::::1;::::0;;;;;;;;;;;::::1;::::0;;;;::::1;::::0;;;::::1;::::0;;;;::::1;::::0;::::1;::::0;;::::1;::::0;;;::::1;;-1:-1:-1::0;;223146:297:0;;::::1;::::0;;;::::1;::::0;;223499:33;::::1;:17:::0;;::::1;223547:26:::0;223588:22;;::::1;:26:::0;223654:9:::1;::::0;:5;;:9:::1;:::i;:::-;223641:48;::::0;24526:14:1;223672:15:0::1;24514:27:1::0;24496:46;;223641:48:0::1;::::0;24484:2:1;24469:18;223641:48:0::1;24351:197:1::0;205727:150:0;205797:7;205824:45;205841:6;205849:19;205824:16;:45::i;226280:180::-;-1:-1:-1;;;;;;;;;;;151385:16:0;151396:4;151385:10;:16::i;:::-;226395:11:::1;-1:-1:-1::0;;;;;226364:42:0::1;:17;:15;:17::i;:::-;:28;;:42:::0;;-1:-1:-1;;;;;;226364:42:0::1;-1:-1:-1::0;;;;;226364:42:0;;;::::1;::::0;;;::::1;::::0;;226422:30:::1;::::0;-1:-1:-1;;;;;22683:31:1;;22665:50;;226422:30:0::1;::::0;22653:2:1;22638:18;226422:30:0::1;;;;;;;226280:180:::0;;:::o;195856:457::-;-1:-1:-1;;;;;;;;;;;151385:16:0;151396:4;151385:10;:16::i;:::-;196244:60:::1;::::0;;25082:10:1;25070:23;;196244:60:0::1;::::0;::::1;25052:42:1::0;25137:14;;25130:22;25110:18;;;25103:50;;;;-1:-1:-1;;;;;25189:31:1;;;25169:18;;;25162:59;25257:31;;25237:18;;;25230:59;25333:14;;25326:22;25305:19;;;25298:51;25398:4;25386:17;;25365:19;;;25358:46;-1:-1:-1;;;;;25441:32:1;;25420:19;;;25413:61;196229:76:0::1;::::0;196241:1:::1;::::0;25024:19:1;;196244:60:0::1;24759:721:1::0;196229:76:0::1;195856:457:::0;;;;;;;;:::o;206455:155::-;206520:7;206547:55;206564:16;206574:5;206564:9;:16::i;:::-;206582:19;206547:16;:55::i;239684:128::-;239743:7;239770:13;:11;:13::i;:::-;:34;;;-1:-1:-1;;;239770:34:0;;-1:-1:-1;;;;;239770:34:0;;;-1:-1:-1;239684:128:0:o;153936:140::-;154011:18;154024:4;154011:12;:18::i;:::-;151385:16;151396:4;151385:10;:16::i;:::-;154042:26:::1;154054:4;154060:7;154042:11;:26::i;238032:519::-:0;238106:7;238138:17;:15;:17::i;:::-;238130:5;:25;238126:61;;;238164:23;;-1:-1:-1;;;238164:23:0;;;;;;;;;;;238126:61;238198:27;238228:13;:11;:13::i;:::-;:20;;238256:5;238228:35;;;;;;;;;;:::i;:::-;;;;;;;;;;;:57;;;238198:87;;238296:36;238335:33;:31;:33::i;:::-;238296:72;;238379:19;238417;238401:13;:11;:13::i;:::-;:35;;;;:::i;:::-;238379:57;-1:-1:-1;238454:16:0;;:89;;238532:11;238478:50;238500:28;238478:19;:50;:::i;:::-;238477:66;;;;:::i;:::-;238454:89;;;238473:1;238454:89;238447:96;238032:519;-1:-1:-1;;;;;238032:519:0:o;239864:127::-;239922:7;239949:13;:11;:13::i;:::-;:34;;;239942:41;;239864:127;:::o;206661:114::-;206724:7;206751:16;206761:5;206751:9;:16::i;167323:198::-;167403:7;167423:22;167448:18;:16;:18::i;:::-;-1:-1:-1;;;;;167484:20:0;;;;;;;:13;;;;;:20;;;;;;;;:29;;;;;;;;;;-1:-1:-1;;167484:29:0;;;167323:198::o;233765:522::-;233824:7;233844:34;233881:17;:15;:17::i;:::-;233932:13;;;;;:49;;-1:-1:-1;;;233932:49:0;;748:3;233932:49;;;25629:38:1;;;;233932:13:0;;-1:-1:-1;233909:20:0;;-1:-1:-1;;;;;233932:13:0;;:22;;25602:18:1;;233932:49:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1;;;;;233909:72:0;;;234006:15;-1:-1:-1;;;;;;;;;;;;;;;;234024:32:0;;234065:4;234024:47;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;234006:65;-1:-1:-1;234275:4:0;234249:22;234259:12;234006:65;234249:22;:::i;:::-;234248:31;;;;:::i;196758:201::-;-1:-1:-1;;;;;;;;;;;151385:16:0;151396:4;151385:10;:16::i;:::-;196863:23:::1;::::0;;-1:-1:-1;;;;;26116:31:1;;196863:23:0::1;::::0;::::1;26098:50:1::0;26191:14;;26184:22;26164:18;;;26157:50;;;;196848:39:0::1;::::0;196860:1:::1;::::0;26071:18:1;;196863:23:0::1;25932:281:1::0;196848:39:0::1;196903:48;::::0;;196940:1:::1;26399:25:1::0;;;-1:-1:-1;;;;;26460:31:1;;26455:2;26440:18;;26433:59;196940:1:0;196920:10:::1;::::0;196903:48:::1;::::0;26372:18:1;196903:48:0::1;26218:280:1::0;236662:113:0;236712:7;236739:13;:11;:13::i;:::-;:28;-1:-1:-1;;;236739:28:0;;-1:-1:-1;;;;;236739:28:0;;;-1:-1:-1;236662:113:0:o;228965:292::-;-1:-1:-1;;;;;;;;;;;151385:16:0;151396:4;151385:10;:16::i;:::-;229071:22:::1;:20;:22::i;:::-;229061:7;:32;229057:74;;;229102:29;;-1:-1:-1::0;;;229102:29:0::1;;;;;;;;;;;229057:74;229142:34;229168:7;229142:25;:34::i;:::-;229192:57;::::0;160:25:1;;;-1:-1:-1;;;;;632:42:0;229192:57:::1;::::0;148:2:1;133:18;229192:57:0::1;;;;;;;;228965:292:::0;;:::o;230561:594::-;140050:19;:17;:19::i;:::-;-1:-1:-1;;;;;;;;;;;151385:16:0::1;151396:4;151385:10;:16::i;:::-;230786:29:::2;230818:13;:11;:13::i;:::-;230786:45:::0;-1:-1:-1;;;;;;230846:45:0;::::2;-1:-1:-1::0;;;;;230846:45:0::2;230842:96;;230900:38;;-1:-1:-1::0;;;230900:38:0::2;;;;;;;;;;;230842:96;230949:44;230964:11;230977:7;230986:6;230949:14;:44::i;:::-;231008:22;231004:90;;;231047:35:::0;;-1:-1:-1;;;;;231067:15:0;::::2;::::0;231047:35;;:16:::2;::::0;:35:::2;::::0;231067:15;;-1:-1:-1;;;231047:35:0;::::2;-1:-1:-1::0;;;;;231047:35:0::2;;:::i;:::-;;;;;;;;-1:-1:-1::0;;;;;231047:35:0::2;;;;;-1:-1:-1::0;;;;;231047:35:0::2;;;;;;231004:90;231109:38;::::0;;-1:-1:-1;;;;;26691:31:1;;;26673:50;;26759:31;;26754:2;26739:18;;26732:59;-1:-1:-1;;;;;231109:38:0;::::2;::::0;::::2;::::0;26646:18:1;231109:38:0::2;26503:294:1::0;223976:875:0;224186:7;-1:-1:-1;;;;;;;;;;;151385:16:0;151396:4;151385:10;:16::i;:::-;140050:19:::1;:17;:19::i;:::-;90419:21:::2;:19;:21::i;:::-;224240:11:::3;-1:-1:-1::0;;;;;224215:36:0::3;:22;:20;:22::i;:::-;:36;224211:105;;;224275:29;;-1:-1:-1::0;;;224275:29:0::3;;;;;;;;;;;224211:105;224328:29;224360:13;:11;:13::i;:::-;224328:45:::0;-1:-1:-1;224386:77:0::3;-1:-1:-1::0;;;;;;;;;;;1175:42:0::3;-1:-1:-1::0;;;;;224386:77:0;::::3;:36;:77::i;:::-;224474:15;224505:105;-1:-1:-1::0;;;;;;;;;;;;;;;;;;;;;;224562:14:0::3;224578:11;-1:-1:-1::0;;;;;224505:105:0::3;1091:3;224505:23;:105::i;:::-;224474:136;;224655:7;224621:1;:22;;;:42;;;;;;;;;;-1:-1:-1::0;;;;;224621:42:0::3;;;;;:::i;:::-;;;;;;;;-1:-1:-1::0;;;;;224621:42:0::3;;;;;-1:-1:-1::0;;;;;224621:42:0::3;;;;;;224708:14;-1:-1:-1::0;;;;;224674:49:0::3;:1;:22;;;:49;;;;;;;:::i;:::-;::::0;;;-1:-1:-1;;224739:70:0::3;::::0;;15465:25:1;;;15521:2;15506:18;;15499:34;;;-1:-1:-1;;;;;;;;;;;451:42:0;-1:-1:-1;;;;;;;;;;;534:42:0;224739:70:::3;::::0;15438:18:1;224739:70:0::3;;;;;;;-1:-1:-1::0;;;;;224820:23:0::3;::::0;-1:-1:-1;;90463:20:0::2;:18;:20::i;:::-;223976:875:::0;;;;;:::o;234943:909::-;235011:14;235027;235054:29;235086:13;:11;:13::i;:::-;-1:-1:-1;;;;;235149:26:0;;235110:36;235149:26;;;:20;;;:26;;;;;235272:15;;235054:45;;-1:-1:-1;235149:26:0;235110:36;;235272:20;;235268:66;;-1:-1:-1;235317:1:0;;;;-1:-1:-1;234943:909:0;-1:-1:-1;;;;;234943:909:0:o;235268:66::-;235358:15;;235384:403;235402:3;;;;:::i;:::-;;;;235424:8;235433:1;235424:11;;;;;;;;:::i;:::-;;;;;;;;;;:18;-1:-1:-1;;;;;235424:18:0;235420:37;235449:8;235420:37;235477:1;:8;;235486;235495:1;235486:11;;;;;;;;:::i;:::-;;;;;;;;;;:17;235477:27;;-1:-1:-1;;;235486:17:0;;;;;;235477:27;;;;;;:::i;:::-;;;;;;;;;:37;:27;;;;;:37;;;;235472:52;235516:8;235472:52;235541:21;235565:31;235584:8;235593:1;235584:11;;;;;;;;:::i;235565:31::-;235541:55;-1:-1:-1;235615:17:0;;235611:150;;235653:34;235674:13;235653:34;;:::i;:::-;;;235727:8;235736:1;235727:11;;;;;;;;:::i;:::-;;;;;;;;;;:18;235706:39;;-1:-1:-1;;;;;235727:18:0;235706:39;;:::i;:::-;;;235611:150;235387:385;235384:403;235784:1;235780;:5;235384:403;;-1:-1:-1;235807:17:0;;235826;;-1:-1:-1;234943:909:0;-1:-1:-1;;;;234943:909:0:o;225700:461::-;-1:-1:-1;;;;;;;;;;;151385:16:0;151396:4;151385:10;:16::i;:::-;-1:-1:-1;;;;;225870:27:0;::::1;225866:70;;225906:30;;-1:-1:-1::0;;;225906:30:0::1;;;;;;;;;;;225866:70;225947:33;225983:17;:15;:17::i;:::-;226034:14;::::0;::::1;::::0;;-1:-1:-1;;;;;226059:30:0;;::::1;-1:-1:-1::0;;;;;;226059:30:0;::::1;::::0;::::1;::::0;;;226105:48:::1;::::0;225947:53;;-1:-1:-1;226034:14:0::1;::::0;;;226105:48:::1;::::0;226011:20:::1;::::0;226105:48:::1;225855:306;;225700:461:::0;;:::o;239514:117::-;239567:7;239594:13;:11;:13::i;:::-;:29;;;-1:-1:-1;;;;;239594:29:0;;239514:117;-1:-1:-1;239514:117:0:o;164473:157::-;164592:20;;164473:157::o;209883:215::-;209980:7;210007:83;210021:13;:11;:13::i;:::-;:17;;210037:1;210021:17;:::i;:::-;210056:23;212104:5;210056:2;:23;:::i;:::-;210040:13;:11;:13::i;:::-;:39;;;;:::i;:::-;210007:6;;:83;210081:8;210007:13;:83::i;172763:130::-;172848:37;172857:5;172864:7;172873:5;172880:4;172848:8;:37::i;209539:215::-;209636:7;209663:83;209693:23;209636:7;209693:2;:23;:::i;:::-;209677:13;:11;:13::i;:::-;:39;;;;:::i;:::-;209718:13;:11;:13::i;:::-;:17;;209734:1;209718:17;:::i;152370:105::-;152437:30;152448:4;85764:10;152437;:30::i;241453:196::-;213239:66;;241453:196::o;205543:127::-;205595:7;205629;:5;:7::i;:::-;-1:-1:-1;;;;;205622:25:0;;205656:4;205622:40;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;176615:190::-;176743:53;;-1:-1:-1;;;;;28454:32:1;;;176743:53:0;;;28436:51:1;28523:32;;;28503:18;;;28496:60;28572:18;;;28565:34;;;176716:81:0;;176736:5;;176758:18;;;;;28409::1;;176743:53:0;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;176743:53:0;;;;;;;;;;;176716:19;:81::i;195477:290::-;195617:17;195661:4;195654:12;;195675:8;195668:16;;195686:7;195637:57;;;;;;;;;;:::i;:::-;;;;-1:-1:-1;;195637:57:0;;;;;;;;;;-1:-1:-1;;;195705:54:0;;195637:57;-1:-1:-1;1293:42:0;;195705:48;;:54;;195637:57;;195705:54;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;195546:221;195477:290;;:::o;174551:486::-;174651:24;174678:25;174688:5;174695:7;174678:9;:25::i;:::-;174651:52;;-1:-1:-1;;174718:16:0;:36;174714:316;;;174794:5;174775:16;:24;174771:132;;;174854:7;174863:16;174881:5;174827:60;;-1:-1:-1;;;174827:60:0;;;;;;;;;;:::i;174771:132::-;174946:57;174955:5;174962:7;174990:5;174971:16;:24;174997:5;174946:8;:57::i;169274:308::-;-1:-1:-1;;;;;169358:18:0;;169354:88;;169427:1;169400:30;;-1:-1:-1;;;169400:30:0;;;;;;;;:::i;169354:88::-;-1:-1:-1;;;;;169456:16:0;;169452:88;;169525:1;169496:32;;-1:-1:-1;;;169496:32:0;;;;;;;;:::i;169452:88::-;169550:24;169558:4;169564:2;169568:5;169550:7;:24::i;150970:181::-;151105:28;;150970:181::o;155591:396::-;155668:4;155685:30;155718:26;:24;:26::i;:::-;155685:59;;155760:22;155768:4;155774:7;155760;:22::i;:::-;155755:225;;155799:8;:14;;;;;;;;;;;-1:-1:-1;;;;;155799:31:0;;;;;;;;;:38;;-1:-1:-1;;155799:38:0;155833:4;155799:38;;;155884:12;85764:10;;85684:98;155884:12;-1:-1:-1;;;;;155857:40:0;155875:7;-1:-1:-1;;;;;155857:40:0;155869:4;155857:40;;;;;;;;;;155919:4;155912:11;;;;;155755:225;155963:5;155956:12;;;;;202471:163;202594:22;;202471:163::o;156233:397::-;156311:4;156328:30;156361:26;:24;:26::i;:::-;156328:59;;156402:22;156410:4;156416:7;156402;:22::i;:::-;156398:225;;;156475:5;156441:14;;;;;;;;;;;-1:-1:-1;;;;;156441:31:0;;;;;;;;;;:39;;-1:-1:-1;;156441:39:0;;;156500:40;85764:10;;156441:14;;156500:40;;156475:5;156500:40;156562:4;156555:11;;;;;198604:204;192196:66;;198604:204::o;141470:182::-;140309:16;:14;:16::i;:::-;141529:25:::1;141557:21;:19;:21::i;:::-;141589:17:::0;;-1:-1:-1;;141589:17:0::1;::::0;;;-1:-1:-1;141622:22:0::1;85764:10:::0;141631:12:::1;141622:22;;;;;;:::i;:::-;;;;;;;;141518:134;141470:182::o:0;189746:319::-;189828:4;-1:-1:-1;;;;;189837:6:0;189820:23;;;:121;;;189935:6;-1:-1:-1;;;;;189899:42:0;:32;-1:-1:-1;;;;;;;;;;;158000:53:0;-1:-1:-1;;;;;158000:53:0;;157921:140;189899:32;-1:-1:-1;;;;;189899:42:0;;;189820:121;189802:256;;;190017:29;;-1:-1:-1;;;190017:29:0;;;;;;;;;;;241256:96;-1:-1:-1;;;;;;;;;;;151385:16:0;151396:4;151385:10;:16::i;191240:548::-;191358:17;-1:-1:-1;;;;;191340:50:0;;:52;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;191340:52:0;;;;;;;;-1:-1:-1;;191340:52:0;;;;;;;;;;;;:::i;:::-;;;191336:445;;191751:17;191709:60;;-1:-1:-1;;;191709:60:0;;;;;;;;:::i;191336:445::-;-1:-1:-1;;;;;;;;;;;191435:40:0;;191431:122;;191503:34;;-1:-1:-1;;;191503:34:0;;;;;160:25:1;;;133:18;;191503:34:0;14:177:1;191431:122:0;191567:54;191597:17;191616:4;191567:29;:54::i;190188:218::-;190263:4;-1:-1:-1;;;;;190272:6:0;190255:23;;190251:148;;190358:29;;-1:-1:-1;;;190358:29:0;;;;;;;;;;;138835:166;138960:23;;138835:166::o;90499:393::-;90549:32;90584:28;:26;:28::i;:::-;90702:9;;90549:63;;-1:-1:-1;;;90702:20:0;90698:90;;90746:30;;-1:-1:-1;;;90746:30:0;;;;;;;;;;;90698:90;88977:1;90865:19;;90499:393::o;140666:132::-;140732:8;:6;:8::i;:::-;140728:63;;;140764:15;;-1:-1:-1;;;140764:15:0;;;;;;;;;;;171999:211;-1:-1:-1;;;;;172070:21:0;;172066:91;;172142:1;172115:30;;-1:-1:-1;;;172115:30:0;;;;;;;;:::i;172066:91::-;172167:35;172175:7;172192:1;172196:5;172167:7;:35::i;90900:288::-;90949:32;90984:28;:26;:28::i;:::-;88934:1;91157:23;;-1:-1:-1;90900:288:0:o;207636:402::-;207711:7;207731:17;207751:20;207762:8;207751:10;:20::i;:::-;207731:40;;207795:9;207786:6;:18;207782:112;;;207854:8;207864:6;207872:9;207828:54;;-1:-1:-1;;;207828:54:0;;;;;;;;;;:::i;207782:112::-;207906:14;207923:22;207938:6;207923:14;:22::i;:::-;207906:39;-1:-1:-1;207956:48:0;85764:10;207979:8;207989:6;207997;207956:8;:48::i;:::-;208024:6;207636:402;-1:-1:-1;;;;207636:402:0:o;28419:174::-;28554:21;;28419:174::o;203507:116::-;26561:20;:18;:20::i;:::-;203583:32:::1;203608:6;203583:24;:32::i;188076:68::-:0;26561:20;:18;:20::i;164820:149::-;26561:20;:18;:20::i;:::-;164923:38:::1;164946:5;164953:7;164923:22;:38::i;193298:655::-:0;26561:20;:18;:20::i;:::-;193557:22:::1;:20;:22::i;:::-;193590:24;:22;:24::i;:::-;193625:17;:15;:17::i;:::-;193655:33;193691:17;:15;:17::i;:::-;193719:12:::0;;-1:-1:-1;;;;;193719:12:0;;::::1;-1:-1:-1::0;;;;;;193719:12:0;;::::1;;::::0;;;193742:14;::::1;:30:::0;;;;::::1;::::0;;::::1;::::0;;;::::1;::::0;;;193783:12:::1;::::0;::::1;:39:::0;;;;::::1;::::0;;;::::1;::::0;;;::::1;::::0;;;193833:7:::1;::::0;::::1;:16:::0;;193860:12:::1;::::0;;::::1;:34:::0;;-1:-1:-1;;;;;;193860:34:0::1;-1:-1:-1::0;;;;;193860:34:0;;::::1;::::0;;;::::1;::::0;;;193905:40:::1;::::0;;::::1;-1:-1:-1::0;;;193905:40:0::1;-1:-1:-1::0;;;;;;193905:40:0;;;193833:16;;;::::1;193905:40:::0;::::1;::::0;;;-1:-1:-1;193298:655:0:o;141149:180::-;140050:19;:17;:19::i;:::-;141209:25:::1;141237:21;:19;:21::i;:::-;141269:16:::0;;-1:-1:-1;;141269:16:0::1;141281:4;141269:16;::::0;;141209:49;-1:-1:-1;141301:20:0::1;141308:12;85764:10:::0;;85684:98;208084:390;208156:7;208176:17;208196;208204:8;208196:7;:17::i;:::-;208176:37;;208237:9;208228:6;:18;208224:109;;;208293:8;208303:6;208311:9;208270:51;;-1:-1:-1;;;208270:51:0;;;;;;;;;;:::i;208224:109::-;208345:14;208362:19;208374:6;208362:11;:19::i;:::-;208345:36;-1:-1:-1;208392:48:0;85764:10;208415:8;208425:6;208433;208392:8;:48::i;180141:387::-;180229:25;180272:5;-1:-1:-1;;;;;180272:13:0;;180288:7;180297:5;180257:47;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;180257:47:0;;;;;;;;;;;180229:75;;180322:44;180346:5;180353:12;180322:23;:44::i;:::-;180317:204;;180383:71;180403:5;180425;-1:-1:-1;;;;;180425:13:0;;180441:7;180450:1;180410:43;;;;;;;;;:::i;180383:71::-;180469:40;180489:5;180496:12;180469:19;:40::i;146717:827::-;146910:17;146949:8;146961:1;146949:13;146945:47;;146971:21;;-1:-1:-1;;;146971:21:0;;;;;;;;;;;146945:47;-1:-1:-1;;;;;147007:21:0;;;;:47;;-1:-1:-1;;;;;;147032:22:0;;;147007:47;147003:85;;;147063:25;;-1:-1:-1;;;147063:25:0;;;;;;;;;;;147003:85;147157:285;;;;;;;;-1:-1:-1;;;;;147157:285:0;;;;;;;;;;;;;;;;;;147318:4;147157:285;;;;;;;;;;;;;;;;147101:53;147157:285;;;;147467:69;;-1:-1:-1;;;147467:69:0;;1175:42;;147467:61;;:69;;147157:285;;147467:69;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;147455:81;146717:827;-1:-1:-1;;;;;;;146717:827:0:o;240718:530::-;240803:24;240840:29;240872:13;:11;:13::i;:::-;240931;;240922:8;;;:23;;:8;;-1:-1:-1;240896:23:0;;240922:8;;-1:-1:-1;;;240931:13:0;;;;;240922:23;;;;;;:::i;:::-;;;;;;;;;;;;;;241045:15;;;;240922:23;;-1:-1:-1;241045:15:0;;241044:16;;:52;;-1:-1:-1;241064:27:0;;;;:32;241044:52;241040:93;;;-1:-1:-1;241120:1:0;;240718:530;-1:-1:-1;;;240718:530:0:o;241040:93::-;241213:27;;;;241182;;241165:14;;:44;;-1:-1:-1;;;;;;;;241182:27:0;;;;;;241165:14;:44;:::i;:::-;-1:-1:-1;;;;;241164:76:0;;;;;:::i;198236:237::-;198316:11;198340:33;198376:17;:15;:17::i;:::-;198411:15;;;;;;-1:-1:-1;979:6:0;;198411:32;;198429:14;;-1:-1:-1;;;198411:15:0;;;;:32;:::i;:::-;-1:-1:-1;;;;;198410:55:0;;;;;:::i;176208:162::-;176291:71;176311:5;176333;-1:-1:-1;;;;;176333:14:0;;176350:2;176354:5;176318:43;;;;;;;;;:::i;197882:346::-;-1:-1:-1;;;;;;;;;;;151385:16:0;151396:4;151385:10;:16::i;:::-;197987:48:::1;::::0;-1:-1:-1;;;197987:48:0;;-1:-1:-1;;;;;;;;;;;534:42:0;197987:33:::1;::::0;:48:::1;::::0;198029:4:::1;::::0;197987:48:::1;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;197977:7;:58;197973:101;;;198044:30;;-1:-1:-1::0;;;198044:30:0::1;;;;;;;;;;;197973:101;198085:73;::::0;-1:-1:-1;;;198085:73:0;;-1:-1:-1;;;;;;;;;;;534:42:0;198085:32:::1;::::0;:73:::1;::::0;-1:-1:-1;;;;;632:42:0;198150:7;;198085:73:::1;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1::0;198174:46:0::1;::::0;160:25:1;;;198205:4:0::1;::::0;198174:46:::1;::::0;148:2:1;133:18;198174:46:0::1;14:177:1::0;147552:830:0;147746:16;147784:9;147797:1;147784:14;147780:48;;147807:21;;-1:-1:-1;;;147807:21:0;;;;;;;;;;;147780:48;-1:-1:-1;;;;;147843:21:0;;;;:47;;-1:-1:-1;;;;;;147868:22:0;;;147843:47;147839:85;;;147899:25;;-1:-1:-1;;;147899:25:0;;;;;;;;;;;147839:85;147994:286;;;;;;;;-1:-1:-1;;;;;147994:286:0;;;;;;;;;;;;;;;;;;148156:4;147994:286;;;;;;;;;;;;;;;;147937:54;147994:286;;;;148304:70;;-1:-1:-1;;;148304:70:0;;1175:42;;148304:62;;:70;;147994:286;;148304:70;;;:::i;116211:240::-;116312:7;116367:76;116383:26;116400:8;116383:16;:26::i;:::-;:59;;;;;116441:1;116426:11;116413:25;;;;;:::i;:::-;116423:1;116420;116413:25;:29;116383:59;66708:9;66701:17;;66587:149;116367:76;116339:25;116346:1;116349;116352:11;116339:6;:25::i;:::-;:104;;;;:::i;173760:499::-;173869:22;173894:18;:16;:18::i;:::-;173869:43;-1:-1:-1;;;;;;173927:19:0;;173923:91;;173999:1;173970:32;;-1:-1:-1;;;173970:32:0;;;;;;;;:::i;173923:91::-;-1:-1:-1;;;;;174028:21:0;;174024:92;;174101:1;174073:31;;-1:-1:-1;;;174073:31:0;;;;;;;;:::i;174024:92::-;-1:-1:-1;;;;;174126:20:0;;;;;;;:13;;;:20;;;;;;;;:29;;;;;;;;;:37;;;174174:78;;;;174225:7;-1:-1:-1;;;;;174209:31:0;174218:5;-1:-1:-1;;;;;174209:31:0;;174234:5;174209:31;;;;160:25:1;;148:2;133:18;;14:177;174209:31:0;;;;;;;;174174:78;173858:401;173760:499;;;;:::o;152611:201::-;152700:22;152708:4;152714:7;152700;:22::i;:::-;152695:110;;152779:7;152788:4;152746:47;;-1:-1:-1;;;152746:47:0;;;;;;;;;:::i;183499:738::-;183580:18;183609:19;183749:4;183746:1;183739:4;183733:11;183726:4;183720;183716:15;183713:1;183706:5;183699;183694:60;183808:7;183798:180;;183853:4;183847:11;183899:16;183896:1;183891:3;183876:40;183946:16;183941:3;183934:29;183798:180;-1:-1:-1;;184057:1:0;184051:8;184006:16;;-1:-1:-1;184086:15:0;;:68;;184138:11;184153:1;184138:16;;184086:68;;;-1:-1:-1;;;;;184104:26:0;;;:31;184086:68;184082:148;;;184211:5;184178:40;;-1:-1:-1;;;184178:40:0;;;;;;;;:::i;169906:1199::-;169992:22;170017:18;:16;:18::i;:::-;169992:43;-1:-1:-1;;;;;;170050:18:0;;170046:558;;170206:5;170188:1;:14;;;:23;;;;;;;:::i;:::-;;;;-1:-1:-1;170046:558:0;;-1:-1:-1;170046:558:0;;-1:-1:-1;;;;;170266:17:0;;170244:19;170266:17;;;;;;;;;;;170302:19;;;170298:117;;;170374:4;170380:11;170393:5;170349:50;;-1:-1:-1;;;170349:50:0;;;;;;;;;;:::i;170298:117::-;-1:-1:-1;;;;;170538:17:0;;:11;:17;;;;;;;;;;170558:19;;;;170538:39;;170046:558;-1:-1:-1;;;;;170620:16:0;;170616:439;;170786:14;;;:23;;;;;;;170616:439;;;-1:-1:-1;;;;;171004:15:0;;:11;:15;;;;;;;;;;:24;;;;;;170616:439;171087:2;-1:-1:-1;;;;;171072:25:0;171081:4;-1:-1:-1;;;;;171072:25:0;;171091:5;171072:25;;;;160::1;;148:2;133:18;;14:177;140875:130:0;140939:8;:6;:8::i;:::-;140934:64;;140971:15;;-1:-1:-1;;;140971:15:0;;;;;;;;;;;158765:353;158857:37;158876:17;158857:18;:37::i;:::-;158910:36;;-1:-1:-1;;;;;158910:36:0;;;;;;;;158963:11;;:15;158959:152;;158995:53;159024:17;159043:4;158995:28;:53::i;158959:152::-;159081:18;:16;:18::i;89391:187::-;89530:30;;89391:187::o;210167:853::-;210845:74;210879:7;:5;:7::i;:::-;210889:6;210905:4;210912:6;210845:26;:74::i;:::-;210930:23;210936:8;210946:6;210930:5;:23::i;:::-;210987:8;-1:-1:-1;;;;;210971:41:0;210979:6;-1:-1:-1;;;;;210971:41:0;;210997:6;211005;210971:41;;;;;;15465:25:1;;;15521:2;15506:18;;15499:34;15453:2;15438:18;;15291:248;26721:145:0;26789:17;:15;:17::i;:::-;26784:75;;26830:17;;-1:-1:-1;;;26830:17:0;;;;;;;;;;;203631:309;26561:20;:18;:20::i;:::-;203717:24:::1;203744:20;:18;:20::i;:::-;203717:47;;203776:12;203790:19;203813:28;203834:6;203813:20;:28::i;:::-;203775:66;;;;203876:7;:28;;203902:2;203876:28;;;203886:13;203876:28;203852:52:::0;;-1:-1:-1;;;;;;203915:17:0;-1:-1:-1;;;203852:52:0::1;::::0;;;::::1;::::0;;;::::1;-1:-1:-1::0;;;;;;203915:17:0;;-1:-1:-1;;;;;203915:17:0;;;::::1;::::0;;;::::1;::::0;;;-1:-1:-1;;203631:309:0:o;164977:220::-;26561:20;:18;:20::i;:::-;165090:22:::1;165115:18;:16;:18::i;:::-;165090:43:::0;-1:-1:-1;165144:7:0::1;::::0;::::1;:15;165154:5:::0;165144:7;:15:::1;:::i;:::-;-1:-1:-1::0;165170:9:0::1;::::0;::::1;:19;165182:7:::0;165170:9;:19:::1;:::i;89691:113::-:0;26561:20;:18;:20::i;:::-;89762:34:::1;:32;:34::i;139553:99::-:0;26561:20;:18;:20::i;:::-;139617:27:::1;:25;:27::i;184749:490::-:0;184832:4;184849:12;184872:18;184901:19;185037:4;185034:1;185027:4;185021:11;185014:4;185008;185004:15;185001:1;184994:5;184987;184982:60;184971:71;;185070:16;185056:30;;185121:1;185115:8;185100:23;;185151:7;:80;;;;-1:-1:-1;185163:15:0;;:67;;185214:11;185229:1;185214:16;185163:67;;;185210:1;185189:5;-1:-1:-1;;;;;185181:26:0;;:30;185163:67;185144:87;184749:490;-1:-1:-1;;;;;;184749:490:0:o;137643:124::-;137711:4;137753:1;137741:8;137735:15;;;;;;;;:::i;:::-;:19;;;;:::i;:::-;:24;;137758:1;137735:24;137728:31;;137643:124;;;:::o;112323:3754::-;112405:14;112458:12;112472:11;112487:12;112494:1;112497;112487:6;:12::i;:::-;112457:42;;;;112584:4;112592:1;112584:9;112580:370;;112923:11;112917:3;:17;;;;;:::i;:::-;;112910:24;;;;;;112580:370;113078:4;113063:11;:19;113059:144;;113103:84;110337:5;113123:16;;110336:36;29569:4;110331:42;113103:11;:84::i;:::-;113462:17;113616:11;113613:1;113610;113603:25;114018:12;114048:15;;;114033:31;;114186:22;;;;;114934:1;114915;:15;;114914:21;;115171;;;115167:25;;115156:36;115242:21;;;115238:25;;115227:36;115315:21;;;115311:25;;115300:36;115387:21;;;115383:25;;115372:36;115461:21;;;115457:25;;115446:36;115536:21;;;115532:25;;;115521:36;114434:12;;;;114430:23;;;114455:1;114426:31;113731:18;;;113721:29;;;114545:11;;;;113775:19;;;;114282:14;;;;114538:18;;;;116017:13;;-1:-1:-1;;112323:3754:0;;;;;:::o;158158:286::-;158236:17;-1:-1:-1;;;;;158236:29:0;;158269:1;158236:34;158232:121;;158323:17;158294:47;;-1:-1:-1;;;158294:47:0;;;;;;;;:::i;158232:121::-;-1:-1:-1;;;;;;;;;;;158363:73:0;;-1:-1:-1;;;;;;158363:73:0;-1:-1:-1;;;;;158363:73:0;;;;;;;;;;158158:286::o;82679:256::-;82762:12;82788;82802:23;82829:6;-1:-1:-1;;;;;82829:19:0;82849:4;82829:25;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;82787:67;;;;82872:55;82899:6;82907:7;82916:10;82872:26;:55::i;162719:126::-;162770:9;:13;162766:72;;162807:19;;-1:-1:-1;;;162807:19:0;;;;;;;;;;;171458:213;-1:-1:-1;;;;;171529:21:0;;171525:93;;171603:1;171574:32;;-1:-1:-1;;;171574:32:0;;;;;;;;:::i;171525:93::-;171628:35;171644:1;171648:7;171657:5;171628:7;:35::i;28161:122::-;28211:4;28235:26;:24;:26::i;:::-;:40;-1:-1:-1;;;28235:40:0;;;;;;-1:-1:-1;28161:122:0:o;204088:561::-;204284:43;;;;;;;;;;;;;;;;-1:-1:-1;;;;;204284:43:0;-1:-1:-1;;;204284:43:0;;;204243:95;;204155:7;;;;;;;;-1:-1:-1;;;;;204243:26:0;;;:95;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;204196:142;;;;204353:7;:39;;;;;204390:2;204364:15;:22;:28;;204353:39;204349:265;;;204409:24;204447:15;204436:38;;;;;;;;;;;;:::i;:::-;204409:65;-1:-1:-1;204513:15:0;204493:35;;204489:114;;204557:4;;204569:16;;-1:-1:-1;204088:561:0;-1:-1:-1;;;;204088:561:0:o;204489:114::-;204394:220;204349:265;-1:-1:-1;204632:5:0;;;;-1:-1:-1;204088:561:0;-1:-1:-1;;;204088:561:0:o;89812:186::-;26561:20;:18;:20::i;139660:159::-;26561:20;:18;:20::i;:::-;139734:25:::1;139762:21;:19;:21::i;:::-;139794:17:::0;;-1:-1:-1;;139794:17:0::1;::::0;;-1:-1:-1;139660:159:0:o;105941:559::-;106002:12;;-1:-1:-1;;106390:1:0;106387;106380:20;106421:9;;;;106470:11;;;106456:12;;;;106452:30;;;;;105941:559;-1:-1:-1;;105941:559:0:o;30423:200::-;30530:10;30524:4;30517:24;30568:4;30562;30555:18;30600:4;30594;30587:18;83210:597;83358:12;83388:7;83383:417;;83412:19;83420:10;83412:7;:19::i;:::-;83383:417;;;83640:17;;:22;:49;;;;-1:-1:-1;;;;;;83666:18:0;;;:23;83640:49;83636:121;;;83734:6;83717:24;;-1:-1:-1;;;83717:24:0;;;;;;;;:::i;83636:121::-;-1:-1:-1;83778:10:0;83771:17;;84364:446;84497:17;;:21;84493:310;;84704:10;84698:17;84691:4;84679:10;84675:21;84668:48;84493:310;84770:21;;-1:-1:-1;;;84770:21:0;;;;;;;;;;;196:286:1;254:6;307:2;295:9;286:7;282:23;278:32;275:52;;;323:1;320;313:12;275:52;349:23;;-1:-1:-1;;;;;;401:32:1;;391:43;;381:71;;448:1;445;438:12;679:289;721:3;759:5;753:12;786:6;781:3;774:19;842:6;835:4;828:5;824:16;817:4;812:3;808:14;802:47;894:1;887:4;878:6;873:3;869:16;865:27;858:38;957:4;950:2;946:7;941:2;933:6;929:15;925:29;920:3;916:39;912:50;905:57;;;679:289;;;;:::o;973:220::-;1122:2;1111:9;1104:21;1085:4;1142:45;1183:2;1172:9;1168:18;1160:6;1142:45;:::i;1198:226::-;1257:6;1310:2;1298:9;1289:7;1285:23;1281:32;1278:52;;;1326:1;1323;1316:12;1278:52;-1:-1:-1;1371:23:1;;1198:226;-1:-1:-1;1198:226:1:o;1429:173::-;1497:20;;-1:-1:-1;;;;;1546:31:1;;1536:42;;1526:70;;1592:1;1589;1582:12;1526:70;1429:173;;;:::o;1607:300::-;1675:6;1683;1736:2;1724:9;1715:7;1711:23;1707:32;1704:52;;;1752:1;1749;1742:12;1704:52;1775:29;1794:9;1775:29;:::i;:::-;1765:39;1873:2;1858:18;;;;1845:32;;-1:-1:-1;;;1607:300:1:o;1912:163::-;1979:20;;2039:10;2028:22;;2018:33;;2008:61;;2065:1;2062;2055:12;2080:173;2148:20;;-1:-1:-1;;;;;2197:31:1;;2187:42;;2177:70;;2243:1;2240;2233:12;2258:332;2334:6;2342;2350;2403:2;2391:9;2382:7;2378:23;2374:32;2371:52;;;2419:1;2416;2409:12;2371:52;2442:28;2460:9;2442:28;:::i;:::-;2432:38;;2489;2523:2;2512:9;2508:18;2489:38;:::i;:::-;2479:48;;2546:38;2580:2;2569:9;2565:18;2546:38;:::i;:::-;2536:48;;2258:332;;;;;:::o;2595:129::-;-1:-1:-1;;;;;2673:5:1;2669:30;2662:5;2659:41;2649:69;;2714:1;2711;2704:12;2729:458;2804:6;2812;2820;2873:2;2861:9;2852:7;2848:23;2844:32;2841:52;;;2889:1;2886;2879:12;2841:52;2912:29;2931:9;2912:29;:::i;:::-;2902:39;;2991:2;2980:9;2976:18;2963:32;3004:30;3028:5;3004:30;:::i;:::-;3053:5;-1:-1:-1;3110:2:1;3095:18;;3082:32;3123;3082;3123;:::i;:::-;3174:7;3164:17;;;2729:458;;;;;:::o;3192:374::-;3269:6;3277;3285;3338:2;3326:9;3317:7;3313:23;3309:32;3306:52;;;3354:1;3351;3344:12;3306:52;3377:29;3396:9;3377:29;:::i;:::-;3367:39;;3425:38;3459:2;3448:9;3444:18;3425:38;:::i;:::-;3192:374;;3415:48;;-1:-1:-1;;;3532:2:1;3517:18;;;;3504:32;;3192:374::o;3984:661::-;4064:6;4072;4080;4133:2;4121:9;4112:7;4108:23;4104:32;4101:52;;;4149:1;4146;4139:12;4101:52;4172:29;4191:9;4172:29;:::i;:::-;4162:39;;4252:2;4241:9;4237:18;4224:32;-1:-1:-1;;;;;4271:6:1;4268:30;4265:50;;;4311:1;4308;4301:12;4265:50;4334:22;;4387:4;4379:13;;4375:27;-1:-1:-1;4365:55:1;;4416:1;4413;4406:12;4365:55;4456:2;4443:16;-1:-1:-1;;;;;4474:6:1;4471:30;4468:50;;;4514:1;4511;4504:12;4468:50;4559:7;4554:2;4545:6;4541:2;4537:15;4533:24;4530:37;4527:57;;;4580:1;4577;4570:12;4527:57;3984:661;;4611:2;4603:11;;;;;-1:-1:-1;4633:6:1;;-1:-1:-1;;;3984:661:1:o;4650:300::-;4718:6;4726;4779:2;4767:9;4758:7;4754:23;4750:32;4747:52;;;4795:1;4792;4785:12;4747:52;4840:23;;;-1:-1:-1;4906:38:1;4940:2;4925:18;;4906:38;:::i;:::-;4896:48;;4650:300;;;;;:::o;5144:203::-;-1:-1:-1;;;;;5308:32:1;;;;5290:51;;5278:2;5263:18;;5144:203::o;5352:186::-;5411:6;5464:2;5452:9;5443:7;5439:23;5435:32;5432:52;;;5480:1;5477;5470:12;5432:52;5503:29;5522:9;5503:29;:::i;5543:258::-;5610:6;5618;5671:2;5659:9;5650:7;5646:23;5642:32;5639:52;;;5687:1;5684;5677:12;5639:52;5710:28;5728:9;5710:28;:::i;:::-;5700:38;;5757;5791:2;5780:9;5776:18;5757:38;:::i;5806:186::-;5865:6;5918:2;5906:9;5897:7;5893:23;5889:32;5886:52;;;5934:1;5931;5924:12;5886:52;5957:29;5976:9;5957:29;:::i;6655:127::-;6716:10;6711:3;6707:20;6704:1;6697:31;6747:4;6744:1;6737:15;6771:4;6768:1;6761:15;6787:715;6851:5;6883:1;-1:-1:-1;;;;;6899:6:1;6896:30;6893:56;;;6929:18;;:::i;:::-;-1:-1:-1;7084:2:1;7078:9;-1:-1:-1;;6997:2:1;6976:15;;6972:29;;7142:2;7130:15;7126:29;7114:42;;7207:22;;;-1:-1:-1;;;;;7171:34:1;;7168:62;7165:88;;;7233:18;;:::i;:::-;7269:2;7262:22;7317;;;7302:6;-1:-1:-1;7302:6:1;7354:16;;;7351:25;-1:-1:-1;7348:45:1;;;7389:1;7386;7379:12;7348:45;7439:6;7434:3;7427:4;7419:6;7415:17;7402:44;7494:1;7487:4;7478:6;7470;7466:19;7462:30;7455:41;;6787:715;;;;;:::o;7507:523::-;7584:6;7592;7645:2;7633:9;7624:7;7620:23;7616:32;7613:52;;;7661:1;7658;7651:12;7613:52;7684:29;7703:9;7684:29;:::i;:::-;7674:39;;7764:2;7753:9;7749:18;7736:32;-1:-1:-1;;;;;7783:6:1;7780:30;7777:50;;;7823:1;7820;7813:12;7777:50;7846:22;;7899:4;7891:13;;7887:27;-1:-1:-1;7877:55:1;;7928:1;7925;7918:12;7877:55;7951:73;8016:7;8011:2;7998:16;7993:2;7989;7985:11;7951:73;:::i;:::-;7941:83;;;7507:523;;;;;:::o;8442:807::-;8700:2;8712:21;;;8782:13;;8685:18;;;8804:22;;;8652:4;;8883:15;;;8857:2;8842:18;;;8652:4;8926:297;8940:6;8937:1;8934:13;8926:297;;;8999:13;;9041:9;;-1:-1:-1;;;;;9037:35:1;9025:48;;9125:2;9117:11;;;9111:18;9131:10;9107:35;9093:12;;;9086:57;9198:15;;;;9172:2;9163:12;;;;9069:1;8955:9;8926:297;;;-1:-1:-1;9240:3:1;;8442:807;-1:-1:-1;;;;;8442:807:1:o;9559:221::-;9602:5;9655:3;9648:4;9640:6;9636:17;9632:27;9622:55;;9673:1;9670;9663:12;9622:55;9695:79;9770:3;9761:6;9748:20;9741:4;9733:6;9729:17;9695:79;:::i;9785:1073::-;9927:6;9935;9943;9951;9959;9967;9975;9983;10036:3;10024:9;10015:7;10011:23;10007:33;10004:53;;;10053:1;10050;10043:12;10004:53;10093:9;10080:23;-1:-1:-1;;;;;10118:6:1;10115:30;10112:50;;;10158:1;10155;10148:12;10112:50;10181;10223:7;10214:6;10203:9;10199:22;10181:50;:::i;:::-;10171:60;;;10284:2;10273:9;10269:18;10256:32;-1:-1:-1;;;;;10303:8:1;10300:32;10297:52;;;10345:1;10342;10335:12;10297:52;10368;10412:7;10401:8;10390:9;10386:24;10368:52;:::i;:::-;10358:62;;;10439:38;10473:2;10462:9;10458:18;10439:38;:::i;:::-;10429:48;;10496:38;10530:2;10519:9;10515:18;10496:38;:::i;:::-;10486:48;;10553:39;10587:3;10576:9;10572:19;10553:39;:::i;:::-;10543:49;;10611:39;10645:3;10634:9;10630:19;10611:39;:::i;:::-;9785:1073;;;;-1:-1:-1;9785:1073:1;;;;;;10601:49;;-1:-1:-1;;;10719:3:1;10704:19;;10691:33;;10821:3;10806:19;10793:33;;9785:1073::o;10863:184::-;10921:6;10974:2;10962:9;10953:7;10949:23;10945:32;10942:52;;;10990:1;10987;10980:12;10942:52;11013:28;11031:9;11013:28;:::i;11249:118::-;11335:5;11328:13;11321:21;11314:5;11311:32;11301:60;;11357:1;11354;11347:12;11372:435;11446:6;11454;11462;11515:2;11503:9;11494:7;11490:23;11486:32;11483:52;;;11531:1;11528;11521:12;11483:52;11576:23;;;-1:-1:-1;11642:38:1;11676:2;11661:18;;11642:38;:::i;:::-;11632:48;;11732:2;11721:9;11717:18;11704:32;11745:30;11767:7;11745:30;:::i;11812:374::-;11889:6;11897;11905;11958:2;11946:9;11937:7;11933:23;11929:32;11926:52;;;11974:1;11971;11964:12;11926:52;12019:23;;;-1:-1:-1;12085:38:1;12119:2;12104:18;;12085:38;:::i;:::-;12075:48;;12142:38;12176:2;12165:9;12161:18;12142:38;:::i;12191:317::-;12257:6;12265;12318:2;12306:9;12297:7;12293:23;12289:32;12286:52;;;12334:1;12331;12324:12;12286:52;12357:28;12375:9;12357:28;:::i;:::-;12347:38;;12435:2;12424:9;12420:18;12407:32;12448:30;12472:5;12448:30;:::i;:::-;12497:5;12487:15;;;12191:317;;;;;:::o;12513:245::-;12571:6;12624:2;12612:9;12603:7;12599:23;12595:32;12592:52;;;12640:1;12637;12630:12;12592:52;12679:9;12666:23;12698:30;12722:5;12698:30;:::i;12763:969::-;12865:6;12873;12881;12889;12897;12905;12913;12966:3;12954:9;12945:7;12941:23;12937:33;12934:53;;;12983:1;12980;12973:12;12934:53;13006:28;13024:9;13006:28;:::i;:::-;12996:38;;13084:2;13073:9;13069:18;13056:32;13097:28;13119:5;13097:28;:::i;:::-;13144:5;-1:-1:-1;13201:2:1;13186:18;;13173:32;13214;13173;13214;:::i;:::-;13265:7;-1:-1:-1;13324:2:1;13309:18;;13296:32;13337;13296;13337;:::i;:::-;13388:7;-1:-1:-1;13447:3:1;13432:19;;13419:33;13461:30;13419:33;13461:30;:::i;:::-;13510:7;-1:-1:-1;13569:3:1;13554:19;;13541:33;13618:4;13605:18;;13593:31;;13583:59;;13638:1;13635;13628:12;13583:59;13661:7;-1:-1:-1;13687:39:1;13721:3;13706:19;;13687:39;:::i;:::-;13677:49;;12763:969;;;;;;;;;;:::o;13737:260::-;13805:6;13813;13866:2;13854:9;13845:7;13841:23;13837:32;13834:52;;;13882:1;13879;13872:12;13834:52;13905:29;13924:9;13905:29;:::i;:::-;13895:39;;13953:38;13987:2;13976:9;13972:18;13953:38;:::i;14002:380::-;14066:6;14074;14127:2;14115:9;14106:7;14102:23;14098:32;14095:52;;;14143:1;14140;14133:12;14095:52;14182:9;14169:23;14201:30;14225:5;14201:30;:::i;:::-;14250:5;-1:-1:-1;14307:2:1;14292:18;;14279:32;14320:30;14279:32;14320:30;:::i;14387:594::-;14468:6;14476;14484;14492;14545:3;14533:9;14524:7;14520:23;14516:33;14513:53;;;14562:1;14559;14552:12;14513:53;14585:29;14604:9;14585:29;:::i;:::-;14575:39;;14664:2;14653:9;14649:18;14636:32;14677:30;14701:5;14677:30;:::i;:::-;14726:5;-1:-1:-1;14783:2:1;14768:18;;14755:32;14796;14755;14796;:::i;:::-;14847:7;-1:-1:-1;14906:2:1;14891:18;;14878:32;14919:30;14878:32;14919:30;:::i;:::-;14387:594;;;;-1:-1:-1;14387:594:1;;-1:-1:-1;;14387:594:1:o;14986:300::-;15054:6;15062;15115:2;15103:9;15094:7;15090:23;15086:32;15083:52;;;15131:1;15128;15121:12;15083:52;15154:29;15173:9;15154:29;:::i;15544:127::-;15605:10;15600:3;15596:20;15593:1;15586:31;15636:4;15633:1;15626:15;15660:4;15657:1;15650:15;15676:125;15741:9;;;15762:10;;;15759:36;;;15775:18;;:::i;15806:168::-;15879:9;;;15910;;15927:15;;;15921:22;;15907:37;15897:71;;15948:18;;:::i;15979:127::-;16040:10;16035:3;16031:20;16028:1;16021:31;16071:4;16068:1;16061:15;16095:4;16092:1;16085:15;16111:120;16151:1;16177;16167:35;;16182:18;;:::i;:::-;-1:-1:-1;16216:9:1;;16111:120::o;16236:128::-;16303:9;;;16324:11;;;16321:37;;;16338:18;;:::i;16369:380::-;16448:1;16444:12;;;;16491;;;16512:61;;16566:4;16558:6;16554:17;16544:27;;16512:61;16619:2;16611:6;16608:14;16588:18;16585:38;16582:161;;16665:10;16660:3;16656:20;16653:1;16646:31;16700:4;16697:1;16690:15;16728:4;16725:1;16718:15;16582:161;;16369:380;;;:::o;16754:195::-;-1:-1:-1;;;;;16823:27:1;;;16852;;;16819:61;;16892:28;;16889:54;;;16923:18;;:::i;16954:127::-;17015:10;17010:3;17006:20;17003:1;16996:31;17046:4;17043:1;17036:15;17070:4;17067:1;17060:15;17690:267;17779:6;17774:3;17767:19;17831:6;17824:5;17817:4;17812:3;17808:14;17795:43;-1:-1:-1;17883:1:1;17858:16;;;17876:4;17854:27;;;17847:38;;;;17939:2;17918:15;;;-1:-1:-1;;17914:29:1;17905:39;;;17901:50;;17690:267::o;17962:344::-;-1:-1:-1;;;;;18149:32:1;;18131:51;;18218:2;18213;18198:18;;18191:30;;;-1:-1:-1;;18238:62:1;;18281:18;;18273:6;18265;18238:62;:::i;18311:247::-;18470:2;18459:9;18452:21;18433:4;18490:62;18548:2;18537:9;18533:18;18525:6;18517;18490:62;:::i;18563:148::-;18651:4;18630:12;;;18644;;;18626:31;;18669:13;;18666:39;;;18685:18;;:::i;18716:297::-;-1:-1:-1;;;;;18906:32:1;;;;18888:51;;-1:-1:-1;;;;;18975:31:1;18970:2;18955:18;;18948:59;18876:2;18861:18;;18716:297::o;19018:830::-;19116:6;19176:2;19164:9;19155:7;19151:23;19147:32;19191:2;19188:22;;;19206:1;19203;19196:12;19188:22;-1:-1:-1;19275:2:1;19269:9;19317:2;19305:15;;-1:-1:-1;;;;;19335:34:1;;19371:22;;;19332:62;19329:88;;;19397:18;;:::i;:::-;19433:2;19426:22;19470:16;;19495:30;19470:16;19495:30;:::i;:::-;19534:21;;19600:2;19585:18;;19579:25;19613:32;19579:25;19613:32;:::i;:::-;19673:2;19661:15;;19654:32;19731:2;19716:18;;19710:25;19744:32;19710:25;19744:32;:::i;:::-;19804:2;19792:15;;19785:32;19796:6;19018:830;-1:-1:-1;;;19018:830:1:o;20147:306::-;-1:-1:-1;;;;;20346:31:1;;;;20328:50;;-1:-1:-1;;;;;20414:32:1;20409:2;20394:18;;20387:60;20316:2;20301:18;;20147:306::o;20761:164::-;20838:13;;20891:1;20880:20;;;20870:31;;20860:59;;20915:1;20912;20905:12;20930:872;21037:6;21097:3;21085:9;21076:7;21072:23;21068:33;21113:2;21110:22;;;21128:1;21125;21118:12;21110:22;-1:-1:-1;21197:2:1;21191:9;21239:3;21227:16;;-1:-1:-1;;;;;21258:34:1;;21294:22;;;21255:62;21252:88;;;21320:18;;:::i;:::-;21356:2;21349:22;21395:38;21423:9;21395:38;:::i;:::-;21387:6;21380:54;21477:2;21466:9;21462:18;21456:25;21490:30;21514:5;21490:30;:::i;:::-;21548:2;21536:15;;21529:30;21604:2;21589:18;;21583:25;21617:32;21583:25;21617:32;:::i;:::-;21677:2;21665:15;;21658:32;21723:47;21766:2;21751:18;;21723:47;:::i;:::-;21718:2;21706:15;;21699:72;21710:6;20930:872;-1:-1:-1;;;20930:872:1:o;21807:184::-;21877:6;21930:2;21918:9;21909:7;21905:23;21901:32;21898:52;;;21946:1;21943;21936:12;21898:52;-1:-1:-1;21969:16:1;;21807:184;-1:-1:-1;21807:184:1:o;21996:216::-;22060:9;;;22088:11;;;22035:3;22118:9;;22146:10;;22142:19;;22171:10;;22163:19;;22139:44;22136:70;;;22186:18;;:::i;:::-;22136:70;;21996:216;;;;:::o;22924:136::-;22963:3;22991:5;22981:39;;23000:18;;:::i;:::-;-1:-1:-1;;;23036:18:1;;22924:136::o;23065:127::-;23126:10;23121:3;23117:20;23114:1;23107:31;23157:4;23154:1;23147:15;23181:4;23178:1;23171:15;23197:198;-1:-1:-1;;;;;23297:27:1;;;23268;;;23264:61;;23337:29;;23334:55;;;23369:18;;:::i;25678:249::-;25747:6;25800:2;25788:9;25779:7;25775:23;25771:32;25768:52;;;25816:1;25813;25806:12;25768:52;25848:9;25842:16;25867:30;25891:5;25867:30;:::i;26802:375::-;26890:1;26908:5;26922:249;26943:1;26933:8;26930:15;26922:249;;;26993:4;26988:3;26984:14;26978:4;26975:24;26972:50;;;27002:18;;:::i;:::-;27052:1;27042:8;27038:16;27035:49;;;27066:16;;;;27035:49;27149:1;27145:16;;;;;27105:15;;26922:249;;;26802:375;;;;;;:::o;27182:902::-;27231:5;27261:8;27251:80;;-1:-1:-1;27302:1:1;27316:5;;27251:80;27350:4;27340:76;;-1:-1:-1;27387:1:1;27401:5;;27340:76;27432:4;27450:1;27445:59;;;;27518:1;27513:174;;;;27425:262;;27445:59;27475:1;27466:10;;27489:5;;;27513:174;27550:3;27540:8;27537:17;27534:43;;;27557:18;;:::i;:::-;-1:-1:-1;;27613:1:1;27599:16;;27672:5;;27425:262;;27771:2;27761:8;27758:16;27752:3;27746:4;27743:13;27739:36;27733:2;27723:8;27720:16;27715:2;27709:4;27706:12;27702:35;27699:77;27696:203;;;-1:-1:-1;27808:19:1;;;27884:5;;27696:203;27931:42;-1:-1:-1;;27956:8:1;27950:4;27931:42;:::i;:::-;28009:6;28005:1;28001:6;27997:19;27988:7;27985:32;27982:58;;;28020:18;;:::i;:::-;28058:20;;27182:902;-1:-1:-1;;;27182:902:1:o;28089:140::-;28147:5;28176:47;28217:4;28207:8;28203:19;28197:4;28176:47;:::i;28610:211::-;28651:3;28689:5;28683:12;28733:6;28726:4;28719:5;28715:16;28710:3;28704:36;28795:1;28759:16;;28784:13;;;-1:-1:-1;28759:16:1;;28610:211;-1:-1:-1;28610:211:1:o;28826:358::-;-1:-1:-1;;;;;;29037:26:1;;29025:39;;-1:-1:-1;;;;;;29093:31:1;;29089:1;29080:11;;29073:52;-1:-1:-1;29141:37:1;29175:1;29166:11;;29158:6;29141:37;:::i;29412:345::-;-1:-1:-1;;;;;29632:32:1;;;;29614:51;;29696:2;29681:18;;29674:34;;;;29739:2;29724:18;;29717:34;29602:2;29587:18;;29412:345::o;29951:274::-;-1:-1:-1;;;;;30143:32:1;;;;30125:51;;30207:2;30192:18;;30185:34;30113:2;30098:18;;29951:274::o;31084:290::-;31296:3;31281:19;;31309:59;31285:9;31350:6;30609:12;;-1:-1:-1;;;;;30605:38:1;;;30593:51;;30697:4;30686:16;;;30680:23;30676:49;;30660:14;;;30653:73;30779:4;30768:16;;;30762:23;30787:8;30758:38;30742:14;;;30735:62;30850:4;30839:16;;;30833:23;30829:49;;30813:14;;;30806:73;30928:4;30917:16;;;30911:23;30895:14;;;30888:47;30631:3;30973:16;;;30967:23;30951:14;;;30944:47;31044:4;31033:16;;;31027:23;31023:49;31007:14;;31000:73;30517:562;31379:272;-1:-1:-1;;;;;31464:27:1;;;31493;;;31460:61;31541:37;;;;31597:24;;;31587:58;;31625:18;;:::i;31656:245::-;31723:6;31776:2;31764:9;31755:7;31751:23;31747:32;31744:52;;;31792:1;31789;31782:12;31744:52;31824:9;31818:16;31843:28;31865:5;31843:28;:::i;32608:518::-;32710:2;32705:3;32702:11;32699:421;;;32746:5;32743:1;32736:16;32790:4;32787:1;32777:18;32860:2;32848:10;32844:19;32841:1;32837:27;32831:4;32827:38;32896:4;32884:10;32881:20;32878:47;;;-1:-1:-1;32919:4:1;32878:47;32974:2;32969:3;32965:12;32962:1;32958:20;32952:4;32948:31;32938:41;;33029:81;33047:2;33040:5;33037:13;33029:81;;;33106:1;33092:16;;33073:1;33062:13;33029:81;;33302:1299;33428:3;33422:10;-1:-1:-1;;;;;33447:6:1;33444:30;33441:56;;;33477:18;;:::i;:::-;33506:97;33596:6;33556:38;33588:4;33582:11;33556:38;:::i;:::-;33550:4;33506:97;:::i;:::-;33652:4;33683:2;33672:14;;33700:1;33695:649;;;;34388:1;34405:6;34402:89;;;-1:-1:-1;34457:19:1;;;34451:26;34402:89;-1:-1:-1;;33259:1:1;33255:11;;;33251:24;33247:29;33237:40;33283:1;33279:11;;;33234:57;34504:81;;33665:930;;33695:649;32555:1;32548:14;;;32592:4;32579:18;;-1:-1:-1;;33731:20:1;;;33849:222;33863:7;33860:1;33857:14;33849:222;;;33945:19;;;33939:26;33924:42;;34052:4;34037:20;;;;34005:1;33993:14;;;;33879:12;33849:222;;;33853:3;34099:6;34090:7;34087:19;34084:201;;;34160:19;;;34154:26;-1:-1:-1;;34243:1:1;34239:14;;;34255:3;34235:24;34231:37;34227:42;34212:58;34197:74;;34084:201;-1:-1:-1;;;;34331:1:1;34315:14;;;34311:22;34298:36;;-1:-1:-1;33302:1299:1:o;34606:127::-;34667:10;34662:3;34658:20;34655:1;34648:31;34698:4;34695:1;34688:15;34722:4;34719:1;34712:15;34738:157;34768:1;34802:4;34799:1;34795:12;34826:3;34816:37;;34833:18;;:::i;:::-;34885:3;34878:4;34875:1;34871:12;34867:22;34862:27;;;34738:157;;;;:::o;34900:189::-;35029:3;35054:29;35079:3;35071:6;35054:29;:::i
Swarm Source
ipfs://025fa3c1e077c2646f9768b84cd727431600ce524cce6c8e2190752ba3b7fa93
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 34 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.