Feature Tip: Add private address tag to any address under My Name Tag !
Source Code
Overview
ETH Balance
0 ETH
Eth Value
$0.00View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Loading...
Loading
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 Name:
IporOracle
Compiler Version
v0.8.16+commit.07a7930e
Contract Source Code (Solidity)
/**
*Submitted for verification at Etherscan.io on 2023-03-09
*/
// SPDX-License-Identifier: BUSL-1.1
// File: contracts/libraries/errors/MiltonErrors.sol
pragma solidity 0.8.16;
/// @title Errors which occur inside Milton's method execution.
library MiltonErrors {
// 300-399-milton
/// @notice Liquidity Pool balance is equal 0.
string public constant LIQUIDITY_POOL_IS_EMPTY = "IPOR_300";
/// @notice Liquidity Pool balance is too low, should be equal or higher than 0.
string public constant LIQUIDITY_POOL_AMOUNT_TOO_LOW = "IPOR_301";
/// @notice Liquidity Pool Utilization exceeded. Liquidity Pool utilization is higher than configured in Milton maximum liquidity pool utilization.
string public constant LP_UTILIZATION_EXCEEDED = "IPOR_302";
/// @notice Liquidity Pool Utilization Per Leg exceeded. Liquidity Pool utilization per leg is higher than configured in Milton maximu liquidity pool utilization per leg.
string public constant LP_UTILIZATION_PER_LEG_EXCEEDED = "IPOR_303";
/// @notice Liquidity Pool Balance is too high
string public constant LIQUIDITY_POOL_BALANCE_IS_TOO_HIGH = "IPOR_304";
/// @notice Liquidity Pool account contribution is too high.
string public constant LP_ACCOUNT_CONTRIBUTION_IS_TOO_HIGH = "IPOR_305";
/// @notice Swap id used in input has incorrect value (like 0) or not exists.
string public constant INCORRECT_SWAP_ID = "IPOR_306";
/// @notice Swap has incorrect status.
string public constant INCORRECT_SWAP_STATUS = "IPOR_307";
/// @notice Leverage given as a parameter when opening swap is lower than configured in Milton minimum leverage.
string public constant LEVERAGE_TOO_LOW = "IPOR_308";
/// @notice Leverage given as a parameter when opening swap is higher than configured in Milton maxumum leverage.
string public constant LEVERAGE_TOO_HIGH = "IPOR_309";
/// @notice Total amount given as a parameter when opening swap is too low. Cannot be equal zero.
string public constant TOTAL_AMOUNT_TOO_LOW = "IPOR_310";
/// @notice Total amount given as a parameter when opening swap is lower than sum of liquidation deposit amount and ipor publication fee.
string public constant TOTAL_AMOUNT_LOWER_THAN_FEE = "IPOR_311";
/// @notice Amount of collateral used to open swap is higher than configured in Milton max swap collateral amount
string public constant COLLATERAL_AMOUNT_TOO_HIGH = "IPOR_312";
/// @notice Acceptable fixed interest rate defined by traded exceeded.
string public constant ACCEPTABLE_FIXED_INTEREST_RATE_EXCEEDED = "IPOR_313";
/// @notice Swap Notional Amount is higher than Total Notional for specific leg.
string public constant SWAP_NOTIONAL_HIGHER_THAN_TOTAL_NOTIONAL = "IPOR_314";
/// @notice Number of swaps per leg which are going to be liquidated is too high, is higher than configured in Milton liquidation leg limit.
string public constant LIQUIDATION_LEG_LIMIT_EXCEEDED = "IPOR_315";
/// @notice Sum of SOAP and Liquidity Pool Balance is lower than zero.
/// @dev SOAP can be negative, Sum of SOAP and Liquidity Pool Balance can be negative, but this is undesirable.
string public constant SOAP_AND_LP_BALANCE_SUM_IS_TOO_LOW = "IPOR_316";
/// @notice Calculation timestamp is earlier than last SOAP rebalance timestamp.
string public constant CALC_TIMESTAMP_LOWER_THAN_SOAP_REBALANCE_TIMESTAMP = "IPOR_317";
/// @notice Calculation timestamp is lower than Swap's open timestamp.
string public constant CALC_TIMESTAMP_LOWER_THAN_SWAP_OPEN_TIMESTAMP = "IPOR_318";
/// @notice Closing timestamp is lower than Swap's open timestamp.
string public constant CLOSING_TIMESTAMP_LOWER_THAN_SWAP_OPEN_TIMESTAMP = "IPOR_319";
/// @notice Swap cannot be closed because liquidity pool is too low for payid out cash. Situation should never happen where Liquidity Pool is insolvent.
string public constant CANNOT_CLOSE_SWAP_LP_IS_TOO_LOW = "IPOR_320";
/// @notice Swap cannot be closed because sender is not an owner of derivative and derivative maturity not achieved.
string public constant CANNOT_CLOSE_SWAP_SENDER_IS_NOT_BUYER_AND_NO_MATURITY = "IPOR_321";
/// @notice Interest from Strategy is below zero.
string public constant INTEREST_FROM_STRATEGY_BELOW_ZERO = "IPOR_322";
/// @notice Accrued Liquidity Pool is equal zero.
string public constant LIQUIDITY_POOL_ACCRUED_IS_EQUAL_ZERO = "IPOR_323";
/// @notice During spread calculation - Exponential Weighted Moving Variance cannot be higher than 1.
string public constant SPREAD_EMVAR_CANNOT_BE_HIGHER_THAN_ONE = "IPOR_324";
/// @notice During spread calculation - Alpha param cannot be higher than 1.
string public constant SPREAD_ALPHA_CANNOT_BE_HIGHER_THAN_ONE = "IPOR_325";
/// @notice IPOR publication fee balance is too low.
string public constant PUBLICATION_FEE_BALANCE_IS_TOO_LOW = "IPOR_326";
/// @notice The caller must be the Joseph (Smart Contract responsible for managing Milton's tokens and balances).
string public constant CALLER_NOT_JOSEPH = "IPOR_327";
/// @notice Deposit amount is too low.
string public constant DEPOSIT_AMOUNT_IS_TOO_LOW = "IPOR_328";
/// @notice Vault balance is lower than deposit value.
string public constant VAULT_BALANCE_LOWER_THAN_DEPOSIT_VALUE = "IPOR_329";
/// @notice Treasury balance is too low.
string public constant TREASURY_BALANCE_IS_TOO_LOW = "IPOR_330";
}
// File: contracts/interfaces/IIporAlgorithm.sol
pragma solidity 0.8.16;
/// @title Interface for interaction with IPOR calculation algorithm.
interface IIporAlgorithm {
/// @notice Returns current version of IPOR algorithm.
/// @return Current IPOR algorithm version.
function getVersion() external pure returns (uint256);
/// @notice Calculates IPOR index by given asset address
/// @param asset Asset address
/// @return iporIndex IPOR index value represented in 18 decimals
function calculateIpor(address asset) external view returns (uint256 iporIndex);
}
// File: contracts/libraries/math/IporMath.sol
pragma solidity 0.8.16;
library IporMath {
//@notice Division with rounding up on last position, x, and y is with MD
function division(uint256 x, uint256 y) internal pure returns (uint256 z) {
z = (x + (y / 2)) / y;
}
function divisionInt(int256 x, int256 y) internal pure returns (int256 z) {
z = (x + (y / 2)) / y;
}
function divisionWithoutRound(uint256 x, uint256 y) internal pure returns (uint256 z) {
z = x / y;
}
function convertWadToAssetDecimals(uint256 value, uint256 assetDecimals)
internal
pure
returns (uint256)
{
if (assetDecimals == 18) {
return value;
} else if (assetDecimals > 18) {
return value * 10**(assetDecimals - 18);
} else {
return division(value, 10**(18 - assetDecimals));
}
}
function convertWadToAssetDecimalsWithoutRound(uint256 value, uint256 assetDecimals)
internal
pure
returns (uint256)
{
if (assetDecimals == 18) {
return value;
} else if (assetDecimals > 18) {
return value * 10**(assetDecimals - 18);
} else {
return divisionWithoutRound(value, 10**(18 - assetDecimals));
}
}
function convertToWad(uint256 value, uint256 assetDecimals) internal pure returns (uint256) {
if (value > 0) {
if (assetDecimals == 18) {
return value;
} else if (assetDecimals > 18) {
return division(value, 10**(assetDecimals - 18));
} else {
return value * 10**(18 - assetDecimals);
}
} else {
return value;
}
}
function absoluteValue(int256 value) internal pure returns (uint256) {
return (uint256)(value < 0 ? -value : value);
}
function percentOf(uint256 value, uint256 rate) internal pure returns (uint256) {
return division(value * rate, 1e18);
}
}
// File: contracts/libraries/Constants.sol
pragma solidity 0.8.16;
library Constants {
uint256 public constant MAX_VALUE =
115792089237316195423570985008687907853269984665640564039457584007913129639935;
uint256 public constant D18 = 1e18;
uint256 public constant D21 = 1e21;
int256 public constant D18_INT = 1e18;
uint256 public constant D36 = 1e36;
uint256 public constant D54 = 1e54;
uint256 public constant YEAR_IN_SECONDS = 365 days;
uint256 public constant WAD_YEAR_IN_SECONDS = D18 * YEAR_IN_SECONDS;
int256 public constant WAD_YEAR_IN_SECONDS_INT = int256(WAD_YEAR_IN_SECONDS);
uint256 public constant WAD_P2_YEAR_IN_SECONDS = D18 * D18 * YEAR_IN_SECONDS;
int256 public constant WAD_P2_YEAR_IN_SECONDS_INT = int256(WAD_P2_YEAR_IN_SECONDS);
uint256 public constant MAX_CHUNK_SIZE = 50;
//@notice By default every swap takes 28 days, this variable show this value in seconds
uint256 public constant SWAP_DEFAULT_PERIOD_IN_SECONDS = 60 * 60 * 24 * 28;
}
// File: contracts/interfaces/types/IporOracleTypes.sol
pragma solidity 0.8.16;
/// @title Structs used in IporOracle smart contract
library IporOracleTypes {
//@notice IPOR Index Structure for a given asset
struct IPOR {
//@notice Quasi Interest Bearing Token Price - IBT Price without division by year in seconds
uint128 quasiIbtPrice;
/// @notice Exponential Moving Average
/// @dev used in calculating spread in MiltonSpreadModel smart contract
uint64 exponentialMovingAverage;
//@notice exponential weighted moving variance - required for calculating spread in Milton
uint64 exponentialWeightedMovingVariance;
//@notice IPOR Index value.
uint64 indexValue;
//@notice Tiestamp of most recent IPOR index update, action performed by Charlie (refer to the documentation for more details)
uint32 lastUpdateTimestamp;
}
}
// File: contracts/interfaces/types/IporTypes.sol
pragma solidity 0.8.16;
/// @title Struct used across various interfaces in IPOR Protocol.
library IporTypes {
/// @notice The struct describing the IPOR and its params calculated for the time when it was most recently updated and the change that took place since the update.
/// Namely, the interest that would be computed into IBT should the rebalance occur.
struct AccruedIpor {
/// @notice IPOR Index Value
/// @dev value represented in 18 decimals
uint256 indexValue;
/// @notice IBT Price (IBT - Interest Bearing Token). For more information reffer to the documentation:
/// https://ipor-labs.gitbook.io/ipor-labs/interest-rate-derivatives/ibt
/// @dev value represented in 18 decimals
uint256 ibtPrice;
/// @notice Exponential Moving Average
/// @dev value represented in 18 decimals
uint256 exponentialMovingAverage;
/// @notice Exponential Weighted Moving Variance
/// @dev value represented in 18 decimals
uint256 exponentialWeightedMovingVariance;
}
/// @notice Struct representing swap item, used for listing and in internal calculations
struct IporSwapMemory {
/// @notice Swap's unique ID
uint256 id;
/// @notice Swap's buyer
address buyer;
/// @notice Swap opening epoch timestamp
uint256 openTimestamp;
/// @notice Epoch when the swap will reach its maturity
uint256 endTimestamp;
/// @notice Index position of this Swap in an array of swaps' identification associated to swap buyer
/// @dev Field used for gas optimization purposes, it allows for quick removal by id in the array.
/// During removal the last item in the array is switched with the one that just has been removed.
uint256 idsIndex;
/// @notice Swap's collateral
/// @dev value represented in 18 decimals
uint256 collateral;
/// @notice Swap's notional amount
/// @dev value represented in 18 decimals
uint256 notional;
/// @notice Swap's notional amount denominated in the Interest Bearing Token (IBT)
/// @dev value represented in 18 decimals
uint256 ibtQuantity;
/// @notice Fixed interest rate at which the position has been opened
/// @dev value represented in 18 decimals
uint256 fixedInterestRate;
/// @notice Liquidation deposit amount
/// @dev value represented in 18 decimals
uint256 liquidationDepositAmount;
/// @notice State of the swap
/// @dev 0 - INACTIVE, 1 - ACTIVE
uint256 state;
}
/// @notice Struct representing balances used internally for asset calculations
/// @dev all balances in 18 decimals
struct MiltonBalancesMemory {
/// @notice Sum of all collateral put forward by the derivative buyer's on Pay Fixed & Receive Floating leg.
uint256 totalCollateralPayFixed;
/// @notice Sum of all collateral put forward by the derivative buyer's on Pay Floating & Receive Fixed leg.
uint256 totalCollateralReceiveFixed;
/// @notice Liquidity Pool Balance. This balance is where the liquidity from liquidity providers and the opening fee are accounted for,
/// @dev Amount of opening fee accounted in this balance is defined by _OPENING_FEE_FOR_TREASURY_PORTION_RATE param.
uint256 liquidityPool;
/// @notice Vault's balance, describes how much asset has been transfered to Asset Management Vault (Stanley)
uint256 vault;
}
}
// File: contracts/interfaces/IIporOracle.sol
pragma solidity 0.8.16;
/// @title Interface for interaction with IporOracle, smart contract responsible for managing IPOR Index.
interface IIporOracle {
/// @notice Returns current version of IporOracle's
/// @dev Increase number when implementation inside source code is different that implementation deployed on Mainnet
/// @return current IporOracle version
function getVersion() external pure returns (uint256);
/// @notice Gets IPOR Index indicators for a given asset
/// @dev all returned values represented in 18 decimals
/// @param asset underlying / stablecoin address supported in Ipor Protocol
/// @return value IPOR Index value for a given asset
/// @return ibtPrice Interest Bearing Token Price for a given IPOR Index
/// @return exponentialMovingAverage Exponential moving average for a given IPOR Index
/// @return exponentialWeightedMovingVariance Exponential weighted movien variance for a given IPOR Index
/// @return lastUpdateTimestamp Last IPOR Index update done by Charlie off-chain service
function getIndex(address asset)
external
view
returns (
uint256 value,
uint256 ibtPrice,
uint256 exponentialMovingAverage,
uint256 exponentialWeightedMovingVariance,
uint256 lastUpdateTimestamp
);
/// @notice Gets accrued IPOR Index indicators for a given timestamp and asset .
/// @param calculateTimestamp time of accrued IPOR Index calculation
/// @param asset underlying / stablecoin address supported by IPOR Protocol.
/// @return accruedIpor structure {IporTypes.AccruedIpor}
function getAccruedIndex(uint256 calculateTimestamp, address asset)
external
view
returns (IporTypes.AccruedIpor memory accruedIpor);
/// @notice Gets IporAlgorithm address.
function getIporAlgorithmFacade() external view returns (address);
/// @notice Calculates accrued Interest Bearing Token price for a given asset and timestamp.
/// @param asset underlying / stablecoin address supported by IPOR Protocol.
/// @param calculateTimestamp time of accrued Interest Bearing Token price calculation
/// @return accrued IBT price, represented in 18 decimals
function calculateAccruedIbtPrice(address asset, uint256 calculateTimestamp)
external
view
returns (uint256);
/// @notice Updates IPOR Index for a given asset based on value returned from iporAlgorithm.
/// @dev Emmits {IporIndexUpdate} event.
/// @param asset underlying / stablecoin address supported by IPOR Protocol
function updateIndex(address asset) external returns (IporTypes.AccruedIpor memory accruedIpor);
/// @notice Updates IPOR Index for a given asset. Function available only for Updater
/// @dev Emmits {IporIndexUpdate} event.
/// @param asset underlying / stablecoin address supported by IPOR Protocol
/// @param indexValue new IPOR Index value represented in 18 decimals
function updateIndex(address asset, uint256 indexValue) external;
/// @notice Updates IPOR indexes for a given assets. Function available only for Updater
/// @dev Emmits {IporIndexUpdate} event.
/// @param assets underlying / stablecoin addresses supported by IPOR Protocol
/// @param indexValues new IPOR Index values
function updateIndexes(address[] memory assets, uint256[] memory indexValues) external;
/// @notice Adds new Updater. Updater has right to update IPOR Index. Function available only for Owner.
/// @param newUpdater new updater address
function addUpdater(address newUpdater) external;
/// @notice Removes Updater. Function available only for Owner.
/// @param updater updater address
function removeUpdater(address updater) external;
/// @notice Checks if given account is an Updater.
/// @param account account for checking
/// @return 0 if account is not updater, 1 if account is updater.
function isUpdater(address account) external view returns (uint256);
/// @notice setup ipor algorithm address
/// @param newAlgorithmAddress ipor algorithm address
function setIporAlgorithmFacade(address newAlgorithmAddress) external;
/// @notice Adds new asset which IPOR Protocol will support. Function available only for Owner.
/// @param newAsset new asset address
/// @param updateTimestamp Time for which exponential moving average and exponential weighted moving variance was calculated
/// @param exponentialMovingAverage initial Exponential Moving Average for this asset
/// @param exponentialWeightedMovingVariance initial Exponential Weighted Moving Variance for asset.
function addAsset(
address newAsset,
uint256 updateTimestamp,
uint256 exponentialMovingAverage,
uint256 exponentialWeightedMovingVariance
) external;
/// @notice Removes asset which IPOR Protocol will not support. Function available only for Owner.
/// @param asset underlying / stablecoin address which current is supported by IPOR Protocol.
function removeAsset(address asset) external;
/// @notice Checks if given asset is supported by IPOR Protocol.
/// @param asset underlying / stablecoin address
function isAssetSupported(address asset) external view returns (bool);
/// @notice Pauses current smart contract, it can be executed only by the Owner
/// @dev Emits {Paused} event from IporOracle.
function pause() external;
/// @notice Unpauses current smart contract, it can be executed only by the Owner
/// @dev Emits {Unpaused} event from IporOracle.
function unpause() external;
/// @notice Emmited when Charlie update IPOR Index.
/// @param asset underlying / stablecoin address
/// @param indexValue IPOR Index value represented in 18 decimals
/// @param quasiIbtPrice quasi Interest Bearing Token price represented in 18 decimals.
/// @param exponentialMovingAverage Exponential Moving Average represented in 18 decimals.
/// @param exponentialWeightedMovingVariance Exponential Weighted Moving Variance
/// @param updateTimestamp moment when IPOR Index was updated.
event IporIndexUpdate(
address asset,
uint256 indexValue,
uint256 quasiIbtPrice,
uint256 exponentialMovingAverage,
uint256 exponentialWeightedMovingVariance,
uint256 updateTimestamp
);
/// @notice event emitted when IPOR Index Updater is added by Owner
/// @param newUpdater new Updater address
event IporIndexAddUpdater(address newUpdater);
/// @notice event emitted when IPOR Index Updater is removed by Owner
/// @param updater updater address
event IporIndexRemoveUpdater(address updater);
/// @notice event emitted when new asset is added by Owner to list of assets supported in IPOR Protocol.
/// @param newAsset new asset address
/// @param updateTimestamp update timestamp
/// @param exponentialMovingAverage Exponential Moving Average for asset
/// @param exponentialWeightedMovingVariance Exponential Weighted Moving Variance for asset
event IporIndexAddAsset(
address newAsset,
uint256 updateTimestamp,
uint256 exponentialMovingAverage,
uint256 exponentialWeightedMovingVariance
);
/// @notice event emitted when asset is removed by Owner from list of assets supported in IPOR Protocol.
/// @param asset asset address
event IporIndexRemoveAsset(address asset);
/// @notice event emitted when ipor algorithm address is changed
/// @param changedBy address of the account that changed the ipor algorithm address
/// @param oldIporAlgorithmFacade old ipor algorithm address
/// @param newIporAlgorithmFacade new ipor algorithm address
event IporAlgorithmFacadeChanged(
address indexed changedBy,
address indexed oldIporAlgorithmFacade,
address indexed newIporAlgorithmFacade
);
}
// File: contracts/libraries/errors/IporOracleErrors.sol
pragma solidity 0.8.16;
library IporOracleErrors {
// 200-299- iporOracle
//@notice Asset address not supported
//@dev Address is not supported when quasiIbtPrice < Constants.WAD_YEAR_IN_SECONDS.
//When quasiIbtPrice is lower than WAD_YEAR_IN_SECONDS (ibtPrice lower than 1), then we assume that asset is not supported.
string public constant ASSET_NOT_SUPPORTED = "IPOR_200";
//@notice Cannot add new asset to asset list, because already exists
string public constant CANNOT_ADD_ASSET_ASSET_ALREADY_EXISTS = "IPOR_201";
//@notice The caller must be the IporOracle updater
string public constant CALLER_NOT_UPDATER = "IPOR_202";
//@notice Actual IPOR Index timestamp is higher than accrue timestamp
string public constant INDEX_TIMESTAMP_HIGHER_THAN_ACCRUE_TIMESTAMP = "IPOR_203";
//@notice Address of algorithm used to calculate IPOR Index is not set
string public constant IPOR_ALGORITHM_ADDRESS_NOT_SET = "IPOR_204";
}
// File: contracts/oracles/libraries/IporLogic.sol
pragma solidity 0.8.16;
library IporLogic {
function accrueQuasiIbtPrice(IporOracleTypes.IPOR memory ipor, uint256 accrueTimestamp)
internal
pure
returns (uint256)
{
return
accrueQuasiIbtPrice(
ipor.indexValue,
ipor.quasiIbtPrice,
ipor.lastUpdateTimestamp,
accrueTimestamp
);
}
//@param indexValue indexValue represent in WAD
//@param quasiIbtPrice quasiIbtPrice represent in WAD, quasi inform that IBT Price doesn't have final value, is required to divide by number of seconds in year
//@dev return value represented in WAD
function accrueQuasiIbtPrice(
uint256 indexValue,
uint256 quasiIbtPrice,
uint256 indexTimestamp,
uint256 accrueTimestamp
) internal pure returns (uint256) {
require(
accrueTimestamp >= indexTimestamp,
IporOracleErrors.INDEX_TIMESTAMP_HIGHER_THAN_ACCRUE_TIMESTAMP
);
return quasiIbtPrice + (indexValue * (accrueTimestamp - indexTimestamp));
}
//@notice ExpMovAv(n) = ExpMovAv(n-1) * (1 - d) + IPOR * d
//@dev return value represented in WAD
function calculateExponentialMovingAverage(
uint256 lastExponentialMovingAverage,
uint256 indexValue,
uint256 alpha
) internal pure returns (uint256) {
return
IporMath.division(
lastExponentialMovingAverage * alpha + indexValue * (Constants.D18 - alpha),
Constants.D18
);
}
function calculateExponentialWeightedMovingVariance(
uint256 lastExponentialWeightedMovingVariance,
uint256 exponentialMovingAverage,
uint256 indexValue,
uint256 alpha
) internal pure returns (uint256 result) {
require(alpha <= Constants.D18, MiltonErrors.SPREAD_ALPHA_CANNOT_BE_HIGHER_THAN_ONE);
if (indexValue > exponentialMovingAverage) {
result = IporMath.division(
alpha *
(lastExponentialWeightedMovingVariance *
Constants.D36 +
(Constants.D18 - alpha) *
(indexValue - exponentialMovingAverage) *
(indexValue - exponentialMovingAverage)),
Constants.D54
);
} else {
result = IporMath.division(
alpha *
(lastExponentialWeightedMovingVariance *
Constants.D36 +
(Constants.D18 - alpha) *
(exponentialMovingAverage - indexValue) *
(exponentialMovingAverage - indexValue)),
Constants.D54
);
}
require(result <= Constants.D18, MiltonErrors.SPREAD_EMVAR_CANNOT_BE_HIGHER_THAN_ONE);
}
}
// File: contracts/libraries/errors/IporErrors.sol
pragma solidity 0.8.16;
library IporErrors {
// 000-199 - general codes
/// @notice General problem, address is wrong
string public constant WRONG_ADDRESS = "IPOR_000";
/// @notice General problem. Wrong decimals
string public constant WRONG_DECIMALS = "IPOR_001";
string public constant ADDRESSES_MISMATCH = "IPOR_002";
//@notice Trader doesnt have enought tokens to execute transaction
string public constant ASSET_BALANCE_TOO_LOW = "IPOR_003";
string public constant VALUE_NOT_GREATER_THAN_ZERO = "IPOR_004";
string public constant INPUT_ARRAYS_LENGTH_MISMATCH = "IPOR_005";
//@notice Amount is too low to transfer
string public constant NOT_ENOUGH_AMOUNT_TO_TRANSFER = "IPOR_006";
//@notice msg.sender is not an appointed owner, so cannot confirm his appointment to be an owner of a specific smart contract
string public constant SENDER_NOT_APPOINTED_OWNER = "IPOR_007";
//only milton can have access to function
string public constant CALLER_NOT_MILTON = "IPOR_008";
string public constant CHUNK_SIZE_EQUAL_ZERO = "IPOR_009";
string public constant CHUNK_SIZE_TOO_BIG = "IPOR_010";
}
// File: @openzeppelin/contracts/utils/math/SafeCast.sol
// OpenZeppelin Contracts (last updated v4.7.0) (utils/math/SafeCast.sol)
pragma solidity ^0.8.0;
/**
* @dev Wrappers over Solidity's uintXX/intXX 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.
*
* Can be combined with {SafeMath} and {SignedSafeMath} to extend it to smaller types, by performing
* all math on `uint256` and `int256` and then downcasting.
*/
library SafeCast {
/**
* @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
*
* _Available since v4.7._
*/
function toUint248(uint256 value) internal pure returns (uint248) {
require(value <= type(uint248).max, "SafeCast: value doesn't fit in 248 bits");
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
*
* _Available since v4.7._
*/
function toUint240(uint256 value) internal pure returns (uint240) {
require(value <= type(uint240).max, "SafeCast: value doesn't fit in 240 bits");
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
*
* _Available since v4.7._
*/
function toUint232(uint256 value) internal pure returns (uint232) {
require(value <= type(uint232).max, "SafeCast: value doesn't fit in 232 bits");
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
*
* _Available since v4.2._
*/
function toUint224(uint256 value) internal pure returns (uint224) {
require(value <= type(uint224).max, "SafeCast: value doesn't fit in 224 bits");
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
*
* _Available since v4.7._
*/
function toUint216(uint256 value) internal pure returns (uint216) {
require(value <= type(uint216).max, "SafeCast: value doesn't fit in 216 bits");
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
*
* _Available since v4.7._
*/
function toUint208(uint256 value) internal pure returns (uint208) {
require(value <= type(uint208).max, "SafeCast: value doesn't fit in 208 bits");
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
*
* _Available since v4.7._
*/
function toUint200(uint256 value) internal pure returns (uint200) {
require(value <= type(uint200).max, "SafeCast: value doesn't fit in 200 bits");
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
*
* _Available since v4.7._
*/
function toUint192(uint256 value) internal pure returns (uint192) {
require(value <= type(uint192).max, "SafeCast: value doesn't fit in 192 bits");
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
*
* _Available since v4.7._
*/
function toUint184(uint256 value) internal pure returns (uint184) {
require(value <= type(uint184).max, "SafeCast: value doesn't fit in 184 bits");
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
*
* _Available since v4.7._
*/
function toUint176(uint256 value) internal pure returns (uint176) {
require(value <= type(uint176).max, "SafeCast: value doesn't fit in 176 bits");
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
*
* _Available since v4.7._
*/
function toUint168(uint256 value) internal pure returns (uint168) {
require(value <= type(uint168).max, "SafeCast: value doesn't fit in 168 bits");
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
*
* _Available since v4.7._
*/
function toUint160(uint256 value) internal pure returns (uint160) {
require(value <= type(uint160).max, "SafeCast: value doesn't fit in 160 bits");
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
*
* _Available since v4.7._
*/
function toUint152(uint256 value) internal pure returns (uint152) {
require(value <= type(uint152).max, "SafeCast: value doesn't fit in 152 bits");
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
*
* _Available since v4.7._
*/
function toUint144(uint256 value) internal pure returns (uint144) {
require(value <= type(uint144).max, "SafeCast: value doesn't fit in 144 bits");
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
*
* _Available since v4.7._
*/
function toUint136(uint256 value) internal pure returns (uint136) {
require(value <= type(uint136).max, "SafeCast: value doesn't fit in 136 bits");
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
*
* _Available since v2.5._
*/
function toUint128(uint256 value) internal pure returns (uint128) {
require(value <= type(uint128).max, "SafeCast: value doesn't fit in 128 bits");
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
*
* _Available since v4.7._
*/
function toUint120(uint256 value) internal pure returns (uint120) {
require(value <= type(uint120).max, "SafeCast: value doesn't fit in 120 bits");
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
*
* _Available since v4.7._
*/
function toUint112(uint256 value) internal pure returns (uint112) {
require(value <= type(uint112).max, "SafeCast: value doesn't fit in 112 bits");
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
*
* _Available since v4.7._
*/
function toUint104(uint256 value) internal pure returns (uint104) {
require(value <= type(uint104).max, "SafeCast: value doesn't fit in 104 bits");
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
*
* _Available since v4.2._
*/
function toUint96(uint256 value) internal pure returns (uint96) {
require(value <= type(uint96).max, "SafeCast: value doesn't fit in 96 bits");
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
*
* _Available since v4.7._
*/
function toUint88(uint256 value) internal pure returns (uint88) {
require(value <= type(uint88).max, "SafeCast: value doesn't fit in 88 bits");
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
*
* _Available since v4.7._
*/
function toUint80(uint256 value) internal pure returns (uint80) {
require(value <= type(uint80).max, "SafeCast: value doesn't fit in 80 bits");
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
*
* _Available since v4.7._
*/
function toUint72(uint256 value) internal pure returns (uint72) {
require(value <= type(uint72).max, "SafeCast: value doesn't fit in 72 bits");
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
*
* _Available since v2.5._
*/
function toUint64(uint256 value) internal pure returns (uint64) {
require(value <= type(uint64).max, "SafeCast: value doesn't fit in 64 bits");
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
*
* _Available since v4.7._
*/
function toUint56(uint256 value) internal pure returns (uint56) {
require(value <= type(uint56).max, "SafeCast: value doesn't fit in 56 bits");
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
*
* _Available since v4.7._
*/
function toUint48(uint256 value) internal pure returns (uint48) {
require(value <= type(uint48).max, "SafeCast: value doesn't fit in 48 bits");
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
*
* _Available since v4.7._
*/
function toUint40(uint256 value) internal pure returns (uint40) {
require(value <= type(uint40).max, "SafeCast: value doesn't fit in 40 bits");
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
*
* _Available since v2.5._
*/
function toUint32(uint256 value) internal pure returns (uint32) {
require(value <= type(uint32).max, "SafeCast: value doesn't fit in 32 bits");
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
*
* _Available since v4.7._
*/
function toUint24(uint256 value) internal pure returns (uint24) {
require(value <= type(uint24).max, "SafeCast: value doesn't fit in 24 bits");
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
*
* _Available since v2.5._
*/
function toUint16(uint256 value) internal pure returns (uint16) {
require(value <= type(uint16).max, "SafeCast: value doesn't fit in 16 bits");
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
*
* _Available since v2.5._
*/
function toUint8(uint256 value) internal pure returns (uint8) {
require(value <= type(uint8).max, "SafeCast: value doesn't fit in 8 bits");
return uint8(value);
}
/**
* @dev Converts a signed int256 into an unsigned uint256.
*
* Requirements:
*
* - input must be greater than or equal to 0.
*
* _Available since v3.0._
*/
function toUint256(int256 value) internal pure returns (uint256) {
require(value >= 0, "SafeCast: value must be positive");
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
*
* _Available since v4.7._
*/
function toInt248(int256 value) internal pure returns (int248) {
require(value >= type(int248).min && value <= type(int248).max, "SafeCast: value doesn't fit in 248 bits");
return int248(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
*
* _Available since v4.7._
*/
function toInt240(int256 value) internal pure returns (int240) {
require(value >= type(int240).min && value <= type(int240).max, "SafeCast: value doesn't fit in 240 bits");
return int240(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
*
* _Available since v4.7._
*/
function toInt232(int256 value) internal pure returns (int232) {
require(value >= type(int232).min && value <= type(int232).max, "SafeCast: value doesn't fit in 232 bits");
return int232(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
*
* _Available since v4.7._
*/
function toInt224(int256 value) internal pure returns (int224) {
require(value >= type(int224).min && value <= type(int224).max, "SafeCast: value doesn't fit in 224 bits");
return int224(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
*
* _Available since v4.7._
*/
function toInt216(int256 value) internal pure returns (int216) {
require(value >= type(int216).min && value <= type(int216).max, "SafeCast: value doesn't fit in 216 bits");
return int216(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
*
* _Available since v4.7._
*/
function toInt208(int256 value) internal pure returns (int208) {
require(value >= type(int208).min && value <= type(int208).max, "SafeCast: value doesn't fit in 208 bits");
return int208(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
*
* _Available since v4.7._
*/
function toInt200(int256 value) internal pure returns (int200) {
require(value >= type(int200).min && value <= type(int200).max, "SafeCast: value doesn't fit in 200 bits");
return int200(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
*
* _Available since v4.7._
*/
function toInt192(int256 value) internal pure returns (int192) {
require(value >= type(int192).min && value <= type(int192).max, "SafeCast: value doesn't fit in 192 bits");
return int192(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
*
* _Available since v4.7._
*/
function toInt184(int256 value) internal pure returns (int184) {
require(value >= type(int184).min && value <= type(int184).max, "SafeCast: value doesn't fit in 184 bits");
return int184(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
*
* _Available since v4.7._
*/
function toInt176(int256 value) internal pure returns (int176) {
require(value >= type(int176).min && value <= type(int176).max, "SafeCast: value doesn't fit in 176 bits");
return int176(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
*
* _Available since v4.7._
*/
function toInt168(int256 value) internal pure returns (int168) {
require(value >= type(int168).min && value <= type(int168).max, "SafeCast: value doesn't fit in 168 bits");
return int168(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
*
* _Available since v4.7._
*/
function toInt160(int256 value) internal pure returns (int160) {
require(value >= type(int160).min && value <= type(int160).max, "SafeCast: value doesn't fit in 160 bits");
return int160(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
*
* _Available since v4.7._
*/
function toInt152(int256 value) internal pure returns (int152) {
require(value >= type(int152).min && value <= type(int152).max, "SafeCast: value doesn't fit in 152 bits");
return int152(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
*
* _Available since v4.7._
*/
function toInt144(int256 value) internal pure returns (int144) {
require(value >= type(int144).min && value <= type(int144).max, "SafeCast: value doesn't fit in 144 bits");
return int144(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
*
* _Available since v4.7._
*/
function toInt136(int256 value) internal pure returns (int136) {
require(value >= type(int136).min && value <= type(int136).max, "SafeCast: value doesn't fit in 136 bits");
return int136(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
*
* _Available since v3.1._
*/
function toInt128(int256 value) internal pure returns (int128) {
require(value >= type(int128).min && value <= type(int128).max, "SafeCast: value doesn't fit in 128 bits");
return int128(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
*
* _Available since v4.7._
*/
function toInt120(int256 value) internal pure returns (int120) {
require(value >= type(int120).min && value <= type(int120).max, "SafeCast: value doesn't fit in 120 bits");
return int120(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
*
* _Available since v4.7._
*/
function toInt112(int256 value) internal pure returns (int112) {
require(value >= type(int112).min && value <= type(int112).max, "SafeCast: value doesn't fit in 112 bits");
return int112(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
*
* _Available since v4.7._
*/
function toInt104(int256 value) internal pure returns (int104) {
require(value >= type(int104).min && value <= type(int104).max, "SafeCast: value doesn't fit in 104 bits");
return int104(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
*
* _Available since v4.7._
*/
function toInt96(int256 value) internal pure returns (int96) {
require(value >= type(int96).min && value <= type(int96).max, "SafeCast: value doesn't fit in 96 bits");
return int96(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
*
* _Available since v4.7._
*/
function toInt88(int256 value) internal pure returns (int88) {
require(value >= type(int88).min && value <= type(int88).max, "SafeCast: value doesn't fit in 88 bits");
return int88(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
*
* _Available since v4.7._
*/
function toInt80(int256 value) internal pure returns (int80) {
require(value >= type(int80).min && value <= type(int80).max, "SafeCast: value doesn't fit in 80 bits");
return int80(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
*
* _Available since v4.7._
*/
function toInt72(int256 value) internal pure returns (int72) {
require(value >= type(int72).min && value <= type(int72).max, "SafeCast: value doesn't fit in 72 bits");
return int72(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
*
* _Available since v3.1._
*/
function toInt64(int256 value) internal pure returns (int64) {
require(value >= type(int64).min && value <= type(int64).max, "SafeCast: value doesn't fit in 64 bits");
return int64(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
*
* _Available since v4.7._
*/
function toInt56(int256 value) internal pure returns (int56) {
require(value >= type(int56).min && value <= type(int56).max, "SafeCast: value doesn't fit in 56 bits");
return int56(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
*
* _Available since v4.7._
*/
function toInt48(int256 value) internal pure returns (int48) {
require(value >= type(int48).min && value <= type(int48).max, "SafeCast: value doesn't fit in 48 bits");
return int48(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
*
* _Available since v4.7._
*/
function toInt40(int256 value) internal pure returns (int40) {
require(value >= type(int40).min && value <= type(int40).max, "SafeCast: value doesn't fit in 40 bits");
return int40(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
*
* _Available since v3.1._
*/
function toInt32(int256 value) internal pure returns (int32) {
require(value >= type(int32).min && value <= type(int32).max, "SafeCast: value doesn't fit in 32 bits");
return int32(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
*
* _Available since v4.7._
*/
function toInt24(int256 value) internal pure returns (int24) {
require(value >= type(int24).min && value <= type(int24).max, "SafeCast: value doesn't fit in 24 bits");
return int24(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
*
* _Available since v3.1._
*/
function toInt16(int256 value) internal pure returns (int16) {
require(value >= type(int16).min && value <= type(int16).max, "SafeCast: value doesn't fit in 16 bits");
return int16(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
*
* _Available since v3.1._
*/
function toInt8(int256 value) internal pure returns (int8) {
require(value >= type(int8).min && value <= type(int8).max, "SafeCast: value doesn't fit in 8 bits");
return int8(value);
}
/**
* @dev Converts an unsigned uint256 into a signed int256.
*
* Requirements:
*
* - input must be less than or equal to maxInt256.
*
* _Available since v3.0._
*/
function toInt256(uint256 value) internal pure returns (int256) {
// Note: Unsafe cast below is okay because `type(int256).max` is guaranteed to be positive
require(value <= uint256(type(int256).max), "SafeCast: value doesn't fit in an int256");
return int256(value);
}
}
// File: contracts/oracles/libraries/DecayFactorCalculation.sol
pragma solidity 0.8.16;
uint256 constant END_INTERVAL_ONE = 179666;
uint256 constant END_INTERVAL_TWO = 596832;
uint256 constant END_INTERVAL_THREE = 1346513;
// Line One Parameters in wand
int256 constant SLOPE_FACTOR_ONE = -2782991070840;
int256 constant BASE_ONE = 1000000000000000000;
// Line two Parameters in wand
int256 constant SLOPE_FACTOR_TWO = -958849469240;
int256 constant BASE_TWO = 672268604625703800;
// Line three Parameters in wand
int256 constant SLOPE_FACTOR_THREE = -133388866004;
int256 constant BASE_THREE = 179609917339805645;
library DecayFactorCalculation {
using SafeCast for uint256;
using SafeCast for int256;
//@param variable represent in int, NOT in WAD
//@dev return value represented in WAD
function calculate(uint256 timeInterval) internal pure returns (uint256 decayFactor) {
if (timeInterval < END_INTERVAL_ONE) {
return linearFunction(SLOPE_FACTOR_ONE, BASE_ONE, timeInterval.toInt256()).toUint256();
}
if (timeInterval < END_INTERVAL_TWO) {
return linearFunction(SLOPE_FACTOR_TWO, BASE_TWO, timeInterval.toInt256()).toUint256();
}
if (timeInterval < END_INTERVAL_THREE) {
return
linearFunction(SLOPE_FACTOR_THREE, BASE_THREE, timeInterval.toInt256()).toUint256();
}
decayFactor = 0;
}
//@param slope represent in WAD
//@param base represent in WAD
//@param variable represent in int, NOT in WAD
//@dev return value represented in WAD
function linearFunction(
int256 slope,
int256 base,
int256 variable
) internal pure returns (int256) {
return slope * variable + base;
}
}
// File: @openzeppelin/contracts-upgradeable/utils/StorageSlotUpgradeable.sol
// OpenZeppelin Contracts (last updated v4.7.0) (utils/StorageSlot.sol)
pragma solidity ^0.8.0;
/**
* @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 ERC1967 implementation slot:
* ```
* contract ERC1967 {
* bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;
*
* function _getImplementation() internal view returns (address) {
* return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;
* }
*
* function _setImplementation(address newImplementation) internal {
* require(Address.isContract(newImplementation), "ERC1967: new implementation is not a contract");
* StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;
* }
* }
* ```
*
* _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._
*/
library StorageSlotUpgradeable {
struct AddressSlot {
address value;
}
struct BooleanSlot {
bool value;
}
struct Bytes32Slot {
bytes32 value;
}
struct Uint256Slot {
uint256 value;
}
/**
* @dev Returns an `AddressSlot` with member `value` located at `slot`.
*/
function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {
/// @solidity memory-safe-assembly
assembly {
r.slot := slot
}
}
/**
* @dev Returns an `BooleanSlot` with member `value` located at `slot`.
*/
function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {
/// @solidity memory-safe-assembly
assembly {
r.slot := slot
}
}
/**
* @dev Returns an `Bytes32Slot` with member `value` located at `slot`.
*/
function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {
/// @solidity memory-safe-assembly
assembly {
r.slot := slot
}
}
/**
* @dev Returns an `Uint256Slot` with member `value` located at `slot`.
*/
function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {
/// @solidity memory-safe-assembly
assembly {
r.slot := slot
}
}
}
// File: @openzeppelin/contracts-upgradeable/proxy/beacon/IBeaconUpgradeable.sol
// OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol)
pragma solidity ^0.8.0;
/**
* @dev This is the interface that {BeaconProxy} expects of its beacon.
*/
interface IBeaconUpgradeable {
/**
* @dev Must return an address that can be used as a delegate call target.
*
* {BeaconProxy} will check that this address is a contract.
*/
function implementation() external view returns (address);
}
// File: @openzeppelin/contracts-upgradeable/interfaces/draft-IERC1822Upgradeable.sol
// OpenZeppelin Contracts (last updated v4.5.0) (interfaces/draft-IERC1822.sol)
pragma solidity ^0.8.0;
/**
* @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified
* proxy whose upgrades are fully controlled by the current implementation.
*/
interface IERC1822ProxiableUpgradeable {
/**
* @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);
}
// File: @openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol
// OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol)
pragma solidity ^0.8.1;
/**
* @dev Collection of functions related to the address type
*/
library AddressUpgradeable {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will return false for the following
* types of addresses:
*
* - an externally-owned account
* - a contract in construction
* - an address where a contract will be created
* - an address where a contract lived, but was destroyed
* ====
*
* [IMPORTANT]
* ====
* You shouldn't rely on `isContract` to protect against flash loan attacks!
*
* Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
* like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
* constructor.
* ====
*/
function isContract(address account) internal view returns (bool) {
// This method relies on extcodesize/address.code.length, which returns 0
// for contracts in construction, since the code is only stored at the end
// of the constructor execution.
return account.code.length > 0;
}
/**
* @dev Replacement for Solidity's `transfer`: sends `amount` wei to
* `recipient`, forwarding all available gas and reverting on errors.
*
* https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
* of certain opcodes, possibly making contracts go over the 2300 gas limit
* imposed by `transfer`, making them unable to receive funds via
* `transfer`. {sendValue} removes this limitation.
*
* https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
*
* IMPORTANT: because control is transferred to `recipient`, care must be
* taken to not create reentrancy vulnerabilities. Consider using
* {ReentrancyGuard} or the
* https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
*/
function sendValue(address payable recipient, uint256 amount) internal {
require(address(this).balance >= amount, "Address: insufficient balance");
(bool success, ) = recipient.call{value: amount}("");
require(success, "Address: unable to send value, recipient may have reverted");
}
/**
* @dev Performs a Solidity function call using a low level `call`. A
* plain `call` is an unsafe replacement for a function call: use this
* function instead.
*
* If `target` reverts with a revert reason, it is bubbled up by this
* function (like regular Solidity function calls).
*
* Returns the raw returned data. To convert to the expected return value,
* use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
*
* Requirements:
*
* - `target` must be a contract.
* - calling `target` with `data` must not revert.
*
* _Available since v3.1._
*/
function functionCall(address target, bytes memory data) internal returns (bytes memory) {
return functionCall(target, data, "Address: low-level call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
* `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but also transferring `value` wei to `target`.
*
* Requirements:
*
* - the calling contract must have an ETH balance of at least `value`.
* - the called Solidity function must be `payable`.
*
* _Available since v3.1._
*/
function functionCallWithValue(
address target,
bytes memory data,
uint256 value
) internal returns (bytes memory) {
return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
}
/**
* @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
* with `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCallWithValue(
address target,
bytes memory data,
uint256 value,
string memory errorMessage
) internal returns (bytes memory) {
require(address(this).balance >= value, "Address: insufficient balance for call");
require(isContract(target), "Address: call to non-contract");
(bool success, bytes memory returndata) = target.call{value: value}(data);
return verifyCallResult(success, returndata, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/
function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
return functionStaticCall(target, data, "Address: low-level static call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/
function functionStaticCall(
address target,
bytes memory data,
string memory errorMessage
) internal view returns (bytes memory) {
require(isContract(target), "Address: static call to non-contract");
(bool success, bytes memory returndata) = target.staticcall(data);
return verifyCallResult(success, returndata, errorMessage);
}
/**
* @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
* revert reason using the provided one.
*
* _Available since v4.3._
*/
function verifyCallResult(
bool success,
bytes memory returndata,
string memory errorMessage
) internal pure returns (bytes memory) {
if (success) {
return returndata;
} else {
// Look for revert reason and bubble it up if present
if (returndata.length > 0) {
// The easiest way to bubble the revert reason is using memory via assembly
/// @solidity memory-safe-assembly
assembly {
let returndata_size := mload(returndata)
revert(add(32, returndata), returndata_size)
}
} else {
revert(errorMessage);
}
}
}
}
// File: @openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol
// OpenZeppelin Contracts (last updated v4.7.0) (proxy/utils/Initializable.sol)
pragma solidity ^0.8.2;
/**
* @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]
* ```
* 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 Indicates that the contract has been initialized.
* @custom:oz-retyped-from bool
*/
uint8 private _initialized;
/**
* @dev Indicates that the contract is in the process of being initialized.
*/
bool private _initializing;
/**
* @dev Triggered when the contract has been initialized or reinitialized.
*/
event Initialized(uint8 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. Equivalent to `reinitializer(1)`.
*/
modifier initializer() {
bool isTopLevelCall = !_initializing;
require(
(isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1),
"Initializable: contract is already initialized"
);
_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.
*
* `initializer` is equivalent to `reinitializer(1)`, so 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.
*
* 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.
*/
modifier reinitializer(uint8 version) {
require(!_initializing && _initialized < version, "Initializable: contract is already initialized");
_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() {
require(_initializing, "Initializable: contract is not initializing");
_;
}
/**
* @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.
*/
function _disableInitializers() internal virtual {
require(!_initializing, "Initializable: contract is initializing");
if (_initialized < type(uint8).max) {
_initialized = type(uint8).max;
emit Initialized(type(uint8).max);
}
}
}
// File: @openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol
// OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol)
pragma solidity ^0.8.0;
/**
* @dev Contract module that helps prevent reentrant calls to a function.
*
* Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
* available, which can be applied to functions to make sure there are no nested
* (reentrant) calls to them.
*
* Note that because there is a single `nonReentrant` guard, functions marked as
* `nonReentrant` may not call one another. This can be worked around by making
* those functions `private`, and then adding `external` `nonReentrant` entry
* points to them.
*
* TIP: If you would like to learn more about reentrancy and alternative ways
* to protect against it, check out our blog post
* https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
*/
abstract contract 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;
uint256 private _status;
function __ReentrancyGuard_init() internal onlyInitializing {
__ReentrancyGuard_init_unchained();
}
function __ReentrancyGuard_init_unchained() internal onlyInitializing {
_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() {
// On the first call to nonReentrant, _notEntered will be true
require(_status != _ENTERED, "ReentrancyGuard: reentrant call");
// Any calls to nonReentrant after this point will fail
_status = _ENTERED;
_;
// By storing the original value once again, a refund is triggered (see
// https://eips.ethereum.org/EIPS/eip-2200)
_status = _NOT_ENTERED;
}
/**
* @dev This empty reserved space is put in place to allow future versions to add new
* variables without shifting down storage in the inheritance chain.
* See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
*/
uint256[49] private __gap;
}
// File: @openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)
pragma solidity ^0.8.0;
/**
* @dev Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and msg.data, they should not be accessed in such a direct
* manner, since when dealing with meta-transactions the account sending and
* paying for execution may not be the actual sender (as far as an application
* is concerned).
*
* This contract is only required for intermediate, library-like contracts.
*/
abstract contract 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;
}
/**
* @dev This empty reserved space is put in place to allow future versions to add new
* variables without shifting down storage in the inheritance chain.
* See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
*/
uint256[50] private __gap;
}
// File: @openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol
// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)
pragma solidity ^0.8.0;
/**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
*
* This module is used through inheritance. It will make available the modifier
* `onlyOwner`, which can be applied to your functions to restrict their use to
* the owner.
*/
abstract contract OwnableUpgradeable is Initializable, ContextUpgradeable {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
function __Ownable_init() internal onlyInitializing {
__Ownable_init_unchained();
}
function __Ownable_init_unchained() internal onlyInitializing {
_transferOwnership(_msgSender());
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
_checkOwner();
_;
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
return _owner;
}
/**
* @dev Throws if the sender is not the owner.
*/
function _checkOwner() internal view virtual {
require(owner() == _msgSender(), "Ownable: caller is not the owner");
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/
function renounceOwnership() public virtual onlyOwner {
_transferOwnership(address(0));
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public virtual onlyOwner {
require(newOwner != address(0), "Ownable: new owner is the zero address");
_transferOwnership(newOwner);
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Internal function without access restriction.
*/
function _transferOwnership(address newOwner) internal virtual {
address oldOwner = _owner;
_owner = newOwner;
emit OwnershipTransferred(oldOwner, newOwner);
}
/**
* @dev This empty reserved space is put in place to allow future versions to add new
* variables without shifting down storage in the inheritance chain.
* See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
*/
uint256[49] private __gap;
}
// File: contracts/security/IporOwnableUpgradeable.sol
pragma solidity 0.8.16;
contract IporOwnableUpgradeable is OwnableUpgradeable {
address private _appointedOwner;
event AppointedToTransferOwnership(address indexed appointedOwner);
function transferOwnership(address appointedOwner) public override onlyOwner {
require(appointedOwner != address(0), IporErrors.WRONG_ADDRESS);
_appointedOwner = appointedOwner;
emit AppointedToTransferOwnership(appointedOwner);
}
function confirmTransferOwnership() public onlyAppointedOwner {
_appointedOwner = address(0);
_transferOwnership(_msgSender());
}
modifier onlyAppointedOwner() {
require(_appointedOwner == _msgSender(), IporErrors.SENDER_NOT_APPOINTED_OWNER);
_;
}
}
// File: @openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol
// OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol)
pragma solidity ^0.8.0;
/**
* @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 {
/**
* @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);
bool private _paused;
/**
* @dev Initializes the contract in unpaused state.
*/
function __Pausable_init() internal onlyInitializing {
__Pausable_init_unchained();
}
function __Pausable_init_unchained() internal onlyInitializing {
_paused = false;
}
/**
* @dev Modifier to make a function callable only when the contract is not paused.
*
* Requirements:
*
* - The contract must not be paused.
*/
modifier whenNotPaused() {
_requireNotPaused();
_;
}
/**
* @dev Modifier to make a function callable only when the contract is paused.
*
* Requirements:
*
* - The contract must be paused.
*/
modifier whenPaused() {
_requirePaused();
_;
}
/**
* @dev Returns true if the contract is paused, and false otherwise.
*/
function paused() public view virtual returns (bool) {
return _paused;
}
/**
* @dev Throws if the contract is paused.
*/
function _requireNotPaused() internal view virtual {
require(!paused(), "Pausable: paused");
}
/**
* @dev Throws if the contract is not paused.
*/
function _requirePaused() internal view virtual {
require(paused(), "Pausable: not paused");
}
/**
* @dev Triggers stopped state.
*
* Requirements:
*
* - The contract must not be paused.
*/
function _pause() internal virtual whenNotPaused {
_paused = true;
emit Paused(_msgSender());
}
/**
* @dev Returns to normal state.
*
* Requirements:
*
* - The contract must be paused.
*/
function _unpause() internal virtual whenPaused {
_paused = false;
emit Unpaused(_msgSender());
}
/**
* @dev This empty reserved space is put in place to allow future versions to add new
* variables without shifting down storage in the inheritance chain.
* See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
*/
uint256[49] private __gap;
}
// File: @openzeppelin/contracts-upgradeable/proxy/ERC1967/ERC1967UpgradeUpgradeable.sol
// OpenZeppelin Contracts (last updated v4.5.0) (proxy/ERC1967/ERC1967Upgrade.sol)
pragma solidity ^0.8.2;
/**
* @dev This abstract contract provides getters and event emitting update functions for
* https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots.
*
* _Available since v4.1._
*
* @custom:oz-upgrades-unsafe-allow delegatecall
*/
abstract contract ERC1967UpgradeUpgradeable is Initializable {
function __ERC1967Upgrade_init() internal onlyInitializing {
}
function __ERC1967Upgrade_init_unchained() internal onlyInitializing {
}
// This is the keccak-256 hash of "eip1967.proxy.rollback" subtracted by 1
bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143;
/**
* @dev Storage slot with the address of the current implementation.
* This is the keccak-256 hash of "eip1967.proxy.implementation" subtracted by 1, and is
* validated in the constructor.
*/
bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;
/**
* @dev Emitted when the implementation is upgraded.
*/
event Upgraded(address indexed implementation);
/**
* @dev Returns the current implementation address.
*/
function _getImplementation() internal view returns (address) {
return StorageSlotUpgradeable.getAddressSlot(_IMPLEMENTATION_SLOT).value;
}
/**
* @dev Stores a new address in the EIP1967 implementation slot.
*/
function _setImplementation(address newImplementation) private {
require(AddressUpgradeable.isContract(newImplementation), "ERC1967: new implementation is not a contract");
StorageSlotUpgradeable.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;
}
/**
* @dev Perform implementation upgrade
*
* Emits an {Upgraded} event.
*/
function _upgradeTo(address newImplementation) internal {
_setImplementation(newImplementation);
emit Upgraded(newImplementation);
}
/**
* @dev Perform implementation upgrade with additional setup call.
*
* Emits an {Upgraded} event.
*/
function _upgradeToAndCall(
address newImplementation,
bytes memory data,
bool forceCall
) internal {
_upgradeTo(newImplementation);
if (data.length > 0 || forceCall) {
_functionDelegateCall(newImplementation, data);
}
}
/**
* @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call.
*
* Emits an {Upgraded} event.
*/
function _upgradeToAndCallUUPS(
address newImplementation,
bytes memory data,
bool forceCall
) internal {
// Upgrades from old implementations will perform a rollback test. This test requires the new
// implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing
// this special case will break upgrade paths from old UUPS implementation to new ones.
if (StorageSlotUpgradeable.getBooleanSlot(_ROLLBACK_SLOT).value) {
_setImplementation(newImplementation);
} else {
try IERC1822ProxiableUpgradeable(newImplementation).proxiableUUID() returns (bytes32 slot) {
require(slot == _IMPLEMENTATION_SLOT, "ERC1967Upgrade: unsupported proxiableUUID");
} catch {
revert("ERC1967Upgrade: new implementation is not UUPS");
}
_upgradeToAndCall(newImplementation, data, forceCall);
}
}
/**
* @dev Storage slot with the admin of the contract.
* This is the keccak-256 hash of "eip1967.proxy.admin" subtracted by 1, and is
* validated in the constructor.
*/
bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;
/**
* @dev Emitted when the admin account has changed.
*/
event AdminChanged(address previousAdmin, address newAdmin);
/**
* @dev Returns the current admin.
*/
function _getAdmin() internal view returns (address) {
return StorageSlotUpgradeable.getAddressSlot(_ADMIN_SLOT).value;
}
/**
* @dev Stores a new address in the EIP1967 admin slot.
*/
function _setAdmin(address newAdmin) private {
require(newAdmin != address(0), "ERC1967: new admin is the zero address");
StorageSlotUpgradeable.getAddressSlot(_ADMIN_SLOT).value = newAdmin;
}
/**
* @dev Changes the admin of the proxy.
*
* Emits an {AdminChanged} event.
*/
function _changeAdmin(address newAdmin) internal {
emit AdminChanged(_getAdmin(), newAdmin);
_setAdmin(newAdmin);
}
/**
* @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.
* This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.
*/
bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;
/**
* @dev Emitted when the beacon is upgraded.
*/
event BeaconUpgraded(address indexed beacon);
/**
* @dev Returns the current beacon.
*/
function _getBeacon() internal view returns (address) {
return StorageSlotUpgradeable.getAddressSlot(_BEACON_SLOT).value;
}
/**
* @dev Stores a new beacon in the EIP1967 beacon slot.
*/
function _setBeacon(address newBeacon) private {
require(AddressUpgradeable.isContract(newBeacon), "ERC1967: new beacon is not a contract");
require(
AddressUpgradeable.isContract(IBeaconUpgradeable(newBeacon).implementation()),
"ERC1967: beacon implementation is not a contract"
);
StorageSlotUpgradeable.getAddressSlot(_BEACON_SLOT).value = newBeacon;
}
/**
* @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does
* not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).
*
* Emits a {BeaconUpgraded} event.
*/
function _upgradeBeaconToAndCall(
address newBeacon,
bytes memory data,
bool forceCall
) internal {
_setBeacon(newBeacon);
emit BeaconUpgraded(newBeacon);
if (data.length > 0 || forceCall) {
_functionDelegateCall(IBeaconUpgradeable(newBeacon).implementation(), data);
}
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.4._
*/
function _functionDelegateCall(address target, bytes memory data) private returns (bytes memory) {
require(AddressUpgradeable.isContract(target), "Address: delegate call to non-contract");
// solhint-disable-next-line avoid-low-level-calls
(bool success, bytes memory returndata) = target.delegatecall(data);
return AddressUpgradeable.verifyCallResult(success, returndata, "Address: low-level delegate call failed");
}
/**
* @dev This empty reserved space is put in place to allow future versions to add new
* variables without shifting down storage in the inheritance chain.
* See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
*/
uint256[50] private __gap;
}
// File: @openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol
// OpenZeppelin Contracts (last updated v4.5.0) (proxy/utils/UUPSUpgradeable.sol)
pragma solidity ^0.8.0;
/**
* @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.
*
* _Available since v4.1._
*/
abstract contract UUPSUpgradeable is Initializable, IERC1822ProxiableUpgradeable, ERC1967UpgradeUpgradeable {
function __UUPSUpgradeable_init() internal onlyInitializing {
}
function __UUPSUpgradeable_init_unchained() internal onlyInitializing {
}
/// @custom:oz-upgrades-unsafe-allow state-variable-immutable state-variable-assignment
address private immutable __self = address(this);
/**
* @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 ERC1967) 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 ERC1167 minimal proxies (clones) would not normally pass this test, but is not guaranteed to
* fail.
*/
modifier onlyProxy() {
require(address(this) != __self, "Function must be called through delegatecall");
require(_getImplementation() == __self, "Function must be called through active proxy");
_;
}
/**
* @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() {
require(address(this) == __self, "UUPSUpgradeable: must not be called through delegatecall");
_;
}
/**
* @dev Implementation of the ERC1822 {proxiableUUID} function. This returns the storage slot used by the
* implementation. It is used to validate that the this implementation remains valid after 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 override notDelegated returns (bytes32) {
return _IMPLEMENTATION_SLOT;
}
/**
* @dev Upgrade the implementation of the proxy to `newImplementation`.
*
* Calls {_authorizeUpgrade}.
*
* Emits an {Upgraded} event.
*/
function upgradeTo(address newImplementation) external virtual onlyProxy {
_authorizeUpgrade(newImplementation);
_upgradeToAndCallUUPS(newImplementation, new bytes(0), false);
}
/**
* @dev Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call
* encoded in `data`.
*
* Calls {_authorizeUpgrade}.
*
* Emits an {Upgraded} event.
*/
function upgradeToAndCall(address newImplementation, bytes memory data) external payable virtual onlyProxy {
_authorizeUpgrade(newImplementation);
_upgradeToAndCallUUPS(newImplementation, data, true);
}
/**
* @dev Function that should revert when `msg.sender` is not authorized to upgrade the contract. Called by
* {upgradeTo} and {upgradeToAndCall}.
*
* Normally, this function will use an xref:access.adoc[access control] modifier such as {Ownable-onlyOwner}.
*
* ```solidity
* function _authorizeUpgrade(address) internal override onlyOwner {}
* ```
*/
function _authorizeUpgrade(address newImplementation) internal virtual;
/**
* @dev This empty reserved space is put in place to allow future versions to add new
* variables without shifting down storage in the inheritance chain.
* See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
*/
uint256[50] private __gap;
}
// File: contracts/oracles/IporOracle.sol
pragma solidity 0.8.16;
/**
* @title IPOR Index Oracle Contract
*
* @author IPOR Labs
*/
contract IporOracle is
Initializable,
PausableUpgradeable,
UUPSUpgradeable,
IporOwnableUpgradeable,
IIporOracle
{
using SafeCast for uint256;
using IporLogic for IporOracleTypes.IPOR;
mapping(address => uint256) internal _updaters;
mapping(address => IporOracleTypes.IPOR) internal _indexes;
address internal _iporAlgorithmFacade;
modifier onlyUpdater() {
require(_updaters[_msgSender()] == 1, IporOracleErrors.CALLER_NOT_UPDATER);
_;
}
/// @custom:oz-upgrades-unsafe-allow constructor
constructor() {
_disableInitializers();
}
function initialize(
address[] memory assets,
uint32[] memory updateTimestamps,
uint64[] memory exponentialMovingAverages,
uint64[] memory exponentialWeightedMovingVariances
) public initializer {
__Pausable_init_unchained();
__Ownable_init_unchained();
__UUPSUpgradeable_init_unchained();
uint256 assetsLength = assets.length;
for (uint256 i; i != assetsLength; ++i) {
require(assets[i] != address(0), IporErrors.WRONG_ADDRESS);
_indexes[assets[i]] = IporOracleTypes.IPOR(
Constants.WAD_YEAR_IN_SECONDS.toUint128(),
exponentialMovingAverages[i],
exponentialWeightedMovingVariances[i],
0,
updateTimestamps[i]
);
}
}
function getVersion() external pure virtual override returns (uint256) {
return 3;
}
function getIndex(address asset)
external
view
override
returns (
uint256 indexValue,
uint256 ibtPrice,
uint256 exponentialMovingAverage,
uint256 exponentialWeightedMovingVariance,
uint256 lastUpdateTimestamp
)
{
IporOracleTypes.IPOR memory ipor = _indexes[asset];
require(ipor.quasiIbtPrice > 0, IporOracleErrors.ASSET_NOT_SUPPORTED);
return (
indexValue = ipor.indexValue,
ibtPrice = IporMath.division(ipor.quasiIbtPrice, Constants.YEAR_IN_SECONDS),
exponentialMovingAverage = ipor.exponentialMovingAverage,
exponentialWeightedMovingVariance = ipor.exponentialWeightedMovingVariance,
lastUpdateTimestamp = ipor.lastUpdateTimestamp
);
}
function getAccruedIndex(uint256 calculateTimestamp, address asset)
external
view
virtual
override
returns (IporTypes.AccruedIpor memory accruedIpor)
{
IporOracleTypes.IPOR memory ipor = _indexes[asset];
require(ipor.quasiIbtPrice > 0, IporOracleErrors.ASSET_NOT_SUPPORTED);
accruedIpor = IporTypes.AccruedIpor(
ipor.indexValue,
_calculateAccruedIbtPrice(calculateTimestamp, asset),
ipor.exponentialMovingAverage,
ipor.exponentialWeightedMovingVariance
);
}
function getIporAlgorithmFacade() external view override returns (address) {
return _iporAlgorithmFacade;
}
function setIporAlgorithmFacade(address newIporAlgorithmFacade) external onlyOwner {
require(newIporAlgorithmFacade != address(0), IporErrors.WRONG_ADDRESS);
address oldIporAlgorithmFacade = _iporAlgorithmFacade;
_iporAlgorithmFacade = newIporAlgorithmFacade;
emit IporAlgorithmFacadeChanged(
_msgSender(),
oldIporAlgorithmFacade,
newIporAlgorithmFacade
);
}
function calculateAccruedIbtPrice(address asset, uint256 calculateTimestamp)
external
view
override
returns (uint256)
{
return _calculateAccruedIbtPrice(calculateTimestamp, asset);
}
function updateIndex(address asset, uint256 indexValue)
external
override
onlyUpdater
whenNotPaused
{
uint256[] memory indexes = new uint256[](1);
indexes[0] = indexValue;
address[] memory assets = new address[](1);
assets[0] = asset;
_updateIndexes(assets, indexes, block.timestamp);
}
function updateIndex(address asset)
external
override
onlyUpdater
whenNotPaused
returns (IporTypes.AccruedIpor memory accruedIpor)
{
IporOracleTypes.IPOR memory ipor = _indexes[asset];
require(ipor.quasiIbtPrice > 0, IporOracleErrors.ASSET_NOT_SUPPORTED);
address iporAlgorithmFacade = _iporAlgorithmFacade;
require(iporAlgorithmFacade != address(0), IporOracleErrors.IPOR_ALGORITHM_ADDRESS_NOT_SET);
uint256 newIndexValue = IIporAlgorithm(iporAlgorithmFacade).calculateIpor(asset);
(
accruedIpor.indexValue,
accruedIpor.ibtPrice,
accruedIpor.exponentialMovingAverage,
accruedIpor.exponentialWeightedMovingVariance,
) = _updateIndex(asset, newIndexValue, block.timestamp);
}
function updateIndexes(address[] memory assets, uint256[] memory indexValues)
external
override
onlyUpdater
whenNotPaused
{
_updateIndexes(assets, indexValues, block.timestamp);
}
function addUpdater(address updater) external override onlyOwner whenNotPaused {
_updaters[updater] = 1;
emit IporIndexAddUpdater(updater);
}
function removeUpdater(address updater) external override onlyOwner whenNotPaused {
_updaters[updater] = 0;
emit IporIndexRemoveUpdater(updater);
}
function isUpdater(address updater) external view override returns (uint256) {
return _updaters[updater];
}
function addAsset(
address asset,
uint256 updateTimestamp,
uint256 exponentialMovingAverage,
uint256 exponentialWeightedMovingVariance
) external override onlyOwner whenNotPaused {
require(asset != address(0), IporErrors.WRONG_ADDRESS);
require(
_indexes[asset].quasiIbtPrice == 0,
IporOracleErrors.CANNOT_ADD_ASSET_ASSET_ALREADY_EXISTS
);
_indexes[asset] = IporOracleTypes.IPOR(
Constants.WAD_YEAR_IN_SECONDS.toUint128(),
exponentialMovingAverage.toUint64(),
exponentialWeightedMovingVariance.toUint64(),
0,
updateTimestamp.toUint32()
);
emit IporIndexAddAsset(
asset,
exponentialMovingAverage,
exponentialWeightedMovingVariance,
updateTimestamp
);
}
function removeAsset(address asset) external override onlyOwner whenNotPaused {
require(asset != address(0), IporErrors.WRONG_ADDRESS);
require(_indexes[asset].quasiIbtPrice > 0, IporOracleErrors.ASSET_NOT_SUPPORTED);
delete _indexes[asset];
emit IporIndexRemoveAsset(asset);
}
function isAssetSupported(address asset) external view override returns (bool) {
return _indexes[asset].quasiIbtPrice > 0;
}
function pause() external override onlyOwner {
_pause();
}
function unpause() external override onlyOwner {
_unpause();
}
function _updateIndexes(
address[] memory assets,
uint256[] memory indexValues,
uint256 updateTimestamp
) internal onlyUpdater {
require(assets.length == indexValues.length, IporErrors.INPUT_ARRAYS_LENGTH_MISMATCH);
for (uint256 i; i != assets.length; ++i) {
_updateIndex(assets[i], indexValues[i], updateTimestamp);
}
}
function _updateIndex(
address asset,
uint256 indexValue,
uint256 updateTimestamp
)
internal
returns (
uint256 newIndexValue,
uint256 newIbtPrice,
uint256 newExponentialMovingAverage,
uint256 newExponentialWeightedMovingVariance,
uint256 lastUpdateTimestamp
)
{
IporOracleTypes.IPOR memory ipor = _indexes[asset];
require(ipor.quasiIbtPrice > 0, IporOracleErrors.ASSET_NOT_SUPPORTED);
require(
ipor.lastUpdateTimestamp <= updateTimestamp,
IporOracleErrors.INDEX_TIMESTAMP_HIGHER_THAN_ACCRUE_TIMESTAMP
);
newExponentialMovingAverage = IporLogic.calculateExponentialMovingAverage(
ipor.exponentialMovingAverage,
indexValue,
_decayFactorValue(updateTimestamp - ipor.lastUpdateTimestamp)
);
newExponentialWeightedMovingVariance = IporLogic.calculateExponentialWeightedMovingVariance(
ipor.exponentialWeightedMovingVariance,
newExponentialMovingAverage,
indexValue,
_decayFactorValue(updateTimestamp - ipor.lastUpdateTimestamp)
);
uint256 newQuasiIbtPrice = ipor.accrueQuasiIbtPrice(updateTimestamp);
_indexes[asset] = IporOracleTypes.IPOR(
newQuasiIbtPrice.toUint128(),
newExponentialMovingAverage.toUint64(),
newExponentialWeightedMovingVariance.toUint64(),
indexValue.toUint64(),
updateTimestamp.toUint32()
);
newIndexValue = indexValue;
newIbtPrice = IporMath.division(newQuasiIbtPrice, Constants.YEAR_IN_SECONDS);
lastUpdateTimestamp = updateTimestamp;
emit IporIndexUpdate(
asset,
indexValue,
newQuasiIbtPrice,
newExponentialMovingAverage,
newExponentialWeightedMovingVariance,
updateTimestamp
);
}
function _decayFactorValue(uint256 timeFromLastPublication)
internal
view
virtual
returns (uint256)
{
return DecayFactorCalculation.calculate(timeFromLastPublication);
}
function _calculateAccruedIbtPrice(uint256 calculateTimestamp, address asset)
internal
view
returns (uint256)
{
return
IporMath.division(
_indexes[asset].accrueQuasiIbtPrice(calculateTimestamp),
Constants.YEAR_IN_SECONDS
);
}
//solhint-disable no-empty-blocks
function _authorizeUpgrade(address) internal override onlyOwner {}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"previousAdmin","type":"address"},{"indexed":false,"internalType":"address","name":"newAdmin","type":"address"}],"name":"AdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"appointedOwner","type":"address"}],"name":"AppointedToTransferOwnership","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"beacon","type":"address"}],"name":"BeaconUpgraded","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint8","name":"version","type":"uint8"}],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"changedBy","type":"address"},{"indexed":true,"internalType":"address","name":"oldIporAlgorithmFacade","type":"address"},{"indexed":true,"internalType":"address","name":"newIporAlgorithmFacade","type":"address"}],"name":"IporAlgorithmFacadeChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"newAsset","type":"address"},{"indexed":false,"internalType":"uint256","name":"updateTimestamp","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"exponentialMovingAverage","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"exponentialWeightedMovingVariance","type":"uint256"}],"name":"IporIndexAddAsset","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"newUpdater","type":"address"}],"name":"IporIndexAddUpdater","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"asset","type":"address"}],"name":"IporIndexRemoveAsset","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"updater","type":"address"}],"name":"IporIndexRemoveUpdater","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"asset","type":"address"},{"indexed":false,"internalType":"uint256","name":"indexValue","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"quasiIbtPrice","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"exponentialMovingAverage","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"exponentialWeightedMovingVariance","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"updateTimestamp","type":"uint256"}],"name":"IporIndexUpdate","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","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"},{"inputs":[{"internalType":"address","name":"asset","type":"address"},{"internalType":"uint256","name":"updateTimestamp","type":"uint256"},{"internalType":"uint256","name":"exponentialMovingAverage","type":"uint256"},{"internalType":"uint256","name":"exponentialWeightedMovingVariance","type":"uint256"}],"name":"addAsset","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"updater","type":"address"}],"name":"addUpdater","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"asset","type":"address"},{"internalType":"uint256","name":"calculateTimestamp","type":"uint256"}],"name":"calculateAccruedIbtPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"confirmTransferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"calculateTimestamp","type":"uint256"},{"internalType":"address","name":"asset","type":"address"}],"name":"getAccruedIndex","outputs":[{"components":[{"internalType":"uint256","name":"indexValue","type":"uint256"},{"internalType":"uint256","name":"ibtPrice","type":"uint256"},{"internalType":"uint256","name":"exponentialMovingAverage","type":"uint256"},{"internalType":"uint256","name":"exponentialWeightedMovingVariance","type":"uint256"}],"internalType":"struct IporTypes.AccruedIpor","name":"accruedIpor","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"asset","type":"address"}],"name":"getIndex","outputs":[{"internalType":"uint256","name":"indexValue","type":"uint256"},{"internalType":"uint256","name":"ibtPrice","type":"uint256"},{"internalType":"uint256","name":"exponentialMovingAverage","type":"uint256"},{"internalType":"uint256","name":"exponentialWeightedMovingVariance","type":"uint256"},{"internalType":"uint256","name":"lastUpdateTimestamp","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getIporAlgorithmFacade","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getVersion","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address[]","name":"assets","type":"address[]"},{"internalType":"uint32[]","name":"updateTimestamps","type":"uint32[]"},{"internalType":"uint64[]","name":"exponentialMovingAverages","type":"uint64[]"},{"internalType":"uint64[]","name":"exponentialWeightedMovingVariances","type":"uint64[]"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"asset","type":"address"}],"name":"isAssetSupported","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"updater","type":"address"}],"name":"isUpdater","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"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":[],"name":"proxiableUUID","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"asset","type":"address"}],"name":"removeAsset","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"updater","type":"address"}],"name":"removeUpdater","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newIporAlgorithmFacade","type":"address"}],"name":"setIporAlgorithmFacade","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"appointedOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"asset","type":"address"},{"internalType":"uint256","name":"indexValue","type":"uint256"}],"name":"updateIndex","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"asset","type":"address"}],"name":"updateIndex","outputs":[{"components":[{"internalType":"uint256","name":"indexValue","type":"uint256"},{"internalType":"uint256","name":"ibtPrice","type":"uint256"},{"internalType":"uint256","name":"exponentialMovingAverage","type":"uint256"},{"internalType":"uint256","name":"exponentialWeightedMovingVariance","type":"uint256"}],"internalType":"struct IporTypes.AccruedIpor","name":"accruedIpor","type":"tuple"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"assets","type":"address[]"},{"internalType":"uint256[]","name":"indexValues","type":"uint256[]"}],"name":"updateIndexes","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newImplementation","type":"address"}],"name":"upgradeTo","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"}]Contract Creation Code
60a0604052306080523480156200001557600080fd5b506200002062000026565b620000e8565b600054610100900460ff1615620000935760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60005460ff9081161015620000e6576000805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b60805161310162000120600039600081816105d30152818161065d015281816108df015281816109640152610a4e01526131016000f3fe6080604052600436106101a15760003560e01c806360946b42116100e15780638da5cb5b1161008a578063d78a30b111610064578063d78a30b1146104d1578063da3ae05b146104f1578063f2fde38b14610511578063f8d1cacd1461053157600080fd5b80638da5cb5b14610456578063b31610db14610474578063cc29516a146104bc57600080fd5b80638456cb59116100bb5780638456cb59146103ef5780638853442e146104045780638a5cec731461042457600080fd5b806360946b421461039a578063715018a6146103ba57806375a1608d146103cf57600080fd5b8063464b41581161014e5780634fdfb086116101285780634fdfb086146102e457806352d1902d1461031a5780635491ab6f1461032f5780635c975abb1461038257600080fd5b8063464b4158146102605780634a5e42b1146102b15780634f1ef286146102d157600080fd5b80633659cfe61161017f5780633659cfe61461020b5780633f4ba83a1461022b57806343d24a5e1461024057600080fd5b806304b07a5e146101a65780630d8e6e2c146101c85780630e5c7129146101eb575b600080fd5b3480156101b257600080fd5b506101c66101c1366004612a4f565b610551565b005b3480156101d457600080fd5b5060035b6040519081526020015b60405180910390f35b3480156101f757600080fd5b506101d8610206366004612a6a565b6105b4565b34801561021757600080fd5b506101c6610226366004612a4f565b6105c9565b34801561023757600080fd5b506101c6610749565b34801561024c57600080fd5b506101c661025b366004612a4f565b61075b565b34801561026c57600080fd5b506102a161027b366004612a4f565b6001600160a01b0316600090815260fd60205260409020546001600160801b0316151590565b60405190151581526020016101e2565b3480156102bd57600080fd5b506101c66102cc366004612a4f565b6107b8565b6101c66102df366004612adb565b6108d5565b3480156102f057600080fd5b506101d86102ff366004612a4f565b6001600160a01b0316600090815260fc602052604090205490565b34801561032657600080fd5b506101d8610a41565b34801561033b57600080fd5b5061034f61034a366004612b81565b610b06565b6040516101e291908151815260208083015190820152604080830151908201526060918201519181019190915260800190565b34801561038e57600080fd5b5060335460ff166102a1565b3480156103a657600080fd5b506101c66103b5366004612a6a565b610c46565b3480156103c657600080fd5b506101c6610d4c565b3480156103db57600080fd5b506101c66103ea366004612bad565b610d5e565b3480156103fb57600080fd5b506101c6610fb8565b34801561041057600080fd5b5061034f61041f366004612a4f565b610fc8565b34801561043057600080fd5b5060fe546001600160a01b03165b6040516001600160a01b0390911681526020016101e2565b34801561046257600080fd5b5060c9546001600160a01b031661043e565b34801561048057600080fd5b5061049461048f366004612a4f565b6111ff565b604080519586526020860194909452928401919091526060830152608082015260a0016101e2565b3480156104c857600080fd5b506101c661131f565b3480156104dd57600080fd5b506101c66104ec366004612cee565b611399565b3480156104fd57600080fd5b506101c661050c366004612a4f565b6116e3565b34801561051d57600080fd5b506101c661052c366004612a4f565b611794565b34801561053d57600080fd5b506101c661054c366004612e02565b61182d565b610559611894565b6105616118ee565b6001600160a01b038116600081815260fc602090815260408083209290925590519182527face0c1dfbe0f5fb980b099aa633e6dee1baae9627ac4cedc0d38e7b8eb8592ac91015b60405180910390a150565b60006105c08284611941565b90505b92915050565b6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016300361065b5760405162461bcd60e51b815260206004820152602c60248201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060448201526b19195b1959d85d1958d85b1b60a21b60648201526084015b60405180910390fd5b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166106b67f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b6001600160a01b0316146107215760405162461bcd60e51b815260206004820152602c60248201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060448201526b6163746976652070726f787960a01b6064820152608401610652565b61072a816119d6565b60408051600080825260208201909252610746918391906119de565b50565b610751611894565b610759611b83565b565b610763611894565b61076b6118ee565b6001600160a01b038116600081815260fc60209081526040918290206001905590519182527f50508517ce3dc4098e3968b25c425dccf3d35fe36cfd753815429610c91d7c9e91016105a9565b6107c0611894565b6107c86118ee565b604080518082019091526008815267049504f525f3030360c41b60208201526001600160a01b03821661080e5760405162461bcd60e51b81526004016106529190612ee1565b506001600160a01b038116600090815260fd60209081526040918290205482518084019093526008835267049504f525f3230360c41b918301919091526001600160801b03166108715760405162461bcd60e51b81526004016106529190612ee1565b506001600160a01b038116600081815260fd60209081526040808320928355600190920180546bffffffffffffffffffffffff1916905590519182527f11525b9d4febf0b85675ba77e15f3ca60160ead25d1540127fddaa62c5cd236391016105a9565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001630036109625760405162461bcd60e51b815260206004820152602c60248201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060448201526b19195b1959d85d1958d85b1b60a21b6064820152608401610652565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166109bd7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b6001600160a01b031614610a285760405162461bcd60e51b815260206004820152602c60248201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060448201526b6163746976652070726f787960a01b6064820152608401610652565b610a31826119d6565b610a3d828260016119de565b5050565b6000306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610ae15760405162461bcd60e51b815260206004820152603860248201527f555550535570677261646561626c653a206d757374206e6f742062652063616c60448201527f6c6564207468726f7567682064656c656761746563616c6c00000000000000006064820152608401610652565b507f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc90565b610b316040518060800160405280600081526020016000815260200160008152602001600081525090565b6001600160a01b038216600090815260fd6020908152604091829020825160a08101845281546001600160801b03811680835267ffffffffffffffff600160801b8304811684870152600160c01b909204821683870152600190930154908116606083015263ffffffff600160401b90910416608082015283518085019094526008845267049504f525f3230360c41b92840192909252909190610be85760405162461bcd60e51b81526004016106529190612ee1565b506040518060800160405280826060015167ffffffffffffffff168152602001610c128686611941565b8152602001826020015167ffffffffffffffff168152602001826040015167ffffffffffffffff1681525091505092915050565b33600090815260fc6020908152604091829020548251808401909352600883526724a827a92f99181960c11b91830191909152600114610c995760405162461bcd60e51b81526004016106529190612ee1565b50610ca26118ee565b604080516001808252818301909252600091602080830190803683370190505090508181600081518110610cd857610cd8612f14565b60209081029190910101526040805160018082528183019092526000918160200160208202803683370190505090508381600081518110610d1b57610d1b612f14565b60200260200101906001600160a01b031690816001600160a01b031681525050610d46818342611bd5565b50505050565b610d54611894565b6107596000611ce1565b610d66611894565b610d6e6118ee565b604080518082019091526008815267049504f525f3030360c41b60208201526001600160a01b038516610db45760405162461bcd60e51b81526004016106529190612ee1565b506001600160a01b038416600090815260fd6020908152604091829020548251808401909352600883527f49504f525f323031000000000000000000000000000000000000000000000000918301919091526001600160801b031615610e2d5760405162461bcd60e51b81526004016106529190612ee1565b506040518060a00160405280610e596301e13380670de0b6b3a7640000610e549190612f40565b611d33565b6001600160801b03168152602001610e7084611db6565b67ffffffffffffffff168152602001610e8883611db6565b67ffffffffffffffff16815260006020820152604001610ea785611e36565b63ffffffff9081169091526001600160a01b038616600090815260fd602090815260409182902084518154928601518685015167ffffffffffffffff908116600160c01b026001600160c01b03928216600160801b026001600160c01b03199096166001600160801b03909416939093179490941716178155606085015160019091018054608090960151909416600160401b026bffffffffffffffffffffffff19909516911617929092179055517f847758d44e4f366518ba3e772e41d8485331f94ec09da67bda0d7f38b16db55c90610faa9086908590859088906001600160a01b0394909416845260208401929092526040830152606082015260800190565b60405180910390a150505050565b610fc0611894565b610759611eb2565b610ff36040518060800160405280600081526020016000815260200160008152602001600081525090565b33600090815260fc6020908152604091829020548251808401909352600883526724a827a92f99181960c11b918301919091526001146110465760405162461bcd60e51b81526004016106529190612ee1565b5061104f6118ee565b6001600160a01b038216600090815260fd6020908152604091829020825160a08101845281546001600160801b03811680835267ffffffffffffffff600160801b8304811684870152600160c01b909204821683870152600190930154908116606083015263ffffffff600160401b90910416608082015283518085019094526008845267049504f525f3230360c41b928401929092529091906111065760405162461bcd60e51b81526004016106529190612ee1565b5060fe5460408051808201909152600881527f49504f525f32303400000000000000000000000000000000000000000000000060208201526001600160a01b0390911690816111685760405162461bcd60e51b81526004016106529190612ee1565b5060405163482968c160e01b81526001600160a01b0385811660048301526000919083169063482968c190602401602060405180830381865afa1580156111b3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111d79190612f5f565b90506111e4858242611eef565b50606088015260408701526020860152845250919392505050565b6001600160a01b038116600090815260fd60209081526040808320815160a08101835281546001600160801b03811680835267ffffffffffffffff600160801b8304811684880152600160c01b909204821683860152600190930154908116606083015263ffffffff600160401b90910416608082015282518084019093526008835267049504f525f3230360c41b93830193909352839283928392839291906112bc5760405162461bcd60e51b81526004016106529190612ee1565b50806060015167ffffffffffffffff169550856112ea82600001516001600160801b03166301e1338061221f565b60208301516040840151608090940151929a91995067ffffffffffffffff9081169850909216955063ffffffff169350915050565b60fb5460408051808201909152600881527f49504f525f3030370000000000000000000000000000000000000000000000006020820152906001600160a01b0316331461137f5760405162461bcd60e51b81526004016106529190612ee1565b5060fb80546001600160a01b031916905561075933611ce1565b600054610100900460ff16158080156113b95750600054600160ff909116105b806113d35750303b1580156113d3575060005460ff166001145b6114455760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a65640000000000000000000000000000000000006064820152608401610652565b6000805460ff191660011790558015611468576000805461ff0019166101001790555b611470612241565b6114786122b8565b61148061232c565b845160005b8181146116945760006001600160a01b03168782815181106114a9576114a9612f14565b60200260200101516001600160a01b0316141560405180604001604052806008815260200167049504f525f3030360c41b815250906114fb5760405162461bcd60e51b81526004016106529190612ee1565b506040518060a001604052806115226301e13380670de0b6b3a7640000610e549190612f40565b6001600160801b0316815260200186838151811061154257611542612f14565b602002602001015167ffffffffffffffff16815260200185838151811061156b5761156b612f14565b602002602001015167ffffffffffffffff168152602001600067ffffffffffffffff1681526020018783815181106115a5576115a5612f14565b602002602001015163ffffffff1681525060fd60008984815181106115cc576115cc612f14565b6020908102919091018101516001600160a01b0316825281810192909252604090810160002083518154938501519285015167ffffffffffffffff908116600160c01b026001600160c01b03948216600160801b026001600160c01b03199096166001600160801b0390931692909217949094179290921691909117815560608301516001909101805460809094015163ffffffff16600160401b026bffffffffffffffffffffffff19909416919092161791909117905561168d81612f78565b9050611485565b505080156116dc576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050505050565b6116eb611894565b604080518082019091526008815267049504f525f3030360c41b60208201526001600160a01b0382166117315760405162461bcd60e51b81526004016106529190612ee1565b5060fe80546001600160a01b038381166001600160a01b03198316811790935516908161175b3390565b6001600160a01b03167f1cd14db9bfef5be5d1d465bdb7f3db14cde8bf8f13004b3993616652a42f266c60405160405180910390a45050565b61179c611894565b604080518082019091526008815267049504f525f3030360c41b60208201526001600160a01b0382166117e25760405162461bcd60e51b81526004016106529190612ee1565b5060fb80546001600160a01b0319166001600160a01b0383169081179091556040517f3ec7bb1d452f3c36260fa8ef678a597fd97574d8ec42f6dc98ffce3dbc91228f90600090a250565b33600090815260fc6020908152604091829020548251808401909352600883526724a827a92f99181960c11b918301919091526001146118805760405162461bcd60e51b81526004016106529190612ee1565b506118896118ee565b610a3d828242611bd5565b60c9546001600160a01b031633146107595760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610652565b60335460ff16156107595760405162461bcd60e51b815260206004820152601060248201527f5061757361626c653a20706175736564000000000000000000000000000000006044820152606401610652565b6001600160a01b038116600090815260fd60209081526040808320815160a08101835281546001600160801b038116825267ffffffffffffffff600160801b8204811695830195909552600160c01b900484169281019290925260010154918216606082015263ffffffff600160401b909204821660808201526105c0916119cc9190869061239716565b6301e1338061221f565b610746611894565b7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd91435460ff1615611a1657611a11836123ca565b505050565b826001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015611a70575060408051601f3d908101601f19168201909252611a6d91810190612f5f565b60015b611ae25760405162461bcd60e51b815260206004820152602e60248201527f45524331393637557067726164653a206e657720696d706c656d656e7461746960448201527f6f6e206973206e6f7420555550530000000000000000000000000000000000006064820152608401610652565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc8114611b775760405162461bcd60e51b815260206004820152602960248201527f45524331393637557067726164653a20756e737570706f727465642070726f7860448201527f6961626c655555494400000000000000000000000000000000000000000000006064820152608401610652565b50611a11838383612488565b611b8b6124ad565b6033805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b33600090815260fc6020908152604091829020548251808401909352600883526724a827a92f99181960c11b91830191909152600114611c285760405162461bcd60e51b81526004016106529190612ee1565b5081518351146040518060400160405280600881526020017f49504f525f30303500000000000000000000000000000000000000000000000081525090611c825760405162461bcd60e51b81526004016106529190612ee1565b5060005b83518114610d4657611ccb848281518110611ca357611ca3612f14565b6020026020010151848381518110611cbd57611cbd612f14565b602002602001015184611eef565b505050505080611cda90612f78565b9050611c86565b60c980546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60006001600160801b03821115611db25760405162461bcd60e51b815260206004820152602760248201527f53616665436173743a2076616c756520646f65736e27742066697420696e203160448201527f32382062697473000000000000000000000000000000000000000000000000006064820152608401610652565b5090565b600067ffffffffffffffff821115611db25760405162461bcd60e51b815260206004820152602660248201527f53616665436173743a2076616c756520646f65736e27742066697420696e203660448201527f34206269747300000000000000000000000000000000000000000000000000006064820152608401610652565b600063ffffffff821115611db25760405162461bcd60e51b815260206004820152602660248201527f53616665436173743a2076616c756520646f65736e27742066697420696e203360448201527f32206269747300000000000000000000000000000000000000000000000000006064820152608401610652565b611eba6118ee565b6033805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258611bb83390565b6001600160a01b038316600090815260fd60209081526040808320815160a08101835281546001600160801b03811680835267ffffffffffffffff600160801b8304811684880152600160c01b909204821683860152600190930154908116606083015263ffffffff600160401b90910416608082015282518084019093526008835267049504f525f3230360c41b9383019390935283928392839283929190611fac5760405162461bcd60e51b81526004016106529190612ee1565b5086816080015163ffffffff1611156040518060400160405280600881526020016749504f525f32303360c01b81525090611ffa5760405162461bcd60e51b81526004016106529190612ee1565b50612031816020015167ffffffffffffffff168961202c846080015163ffffffff168b6120279190612f91565b6124ff565b61250a565b9350612065816040015167ffffffffffffffff16858a612060856080015163ffffffff168c6120279190612f91565b612557565b925060006120738289612397565b90506040518060a0016040528061208983611d33565b6001600160801b031681526020016120a087611db6565b67ffffffffffffffff1681526020016120b886611db6565b67ffffffffffffffff1681526020016120d08b611db6565b67ffffffffffffffff1681526020016120e88a611e36565b63ffffffff9081169091526001600160a01b038c16600090815260fd602090815260409182902084518154928601519386015167ffffffffffffffff908116600160c01b026001600160c01b03958216600160801b026001600160c01b03199095166001600160801b03909316929092179390931793909316929092178255606084015160019092018054608090950151909316600160401b026bffffffffffffffffffffffff199094169116179190911790558896506121ad816301e1338061221f565b604080516001600160a01b038d168152602081018c9052908101839052606081018790526080810186905260a081018a90529096508893507f91357060dd7ce921ac472b510c89c6a913d3f5ee44d74d7e3d5bdee132a6e81d9060c00160405180910390a15050939792965093509350565b60008161222d600282612fa4565b6122379085612fc6565b6105c09190612fa4565b600054610100900460ff166122ac5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610652565b6033805460ff19169055565b600054610100900460ff166123235760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610652565b61075933611ce1565b600054610100900460ff166107595760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610652565b60006105c0836060015167ffffffffffffffff1684600001516001600160801b0316856080015163ffffffff16856126d0565b6001600160a01b0381163b6124475760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201527f6f74206120636f6e7472616374000000000000000000000000000000000000006064820152608401610652565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80546001600160a01b0319166001600160a01b0392909216919091179055565b6124918361273d565b60008251118061249e5750805b15611a1157610d46838361277d565b60335460ff166107595760405162461bcd60e51b815260206004820152601460248201527f5061757361626c653a206e6f74207061757365640000000000000000000000006044820152606401610652565b60006105c38261287f565b600061254d61252183670de0b6b3a7640000612f91565b61252b9085612f40565b6125358487612f40565b61253f9190612fc6565b670de0b6b3a764000061221f565b90505b9392505050565b6000670de0b6b3a76400008211156040518060400160405280600881526020017f49504f525f333235000000000000000000000000000000000000000000000000815250906125b95760405162461bcd60e51b81526004016106529190612ee1565b5083831115612650576126496125cf8585612f91565b6125d98686612f91565b6125eb85670de0b6b3a7640000612f91565b6125f59190612f40565b6125ff9190612f40565b6126186ec097ce7bc90715b34b9f100000000088612f40565b6126229190612fc6565b61262c9084612f40565b760a70c3c40a64e6c51999090b65f67d924000000000000061221f565b905061266a565b61266761265d8486612f91565b6125d98587612f91565b90505b60408051808201909152600881527f49504f525f3332340000000000000000000000000000000000000000000000006020820152670de0b6b3a76400008211156126c75760405162461bcd60e51b81526004016106529190612ee1565b50949350505050565b6000828210156040518060400160405280600881526020016749504f525f32303360c01b815250906127155760405162461bcd60e51b81526004016106529190612ee1565b506127208383612f91565b61272a9086612f40565b6127349085612fc6565b95945050505050565b612746816123ca565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60606001600160a01b0383163b6127fc5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f60448201527f6e747261637400000000000000000000000000000000000000000000000000006064820152608401610652565b600080846001600160a01b0316846040516128179190612fd9565b600060405180830381855af49150503d8060008114612852576040519150601f19603f3d011682016040523d82523d6000602084013e612857565b606091505b509150915061273482826040518060600160405280602781526020016130a560279139612912565b60006202bdd28210156128b6576105c36128b1650287f731b67719670de0b6b3a76400006128ac8661294b565b6129ca565b6129e1565b62091b608210156128e0576105c36128b164df3fe1cb371967095460bbec5cd3786128ac8661294b565b62148bd182101561290a576105c36128b1641f0e9891d31967027e1a44a92d27cd6128ac8661294b565b506000919050565b60608315612921575081612550565b8251156129315782518084602001fd5b8160405162461bcd60e51b81526004016106529190612ee1565b60006001600160ff1b03821115611db25760405162461bcd60e51b815260206004820152602860248201527f53616665436173743a2076616c756520646f65736e27742066697420696e206160448201527f6e20696e743235360000000000000000000000000000000000000000000000006064820152608401610652565b6000826129d78386612ff5565b61254d919061307c565b600080821215611db25760405162461bcd60e51b815260206004820181905260248201527f53616665436173743a2076616c7565206d75737420626520706f7369746976656044820152606401610652565b80356001600160a01b0381168114612a4a57600080fd5b919050565b600060208284031215612a6157600080fd5b6105c082612a33565b60008060408385031215612a7d57600080fd5b612a8683612a33565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715612ad357612ad3612a94565b604052919050565b60008060408385031215612aee57600080fd5b612af783612a33565b915060208084013567ffffffffffffffff80821115612b1557600080fd5b818601915086601f830112612b2957600080fd5b813581811115612b3b57612b3b612a94565b612b4d601f8201601f19168501612aaa565b91508082528784828501011115612b6357600080fd5b80848401858401376000848284010152508093505050509250929050565b60008060408385031215612b9457600080fd5b82359150612ba460208401612a33565b90509250929050565b60008060008060808587031215612bc357600080fd5b612bcc85612a33565b966020860135965060408601359560600135945092505050565b600067ffffffffffffffff821115612c0057612c00612a94565b5060051b60200190565b600082601f830112612c1b57600080fd5b81356020612c30612c2b83612be6565b612aaa565b82815260059290921b84018101918181019086841115612c4f57600080fd5b8286015b84811015612c7157612c6481612a33565b8352918301918301612c53565b509695505050505050565b600082601f830112612c8d57600080fd5b81356020612c9d612c2b83612be6565b82815260059290921b84018101918181019086841115612cbc57600080fd5b8286015b84811015612c7157803567ffffffffffffffff81168114612ce15760008081fd5b8352918301918301612cc0565b60008060008060808587031215612d0457600080fd5b843567ffffffffffffffff80821115612d1c57600080fd5b612d2888838901612c0a565b9550602091508187013581811115612d3f57600080fd5b8701601f81018913612d5057600080fd5b8035612d5e612c2b82612be6565b81815260059190911b8201840190848101908b831115612d7d57600080fd5b928501925b82841015612dae57833563ffffffff81168114612d9f5760008081fd5b82529285019290850190612d82565b97505050506040870135915080821115612dc757600080fd5b612dd388838901612c7c565b93506060870135915080821115612de957600080fd5b50612df687828801612c7c565b91505092959194509250565b60008060408385031215612e1557600080fd5b823567ffffffffffffffff80821115612e2d57600080fd5b612e3986838701612c0a565b9350602091508185013581811115612e5057600080fd5b85019050601f81018613612e6357600080fd5b8035612e71612c2b82612be6565b81815260059190911b82018301908381019088831115612e9057600080fd5b928401925b82841015612eae57833582529284019290840190612e95565b80955050505050509250929050565b60005b83811015612ed8578181015183820152602001612ec0565b50506000910152565b6020815260008251806020840152612f00816040850160208701612ebd565b601f01601f19169190910160400192915050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000816000190483118215151615612f5a57612f5a612f2a565b500290565b600060208284031215612f7157600080fd5b5051919050565b600060018201612f8a57612f8a612f2a565b5060010190565b818103818111156105c3576105c3612f2a565b600082612fc157634e487b7160e01b600052601260045260246000fd5b500490565b808201808211156105c3576105c3612f2a565b60008251612feb818460208701612ebd565b9190910192915050565b60006001600160ff1b0360008413600084138583048511828216161561301d5761301d612f2a565b600160ff1b600087128281168783058912161561303c5761303c612f2a565b6000871292508782058712848416161561305857613058612f2a565b8785058712818416161561306e5761306e612f2a565b505050929093029392505050565b808201828112600083128015821682158216171561309c5761309c612f2a565b50509291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a264697066735822122023b8ec58752d7d0da0b44772e5006550a8d85842bb82bc7949a7099db298960864736f6c63430008100033
Deployed Bytecode
0x6080604052600436106101a15760003560e01c806360946b42116100e15780638da5cb5b1161008a578063d78a30b111610064578063d78a30b1146104d1578063da3ae05b146104f1578063f2fde38b14610511578063f8d1cacd1461053157600080fd5b80638da5cb5b14610456578063b31610db14610474578063cc29516a146104bc57600080fd5b80638456cb59116100bb5780638456cb59146103ef5780638853442e146104045780638a5cec731461042457600080fd5b806360946b421461039a578063715018a6146103ba57806375a1608d146103cf57600080fd5b8063464b41581161014e5780634fdfb086116101285780634fdfb086146102e457806352d1902d1461031a5780635491ab6f1461032f5780635c975abb1461038257600080fd5b8063464b4158146102605780634a5e42b1146102b15780634f1ef286146102d157600080fd5b80633659cfe61161017f5780633659cfe61461020b5780633f4ba83a1461022b57806343d24a5e1461024057600080fd5b806304b07a5e146101a65780630d8e6e2c146101c85780630e5c7129146101eb575b600080fd5b3480156101b257600080fd5b506101c66101c1366004612a4f565b610551565b005b3480156101d457600080fd5b5060035b6040519081526020015b60405180910390f35b3480156101f757600080fd5b506101d8610206366004612a6a565b6105b4565b34801561021757600080fd5b506101c6610226366004612a4f565b6105c9565b34801561023757600080fd5b506101c6610749565b34801561024c57600080fd5b506101c661025b366004612a4f565b61075b565b34801561026c57600080fd5b506102a161027b366004612a4f565b6001600160a01b0316600090815260fd60205260409020546001600160801b0316151590565b60405190151581526020016101e2565b3480156102bd57600080fd5b506101c66102cc366004612a4f565b6107b8565b6101c66102df366004612adb565b6108d5565b3480156102f057600080fd5b506101d86102ff366004612a4f565b6001600160a01b0316600090815260fc602052604090205490565b34801561032657600080fd5b506101d8610a41565b34801561033b57600080fd5b5061034f61034a366004612b81565b610b06565b6040516101e291908151815260208083015190820152604080830151908201526060918201519181019190915260800190565b34801561038e57600080fd5b5060335460ff166102a1565b3480156103a657600080fd5b506101c66103b5366004612a6a565b610c46565b3480156103c657600080fd5b506101c6610d4c565b3480156103db57600080fd5b506101c66103ea366004612bad565b610d5e565b3480156103fb57600080fd5b506101c6610fb8565b34801561041057600080fd5b5061034f61041f366004612a4f565b610fc8565b34801561043057600080fd5b5060fe546001600160a01b03165b6040516001600160a01b0390911681526020016101e2565b34801561046257600080fd5b5060c9546001600160a01b031661043e565b34801561048057600080fd5b5061049461048f366004612a4f565b6111ff565b604080519586526020860194909452928401919091526060830152608082015260a0016101e2565b3480156104c857600080fd5b506101c661131f565b3480156104dd57600080fd5b506101c66104ec366004612cee565b611399565b3480156104fd57600080fd5b506101c661050c366004612a4f565b6116e3565b34801561051d57600080fd5b506101c661052c366004612a4f565b611794565b34801561053d57600080fd5b506101c661054c366004612e02565b61182d565b610559611894565b6105616118ee565b6001600160a01b038116600081815260fc602090815260408083209290925590519182527face0c1dfbe0f5fb980b099aa633e6dee1baae9627ac4cedc0d38e7b8eb8592ac91015b60405180910390a150565b60006105c08284611941565b90505b92915050565b6001600160a01b037f0000000000000000000000007ff633bcb94a89f64aa3efd85b5e7857b7b1091c16300361065b5760405162461bcd60e51b815260206004820152602c60248201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060448201526b19195b1959d85d1958d85b1b60a21b60648201526084015b60405180910390fd5b7f0000000000000000000000007ff633bcb94a89f64aa3efd85b5e7857b7b1091c6001600160a01b03166106b67f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b6001600160a01b0316146107215760405162461bcd60e51b815260206004820152602c60248201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060448201526b6163746976652070726f787960a01b6064820152608401610652565b61072a816119d6565b60408051600080825260208201909252610746918391906119de565b50565b610751611894565b610759611b83565b565b610763611894565b61076b6118ee565b6001600160a01b038116600081815260fc60209081526040918290206001905590519182527f50508517ce3dc4098e3968b25c425dccf3d35fe36cfd753815429610c91d7c9e91016105a9565b6107c0611894565b6107c86118ee565b604080518082019091526008815267049504f525f3030360c41b60208201526001600160a01b03821661080e5760405162461bcd60e51b81526004016106529190612ee1565b506001600160a01b038116600090815260fd60209081526040918290205482518084019093526008835267049504f525f3230360c41b918301919091526001600160801b03166108715760405162461bcd60e51b81526004016106529190612ee1565b506001600160a01b038116600081815260fd60209081526040808320928355600190920180546bffffffffffffffffffffffff1916905590519182527f11525b9d4febf0b85675ba77e15f3ca60160ead25d1540127fddaa62c5cd236391016105a9565b6001600160a01b037f0000000000000000000000007ff633bcb94a89f64aa3efd85b5e7857b7b1091c1630036109625760405162461bcd60e51b815260206004820152602c60248201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060448201526b19195b1959d85d1958d85b1b60a21b6064820152608401610652565b7f0000000000000000000000007ff633bcb94a89f64aa3efd85b5e7857b7b1091c6001600160a01b03166109bd7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b6001600160a01b031614610a285760405162461bcd60e51b815260206004820152602c60248201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060448201526b6163746976652070726f787960a01b6064820152608401610652565b610a31826119d6565b610a3d828260016119de565b5050565b6000306001600160a01b037f0000000000000000000000007ff633bcb94a89f64aa3efd85b5e7857b7b1091c1614610ae15760405162461bcd60e51b815260206004820152603860248201527f555550535570677261646561626c653a206d757374206e6f742062652063616c60448201527f6c6564207468726f7567682064656c656761746563616c6c00000000000000006064820152608401610652565b507f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc90565b610b316040518060800160405280600081526020016000815260200160008152602001600081525090565b6001600160a01b038216600090815260fd6020908152604091829020825160a08101845281546001600160801b03811680835267ffffffffffffffff600160801b8304811684870152600160c01b909204821683870152600190930154908116606083015263ffffffff600160401b90910416608082015283518085019094526008845267049504f525f3230360c41b92840192909252909190610be85760405162461bcd60e51b81526004016106529190612ee1565b506040518060800160405280826060015167ffffffffffffffff168152602001610c128686611941565b8152602001826020015167ffffffffffffffff168152602001826040015167ffffffffffffffff1681525091505092915050565b33600090815260fc6020908152604091829020548251808401909352600883526724a827a92f99181960c11b91830191909152600114610c995760405162461bcd60e51b81526004016106529190612ee1565b50610ca26118ee565b604080516001808252818301909252600091602080830190803683370190505090508181600081518110610cd857610cd8612f14565b60209081029190910101526040805160018082528183019092526000918160200160208202803683370190505090508381600081518110610d1b57610d1b612f14565b60200260200101906001600160a01b031690816001600160a01b031681525050610d46818342611bd5565b50505050565b610d54611894565b6107596000611ce1565b610d66611894565b610d6e6118ee565b604080518082019091526008815267049504f525f3030360c41b60208201526001600160a01b038516610db45760405162461bcd60e51b81526004016106529190612ee1565b506001600160a01b038416600090815260fd6020908152604091829020548251808401909352600883527f49504f525f323031000000000000000000000000000000000000000000000000918301919091526001600160801b031615610e2d5760405162461bcd60e51b81526004016106529190612ee1565b506040518060a00160405280610e596301e13380670de0b6b3a7640000610e549190612f40565b611d33565b6001600160801b03168152602001610e7084611db6565b67ffffffffffffffff168152602001610e8883611db6565b67ffffffffffffffff16815260006020820152604001610ea785611e36565b63ffffffff9081169091526001600160a01b038616600090815260fd602090815260409182902084518154928601518685015167ffffffffffffffff908116600160c01b026001600160c01b03928216600160801b026001600160c01b03199096166001600160801b03909416939093179490941716178155606085015160019091018054608090960151909416600160401b026bffffffffffffffffffffffff19909516911617929092179055517f847758d44e4f366518ba3e772e41d8485331f94ec09da67bda0d7f38b16db55c90610faa9086908590859088906001600160a01b0394909416845260208401929092526040830152606082015260800190565b60405180910390a150505050565b610fc0611894565b610759611eb2565b610ff36040518060800160405280600081526020016000815260200160008152602001600081525090565b33600090815260fc6020908152604091829020548251808401909352600883526724a827a92f99181960c11b918301919091526001146110465760405162461bcd60e51b81526004016106529190612ee1565b5061104f6118ee565b6001600160a01b038216600090815260fd6020908152604091829020825160a08101845281546001600160801b03811680835267ffffffffffffffff600160801b8304811684870152600160c01b909204821683870152600190930154908116606083015263ffffffff600160401b90910416608082015283518085019094526008845267049504f525f3230360c41b928401929092529091906111065760405162461bcd60e51b81526004016106529190612ee1565b5060fe5460408051808201909152600881527f49504f525f32303400000000000000000000000000000000000000000000000060208201526001600160a01b0390911690816111685760405162461bcd60e51b81526004016106529190612ee1565b5060405163482968c160e01b81526001600160a01b0385811660048301526000919083169063482968c190602401602060405180830381865afa1580156111b3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111d79190612f5f565b90506111e4858242611eef565b50606088015260408701526020860152845250919392505050565b6001600160a01b038116600090815260fd60209081526040808320815160a08101835281546001600160801b03811680835267ffffffffffffffff600160801b8304811684880152600160c01b909204821683860152600190930154908116606083015263ffffffff600160401b90910416608082015282518084019093526008835267049504f525f3230360c41b93830193909352839283928392839291906112bc5760405162461bcd60e51b81526004016106529190612ee1565b50806060015167ffffffffffffffff169550856112ea82600001516001600160801b03166301e1338061221f565b60208301516040840151608090940151929a91995067ffffffffffffffff9081169850909216955063ffffffff169350915050565b60fb5460408051808201909152600881527f49504f525f3030370000000000000000000000000000000000000000000000006020820152906001600160a01b0316331461137f5760405162461bcd60e51b81526004016106529190612ee1565b5060fb80546001600160a01b031916905561075933611ce1565b600054610100900460ff16158080156113b95750600054600160ff909116105b806113d35750303b1580156113d3575060005460ff166001145b6114455760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a65640000000000000000000000000000000000006064820152608401610652565b6000805460ff191660011790558015611468576000805461ff0019166101001790555b611470612241565b6114786122b8565b61148061232c565b845160005b8181146116945760006001600160a01b03168782815181106114a9576114a9612f14565b60200260200101516001600160a01b0316141560405180604001604052806008815260200167049504f525f3030360c41b815250906114fb5760405162461bcd60e51b81526004016106529190612ee1565b506040518060a001604052806115226301e13380670de0b6b3a7640000610e549190612f40565b6001600160801b0316815260200186838151811061154257611542612f14565b602002602001015167ffffffffffffffff16815260200185838151811061156b5761156b612f14565b602002602001015167ffffffffffffffff168152602001600067ffffffffffffffff1681526020018783815181106115a5576115a5612f14565b602002602001015163ffffffff1681525060fd60008984815181106115cc576115cc612f14565b6020908102919091018101516001600160a01b0316825281810192909252604090810160002083518154938501519285015167ffffffffffffffff908116600160c01b026001600160c01b03948216600160801b026001600160c01b03199096166001600160801b0390931692909217949094179290921691909117815560608301516001909101805460809094015163ffffffff16600160401b026bffffffffffffffffffffffff19909416919092161791909117905561168d81612f78565b9050611485565b505080156116dc576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050505050565b6116eb611894565b604080518082019091526008815267049504f525f3030360c41b60208201526001600160a01b0382166117315760405162461bcd60e51b81526004016106529190612ee1565b5060fe80546001600160a01b038381166001600160a01b03198316811790935516908161175b3390565b6001600160a01b03167f1cd14db9bfef5be5d1d465bdb7f3db14cde8bf8f13004b3993616652a42f266c60405160405180910390a45050565b61179c611894565b604080518082019091526008815267049504f525f3030360c41b60208201526001600160a01b0382166117e25760405162461bcd60e51b81526004016106529190612ee1565b5060fb80546001600160a01b0319166001600160a01b0383169081179091556040517f3ec7bb1d452f3c36260fa8ef678a597fd97574d8ec42f6dc98ffce3dbc91228f90600090a250565b33600090815260fc6020908152604091829020548251808401909352600883526724a827a92f99181960c11b918301919091526001146118805760405162461bcd60e51b81526004016106529190612ee1565b506118896118ee565b610a3d828242611bd5565b60c9546001600160a01b031633146107595760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610652565b60335460ff16156107595760405162461bcd60e51b815260206004820152601060248201527f5061757361626c653a20706175736564000000000000000000000000000000006044820152606401610652565b6001600160a01b038116600090815260fd60209081526040808320815160a08101835281546001600160801b038116825267ffffffffffffffff600160801b8204811695830195909552600160c01b900484169281019290925260010154918216606082015263ffffffff600160401b909204821660808201526105c0916119cc9190869061239716565b6301e1338061221f565b610746611894565b7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd91435460ff1615611a1657611a11836123ca565b505050565b826001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015611a70575060408051601f3d908101601f19168201909252611a6d91810190612f5f565b60015b611ae25760405162461bcd60e51b815260206004820152602e60248201527f45524331393637557067726164653a206e657720696d706c656d656e7461746960448201527f6f6e206973206e6f7420555550530000000000000000000000000000000000006064820152608401610652565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc8114611b775760405162461bcd60e51b815260206004820152602960248201527f45524331393637557067726164653a20756e737570706f727465642070726f7860448201527f6961626c655555494400000000000000000000000000000000000000000000006064820152608401610652565b50611a11838383612488565b611b8b6124ad565b6033805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b33600090815260fc6020908152604091829020548251808401909352600883526724a827a92f99181960c11b91830191909152600114611c285760405162461bcd60e51b81526004016106529190612ee1565b5081518351146040518060400160405280600881526020017f49504f525f30303500000000000000000000000000000000000000000000000081525090611c825760405162461bcd60e51b81526004016106529190612ee1565b5060005b83518114610d4657611ccb848281518110611ca357611ca3612f14565b6020026020010151848381518110611cbd57611cbd612f14565b602002602001015184611eef565b505050505080611cda90612f78565b9050611c86565b60c980546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60006001600160801b03821115611db25760405162461bcd60e51b815260206004820152602760248201527f53616665436173743a2076616c756520646f65736e27742066697420696e203160448201527f32382062697473000000000000000000000000000000000000000000000000006064820152608401610652565b5090565b600067ffffffffffffffff821115611db25760405162461bcd60e51b815260206004820152602660248201527f53616665436173743a2076616c756520646f65736e27742066697420696e203660448201527f34206269747300000000000000000000000000000000000000000000000000006064820152608401610652565b600063ffffffff821115611db25760405162461bcd60e51b815260206004820152602660248201527f53616665436173743a2076616c756520646f65736e27742066697420696e203360448201527f32206269747300000000000000000000000000000000000000000000000000006064820152608401610652565b611eba6118ee565b6033805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258611bb83390565b6001600160a01b038316600090815260fd60209081526040808320815160a08101835281546001600160801b03811680835267ffffffffffffffff600160801b8304811684880152600160c01b909204821683860152600190930154908116606083015263ffffffff600160401b90910416608082015282518084019093526008835267049504f525f3230360c41b9383019390935283928392839283929190611fac5760405162461bcd60e51b81526004016106529190612ee1565b5086816080015163ffffffff1611156040518060400160405280600881526020016749504f525f32303360c01b81525090611ffa5760405162461bcd60e51b81526004016106529190612ee1565b50612031816020015167ffffffffffffffff168961202c846080015163ffffffff168b6120279190612f91565b6124ff565b61250a565b9350612065816040015167ffffffffffffffff16858a612060856080015163ffffffff168c6120279190612f91565b612557565b925060006120738289612397565b90506040518060a0016040528061208983611d33565b6001600160801b031681526020016120a087611db6565b67ffffffffffffffff1681526020016120b886611db6565b67ffffffffffffffff1681526020016120d08b611db6565b67ffffffffffffffff1681526020016120e88a611e36565b63ffffffff9081169091526001600160a01b038c16600090815260fd602090815260409182902084518154928601519386015167ffffffffffffffff908116600160c01b026001600160c01b03958216600160801b026001600160c01b03199095166001600160801b03909316929092179390931793909316929092178255606084015160019092018054608090950151909316600160401b026bffffffffffffffffffffffff199094169116179190911790558896506121ad816301e1338061221f565b604080516001600160a01b038d168152602081018c9052908101839052606081018790526080810186905260a081018a90529096508893507f91357060dd7ce921ac472b510c89c6a913d3f5ee44d74d7e3d5bdee132a6e81d9060c00160405180910390a15050939792965093509350565b60008161222d600282612fa4565b6122379085612fc6565b6105c09190612fa4565b600054610100900460ff166122ac5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610652565b6033805460ff19169055565b600054610100900460ff166123235760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610652565b61075933611ce1565b600054610100900460ff166107595760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608401610652565b60006105c0836060015167ffffffffffffffff1684600001516001600160801b0316856080015163ffffffff16856126d0565b6001600160a01b0381163b6124475760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201527f6f74206120636f6e7472616374000000000000000000000000000000000000006064820152608401610652565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80546001600160a01b0319166001600160a01b0392909216919091179055565b6124918361273d565b60008251118061249e5750805b15611a1157610d46838361277d565b60335460ff166107595760405162461bcd60e51b815260206004820152601460248201527f5061757361626c653a206e6f74207061757365640000000000000000000000006044820152606401610652565b60006105c38261287f565b600061254d61252183670de0b6b3a7640000612f91565b61252b9085612f40565b6125358487612f40565b61253f9190612fc6565b670de0b6b3a764000061221f565b90505b9392505050565b6000670de0b6b3a76400008211156040518060400160405280600881526020017f49504f525f333235000000000000000000000000000000000000000000000000815250906125b95760405162461bcd60e51b81526004016106529190612ee1565b5083831115612650576126496125cf8585612f91565b6125d98686612f91565b6125eb85670de0b6b3a7640000612f91565b6125f59190612f40565b6125ff9190612f40565b6126186ec097ce7bc90715b34b9f100000000088612f40565b6126229190612fc6565b61262c9084612f40565b760a70c3c40a64e6c51999090b65f67d924000000000000061221f565b905061266a565b61266761265d8486612f91565b6125d98587612f91565b90505b60408051808201909152600881527f49504f525f3332340000000000000000000000000000000000000000000000006020820152670de0b6b3a76400008211156126c75760405162461bcd60e51b81526004016106529190612ee1565b50949350505050565b6000828210156040518060400160405280600881526020016749504f525f32303360c01b815250906127155760405162461bcd60e51b81526004016106529190612ee1565b506127208383612f91565b61272a9086612f40565b6127349085612fc6565b95945050505050565b612746816123ca565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60606001600160a01b0383163b6127fc5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f60448201527f6e747261637400000000000000000000000000000000000000000000000000006064820152608401610652565b600080846001600160a01b0316846040516128179190612fd9565b600060405180830381855af49150503d8060008114612852576040519150601f19603f3d011682016040523d82523d6000602084013e612857565b606091505b509150915061273482826040518060600160405280602781526020016130a560279139612912565b60006202bdd28210156128b6576105c36128b1650287f731b67719670de0b6b3a76400006128ac8661294b565b6129ca565b6129e1565b62091b608210156128e0576105c36128b164df3fe1cb371967095460bbec5cd3786128ac8661294b565b62148bd182101561290a576105c36128b1641f0e9891d31967027e1a44a92d27cd6128ac8661294b565b506000919050565b60608315612921575081612550565b8251156129315782518084602001fd5b8160405162461bcd60e51b81526004016106529190612ee1565b60006001600160ff1b03821115611db25760405162461bcd60e51b815260206004820152602860248201527f53616665436173743a2076616c756520646f65736e27742066697420696e206160448201527f6e20696e743235360000000000000000000000000000000000000000000000006064820152608401610652565b6000826129d78386612ff5565b61254d919061307c565b600080821215611db25760405162461bcd60e51b815260206004820181905260248201527f53616665436173743a2076616c7565206d75737420626520706f7369746976656044820152606401610652565b80356001600160a01b0381168114612a4a57600080fd5b919050565b600060208284031215612a6157600080fd5b6105c082612a33565b60008060408385031215612a7d57600080fd5b612a8683612a33565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715612ad357612ad3612a94565b604052919050565b60008060408385031215612aee57600080fd5b612af783612a33565b915060208084013567ffffffffffffffff80821115612b1557600080fd5b818601915086601f830112612b2957600080fd5b813581811115612b3b57612b3b612a94565b612b4d601f8201601f19168501612aaa565b91508082528784828501011115612b6357600080fd5b80848401858401376000848284010152508093505050509250929050565b60008060408385031215612b9457600080fd5b82359150612ba460208401612a33565b90509250929050565b60008060008060808587031215612bc357600080fd5b612bcc85612a33565b966020860135965060408601359560600135945092505050565b600067ffffffffffffffff821115612c0057612c00612a94565b5060051b60200190565b600082601f830112612c1b57600080fd5b81356020612c30612c2b83612be6565b612aaa565b82815260059290921b84018101918181019086841115612c4f57600080fd5b8286015b84811015612c7157612c6481612a33565b8352918301918301612c53565b509695505050505050565b600082601f830112612c8d57600080fd5b81356020612c9d612c2b83612be6565b82815260059290921b84018101918181019086841115612cbc57600080fd5b8286015b84811015612c7157803567ffffffffffffffff81168114612ce15760008081fd5b8352918301918301612cc0565b60008060008060808587031215612d0457600080fd5b843567ffffffffffffffff80821115612d1c57600080fd5b612d2888838901612c0a565b9550602091508187013581811115612d3f57600080fd5b8701601f81018913612d5057600080fd5b8035612d5e612c2b82612be6565b81815260059190911b8201840190848101908b831115612d7d57600080fd5b928501925b82841015612dae57833563ffffffff81168114612d9f5760008081fd5b82529285019290850190612d82565b97505050506040870135915080821115612dc757600080fd5b612dd388838901612c7c565b93506060870135915080821115612de957600080fd5b50612df687828801612c7c565b91505092959194509250565b60008060408385031215612e1557600080fd5b823567ffffffffffffffff80821115612e2d57600080fd5b612e3986838701612c0a565b9350602091508185013581811115612e5057600080fd5b85019050601f81018613612e6357600080fd5b8035612e71612c2b82612be6565b81815260059190911b82018301908381019088831115612e9057600080fd5b928401925b82841015612eae57833582529284019290840190612e95565b80955050505050509250929050565b60005b83811015612ed8578181015183820152602001612ec0565b50506000910152565b6020815260008251806020840152612f00816040850160208701612ebd565b601f01601f19169190910160400192915050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000816000190483118215151615612f5a57612f5a612f2a565b500290565b600060208284031215612f7157600080fd5b5051919050565b600060018201612f8a57612f8a612f2a565b5060010190565b818103818111156105c3576105c3612f2a565b600082612fc157634e487b7160e01b600052601260045260246000fd5b500490565b808201808211156105c3576105c3612f2a565b60008251612feb818460208701612ebd565b9190910192915050565b60006001600160ff1b0360008413600084138583048511828216161561301d5761301d612f2a565b600160ff1b600087128281168783058912161561303c5761303c612f2a565b6000871292508782058712848416161561305857613058612f2a565b8785058712818416161561306e5761306e612f2a565b505050929093029392505050565b808201828112600083128015821682158216171561309c5761309c612f2a565b50509291505056fe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a264697066735822122023b8ec58752d7d0da0b44772e5006550a8d85842bb82bc7949a7099db298960864736f6c63430008100033
Deployed Bytecode Sourcemap
108654:10594:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;114227:170;;;;;;;;;;-1:-1:-1;114227:170:0;;;;;:::i;:::-;;:::i;:::-;;110151:98;;;;;;;;;;-1:-1:-1;110240:1:0;110151:98;;;552:25:1;;;540:2;525:18;110151:98:0;;;;;;;;112317:237;;;;;;;;;;-1:-1:-1;112317:237:0;;;;;:::i;:::-;;:::i;106994:200::-;;;;;;;;;;-1:-1:-1;106994:200:0;;;;;:::i;:::-;;:::i;115997:76::-;;;;;;;;;;;;;:::i;114055:164::-;;;;;;;;;;-1:-1:-1;114055:164:0;;;;;:::i;:::-;;:::i;115771:138::-;;;;;;;;;;-1:-1:-1;115771:138:0;;;;;:::i;:::-;-1:-1:-1;;;;;115868:15:0;115844:4;115868:15;;;:8;:15;;;;;:29;-1:-1:-1;;;;;115868:29:0;:33;;;115771:138;;;;1012:14:1;;1005:22;987:41;;975:2;960:18;115771:138:0;847:187:1;115445:318:0;;;;;;;;;;-1:-1:-1;115445:318:0;;;;;:::i;:::-;;:::i;107453:225::-;;;;;;:::i;:::-;;:::i;114405:121::-;;;;;;;;;;-1:-1:-1;114405:121:0;;;;;:::i;:::-;-1:-1:-1;;;;;114500:18:0;114473:7;114500:18;;;:9;:18;;;;;;;114405:121;106672:133;;;;;;;;;;;;;:::i;111123:602::-;;;;;;;;;;-1:-1:-1;111123:602:0;;;;;:::i;:::-;;:::i;:::-;;;;;;2955:13:1;;2937:32;;3025:4;3013:17;;;3007:24;2985:20;;;2978:54;3088:4;3076:17;;;3070:24;3048:20;;;3041:54;3151:4;3139:17;;;3133:24;3111:20;;;3104:54;;;;2924:3;2909:19;;2734:430;94532:86:0;;;;;;;;;;-1:-1:-1;94603:7:0;;;;94532:86;;112562:379;;;;;;;;;;-1:-1:-1;112562:379:0;;;;;:::i;:::-;;:::i;90682:103::-;;;;;;;;;;;;;:::i;114534:903::-;;;;;;;;;;-1:-1:-1;114534:903:0;;;;;:::i;:::-;;:::i;115917:72::-;;;;;;;;;;;;;:::i;112949:856::-;;;;;;;;;;-1:-1:-1;112949:856:0;;;;;:::i;:::-;;:::i;111733:121::-;;;;;;;;;;-1:-1:-1;111826:20:0;;-1:-1:-1;;;;;111826:20:0;111733:121;;;-1:-1:-1;;;;;3729:55:1;;;3711:74;;3699:2;3684:18;111733:121:0;3565:226:1;90034:87:0;;;;;;;;;;-1:-1:-1;90107:6:0;;-1:-1:-1;;;;;90107:6:0;90034:87;;110257:858;;;;;;;;;;-1:-1:-1;110257:858:0;;;;;:::i;:::-;;:::i;:::-;;;;4055:25:1;;;4111:2;4096:18;;4089:34;;;;4139:18;;;4132:34;;;;4197:2;4182:18;;4175:34;4240:3;4225:19;;4218:35;4042:3;4027:19;110257:858:0;3796:463:1;92334:152:0;;;;;;;;;;;;;:::i;109298:845::-;;;;;;;;;;-1:-1:-1;109298:845:0;;;;;:::i;:::-;;:::i;111862:447::-;;;;;;;;;;-1:-1:-1;111862:447:0;;;;;:::i;:::-;;:::i;92064:262::-;;;;;;;;;;-1:-1:-1;92064:262:0;;;;;:::i;:::-;;:::i;113813:234::-;;;;;;;;;;-1:-1:-1;113813:234:0;;;;;:::i;:::-;;:::i;114227:170::-;89920:13;:11;:13::i;:::-;94137:19:::1;:17;:19::i;:::-;-1:-1:-1::0;;;;;114320:18:0;::::2;114341:1;114320:18:::0;;;:9:::2;:18;::::0;;;;;;;:22;;;;114358:31;;3711:74:1;;;114358:31:0::2;::::0;3684:18:1;114358:31:0::2;;;;;;;;114227:170:::0;:::o;112317:237::-;112462:7;112494:52;112520:18;112540:5;112494:25;:52::i;:::-;112487:59;;112317:237;;;;;:::o;106994:200::-;-1:-1:-1;;;;;105544:6:0;105527:23;105535:4;105527:23;105519:80;;;;-1:-1:-1;;;105519:80:0;;9085:2:1;105519:80:0;;;9067:21:1;9124:2;9104:18;;;9097:30;9163:34;9143:18;;;9136:62;-1:-1:-1;;;9214:18:1;;;9207:42;9266:19;;105519:80:0;;;;;;;;;105642:6;-1:-1:-1;;;;;105618:30:0;:20;96970:66;97331:65;-1:-1:-1;;;;;97331:65:0;;97251:153;105618:20;-1:-1:-1;;;;;105618:30:0;;105610:87;;;;-1:-1:-1;;;105610:87:0;;9498:2:1;105610:87:0;;;9480:21:1;9537:2;9517:18;;;9510:30;9576:34;9556:18;;;9549:62;-1:-1:-1;;;9627:18:1;;;9620:42;9679:19;;105610:87:0;9296:408:1;105610:87:0;107078:36:::1;107096:17;107078;:36::i;:::-;107166:12;::::0;;107176:1:::1;107166:12:::0;;;::::1;::::0;::::1;::::0;;;107125:61:::1;::::0;107147:17;;107166:12;107125:21:::1;:61::i;:::-;106994:200:::0;:::o;115997:76::-;89920:13;:11;:13::i;:::-;116055:10:::1;:8;:10::i;:::-;115997:76::o:0;114055:164::-;89920:13;:11;:13::i;:::-;94137:19:::1;:17;:19::i;:::-;-1:-1:-1::0;;;;;114145:18:0;::::2;;::::0;;;:9:::2;:18;::::0;;;;;;;;114166:1:::2;114145:22:::0;;114183:28;;3711:74:1;;;114183:28:0::2;::::0;3684:18:1;114183:28:0::2;3565:226:1::0;115445:318:0;89920:13;:11;:13::i;:::-;94137:19:::1;:17;:19::i;:::-;115563:24:::2;::::0;;;;::::2;::::0;;;::::2;::::0;;-1:-1:-1;;;115563:24:0::2;::::0;::::2;::::0;-1:-1:-1;;;;;115542:19:0;::::2;115534:54;;;;-1:-1:-1::0;;;115534:54:0::2;;;;;;;;:::i;:::-;-1:-1:-1::0;;;;;;115607:15:0;::::2;115639:1;115607:15:::0;;;:8:::2;:15;::::0;;;;;;;;:29;115642:36;;;;::::2;::::0;;;::::2;::::0;;-1:-1:-1;;;115642:36:0;;::::2;::::0;;;;-1:-1:-1;;;;;115607:29:0::2;115599:80;;;;-1:-1:-1::0;;;115599:80:0::2;;;;;;;;:::i;:::-;-1:-1:-1::0;;;;;;115697:15:0;::::2;;::::0;;;:8:::2;:15;::::0;;;;;;;115690:22;;;;;;::::2;::::0;;-1:-1:-1;;115690:22:0;;;115728:27;;3711:74:1;;;115728:27:0::2;::::0;3684:18:1;115728:27:0::2;3565:226:1::0;107453:225:0;-1:-1:-1;;;;;105544:6:0;105527:23;105535:4;105527:23;105519:80;;;;-1:-1:-1;;;105519:80:0;;9085:2:1;105519:80:0;;;9067:21:1;9124:2;9104:18;;;9097:30;9163:34;9143:18;;;9136:62;-1:-1:-1;;;9214:18:1;;;9207:42;9266:19;;105519:80:0;8883:408:1;105519:80:0;105642:6;-1:-1:-1;;;;;105618:30:0;:20;96970:66;97331:65;-1:-1:-1;;;;;97331:65:0;;97251:153;105618:20;-1:-1:-1;;;;;105618:30:0;;105610:87;;;;-1:-1:-1;;;105610:87:0;;9498:2:1;105610:87:0;;;9480:21:1;9537:2;9517:18;;;9510:30;9576:34;9556:18;;;9549:62;-1:-1:-1;;;9627:18:1;;;9620:42;9679:19;;105610:87:0;9296:408:1;105610:87:0;107571:36:::1;107589:17;107571;:36::i;:::-;107618:52;107640:17;107659:4;107665;107618:21;:52::i;:::-;107453:225:::0;;:::o;106672:133::-;106750:7;105980:4;-1:-1:-1;;;;;105989:6:0;105972:23;;105964:92;;;;-1:-1:-1;;;105964:92:0;;10567:2:1;105964:92:0;;;10549:21:1;10606:2;10586:18;;;10579:30;10645:34;10625:18;;;10618:62;10716:26;10696:18;;;10689:54;10760:19;;105964:92:0;10365:420:1;105964:92:0;-1:-1:-1;96970:66:0::1;106672:133:::0;:::o;111123:602::-;111276:40;-1:-1:-1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;111276:40:0;-1:-1:-1;;;;;111369:15:0;;111334:32;111369:15;;;:8;:15;;;;;;;;;111334:50;;;;;;;;;-1:-1:-1;;;;;111334:50:0;;;;;;-1:-1:-1;;;111334:50:0;;;;;;;;-1:-1:-1;;;111334:50:0;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;111334:50:0;;;;;;;;111427:36;;;;;;;;111334:50;111427:36;;-1:-1:-1;;;111427:36:0;;;;;;;111334:50;;111427:36;111395:69;;;;-1:-1:-1;;;111395:69:0;;;;;;;;:::i;:::-;;111491:226;;;;;;;;111527:4;:15;;;111491:226;;;;;;111557:52;111583:18;111603:5;111557:25;:52::i;:::-;111491:226;;;;111624:4;:29;;;111491:226;;;;;;111668:4;:38;;;111491:226;;;;;111477:240;;111323:402;111123:602;;;;:::o;112562:379::-;88152:10;109087:23;;;;:9;:23;;;;;;;;;;109117:35;;;;;;;;;;;-1:-1:-1;;;109117:35:0;;;;;;;109114:1;109087:28;109079:74;;;;-1:-1:-1;;;109079:74:0;;;;;;;;:::i;:::-;;94137:19:::1;:17;:19::i;:::-;112741:16:::2;::::0;;112755:1:::2;112741:16:::0;;;;;::::2;::::0;;;112714:24:::2;::::0;112741:16:::2;::::0;;::::2;::::0;;::::2;::::0;::::2;;::::0;-1:-1:-1;112741:16:0::2;112714:43;;112781:10;112768:7;112776:1;112768:10;;;;;;;;:::i;:::-;;::::0;;::::2;::::0;;;;;:23;112828:16:::2;::::0;;112842:1:::2;112828:16:::0;;;;;::::2;::::0;;;112802:23:::2;::::0;112828:16:::2;;;;;;;;;;;::::0;-1:-1:-1;112828:16:0::2;112802:42;;112867:5;112855:6;112862:1;112855:9;;;;;;;;:::i;:::-;;;;;;:17;-1:-1:-1::0;;;;;112855:17:0::2;;;-1:-1:-1::0;;;;;112855:17:0::2;;;::::0;::::2;112885:48;112900:6;112908:7;112917:15;112885:14;:48::i;:::-;112703:238;;112562:379:::0;;:::o;90682:103::-;89920:13;:11;:13::i;:::-;90747:30:::1;90774:1;90747:18;:30::i;114534:903::-:0;89920:13;:11;:13::i;:::-;94137:19:::1;:17;:19::i;:::-;114794:24:::2;::::0;;;;::::2;::::0;;;::::2;::::0;;-1:-1:-1;;;114794:24:0::2;::::0;::::2;::::0;-1:-1:-1;;;;;114773:19:0;::::2;114765:54;;;;-1:-1:-1::0;;;114765:54:0::2;;;;;;;;:::i;:::-;-1:-1:-1::0;;;;;;114852:15:0;::::2;;::::0;;;:8:::2;:15;::::0;;;;;;;;:29;114901:54;;;;::::2;::::0;;;::::2;::::0;;::::2;::::0;;::::2;::::0;;;;-1:-1:-1;;;;;114852:29:0::2;:34:::0;114830:136:::2;;;;-1:-1:-1::0;;;114830:136:0::2;;;;;;;;:::i;:::-;;114995:253;;;;;;;;115030:41;8789:8;8567:4;8850:21;;;;:::i;:::-;115030:39;:41::i;:::-;-1:-1:-1::0;;;;;114995:253:0::2;;;;;115086:35;:24;:33;:35::i;:::-;114995:253;;;;;;115136:44;:33;:42;:44::i;:::-;114995:253;;::::0;;115195:1:::2;114995:253;::::0;::::2;::::0;;;115211:26:::2;:15:::0;:24:::2;:26::i;:::-;114995:253;::::0;;::::2;::::0;;;-1:-1:-1;;;;;114977:15:0;::::2;;::::0;;;:8:::2;:15;::::0;;;;;;;;:271;;;;;;::::2;::::0;;;::::2;::::0;::::2;::::0;;::::2;-1:-1:-1::0;;;114977:271:0::2;-1:-1:-1::0;;;;;114977:271:0;;::::2;-1:-1:-1::0;;;114977:271:0::2;-1:-1:-1::0;;;;;;114977:271:0;;;-1:-1:-1;;;;;114977:271:0;;::::2;::::0;;;;;;;::::2;;;::::0;;::::2;::::0;::::2;::::0;;;;::::2;::::0;;::::2;::::0;;::::2;::::0;;;::::2;-1:-1:-1::0;;;114977:271:0::2;-1:-1:-1::0;;114977:271:0;;;;::::2;::::0;;;;::::2;::::0;;115264:165;::::2;::::0;::::2;::::0;114986:5;;115316:24;;115355:33;;115403:15;;-1:-1:-1;;;;;11476:55:1;;;;11458:74;;11563:2;11548:18;;11541:34;;;;11606:2;11591:18;;11584:34;11649:2;11634:18;;11627:34;11445:3;11430:19;;11227:440;115264:165:0::2;;;;;;;;114534:903:::0;;;;:::o;115917:72::-;89920:13;:11;:13::i;:::-;115973:8:::1;:6;:8::i;112949:856::-:0;113083:40;-1:-1:-1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;113083:40:0;88152:10;109087:23;;;;:9;:23;;;;;;;;;;109117:35;;;;;;;;;;;-1:-1:-1;;;109117:35:0;;;;;;;109114:1;109087:28;109079:74;;;;-1:-1:-1;;;109079:74:0;;;;;;;;:::i;:::-;;94137:19:::1;:17;:19::i;:::-;-1:-1:-1::0;;;;;113176:15:0;::::2;113141:32;113176:15:::0;;;:8:::2;:15;::::0;;;;;;;;113141:50;;::::2;::::0;::::2;::::0;;;;-1:-1:-1;;;;;113141:50:0;::::2;::::0;;;::::2;-1:-1:-1::0;;;113141:50:0;::::2;::::0;::::2;::::0;;::::2;::::0;-1:-1:-1;;;113141:50:0;;::::2;::::0;::::2;::::0;;;;;;;::::2;::::0;;;::::2;::::0;;;;::::2;-1:-1:-1::0;;;113141:50:0;;::::2;;::::0;;;;113236:36;;;;::::2;::::0;;;113141:50:::2;113236:36:::0;;-1:-1:-1;;;113236:36:0;;::::2;::::0;;;;113141:50;;113236:36;113204:69:::2;;;;-1:-1:-1::0;;;113204:69:0::2;;;;;;;;:::i;:::-;-1:-1:-1::0;113316:20:0::2;::::0;113392:47:::2;::::0;;;;::::2;::::0;;;::::2;::::0;;::::2;;::::0;::::2;::::0;-1:-1:-1;;;;;113316:20:0;;::::2;::::0;113357:33;113349:91:::2;;;;-1:-1:-1::0;;;113349:91:0::2;;;;;;;;:::i;:::-;-1:-1:-1::0;113477:56:0::2;::::0;-1:-1:-1;;;113477:56:0;;-1:-1:-1;;;;;3729:55:1;;;113477:56:0::2;::::0;::::2;3711:74:1::0;113453:21:0::2;::::0;113477:49;;::::2;::::0;::::2;::::0;3684:18:1;;113477:56:0::2;;;;;;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;113453:80;;113746:51;113759:5;113766:13;113781:15;113746:12;:51::i;:::-;-1:-1:-1::0;113684:45:0::2;::::0;::::2;113546:251:::0;113633:36:::2;::::0;::::2;113546:251:::0;113598:20:::2;::::0;::::2;113546:251:::0;;;-1:-1:-1;113561:11:0;;112949:856;-1:-1:-1;;;112949:856:0:o;110257:858::-;-1:-1:-1;;;;;110629:15:0;;110372:18;110629:15;;;:8;:15;;;;;;;;110594:50;;;;;;;;;-1:-1:-1;;;;;110594:50:0;;;;;;-1:-1:-1;;;110594:50:0;;;;;;;;-1:-1:-1;;;110594:50:0;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;110594:50:0;;;;;;;;110687:36;;;;;;;;110594:50;110687:36;;-1:-1:-1;;;110687:36:0;;;;;;;110372:18;;;;;;;;110594:50;110687:36;110655:69;;;;-1:-1:-1;;;110655:69:0;;;;;;;;:::i;:::-;;110770:4;:15;;;110757:28;;;;;110811:64;110829:4;:18;;;-1:-1:-1;;;;;110811:64:0;8789:8;110811:17;:64::i;:::-;110917:29;;;;110997:38;;;;111072:24;;;;;110735:372;;110800:75;;-1:-1:-1;110890:56:0;;;;;-1:-1:-1;110961:74:0;;;;-1:-1:-1;111050:46:0;;;-1:-1:-1;110257:858:0;-1:-1:-1;;110257:858:0:o;92334:152::-;92543:15;;92576:37;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;92543:15:0;88152:10;92543:31;92535:79;;;;-1:-1:-1;;;92535:79:0;;;;;;;;:::i;:::-;-1:-1:-1;92407:15:0::1;:28:::0;;-1:-1:-1;;;;;;92407:28:0::1;::::0;;92446:32:::1;88152:10:::0;92446:18:::1;:32::i;109298:845::-:0;81288:19;81311:13;;;;;;81310:14;;81358:34;;;;-1:-1:-1;81376:12:0;;81391:1;81376:12;;;;:16;81358:34;81357:108;;;-1:-1:-1;81437:4:0;72050:19;:23;;;81398:66;;-1:-1:-1;81447:12:0;;;;;:17;81398:66;81335:204;;;;-1:-1:-1;;;81335:204:0;;12063:2:1;81335:204:0;;;12045:21:1;12102:2;12082:18;;;12075:30;12141:34;12121:18;;;12114:62;12212:16;12192:18;;;12185:44;12246:19;;81335:204:0;11861:410:1;81335:204:0;81550:12;:16;;-1:-1:-1;;81550:16:0;81565:1;81550:16;;;81577:67;;;;81612:13;:20;;-1:-1:-1;;81612:20:0;;;;;81577:67;109545:27:::1;:25;:27::i;:::-;109583:26;:24;:26::i;:::-;109620:34;:32;:34::i;:::-;109690:13:::0;;109667:20:::1;109716:420;109737:12;109732:1;:17;109716:420;;109800:1;-1:-1:-1::0;;;;;109779:23:0::1;:6;109786:1;109779:9;;;;;;;;:::i;:::-;;;;;;;-1:-1:-1::0;;;;;109779:23:0::1;;;109804:24;;;;;;;;;;;;;-1:-1:-1::0;;;109804:24:0::1;;::::0;109771:58:::1;;;;;-1:-1:-1::0;;;109771:58:0::1;;;;;;;;:::i;:::-;;109868:256;;;;;;;;109907:41;8789:8;8567:4;8850:21;;;;:::i;109907:41::-;-1:-1:-1::0;;;;;109868:256:0::1;;;;;109967:25;109993:1;109967:28;;;;;;;;:::i;:::-;;;;;;;109868:256;;;;;;110014:34;110049:1;110014:37;;;;;;;;:::i;:::-;;;;;;;109868:256;;;;;;110070:1;109868:256;;;;;;110090:16;110107:1;110090:19;;;;;;;;:::i;:::-;;;;;;;109868:256;;;;::::0;109846:8:::1;:19;109855:6;109862:1;109855:9;;;;;;;;:::i;:::-;;::::0;;::::1;::::0;;;;;;;-1:-1:-1;;;;;109846:19:0::1;::::0;;;;::::1;::::0;;;;;;;;-1:-1:-1;109846:19:0;:278;;;;;;::::1;::::0;;;::::1;::::0;::::1;::::0;;::::1;-1:-1:-1::0;;;109846:278:0::1;-1:-1:-1::0;;;;;109846:278:0;;::::1;-1:-1:-1::0;;;109846:278:0::1;-1:-1:-1::0;;;;;;109846:278:0;;;-1:-1:-1;;;;;109846:278:0;;::::1;::::0;;;;;;;::::1;::::0;;;::::1;::::0;;;::::1;::::0;;::::1;::::0;::::1;::::0;;;;::::1;::::0;;::::1;::::0;;::::1;::::0;::::1;;-1:-1:-1::0;;;109846:278:0::1;-1:-1:-1::0;;109846:278:0;;;;;;::::1;::::0;;;;::::1;::::0;;109751:3:::1;::::0;::::1;:::i;:::-;;;109716:420;;;;109534:609;81670:14:::0;81666:102;;;81717:5;81701:21;;-1:-1:-1;;81701:21:0;;;81742:14;;-1:-1:-1;12568:36:1;;81742:14:0;;12556:2:1;12541:18;81742:14:0;;;;;;;81666:102;81277:498;109298:845;;;;:::o;111862:447::-;89920:13;:11;:13::i;:::-;112002:24:::1;::::0;;;;::::1;::::0;;;::::1;::::0;;-1:-1:-1;;;112002:24:0::1;::::0;::::1;::::0;-1:-1:-1;;;;;111964:36:0;::::1;111956:71;;;;-1:-1:-1::0;;;111956:71:0::1;;;;;;;;:::i;:::-;-1:-1:-1::0;112071:20:0::1;::::0;;-1:-1:-1;;;;;112102:45:0;;::::1;-1:-1:-1::0;;;;;;112102:45:0;::::1;::::0;::::1;::::0;;;112071:20:::1;::::0;;112204:12:::1;88152:10:::0;;88072:98;112204:12:::1;-1:-1:-1::0;;;;;112163:138:0::1;;;;;;;;;;;111945:364;111862:447:::0;:::o;92064:262::-;89920:13;:11;:13::i;:::-;92190:24:::1;::::0;;;;::::1;::::0;;;::::1;::::0;;-1:-1:-1;;;92190:24:0::1;::::0;::::1;::::0;-1:-1:-1;;;;;92160:28:0;::::1;92152:63;;;;-1:-1:-1::0;;;92152:63:0::1;;;;;;;;:::i;:::-;-1:-1:-1::0;92226:15:0::1;:32:::0;;-1:-1:-1;;;;;;92226:32:0::1;-1:-1:-1::0;;;;;92226:32:0;::::1;::::0;;::::1;::::0;;;92274:44:::1;::::0;::::1;::::0;-1:-1:-1;;92274:44:0::1;92064:262:::0;:::o;113813:234::-;88152:10;109087:23;;;;:9;:23;;;;;;;;;;109117:35;;;;;;;;;;;-1:-1:-1;;;109117:35:0;;;;;;;109114:1;109087:28;109079:74;;;;-1:-1:-1;;;109079:74:0;;;;;;;;:::i;:::-;;94137:19:::1;:17;:19::i;:::-;113987:52:::2;114002:6;114010:11;114023:15;113987:14;:52::i;90199:132::-:0;90107:6;;-1:-1:-1;;;;;90107:6:0;88152:10;90263:23;90255:68;;;;-1:-1:-1;;;90255:68:0;;12817:2:1;90255:68:0;;;12799:21:1;;;12836:18;;;12829:30;12895:34;12875:18;;;12868:62;12947:18;;90255:68:0;12615:356:1;94691:108:0;94603:7;;;;94761:9;94753:38;;;;-1:-1:-1;;;94753:38:0;;13178:2:1;94753:38:0;;;13160:21:1;13217:2;13197:18;;;13190:30;13256:18;13236;;;13229:46;13292:18;;94753:38:0;12976:340:1;118801:331:0;-1:-1:-1;;;;;119010:15:0;;118929:7;119010:15;;;:8;:15;;;;;;;;:35;;;;;;;;;-1:-1:-1;;;;;119010:35:0;;;;;-1:-1:-1;;;119010:35:0;;;;;;;;;;;-1:-1:-1;;;119010:35:0;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;119010:35:0;;;;;;;;;118974:150;;119010:55;;:35;119046:18;;119010:35;:55;:::i;:::-;8789:8;118974:17;:150::i;119179:66::-;89920:13;:11;:13::i;98669:992::-;96622:66;99123:59;;;99119:535;;;99199:37;99218:17;99199:18;:37::i;:::-;98669:992;;;:::o;99119:535::-;99302:17;-1:-1:-1;;;;;99273:61:0;;:63;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;99273:63:0;;;;;;;;-1:-1:-1;;99273:63:0;;;;;;;;;;;;:::i;:::-;;;99269:306;;99503:56;;-1:-1:-1;;;99503:56:0;;13712:2:1;99503:56:0;;;13694:21:1;13751:2;13731:18;;;13724:30;13790:34;13770:18;;;13763:62;13861:16;13841:18;;;13834:44;13895:19;;99503:56:0;13510:410:1;99269:306:0;96970:66;99387:28;;99379:82;;;;-1:-1:-1;;;99379:82:0;;14127:2:1;99379:82:0;;;14109:21:1;14166:2;14146:18;;;14139:30;14205:34;14185:18;;;14178:62;14276:11;14256:18;;;14249:39;14305:19;;99379:82:0;13925:405:1;99379:82:0;99337:140;99589:53;99607:17;99626:4;99632:9;99589:17;:53::i;95387:120::-;94396:16;:14;:16::i;:::-;95446:7:::1;:15:::0;;-1:-1:-1;;95446:15:0::1;::::0;;95477:22:::1;88152:10:::0;95486:12:::1;95477:22;::::0;-1:-1:-1;;;;;3729:55:1;;;3711:74;;3699:2;3684:18;95477:22:0::1;;;;;;;95387:120::o:0;116081:399::-;88152:10;109087:23;;;;:9;:23;;;;;;;;;;109117:35;;;;;;;;;;;-1:-1:-1;;;109117:35:0;;;;;;;109114:1;109087:28;109079:74;;;;-1:-1:-1;;;109079:74:0;;;;;;;;:::i;:::-;;116276:11:::1;:18;116259:6;:13;:35;116296:39;;;;;;;;;;;;;;;;::::0;116251:85:::1;;;;;-1:-1:-1::0;;;116251:85:0::1;;;;;;;;:::i;:::-;;116354:9;116349:124;116370:6;:13;116365:1;:18;116349:124;;116405:56;116418:6;116425:1;116418:9;;;;;;;;:::i;:::-;;;;;;;116429:11;116441:1;116429:14;;;;;;;;:::i;:::-;;;;;;;116445:15;116405:12;:56::i;:::-;;;;;;116385:3;;;;:::i;:::-;;;116349:124;;91301:191:::0;91394:6;;;-1:-1:-1;;;;;91411:17:0;;;-1:-1:-1;;;;;;91411:17:0;;;;;;;91444:40;;91394:6;;;91411:17;91394:6;;91444:40;;91375:16;;91444:40;91364:128;91301:191;:::o;36948:195::-;37005:7;-1:-1:-1;;;;;37033:26:0;;;37025:78;;;;-1:-1:-1;;;37025:78:0;;14537:2:1;37025:78:0;;;14519:21:1;14576:2;14556:18;;;14549:30;14615:34;14595:18;;;14588:62;14686:9;14666:18;;;14659:37;14713:19;;37025:78:0;14335:403:1;37025:78:0;-1:-1:-1;37129:5:0;36948:195::o;41212:190::-;41268:6;41304:16;41295:25;;;41287:76;;;;-1:-1:-1;;;41287:76:0;;14945:2:1;41287:76:0;;;14927:21:1;14984:2;14964:18;;;14957:30;15023:34;15003:18;;;14996:62;15094:8;15074:18;;;15067:36;15120:19;;41287:76:0;14743:402:1;43328:190:0;43384:6;43420:16;43411:25;;;43403:76;;;;-1:-1:-1;;;43403:76:0;;15352:2:1;43403:76:0;;;15334:21:1;15391:2;15371:18;;;15364:30;15430:34;15410:18;;;15403:62;15501:8;15481:18;;;15474:36;15527:19;;43403:76:0;15150:402:1;95128:118:0;94137:19;:17;:19::i;:::-;95188:7:::1;:14:::0;;-1:-1:-1;;95188:14:0::1;95198:4;95188:14;::::0;;95218:20:::1;95225:12;88152:10:::0;;88072:98;116488:2073;-1:-1:-1;;;;;116923:15:0;;116654:21;116923:15;;;:8;:15;;;;;;;;116888:50;;;;;;;;;-1:-1:-1;;;;;116888:50:0;;;;;;-1:-1:-1;;;116888:50:0;;;;;;;;-1:-1:-1;;;116888:50:0;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;116888:50:0;;;;;;;;116983:36;;;;;;;;116888:50;116983:36;;-1:-1:-1;;;116983:36:0;;;;;;;116654:21;;;;;;;;116888:50;116983:36;116951:69;;;;-1:-1:-1;;;116951:69:0;;;;;;;;:::i;:::-;;117083:15;117055:4;:24;;;:43;;;;117113:61;;;;;;;;;;;;;-1:-1:-1;;;117113:61:0;;;117033:152;;;;;-1:-1:-1;;;117033:152:0;;;;;;;;:::i;:::-;;117228:199;117286:4;:29;;;117228:199;;117330:10;117355:61;117391:4;:24;;;117373:42;;:15;:42;;;;:::i;:::-;117355:17;:61::i;:::-;117228:43;:199::i;:::-;117198:229;;117479:279;117550:4;:38;;;117479:279;;117607:27;117653:10;117682:61;117718:4;:24;;;117700:42;;:15;:42;;;;:::i;117682:61::-;117479:52;:279::i;:::-;117440:318;-1:-1:-1;117771:24:0;117798:41;:4;117823:15;117798:24;:41::i;:::-;117771:68;;117870:266;;;;;;;;117905:28;:16;:26;:28::i;:::-;-1:-1:-1;;;;;117870:266:0;;;;;117948:38;:27;:36;:38::i;:::-;117870:266;;;;;;118001:47;:36;:45;:47::i;:::-;117870:266;;;;;;118063:21;:10;:19;:21::i;:::-;117870:266;;;;;;118099:26;:15;:24;:26::i;:::-;117870:266;;;;;;;-1:-1:-1;;;;;117852:15:0;;;;;;:8;:15;;;;;;;;;:284;;;;;;;;;;;;;;;;-1:-1:-1;;;117852:284:0;-1:-1:-1;;;;;117852:284:0;;;-1:-1:-1;;;117852:284:0;-1:-1:-1;;;;;;117852:284:0;;;-1:-1:-1;;;;;117852:284:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;117852:284:0;-1:-1:-1;;117852:284:0;;;;;;;;;;;;118165:10;;-1:-1:-1;118200:62:0;118218:16;8789:8;118200:17;:62::i;:::-;118328:225;;;-1:-1:-1;;;;;15995:55:1;;15977:74;;16082:2;16067:18;;16060:34;;;16110:18;;;16103:34;;;16168:2;16153:18;;16146:34;;;16211:3;16196:19;;16189:35;;;16255:3;16240:19;;16233:35;;;118186:76:0;;-1:-1:-1;118295:15:0;;-1:-1:-1;118328:225:0;;15964:3:1;15949:19;118328:225:0;;;;;;;116877:1684;;116488:2073;;;;;;;;;:::o;6357:114::-;6420:9;6462:1;6452:5;6456:1;6462;6452:5;:::i;:::-;6447:11;;:1;:11;:::i;:::-;6446:17;;;;:::i;93809:97::-;83129:13;;;;;;;83121:69;;;;-1:-1:-1;;;83121:69:0;;16833:2:1;83121:69:0;;;16815:21:1;16872:2;16852:18;;;16845:30;16911:34;16891:18;;;16884:62;-1:-1:-1;;;16962:18:1;;;16955:41;17013:19;;83121:69:0;16631:407:1;83121:69:0;93883:7:::1;:15:::0;;-1:-1:-1;;93883:15:0::1;::::0;;93809:97::o;89682:113::-;83129:13;;;;;;;83121:69;;;;-1:-1:-1;;;83121:69:0;;16833:2:1;83121:69:0;;;16815:21:1;16872:2;16852:18;;;16845:30;16911:34;16891:18;;;16884:62;-1:-1:-1;;;16962:18:1;;;16955:41;17013:19;;83121:69:0;16631:407:1;83121:69:0;89755:32:::1;88152:10:::0;92446:18:::1;:32::i;104748:78::-:0;83129:13;;;;;;;83121:69;;;;-1:-1:-1;;;83121:69:0;;16833:2:1;83121:69:0;;;16815:21:1;16872:2;16852:18;;;16845:30;16911:34;16891:18;;;16884:62;-1:-1:-1;;;16962:18:1;;;16955:41;17013:19;;83121:69:0;16631:407:1;23433:373:0;23571:7;23616:182;23654:4;:15;;;23616:182;;23688:4;:18;;;-1:-1:-1;;;;;23616:182:0;23725:4;:24;;;23616:182;;23768:15;23616:19;:182::i;97500:284::-;-1:-1:-1;;;;;72050:19:0;;;97574:106;;;;-1:-1:-1;;;97574:106:0;;17245:2:1;97574:106:0;;;17227:21:1;17284:2;17264:18;;;17257:30;17323:34;17303:18;;;17296:62;17394:15;17374:18;;;17367:43;17427:19;;97574:106:0;17043:409:1;97574:106:0;96970:66;97691:85;;-1:-1:-1;;;;;;97691:85:0;-1:-1:-1;;;;;97691:85:0;;;;;;;;;;97500:284::o;98193:297::-;98336:29;98347:17;98336:10;:29::i;:::-;98394:1;98380:4;:11;:15;:28;;;;98399:9;98380:28;98376:107;;;98425:46;98447:17;98466:4;98425:21;:46::i;94876:108::-;94603:7;;;;94935:41;;;;-1:-1:-1;;;94935:41:0;;17659:2:1;94935:41:0;;;17641:21:1;17698:2;17678:18;;;17671:30;17737:22;17717:18;;;17710:50;17777:18;;94935:41:0;17457:344:1;118569:224:0;118696:7;118728:57;118761:23;118728:32;:57::i;24632:379::-;24805:7;24845:158;24934:21;24950:5;8567:4;24934:21;:::i;:::-;24920:36;;:10;:36;:::i;:::-;24881;24912:5;24881:28;:36;:::i;:::-;:75;;;;:::i;:::-;8567:4;24845:17;:158::i;:::-;24825:178;;24632:379;;;;;;:::o;25019:1338::-;25253:14;8567:4;25288:5;:22;;25312:51;;;;;;;;;;;;;;;;;25280:84;;;;;-1:-1:-1;;;25280:84:0;;;;;;;;:::i;:::-;;25394:24;25381:10;:37;25377:875;;;25444:377;25735:37;25748:24;25735:10;:37;:::i;:::-;25668;25681:24;25668:10;:37;:::i;:::-;25617:21;25633:5;8567:4;25617:21;:::i;:::-;25616:90;;;;:::i;:::-;:157;;;;:::i;:::-;25510:78;8693:4;25510:37;:78;:::i;:::-;:263;;;;:::i;:::-;25480:294;;:5;:294;:::i;:::-;8734:4;25444:17;:377::i;:::-;25435:386;;25377:875;;;25863:377;26154:37;26181:10;26154:24;:37;:::i;:::-;26087;26114:10;26087:24;:37;:::i;25863:377::-;25854:386;;25377:875;26297:51;;;;;;;;;;;;;;;;;8567:4;26272:23;;;26264:85;;;;-1:-1:-1;;;26264:85:0;;;;;;;;:::i;:::-;;25019:1338;;;;;;:::o;24076:440::-;24263:7;24324:14;24305:15;:33;;24353:61;;;;;;;;;;;;;-1:-1:-1;;;24353:61:0;;;24283:142;;;;;-1:-1:-1;;;24283:142:0;;;;;;;;:::i;:::-;-1:-1:-1;24474:32:0;24492:14;24474:15;:32;:::i;:::-;24460:47;;:10;:47;:::i;:::-;24443:65;;:13;:65;:::i;:::-;24436:72;24076:440;-1:-1:-1;;;;;24076:440:0:o;97897:155::-;97964:37;97983:17;97964:18;:37::i;:::-;98017:27;;-1:-1:-1;;;;;98017:27:0;;;;;;;;97897:155;:::o;102930:461::-;103013:12;-1:-1:-1;;;;;72050:19:0;;;103038:88;;;;-1:-1:-1;;;103038:88:0;;18008:2:1;103038:88:0;;;17990:21:1;18047:2;18027:18;;;18020:30;18086:34;18066:18;;;18059:62;18157:8;18137:18;;;18130:36;18183:19;;103038:88:0;17806:402:1;103038:88:0;103200:12;103214:23;103241:6;-1:-1:-1;;;;;103241:19:0;103261:4;103241:25;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;103199:67;;;;103284:99;103320:7;103329:10;103284:99;;;;;;;;;;;;;;;;;:35;:99::i;65170:628::-;65234:19;64458:6;65270:12;:31;65266:150;;;65325:79;:67;-1:-1:-1;;64673:19:0;65368:23;:12;:21;:23::i;:::-;65325:14;:67::i;:::-;:77;:79::i;65266:150::-;64503:6;65432:12;:31;65428:150;;;65487:79;:67;-1:-1:-1;;64807:18:0;65530:23;:12;:21;:23::i;65428:150::-;64550:7;65594:12;:33;65590:173;;;65668:83;:71;-1:-1:-1;;64946:18:0;65715:23;:12;:21;:23::i;65590:173::-;-1:-1:-1;65789:1:0;;65170:628;-1:-1:-1;65170:628:0:o;77329:762::-;77479:12;77508:7;77504:580;;;-1:-1:-1;77539:10:0;77532:17;;77504:580;77653:17;;:21;77649:424;;77901:10;77895:17;77962:15;77949:10;77945:2;77941:19;77934:44;77649:424;78044:12;78037:20;;-1:-1:-1;;;78037:20:0;;;;;;;;:::i;64014:301::-;64070:6;-1:-1:-1;;;;;64197:5:0;:34;;64189:87;;;;-1:-1:-1;;;64189:87:0;;18707:2:1;64189:87:0;;;18689:21:1;18746:2;18726:18;;;18719:30;18785:34;18765:18;;;18758:62;18856:10;18836:18;;;18829:38;18884:19;;64189:87:0;18505:404:1;65975:182:0;66100:6;66145:4;66126:16;66134:8;66126:5;:16;:::i;:::-;:23;;;;:::i;45316:171::-;45372:7;45409:1;45400:5;:10;;45392:55;;;;-1:-1:-1;;;45392:55:0;;19942:2:1;45392:55:0;;;19924:21:1;;;19961:18;;;19954:30;20020:34;20000:18;;;19993:62;20072:18;;45392:55:0;19740:356:1;14:196;82:20;;-1:-1:-1;;;;;131:54:1;;121:65;;111:93;;200:1;197;190:12;111:93;14:196;;;:::o;215:186::-;274:6;327:2;315:9;306:7;302:23;298:32;295:52;;;343:1;340;333:12;295:52;366:29;385:9;366:29;:::i;588:254::-;656:6;664;717:2;705:9;696:7;692:23;688:32;685:52;;;733:1;730;723:12;685:52;756:29;775:9;756:29;:::i;:::-;746:39;832:2;817:18;;;;804:32;;-1:-1:-1;;;588:254:1:o;1039:127::-;1100:10;1095:3;1091:20;1088:1;1081:31;1131:4;1128:1;1121:15;1155:4;1152:1;1145:15;1171:275;1242:2;1236:9;1307:2;1288:13;;-1:-1:-1;;1284:27:1;1272:40;;1342:18;1327:34;;1363:22;;;1324:62;1321:88;;;1389:18;;:::i;:::-;1425:2;1418:22;1171:275;;-1:-1:-1;1171:275:1:o;1451:837::-;1528:6;1536;1589:2;1577:9;1568:7;1564:23;1560:32;1557:52;;;1605:1;1602;1595:12;1557:52;1628:29;1647:9;1628:29;:::i;:::-;1618:39;;1676:2;1729;1718:9;1714:18;1701:32;1752:18;1793:2;1785:6;1782:14;1779:34;;;1809:1;1806;1799:12;1779:34;1847:6;1836:9;1832:22;1822:32;;1892:7;1885:4;1881:2;1877:13;1873:27;1863:55;;1914:1;1911;1904:12;1863:55;1950:2;1937:16;1972:2;1968;1965:10;1962:36;;;1978:18;;:::i;:::-;2020:53;2063:2;2044:13;;-1:-1:-1;;2040:27:1;2036:36;;2020:53;:::i;:::-;2007:66;;2096:2;2089:5;2082:17;2136:7;2131:2;2126;2122;2118:11;2114:20;2111:33;2108:53;;;2157:1;2154;2147:12;2108:53;2212:2;2207;2203;2199:11;2194:2;2187:5;2183:14;2170:45;2256:1;2251:2;2246;2239:5;2235:14;2231:23;2224:34;;2277:5;2267:15;;;;;1451:837;;;;;:::o;2475:254::-;2543:6;2551;2604:2;2592:9;2583:7;2579:23;2575:32;2572:52;;;2620:1;2617;2610:12;2572:52;2656:9;2643:23;2633:33;;2685:38;2719:2;2708:9;2704:18;2685:38;:::i;:::-;2675:48;;2475:254;;;;;:::o;3169:391::-;3255:6;3263;3271;3279;3332:3;3320:9;3311:7;3307:23;3303:33;3300:53;;;3349:1;3346;3339:12;3300:53;3372:29;3391:9;3372:29;:::i;:::-;3362:39;3448:2;3433:18;;3420:32;;-1:-1:-1;3499:2:1;3484:18;;3471:32;;3550:2;3535:18;3522:32;;-1:-1:-1;3169:391:1;-1:-1:-1;;;3169:391:1:o;4264:183::-;4324:4;4357:18;4349:6;4346:30;4343:56;;;4379:18;;:::i;:::-;-1:-1:-1;4424:1:1;4420:14;4436:4;4416:25;;4264:183::o;4452:668::-;4506:5;4559:3;4552:4;4544:6;4540:17;4536:27;4526:55;;4577:1;4574;4567:12;4526:55;4613:6;4600:20;4639:4;4663:60;4679:43;4719:2;4679:43;:::i;:::-;4663:60;:::i;:::-;4757:15;;;4843:1;4839:10;;;;4827:23;;4823:32;;;4788:12;;;;4867:15;;;4864:35;;;4895:1;4892;4885:12;4864:35;4931:2;4923:6;4919:15;4943:148;4959:6;4954:3;4951:15;4943:148;;;5025:23;5044:3;5025:23;:::i;:::-;5013:36;;5069:12;;;;4976;;4943:148;;;-1:-1:-1;5109:5:1;4452:668;-1:-1:-1;;;;;;4452:668:1:o;5125:844::-;5178:5;5231:3;5224:4;5216:6;5212:17;5208:27;5198:55;;5249:1;5246;5239:12;5198:55;5285:6;5272:20;5311:4;5335:60;5351:43;5391:2;5351:43;:::i;5335:60::-;5429:15;;;5515:1;5511:10;;;;5499:23;;5495:32;;;5460:12;;;;5539:15;;;5536:35;;;5567:1;5564;5557:12;5536:35;5603:2;5595:6;5591:15;5615:325;5631:6;5626:3;5623:15;5615:325;;;5711:3;5698:17;5759:18;5752:5;5748:30;5741:5;5738:41;5728:139;;5821:1;5850:2;5846;5839:14;5728:139;5880:18;;5918:12;;;;5648;;5615:325;;5974:1761;6157:6;6165;6173;6181;6234:3;6222:9;6213:7;6209:23;6205:33;6202:53;;;6251:1;6248;6241:12;6202:53;6291:9;6278:23;6320:18;6361:2;6353:6;6350:14;6347:34;;;6377:1;6374;6367:12;6347:34;6400:61;6453:7;6444:6;6433:9;6429:22;6400:61;:::i;:::-;6390:71;;6480:2;6470:12;;6535:2;6524:9;6520:18;6507:32;6564:2;6554:8;6551:16;6548:36;;;6580:1;6577;6570:12;6548:36;6603:24;;6658:4;6650:13;;6646:27;-1:-1:-1;6636:55:1;;6687:1;6684;6677:12;6636:55;6723:2;6710:16;6746:60;6762:43;6802:2;6762:43;:::i;6746:60::-;6840:15;;;6922:1;6918:10;;;;6910:19;;6906:28;;;6871:12;;;;6946:19;;;6943:39;;;6978:1;6975;6968:12;6943:39;7002:11;;;;7022:317;7038:6;7033:3;7030:15;7022:317;;;7118:3;7105:17;7166:10;7159:5;7155:22;7148:5;7145:33;7135:131;;7220:1;7249:2;7245;7238:14;7135:131;7279:18;;7055:12;;;;7317;;;;7022:317;;;7358:5;-1:-1:-1;;;;7416:2:1;7401:18;;7388:32;;-1:-1:-1;7432:16:1;;;7429:36;;;7461:1;7458;7451:12;7429:36;7484:62;7538:7;7527:8;7516:9;7512:24;7484:62;:::i;:::-;7474:72;;7599:2;7588:9;7584:18;7571:32;7555:48;;7628:2;7618:8;7615:16;7612:36;;;7644:1;7641;7634:12;7612:36;;7667:62;7721:7;7710:8;7699:9;7695:24;7667:62;:::i;:::-;7657:72;;;5974:1761;;;;;;;:::o;7740:1138::-;7858:6;7866;7919:2;7907:9;7898:7;7894:23;7890:32;7887:52;;;7935:1;7932;7925:12;7887:52;7975:9;7962:23;8004:18;8045:2;8037:6;8034:14;8031:34;;;8061:1;8058;8051:12;8031:34;8084:61;8137:7;8128:6;8117:9;8113:22;8084:61;:::i;:::-;8074:71;;8164:2;8154:12;;8219:2;8208:9;8204:18;8191:32;8248:2;8238:8;8235:16;8232:36;;;8264:1;8261;8254:12;8232:36;8287:24;;;-1:-1:-1;8342:4:1;8334:13;;8330:27;-1:-1:-1;8320:55:1;;8371:1;8368;8361:12;8320:55;8407:2;8394:16;8430:60;8446:43;8486:2;8446:43;:::i;8430:60::-;8524:15;;;8606:1;8602:10;;;;8594:19;;8590:28;;;8555:12;;;;8630:19;;;8627:39;;;8662:1;8659;8652:12;8627:39;8686:11;;;;8706:142;8722:6;8717:3;8714:15;8706:142;;;8788:17;;8776:30;;8739:12;;;;8826;;;;8706:142;;;8867:5;8857:15;;;;;;;7740:1138;;;;;:::o;9709:250::-;9794:1;9804:113;9818:6;9815:1;9812:13;9804:113;;;9894:11;;;9888:18;9875:11;;;9868:39;9840:2;9833:10;9804:113;;;-1:-1:-1;;9951:1:1;9933:16;;9926:27;9709:250::o;9964:396::-;10113:2;10102:9;10095:21;10076:4;10145:6;10139:13;10188:6;10183:2;10172:9;10168:18;10161:34;10204:79;10276:6;10271:2;10260:9;10256:18;10251:2;10243:6;10239:15;10204:79;:::i;:::-;10344:2;10323:15;-1:-1:-1;;10319:29:1;10304:45;;;;10351:2;10300:54;;9964:396;-1:-1:-1;;9964:396:1:o;10790:127::-;10851:10;10846:3;10842:20;10839:1;10832:31;10882:4;10879:1;10872:15;10906:4;10903:1;10896:15;10922:127;10983:10;10978:3;10974:20;10971:1;10964:31;11014:4;11011:1;11004:15;11038:4;11035:1;11028:15;11054:168;11094:7;11160:1;11156;11152:6;11148:14;11145:1;11142:21;11137:1;11130:9;11123:17;11119:45;11116:71;;;11167:18;;:::i;:::-;-1:-1:-1;11207:9:1;;11054:168::o;11672:184::-;11742:6;11795:2;11783:9;11774:7;11770:23;11766:32;11763:52;;;11811:1;11808;11801:12;11763:52;-1:-1:-1;11834:16:1;;11672:184;-1:-1:-1;11672:184:1:o;12276:135::-;12315:3;12336:17;;;12333:43;;12356:18;;:::i;:::-;-1:-1:-1;12403:1:1;12392:13;;12276:135::o;15557:128::-;15624:9;;;15645:11;;;15642:37;;;15659:18;;:::i;16279:217::-;16319:1;16345;16335:132;;16389:10;16384:3;16380:20;16377:1;16370:31;16424:4;16421:1;16414:15;16452:4;16449:1;16442:15;16335:132;-1:-1:-1;16481:9:1;;16279:217::o;16501:125::-;16566:9;;;16587:10;;;16584:36;;;16600:18;;:::i;18213:287::-;18342:3;18380:6;18374:13;18396:66;18455:6;18450:3;18443:4;18435:6;18431:17;18396:66;:::i;:::-;18478:16;;;;;18213:287;-1:-1:-1;;18213:287:1:o;18914:600::-;18953:7;-1:-1:-1;;;;;19077:1:1;19074;19070:9;19105:1;19102;19098:9;19150:1;19146:2;19142:10;19139:1;19136:17;19131:2;19127;19123:11;19119:35;19116:61;;;19157:18;;:::i;:::-;-1:-1:-1;;;19233:1:1;19226:9;;19251:11;;;19271;;;19264:19;;19247:37;19244:63;;;19287:18;;:::i;:::-;19333:1;19330;19326:9;19316:19;;19380:1;19376:2;19371:11;19368:1;19364:19;19359:2;19355;19351:11;19347:37;19344:63;;;19387:18;;:::i;:::-;19452:1;19448:2;19443:11;19440:1;19436:19;19431:2;19427;19423:11;19419:37;19416:63;;;19459:18;;:::i;:::-;-1:-1:-1;;;19499:9:1;;;;;18914:600;-1:-1:-1;;;18914:600:1:o;19519:216::-;19583:9;;;19611:11;;;19558:3;19641:9;;19669:10;;19665:19;;19694:10;;19686:19;;19662:44;19659:70;;;19709:18;;:::i;:::-;19659:70;;19519:216;;;;:::o
Swarm Source
ipfs://23b8ec58752d7d0da0b44772e5006550a8d85842bb82bc7949a7099db2989608
Loading...
Loading
Loading...
Loading
Net Worth in USD
$0.00
Net Worth in ETH
0
Multichain Portfolio | 33 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|
Loading...
Loading
Loading...
Loading
Loading...
Loading
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.