ERC-20
Overview
Max Total Supply
6.417368589874063162 fWETH(ezETH)-1
Holders
15,718
Market
Price
$0.00 @ 0.000000 ETH
Onchain Market Cap
$0.00
Circulating Supply Market Cap
-
Other Info
Token Contract (WITH 18 Decimals)
Balance
0.000499931580769778 fWETH(ezETH)-1Value
$0.00Loading...
Loading
Loading...
Loading
Loading...
Loading
Contract Name:
SturdyPair
Compiler Version
v0.8.21+commit.d9974bed
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: ISC pragma solidity ^0.8.21; // ========================== SturdyPair ============================ import { ERC20 } from "@openzeppelin/contracts/token/ERC20/ERC20.sol"; import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import { IERC20Metadata } from "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol"; import { SafeCast } from "@openzeppelin/contracts/utils/math/SafeCast.sol"; import { SturdyPairCore } from "./SturdyPairCore.sol"; import { SafeERC20 } from "./libraries/SafeERC20.sol"; import { VaultAccount, VaultAccountingLibrary } from "./libraries/VaultAccount.sol"; import { IRateCalculatorV2 } from "./interfaces/IRateCalculatorV2.sol"; /// @title SturdyPair /// @author Drake Evans (Frax Finance) https://github.com/drakeevans /// @notice The SturdyPair is a lending pair that allows users to engage in lending and borrowing activities contract SturdyPair is IERC20Metadata, SturdyPairCore { using VaultAccountingLibrary for VaultAccount; using SafeERC20 for IERC20; using SafeCast for uint256; /// @param _configData abi.encode(address _asset, address _collateral, address _oracle, uint32 _maxOracleDeviation, address _rateContract, uint64 _fullUtilizationRate, uint256 _maxLTV, uint256 _cleanLiquidationFee, uint256 _dirtyLiquidationFee, uint256 _protocolLiquidationFee) /// @param _immutables abi.encode(address _circuitBreakerAddress, address _comptrollerAddress, address _timelockAddress) /// @param _customConfigData abi.encode(string memory _nameOfContract, string memory _symbolOfContract, uint8 _decimalsOfContract) constructor( bytes memory _configData, bytes memory _immutables, bytes memory _customConfigData ) SturdyPairCore(_configData, _immutables, _customConfigData) {} // ============================================================================================ // ERC20 Metadata // ============================================================================================ function name() public view override(ERC20, IERC20Metadata) returns (string memory) { return nameOfContract; } function symbol() public view override(ERC20, IERC20Metadata) returns (string memory) { return symbolOfContract; } function decimals() public view override(ERC20, IERC20Metadata) returns (uint8) { return decimalsOfContract; } // totalSupply for fToken ERC20 compatibility function totalSupply() public view override(ERC20, IERC20) returns (uint256) { return totalAsset.shares; } // ============================================================================================ // Functions: Helpers // ============================================================================================ function asset() external view returns (address) { return address(assetContract); } function getConstants() external pure returns ( uint256 _LTV_PRECISION, uint256 _LIQ_PRECISION, uint256 _UTIL_PREC, uint256 _FEE_PRECISION, uint256 _EXCHANGE_PRECISION, uint256 _DEVIATION_PRECISION, uint256 _RATE_PRECISION, uint256 _MAX_PROTOCOL_FEE ) { _LTV_PRECISION = LTV_PRECISION; _LIQ_PRECISION = LIQ_PRECISION; _UTIL_PREC = UTIL_PREC; _FEE_PRECISION = FEE_PRECISION; _EXCHANGE_PRECISION = EXCHANGE_PRECISION; _DEVIATION_PRECISION = DEVIATION_PRECISION; _RATE_PRECISION = RATE_PRECISION; _MAX_PROTOCOL_FEE = MAX_PROTOCOL_FEE; } /// @notice The ```getUserSnapshot``` function gets user level accounting data /// @param _address The user address /// @return _userAssetShares The user fToken balance /// @return _userBorrowShares The user borrow shares /// @return _userCollateralBalance The user collateral balance function getUserSnapshot( address _address ) external view returns (uint256 _userAssetShares, uint256 _userBorrowShares, uint256 _userCollateralBalance) { _userAssetShares = balanceOf(_address); _userBorrowShares = userBorrowShares[_address]; _userCollateralBalance = userCollateralBalance[_address]; } /// @notice The ```getPairAccounting``` function gets all pair level accounting numbers /// @return _totalAssetAmount Total assets deposited and interest accrued, total claims /// @return _totalAssetShares Total fTokens /// @return _totalBorrowAmount Total borrows /// @return _totalBorrowShares Total borrow shares /// @return _totalCollateral Total collateral function getPairAccounting() external view returns ( uint128 _totalAssetAmount, uint128 _totalAssetShares, uint128 _totalBorrowAmount, uint128 _totalBorrowShares, uint256 _totalCollateral ) { (, , , , VaultAccount memory _totalAsset, VaultAccount memory _totalBorrow) = previewAddInterest(); _totalAssetAmount = _totalAsset.amount; _totalAssetShares = _totalAsset.shares; _totalBorrowAmount = _totalBorrow.amount; _totalBorrowShares = _totalBorrow.shares; _totalCollateral = totalCollateral; } /// @notice The ```toBorrowShares``` function converts a given amount of borrow debt into the number of shares /// @param _amount Amount of borrow /// @param _roundUp Whether to roundup during division /// @param _previewInterest Whether to simulate interest accrual /// @return _shares The number of shares function toBorrowShares( uint256 _amount, bool _roundUp, bool _previewInterest ) external view returns (uint256 _shares) { if (_previewInterest) { (, , , , , VaultAccount memory _totalBorrow) = previewAddInterest(); _shares = _totalBorrow.toShares(_amount, _roundUp); } else { _shares = totalBorrow.toShares(_amount, _roundUp); } } /// @notice The ```toBorrowAmount``` function converts a given amount of borrow debt into the number of shares /// @param _shares Shares of borrow /// @param _roundUp Whether to roundup during division /// @param _previewInterest Whether to simulate interest accrual /// @return _amount The amount of asset function toBorrowAmount( uint256 _shares, bool _roundUp, bool _previewInterest ) external view returns (uint256 _amount) { if (_previewInterest) { (, , , , , VaultAccount memory _totalBorrow) = previewAddInterest(); _amount = _totalBorrow.toAmount(_shares, _roundUp); } else { _amount = totalBorrow.toAmount(_shares, _roundUp); } } /// @notice The ```toAssetAmount``` function converts a given number of shares to an asset amount /// @param _shares Shares of asset (fToken) /// @param _roundUp Whether to round up after division /// @param _previewInterest Whether to preview interest accrual before calculation /// @return _amount The amount of asset function toAssetAmount( uint256 _shares, bool _roundUp, bool _previewInterest ) public view returns (uint256 _amount) { if (_previewInterest) { (, , , , VaultAccount memory _totalAsset, ) = previewAddInterest(); _amount = _totalAsset.toAmount(_shares, _roundUp); } else { _amount = totalAsset.toAmount(_shares, _roundUp); } } /// @notice The ```toAssetShares``` function converts a given asset amount to a number of asset shares (fTokens) /// @param _amount The amount of asset /// @param _roundUp Whether to round up after division /// @param _previewInterest Whether to preview interest accrual before calculation /// @return _shares The number of shares (fTokens) function toAssetShares( uint256 _amount, bool _roundUp, bool _previewInterest ) public view returns (uint256 _shares) { if (_previewInterest) { (, , , , VaultAccount memory _totalAsset, ) = previewAddInterest(); _shares = _totalAsset.toShares(_amount, _roundUp); } else { _shares = totalAsset.toShares(_amount, _roundUp); } } function convertToAssets(uint256 _shares) external view returns (uint256 _assets) { _assets = toAssetAmount(_shares, false, true); } function convertToShares(uint256 _assets) external view returns (uint256 _shares) { _shares = toAssetShares(_assets, false, true); } function pricePerShare() external view returns (uint256 _amount) { _amount = toAssetAmount(1e18, false, true); } function totalAssets() external view returns (uint256) { (, , , , VaultAccount memory _totalAsset, ) = previewAddInterest(); return _totalAsset.amount; } function maxDeposit(address _receiver) public view returns (uint256 _maxAssets) { (, , , , VaultAccount memory _totalAsset, ) = previewAddInterest(); _maxAssets = _totalAsset.amount >= depositLimit ? 0 : depositLimit - _totalAsset.amount; } function maxMint(address _receiver) external view returns (uint256 _maxShares) { (, , , , VaultAccount memory _totalAsset, ) = previewAddInterest(); uint256 _maxDeposit = _totalAsset.amount >= depositLimit ? 0 : depositLimit - _totalAsset.amount; _maxShares = _totalAsset.toShares(_maxDeposit, false); } function maxWithdraw(address _owner) external view returns (uint256 _maxAssets) { if (isWithdrawPaused) return 0; ( , , uint256 _feesShare, , VaultAccount memory _totalAsset, VaultAccount memory _totalBorrow ) = previewAddInterest(); // Get the owner balance and include the fees share if owner is this contract uint256 _ownerBalance = _owner == address(this) ? balanceOf(_owner) + _feesShare : balanceOf(_owner); // Return the lower of total assets in contract or total assets available to _owner uint256 _totalAssetsAvailable = _totalAssetAvailable(_totalAsset, _totalBorrow); uint256 _totalUserWithdraw = _totalAsset.toAmount(_ownerBalance, false); _maxAssets = _totalAssetsAvailable < _totalUserWithdraw ? _totalAssetsAvailable : _totalUserWithdraw; } function maxRedeem(address _owner) external view returns (uint256 _maxShares) { if (isWithdrawPaused) return 0; ( , , uint256 _feesShare, , VaultAccount memory _totalAsset, VaultAccount memory _totalBorrow ) = previewAddInterest(); // Calculate the total shares available uint256 _totalAssetsAvailable = _totalAssetAvailable(_totalAsset, _totalBorrow); uint256 _totalSharesAvailable = _totalAsset.toShares(_totalAssetsAvailable, false); // Get the owner balance and include the fees share if owner is this contract uint256 _ownerBalance = _owner == address(this) ? balanceOf(_owner) + _feesShare : balanceOf(_owner); _maxShares = _totalSharesAvailable < _ownerBalance ? _totalSharesAvailable : _ownerBalance; } // ============================================================================================ // Functions: Configuration // ============================================================================================ /// @notice The ```SetOracleInfo``` event is emitted when the oracle info (address and max deviation) is set /// @param oldOracle The old oracle address /// @param oldMaxOracleDeviation The old max oracle deviation /// @param newOracle The new oracle address /// @param newMaxOracleDeviation The new max oracle deviation event SetOracleInfo( address oldOracle, uint32 oldMaxOracleDeviation, address newOracle, uint32 newMaxOracleDeviation ); /// @notice The ```setOracleInfo``` function sets the oracle data /// @param _newOracle The new oracle address /// @param _newMaxOracleDeviation The new max oracle deviation function setOracle(address _newOracle, uint32 _newMaxOracleDeviation) external { _requireTimelock(); ExchangeRateInfo memory _exchangeRateInfo = exchangeRateInfo; emit SetOracleInfo( _exchangeRateInfo.oracle, _exchangeRateInfo.maxOracleDeviation, _newOracle, _newMaxOracleDeviation ); _exchangeRateInfo.oracle = _newOracle; _exchangeRateInfo.maxOracleDeviation = _newMaxOracleDeviation; exchangeRateInfo = _exchangeRateInfo; } bool public isMaxLTVSetterRevoked; /// @notice The ```RevokeMaxLTVSetter``` event is emitted when the max LTV setter is revoked event RevokeMaxLTVSetter(); /// @notice The ```revokeMaxLTVSetter``` function revokes the max LTV setter function revokeMaxLTVSetter() external { _requireTimelock(); isMaxLTVSetterRevoked = true; emit RevokeMaxLTVSetter(); } /// @notice The ```SetMaxLTV``` event is emitted when the max LTV is set /// @param oldMaxLTV The old max LTV /// @param newMaxLTV The new max LTV event SetMaxLTV(uint256 oldMaxLTV, uint256 newMaxLTV); /// @notice The ```setMaxLTV``` function sets the max LTV /// @param _newMaxLTV The new max LTV function setMaxLTV(uint256 _newMaxLTV) external { _requireTimelock(); if (isMaxLTVSetterRevoked) revert SetterRevoked(); emit SetMaxLTV(maxLTV, _newMaxLTV); maxLTV = _newMaxLTV; } /// @notice The ```SetRateContract``` event is emitted when the rate contract is set /// @param oldRateContract The old rate contract /// @param newRateContract The new rate contract event SetRateContract(address oldRateContract, address newRateContract); /// @notice The ```setRateContract``` function sets the rate contract address /// @param _newRateContract The new rate contract address function setRateContract(address _newRateContract) external { _requireTimelock(); emit SetRateContract(address(rateContract), _newRateContract); rateContract = IRateCalculatorV2(_newRateContract); } /// @notice The ```SetLiquidationFees``` event is emitted when the liquidation fees are set /// @param oldCleanLiquidationFee The old clean liquidation fee /// @param oldDirtyLiquidationFee The old dirty liquidation fee /// @param oldProtocolLiquidationFee The old protocol liquidation fee /// @param newCleanLiquidationFee The new clean liquidation fee /// @param newDirtyLiquidationFee The new dirty liquidation fee /// @param newProtocolLiquidationFee The new protocol liquidation fee event SetLiquidationFees( uint256 oldCleanLiquidationFee, uint256 oldDirtyLiquidationFee, uint256 oldProtocolLiquidationFee, uint256 newCleanLiquidationFee, uint256 newDirtyLiquidationFee, uint256 newProtocolLiquidationFee ); /// @notice The ```setLiquidationFees``` function sets the liquidation fees /// @param _newCleanLiquidationFee The new clean liquidation fee /// @param _newDirtyLiquidationFee The new dirty liquidation fee function setLiquidationFees( uint256 _newCleanLiquidationFee, uint256 _newDirtyLiquidationFee, uint256 _newProtocolLiquidationFee ) external { _requireTimelock(); emit SetLiquidationFees( cleanLiquidationFee, dirtyLiquidationFee, protocolLiquidationFee, _newCleanLiquidationFee, _newDirtyLiquidationFee, _newProtocolLiquidationFee ); cleanLiquidationFee = _newCleanLiquidationFee; dirtyLiquidationFee = _newDirtyLiquidationFee; protocolLiquidationFee = _newProtocolLiquidationFee; } /// @notice The ```ChangeFee``` event first when the fee is changed /// @param newFee The new fee event ChangeFee(uint32 newFee); /// @notice The ```changeFee``` function changes the protocol fee, max 50% /// @param _newFee The new fee function changeFee(uint32 _newFee) external { _requireTimelock(); if (isInterestPaused) revert InterestPaused(); if (_newFee > MAX_PROTOCOL_FEE) { revert BadProtocolFee(); } _addInterest(); currentRateInfo.feeToProtocolRate = _newFee; emit ChangeFee(_newFee); } /// @notice The ```WithdrawFees``` event fires when the fees are withdrawn /// @param shares Number of shares (fTokens) redeemed /// @param recipient To whom the assets were sent /// @param amountToTransfer The amount of fees redeemed event WithdrawFees(uint128 shares, address recipient, uint256 amountToTransfer, uint256 collateralAmount); /// @notice The ```withdrawFees``` function withdraws fees accumulated /// @param _shares Number of fTokens to redeem /// @param _recipient Address to send the assets /// @return _amountToTransfer Amount of assets sent to recipient function withdrawFees(uint128 _shares, address _recipient) external onlyOwner returns (uint256 _amountToTransfer) { if (_recipient == address(0)) revert InvalidReceiver(); // Grab some data from state to save gas VaultAccount memory _totalAsset = totalAsset; // Take all available if 0 value passed if (_shares == 0) _shares = uint128(balanceOf(address(this))); // We must calculate this before we subtract from _totalAsset or invoke _burn _amountToTransfer = _totalAsset.toAmount(_shares, true); _approve(address(this), msg.sender, _shares); _redeem(_totalAsset, _amountToTransfer.toUint128(), _shares, _recipient, address(this)); uint256 _collateralAmount = userCollateralBalance[address(this)]; _removeCollateral(_collateralAmount, _recipient, address(this)); emit WithdrawFees(_shares, _recipient, _amountToTransfer, _collateralAmount); } /// @notice The ```SetSwapper``` event fires whenever a swapper is black or whitelisted /// @param swapper The swapper address /// @param approval The approval event SetSwapper(address swapper, bool approval); /// @notice The ```setSwapper``` function is called to black or whitelist a given swapper address /// @dev /// @param _swapper The swapper address /// @param _approval The approval function setSwapper(address _swapper, bool _approval) external onlyOwner { swappers[_swapper] = _approval; emit SetSwapper(_swapper, _approval); } // ============================================================================================ // Functions: Access Control // ============================================================================================ /// @notice The ```pause``` function is called to pause all contract functionality function pause() external { _requireProtocolOrOwner(); _setBorrowLimit(0); _setDepositLimit(0); if (!isRepayAccessControlRevoked) _pauseRepay(true); if (!isWithdrawAccessControlRevoked) _pauseWithdraw(true); if (!isLiquidateAccessControlRevoked) _pauseLiquidate(true); _addInterest(); _pauseInterest(true); } /// @notice The ```unpause``` function is called to unpause all contract functionality function unpause() external { _requireTimelockOrOwner(); _setBorrowLimit(type(uint256).max); _setDepositLimit(type(uint256).max); if (!isRepayAccessControlRevoked) _pauseRepay(false); if (!isWithdrawAccessControlRevoked) _pauseWithdraw(false); if (!isLiquidateAccessControlRevoked) _pauseLiquidate(false); _addInterest(); _pauseInterest(false); } /// @notice The ```pauseBorrow``` function sets borrow limit to 0 function pauseBorrow() external { _requireProtocolOrOwner(); _setBorrowLimit(0); } /// @notice The ```setBorrowLimit``` function sets the borrow limit /// @param _limit The new borrow limit function setBorrowLimit(uint256 _limit) external { _requireTimelockOrOwner(); _setBorrowLimit(_limit); } /// @notice The ```pauseDeposit``` function pauses deposit functionality function pauseDeposit() external { _requireProtocolOrOwner(); _setDepositLimit(0); } /// @notice The ```setDepositLimit``` function sets the deposit limit /// @param _limit The new deposit limit function setDepositLimit(uint256 _limit) external { _requireTimelockOrOwner(); _setDepositLimit(_limit); } /// @notice The ```pauseRepay``` function pauses repay functionality /// @param _isPaused The new pause state function pauseRepay(bool _isPaused) external { if (_isPaused) { _requireProtocolOrOwner(); } else { _requireTimelockOrOwner(); } if (isRepayAccessControlRevoked) revert AccessControlRevoked(); _pauseRepay(_isPaused); } /// @notice The ```revokeRepayAccessControl``` function revokes repay access control function revokeRepayAccessControl() external { _requireTimelock(); _revokeRepayAccessControl(); } /// @notice The ```pauseWithdraw``` function pauses withdraw functionality /// @param _isPaused The new pause state function pauseWithdraw(bool _isPaused) external { if (_isPaused) { _requireProtocolOrOwner(); } else { _requireTimelockOrOwner(); } if (isWithdrawAccessControlRevoked) revert AccessControlRevoked(); _pauseWithdraw(_isPaused); } /// @notice The ```revokeWithdrawAccessControl``` function revokes withdraw access control function revokeWithdrawAccessControl() external { _requireTimelock(); _revokeWithdrawAccessControl(); } /// @notice The ```pauseLiquidate``` function pauses liquidate functionality /// @param _isPaused The new pause state function pauseLiquidate(bool _isPaused) external { if (_isPaused) { _requireProtocolOrOwner(); } else { _requireTimelockOrOwner(); } if (isLiquidateAccessControlRevoked) revert AccessControlRevoked(); _pauseLiquidate(_isPaused); } /// @notice The ```revokeLiquidateAccessControl``` function revokes liquidate access control function revokeLiquidateAccessControl() external { _requireTimelock(); _revokeLiquidateAccessControl(); } /// @notice The ```pauseInterest``` function pauses interest functionality /// @param _isPaused The new pause state function pauseInterest(bool _isPaused) external { if (_isPaused) { _requireProtocolOrOwner(); } else { _requireTimelockOrOwner(); } // Resets the lastTimestamp which has the effect of no interest accruing over the pause period _addInterest(); _pauseInterest(_isPaused); } }
// SPDX-License-Identifier: ISC pragma solidity ^0.8.21; // ========================= SturdyPairCore ========================= import { ERC20 } from "@openzeppelin/contracts/token/ERC20/ERC20.sol"; import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import { ReentrancyGuard } from "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import { SafeCast } from "@openzeppelin/contracts/utils/math/SafeCast.sol"; import { SturdyPairAccessControl } from "./SturdyPairAccessControl.sol"; import { SturdyPairConstants } from "./SturdyPairConstants.sol"; import { VaultAccount, VaultAccountingLibrary } from "./libraries/VaultAccount.sol"; import { SafeERC20 } from "./libraries/SafeERC20.sol"; import { IDualOracle } from "./interfaces/IDualOracle.sol"; import { IRateCalculatorV2 } from "./interfaces/IRateCalculatorV2.sol"; import { ISwapper } from "./interfaces/ISwapper.sol"; /// @title SturdyPairCore /// @author Drake Evans (Frax Finance) https://github.com/drakeevans /// @notice An abstract contract which contains the core logic and storage for the SturdyPair abstract contract SturdyPairCore is SturdyPairAccessControl, SturdyPairConstants, ERC20, ReentrancyGuard { using VaultAccountingLibrary for VaultAccount; using SafeERC20 for IERC20; using SafeCast for uint256; function version() external pure returns (uint256 _major, uint256 _minor, uint256 _patch) { _major = 3; _minor = 0; _patch = 0; } // ============================================================================================ // Settings set by constructor() // ============================================================================================ // Asset and collateral contracts IERC20 internal immutable assetContract; IERC20 public immutable collateralContract; // LTV Settings /// @notice The maximum LTV allowed for this pair /// @dev 1e5 precision uint256 public maxLTV; // Liquidation Fees /// @notice The liquidation fee, given as a % of repayment amount, when all collateral is consumed in liquidation /// @dev 1e5 precision uint256 public cleanLiquidationFee; /// @notice The liquidation fee, given as % of repayment amount, when some collateral remains for borrower /// @dev 1e5 precision uint256 public dirtyLiquidationFee; /// @notice The portion of the liquidation fee given to protocol /// @dev 1e5 precision uint256 public protocolLiquidationFee; // Interest Rate Calculator Contract IRateCalculatorV2 public rateContract; // For complex rate calculations // Swapper mapping(address => bool) public swappers; // approved swapper addresses // ERC20 Metadata string internal nameOfContract; string internal symbolOfContract; uint8 internal immutable decimalsOfContract; // ============================================================================================ // Storage // ============================================================================================ /// @notice Stores information about the current interest rate /// @dev struct is packed to reduce SLOADs. feeToProtocolRate is 1e5 precision, ratePerSec & fullUtilizationRate is 1e18 precision CurrentRateInfo public currentRateInfo; struct CurrentRateInfo { uint32 lastBlock; uint32 feeToProtocolRate; // Fee amount 1e5 precision uint64 lastTimestamp; uint64 ratePerSec; uint64 fullUtilizationRate; } /// @notice Stores information about the current exchange rate. Collateral:Asset ratio /// @dev Struct packed to save SLOADs. Amount of Collateral Token to buy 1e18 Asset Token ExchangeRateInfo public exchangeRateInfo; struct ExchangeRateInfo { address oracle; uint32 maxOracleDeviation; // % of larger number, 1e5 precision uint184 lastTimestamp; uint256 lowExchangeRate; uint256 highExchangeRate; } // Contract Level Accounting VaultAccount public totalAsset; // amount = total amount of assets, shares = total shares outstanding VaultAccount public totalBorrow; // amount = total borrow amount with interest accrued, shares = total shares outstanding uint256 public totalCollateral; // total amount of collateral in contract // User Level Accounting /// @notice Stores the balance of collateral for each user mapping(address => uint256) public userCollateralBalance; // amount of collateral each user is backed /// @notice Stores the balance of borrow shares for each user mapping(address => uint256) public userBorrowShares; // represents the shares held by individuals /// @notice Stores the borrow allowance of the user mapping(address => mapping(address => uint256)) public userBorrowAllowances; // represent the borrowable amount on behalfof user /// @notice Stores the whitelisted delegators who call the removeCollateralFrom(), ex: Leverage contracts mapping(address => bool) public whitelistedDelegators; // represent the leverage contract who call the removeCollateralFrom() // NOTE: user shares of assets are represented as ERC-20 tokens and accessible via balanceOf() // ============================================================================================ // Constructor // ============================================================================================ /// @notice The ```constructor``` function is called on deployment /// @param _configData abi.encode(address _asset, address _collateral, address _oracle, uint32 _maxOracleDeviation, address _rateContract, uint64 _fullUtilizationRate, uint256 _maxLTV, uint256 _cleanLiquidationFee, uint256 _dirtyLiquidationFee, uint256 _protocolLiquidationFee) /// @param _immutables abi.encode(address _circuitBreakerAddress, address _comptrollerAddress, address _timelockAddress) /// @param _customConfigData abi.encode(string memory _nameOfContract, string memory _symbolOfContract, uint8 _decimalsOfContract) constructor( bytes memory _configData, bytes memory _immutables, bytes memory _customConfigData ) SturdyPairAccessControl(_immutables) ERC20("", "") { { ( address _asset, address _collateral, address _oracle, uint32 _maxOracleDeviation, address _rateContract, uint64 _fullUtilizationRate, uint256 _maxLTV, uint256 _liquidationFee, uint256 _protocolLiquidationFee ) = abi.decode( _configData, (address, address, address, uint32, address, uint64, uint256, uint256, uint256) ); // Pair Settings assetContract = IERC20(_asset); collateralContract = IERC20(_collateral); currentRateInfo.feeToProtocolRate = 0; currentRateInfo.fullUtilizationRate = _fullUtilizationRate; currentRateInfo.lastTimestamp = uint64(block.timestamp - 1); currentRateInfo.lastBlock = uint32(block.number - 1); exchangeRateInfo.oracle = _oracle; exchangeRateInfo.maxOracleDeviation = _maxOracleDeviation; rateContract = IRateCalculatorV2(_rateContract); //Liquidation Fee Settings cleanLiquidationFee = _liquidationFee; dirtyLiquidationFee = (_liquidationFee * 90_000) / LIQ_PRECISION; // 90% of clean fee protocolLiquidationFee = _protocolLiquidationFee; // set maxLTV maxLTV = _maxLTV; } { (string memory _nameOfContract, string memory _symbolOfContract, uint8 _decimalsOfContract) = abi.decode( _customConfigData, (string, string, uint8) ); // ERC20 Metadata nameOfContract = _nameOfContract; symbolOfContract = _symbolOfContract; decimalsOfContract = _decimalsOfContract; // Instantiate Interest _addInterest(); // Instantiate Exchange Rate _updateExchangeRate(); } } // ============================================================================================ // Internal Helpers // ============================================================================================ /// @notice The ```_totalAssetAvailable``` function returns the total balance of Asset Tokens in the contract /// @param _totalAsset VaultAccount struct which stores total amount and shares for assets /// @param _totalBorrow VaultAccount struct which stores total amount and shares for borrows /// @return The balance of Asset Tokens held by contract function _totalAssetAvailable( VaultAccount memory _totalAsset, VaultAccount memory _totalBorrow ) internal pure returns (uint256) { return _totalAsset.amount - _totalBorrow.amount; } /// @notice The ```_isSolvent``` function determines if a given borrower is solvent given an exchange rate /// @param _borrower The borrower address to check /// @param _exchangeRate The exchange rate, i.e. the amount of collateral to buy 1e18 asset /// @return Whether borrower is solvent function _isSolvent(address _borrower, uint256 _exchangeRate) internal view returns (bool) { if (maxLTV == 0) return true; uint256 _borrowerAmount = totalBorrow.toAmount(userBorrowShares[_borrower], true); if (_borrowerAmount == 0) return true; uint256 _collateralAmount = userCollateralBalance[_borrower]; if (_collateralAmount == 0) return false; uint256 _ltv = (((_borrowerAmount * _exchangeRate) / EXCHANGE_PRECISION) * LTV_PRECISION) / _collateralAmount; return _ltv <= maxLTV; } // ============================================================================================ // Modifiers // ============================================================================================ /// @notice Checks for solvency AFTER executing contract code /// @param _borrower The borrower whose solvency we will check modifier isSolvent(address _borrower) { _; ExchangeRateInfo memory _exchangeRateInfo = exchangeRateInfo; if (!_isSolvent(_borrower, exchangeRateInfo.highExchangeRate)) { revert Insolvent( totalBorrow.toAmount(userBorrowShares[_borrower], true), userCollateralBalance[_borrower], exchangeRateInfo.highExchangeRate ); } } // ============================================================================================ // Functions: Interest Accumulation and Adjustment // ============================================================================================ /// @notice The ```AddInterest``` event is emitted when interest is accrued by borrowers /// @param interestEarned The total interest accrued by all borrowers /// @param rate The interest rate used to calculate accrued interest /// @param feesAmount The amount of fees paid to protocol /// @param feesShare The amount of shares distributed to protocol event AddInterest(uint256 interestEarned, uint256 rate, uint256 feesAmount, uint256 feesShare); /// @notice The ```UpdateRate``` event is emitted when the interest rate is updated /// @param oldRatePerSec The old interest rate (per second) /// @param oldFullUtilizationRate The old full utilization rate /// @param newRatePerSec The new interest rate (per second) /// @param newFullUtilizationRate The new full utilization rate event UpdateRate( uint256 oldRatePerSec, uint256 oldFullUtilizationRate, uint256 newRatePerSec, uint256 newFullUtilizationRate ); /// @notice The ```addInterest``` function is a public implementation of _addInterest and allows 3rd parties to trigger interest accrual /// @return _interestEarned The amount of interest accrued by all borrowers /// @return _feesAmount The amount of fees paid to protocol /// @return _feesShare The amount of shares distributed to protocol /// @return _currentRateInfo The new rate info struct /// @return _totalAsset The new total asset struct /// @return _totalBorrow The new total borrow struct function addInterest( bool _returnAccounting ) external nonReentrant returns ( uint256 _interestEarned, uint256 _feesAmount, uint256 _feesShare, CurrentRateInfo memory _currentRateInfo, VaultAccount memory _totalAsset, VaultAccount memory _totalBorrow ) { (, _interestEarned, _feesAmount, _feesShare, _currentRateInfo) = _addInterest(); if (_returnAccounting) { _totalAsset = totalAsset; _totalBorrow = totalBorrow; } } /// @notice The ```previewAddInterest``` function /// @return _interestEarned The amount of interest accrued by all borrowers /// @return _feesAmount The amount of fees paid to protocol /// @return _feesShare The amount of shares distributed to protocol /// @return _newCurrentRateInfo The new rate info struct /// @return _totalAsset The new total asset struct /// @return _totalBorrow The new total borrow struct function previewAddInterest() public view returns ( uint256 _interestEarned, uint256 _feesAmount, uint256 _feesShare, CurrentRateInfo memory _newCurrentRateInfo, VaultAccount memory _totalAsset, VaultAccount memory _totalBorrow ) { _newCurrentRateInfo = currentRateInfo; // Write return values InterestCalculationResults memory _results = _calculateInterest(_newCurrentRateInfo); if (_results.isInterestUpdated) { _interestEarned = _results.interestEarned; _feesAmount = _results.feesAmount; _feesShare = _results.feesShare; _newCurrentRateInfo.ratePerSec = _results.newRate; _newCurrentRateInfo.fullUtilizationRate = _results.newFullUtilizationRate; _totalAsset = _results.totalAsset; _totalBorrow = _results.totalBorrow; } else { _totalAsset = totalAsset; _totalBorrow = totalBorrow; } } struct InterestCalculationResults { bool isInterestUpdated; uint64 newRate; uint64 newFullUtilizationRate; uint256 interestEarned; uint256 feesAmount; uint256 feesShare; VaultAccount totalAsset; VaultAccount totalBorrow; } /// @notice The ```_calculateInterest``` function calculates the interest to be accrued and the new interest rate info /// @param _currentRateInfo The current rate info /// @return _results The results of the interest calculation function _calculateInterest( CurrentRateInfo memory _currentRateInfo ) internal view returns (InterestCalculationResults memory _results) { // Short circuit if interest already calculated this block OR if interest is paused if (_currentRateInfo.lastTimestamp != block.timestamp && !isInterestPaused) { // Indicate that interest is updated and calculated _results.isInterestUpdated = true; // Write return values and use these to save gas _results.totalAsset = totalAsset; _results.totalBorrow = totalBorrow; // Time elapsed since last interest update uint256 _deltaTime = block.timestamp - _currentRateInfo.lastTimestamp; // Get the utilization rate uint256 _utilizationRate = _results.totalAsset.amount == 0 ? 0 : (UTIL_PREC * _results.totalBorrow.amount) / _results.totalAsset.amount; // Request new interest rate and full utilization rate from the rate calculator (_results.newRate, _results.newFullUtilizationRate) = IRateCalculatorV2(rateContract).getNewRate( _deltaTime, _utilizationRate, _currentRateInfo.fullUtilizationRate ); // Calculate interest accrued _results.interestEarned = (_deltaTime * _results.totalBorrow.amount * _results.newRate) / RATE_PRECISION; // Accrue interest (if any) and fees iff no overflow if ( _results.interestEarned > 0 && _results.interestEarned + _results.totalBorrow.amount <= type(uint128).max && _results.interestEarned + _results.totalAsset.amount <= type(uint128).max ) { // Increment totalBorrow and totalAsset by interestEarned _results.totalBorrow.amount += uint128(_results.interestEarned); _results.totalAsset.amount += uint128(_results.interestEarned); if (_currentRateInfo.feeToProtocolRate > 0) { _results.feesAmount = (_results.interestEarned * _currentRateInfo.feeToProtocolRate) / FEE_PRECISION; _results.feesShare = (_results.feesAmount * _results.totalAsset.shares) / (_results.totalAsset.amount - _results.feesAmount); // Effects: Give new shares to this contract, effectively diluting lenders an amount equal to the fees // We can safely cast because _feesShare < _feesAmount < interestEarned which is always less than uint128 _results.totalAsset.shares += uint128(_results.feesShare); } } } } /// @notice The ```_addInterest``` function is invoked prior to every external function and is used to accrue interest and update interest rate /// @dev Can only called once per block /// @return _isInterestUpdated True if interest was calculated /// @return _interestEarned The amount of interest accrued by all borrowers /// @return _feesAmount The amount of fees paid to protocol /// @return _feesShare The amount of shares distributed to protocol /// @return _currentRateInfo The new rate info struct function _addInterest() internal returns ( bool _isInterestUpdated, uint256 _interestEarned, uint256 _feesAmount, uint256 _feesShare, CurrentRateInfo memory _currentRateInfo ) { // Pull from storage and set default return values _currentRateInfo = currentRateInfo; // Calc interest InterestCalculationResults memory _results = _calculateInterest(_currentRateInfo); // Write return values only if interest was updated and calculated if (_results.isInterestUpdated) { _isInterestUpdated = _results.isInterestUpdated; _interestEarned = _results.interestEarned; _feesAmount = _results.feesAmount; _feesShare = _results.feesShare; // emit here so that we have access to the old values emit UpdateRate( _currentRateInfo.ratePerSec, _currentRateInfo.fullUtilizationRate, _results.newRate, _results.newFullUtilizationRate ); emit AddInterest(_interestEarned, _results.newRate, _feesAmount, _feesShare); // overwrite original values _currentRateInfo.ratePerSec = _results.newRate; _currentRateInfo.fullUtilizationRate = _results.newFullUtilizationRate; _currentRateInfo.lastTimestamp = uint64(block.timestamp); _currentRateInfo.lastBlock = uint32(block.number); // Effects: write to state currentRateInfo = _currentRateInfo; totalAsset = _results.totalAsset; totalBorrow = _results.totalBorrow; if (_feesShare > 0) _mint(address(this), _feesShare); } } // ============================================================================================ // Functions: ExchangeRate // ============================================================================================ /// @notice The ```UpdateExchangeRate``` event is emitted when the Collateral:Asset exchange rate is updated /// @param lowExchangeRate The low exchange rate /// @param highExchangeRate The high exchange rate event UpdateExchangeRate(uint256 lowExchangeRate, uint256 highExchangeRate); /// @notice The ```WarnOracleData``` event is emitted when one of the oracles has stale or otherwise problematic data /// @param oracle The oracle address event WarnOracleData(address oracle); /// @notice The ```updateExchangeRate``` function is the external implementation of _updateExchangeRate. /// @dev This function is invoked at most once per block as these queries can be expensive /// @return _isBorrowAllowed True if deviation is within bounds /// @return _lowExchangeRate The low exchange rate /// @return _highExchangeRate The high exchange rate function updateExchangeRate() external nonReentrant returns (bool _isBorrowAllowed, uint256 _lowExchangeRate, uint256 _highExchangeRate) { return _updateExchangeRate(); } /// @notice The ```_updateExchangeRate``` function retrieves the latest exchange rate. i.e how much collateral to buy 1e18 asset. /// @dev This function is invoked at most once per block as these queries can be expensive /// @return _isBorrowAllowed True if deviation is within bounds /// @return _lowExchangeRate The low exchange rate /// @return _highExchangeRate The high exchange rate function _updateExchangeRate() internal returns (bool _isBorrowAllowed, uint256 _lowExchangeRate, uint256 _highExchangeRate) { // Pull from storage to save gas and set default return values ExchangeRateInfo memory _exchangeRateInfo = exchangeRateInfo; // Short circuit if already updated this block if (_exchangeRateInfo.lastTimestamp != block.timestamp) { // Get the latest exchange rate from the dual oracle bool _oneOracleBad; (_oneOracleBad, _lowExchangeRate, _highExchangeRate) = IDualOracle(_exchangeRateInfo.oracle).getPrices(); // If one oracle is bad data, emit an event for off-chain monitoring if (_oneOracleBad) emit WarnOracleData(_exchangeRateInfo.oracle); // Effects: Bookkeeping and write to storage _exchangeRateInfo.lastTimestamp = uint184(block.timestamp); _exchangeRateInfo.lowExchangeRate = _lowExchangeRate; _exchangeRateInfo.highExchangeRate = _highExchangeRate; exchangeRateInfo = _exchangeRateInfo; emit UpdateExchangeRate(_lowExchangeRate, _highExchangeRate); } else { // Use default return values if already updated this block _lowExchangeRate = _exchangeRateInfo.lowExchangeRate; _highExchangeRate = _exchangeRateInfo.highExchangeRate; } uint256 _deviation = (DEVIATION_PRECISION * (_exchangeRateInfo.highExchangeRate - _exchangeRateInfo.lowExchangeRate)) / _exchangeRateInfo.highExchangeRate; if (_deviation <= _exchangeRateInfo.maxOracleDeviation) { _isBorrowAllowed = true; } } // ============================================================================================ // Functions: Lending // ============================================================================================ /// @notice The ```Deposit``` event fires when a user deposits assets to the pair /// @param caller the msg.sender /// @param owner the account the fTokens are sent to /// @param assets the amount of assets deposited /// @param shares the number of fTokens minted event Deposit(address indexed caller, address indexed owner, uint256 assets, uint256 shares); /// @notice The ```_deposit``` function is the internal implementation for lending assets /// @dev Caller must invoke ```ERC20.approve``` on the Asset Token contract prior to calling function /// @param _totalAsset An in memory VaultAccount struct representing the total amounts and shares for the Asset Token /// @param _amount The amount of Asset Token to be transferred /// @param _shares The amount of Asset Shares (fTokens) to be minted /// @param _receiver The address to receive the Asset Shares (fTokens) function _deposit(VaultAccount memory _totalAsset, uint128 _amount, uint128 _shares, address _receiver) internal { // Effects: bookkeeping _totalAsset.amount += _amount; _totalAsset.shares += _shares; // Effects: write back to storage _mint(_receiver, _shares); totalAsset = _totalAsset; // Interactions assetContract.safeTransferFrom(msg.sender, address(this), _amount); emit Deposit(msg.sender, _receiver, _amount, _shares); } function previewDeposit(uint256 _assets) external view returns (uint256 _sharesReceived) { (, , , , VaultAccount memory _totalAsset, ) = previewAddInterest(); _sharesReceived = _totalAsset.toShares(_assets, false); } /// @notice The ```deposit``` function allows a user to Lend Assets by specifying the amount of Asset Tokens to lend /// @dev Caller must invoke ```ERC20.approve``` on the Asset Token contract prior to calling function /// @param _amount The amount of Asset Token to transfer to Pair /// @param _receiver The address to receive the Asset Shares (fTokens) /// @return _sharesReceived The number of fTokens received for the deposit function deposit(uint256 _amount, address _receiver) external nonReentrant returns (uint256 _sharesReceived) { if (_receiver == address(0)) revert InvalidReceiver(); // Accrue interest if necessary _addInterest(); // Pull from storage to save gas VaultAccount memory _totalAsset = totalAsset; // Check if this deposit will violate the deposit limit if (depositLimit < _totalAsset.amount + _amount) revert ExceedsDepositLimit(); // Calculate the number of fTokens to mint _sharesReceived = _totalAsset.toShares(_amount, false); // Execute the deposit effects _deposit(_totalAsset, _amount.toUint128(), _sharesReceived.toUint128(), _receiver); } function previewMint(uint256 _shares) external view returns (uint256 _amount) { (, , , , VaultAccount memory _totalAsset, ) = previewAddInterest(); _amount = _totalAsset.toAmount(_shares, false); } function mint(uint256 _shares, address _receiver) external nonReentrant returns (uint256 _amount) { if (_receiver == address(0)) revert InvalidReceiver(); // Accrue interest if necessary _addInterest(); // Pull from storage to save gas VaultAccount memory _totalAsset = totalAsset; // Calculate the number of assets to transfer based on the shares to mint _amount = _totalAsset.toAmount(_shares, false); // Check if this deposit will violate the deposit limit if (depositLimit < _totalAsset.amount + _amount) revert ExceedsDepositLimit(); // Execute the deposit effects _deposit(_totalAsset, _amount.toUint128(), _shares.toUint128(), _receiver); } /// @notice The ```Withdraw``` event fires when a user redeems their fTokens for the underlying asset /// @param caller the msg.sender /// @param receiver The address to which the underlying asset will be transferred to /// @param owner The owner of the fTokens /// @param assets The assets transferred /// @param shares The number of fTokens burned event Withdraw( address indexed caller, address indexed receiver, address indexed owner, uint256 assets, uint256 shares ); /// @notice The ```_redeem``` function is an internal implementation which allows a Lender to pull their Asset Tokens out of the Pair /// @dev Caller must invoke ```ERC20.approve``` on the Asset Token contract prior to calling function /// @param _totalAsset An in-memory VaultAccount struct which holds the total amount of Asset Tokens and the total number of Asset Shares (fTokens) /// @param _amountToReturn The number of Asset Tokens to return /// @param _shares The number of Asset Shares (fTokens) to burn /// @param _receiver The address to which the Asset Tokens will be transferred /// @param _owner The owner of the Asset Shares (fTokens) function _redeem( VaultAccount memory _totalAsset, uint128 _amountToReturn, uint128 _shares, address _receiver, address _owner ) internal { // Check for sufficient allowance/approval if necessary if (msg.sender != _owner) { uint256 allowed = allowance(_owner, msg.sender); // NOTE: This will revert on underflow ensuring that allowance > shares if (allowed != type(uint256).max) _approve(_owner, msg.sender, allowed - _shares); } // Check for sufficient withdraw liquidity (not strictly necessary because balance will underflow) uint256 _assetsAvailable = _totalAssetAvailable(_totalAsset, totalBorrow); if (_assetsAvailable < _amountToReturn) { revert InsufficientAssetsInContract(_assetsAvailable, _amountToReturn); } // Effects: bookkeeping _totalAsset.amount -= _amountToReturn; _totalAsset.shares -= _shares; // Effects: write to storage totalAsset = _totalAsset; _burn(_owner, _shares); // Interactions assetContract.safeTransfer(_receiver, _amountToReturn); emit Withdraw(msg.sender, _receiver, _owner, _amountToReturn, _shares); } function previewRedeem(uint256 _shares) external view returns (uint256 _assets) { (, , , , VaultAccount memory _totalAsset, ) = previewAddInterest(); _assets = _totalAsset.toAmount(_shares, false); } /// @notice The ```redeem``` function allows the caller to redeem their Asset Shares for Asset Tokens /// @param _shares The number of Asset Shares (fTokens) to burn for Asset Tokens /// @param _receiver The address to which the Asset Tokens will be transferred /// @param _owner The owner of the Asset Shares (fTokens) /// @return _amountToReturn The amount of Asset Tokens to be transferred function redeem( uint256 _shares, address _receiver, address _owner ) external nonReentrant returns (uint256 _amountToReturn) { if (_receiver == address(0)) revert InvalidReceiver(); // Check if withdraw is paused and revert if necessary if (isWithdrawPaused) revert WithdrawPaused(); // Accrue interest if necessary _addInterest(); // Pull from storage to save gas VaultAccount memory _totalAsset = totalAsset; // Calculate the number of assets to transfer based on the shares to burn _amountToReturn = _totalAsset.toAmount(_shares, false); // Execute the withdraw effects _redeem(_totalAsset, _amountToReturn.toUint128(), _shares.toUint128(), _receiver, _owner); } /// @notice The ```previewWithdraw``` function returns the number of Asset Shares (fTokens) that would be burned for a given amount of Asset Tokens /// @param _amount The amount of Asset Tokens to be withdrawn /// @return _sharesToBurn The number of shares that would be burned function previewWithdraw(uint256 _amount) external view returns (uint256 _sharesToBurn) { (, , , , VaultAccount memory _totalAsset, ) = previewAddInterest(); _sharesToBurn = _totalAsset.toShares(_amount, true); } /// @notice The ```withdraw``` function allows the caller to withdraw their Asset Tokens for a given amount of fTokens /// @param _amount The amount to withdraw /// @param _receiver The address to which the Asset Tokens will be transferred /// @param _owner The owner of the Asset Shares (fTokens) /// @return _sharesToBurn The number of shares (fTokens) that were burned function withdraw( uint256 _amount, address _receiver, address _owner ) external nonReentrant returns (uint256 _sharesToBurn) { if (_receiver == address(0)) revert InvalidReceiver(); // Check if withdraw is paused and revert if necessary if (isWithdrawPaused) revert WithdrawPaused(); // Accrue interest if necessary _addInterest(); // Pull from storage to save gas VaultAccount memory _totalAsset = totalAsset; // Calculate the number of shares to burn based on the amount to withdraw _sharesToBurn = _totalAsset.toShares(_amount, true); // Execute the withdraw effects _redeem(_totalAsset, _amount.toUint128(), _sharesToBurn.toUint128(), _receiver, _owner); } // ============================================================================================ // Functions: Borrowing // ============================================================================================ /// @notice The ```BorrowAsset``` event is emitted when a borrower increases their position /// @param _borrower The borrower whose account was debited /// @param _receiver The address to which the Asset Tokens were transferred /// @param _borrowAmount The amount of Asset Tokens transferred /// @param _sharesAdded The number of Borrow Shares the borrower was debited event BorrowAsset( address indexed _borrower, address indexed _receiver, uint256 _borrowAmount, uint256 _sharesAdded ); /// @notice The ```_borrowAsset``` function is the internal implementation for borrowing assets /// @param _borrowAmount The amount of the Asset Token to borrow /// @param _receiver The address to receive the Asset Tokens /// @return _sharesAdded The amount of borrow shares the msg.sender will be debited function _borrowAsset(uint128 _borrowAmount, address _receiver) internal returns (uint256 _sharesAdded) { // Get borrow accounting from storage to save gas VaultAccount memory _totalBorrow = totalBorrow; // Check available capital (not strictly necessary because balance will underflow, but better revert message) uint256 _assetsAvailable = _totalAssetAvailable(totalAsset, _totalBorrow); if (_assetsAvailable < _borrowAmount) { revert InsufficientAssetsInContract(_assetsAvailable, _borrowAmount); } // Calculate the number of shares to add based on the amount to borrow _sharesAdded = _totalBorrow.toShares(_borrowAmount, true); // Effects: Bookkeeping to add shares & amounts to total Borrow accounting _totalBorrow.amount += _borrowAmount; _totalBorrow.shares += uint128(_sharesAdded); // NOTE: we can safely cast here because shares are always less than amount and _borrowAmount is uint128 // Effects: write back to storage totalBorrow = _totalBorrow; userBorrowShares[msg.sender] += _sharesAdded; // Interactions if (_receiver != address(this)) { assetContract.safeTransfer(_receiver, _borrowAmount); } emit BorrowAsset(msg.sender, _receiver, _borrowAmount, _sharesAdded); } /// @notice The ```_borrowAssetOnBehalfOf``` function is the internal implementation for borrowing assets on behalf of borrower /// @dev msg.sender will receive the Asset Tokens /// @param _borrowAmount The amount of the Asset Token to borrow /// @param _onBehalfOf The address which will receive the debt. Should be the address of the borrower itself /// @return _sharesAdded The amount of borrow shares the _onBehalfOf will be debited function _borrowAssetOnBehalfOf(uint128 _borrowAmount, address _onBehalfOf) internal returns (uint256 _sharesAdded) { // Get borrow accounting from storage to save gas VaultAccount memory _totalBorrow = totalBorrow; // Check available capital (not strictly necessary because balance will underflow, but better revert message) uint256 _assetsAvailable = _totalAssetAvailable(totalAsset, _totalBorrow); if (_assetsAvailable < _borrowAmount) { revert InsufficientAssetsInContract(_assetsAvailable, _borrowAmount); } // decrease borrowAllowance (borrowing power) uint256 newAllowance = userBorrowAllowances[_onBehalfOf][msg.sender] - _borrowAmount; userBorrowAllowances[_onBehalfOf][msg.sender] = newAllowance; emit UserBorrowAllowanceDelegated(_onBehalfOf, msg.sender, newAllowance); // Calculate the number of shares to add based on the amount to borrow _sharesAdded = _totalBorrow.toShares(_borrowAmount, true); // Effects: Bookkeeping to add shares & amounts to total Borrow accounting _totalBorrow.amount += _borrowAmount; _totalBorrow.shares += uint128(_sharesAdded); // NOTE: we can safely cast here because shares are always less than amount and _borrowAmount is uint128 // Effects: write back to storage totalBorrow = _totalBorrow; userBorrowShares[_onBehalfOf] += _sharesAdded; // Interactions assetContract.safeTransfer(msg.sender, _borrowAmount); emit BorrowAsset(_onBehalfOf, msg.sender, _borrowAmount, _sharesAdded); } /// @notice The ```borrowAsset``` function allows a user to open/increase a borrow position /// @dev Borrower must call ```ERC20.approve``` on the Collateral Token contract if applicable /// @param _borrowAmount The amount of Asset Token to borrow /// @param _collateralAmount The amount of Collateral Token to transfer to Pair /// @param _receiver The address which will receive the Asset Tokens /// @return _shares The number of borrow Shares the msg.sender will be debited function borrowAsset( uint256 _borrowAmount, uint256 _collateralAmount, address _receiver ) external nonReentrant isSolvent(msg.sender) returns (uint256 _shares) { if (_receiver == address(0)) revert InvalidReceiver(); // Accrue interest if necessary _addInterest(); // Check if borrow will violate the borrow limit and revert if necessary if (borrowLimit < totalBorrow.amount + _borrowAmount) revert ExceedsBorrowLimit(); // Update _exchangeRate and check if borrow is allowed based on deviation (bool _isBorrowAllowed, , ) = _updateExchangeRate(); if (!_isBorrowAllowed) revert ExceedsMaxOracleDeviation(); // Only add collateral if necessary if (_collateralAmount > 0) { _addCollateral(msg.sender, _collateralAmount, msg.sender); } // Effects: Call internal borrow function _shares = _borrowAsset(_borrowAmount.toUint128(), _receiver); } /// @notice The ```borrowAssetOnBehalfOf``` function allows a user to open/increase a borrow position on behalf of borrower /// @dev msg.sender will receive the Asset Tokens /// @param _borrowAmount The amount of Asset Token to borrow /// @param _onBehalfOf The address which will receive the debt. Should be the address of the borrower itself /// @return _shares The number of borrow Shares the _onBehalfOf will be debited function borrowAssetOnBehalfOf( uint256 _borrowAmount, address _onBehalfOf ) external nonReentrant isSolvent(_onBehalfOf) returns (uint256 _shares) { if (_onBehalfOf == address(0) || msg.sender == _onBehalfOf) revert InvalidOnBehalfOf(); // Accrue interest if necessary _addInterest(); // Check if borrow will violate the borrow limit and revert if necessary if (borrowLimit < totalBorrow.amount + _borrowAmount) revert ExceedsBorrowLimit(); // Update _exchangeRate and check if borrow is allowed based on deviation (bool _isBorrowAllowed, , ) = _updateExchangeRate(); if (!_isBorrowAllowed) revert ExceedsMaxOracleDeviation(); // Effects: Call internal borrow function _shares = _borrowAssetOnBehalfOf(_borrowAmount.toUint128(), _onBehalfOf); } /// @notice The ```UserBorrowAllowanceDelegated``` event is emitted when a borrower delegates borrowing power to a user /// @param _fromUser The borrower who delegates borrowing power /// @param _toUser The user who receive the borrowing power from borrower /// @param _amount The max amount being delegated event UserBorrowAllowanceDelegated( address indexed _fromUser, address indexed _toUser, uint256 _amount ); /// @notice The ```approveBorrowDelegation``` function delegates borrowing power to a user /// @param _delegatee the address receiving the delegated borrowing power /// @param _amount the maximum amount being delegated. function approveBorrowDelegation(address _delegatee, uint256 _amount) external { // To change the approve amount you first have to reduce the addresses` // allowance to zero by calling `approveBorrowDelegation(_delegatee, 0)` if it is not // already 0 to mitigate the race condition described here: // https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 if ((_amount != 0) && (userBorrowAllowances[msg.sender][_delegatee] != 0)) { revert InvalidApproveBorrowDelegation(); } userBorrowAllowances[msg.sender][_delegatee] = _amount; emit UserBorrowAllowanceDelegated(msg.sender, _delegatee, _amount); } /// @notice The ```AddCollateral``` event is emitted when a borrower adds collateral to their position /// @param sender The source of funds for the new collateral /// @param borrower The borrower account for which the collateral should be credited /// @param collateralAmount The amount of Collateral Token to be transferred event AddCollateral(address indexed sender, address indexed borrower, uint256 collateralAmount); /// @notice The ```_addCollateral``` function is an internal implementation for adding collateral to a borrowers position /// @param _sender The source of funds for the new collateral /// @param _collateralAmount The amount of Collateral Token to be transferred /// @param _borrower The borrower account for which the collateral should be credited function _addCollateral(address _sender, uint256 _collateralAmount, address _borrower) internal { // Effects: write to state userCollateralBalance[_borrower] += _collateralAmount; totalCollateral += _collateralAmount; // Interactions if (_sender != address(this)) { collateralContract.safeTransferFrom(_sender, address(this), _collateralAmount); } emit AddCollateral(_sender, _borrower, _collateralAmount); } /// @notice The ```addCollateral``` function allows the caller to add Collateral Token to a borrowers position /// @dev msg.sender must call ERC20.approve() on the Collateral Token contract prior to invocation /// @param _collateralAmount The amount of Collateral Token to be added to borrower's position /// @param _borrower The account to be credited function addCollateral(uint256 _collateralAmount, address _borrower) external nonReentrant { if (_borrower == address(0)) revert InvalidReceiver(); _addInterest(); _addCollateral(msg.sender, _collateralAmount, _borrower); } /// @notice The ```RemoveCollateral``` event is emitted when collateral is removed from a borrower's position /// @param _sender The account from which funds are transferred /// @param _collateralAmount The amount of Collateral Token to be transferred /// @param _receiver The address to which Collateral Tokens will be transferred event RemoveCollateral( address indexed _sender, uint256 _collateralAmount, address indexed _receiver, address indexed _borrower ); /// @notice The ```_removeCollateral``` function is the internal implementation for removing collateral from a borrower's position /// @param _collateralAmount The amount of Collateral Token to remove from the borrower's position /// @param _receiver The address to receive the Collateral Token transferred /// @param _borrower The borrower whose account will be debited the Collateral amount function _removeCollateral(uint256 _collateralAmount, address _receiver, address _borrower) internal { // Effects: write to state // NOTE: Following line will revert on underflow if _collateralAmount > userCollateralBalance userCollateralBalance[_borrower] -= _collateralAmount; // NOTE: Following line will revert on underflow if totalCollateral < _collateralAmount totalCollateral -= _collateralAmount; // Interactions if (_receiver != address(this)) { collateralContract.safeTransfer(_receiver, _collateralAmount); } emit RemoveCollateral(msg.sender, _collateralAmount, _receiver, _borrower); } /// @notice The ```removeCollateral``` function is used to remove collateral from msg.sender's borrow position /// @dev msg.sender must be solvent after invocation or transaction will revert /// @param _collateralAmount The amount of Collateral Token to transfer /// @param _receiver The address to receive the transferred funds function removeCollateral( uint256 _collateralAmount, address _receiver ) external nonReentrant isSolvent(msg.sender) { if (_receiver == address(0)) revert InvalidReceiver(); _addInterest(); // Note: exchange rate is irrelevant when borrower has no debt shares if (userBorrowShares[msg.sender] > 0) { (bool _isBorrowAllowed, , ) = _updateExchangeRate(); if (!_isBorrowAllowed) revert ExceedsMaxOracleDeviation(); } _removeCollateral(_collateralAmount, _receiver, msg.sender); } /// @notice The ```SetWhitelistedDelegators``` event is emitted when admin enable/disable delegator who can call removeCollateralFrom() /// @param _delegator the address of contract who can call the removeCollateralFrom() /// @param _enabled the enable/disable flag. event SetWhitelistedDelegators( address indexed _delegator, bool _enabled ); /// @notice The ```setWhitelistedDelegators``` function enable/disable the delegators who can call the removeCollateralFrom() /// @param _delegator the address of contract who can call the removeCollateralFrom() /// @param _enabled the enable/disable flag. function setWhitelistedDelegators(address _delegator, bool _enabled) external payable onlyOwner { whitelistedDelegators[_delegator] = _enabled; emit SetWhitelistedDelegators(_delegator, _enabled); } /// @notice The ```removeCollateralFrom``` function is used to remove collateral from the borrower /// @dev caller must be delegator(ex: leverage contract) and borrower must be solvent after invocation or transaction will revert /// @param _collateralAmount The amount of Collateral Token to transfer /// @param _receiver The address to receive the transferred funds /// @param _borrower The address removing collateral from function removeCollateralFrom( uint256 _collateralAmount, address _receiver, address _borrower ) external payable nonReentrant isSolvent(_borrower) { if(whitelistedDelegators[msg.sender] == false) revert InvalidDelegator(); if (_receiver == address(0)) revert InvalidReceiver(); if (_borrower == address(0)) revert InvalidBorrower(); _addInterest(); // Note: exchange rate is irrelevant when borrower has no debt shares if (userBorrowShares[_borrower] > 0) { (bool _isBorrowAllowed, , ) = _updateExchangeRate(); if (!_isBorrowAllowed) revert ExceedsMaxOracleDeviation(); } _removeCollateral(_collateralAmount, _receiver, _borrower); } /// @notice The ```RepayAsset``` event is emitted whenever a debt position is repaid /// @param payer The address paying for the repayment /// @param borrower The borrower whose account will be credited /// @param amountToRepay The amount of Asset token to be transferred /// @param shares The amount of Borrow Shares which will be debited from the borrower after repayment event RepayAsset(address indexed payer, address indexed borrower, uint256 amountToRepay, uint256 shares); /// @notice The ```_repayAsset``` function is the internal implementation for repaying a borrow position /// @dev The payer must have called ERC20.approve() on the Asset Token contract prior to invocation /// @param _totalBorrow An in memory copy of the totalBorrow VaultAccount struct /// @param _amountToRepay The amount of Asset Token to transfer /// @param _shares The number of Borrow Shares the sender is repaying /// @param _payer The address from which funds will be transferred /// @param _borrower The borrower account which will be credited function _repayAsset( VaultAccount memory _totalBorrow, uint128 _amountToRepay, uint128 _shares, address _payer, address _borrower ) internal { // Effects: Bookkeeping _totalBorrow.amount -= _amountToRepay; _totalBorrow.shares -= _shares; // Effects: write to state userBorrowShares[_borrower] -= _shares; totalBorrow = _totalBorrow; // Interactions if (_payer != address(this)) { assetContract.safeTransferFrom(_payer, address(this), _amountToRepay); } emit RepayAsset(_payer, _borrower, _amountToRepay, _shares); } /// @notice The ```repayAsset``` function allows the caller to pay down the debt for a given borrower. /// @dev Caller must first invoke ```ERC20.approve()``` for the Asset Token contract /// @param _shares The number of Borrow Shares which will be repaid by the call /// @param _borrower The account for which the debt will be reduced /// @return _amountToRepay The amount of Asset Tokens which were transferred in order to repay the Borrow Shares function repayAsset(uint256 _shares, address _borrower) external nonReentrant returns (uint256 _amountToRepay) { if (_borrower == address(0)) revert InvalidReceiver(); // Check if repay is paused revert if necessary if (isRepayPaused) revert RepayPaused(); // Accrue interest if necessary _addInterest(); // Calculate amount to repay based on shares VaultAccount memory _totalBorrow = totalBorrow; _amountToRepay = _totalBorrow.toAmount(_shares, true); // Execute repayment effects _repayAsset(_totalBorrow, _amountToRepay.toUint128(), _shares.toUint128(), msg.sender, _borrower); } // ============================================================================================ // Functions: Liquidations // ============================================================================================ /// @notice The ```Liquidate``` event is emitted when a liquidation occurs /// @param _borrower The borrower account for which the liquidation occurred /// @param _collateralForLiquidator The amount of Collateral Token transferred to the liquidator /// @param _sharesToLiquidate The number of Borrow Shares the liquidator repaid on behalf of the borrower /// @param _sharesToAdjust The number of Borrow Shares that were adjusted on liabilities and assets (a writeoff) event Liquidate( address indexed _borrower, uint256 _collateralForLiquidator, uint256 _sharesToLiquidate, uint256 _amountLiquidatorToRepay, uint256 _feesAmount, uint256 _sharesToAdjust, uint256 _amountToAdjust ); /// @notice The ```liquidate``` function allows a third party to repay a borrower's debt if they have become insolvent /// @dev Caller must invoke ```ERC20.approve``` on the Asset Token contract prior to calling ```Liquidate()``` /// @param _sharesToLiquidate The number of Borrow Shares repaid by the liquidator /// @param _deadline The timestamp after which tx will revert /// @param _borrower The account for which the repayment is credited and from whom collateral will be taken /// @return _collateralForLiquidator The amount of Collateral Token transferred to the liquidator function liquidate( uint128 _sharesToLiquidate, uint256 _deadline, address _borrower ) external nonReentrant returns (uint256 _collateralForLiquidator) { if (_borrower == address(0)) revert InvalidReceiver(); // Check if liquidate is paused revert if necessary if (isLiquidatePaused) revert LiquidatePaused(); // Ensure deadline has not passed if (block.timestamp > _deadline) revert PastDeadline(block.timestamp, _deadline); // accrue interest if necessary _addInterest(); // Update exchange rate and use the lower rate for liquidations (, uint256 _exchangeRate, ) = _updateExchangeRate(); // Check if borrower is solvent, revert if they are if (_isSolvent(_borrower, _exchangeRate)) { revert BorrowerSolvent(); } // Read from state VaultAccount memory _totalBorrow = totalBorrow; uint256 _userCollateralBalance = userCollateralBalance[_borrower]; uint128 _borrowerShares = userBorrowShares[_borrower].toUint128(); // Prevent stack-too-deep int256 _leftoverCollateral; uint256 _feesAmount; { // Checks & Calculations // Determine the liquidation amount in collateral units (i.e. how much debt liquidator is going to repay) uint256 _liquidationAmountInCollateralUnits = ((_totalBorrow.toAmount(_sharesToLiquidate, false) * _exchangeRate) / EXCHANGE_PRECISION); // We first optimistically calculate the amount of collateral to give the liquidator based on the higher clean liquidation fee // This fee only applies if the liquidator does a full liquidation uint256 _optimisticCollateralForLiquidator = (_liquidationAmountInCollateralUnits * (LIQ_PRECISION + cleanLiquidationFee)) / LIQ_PRECISION; // Because interest accrues every block, _liquidationAmountInCollateralUnits from a few lines up is an ever increasing value // This means that leftoverCollateral can occasionally go negative by a few hundred wei (cleanLiqFee premium covers this for liquidator) _leftoverCollateral = (_userCollateralBalance.toInt256() - _optimisticCollateralForLiquidator.toInt256()); // If cleanLiquidation fee results in no leftover collateral, give liquidator all the collateral // This will only be true when there liquidator is cleaning out the position _collateralForLiquidator = _leftoverCollateral <= 0 ? _userCollateralBalance : (_liquidationAmountInCollateralUnits * (LIQ_PRECISION + dirtyLiquidationFee)) / LIQ_PRECISION; if (protocolLiquidationFee > 0) { _feesAmount = (protocolLiquidationFee * _collateralForLiquidator) / LIQ_PRECISION; _collateralForLiquidator = _collateralForLiquidator - _feesAmount; } } // Calculated here for use during repayment, grouped with other calcs before effects start uint128 _amountLiquidatorToRepay = (_totalBorrow.toAmount(_sharesToLiquidate, true)).toUint128(); // Determine if and how much debt to adjust uint128 _sharesToAdjust = 0; { uint128 _amountToAdjust = 0; if (_leftoverCollateral <= 0) { // Determine if we need to adjust any shares _sharesToAdjust = _borrowerShares - _sharesToLiquidate; if (_sharesToAdjust > 0) { // Write off bad debt _amountToAdjust = (_totalBorrow.toAmount(_sharesToAdjust, false)).toUint128(); // Note: Ensure this memory struct will be passed to _repayAsset for write to state _totalBorrow.amount -= _amountToAdjust; // Effects: write to state totalAsset.amount -= _amountToAdjust; } } emit Liquidate( _borrower, _collateralForLiquidator, _sharesToLiquidate, _amountLiquidatorToRepay, _feesAmount, _sharesToAdjust, _amountToAdjust ); } // Effects & Interactions // NOTE: reverts if _shares > userBorrowShares _repayAsset( _totalBorrow, _amountLiquidatorToRepay, _sharesToLiquidate + _sharesToAdjust, msg.sender, _borrower ); // liquidator repays shares on behalf of borrower // NOTE: reverts if _collateralForLiquidator > userCollateralBalance // Collateral is removed on behalf of borrower and sent to liquidator // NOTE: reverts if _collateralForLiquidator > userCollateralBalance _removeCollateral(_collateralForLiquidator, msg.sender, _borrower); // Adjust bookkeeping only (decreases collateral held by borrower) _removeCollateral(_feesAmount, address(this), _borrower); // Adjusts bookkeeping only (increases collateral held by protocol) _addCollateral(address(this), _feesAmount, address(this)); } // ============================================================================================ // Functions: Leverage // ============================================================================================ /// @notice The ```RepayAssetWithCollateral``` event is emitted whenever ```repayAssetWithCollateral()``` is invoked /// @param _borrower The borrower account for which the repayment is taking place /// @param _swapperAddress The address of the whitelisted swapper to use for token swaps /// @param _collateralToSwap The amount of Collateral Token to swap and use for repayment /// @param _amountAssetOut The amount of Asset Token which was repaid /// @param _sharesRepaid The number of Borrow Shares which were repaid event RepayAssetWithCollateral( address indexed _borrower, address _swapperAddress, uint256 _collateralToSwap, uint256 _amountAssetOut, uint256 _sharesRepaid ); /// @notice The ```repayAssetWithCollateral``` function allows a borrower to repay their debt using existing collateral in contract /// @param _swapperAddress The address of the whitelisted swapper to use for token swaps /// @param _collateralToSwap The amount of Collateral Tokens to swap for Asset Tokens /// @param _amountAssetOutMin The minimum amount of Asset Tokens to receive during the swap /// @param _path An array containing the addresses of ERC20 tokens to swap. Adheres to UniV2 style path params. /// @return _amountAssetOut The amount of Asset Tokens received for the Collateral Tokens, the amount the borrowers account was credited function repayAssetWithCollateral( address _swapperAddress, uint256 _collateralToSwap, uint256 _amountAssetOutMin, address[] calldata _path ) external nonReentrant isSolvent(msg.sender) returns (uint256 _amountAssetOut) { // Accrue interest if necessary _addInterest(); // Update exchange rate and check if borrow is allowed, revert if not (bool _isBorrowAllowed, , ) = _updateExchangeRate(); if (!_isBorrowAllowed) revert ExceedsMaxOracleDeviation(); IERC20 _assetContract = assetContract; IERC20 _collateralContract = collateralContract; if (!swappers[_swapperAddress]) { revert BadSwapper(); } if (_path[0] != address(_collateralContract)) { revert InvalidPath(address(_collateralContract), _path[0]); } if (_path[_path.length - 1] != address(_assetContract)) { revert InvalidPath(address(_assetContract), _path[_path.length - 1]); } // Effects: bookkeeping & write to state // Debit users collateral balance in preparation for swap, setting _recipient to address(this) means no transfer occurs _removeCollateral(_collateralToSwap, address(this), msg.sender); // Interactions _collateralContract.approve(_swapperAddress, _collateralToSwap); // Even though swappers are trusted, we verify the balance before and after swap uint256 _initialAssetBalance = _assetContract.balanceOf(address(this)); ISwapper(_swapperAddress).swapExactTokensForTokens( _collateralToSwap, _amountAssetOutMin, _path, address(this), block.timestamp ); uint256 _finalAssetBalance = _assetContract.balanceOf(address(this)); // Note: VIOLATES CHECKS-EFFECTS-INTERACTION pattern, make sure function is NONREENTRANT // Effects: bookkeeping _amountAssetOut = _finalAssetBalance - _initialAssetBalance; if (_amountAssetOut < _amountAssetOutMin) { revert SlippageTooHigh(_amountAssetOutMin, _amountAssetOut); } VaultAccount memory _totalBorrow = totalBorrow; uint256 _sharesToRepay = _totalBorrow.toShares(_amountAssetOut, false); // Effects: write to state // Note: setting _payer to address(this) means no actual transfer will occur. Contract already has funds _repayAsset(_totalBorrow, _amountAssetOut.toUint128(), _sharesToRepay.toUint128(), address(this), msg.sender); emit RepayAssetWithCollateral(msg.sender, _swapperAddress, _collateralToSwap, _amountAssetOut, _sharesToRepay); } }
// SPDX-License-Identifier: MIT pragma solidity >=0.8.21; interface ISwapper { function swapExactTokensForTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external returns (uint256[] memory amounts); }
// SPDX-License-Identifier: UNLICENSED pragma solidity 0.8.21; import { IERC165 } from "@openzeppelin/contracts/utils/introspection/IERC165.sol"; interface IDualOracle is IERC165 { function ORACLE_PRECISION() external view returns (uint256); function BASE_TOKEN_0() external view returns (address); function BASE_TOKEN_0_DECIMALS() external view returns (uint256); function BASE_TOKEN_1() external view returns (address); function BASE_TOKEN_1_DECIMALS() external view returns (uint256); function decimals() external view returns (uint8); function getPricesNormalized() external view returns (bool _isBadData, uint256 _priceLow, uint256 _priceHigh); function getPrices() external view returns (bool _isBadData, uint256 _priceLow, uint256 _priceHigh); function name() external view returns (string memory); function NORMALIZATION_0() external view returns (int256); function NORMALIZATION_1() external view returns (int256); function QUOTE_TOKEN_0() external view returns (address); function QUOTE_TOKEN_0_DECIMALS() external view returns (uint256); function QUOTE_TOKEN_1() external view returns (address); function QUOTE_TOKEN_1_DECIMALS() external view returns (uint256); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: ISC pragma solidity ^0.8.21; // ===================== SturdyPairConstants ======================== /// @title SturdyPairConstants /// @author Drake Evans (Frax Finance) https://github.com/drakeevans /// @notice An abstract contract which contains the errors and constants for the SturdyPair contract abstract contract SturdyPairConstants { // ============================================================================================ // Constants // ============================================================================================ // Precision settings uint256 internal constant LTV_PRECISION = 1e5; // 5 decimals uint256 internal constant LIQ_PRECISION = 1e5; uint256 internal constant UTIL_PREC = 1e5; uint256 internal constant FEE_PRECISION = 1e5; uint256 internal constant EXCHANGE_PRECISION = 1e18; uint256 internal constant DEVIATION_PRECISION = 1e5; uint256 internal constant RATE_PRECISION = 1e18; // Protocol Fee uint256 internal constant MAX_PROTOCOL_FEE = 5e4; // 50% 1e5 precision error Insolvent(uint256 _borrow, uint256 _collateral, uint256 _exchangeRate); error BorrowerSolvent(); error InsufficientAssetsInContract(uint256 _assets, uint256 _request); error SlippageTooHigh(uint256 _minOut, uint256 _actual); error BadSwapper(); error InvalidPath(address _expected, address _actual); error BadProtocolFee(); error PastDeadline(uint256 _blockTimestamp, uint256 _deadline); error SetterRevoked(); error ExceedsMaxOracleDeviation(); error InvalidReceiver(); error InvalidOnBehalfOf(); error InvalidApproveBorrowDelegation(); error InvalidBorrower(); error InvalidDelegator(); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (security/ReentrancyGuard.sol) pragma solidity ^0.8.0; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuard { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor() { _status = _NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and making it call a * `private` function that does the actual work. */ modifier nonReentrant() { _nonReentrantBefore(); _; _nonReentrantAfter(); } function _nonReentrantBefore() private { // On the first call to nonReentrant, _status will be _NOT_ENTERED require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; } function _nonReentrantAfter() private { // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } /** * @dev Returns true if the reentrancy guard is currently set to "entered", which indicates there is a * `nonReentrant` function in the call stack. */ function _reentrancyGuardEntered() internal view returns (bool) { return _status == _ENTERED; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SafeCast.sol) // This file was procedurally generated from scripts/generate/templates/SafeCast.js. 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 downcasted) { downcasted = int248(value); require(downcasted == value, "SafeCast: value doesn't fit in 248 bits"); } /** * @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 downcasted) { downcasted = int240(value); require(downcasted == value, "SafeCast: value doesn't fit in 240 bits"); } /** * @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 downcasted) { downcasted = int232(value); require(downcasted == value, "SafeCast: value doesn't fit in 232 bits"); } /** * @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 downcasted) { downcasted = int224(value); require(downcasted == value, "SafeCast: value doesn't fit in 224 bits"); } /** * @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 downcasted) { downcasted = int216(value); require(downcasted == value, "SafeCast: value doesn't fit in 216 bits"); } /** * @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 downcasted) { downcasted = int208(value); require(downcasted == value, "SafeCast: value doesn't fit in 208 bits"); } /** * @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 downcasted) { downcasted = int200(value); require(downcasted == value, "SafeCast: value doesn't fit in 200 bits"); } /** * @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 downcasted) { downcasted = int192(value); require(downcasted == value, "SafeCast: value doesn't fit in 192 bits"); } /** * @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 downcasted) { downcasted = int184(value); require(downcasted == value, "SafeCast: value doesn't fit in 184 bits"); } /** * @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 downcasted) { downcasted = int176(value); require(downcasted == value, "SafeCast: value doesn't fit in 176 bits"); } /** * @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 downcasted) { downcasted = int168(value); require(downcasted == value, "SafeCast: value doesn't fit in 168 bits"); } /** * @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 downcasted) { downcasted = int160(value); require(downcasted == value, "SafeCast: value doesn't fit in 160 bits"); } /** * @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 downcasted) { downcasted = int152(value); require(downcasted == value, "SafeCast: value doesn't fit in 152 bits"); } /** * @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 downcasted) { downcasted = int144(value); require(downcasted == value, "SafeCast: value doesn't fit in 144 bits"); } /** * @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 downcasted) { downcasted = int136(value); require(downcasted == value, "SafeCast: value doesn't fit in 136 bits"); } /** * @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 downcasted) { downcasted = int128(value); require(downcasted == value, "SafeCast: value doesn't fit in 128 bits"); } /** * @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 downcasted) { downcasted = int120(value); require(downcasted == value, "SafeCast: value doesn't fit in 120 bits"); } /** * @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 downcasted) { downcasted = int112(value); require(downcasted == value, "SafeCast: value doesn't fit in 112 bits"); } /** * @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 downcasted) { downcasted = int104(value); require(downcasted == value, "SafeCast: value doesn't fit in 104 bits"); } /** * @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 downcasted) { downcasted = int96(value); require(downcasted == value, "SafeCast: value doesn't fit in 96 bits"); } /** * @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 downcasted) { downcasted = int88(value); require(downcasted == value, "SafeCast: value doesn't fit in 88 bits"); } /** * @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 downcasted) { downcasted = int80(value); require(downcasted == value, "SafeCast: value doesn't fit in 80 bits"); } /** * @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 downcasted) { downcasted = int72(value); require(downcasted == value, "SafeCast: value doesn't fit in 72 bits"); } /** * @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 downcasted) { downcasted = int64(value); require(downcasted == value, "SafeCast: value doesn't fit in 64 bits"); } /** * @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 downcasted) { downcasted = int56(value); require(downcasted == value, "SafeCast: value doesn't fit in 56 bits"); } /** * @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 downcasted) { downcasted = int48(value); require(downcasted == value, "SafeCast: value doesn't fit in 48 bits"); } /** * @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 downcasted) { downcasted = int40(value); require(downcasted == value, "SafeCast: value doesn't fit in 40 bits"); } /** * @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 downcasted) { downcasted = int32(value); require(downcasted == value, "SafeCast: value doesn't fit in 32 bits"); } /** * @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 downcasted) { downcasted = int24(value); require(downcasted == value, "SafeCast: value doesn't fit in 24 bits"); } /** * @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 downcasted) { downcasted = int16(value); require(downcasted == value, "SafeCast: value doesn't fit in 16 bits"); } /** * @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 downcasted) { downcasted = int8(value); require(downcasted == value, "SafeCast: value doesn't fit in 8 bits"); } /** * @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); } }
// SPDX-License-Identifier: ISC pragma solidity ^0.8.21; // ========================== Timelock2Step =========================== /// @title Timelock2Step /// @author Drake Evans (Frax Finance) https://github.com/drakeevans /// @dev Inspired by the OpenZeppelin's Ownable2Step contract /// @notice An abstract contract which contains 2-step transfer and renounce logic for a timelock address abstract contract Timelock2Step { /// @notice The pending timelock address address public pendingTimelockAddress; /// @notice The current timelock address address public timelockAddress; constructor() { timelockAddress = msg.sender; } /// @notice Emitted when timelock is transferred error OnlyTimelock(); /// @notice Emitted when pending timelock is transferred error OnlyPendingTimelock(); /// @notice The ```TimelockTransferStarted``` event is emitted when the timelock transfer is initiated /// @param previousTimelock The address of the previous timelock /// @param newTimelock The address of the new timelock event TimelockTransferStarted(address indexed previousTimelock, address indexed newTimelock); /// @notice The ```TimelockTransferred``` event is emitted when the timelock transfer is completed /// @param previousTimelock The address of the previous timelock /// @param newTimelock The address of the new timelock event TimelockTransferred(address indexed previousTimelock, address indexed newTimelock); /// @notice The ```_isSenderTimelock``` function checks if msg.sender is current timelock address /// @return Whether or not msg.sender is current timelock address function _isSenderTimelock() internal view returns (bool) { return msg.sender == timelockAddress; } /// @notice The ```_requireTimelock``` function reverts if msg.sender is not current timelock address function _requireTimelock() internal view { if (msg.sender != timelockAddress) revert OnlyTimelock(); } /// @notice The ```_isSenderPendingTimelock``` function checks if msg.sender is pending timelock address /// @return Whether or not msg.sender is pending timelock address function _isSenderPendingTimelock() internal view returns (bool) { return msg.sender == pendingTimelockAddress; } /// @notice The ```_requirePendingTimelock``` function reverts if msg.sender is not pending timelock address function _requirePendingTimelock() internal view { if (msg.sender != pendingTimelockAddress) revert OnlyPendingTimelock(); } /// @notice The ```_transferTimelock``` function initiates the timelock transfer /// @dev This function is to be implemented by a public function /// @param _newTimelock The address of the nominated (pending) timelock function _transferTimelock(address _newTimelock) internal { pendingTimelockAddress = _newTimelock; emit TimelockTransferStarted(timelockAddress, _newTimelock); } /// @notice The ```_acceptTransferTimelock``` function completes the timelock transfer /// @dev This function is to be implemented by a public function function _acceptTransferTimelock() internal { pendingTimelockAddress = address(0); _setTimelock(msg.sender); } /// @notice The ```_setTimelock``` function sets the timelock address /// @dev This function is to be implemented by a public function /// @param _newTimelock The address of the new timelock function _setTimelock(address _newTimelock) internal { emit TimelockTransferred(timelockAddress, _newTimelock); timelockAddress = _newTimelock; } /// @notice The ```transferTimelock``` function initiates the timelock transfer /// @dev Must be called by the current timelock /// @param _newTimelock The address of the nominated (pending) timelock function transferTimelock(address _newTimelock) external virtual { _requireTimelock(); _transferTimelock(_newTimelock); } /// @notice The ```acceptTransferTimelock``` function completes the timelock transfer /// @dev Must be called by the pending timelock function acceptTransferTimelock() external virtual { _requirePendingTimelock(); _acceptTransferTimelock(); } /// @notice The ```renounceTimelock``` function renounces the timelock after setting pending timelock to current timelock /// @dev Pending timelock must be set to current timelock before renouncing, creating a 2-step renounce process function renounceTimelock() external virtual { _requireTimelock(); _requirePendingTimelock(); _transferTimelock(address(0)); _setTimelock(address(0)); } }
// SPDX-License-Identifier: ISC pragma solidity ^0.8.21; // ================ SturdyPairAccessControlErrors =================== /// @title SturdyPairAccessControlErrors /// @author Drake Evans (Frax Finance) https://github.com/drakeevans /// @notice An abstract contract which contains the errors for the Access Control contract abstract contract SturdyPairAccessControlErrors { error OnlyProtocolOrOwner(); error OnlyTimelockOrOwner(); error ExceedsBorrowLimit(); error AccessControlRevoked(); error RepayPaused(); error ExceedsDepositLimit(); error WithdrawPaused(); error LiquidatePaused(); error InterestPaused(); }
// SPDX-License-Identifier: ISC pragma solidity ^0.8.21; // ==================== SturdyPairAccessControl ===================== import { Ownable2Step, Ownable } from "@openzeppelin/contracts/access/Ownable2Step.sol"; import { Timelock2Step } from "./Timelock2Step.sol"; import { SturdyPairAccessControlErrors } from "./SturdyPairAccessControlErrors.sol"; /// @title SturdyPairAccessControl /// @author Drake Evans (Frax Finance) https://github.com/drakeevans /// @notice An abstract contract which contains the access control logic for SturdyPair abstract contract SturdyPairAccessControl is Timelock2Step, Ownable2Step, SturdyPairAccessControlErrors { // Deployer address public immutable DEPLOYER_ADDRESS; // Admin contracts address public circuitBreakerAddress; // access control uint256 public borrowLimit = type(uint256).max; uint256 public depositLimit = type(uint256).max; bool public isRepayPaused; bool public isRepayAccessControlRevoked; bool public isWithdrawPaused; bool public isWithdrawAccessControlRevoked; bool public isLiquidatePaused; bool public isLiquidateAccessControlRevoked; bool public isInterestPaused; /// @param _immutables abi.encode(address _circuitBreakerAddress, address _comptrollerAddress, address _timelockAddress) constructor(bytes memory _immutables) Timelock2Step() Ownable2Step() { // Handle Immutables Configuration (address _circuitBreakerAddress, address _comptrollerAddress, address _timelockAddress) = abi.decode( _immutables, (address, address, address) ); _setTimelock(_timelockAddress); _transferOwnership(_comptrollerAddress); // Deployer contract DEPLOYER_ADDRESS = msg.sender; circuitBreakerAddress = _circuitBreakerAddress; } // ============================================================================================ // Functions: Access Control // ============================================================================================ function _requireProtocolOrOwner() internal view { if ( msg.sender != circuitBreakerAddress && msg.sender != owner() && msg.sender != DEPLOYER_ADDRESS && msg.sender != timelockAddress ) { revert OnlyProtocolOrOwner(); } } function _requireTimelockOrOwner() internal view { if (msg.sender != owner() && msg.sender != timelockAddress) { revert OnlyTimelockOrOwner(); } } /// @notice The ```SetBorrowLimit``` event is emitted when the borrow limit is set /// @param limit The new borrow limit event SetBorrowLimit(uint256 limit); function _setBorrowLimit(uint256 _limit) internal { borrowLimit = _limit; emit SetBorrowLimit(_limit); } /// @notice The ```SetDepositLimit``` event is emitted when the deposit limit is set /// @param limit The new deposit limit event SetDepositLimit(uint256 limit); function _setDepositLimit(uint256 _limit) internal { depositLimit = _limit; emit SetDepositLimit(_limit); } /// @notice The ```RevokeRepayAccessControl``` event is emitted when repay access control is revoked event RevokeRepayAccessControl(); function _revokeRepayAccessControl() internal { isRepayAccessControlRevoked = true; emit RevokeRepayAccessControl(); } /// @notice The ```PauseRepay``` event is emitted when repay is paused or unpaused /// @param isPaused The new paused state event PauseRepay(bool isPaused); function _pauseRepay(bool _isPaused) internal { isRepayPaused = _isPaused; emit PauseRepay(_isPaused); } /// @notice The ```RevokeWithdrawAccessControl``` event is emitted when withdraw access control is revoked event RevokeWithdrawAccessControl(); function _revokeWithdrawAccessControl() internal { isWithdrawAccessControlRevoked = true; emit RevokeWithdrawAccessControl(); } /// @notice The ```PauseWithdraw``` event is emitted when withdraw is paused or unpaused /// @param isPaused The new paused state event PauseWithdraw(bool isPaused); function _pauseWithdraw(bool _isPaused) internal { isWithdrawPaused = _isPaused; emit PauseWithdraw(_isPaused); } /// @notice The ```RevokeLiquidateAccessControl``` event is emitted when liquidate access control is revoked event RevokeLiquidateAccessControl(); function _revokeLiquidateAccessControl() internal { isLiquidateAccessControlRevoked = true; emit RevokeLiquidateAccessControl(); } /// @notice The ```PauseLiquidate``` event is emitted when liquidate is paused or unpaused /// @param isPaused The new paused state event PauseLiquidate(bool isPaused); function _pauseLiquidate(bool _isPaused) internal { isLiquidatePaused = _isPaused; emit PauseLiquidate(_isPaused); } /// @notice The ```PauseInterest``` event is emitted when interest is paused or unpaused /// @param isPaused The new paused state event PauseInterest(bool isPaused); function _pauseInterest(bool _isPaused) internal { isInterestPaused = _isPaused; emit PauseInterest(_isPaused); } /// @notice The ```SetCircuitBreaker``` event is emitted when the circuit breaker address is set /// @param oldCircuitBreaker The old circuit breaker address /// @param newCircuitBreaker The new circuit breaker address event SetCircuitBreaker(address oldCircuitBreaker, address newCircuitBreaker); /// @notice The ```_setCircuitBreaker``` function is called to set the circuit breaker address /// @param _newCircuitBreaker The new circuit breaker address function _setCircuitBreaker(address _newCircuitBreaker) internal { address oldCircuitBreaker = circuitBreakerAddress; circuitBreakerAddress = _newCircuitBreaker; emit SetCircuitBreaker(oldCircuitBreaker, _newCircuitBreaker); } /// @notice The ```setCircuitBreaker``` function is called to set the circuit breaker address /// @param _newCircuitBreaker The new circuit breaker address function setCircuitBreaker(address _newCircuitBreaker) external virtual { _requireTimelock(); _setCircuitBreaker(_newCircuitBreaker); } }
// SPDX-License-Identifier: ISC pragma solidity ^0.8.21; interface IRateCalculatorV2 { function name() external view returns (string memory); function version() external view returns (uint256, uint256, uint256); function getNewRate( uint256 _deltaTime, uint256 _utilization, uint64 _maxInterest ) external view returns (uint64 _newRatePerSec, uint64 _newMaxInterest); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/ERC20.sol) pragma solidity ^0.8.0; import "./IERC20.sol"; import "./extensions/IERC20Metadata.sol"; import "../../utils/Context.sol"; /** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our guide * https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How * to implement supply mechanisms]. * * The default value of {decimals} is 18. To change this, you should override * this function so it returns a different value. * * We have followed general OpenZeppelin Contracts guidelines: functions revert * instead returning `false` on failure. This behavior is nonetheless * conventional and does not conflict with the expectations of ERC20 * applications. * * Additionally, an {Approval} event is emitted on calls to {transferFrom}. * This allows applications to reconstruct the allowance for all accounts just * by listening to said events. Other implementations of the EIP may not emit * these events, as it isn't required by the specification. * * Finally, the non-standard {decreaseAllowance} and {increaseAllowance} * functions have been added to mitigate the well-known issues around setting * allowances. See {IERC20-approve}. */ contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {name} and {symbol}. * * All two of these values are immutable: they can only be set once during * construction. */ constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; } /** * @dev Returns the name of the token. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev Returns the symbol of the token, usually a shorter version of the * name. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev Returns the number of decimals used to get its user representation. * For example, if `decimals` equals `2`, a balance of `505` tokens should * be displayed to a user as `5.05` (`505 / 10 ** 2`). * * Tokens usually opt for a value of 18, imitating the relationship between * Ether and Wei. This is the default value returned by this function, unless * it's overridden. * * NOTE: This information is only used for _display_ purposes: it in * no way affects any of the arithmetic of the contract, including * {IERC20-balanceOf} and {IERC20-transfer}. */ function decimals() public view virtual override returns (uint8) { return 18; } /** * @dev See {IERC20-totalSupply}. */ function totalSupply() public view virtual override returns (uint256) { return _totalSupply; } /** * @dev See {IERC20-balanceOf}. */ function balanceOf(address account) public view virtual override returns (uint256) { return _balances[account]; } /** * @dev See {IERC20-transfer}. * * Requirements: * * - `to` cannot be the zero address. * - the caller must have a balance of at least `amount`. */ function transfer(address to, uint256 amount) public virtual override returns (bool) { address owner = _msgSender(); _transfer(owner, to, amount); return true; } /** * @dev See {IERC20-allowance}. */ function allowance(address owner, address spender) public view virtual override returns (uint256) { return _allowances[owner][spender]; } /** * @dev See {IERC20-approve}. * * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on * `transferFrom`. This is semantically equivalent to an infinite approval. * * Requirements: * * - `spender` cannot be the zero address. */ function approve(address spender, uint256 amount) public virtual override returns (bool) { address owner = _msgSender(); _approve(owner, spender, amount); return true; } /** * @dev See {IERC20-transferFrom}. * * Emits an {Approval} event indicating the updated allowance. This is not * required by the EIP. See the note at the beginning of {ERC20}. * * NOTE: Does not update the allowance if the current allowance * is the maximum `uint256`. * * Requirements: * * - `from` and `to` cannot be the zero address. * - `from` must have a balance of at least `amount`. * - the caller must have allowance for ``from``'s tokens of at least * `amount`. */ function transferFrom(address from, address to, uint256 amount) public virtual override returns (bool) { address spender = _msgSender(); _spendAllowance(from, spender, amount); _transfer(from, to, amount); return true; } /** * @dev Atomically increases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. */ function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { address owner = _msgSender(); _approve(owner, spender, allowance(owner, spender) + addedValue); return true; } /** * @dev Atomically decreases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. * - `spender` must have allowance for the caller of at least * `subtractedValue`. */ function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { address owner = _msgSender(); uint256 currentAllowance = allowance(owner, spender); require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero"); unchecked { _approve(owner, spender, currentAllowance - subtractedValue); } return true; } /** * @dev Moves `amount` of tokens from `from` to `to`. * * This internal function is equivalent to {transfer}, and can be used to * e.g. implement automatic token fees, slashing mechanisms, etc. * * Emits a {Transfer} event. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `from` must have a balance of at least `amount`. */ function _transfer(address from, address to, uint256 amount) internal virtual { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); _beforeTokenTransfer(from, to, amount); uint256 fromBalance = _balances[from]; require(fromBalance >= amount, "ERC20: transfer amount exceeds balance"); unchecked { _balances[from] = fromBalance - amount; // Overflow not possible: the sum of all balances is capped by totalSupply, and the sum is preserved by // decrementing then incrementing. _balances[to] += amount; } emit Transfer(from, to, amount); _afterTokenTransfer(from, to, amount); } /** @dev Creates `amount` tokens and assigns them to `account`, increasing * the total supply. * * Emits a {Transfer} event with `from` set to the zero address. * * Requirements: * * - `account` cannot be the zero address. */ function _mint(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: mint to the zero address"); _beforeTokenTransfer(address(0), account, amount); _totalSupply += amount; unchecked { // Overflow not possible: balance + amount is at most totalSupply + amount, which is checked above. _balances[account] += amount; } emit Transfer(address(0), account, amount); _afterTokenTransfer(address(0), account, amount); } /** * @dev Destroys `amount` tokens from `account`, reducing the * total supply. * * Emits a {Transfer} event with `to` set to the zero address. * * Requirements: * * - `account` cannot be the zero address. * - `account` must have at least `amount` tokens. */ function _burn(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: burn from the zero address"); _beforeTokenTransfer(account, address(0), amount); uint256 accountBalance = _balances[account]; require(accountBalance >= amount, "ERC20: burn amount exceeds balance"); unchecked { _balances[account] = accountBalance - amount; // Overflow not possible: amount <= accountBalance <= totalSupply. _totalSupply -= amount; } emit Transfer(account, address(0), amount); _afterTokenTransfer(account, address(0), amount); } /** * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens. * * This internal function is equivalent to `approve`, and can be used to * e.g. set automatic allowances for certain subsystems, etc. * * Emits an {Approval} event. * * Requirements: * * - `owner` cannot be the zero address. * - `spender` cannot be the zero address. */ function _approve(address owner, address spender, uint256 amount) internal virtual { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } /** * @dev Updates `owner` s allowance for `spender` based on spent `amount`. * * Does not update the allowance amount in case of infinite allowance. * Revert if not enough allowance is available. * * Might emit an {Approval} event. */ function _spendAllowance(address owner, address spender, uint256 amount) internal virtual { uint256 currentAllowance = allowance(owner, spender); if (currentAllowance != type(uint256).max) { require(currentAllowance >= amount, "ERC20: insufficient allowance"); unchecked { _approve(owner, spender, currentAllowance - amount); } } } /** * @dev Hook that is called before any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * will be transferred to `to`. * - when `from` is zero, `amount` tokens will be minted for `to`. * - when `to` is zero, `amount` of ``from``'s tokens will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual {} /** * @dev Hook that is called after any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * has been transferred to `to`. * - when `from` is zero, `amount` tokens have been minted for `to`. * - when `to` is zero, `amount` of ``from``'s tokens have been burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _afterTokenTransfer(address from, address to, uint256 amount) internal virtual {} }
// SPDX-License-Identifier: ISC pragma solidity ^0.8.21; struct VaultAccount { uint128 amount; // Total amount, analogous to market cap uint128 shares; // Total shares, analogous to shares outstanding } /// @title VaultAccount Library /// @author Drake Evans (Frax Finance) github.com/drakeevans, modified from work by @Boring_Crypto github.com/boring_crypto /// @notice Provides a library for use with the VaultAccount struct, provides convenient math implementations /// @dev Uses uint128 to save on storage library VaultAccountingLibrary { /// @notice Calculates the shares value in relationship to `amount` and `total` /// @dev Given an amount, return the appropriate number of shares function toShares(VaultAccount memory total, uint256 amount, bool roundUp) internal pure returns (uint256 shares) { if (total.amount == 0) { shares = amount; } else { shares = (amount * total.shares) / total.amount; if (roundUp && (shares * total.amount) / total.shares < amount) { shares = shares + 1; } } } /// @notice Calculates the amount value in relationship to `shares` and `total` /// @dev Given a number of shares, returns the appropriate amount function toAmount(VaultAccount memory total, uint256 shares, bool roundUp) internal pure returns (uint256 amount) { if (total.shares == 0) { amount = shares; } else { amount = (shares * total.amount) / total.shares; if (roundUp && (amount * total.shares) / total.amount < shares) { amount = amount + 1; } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable2Step.sol) pragma solidity ^0.8.0; import "./Ownable.sol"; /** * @dev Contract module which provides 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} and {acceptOwnership}. * * This module is used through inheritance. It will make available all functions * from parent (Ownable). */ abstract contract Ownable2Step is Ownable { address private _pendingOwner; event OwnershipTransferStarted(address indexed previousOwner, address indexed newOwner); /** * @dev Returns the address of the pending owner. */ function pendingOwner() public view virtual returns (address) { return _pendingOwner; } /** * @dev Starts the ownership transfer of the contract to a new account. Replaces the pending transfer if there is one. * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual override onlyOwner { _pendingOwner = newOwner; emit OwnershipTransferStarted(owner(), newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`) and deletes any pending owner. * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual override { delete _pendingOwner; super._transferOwnership(newOwner); } /** * @dev The new owner accepts the ownership transfer. */ function acceptOwnership() public virtual { address sender = _msgSender(); require(pendingOwner() == sender, "Ownable2Step: caller is not the new owner"); _transferOwnership(sender); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @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 Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _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. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby disabling 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); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol) pragma solidity ^0.8.0; import "../IERC20.sol"; /** * @dev Interface for the optional metadata functions from the ERC20 standard. * * _Available since v4.1._ */ interface IERC20Metadata is IERC20 { /** * @dev Returns the name of the token. */ function name() external view returns (string memory); /** * @dev Returns the symbol of the token. */ function symbol() external view returns (string memory); /** * @dev Returns the decimals places of the token. */ function decimals() external view returns (uint8); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `from` to `to` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom(address from, address to, uint256 amount) external returns (bool); }
// SPDX-License-Identifier: ISC pragma solidity ^0.8.21; import { IERC20 } from "@openzeppelin/contracts/interfaces/IERC20.sol"; import { SafeERC20 as OZSafeERC20 } from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; // solhint-disable avoid-low-level-calls // solhint-disable max-line-length /// @title SafeERC20 provides helper functions for safe transfers as well as safe metadata access /// @author Library originally written by @Boring_Crypto github.com/boring_crypto, modified by Drake Evans (Frax Finance) github.com/drakeevans /// @dev original: https://github.com/boringcrypto/BoringSolidity/blob/fed25c5d43cb7ce20764cd0b838e21a02ea162e9/contracts/libraries/BoringERC20.sol library SafeERC20 { bytes4 private constant SIG_SYMBOL = 0x95d89b41; // symbol() bytes4 private constant SIG_NAME = 0x06fdde03; // name() bytes4 private constant SIG_DECIMALS = 0x313ce567; // decimals() function returnDataToString(bytes memory data) internal pure returns (string memory) { if (data.length >= 64) { return abi.decode(data, (string)); } else if (data.length == 32) { uint8 i = 0; while (i < 32 && data[i] != 0) { i++; } bytes memory bytesArray = new bytes(i); for (i = 0; i < 32 && data[i] != 0; i++) { bytesArray[i] = data[i]; } return string(bytesArray); } else { return "???"; } } /// @notice Provides a safe ERC20.symbol version which returns '???' as fallback string. /// @param token The address of the ERC-20 token contract. /// @return (string) Token symbol. function safeSymbol(IERC20 token) internal view returns (string memory) { (bool success, bytes memory data) = address(token).staticcall(abi.encodeWithSelector(SIG_SYMBOL)); return success ? returnDataToString(data) : "???"; } /// @notice Provides a safe ERC20.name version which returns '???' as fallback string. /// @param token The address of the ERC-20 token contract. /// @return (string) Token name. function safeName(IERC20 token) internal view returns (string memory) { (bool success, bytes memory data) = address(token).staticcall(abi.encodeWithSelector(SIG_NAME)); return success ? returnDataToString(data) : "???"; } /// @notice Provides a safe ERC20.decimals version which returns '18' as fallback value. /// @param token The address of the ERC-20 token contract. /// @return (uint8) Token decimals. function safeDecimals(IERC20 token) internal view returns (uint8) { (bool success, bytes memory data) = address(token).staticcall(abi.encodeWithSelector(SIG_DECIMALS)); return success && data.length == 32 ? abi.decode(data, (uint8)) : 18; } function safeTransfer(IERC20 token, address to, uint256 value) internal { OZSafeERC20.safeTransfer(token, to, value); } function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal { OZSafeERC20.safeTransferFrom(token, from, to, value); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.3) (token/ERC20/utils/SafeERC20.sol) pragma solidity ^0.8.0; import "../IERC20.sol"; import "../extensions/IERC20Permit.sol"; import "../../../utils/Address.sol"; /** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ library SafeERC20 { using Address for address; /** * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value, * non-reverting calls are assumed to be successful. */ function safeTransfer(IERC20 token, address to, uint256 value) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } /** * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful. */ function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); } /** * @dev Deprecated. This function has issues similar to the ones found in * {IERC20-approve}, and its usage is discouraged. * * Whenever possible, use {safeIncreaseAllowance} and * {safeDecreaseAllowance} instead. */ function safeApprove(IERC20 token, address spender, uint256 value) internal { // safeApprove should only be called when setting an initial allowance, // or when resetting it to zero. To increase and decrease it, use // 'safeIncreaseAllowance' and 'safeDecreaseAllowance' require( (value == 0) || (token.allowance(address(this), spender) == 0), "SafeERC20: approve from non-zero to non-zero allowance" ); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); } /** * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value, * non-reverting calls are assumed to be successful. */ function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal { uint256 oldAllowance = token.allowance(address(this), spender); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance + value)); } /** * @dev Decrease the calling contract's allowance toward `spender` by `value`. If `token` returns no value, * non-reverting calls are assumed to be successful. */ function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal { unchecked { uint256 oldAllowance = token.allowance(address(this), spender); require(oldAllowance >= value, "SafeERC20: decreased allowance below zero"); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance - value)); } } /** * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value, * non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval * to be set to zero before setting it to a non-zero value, such as USDT. */ function forceApprove(IERC20 token, address spender, uint256 value) internal { bytes memory approvalCall = abi.encodeWithSelector(token.approve.selector, spender, value); if (!_callOptionalReturnBool(token, approvalCall)) { _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, 0)); _callOptionalReturn(token, approvalCall); } } /** * @dev Use a ERC-2612 signature to set the `owner` approval toward `spender` on `token`. * Revert on invalid signature. */ function safePermit( IERC20Permit token, address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) internal { uint256 nonceBefore = token.nonces(owner); token.permit(owner, spender, value, deadline, v, r, s); uint256 nonceAfter = token.nonces(owner); require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed"); } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). */ function _callOptionalReturn(IERC20 token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We use {Address-functionCall} to perform this call, which verifies that // the target address contains contract code and also asserts for success in the low-level call. bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed"); require(returndata.length == 0 || abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). * * This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead. */ function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We cannot use {Address-functionCall} here since this should return false // and not revert is the subcall reverts. (bool success, bytes memory returndata) = address(token).call(data); return success && (returndata.length == 0 || abi.decode(returndata, (bool))) && Address.isContract(address(token)); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/extensions/IERC20Permit.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612]. * * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't * need to send a transaction, and thus is not required to hold Ether at all. */ interface IERC20Permit { /** * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens, * given ``owner``'s signed approval. * * IMPORTANT: The same issues {IERC20-approve} has related to transaction * ordering also apply here. * * Emits an {Approval} event. * * Requirements: * * - `spender` cannot be the zero address. * - `deadline` must be a timestamp in the future. * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner` * over the EIP712-formatted function arguments. * - the signature must use ``owner``'s current nonce (see {nonces}). * * For more information on the signature format, see the * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP * section]. */ function permit( address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) external; /** * @dev Returns the current nonce for `owner`. This value must be * included whenever a signature is generated for {permit}. * * Every successful call to {permit} increases ``owner``'s nonce by one. This * prevents a signature from being used multiple times. */ function nonces(address owner) external view returns (uint256); /** * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}. */ // solhint-disable-next-line func-name-mixedcase function DOMAIN_SEPARATOR() external view returns (bytes32); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library Address { /** * @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 * * Furthermore, `isContract` will also return true if the target contract within * the same transaction is already scheduled for destruction by `SELFDESTRUCT`, * which only has an effect at the end of a transaction. * ==== * * [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://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.8.0/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 functionCallWithValue(target, data, 0, "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"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResultFromTarget(target, 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) { (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @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, string memory errorMessage ) internal returns (bytes memory) { (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract. * * _Available since v4.8._ */ function verifyCallResultFromTarget( address target, bool success, bytes memory returndata, string memory errorMessage ) internal view returns (bytes memory) { if (success) { if (returndata.length == 0) { // only check isContract if the call was successful and the return data is empty // otherwise we already know that it was a contract require(isContract(target), "Address: call to non-contract"); } return returndata; } else { _revert(returndata, errorMessage); } } /** * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason or 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 { _revert(returndata, errorMessage); } } function _revert(bytes memory returndata, string memory errorMessage) private pure { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (interfaces/IERC20.sol) pragma solidity ^0.8.0; import "../token/ERC20/IERC20.sol";
{ "viaIR": true, "optimizer": { "enabled": true, "runs": 1660 }, "evmVersion": "paris", "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "abi" ] } }, "metadata": { "useLiteralContent": true } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"bytes","name":"_configData","type":"bytes"},{"internalType":"bytes","name":"_immutables","type":"bytes"},{"internalType":"bytes","name":"_customConfigData","type":"bytes"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"AccessControlRevoked","type":"error"},{"inputs":[],"name":"BadProtocolFee","type":"error"},{"inputs":[],"name":"BadSwapper","type":"error"},{"inputs":[],"name":"BorrowerSolvent","type":"error"},{"inputs":[],"name":"ExceedsBorrowLimit","type":"error"},{"inputs":[],"name":"ExceedsDepositLimit","type":"error"},{"inputs":[],"name":"ExceedsMaxOracleDeviation","type":"error"},{"inputs":[{"internalType":"uint256","name":"_borrow","type":"uint256"},{"internalType":"uint256","name":"_collateral","type":"uint256"},{"internalType":"uint256","name":"_exchangeRate","type":"uint256"}],"name":"Insolvent","type":"error"},{"inputs":[{"internalType":"uint256","name":"_assets","type":"uint256"},{"internalType":"uint256","name":"_request","type":"uint256"}],"name":"InsufficientAssetsInContract","type":"error"},{"inputs":[],"name":"InterestPaused","type":"error"},{"inputs":[],"name":"InvalidApproveBorrowDelegation","type":"error"},{"inputs":[],"name":"InvalidBorrower","type":"error"},{"inputs":[],"name":"InvalidDelegator","type":"error"},{"inputs":[],"name":"InvalidOnBehalfOf","type":"error"},{"inputs":[{"internalType":"address","name":"_expected","type":"address"},{"internalType":"address","name":"_actual","type":"address"}],"name":"InvalidPath","type":"error"},{"inputs":[],"name":"InvalidReceiver","type":"error"},{"inputs":[],"name":"LiquidatePaused","type":"error"},{"inputs":[],"name":"OnlyPendingTimelock","type":"error"},{"inputs":[],"name":"OnlyProtocolOrOwner","type":"error"},{"inputs":[],"name":"OnlyTimelock","type":"error"},{"inputs":[],"name":"OnlyTimelockOrOwner","type":"error"},{"inputs":[{"internalType":"uint256","name":"_blockTimestamp","type":"uint256"},{"internalType":"uint256","name":"_deadline","type":"uint256"}],"name":"PastDeadline","type":"error"},{"inputs":[],"name":"RepayPaused","type":"error"},{"inputs":[],"name":"SetterRevoked","type":"error"},{"inputs":[{"internalType":"uint256","name":"_minOut","type":"uint256"},{"internalType":"uint256","name":"_actual","type":"uint256"}],"name":"SlippageTooHigh","type":"error"},{"inputs":[],"name":"WithdrawPaused","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":true,"internalType":"address","name":"borrower","type":"address"},{"indexed":false,"internalType":"uint256","name":"collateralAmount","type":"uint256"}],"name":"AddCollateral","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"interestEarned","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"rate","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"feesAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"feesShare","type":"uint256"}],"name":"AddInterest","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_borrower","type":"address"},{"indexed":true,"internalType":"address","name":"_receiver","type":"address"},{"indexed":false,"internalType":"uint256","name":"_borrowAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_sharesAdded","type":"uint256"}],"name":"BorrowAsset","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint32","name":"newFee","type":"uint32"}],"name":"ChangeFee","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"caller","type":"address"},{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":false,"internalType":"uint256","name":"assets","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"shares","type":"uint256"}],"name":"Deposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_borrower","type":"address"},{"indexed":false,"internalType":"uint256","name":"_collateralForLiquidator","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_sharesToLiquidate","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_amountLiquidatorToRepay","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_feesAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_sharesToAdjust","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_amountToAdjust","type":"uint256"}],"name":"Liquidate","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferStarted","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":"bool","name":"isPaused","type":"bool"}],"name":"PauseInterest","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"isPaused","type":"bool"}],"name":"PauseLiquidate","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"isPaused","type":"bool"}],"name":"PauseRepay","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"isPaused","type":"bool"}],"name":"PauseWithdraw","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_sender","type":"address"},{"indexed":false,"internalType":"uint256","name":"_collateralAmount","type":"uint256"},{"indexed":true,"internalType":"address","name":"_receiver","type":"address"},{"indexed":true,"internalType":"address","name":"_borrower","type":"address"}],"name":"RemoveCollateral","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"payer","type":"address"},{"indexed":true,"internalType":"address","name":"borrower","type":"address"},{"indexed":false,"internalType":"uint256","name":"amountToRepay","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"shares","type":"uint256"}],"name":"RepayAsset","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_borrower","type":"address"},{"indexed":false,"internalType":"address","name":"_swapperAddress","type":"address"},{"indexed":false,"internalType":"uint256","name":"_collateralToSwap","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_amountAssetOut","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_sharesRepaid","type":"uint256"}],"name":"RepayAssetWithCollateral","type":"event"},{"anonymous":false,"inputs":[],"name":"RevokeLiquidateAccessControl","type":"event"},{"anonymous":false,"inputs":[],"name":"RevokeMaxLTVSetter","type":"event"},{"anonymous":false,"inputs":[],"name":"RevokeRepayAccessControl","type":"event"},{"anonymous":false,"inputs":[],"name":"RevokeWithdrawAccessControl","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"limit","type":"uint256"}],"name":"SetBorrowLimit","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"oldCircuitBreaker","type":"address"},{"indexed":false,"internalType":"address","name":"newCircuitBreaker","type":"address"}],"name":"SetCircuitBreaker","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"limit","type":"uint256"}],"name":"SetDepositLimit","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"oldCleanLiquidationFee","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"oldDirtyLiquidationFee","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"oldProtocolLiquidationFee","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newCleanLiquidationFee","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newDirtyLiquidationFee","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newProtocolLiquidationFee","type":"uint256"}],"name":"SetLiquidationFees","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"oldMaxLTV","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newMaxLTV","type":"uint256"}],"name":"SetMaxLTV","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"oldOracle","type":"address"},{"indexed":false,"internalType":"uint32","name":"oldMaxOracleDeviation","type":"uint32"},{"indexed":false,"internalType":"address","name":"newOracle","type":"address"},{"indexed":false,"internalType":"uint32","name":"newMaxOracleDeviation","type":"uint32"}],"name":"SetOracleInfo","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"oldRateContract","type":"address"},{"indexed":false,"internalType":"address","name":"newRateContract","type":"address"}],"name":"SetRateContract","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"swapper","type":"address"},{"indexed":false,"internalType":"bool","name":"approval","type":"bool"}],"name":"SetSwapper","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_delegator","type":"address"},{"indexed":false,"internalType":"bool","name":"_enabled","type":"bool"}],"name":"SetWhitelistedDelegators","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousTimelock","type":"address"},{"indexed":true,"internalType":"address","name":"newTimelock","type":"address"}],"name":"TimelockTransferStarted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousTimelock","type":"address"},{"indexed":true,"internalType":"address","name":"newTimelock","type":"address"}],"name":"TimelockTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"lowExchangeRate","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"highExchangeRate","type":"uint256"}],"name":"UpdateExchangeRate","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"oldRatePerSec","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"oldFullUtilizationRate","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newRatePerSec","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newFullUtilizationRate","type":"uint256"}],"name":"UpdateRate","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_fromUser","type":"address"},{"indexed":true,"internalType":"address","name":"_toUser","type":"address"},{"indexed":false,"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"UserBorrowAllowanceDelegated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"oracle","type":"address"}],"name":"WarnOracleData","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"caller","type":"address"},{"indexed":true,"internalType":"address","name":"receiver","type":"address"},{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":false,"internalType":"uint256","name":"assets","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"shares","type":"uint256"}],"name":"Withdraw","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint128","name":"shares","type":"uint128"},{"indexed":false,"internalType":"address","name":"recipient","type":"address"},{"indexed":false,"internalType":"uint256","name":"amountToTransfer","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"collateralAmount","type":"uint256"}],"name":"WithdrawFees","type":"event"},{"inputs":[],"name":"DEPLOYER_ADDRESS","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"acceptOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"acceptTransferTimelock","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_collateralAmount","type":"uint256"},{"internalType":"address","name":"_borrower","type":"address"}],"name":"addCollateral","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_returnAccounting","type":"bool"}],"name":"addInterest","outputs":[{"internalType":"uint256","name":"_interestEarned","type":"uint256"},{"internalType":"uint256","name":"_feesAmount","type":"uint256"},{"internalType":"uint256","name":"_feesShare","type":"uint256"},{"components":[{"internalType":"uint32","name":"lastBlock","type":"uint32"},{"internalType":"uint32","name":"feeToProtocolRate","type":"uint32"},{"internalType":"uint64","name":"lastTimestamp","type":"uint64"},{"internalType":"uint64","name":"ratePerSec","type":"uint64"},{"internalType":"uint64","name":"fullUtilizationRate","type":"uint64"}],"internalType":"struct SturdyPairCore.CurrentRateInfo","name":"_currentRateInfo","type":"tuple"},{"components":[{"internalType":"uint128","name":"amount","type":"uint128"},{"internalType":"uint128","name":"shares","type":"uint128"}],"internalType":"struct VaultAccount","name":"_totalAsset","type":"tuple"},{"components":[{"internalType":"uint128","name":"amount","type":"uint128"},{"internalType":"uint128","name":"shares","type":"uint128"}],"internalType":"struct VaultAccount","name":"_totalBorrow","type":"tuple"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_delegatee","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"approveBorrowDelegation","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"asset","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_borrowAmount","type":"uint256"},{"internalType":"uint256","name":"_collateralAmount","type":"uint256"},{"internalType":"address","name":"_receiver","type":"address"}],"name":"borrowAsset","outputs":[{"internalType":"uint256","name":"_shares","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_borrowAmount","type":"uint256"},{"internalType":"address","name":"_onBehalfOf","type":"address"}],"name":"borrowAssetOnBehalfOf","outputs":[{"internalType":"uint256","name":"_shares","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"borrowLimit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint32","name":"_newFee","type":"uint32"}],"name":"changeFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"circuitBreakerAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"cleanLiquidationFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"collateralContract","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_shares","type":"uint256"}],"name":"convertToAssets","outputs":[{"internalType":"uint256","name":"_assets","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_assets","type":"uint256"}],"name":"convertToShares","outputs":[{"internalType":"uint256","name":"_shares","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"currentRateInfo","outputs":[{"internalType":"uint32","name":"lastBlock","type":"uint32"},{"internalType":"uint32","name":"feeToProtocolRate","type":"uint32"},{"internalType":"uint64","name":"lastTimestamp","type":"uint64"},{"internalType":"uint64","name":"ratePerSec","type":"uint64"},{"internalType":"uint64","name":"fullUtilizationRate","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"address","name":"_receiver","type":"address"}],"name":"deposit","outputs":[{"internalType":"uint256","name":"_sharesReceived","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"depositLimit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"dirtyLiquidationFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"exchangeRateInfo","outputs":[{"internalType":"address","name":"oracle","type":"address"},{"internalType":"uint32","name":"maxOracleDeviation","type":"uint32"},{"internalType":"uint184","name":"lastTimestamp","type":"uint184"},{"internalType":"uint256","name":"lowExchangeRate","type":"uint256"},{"internalType":"uint256","name":"highExchangeRate","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getConstants","outputs":[{"internalType":"uint256","name":"_LTV_PRECISION","type":"uint256"},{"internalType":"uint256","name":"_LIQ_PRECISION","type":"uint256"},{"internalType":"uint256","name":"_UTIL_PREC","type":"uint256"},{"internalType":"uint256","name":"_FEE_PRECISION","type":"uint256"},{"internalType":"uint256","name":"_EXCHANGE_PRECISION","type":"uint256"},{"internalType":"uint256","name":"_DEVIATION_PRECISION","type":"uint256"},{"internalType":"uint256","name":"_RATE_PRECISION","type":"uint256"},{"internalType":"uint256","name":"_MAX_PROTOCOL_FEE","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"getPairAccounting","outputs":[{"internalType":"uint128","name":"_totalAssetAmount","type":"uint128"},{"internalType":"uint128","name":"_totalAssetShares","type":"uint128"},{"internalType":"uint128","name":"_totalBorrowAmount","type":"uint128"},{"internalType":"uint128","name":"_totalBorrowShares","type":"uint128"},{"internalType":"uint256","name":"_totalCollateral","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"getUserSnapshot","outputs":[{"internalType":"uint256","name":"_userAssetShares","type":"uint256"},{"internalType":"uint256","name":"_userBorrowShares","type":"uint256"},{"internalType":"uint256","name":"_userCollateralBalance","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"isInterestPaused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isLiquidateAccessControlRevoked","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isLiquidatePaused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isMaxLTVSetterRevoked","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isRepayAccessControlRevoked","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isRepayPaused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isWithdrawAccessControlRevoked","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isWithdrawPaused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint128","name":"_sharesToLiquidate","type":"uint128"},{"internalType":"uint256","name":"_deadline","type":"uint256"},{"internalType":"address","name":"_borrower","type":"address"}],"name":"liquidate","outputs":[{"internalType":"uint256","name":"_collateralForLiquidator","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_receiver","type":"address"}],"name":"maxDeposit","outputs":[{"internalType":"uint256","name":"_maxAssets","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxLTV","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_receiver","type":"address"}],"name":"maxMint","outputs":[{"internalType":"uint256","name":"_maxShares","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"}],"name":"maxRedeem","outputs":[{"internalType":"uint256","name":"_maxShares","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"}],"name":"maxWithdraw","outputs":[{"internalType":"uint256","name":"_maxAssets","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_shares","type":"uint256"},{"internalType":"address","name":"_receiver","type":"address"}],"name":"mint","outputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"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":"pauseBorrow","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"pauseDeposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_isPaused","type":"bool"}],"name":"pauseInterest","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_isPaused","type":"bool"}],"name":"pauseLiquidate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_isPaused","type":"bool"}],"name":"pauseRepay","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_isPaused","type":"bool"}],"name":"pauseWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"pendingOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pendingTimelockAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"previewAddInterest","outputs":[{"internalType":"uint256","name":"_interestEarned","type":"uint256"},{"internalType":"uint256","name":"_feesAmount","type":"uint256"},{"internalType":"uint256","name":"_feesShare","type":"uint256"},{"components":[{"internalType":"uint32","name":"lastBlock","type":"uint32"},{"internalType":"uint32","name":"feeToProtocolRate","type":"uint32"},{"internalType":"uint64","name":"lastTimestamp","type":"uint64"},{"internalType":"uint64","name":"ratePerSec","type":"uint64"},{"internalType":"uint64","name":"fullUtilizationRate","type":"uint64"}],"internalType":"struct SturdyPairCore.CurrentRateInfo","name":"_newCurrentRateInfo","type":"tuple"},{"components":[{"internalType":"uint128","name":"amount","type":"uint128"},{"internalType":"uint128","name":"shares","type":"uint128"}],"internalType":"struct VaultAccount","name":"_totalAsset","type":"tuple"},{"components":[{"internalType":"uint128","name":"amount","type":"uint128"},{"internalType":"uint128","name":"shares","type":"uint128"}],"internalType":"struct VaultAccount","name":"_totalBorrow","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_assets","type":"uint256"}],"name":"previewDeposit","outputs":[{"internalType":"uint256","name":"_sharesReceived","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_shares","type":"uint256"}],"name":"previewMint","outputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_shares","type":"uint256"}],"name":"previewRedeem","outputs":[{"internalType":"uint256","name":"_assets","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"previewWithdraw","outputs":[{"internalType":"uint256","name":"_sharesToBurn","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pricePerShare","outputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"protocolLiquidationFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rateContract","outputs":[{"internalType":"contract IRateCalculatorV2","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_shares","type":"uint256"},{"internalType":"address","name":"_receiver","type":"address"},{"internalType":"address","name":"_owner","type":"address"}],"name":"redeem","outputs":[{"internalType":"uint256","name":"_amountToReturn","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_collateralAmount","type":"uint256"},{"internalType":"address","name":"_receiver","type":"address"}],"name":"removeCollateral","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_collateralAmount","type":"uint256"},{"internalType":"address","name":"_receiver","type":"address"},{"internalType":"address","name":"_borrower","type":"address"}],"name":"removeCollateralFrom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceTimelock","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_shares","type":"uint256"},{"internalType":"address","name":"_borrower","type":"address"}],"name":"repayAsset","outputs":[{"internalType":"uint256","name":"_amountToRepay","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_swapperAddress","type":"address"},{"internalType":"uint256","name":"_collateralToSwap","type":"uint256"},{"internalType":"uint256","name":"_amountAssetOutMin","type":"uint256"},{"internalType":"address[]","name":"_path","type":"address[]"}],"name":"repayAssetWithCollateral","outputs":[{"internalType":"uint256","name":"_amountAssetOut","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"revokeLiquidateAccessControl","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"revokeMaxLTVSetter","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"revokeRepayAccessControl","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"revokeWithdrawAccessControl","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_limit","type":"uint256"}],"name":"setBorrowLimit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_newCircuitBreaker","type":"address"}],"name":"setCircuitBreaker","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_limit","type":"uint256"}],"name":"setDepositLimit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newCleanLiquidationFee","type":"uint256"},{"internalType":"uint256","name":"_newDirtyLiquidationFee","type":"uint256"},{"internalType":"uint256","name":"_newProtocolLiquidationFee","type":"uint256"}],"name":"setLiquidationFees","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newMaxLTV","type":"uint256"}],"name":"setMaxLTV","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_newOracle","type":"address"},{"internalType":"uint32","name":"_newMaxOracleDeviation","type":"uint32"}],"name":"setOracle","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_newRateContract","type":"address"}],"name":"setRateContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_swapper","type":"address"},{"internalType":"bool","name":"_approval","type":"bool"}],"name":"setSwapper","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_delegator","type":"address"},{"internalType":"bool","name":"_enabled","type":"bool"}],"name":"setWhitelistedDelegators","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"swappers","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"timelockAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_shares","type":"uint256"},{"internalType":"bool","name":"_roundUp","type":"bool"},{"internalType":"bool","name":"_previewInterest","type":"bool"}],"name":"toAssetAmount","outputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"bool","name":"_roundUp","type":"bool"},{"internalType":"bool","name":"_previewInterest","type":"bool"}],"name":"toAssetShares","outputs":[{"internalType":"uint256","name":"_shares","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_shares","type":"uint256"},{"internalType":"bool","name":"_roundUp","type":"bool"},{"internalType":"bool","name":"_previewInterest","type":"bool"}],"name":"toBorrowAmount","outputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"bool","name":"_roundUp","type":"bool"},{"internalType":"bool","name":"_previewInterest","type":"bool"}],"name":"toBorrowShares","outputs":[{"internalType":"uint256","name":"_shares","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalAsset","outputs":[{"internalType":"uint128","name":"amount","type":"uint128"},{"internalType":"uint128","name":"shares","type":"uint128"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalAssets","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalBorrow","outputs":[{"internalType":"uint128","name":"amount","type":"uint128"},{"internalType":"uint128","name":"shares","type":"uint128"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalCollateral","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_newTimelock","type":"address"}],"name":"transferTimelock","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"updateExchangeRate","outputs":[{"internalType":"bool","name":"_isBorrowAllowed","type":"bool"},{"internalType":"uint256","name":"_lowExchangeRate","type":"uint256"},{"internalType":"uint256","name":"_highExchangeRate","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"userBorrowAllowances","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"userBorrowShares","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"userCollateralBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"version","outputs":[{"internalType":"uint256","name":"_major","type":"uint256"},{"internalType":"uint256","name":"_minor","type":"uint256"},{"internalType":"uint256","name":"_patch","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"whitelistedDelegators","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"address","name":"_receiver","type":"address"},{"internalType":"address","name":"_owner","type":"address"}],"name":"withdraw","outputs":[{"internalType":"uint256","name":"_sharesToBurn","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint128","name":"_shares","type":"uint128"},{"internalType":"address","name":"_recipient","type":"address"}],"name":"withdrawFees","outputs":[{"internalType":"uint256","name":"_amountToTransfer","type":"uint256"}],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
6101008060405234620008bf57620071448038038091620000218285620012f5565b83398101606082820312620008bf5781516001600160401b038111620008bf57816200004f91840162001319565b60208301519092906001600160401b038111620008bf57826200007491830162001319565b60408201519092906001600160401b038111620008bf5762000097920162001319565b60405192620000a684620012d9565b6000845260405192620000b984620012d9565b60008452600180546001600160a01b03191633908117909155620000dd90620013fc565b600019600555600019600655606081805181010312620008bf576200017b62000109602083016200138f565b916200012660606200011e604084016200138f565b92016200138f565b6001546001600160a01b0391821691829082167f31b6c5a04b069b6ec1b3cef44c4e7c1eadd721349cda9823d0b1877b3551cdc6600080a36001600160a01b031916176001556001600160a01b0316620013fc565b33608052600480546001600160a01b0319166001600160a01b039290921691909117905583516001600160401b03811162000e9b57600b54600181811c9116801562001296575b602082101462000f9c57601f811162001230575b506020601f8211600114620011c0578192939495600092620011b4575b50508160011b916000199060031b1c191617600b555b82516001600160401b03811162000e9b57600c54600181811c91168015620011a9575b602082101462000f9c57601f81116200113f575b506020601f8211600114620010b55781929394600092620010a9575b50508160011b916000199060031b1c191617600c555b6001600d5561012081805181010312620008bf5762000294602082016200138f565b620002a2604083016200138f565b91620002b1606082016200138f565b60808201519063ffffffff82168203620008bf57620002d360a084016200138f565b91620002e260c08501620013a4565b60e0850151610100860151610120909601516001600160a01b0397881660a0529690971660c0526016544260001981011162000814574360001981011162000814574260001990810160401b6fffffffffffffffff000000000000000016600160801b600160c01b0390921660c09390931b6001600160c01b031990811693909317919091174390910163ffffffff1617601655601780549091166001600160a01b039384161760a09290921b63ffffffff60a01b16919091179055601280546001600160a01b03191692909116919091179055600f819055801562015f90808302839004141715620008145762015f90620186a0910204601055601155600e558051810190606081830312620008bf5760208101516001600160401b038111620008bf576200041b9060208085019184010162001319565b604082015190926001600160401b038211620008bf576060916020806200044793019185010162001319565b9101519060ff82168203620008bf5782516001600160401b03811162000e9b57601454600181811c911680156200109e575b602082101462000f9c57601f811162001038575b506020601f821160011462000fc9578192939460009262000fbd575b50508160011b916000199060031b1c1916176014555b8051906001600160401b03821162000e9b5760155490600182811c9216801562000fb2575b602083101462000f9c5781601f84931162000f3b575b50602090601f831160011462000ebd5760009262000eb1575b50508160011b916000199060031b1c1916176015555b60e052600060806040516200053e81620012a1565b82815282602082015282604082015282606082015201526040516200056381620012a1565b60165463ffffffff8116825263ffffffff8160201c16602083015260018060401b038160401c16604083015260018060401b038160801c16606083015260c01c60808201526040518061010081011060018060401b036101008301111762000e9b5761010081016040526000815260006020820152600060408201526000606082015260006080820152600060a08201526040516200060281620012bd565b600081526000602082015260c08201526040516200062081620012bd565b6000808252602082015260e082015260408201516001600160401b03164214158062000e8a575b62000b22575b8051620008e1575b50506040516200066581620012a1565b6017546001600160a01b038116825260a081901c63ffffffff1660208301526018546001600160b81b038116604084018190526019546060850152601a5460808501524214620008d95760405163bd9a548b60e01b8152906060826004816001600160a01b0387165afa908115620008cd576000809360009362000863575b5093604093929160008051602062007124833981519152956200082a575b60018060b81b03421691828689015284606089015283608089015260018060a01b0388511663ffffffff60a01b60208a015160a01b169160018060c01b031916171760175560018060b81b031916176018558160195580601a5582519182526020820152a15b6200077d6080820151606083015190620013b9565b80620186a00290620186a082040362000814576080620007a092015190620013db565b50604051615c8b9081620014798239608051818181610fa40152614538015260a051818181610c04015281816111ec0152818161129e015281816113860152818161166c015281816134250152613685015260c05181818161118d01528181611758015261559a015260e051816134890152f35b634e487b7160e01b600052601160045260246000fd5b7ffc131c36b7e444dacda44901fd43641dcdcfdc43fe9e2601b3c1dd87061db9e5602060018060a01b038951168751908152a162000702565b92505091506060813d606011620008c4575b816200088460609383620012f5565b81010312620008bf578051908115158203620008bf5760208101516040909101519092909160008051602062007124833981519152620006e4565b600080fd5b3d915062000875565b6040513d6000823e3d90fd5b505062000768565b6060810151917f2b5229f33f1d24d5baab718e1e25d0d86195a9b6d786c2c0868edfb21a460e256080808401519460a0850151957fc63977c8e2362a31182dc8e89a52252f9836922738e0abcfc0de6924972eafe58360018060401b0360608801511660018060401b03828901511660018060401b0360208b01511660018060401b0360408c01511691604051938452602084015260408301526060820152a160018060401b0360208701511660405192835260208301526040820152856060820152a16020828101516001600160401b03808216606085015260408086015180831660808088019190915242938416878401524363ffffffff168088529686015194811b600160801b600160c01b03169390921b6fffffffffffffffff00000000000000001693851b67ffffffff0000000016909517929092171760c093841b6001600160c01b0319161760165591830151805190820151831b6001600160801b03199081166001600160801b0392831617601b5560e090940151805192015190921b909216911617601c558062000a7c575b8062000655565b301562000add5762000a9181600a5462001450565b600a55306000526008602052604060002081815401905560405190815260007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60203093a33862000a75565b60405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606490fd5b6001815260405162000b3481620012bd565b601b546001600160801b038116825260801c602082015260c082015260405162000b5e81620012bd565b601c546001600160801b038116825260801c602082015260e0820152604082015162000b94906001600160401b031642620013b9565b60c0820151516001600160801b031662000e43576000905b60125460808501516040805163cd3181d560e01b81526004810185905260248101959095526001600160401b03909116604485015290839060649082906001600160a01b03165afa8015620008cd5760009260009162000ddb575b506001600160401b039081166040850152909116602083015260e082015151670de0b6b3a76400009162000c629162000c4d916001600160801b039190911690620013c7565b60208401516001600160401b031690620013c7565b04806060830152801515908162000db3575b508062000d88575b156200064d57606081015160e0820151805190916001600160801b039162000ca99183169083166200145e565b169052606081015160c0820151805190916001600160801b039162000cd39183169083166200145e565b16905263ffffffff6020830151168062000cef575b506200064d565b62000d2c620186a062000d0b62000d52936060860151620013c7565b046080840181905260c0840151602001516001600160801b031690620013c7565b60c083015151608084015162000d4b916001600160801b0316620013b9565b90620013db565b60a0820181905260c0820151602001805190916001600160801b039162000d7e9183169083166200145e565b1690523862000ce8565b50606081015160c0820151516001600160801b039162000dab9183169062001450565b111562000c7c565b60e0830151516001600160801b03925062000dd2919083169062001450565b11153862000c74565b9250506040823d60401162000e3a575b8162000dfa60409383620012f5565b81010312620008bf5762000c4d62000c62918362000e2f602062000e27670de0b6b3a764000097620013a4565b9201620013a4565b925093509162000c07565b3d915062000deb565b60e0820151516001600160801b0316620186a0808202048103620008145760c08301515162000e83916001600160801b0390911690620186a002620013db565b9062000bac565b5060ff60075460301c161562000647565b634e487b7160e01b600052604160045260246000fd5b01519050388062000513565b6015600090815293506000805160206200710483398151915291905b601f198416851062000f1f576001945083601f1981161062000f05575b505050811b0160155562000529565b015160001960f88460031b161c1916905538808062000ef6565b8181015183556020948501946001909301929091019062000ed9565b601560005290915060008051602062007104833981519152601f840160051c81016020851062000f94575b90849392915b601f830160051c8201811062000f84575050620004fa565b6000815585945060010162000f6c565b508062000f66565b634e487b7160e01b600052602260045260246000fd5b91607f1691620004e4565b015190503880620004a9565b601460005260206000209060005b601f19841681106200101f5750600193949583601f1981161062001005575b505050811b01601455620004bf565b015160001960f88460031b161c1916905538808062000ff6565b9091602060018192858a01518155019301910162000fd7565b60146000527fce6d7b5282bd9a3661ae061feed1dbda4e52ab073b1f9285be6e155d9c38d4ec601f830160051c81016020841062001096575b601f830160051c82018110620010895750506200048d565b6000815560010162001071565b508062001071565b90607f169062000479565b0151905038806200025c565b600c60009081527fdf6966c971051c3d54ec59162606531493a51404a002842f56009d7e5cf4a8c79190601f198416905b81811062001126575095836001959697106200110c575b505050811b01600c5562000272565b015160001960f88460031b161c19169055388080620010fd565b9192602060018192868b015181550194019201620010e6565b600c6000527fdf6966c971051c3d54ec59162606531493a51404a002842f56009d7e5cf4a8c7601f830160051c810191602084106200119e575b601f0160051c01905b81811062001191575062000240565b6000815560010162001182565b909150819062001179565b90607f16906200022c565b015190503880620001f3565b600b60005260206000209060005b601f198416811062001217575060019394959683601f19811610620011fd575b505050811b01600b5562000209565b015160001960f88460031b161c19169055388080620011ee565b9091602060018192858b015181550193019101620011ce565b600b6000527f0175b7a638427703f0dbe7bb9bbf987a2551717b34e79f33b5b1008d1fa01db9601f830160051c8101602084106200128e575b601f830160051c8201811062001281575050620001d6565b6000815560010162001269565b508062001269565b90607f1690620001c2565b60a081019081106001600160401b0382111762000e9b57604052565b604081019081106001600160401b0382111762000e9b57604052565b602081019081106001600160401b0382111762000e9b57604052565b601f909101601f19168101906001600160401b0382119082101762000e9b57604052565b919080601f84011215620008bf5782516001600160401b03811162000e9b57602090604051926200135483601f19601f8501160185620012f5565b818452828287010111620008bf5760005b8181106200137b57508260009394955001015290565b858101830151848201840152820162001365565b51906001600160a01b0382168203620008bf57565b51906001600160401b0382168203620008bf57565b919082039182116200081457565b818102929181159184041417156200081457565b8115620013e6570490565b634e487b7160e01b600052601260045260246000fd5b600380546001600160a01b0319908116909155600280549182166001600160a01b0393841690811790915591167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a3565b919082018092116200081457565b6001600160801b039182169082160191908211620008145756fe6080604052600436101561001257600080fd5b60003560e01c806301e1d11414613cdf57806302ce728f14613ca25780630475260e14613c4f57806306fdde0314613b9157806307a2d13a14613b6457806308a0c37514613add578063090f3f5014613ab6578063095ea7b314613a905780630a28a47714613a635780630c70661d14613a3d578063115a334c14613a1a57806311a2e4bc146139fc57806318160ddd146139db5780631bc23cf91461395e5780631c2591d3146139265780631c6c95971461388a57806323b872dd146137cc57806327c151dc146134ad578063313ce5671461346f57806334680fe51461344957806338d52e0f1461340557806339030864146133b857806339509351146133665780633d417d2d146132cc5780633e9139be1461327b5780633f2617cb146131f35780633f4ba83a14613058578063402d267d14612ffe5780634501409514612f945780634732428c14612f765780634929242714612f4f5780634ac8eb5f14612f315780634b4b418e14612eb05780634bc66f3214612e895780634c18a4fb14612dfe5780634c41799514612daf5780634cdad50614611a4d5780634cefcccb14612d705780634f8b4ae714612cdf5780634fd422df14612ca557806354fd4d5014612c7b57806359508a1014612b2057806367800b5f14612afa57806369026e8814612aaf5780636b96668f14612a335780636e553f65146129ab57806370a0823114612971578063715018a61461290d578063721b0a47146125a257806379ba5097146124ce5780637d37bdd7146124965780637ec4b571146124595780637ecefa6e146124025780638142dd53146122fb5780638285ef40146122c957806382beee89146122525780638456cb591461209d578063858f1e681461200f5780638cad7fbe14611fd05780638da5cb5b14611fa95780638f791f8b14611e5857806393f46f6414611e1b57806394bf804d14611d6857806395d14ca814611d1157806395d89b4114611c1057806399530b0614611b965780639a295e7314611b42578063a457c2d714611a83578063a9059cbb14611a52578063b3d7f6b914611a4d578063b460af94146119e1578063b5af3062146119a7578063b68d0a0914611940578063b7db54f51461191d578063ba08765214611873578063bbb096241461184d578063bdc8144b14611801578063c58e4df6146117dc578063c63d75b61461177c578063c6e1c7c914611738578063c6e6f59214610753578063ca2298fe146110cc578063cacf3b581461109d578063cadac4791461104c578063cdd72d5214610feb578063ce96cb7714610fc8578063d2a156e014610f84578063d41ddc9614610e87578063d905777e14610e64578063daf33f2a14610d66578063dd62ed3e14610d14578063e30c397814610ced578063e551d11d14610ccf578063e5f13b16146109b2578063e7a3317414610966578063e8596f721461091b578063e86242a81461089d578063eafecffa1461087f578063ebd462cb146107cd578063ecf70858146107af578063eee2421914610788578063ef8b30f714610753578063f211c3901461072d578063f2fde38b146106c3578063f384bd05146106a5578063f54fd600146105d3578063f6ccaad41461056d578063f9557ccb146105375763fbbbf94c146104cb57600080fd5b346105325760003660031901126105325760a060175476ffffffffffffffffffffffffffffffffffffffffffffff60185416601954601a549163ffffffff604051946001600160a01b0381168652861c166020850152604084015260608301526080820152f35b600080fd5b3461053257600036600319011261053257601b54604080516001600160801b038316815260809290921c602083015290f35b0390f35b3461053257600036600319011261053257610586615889565b6001600160a01b0319806000541660005560015490336001600160a01b0383167f31b6c5a04b069b6ec1b3cef44c4e7c1eadd721349cda9823d0b1877b3551cdc6600080a3163317600155005b34610532576040366003190112610532576105ec613d5a565b6024358015158061067a575b6106505733600052602080526001600160a01b03604060002092169182600052602052806040600020556040519081527f399f462d2df28f9d69d52cdcfd7e6ef0598b231d0b9baa75ae424e43195ffe8160203392a3005b60046040517fadc9170e000000000000000000000000000000000000000000000000000000008152fd5b50336000526020805260406000206001600160a01b03831660005260205260406000205415156105f8565b34610532576000366003190112610532576020600e54604051908152f35b34610532576020366003190112610532576106dc613d5a565b6106e4613eda565b6001600160a01b0380911690816001600160a01b03196003541617600355600254167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e22700600080a3005b3461053257600036600319011261053257602060ff60075460301c166040519015158152f35b346105325760203660031901126105325760206107806107716146ae565b50935050505060043590615b18565b604051908152f35b346105325760003660031901126105325760206001600160a01b0360125416604051908152f35b34610532576000366003190112610532576020600654604051908152f35b34610532576020366003190112610532576107e6613d9c565b8015610872576107f46144d2565b6007549060ff8260181c16610848577fc56dd3e14f5af3a74c61b7cdf855a3d8ab4401c78c0622a4d312de8a8f8736a29160209115159062ff00008260101b169062ff0000191617600755604051908152a1005b60046040517f1ada47b8000000000000000000000000000000000000000000000000000000008152fd5b61087a614572565b6107f4565b34610532576000366003190112610532576020601154604051908152f35b6040366003190112610532576108b1613d5a565b7ee87392aa4ff46a408dc81eaa7d09885b4ec4e0c3c6fbc3e7310b53f558176360206001600160a01b036108e3613dab565b936108ec613eda565b169283600052602182526109108160406000209060ff801983541691151516179055565b6040519015158152a2005b34610532576000366003190112610532576109346144d2565b60006005557fbf1ce7fb3a8e648b70ea830f99b52f7ea31554186d29763280751f42e77f6386602060405160008152a1005b34610532576020366003190112610532577fbf1ce7fb3a8e648b70ea830f99b52f7ea31554186d29763280751f42e77f638660206004356109a5614572565b80600555604051908152a1005b34610532576060366003190112610532576004356024356109d1613d86565b906109da61460d565b6001600160a01b038216908115610ca5576109f3614b01565b5050505050600554936001600160801b0394610a138287601c5416613f32565b11610c7b57610a20614dc8565b505015610c6a5781610a3792610c58575b50614454565b610a3f6142a9565b9284610a5981610a4d614283565b511682875116906145c9565b1685831690818110610c2f5750610a708186615aae565b9486610a7f85828451166147a6565b168152602096610ac08189840193610a9c828b16838751166147a6565b94828616905251166001600160801b03166001600160801b0319601c541617601c55565b6001600160801b0319601c549260801b16911617601c5533600052601f86526040600020610aef868254613f32565b9055308403610bc3575b5050604080516001600160801b039290921682526020820184905233917f01348584ec81ac7acd52b7d66d9ade986dd909f3d513881c190fc31c90527efe9190a3610b426143f7565b50601a54610b508133615455565b15610b6357506001600d55604051908152f35b82601e610b85610b716142a9565b33600052601f845260406000205490615be3565b913360005252610bbf60406000205492604051938493633b49de0f60e21b8552600485016040919493926060820195825260208201520152565b0390fd5b60405163a9059cbb60e01b878201526001600160a01b0390921660248301526044820152610c2890610c0281606481015b03601f198101835282614261565b7f00000000000000000000000000000000000000000000000000000000000000006158c7565b8480610af9565b6040516362ddb6d760e11b815260048101919091526001600160801b0384166024820152604490fd5b610c64903390336154fa565b85610a31565b600460405163345513d960e01b8152fd5b60046040517f97ba4de3000000000000000000000000000000000000000000000000000000008152fd5b60046040517f1e4ec46b000000000000000000000000000000000000000000000000000000008152fd5b34610532576000366003190112610532576020600554604051908152f35b346105325760003660031901126105325760206001600160a01b0360035416604051908152f35b3461053257604036600319011261053257610d2d613d5a565b610d35613d70565b906001600160a01b038091166000526009602052604060002091166000526020526020604060002054604051908152f35b3461053257604036600319011261053257610d7f613ec4565b610d87613d70565b90610d90613eda565b806001600160a01b038316928315610ca557602093610dad614283565b926001600160801b0380911615610e4c575b917faf48306b6b4f0ba30d00f05b21559d8d29934142980a553d8a014780c6c7e4529391610e1460809487169383610df78683615be3565b98610e038733306140f5565b3092610e0e8b614454565b9061516a565b30600052601e8752610e2e604060002054923090846155c3565b604051928352868301528460408301526060820152a1604051908152f35b30600090815260088752604090205481169450610dbf565b34610532576020366003190112610532576020610780610e82613d5a565b614378565b3461053257604036600319011261053257610ea0613d70565b610ea861460d565b6001600160a01b03811615610ca557610ebf614b01565b505050505033600052601f602052604060002054610f65575b610ee69033906004356155c3565b610eee6143f7565b50601a54610efc8133615455565b15610f08576001600d55005b610f28610f136142a9565b33600052601f60205260406000205490615be3565b33600052601e602052610bbf60406000205492604051938493633b49de0f60e21b8552600485016040919493926060820195825260208201520152565b610f6d614dc8565b5050610ed857600460405163345513d960e01b8152fd5b346105325760003660031901126105325760206040516001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168152f35b34610532576020366003190112610532576020610780610fe6613d5a565b6142dc565b346105325760003660031901126105325760a06110066146ae565b9350935050506001600160801b03908160208185511694015116916020818351169201511690601d54926040519485526020850152604084015260608301526080820152f35b3461053257604036600319011261053257611065613d70565b61106d61460d565b6001600160a01b03811615610ca55761109690611088614b01565b5050505050600435336154fa565b6001600d55005b34610532576000366003190112610532576105696110b96146ae565b9260409694969291925196879687613de6565b34610532576080366003190112610532576110e5613d5a565b60643567ffffffffffffffff811161053257366023820112156105325767ffffffffffffffff81600401351161053257366024826004013560051b830101116105325761113061460d565b611138614b01565b5050505050611145614dc8565b505015610c6a576001600160a01b038216600052601360205260ff604060002054161561170e578060040135156116f8576001600160a01b0361118a60248301615837565b817f00000000000000000000000000000000000000000000000000000000000000001691829116036116c357600482013560001981019081116116ad576111e16111dc82856004013560248701615827565b615837565b6001600160a01b03807f000000000000000000000000000000000000000000000000000000000000000016911603611644575061122133306024356155c3565b6040517f095ea7b30000000000000000000000000000000000000000000000000000000081526001600160a01b0384166004820152602480359082015290602090829060449082906000905af180156114e85761160b575b50604051906370a0823160e01b82523060048301526020826024816001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000165afa9182156114e8576000926115d7575b5060405180917f38ed173900000000000000000000000000000000000000000000000000000000825260a482016024356004840152604435602484015260a060448401528160040135905260c482019060248101906000905b806004013582106115a05750505090806000923060648301524260848301520381836001600160a01b0388165af180156114e8576114f4575b50604051906370a0823160e01b82523060048301526020826024816001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000165afa80156114e8576000906114b4575b6113c092506142cf565b90604435821061147c576113d26142a9565b6113fc6113df8483615b18565b916113e985614454565b339130916113f686614454565b91615672565b6001600160a01b0360405192168252602435602083015282604083015260608201527fe947f0f9b6255bdcf76d13d1257d34fbe380e0d5d4daa75e61c783a41e1607ba60803392a261144c6143f7565b50601a549061145b8233615455565b15611470576020906001600d55604051908152f35b50610f28610f136142a9565b604482604051907f76baadda000000000000000000000000000000000000000000000000000000008252823560048301526024820152fd5b506020823d6020116114e0575b816114ce60209383614261565b81010312610532576113c091516113b6565b3d91506114c1565b6040513d6000823e3d90fd5b3d806000833e6115048183614261565b8101906020818303126105325780519067ffffffffffffffff8211610532570181601f820112156105325780519067ffffffffffffffff821161158a576020808360051b936040519061155983870183614261565b8152019282010192831161053257602001905b82821061157a575050611361565b815181526020918201910161156c565b634e487b7160e01b600052604160045260246000fd5b919350918335906001600160a01b038216820361053257602080916001600160a01b03600194168152019401920184939291611328565b9091506020813d602011611603575b816115f360209383614261565b81010312610532575190836112cf565b3d91506115e6565b6020813d60201161163c575b8161162460209383614261565b810103126105325761163590614dbb565b5082611279565b3d9150611617565b61165d6111dc610bbf9285602481600401359101615827565b60405163b0b3262d60e01b81527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03908116600483015290911660248201529081906044820190565b634e487b7160e01b600052601160045260246000fd5b6116cf60248301615837565b60405163b0b3262d60e01b81526001600160a01b03928316600482015291166024820152604490fd5b634e487b7160e01b600052603260045260246000fd5b60046040517f1311dc6d000000000000000000000000000000000000000000000000000000008152fd5b346105325760003660031901126105325760206040516001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168152f35b3461053257602036600319011261053257611795613d5a565b5060206107806117a36146ae565b5093505050506001600160801b0381511660065490818110156000146117cd575050600090615b18565b6117d6916142cf565b90615b18565b3461053257600036600319011261053257602060075460ff60405191831c1615158152f35b34610532576020366003190112610532577f854df3eb95564502c8bc871ebdd15310ee26270f955f6c6bd8cea68e75045bc06020600435611840614572565b80600655604051908152a1005b3461053257600036600319011261053257602060ff60075460181c166040519015158152f35b346105325761188136613e8f565b919061188b61460d565b6001600160a01b03811615610ca55760ff60075460101c166118f3576020926118e6916118b6614b01565b50505050506118c3614283565b6118cd8582615bb2565b946118e06118da87614454565b91614454565b9161516a565b6001600d55604051908152f35b60046040517fe0a39803000000000000000000000000000000000000000000000000000000008152fd5b3461053257600036600319011261053257602060ff602254166040519015158152f35b34610532576020366003190112610532576001600160a01b03611961613d5a565b166000526008602052604060002054601f60205260406000205490601e602052610569604060002054604051938493846040919493926060820195825260208201520152565b34610532576020366003190112610532576001600160a01b036119c8613d5a565b16600052601e6020526020604060002054604051908152f35b34610532576119ef36613e8f565b91906119f961460d565b6001600160a01b03811615610ca55760ff60075460101c166118f3576020926118e691611a24614b01565b5050505050611a31614283565b611a44611a3e8683615aae565b95614454565b6118e086614454565b613b64565b3461053257604036600319011261053257611a78611a6e613d5a565b6024359033613f3f565b602060405160018152f35b3461053257604036600319011261053257611a9c613d5a565b6024359033600052600960205260406000206001600160a01b03821660005260205260406000205491808310611ad857611a78920390336140f5565b608460405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760448201527f207a65726f0000000000000000000000000000000000000000000000000000006064820152fd5b3461053257600036600319011261053257610100604051620186a0808252806020830152806040830152806060830152670de0b6b3a76400009081608084015260a083015260c082015261c35060e0820152f35b3461053257600036600319011261053257611baf6146ae565b509350505050602081016001600160801b03918282511615600014611be4575050506020670de0b6b3a7640000604051908152f35b51670de0b6b3a7640000908316818102918204036116ad57602092611c0b92511690614771565b610780565b3461053257600036600319011261053257604051600090601554600181811c90808316928315611d07575b6020938484108114611cf157838652908115611cd15750600114611c76575b61056984611c6a81880382614261565b60405191829182613d11565b601560009081529294507f55f448fdea98c4d29eb340757ef0a66cd03dbb9538908a6a81d96026b71ec4755b828410611cbe575050508161056993611c6a9282010193611c5a565b8054858501870152928501928101611ca2565b60ff1916858501525050151560051b8201019150611c6a81610569611c5a565b634e487b7160e01b600052602260045260246000fd5b91607f1691611c3b565b346105325760003660031901126105325760a060165463ffffffff9067ffffffffffffffff6040519280831684528260201c166020840152808260401c1660408401528160801c16606083015260c01c6080820152f35b3461053257604036600319011261053257600435611d84613d70565b611d8c61460d565b6001600160a01b03811615610ca557611da3614b01565b5050505050611db0614283565b91611dbb8184615bb2565b91600654611dd3846001600160801b03875116613f32565b11611df1576020936118e692611deb6118da86614454565b9161506a565b60046040517f2ab4a214000000000000000000000000000000000000000000000000000000008152fd5b34610532576020611e2b36613dba565b15611e475761078091611e3c6146ae565b945050505050615b45565b611c0b91611e536142a9565b615b45565b3461053257604036600319011261053257611e71613d5a565b63ffffffff6024358181169291838203610532576080937f78ba1c32ac8ea4b3d51133dd0b6f5d8f98e23797aade6afc381ea317d5d4f28b85611f0893611eb661584b565b611ebe6143f7565b966001600160a01b0390818951169260208a015116604051938452602084015216938460408301526060820152a16001600160a01b03166001600160a01b03196017541617601755565b7fffffffffffffffff00000000ffffffffffffffffffffffffffffffffffffffff77ffffffff00000000000000000000000000000000000000006017549260a01b1691161760175576ffffffffffffffffffffffffffffffffffffffffffffff6040820151167fffffffffffffffffff0000000000000000000000000000000000000000000000601854161760185560608101516019550151601a55600080f35b346105325760003660031901126105325760206001600160a01b0360025416604051908152f35b34610532576020366003190112610532576001600160a01b03611ff1613d5a565b166000526013602052602060ff604060002054166040519015158152f35b34610532576020366003190112610532577fdea8bb46eee4300a7d2de86939c245f568dc5994576194cbfb69969e010dcb67602061204b613d9c565b8015612090576120596144d2565b612061614b01565b5050505050151560075466ff0000000000001966ff0000000000008360301b16911617600755604051908152a1005b612098614572565b612059565b34610532576000366003190112610532576120b66144d2565b60006005557fdea8bb46eee4300a7d2de86939c245f568dc5994576194cbfb69969e010dcb67604051600081527fbf1ce7fb3a8e648b70ea830f99b52f7ea31554186d29763280751f42e77f638660208092a160006006557f854df3eb95564502c8bc871ebdd15310ee26270f955f6c6bd8cea68e75045bc08160405160008152a16007805460ff8160081c1615612218575b50805460ff8160181c16156121da575b50805460ff8160281c1615612198575b50612172614b01565b5050505050660100000000000066ff0000000000001982541617905560405160018152a1005b6401000000009064ff0000000019161781557f28bc4f9e24da61e7ba3aa697dfaefd0167093d2425c00b6190a7d3152ee6dfaa8260405160018152a183612169565b620100009062ff000019161781557fc56dd3e14f5af3a74c61b7cdf855a3d8ab4401c78c0622a4d312de8a8f8736a28260405160018152a183612159565b60019060ff19161781557f34a71a12fa81891b738d910d4d44ffabeeb12f8bc026844db237ea8bf8ebe8be8260405160018152a183612149565b34610532576020366003190112610532577f4cb8c9e37efb94c6cdbd2a80fe36cee1957b5584d1a1986fa2bae115180af59a61228c613d5a565b61229461584b565b600480546001600160a01b039283166001600160a01b03198216811790925560408051939091168352602083019190915290a1005b3461053257600036600319011261053257601c54604080516001600160801b038316815260809290921c602083015290f35b346105325760203660031901126105325760043563ffffffff8116908181036105325761232661584b565b60ff60075460301c166123d85761c35082116123ae577f58a58c712558f3d6e20bed57421eb8f73048d881dea9e5bb80efb37c49680d1c91602091612369614b01565b50505050507fffffffffffffffffffffffffffffffffffffffffffffffff00000000ffffffff67ffffffff0000000060165492851b16911617601655604051908152a1005b60046040517fda0afa57000000000000000000000000000000000000000000000000000000008152fd5b60046040517fa02a2bcd000000000000000000000000000000000000000000000000000000008152fd5b346105325760003660031901126105325761241b61584b565b6501000000000065ff00000000001960075416176007557f60c2acdf5b421891c8cc7302420292f2680f0e835fc76dd15f35a7bb0dd5cbc8600080a1005b3461053257602061246936613dba565b15612485576107809161247a6146ae565b945050505050615c1e565b611c0b916124916142a9565b615c1e565b346105325760206124a636613dba565b156124c257610780916124b76146ae565b509350505050615c1e565b611c0b91612491614283565b34610532576000366003190112610532576003546001600160a01b033381831603612538576001600160a01b03198092166003556002549133908316176002553391167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a3005b608460405162461bcd60e51b815260206004820152602960248201527f4f776e61626c6532537465703a2063616c6c6572206973206e6f74207468652060448201527f6e6577206f776e657200000000000000000000000000000000000000000000006064820152fd5b34610532576060366003190112610532576125bb613ec4565b602435906125c7613d86565b6125cf61460d565b6001600160a01b038116928315610ca55760ff60075460201c166128e3578042116128ac57506125fd614b01565b505050505061260a614dc8565b5090506126178183615455565b612882576126236142a9565b9184600052601e60205260406000205492601f602052612647604060002054614454565b926000936001600160801b0396670de0b6b3a76400006126738983169461266e8688615bb2565b61475e565b0498600f5497620186a0988901808a116116ad576126928a918d61475e565b046126a561269f83615793565b91615793565b90600082820392128183128116918313901516176116ad57600012801591906128625760209b505b809960115480612820575b50505086959293612781979486938b6118e69c9d612767958d61270661270161276f9d8c615be3565b614454565b98600097600093612789575b509160c093917f821de4e13fff1938b3806eb2859b6a5d55111f00dcf286f8a793584228ff36f895936040519485526020850152828b166040850152606084015281881660808401521660a0820152a26147a6565b903392615672565b61277a8133876155c3565b30836155c3565b3090306154fa565b7f821de4e13fff1938b3806eb2859b6a5d55111f00dcf286f8a793584228ff36f89593919850916127bd8860c096946145c9565b98838d818c16806127d7575b505050919395509193612712565b829550906127eb6127016127f59383615bb2565b95869151166145c9565b168d52601b546001600160801b031985612811868285166145c9565b16911617601b55838d386127c9565b6118e69b50829a50936127679361284f8b9a97936128476127819d9a9661276f9c9961475e565b04809d6142cf565b9c509350939682965081959899506126d8565b506010548901808a116116ad5761287c8a9160209d61475e565b046126cd565b60046040517f75e595fa000000000000000000000000000000000000000000000000000000008152fd5b604490604051907f5ba2a8d50000000000000000000000000000000000000000000000000000000082524260048301526024820152fd5b60046040517f6d2c35dc000000000000000000000000000000000000000000000000000000008152fd5b3461053257600036600319011261053257612926613eda565b60006001600160a01b036001600160a01b03198060035416600355600254908116600255167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a3005b34610532576020366003190112610532576001600160a01b03612992613d5a565b1660005260086020526020604060002054604051908152f35b34610532576040366003190112610532576004356129c7613d70565b906129d061460d565b6001600160a01b03821615610ca5576129e7614b01565b50505050506129f4614283565b600654612a0b836001600160801b03845116613f32565b11611df15760209281612a2a612a24856118e695615b18565b94614454565b611deb85614454565b3461053257602036600319011261053257612a4c613d5a565b612a5461584b565b601254604080516001600160a01b038084168252848116602083015292936001600160a01b0319939290917faeae842c8b3cd009fbb602e1ed072dc1aec69750e431ceae97f7543b466cd04c9190a116911617601255600080f35b3461053257600036600319011261053257612ac86144d2565b60006006557f854df3eb95564502c8bc871ebdd15310ee26270f955f6c6bd8cea68e75045bc0602060405160008152a1005b3461053257600036600319011261053257602060ff60075460101c166040519015158152f35b612b2936613e8f565b9190612b3361460d565b33600052602160205260ff6040600020541615612c51576001600160a01b0380821615610ca5578316918215612c27578390612b6d614b01565b505050505083600052601f602052604060002054612c0f575b91612b90926155c3565b612b986143f7565b50612ba6601a548093615455565b15612bb2576001600d55005b612bd2612bbd6142a9565b82600052601f60205260406000205490615be3565b90600052601e602052610bbf60406000205492604051938493633b49de0f60e21b8552600485016040919493926060820195825260208201520152565b9050612c19614dc8565b505015610c6a578390612b86565b60046040517f6f5f81d7000000000000000000000000000000000000000000000000000000008152fd5b60046040517fb9f0f171000000000000000000000000000000000000000000000000000000008152fd5b34610532576000366003190112610532576060604051600381526000602082015260006040820152f35b34610532576020366003190112610532576001600160a01b03612cc6613d5a565b16600052601f6020526020604060002054604051908152f35b3461053257600036600319011261053257612cf861584b565b612d00615889565b6001600160a01b0319806000541660005560015460006001600160a01b03821681817f162998b90abc2507f3953aa797827b03a14c42dbd9a35f09feaf02e0d592773a8280a37f31b6c5a04b069b6ec1b3cef44c4e7c1eadd721349cda9823d0b1877b3551cdc68280a316600155005b34610532576020366003190112610532576001600160a01b03612d91613d5a565b166000526021602052602060ff604060002054166040519015158152f35b3461053257600036600319011261053257612dc861584b565b61010061ff001960075416176007557f269ac55859865c2ff127a862e95c81ce7e3b9b13582036d3df419df5c07ec8b4600080a1005b3461053257602036600319011261053257612e17613d9c565b8015612e7c57612e256144d2565b6007549060ff8260281c16610848577f28bc4f9e24da61e7ba3aa697dfaefd0167093d2425c00b6190a7d3152ee6dfaa9160209115159064ff0000000082841b169064ff00000000191617600755604051908152a1005b612e84614572565b612e25565b346105325760003660031901126105325760206001600160a01b0360015416604051908152f35b3461053257602036600319011261053257612ec9613d9c565b8015612f2457612ed76144d2565b6007549060ff8260081c16610848577f34a71a12fa81891b738d910d4d44ffabeeb12f8bc026844db237ea8bf8ebe8be9160209115159060ff82169060ff191617600755604051908152a1005b612f2c614572565b612ed7565b34610532576000366003190112610532576020601d54604051908152f35b346105325760003660031901126105325760206001600160a01b0360045416604051908152f35b34610532576000366003190112610532576020601054604051908152f35b3461053257602036600319011261053257612fad613d5a565b612fb561584b565b6001600160a01b0380911690816001600160a01b03196000541617600055600154167f162998b90abc2507f3953aa797827b03a14c42dbd9a35f09feaf02e0d592773a600080a3005b3461053257602036600319011261053257613017613d5a565b506001600160801b036130286146ae565b50935050505051166006548082101560001461304c57505060206000604051908152f35b602091611c0b916142cf565b3461053257600036600319011261053257613071614572565b7fdea8bb46eee4300a7d2de86939c245f568dc5994576194cbfb69969e010dcb677fbf1ce7fb3a8e648b70ea830f99b52f7ea31554186d29763280751f42e77f63867f854df3eb95564502c8bc871ebdd15310ee26270f955f6c6bd8cea68e75045bc06000198060055560405190808252602093848093a180600655604051908152a16007805460ff8160081c16156131bd575b50805460ff8160181c1615613185575b50805460ff8160281c161561314b575b5061312e614b01565b505050505066ff00000000000019815416905560405160008152a1005b64ff00000000191681557f28bc4f9e24da61e7ba3aa697dfaefd0167093d2425c00b6190a7d3152ee6dfaa8260405160008152a183613125565b62ff0000191681557fc56dd3e14f5af3a74c61b7cdf855a3d8ab4401c78c0622a4d312de8a8f8736a28260405160008152a183613115565b60ff191681557f34a71a12fa81891b738d910d4d44ffabeeb12f8bc026844db237ea8bf8ebe8be8260405160008152a183613105565b34610532576040366003190112610532577fea1eefb4fd58778d7b274fe54045a9feeec8f2847899c2e71126d3a74d486da5604061322f613d5a565b6001600160a01b0361323f613dab565b91613248613eda565b169081600052601360205261326c81846000209060ff801983541691151516179055565b825191825215156020820152a1005b3461053257604036600319011261053257613294613d5a565b61329c613d70565b906001600160a01b0380911660005260208052604060002091166000526020526020604060002054604051908152f35b34610532576040366003190112610532576004356132e8613d70565b906132f161460d565b6001600160a01b03821615610ca55760ff6007541661333c576118e6602092613318614b01565b50505050506133256142a9565b61332f8482615be3565b936127676118da86614454565b60046040517f3cc383d2000000000000000000000000000000000000000000000000000000008152fd5b3461053257604036600319011261053257611a78613382613d5a565b33600052600960205260406000206001600160a01b0382166000526020526133b1602435604060002054613f32565b90336140f5565b34610532576000366003190112610532576133d161584b565b600160ff1960225416176022557f0af6d9d6ea0e3f0cdb71562ce1fce30aa597445ea04f5b25a939cfe0a252171c600080a1005b346105325760003660031901126105325760206040516001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168152f35b3461053257600036600319011261053257602060ff60075460281c166040519015158152f35b3461053257600036600319011261053257602060405160ff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b34610532576040366003190112610532576004356134c9613d70565b906134d261460d565b6001600160a01b03821691821580156137c3575b613799576134f2614b01565b5050505050600554916001600160801b03926135128285601c5416613f32565b11610c7b5761351f614dc8565b505015610c6a5761352f90614454565b926135386142a9565b928061354681610a4d614283565b16948181169586811061376e575082908160005260209687805260406000203360005288528783826040600020549061357e916142cf565b8160005282805260406000203360005283528060406000205560405190815233927f399f462d2df28f9d69d52cdcfd7e6ef0598b231d0b9baa75ae424e43195ffe8191a36135cc8188615aae565b968480848a97845116906135df916147a6565b168252808a83019281881682855116906135f8916147a6565b9382851690525116613620906001600160801b03166001600160801b0319601c541617601c55565b601c549160801b6001600160801b031916911617601c5582600052601f885260406000208481549061365191613f32565b905560405163a9059cbb60e01b8982015233602482015260448082019290925290815261367f606482614261565b6136a9907f00000000000000000000000000000000000000000000000000000000000000006158c7565b604080516001600160801b03929092168252602082019390935233927f01348584ec81ac7acd52b7d66d9ade986dd909f3d513881c190fc31c90527efe91a36136f06143f7565b50601a5491826136ff91615455565b156137135750506001600d55604051908152f35b601e846137356137216142a9565b84600052601f835260406000205490615be3565b9260005252610bbf60406000205492604051938493633b49de0f60e21b8552600485016040919493926060820195825260208201520152565b6040516362ddb6d760e11b815260048101919091526001600160801b03919091166024820152604490fd5b60046040517f1aa699c6000000000000000000000000000000000000000000000000000000008152fd5b508233146134e6565b34610532576060366003190112610532576137e5613d5a565b6137ed613d70565b604435906001600160a01b038316600052600960205260406000203360005260205260406000205492600019840361382a575b611a789350613f3f565b8284106138465761384183611a78950333836140f5565b613820565b606460405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152fd5b34610532576020366003190112610532576138a3613d9c565b6138ab6145e2565b506040516138b881614229565b6000815260006020820152610569604051916138d383614229565b60008352600060208401526138e661460d565b916138ef614b01565b92969350909661390b575b6001600d5560405196879687613de6565b92509050613917614283565b906139206142a9565b926138fa565b3461053257602061393636613dba565b1561395257610780916139476146ae565b509350505050615b45565b611c0b91611e53614283565b346105325760603660031901126105325760443560243560043561398061584b565b7fc9aa62b60be8f25ac9f285edbb80bde64199b3c53e1da1027058551d32695fca60c0600f5460105460115490604051928352602083015260408201528360608201528460808201528560a0820152a1600f55601055601155005b34610532576000366003190112610532576020601b5460801c604051908152f35b34610532576000366003190112610532576020600f54604051908152f35b3461053257600036600319011261053257602060ff600754166040519015158152f35b3461053257600036600319011261053257602060ff60075460081c166040519015158152f35b34610532576020366003190112610532576020610780613a816146ae565b50935050505060043590615aae565b3461053257604036600319011261053257611a78613aac613d5a565b60243590336140f5565b346105325760003660031901126105325760206001600160a01b0360005416604051908152f35b3461053257602036600319011261053257600435613af961584b565b60ff60225416613b3a577fe796e9ae748449310fcd1cc6718aab236c9b8d2e0e04dacb232ba564d5b338cc6040600e548151908152836020820152a1600e55005b60046040517f8c34a9b8000000000000000000000000000000000000000000000000000000008152fd5b34610532576020366003190112610532576020610780613b826146ae565b50935050505060043590615bb2565b3461053257600036600319011261053257604051600090601454600181811c90808316928315613c45575b6020938484108114611cf157838652908115611cd15750600114613bea5761056984611c6a81880382614261565b601460009081529294507fce6d7b5282bd9a3661ae061feed1dbda4e52ab073b1f9285be6e155d9c38d4ec5b828410613c32575050508161056993611c6a9282010193611c5a565b8054858501870152928501928101613c16565b91607f1691613bbc565b3461053257600036600319011261053257613c6861584b565b630100000063ff0000001960075416176007557fb949af551d0c88280e648f9205b986bb5f1d899c425498238655ee37617c0c39600080a1005b3461053257600036600319011261053257613cbb61460d565b6060613cc5614dc8565b906001600d55604051921515835260208301526040820152f35b346105325760003660031901126105325760206001600160801b03613d026146ae565b50516040519516855250505050f35b6020808252825181830181905290939260005b828110613d4657505060409293506000838284010152601f8019910116010190565b818101860151848201604001528501613d24565b600435906001600160a01b038216820361053257565b602435906001600160a01b038216820361053257565b604435906001600160a01b038216820361053257565b60043590811515820361053257565b60243590811515820361053257565b606090600319011261053257600435906024358015158103610532579060443580151581036105325790565b9194613e709197969461014094613e8d9761018086019a86526020860152604085015263ffffffff8082511660608601526020820151166080850152608060408201519167ffffffffffffffff80931660a08701528260608201511660c087015201511660e0840152610100830190602090816001600160801b0391828151168552015116910152565b0190602090816001600160801b0391828151168552015116910152565b565b606090600319011261053257600435906001600160a01b03906024358281168103610532579160443590811681036105325790565b600435906001600160801b038216820361053257565b6001600160a01b03600254163303613eee57565b606460405162461bcd60e51b815260206004820152602060248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152fd5b919082018092116116ad57565b6001600160a01b0380911691821561408b57169182156140215760008281526008602052604081205491808310613fb757604082827fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef95876020965260088652038282205586815220818154019055604051908152a3565b608460405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206260448201527f616c616e636500000000000000000000000000000000000000000000000000006064820152fd5b608460405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201527f65737300000000000000000000000000000000000000000000000000000000006064820152fd5b608460405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f20616460448201527f64726573730000000000000000000000000000000000000000000000000000006064820152fd5b6001600160a01b038091169182156141c057169182156141565760207f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925918360005260098252604060002085600052825280604060002055604051908152a3565b608460405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f20616464726560448201527f73730000000000000000000000000000000000000000000000000000000000006064820152fd5b608460405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152fd5b6040810190811067ffffffffffffffff82111761158a57604052565b60a0810190811067ffffffffffffffff82111761158a57604052565b90601f8019910116810190811067ffffffffffffffff82111761158a57604052565b6040519061429082614229565b601b546001600160801b038116835260801c6020830152565b604051906142b682614229565b601c546001600160801b038116835260801c6020830152565b919082039182116116ad57565b60ff60075460101c166143725761434d6001600160a01b036142fc6146ae565b95935096919350501690600030831460001461435e575061432a916000526008602052604060002054613f32565b905b6143466001600160801b03918280875116915116906145c9565b1692615bb2565b80821015614359575090565b905090565b90506040918152600860205220549061432c565b50600090565b60ff60075460101c16614372576143c06001600160a01b036143986146ae565b929694509250506143b96001600160801b03918280855116915116906145c9565b1690615b18565b92169060003083036143e4575061434d916000526008602052604060002054613f32565b905060409181526008602052205461434d565b6040519061440482614245565b6017546001600160a01b038116835260a01c63ffffffff16602083015260185476ffffffffffffffffffffffffffffffffffffffffffffff1660408301526019546060830152601a546080830152565b6001600160801b0390818111614468571690565b608460405162461bcd60e51b815260206004820152602760248201527f53616665436173743a2076616c756520646f65736e27742066697420696e203160448201527f32382062697473000000000000000000000000000000000000000000000000006064820152fd5b6001600160a01b0380600454163314159081614562575b81614535575b81614526575b506144fc57565b60046040517f1d1e647b000000000000000000000000000000000000000000000000000000008152fd5b905060015416331415386144f5565b337f00000000000000000000000000000000000000000000000000000000000000008216141591506144ef565b80915060025416331415906144e9565b6001600160a01b03806002541633141590816145ba575b5061459057565b60046040517f6f545269000000000000000000000000000000000000000000000000000000008152fd5b90506001541633141538614589565b6001600160801b0391821690821603919082116116ad57565b604051906145ef82614245565b60006080838281528260208201528260408201528260608201520152565b6002600d541461461e576002600d55565b606460405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152fd5b6040519061466f82614245565b81608060165463ffffffff80821684528160201c16602084015267ffffffffffffffff808260401c16604085015281831c16606084015260c01c910152565b600090819081806146bd6145e2565b508060206040516146cd81614229565b828152015260206040516146e081614229565b82815201526146ed614662565b936146f7856147c1565b8051909490156147435750505060608201519260808301519260a08101519267ffffffffffffffff806020840151166060850152604083015116608084015260e060c083015192015190565b92909350614752949194614283565b9061475b6142a9565b90565b818102929181159184041417156116ad57565b811561477b570490565b634e487b7160e01b600052601260045260246000fd5b519067ffffffffffffffff8216820361053257565b9190916001600160801b03808094169116019182116116ad57565b60408051929167ffffffffffffffff919061010085018381118682101761158a57825260009182865260208087019284845282880190858252606089019386855260808a019587875260a08b0198888a5260c08c0194835161482281614229565b8a81528a88820152865260e08d0193805161483c81614229565b8b81528b8982015285528d818701908482511642141580614af1575b61486d575b5050505050505050505050505050565b61489291600186925261487e614283565b8a526148886142a9565b88525116426142cf565b916001600160801b039b8c8951511615600014614ab457805b836001600160a01b03601254169160648860808d01511691835194859384927fcd3181d50000000000000000000000000000000000000000000000000000000084528b6004850152602484015260448301525afa918215614aa95780948193614a44575b5050509284809361493a9361494397670de0b6b3a764000099971690521684528c875151169061475e565b9151169061475e565b04808652878115159182614a2a575b505080614a11575b61496a575b80808080808061485d565b63ffffffff9184918861498681895116925192828451166147a6565b169052878651168861499d865192828451166147a6565b16905201511692836149b0575b8061495f565b614a02946149ec6149de620186a06149cd8a986149f2965161475e565b04808452878787510151169061475e565b9186855151169051906142cf565b90614771565b80965251019316828451166147a6565b169052388080808080806149aa565b5086614a238651828651511690613f32565b111561495a565b81614a3b9293508451511690613f32565b11158738614952565b919450915083813d8111614aa2575b614a5d8183614261565b81010312614a9f5750670de0b6b3a76400009492848361493a9382614a908e614a896149439b99614791565b9401614791565b9497995050938195975061490f565b80fd5b503d614a53565b8451903d90823e3d90fd5b8c87515116620186a09080820291820403614add57614ad8908e8b51511690614771565b6148ab565b602482634e487b7160e01b81526011600452fd5b5060ff60075460301c1615614858565b600090600090600090600090614b156145e2565b50614b1e614662565b90614b28826147c1565b8051151580614b35575050565b935095509250925092606081015192608092838301519360a084015193606084019067ffffffffffffffff80835116928487018281511692602095868601828151169189604097888a019486865116918a519485528c8501528984015260608301527fc63977c8e2362a31182dc8e89a52252f9836922738e0abcfc0de6924972eafe591a18d838251168751918252898201528d87820152898d60608301527f2b5229f33f1d24d5baab718e1e25d0d86195a9b6d786c2c0868edfb21a460e2591a151938285169052519181831690524216838901524363ffffffff1680895285890151861b67ffffffff00000000169160c01b7fffffffffffffffff000000000000000000000000000000000000000000000000169342901b6fffffffffffffffff00000000000000001691171790851b77ffffffffffffffff0000000000000000000000000000000016171760165560c081015191806001600160801b039384815116614cba906001600160801b03166001600160801b0319601b541617601b55565b015191601b54846001600160801b03198095881b16911617601b5560e0015183815116614cfd906001600160801b03166001600160801b0319601c541617601c55565b0151601c54931b16911617601c5582614d1257565b613e8d83305b6001600160a01b0316908115614d77577fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef602082614d5a600094600a54613f32565b600a558484526008825260408420818154019055604051908152a3565b606460405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152fd5b5190811515820361053257565b600090600090614dd66143f7565b906040918281019376ffffffffffffffffffffffffffffffffffffffffffffff93848651164214156000146150555760046001600160a01b03966060888651168451938480927fbd9a548b0000000000000000000000000000000000000000000000000000000082525afa90811561504857849885938693614fd1575b5090614eb683927fc1f41e029acf5127d111625602160c4cee3e1a4d38e691e50544d1f7c68b77be9695949a859c614f9f575b42168093528460608a01528360808a01528851166001600160a01b03166001600160a01b03196017541617601755565b60208701517fffffffffffffffff00000000ffffffffffffffffffffffffffffffffffffffff77ffffffff00000000000000000000000000000000000000006017549260a01b169116176017557fffffffffffffffffff000000000000000000000000000000000000000000000060185416176018558160195580601a5582519182526020820152a15b60808201614f5481516060850151906142cf565b91620186a09280840293840403614f8b5750614f7963ffffffff926020925190614771565b920151161015614f8557565b60019350565b80634e487b7160e01b602492526011600452fd5b7ffc131c36b7e444dacda44901fd43641dcdcfdc43fe9e2601b3c1dd87061db9e56020838c51168951908152a1614e86565b9950915091506060883d8211615040575b81614fef60609383614261565b8101031261503c57907fc1f41e029acf5127d111625602160c4cee3e1a4d38e691e50544d1f7c68b77be929161502489614dbb565b60208a01519984015190999394509190614eb6614e53565b8380fd5b3d9150614fe2565b50505051903d90823e3d90fd5b50606082015160808301519095509350614f40565b7fdcbc1c05240f31ff3ad067ef1ee35ce4997762752e3a095284754544f4c709d79192936151426001600160a01b03926001600160801b0390816150b188828451166147a6565b1681526150f8826020830192816150cb8c828751166147a6565b1684526150da828c1688614d18565b51166001600160801b03166001600160801b0319601b541617601b55565b51816001600160801b0319601b549260801b16911617601b55604051906323b872dd60e01b60208301523360248301523060448301528616606482015260648152610c0281614245565b604080516001600160801b03958616815295909416602086015216923392819081015b0390a3565b9091926151a76001600160a01b039283871696873303615403575b5061518e6142a9565b6001600160801b039283918280855116915116906145c9565b1691808616928381106153da5750806151c387828551166145c9565b16825260209161520282848301926151de8b838651166145c9565b93828516905251166001600160801b03166001600160801b0319601b541617601b55565b816001600160801b0319601b549260801b16911617601b558616918715615370578760005260088252604092836000205481811061530757610c0284610bf47ffbde797d201c681b91056529119e0b02407c7bb96a4a2c75c01fc9667232c8db9998979560008e7fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef6153029a896152de9a63a9059cbb60e01b9a85875260088452038c86205580600a5403600a558b51908152a386519485938401528860248401602090939291936001600160a01b0360408201951681520152565b516001600160801b0395861681529590941660208601521692339281906040820190565b0390a4565b60848486519062461bcd60e51b82526004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e60448201527f63650000000000000000000000000000000000000000000000000000000000006064820152fd5b6084826040519062461bcd60e51b82526004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f2061646472657360448201527f73000000000000000000000000000000000000000000000000000000000000006064820152fd5b6040516362ddb6d760e11b815260048101919091526001600160801b0387166024820152604490fd5b87600052600960205260406000203360005260205260406000205490600019820361542f575b50615185565b61544661544e926001600160801b038a16906142cf565b9033906140f5565b3880615429565b90600e549182156154f2576001600160a01b036154706142a9565b91169161548c600092848452601f602052604084205490615be3565b9283156154e8578252601e60205260408220549283156154e057670de0b6b3a7640000916154b99161475e565b0490620186a091828102928184041490151715614f8b5750906154db91614771565b111590565b505091505090565b5050505050600190565b505050600190565b9160207fa32435755c235de2976ed44a75a2f85cb01faf0c894f639fe0c32bb9455fea8f916001600160a01b038091169485600052601e83526040600020615543868254613f32565b905561555185601d54613f32565b601d551692308403615567575b604051908152a3565b6155be6040516323b872dd60e01b848201528560248201523060448201528260648201526064815261559881614245565b7f00000000000000000000000000000000000000000000000000000000000000006158c7565b61555e565b6001600160a01b038093169283600052601e60205260406000206155e88382546142cf565b90556155f682601d546142cf565b601d5582169181308403615635575b50506040519081527fbc290bb45104f73cf92115c9603987c3f8fd30c182a13603d8cffa49b5f5995260203392a4565b60405163a9059cbb60e01b60208201526001600160a01b039092166024830152604482015261566b906155988160648101610bf4565b3881615605565b93907f9dc1449a0ff0c152e18e8289d865b47acc6e1b76b1ecb239c13d6ee22a9206a792916001600160801b0394856156ae84828a51166145c9565b16875260208701866156c386828451166145c9565b168152615711876001600160a01b03809516998a600052601f60205260406000206156f1838a1682546142cf565b905551166001600160801b03166001600160801b0319601c541617601c55565b51866001600160801b0319601c549260801b16911617601c551693308503615758575b50604080516001600160801b03928316815292909116602083015281908101615165565b61578d90604051906323b872dd60e01b60208301528660248301523060448301528316606482015260648152610c0281614245565b38615734565b7f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81116157bd5790565b608460405162461bcd60e51b815260206004820152602860248201527f53616665436173743a2076616c756520646f65736e27742066697420696e206160448201527f6e20696e743235360000000000000000000000000000000000000000000000006064820152fd5b91908110156116f85760051b0190565b356001600160a01b03811681036105325790565b6001600160a01b0360015416330361585f57565b60046040517f1c0be90a000000000000000000000000000000000000000000000000000000008152fd5b6001600160a01b0360005416330361589d57565b60046040517ff5c49e64000000000000000000000000000000000000000000000000000000008152fd5b6001600160a01b0316906040516158dd81614229565b6020928382527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564848301526000808486829651910182855af13d15615a14573d9167ffffffffffffffff8311615a0057906159589392916040519261594b88601f19601f8401160185614261565b83523d868885013e615a1e565b908151908382159283156159de575b5050509050156159745750565b6084906040519062461bcd60e51b82526004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152fd5b848092939450010312614a9f5750816159f79101614dbb565b80388381615967565b602485634e487b7160e01b81526041600452fd5b9061595892916060915b91929015615a7f5750815115615a32575090565b3b15615a3b5790565b606460405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152fd5b825190915015615a925750805190602001fd5b610bbf9060405191829162461bcd60e51b835260048301613d11565b91906001600160801b038084511615600014615ac957509150565b615b02906020850190615af981615af0615ae6828651168861475e565b828a511690614771565b9751168761475e565b91511690614771565b10615b0957565b90600181018091116116ad5790565b6001600160801b038082511615600014615b3157505090565b615af961475b93826020850151169061475e565b90916001600160801b038083511615600014615b615750505090565b602083959492930190615b84615b7a828451168561475e565b8288511690614771565b9584615b95575b50505050615b0957565b615ba893945081615af99151168761475e565b1038808080615b8b565b60208101906001600160801b03908183511615600014615bd25750505090565b61475b9382615af99251169061475e565b919060208301926001600160801b038085511615600014615c05575090925050565b9081615af981615af0615ae6615b02968651168861475e565b909160208201916001600160801b038084511615600014615c40575050505090565b615b84615b7a8284989795969851168561475e56fea2646970667358221220950145088734ec1324c4998366cd7e7f4c0e7a1d4d28aecb58ab68af82f2cdac64736f6c6343000815003355f448fdea98c4d29eb340757ef0a66cd03dbb9538908a6a81d96026b71ec475c1f41e029acf5127d111625602160c4cee3e1a4d38e691e50544d1f7c68b77be000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000001a00000000000000000000000000000000000000000000000000000000000000220000000000000000000000000000000000000000000000000000000000000012000000000000000000000000042000000000000000000000000000000000000060000000000000000000000002416092f143378750bb29b79ed961ab195cceea500000000000000000000000061eea4770d7e15e7036f8632f4bcb33af1af1e250000000000000000000000000000000000000000000000000000000000000000000000000000000000000000942c5b9502aab7ca792deb9a456d88efd31f7ecf000000000000000000000000000000000000000000000000000000046d490d3e0000000000000000000000000000000000000000000000000000000000015f900000000000000000000000000000000000000000000000000000000000000bb8000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000600000000000000000000000002532c3d363306fa6d625e4cbad996bcf534e81540000000000000000000000002532c3d363306fa6d625e4cbad996bcf534e81540000000000000000000000002532c3d363306fa6d625e4cbad996bcf534e81540000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000012000000000000000000000000000000000000000000000000000000000000003553747572647920496e7465726573742042656172696e672057455448202852656e7a6f2052657374616b65642045544829202d20310000000000000000000000000000000000000000000000000000000000000000000000000000000000000e665745544828657a455448292d31000000000000000000000000000000000000
Deployed Bytecode
0x6080604052600436101561001257600080fd5b60003560e01c806301e1d11414613cdf57806302ce728f14613ca25780630475260e14613c4f57806306fdde0314613b9157806307a2d13a14613b6457806308a0c37514613add578063090f3f5014613ab6578063095ea7b314613a905780630a28a47714613a635780630c70661d14613a3d578063115a334c14613a1a57806311a2e4bc146139fc57806318160ddd146139db5780631bc23cf91461395e5780631c2591d3146139265780631c6c95971461388a57806323b872dd146137cc57806327c151dc146134ad578063313ce5671461346f57806334680fe51461344957806338d52e0f1461340557806339030864146133b857806339509351146133665780633d417d2d146132cc5780633e9139be1461327b5780633f2617cb146131f35780633f4ba83a14613058578063402d267d14612ffe5780634501409514612f945780634732428c14612f765780634929242714612f4f5780634ac8eb5f14612f315780634b4b418e14612eb05780634bc66f3214612e895780634c18a4fb14612dfe5780634c41799514612daf5780634cdad50614611a4d5780634cefcccb14612d705780634f8b4ae714612cdf5780634fd422df14612ca557806354fd4d5014612c7b57806359508a1014612b2057806367800b5f14612afa57806369026e8814612aaf5780636b96668f14612a335780636e553f65146129ab57806370a0823114612971578063715018a61461290d578063721b0a47146125a257806379ba5097146124ce5780637d37bdd7146124965780637ec4b571146124595780637ecefa6e146124025780638142dd53146122fb5780638285ef40146122c957806382beee89146122525780638456cb591461209d578063858f1e681461200f5780638cad7fbe14611fd05780638da5cb5b14611fa95780638f791f8b14611e5857806393f46f6414611e1b57806394bf804d14611d6857806395d14ca814611d1157806395d89b4114611c1057806399530b0614611b965780639a295e7314611b42578063a457c2d714611a83578063a9059cbb14611a52578063b3d7f6b914611a4d578063b460af94146119e1578063b5af3062146119a7578063b68d0a0914611940578063b7db54f51461191d578063ba08765214611873578063bbb096241461184d578063bdc8144b14611801578063c58e4df6146117dc578063c63d75b61461177c578063c6e1c7c914611738578063c6e6f59214610753578063ca2298fe146110cc578063cacf3b581461109d578063cadac4791461104c578063cdd72d5214610feb578063ce96cb7714610fc8578063d2a156e014610f84578063d41ddc9614610e87578063d905777e14610e64578063daf33f2a14610d66578063dd62ed3e14610d14578063e30c397814610ced578063e551d11d14610ccf578063e5f13b16146109b2578063e7a3317414610966578063e8596f721461091b578063e86242a81461089d578063eafecffa1461087f578063ebd462cb146107cd578063ecf70858146107af578063eee2421914610788578063ef8b30f714610753578063f211c3901461072d578063f2fde38b146106c3578063f384bd05146106a5578063f54fd600146105d3578063f6ccaad41461056d578063f9557ccb146105375763fbbbf94c146104cb57600080fd5b346105325760003660031901126105325760a060175476ffffffffffffffffffffffffffffffffffffffffffffff60185416601954601a549163ffffffff604051946001600160a01b0381168652861c166020850152604084015260608301526080820152f35b600080fd5b3461053257600036600319011261053257601b54604080516001600160801b038316815260809290921c602083015290f35b0390f35b3461053257600036600319011261053257610586615889565b6001600160a01b0319806000541660005560015490336001600160a01b0383167f31b6c5a04b069b6ec1b3cef44c4e7c1eadd721349cda9823d0b1877b3551cdc6600080a3163317600155005b34610532576040366003190112610532576105ec613d5a565b6024358015158061067a575b6106505733600052602080526001600160a01b03604060002092169182600052602052806040600020556040519081527f399f462d2df28f9d69d52cdcfd7e6ef0598b231d0b9baa75ae424e43195ffe8160203392a3005b60046040517fadc9170e000000000000000000000000000000000000000000000000000000008152fd5b50336000526020805260406000206001600160a01b03831660005260205260406000205415156105f8565b34610532576000366003190112610532576020600e54604051908152f35b34610532576020366003190112610532576106dc613d5a565b6106e4613eda565b6001600160a01b0380911690816001600160a01b03196003541617600355600254167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e22700600080a3005b3461053257600036600319011261053257602060ff60075460301c166040519015158152f35b346105325760203660031901126105325760206107806107716146ae565b50935050505060043590615b18565b604051908152f35b346105325760003660031901126105325760206001600160a01b0360125416604051908152f35b34610532576000366003190112610532576020600654604051908152f35b34610532576020366003190112610532576107e6613d9c565b8015610872576107f46144d2565b6007549060ff8260181c16610848577fc56dd3e14f5af3a74c61b7cdf855a3d8ab4401c78c0622a4d312de8a8f8736a29160209115159062ff00008260101b169062ff0000191617600755604051908152a1005b60046040517f1ada47b8000000000000000000000000000000000000000000000000000000008152fd5b61087a614572565b6107f4565b34610532576000366003190112610532576020601154604051908152f35b6040366003190112610532576108b1613d5a565b7ee87392aa4ff46a408dc81eaa7d09885b4ec4e0c3c6fbc3e7310b53f558176360206001600160a01b036108e3613dab565b936108ec613eda565b169283600052602182526109108160406000209060ff801983541691151516179055565b6040519015158152a2005b34610532576000366003190112610532576109346144d2565b60006005557fbf1ce7fb3a8e648b70ea830f99b52f7ea31554186d29763280751f42e77f6386602060405160008152a1005b34610532576020366003190112610532577fbf1ce7fb3a8e648b70ea830f99b52f7ea31554186d29763280751f42e77f638660206004356109a5614572565b80600555604051908152a1005b34610532576060366003190112610532576004356024356109d1613d86565b906109da61460d565b6001600160a01b038216908115610ca5576109f3614b01565b5050505050600554936001600160801b0394610a138287601c5416613f32565b11610c7b57610a20614dc8565b505015610c6a5781610a3792610c58575b50614454565b610a3f6142a9565b9284610a5981610a4d614283565b511682875116906145c9565b1685831690818110610c2f5750610a708186615aae565b9486610a7f85828451166147a6565b168152602096610ac08189840193610a9c828b16838751166147a6565b94828616905251166001600160801b03166001600160801b0319601c541617601c55565b6001600160801b0319601c549260801b16911617601c5533600052601f86526040600020610aef868254613f32565b9055308403610bc3575b5050604080516001600160801b039290921682526020820184905233917f01348584ec81ac7acd52b7d66d9ade986dd909f3d513881c190fc31c90527efe9190a3610b426143f7565b50601a54610b508133615455565b15610b6357506001600d55604051908152f35b82601e610b85610b716142a9565b33600052601f845260406000205490615be3565b913360005252610bbf60406000205492604051938493633b49de0f60e21b8552600485016040919493926060820195825260208201520152565b0390fd5b60405163a9059cbb60e01b878201526001600160a01b0390921660248301526044820152610c2890610c0281606481015b03601f198101835282614261565b7f00000000000000000000000042000000000000000000000000000000000000066158c7565b8480610af9565b6040516362ddb6d760e11b815260048101919091526001600160801b0384166024820152604490fd5b610c64903390336154fa565b85610a31565b600460405163345513d960e01b8152fd5b60046040517f97ba4de3000000000000000000000000000000000000000000000000000000008152fd5b60046040517f1e4ec46b000000000000000000000000000000000000000000000000000000008152fd5b34610532576000366003190112610532576020600554604051908152f35b346105325760003660031901126105325760206001600160a01b0360035416604051908152f35b3461053257604036600319011261053257610d2d613d5a565b610d35613d70565b906001600160a01b038091166000526009602052604060002091166000526020526020604060002054604051908152f35b3461053257604036600319011261053257610d7f613ec4565b610d87613d70565b90610d90613eda565b806001600160a01b038316928315610ca557602093610dad614283565b926001600160801b0380911615610e4c575b917faf48306b6b4f0ba30d00f05b21559d8d29934142980a553d8a014780c6c7e4529391610e1460809487169383610df78683615be3565b98610e038733306140f5565b3092610e0e8b614454565b9061516a565b30600052601e8752610e2e604060002054923090846155c3565b604051928352868301528460408301526060820152a1604051908152f35b30600090815260088752604090205481169450610dbf565b34610532576020366003190112610532576020610780610e82613d5a565b614378565b3461053257604036600319011261053257610ea0613d70565b610ea861460d565b6001600160a01b03811615610ca557610ebf614b01565b505050505033600052601f602052604060002054610f65575b610ee69033906004356155c3565b610eee6143f7565b50601a54610efc8133615455565b15610f08576001600d55005b610f28610f136142a9565b33600052601f60205260406000205490615be3565b33600052601e602052610bbf60406000205492604051938493633b49de0f60e21b8552600485016040919493926060820195825260208201520152565b610f6d614dc8565b5050610ed857600460405163345513d960e01b8152fd5b346105325760003660031901126105325760206040516001600160a01b037f0000000000000000000000005c0801270b471311e3bf7bb3637a7d12b13d747c168152f35b34610532576020366003190112610532576020610780610fe6613d5a565b6142dc565b346105325760003660031901126105325760a06110066146ae565b9350935050506001600160801b03908160208185511694015116916020818351169201511690601d54926040519485526020850152604084015260608301526080820152f35b3461053257604036600319011261053257611065613d70565b61106d61460d565b6001600160a01b03811615610ca55761109690611088614b01565b5050505050600435336154fa565b6001600d55005b34610532576000366003190112610532576105696110b96146ae565b9260409694969291925196879687613de6565b34610532576080366003190112610532576110e5613d5a565b60643567ffffffffffffffff811161053257366023820112156105325767ffffffffffffffff81600401351161053257366024826004013560051b830101116105325761113061460d565b611138614b01565b5050505050611145614dc8565b505015610c6a576001600160a01b038216600052601360205260ff604060002054161561170e578060040135156116f8576001600160a01b0361118a60248301615837565b817f0000000000000000000000002416092f143378750bb29b79ed961ab195cceea51691829116036116c357600482013560001981019081116116ad576111e16111dc82856004013560248701615827565b615837565b6001600160a01b03807f000000000000000000000000420000000000000000000000000000000000000616911603611644575061122133306024356155c3565b6040517f095ea7b30000000000000000000000000000000000000000000000000000000081526001600160a01b0384166004820152602480359082015290602090829060449082906000905af180156114e85761160b575b50604051906370a0823160e01b82523060048301526020826024816001600160a01b037f0000000000000000000000004200000000000000000000000000000000000006165afa9182156114e8576000926115d7575b5060405180917f38ed173900000000000000000000000000000000000000000000000000000000825260a482016024356004840152604435602484015260a060448401528160040135905260c482019060248101906000905b806004013582106115a05750505090806000923060648301524260848301520381836001600160a01b0388165af180156114e8576114f4575b50604051906370a0823160e01b82523060048301526020826024816001600160a01b037f0000000000000000000000004200000000000000000000000000000000000006165afa80156114e8576000906114b4575b6113c092506142cf565b90604435821061147c576113d26142a9565b6113fc6113df8483615b18565b916113e985614454565b339130916113f686614454565b91615672565b6001600160a01b0360405192168252602435602083015282604083015260608201527fe947f0f9b6255bdcf76d13d1257d34fbe380e0d5d4daa75e61c783a41e1607ba60803392a261144c6143f7565b50601a549061145b8233615455565b15611470576020906001600d55604051908152f35b50610f28610f136142a9565b604482604051907f76baadda000000000000000000000000000000000000000000000000000000008252823560048301526024820152fd5b506020823d6020116114e0575b816114ce60209383614261565b81010312610532576113c091516113b6565b3d91506114c1565b6040513d6000823e3d90fd5b3d806000833e6115048183614261565b8101906020818303126105325780519067ffffffffffffffff8211610532570181601f820112156105325780519067ffffffffffffffff821161158a576020808360051b936040519061155983870183614261565b8152019282010192831161053257602001905b82821061157a575050611361565b815181526020918201910161156c565b634e487b7160e01b600052604160045260246000fd5b919350918335906001600160a01b038216820361053257602080916001600160a01b03600194168152019401920184939291611328565b9091506020813d602011611603575b816115f360209383614261565b81010312610532575190836112cf565b3d91506115e6565b6020813d60201161163c575b8161162460209383614261565b810103126105325761163590614dbb565b5082611279565b3d9150611617565b61165d6111dc610bbf9285602481600401359101615827565b60405163b0b3262d60e01b81527f00000000000000000000000042000000000000000000000000000000000000066001600160a01b03908116600483015290911660248201529081906044820190565b634e487b7160e01b600052601160045260246000fd5b6116cf60248301615837565b60405163b0b3262d60e01b81526001600160a01b03928316600482015291166024820152604490fd5b634e487b7160e01b600052603260045260246000fd5b60046040517f1311dc6d000000000000000000000000000000000000000000000000000000008152fd5b346105325760003660031901126105325760206040516001600160a01b037f0000000000000000000000002416092f143378750bb29b79ed961ab195cceea5168152f35b3461053257602036600319011261053257611795613d5a565b5060206107806117a36146ae565b5093505050506001600160801b0381511660065490818110156000146117cd575050600090615b18565b6117d6916142cf565b90615b18565b3461053257600036600319011261053257602060075460ff60405191831c1615158152f35b34610532576020366003190112610532577f854df3eb95564502c8bc871ebdd15310ee26270f955f6c6bd8cea68e75045bc06020600435611840614572565b80600655604051908152a1005b3461053257600036600319011261053257602060ff60075460181c166040519015158152f35b346105325761188136613e8f565b919061188b61460d565b6001600160a01b03811615610ca55760ff60075460101c166118f3576020926118e6916118b6614b01565b50505050506118c3614283565b6118cd8582615bb2565b946118e06118da87614454565b91614454565b9161516a565b6001600d55604051908152f35b60046040517fe0a39803000000000000000000000000000000000000000000000000000000008152fd5b3461053257600036600319011261053257602060ff602254166040519015158152f35b34610532576020366003190112610532576001600160a01b03611961613d5a565b166000526008602052604060002054601f60205260406000205490601e602052610569604060002054604051938493846040919493926060820195825260208201520152565b34610532576020366003190112610532576001600160a01b036119c8613d5a565b16600052601e6020526020604060002054604051908152f35b34610532576119ef36613e8f565b91906119f961460d565b6001600160a01b03811615610ca55760ff60075460101c166118f3576020926118e691611a24614b01565b5050505050611a31614283565b611a44611a3e8683615aae565b95614454565b6118e086614454565b613b64565b3461053257604036600319011261053257611a78611a6e613d5a565b6024359033613f3f565b602060405160018152f35b3461053257604036600319011261053257611a9c613d5a565b6024359033600052600960205260406000206001600160a01b03821660005260205260406000205491808310611ad857611a78920390336140f5565b608460405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760448201527f207a65726f0000000000000000000000000000000000000000000000000000006064820152fd5b3461053257600036600319011261053257610100604051620186a0808252806020830152806040830152806060830152670de0b6b3a76400009081608084015260a083015260c082015261c35060e0820152f35b3461053257600036600319011261053257611baf6146ae565b509350505050602081016001600160801b03918282511615600014611be4575050506020670de0b6b3a7640000604051908152f35b51670de0b6b3a7640000908316818102918204036116ad57602092611c0b92511690614771565b610780565b3461053257600036600319011261053257604051600090601554600181811c90808316928315611d07575b6020938484108114611cf157838652908115611cd15750600114611c76575b61056984611c6a81880382614261565b60405191829182613d11565b601560009081529294507f55f448fdea98c4d29eb340757ef0a66cd03dbb9538908a6a81d96026b71ec4755b828410611cbe575050508161056993611c6a9282010193611c5a565b8054858501870152928501928101611ca2565b60ff1916858501525050151560051b8201019150611c6a81610569611c5a565b634e487b7160e01b600052602260045260246000fd5b91607f1691611c3b565b346105325760003660031901126105325760a060165463ffffffff9067ffffffffffffffff6040519280831684528260201c166020840152808260401c1660408401528160801c16606083015260c01c6080820152f35b3461053257604036600319011261053257600435611d84613d70565b611d8c61460d565b6001600160a01b03811615610ca557611da3614b01565b5050505050611db0614283565b91611dbb8184615bb2565b91600654611dd3846001600160801b03875116613f32565b11611df1576020936118e692611deb6118da86614454565b9161506a565b60046040517f2ab4a214000000000000000000000000000000000000000000000000000000008152fd5b34610532576020611e2b36613dba565b15611e475761078091611e3c6146ae565b945050505050615b45565b611c0b91611e536142a9565b615b45565b3461053257604036600319011261053257611e71613d5a565b63ffffffff6024358181169291838203610532576080937f78ba1c32ac8ea4b3d51133dd0b6f5d8f98e23797aade6afc381ea317d5d4f28b85611f0893611eb661584b565b611ebe6143f7565b966001600160a01b0390818951169260208a015116604051938452602084015216938460408301526060820152a16001600160a01b03166001600160a01b03196017541617601755565b7fffffffffffffffff00000000ffffffffffffffffffffffffffffffffffffffff77ffffffff00000000000000000000000000000000000000006017549260a01b1691161760175576ffffffffffffffffffffffffffffffffffffffffffffff6040820151167fffffffffffffffffff0000000000000000000000000000000000000000000000601854161760185560608101516019550151601a55600080f35b346105325760003660031901126105325760206001600160a01b0360025416604051908152f35b34610532576020366003190112610532576001600160a01b03611ff1613d5a565b166000526013602052602060ff604060002054166040519015158152f35b34610532576020366003190112610532577fdea8bb46eee4300a7d2de86939c245f568dc5994576194cbfb69969e010dcb67602061204b613d9c565b8015612090576120596144d2565b612061614b01565b5050505050151560075466ff0000000000001966ff0000000000008360301b16911617600755604051908152a1005b612098614572565b612059565b34610532576000366003190112610532576120b66144d2565b60006005557fdea8bb46eee4300a7d2de86939c245f568dc5994576194cbfb69969e010dcb67604051600081527fbf1ce7fb3a8e648b70ea830f99b52f7ea31554186d29763280751f42e77f638660208092a160006006557f854df3eb95564502c8bc871ebdd15310ee26270f955f6c6bd8cea68e75045bc08160405160008152a16007805460ff8160081c1615612218575b50805460ff8160181c16156121da575b50805460ff8160281c1615612198575b50612172614b01565b5050505050660100000000000066ff0000000000001982541617905560405160018152a1005b6401000000009064ff0000000019161781557f28bc4f9e24da61e7ba3aa697dfaefd0167093d2425c00b6190a7d3152ee6dfaa8260405160018152a183612169565b620100009062ff000019161781557fc56dd3e14f5af3a74c61b7cdf855a3d8ab4401c78c0622a4d312de8a8f8736a28260405160018152a183612159565b60019060ff19161781557f34a71a12fa81891b738d910d4d44ffabeeb12f8bc026844db237ea8bf8ebe8be8260405160018152a183612149565b34610532576020366003190112610532577f4cb8c9e37efb94c6cdbd2a80fe36cee1957b5584d1a1986fa2bae115180af59a61228c613d5a565b61229461584b565b600480546001600160a01b039283166001600160a01b03198216811790925560408051939091168352602083019190915290a1005b3461053257600036600319011261053257601c54604080516001600160801b038316815260809290921c602083015290f35b346105325760203660031901126105325760043563ffffffff8116908181036105325761232661584b565b60ff60075460301c166123d85761c35082116123ae577f58a58c712558f3d6e20bed57421eb8f73048d881dea9e5bb80efb37c49680d1c91602091612369614b01565b50505050507fffffffffffffffffffffffffffffffffffffffffffffffff00000000ffffffff67ffffffff0000000060165492851b16911617601655604051908152a1005b60046040517fda0afa57000000000000000000000000000000000000000000000000000000008152fd5b60046040517fa02a2bcd000000000000000000000000000000000000000000000000000000008152fd5b346105325760003660031901126105325761241b61584b565b6501000000000065ff00000000001960075416176007557f60c2acdf5b421891c8cc7302420292f2680f0e835fc76dd15f35a7bb0dd5cbc8600080a1005b3461053257602061246936613dba565b15612485576107809161247a6146ae565b945050505050615c1e565b611c0b916124916142a9565b615c1e565b346105325760206124a636613dba565b156124c257610780916124b76146ae565b509350505050615c1e565b611c0b91612491614283565b34610532576000366003190112610532576003546001600160a01b033381831603612538576001600160a01b03198092166003556002549133908316176002553391167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a3005b608460405162461bcd60e51b815260206004820152602960248201527f4f776e61626c6532537465703a2063616c6c6572206973206e6f74207468652060448201527f6e6577206f776e657200000000000000000000000000000000000000000000006064820152fd5b34610532576060366003190112610532576125bb613ec4565b602435906125c7613d86565b6125cf61460d565b6001600160a01b038116928315610ca55760ff60075460201c166128e3578042116128ac57506125fd614b01565b505050505061260a614dc8565b5090506126178183615455565b612882576126236142a9565b9184600052601e60205260406000205492601f602052612647604060002054614454565b926000936001600160801b0396670de0b6b3a76400006126738983169461266e8688615bb2565b61475e565b0498600f5497620186a0988901808a116116ad576126928a918d61475e565b046126a561269f83615793565b91615793565b90600082820392128183128116918313901516176116ad57600012801591906128625760209b505b809960115480612820575b50505086959293612781979486938b6118e69c9d612767958d61270661270161276f9d8c615be3565b614454565b98600097600093612789575b509160c093917f821de4e13fff1938b3806eb2859b6a5d55111f00dcf286f8a793584228ff36f895936040519485526020850152828b166040850152606084015281881660808401521660a0820152a26147a6565b903392615672565b61277a8133876155c3565b30836155c3565b3090306154fa565b7f821de4e13fff1938b3806eb2859b6a5d55111f00dcf286f8a793584228ff36f89593919850916127bd8860c096946145c9565b98838d818c16806127d7575b505050919395509193612712565b829550906127eb6127016127f59383615bb2565b95869151166145c9565b168d52601b546001600160801b031985612811868285166145c9565b16911617601b55838d386127c9565b6118e69b50829a50936127679361284f8b9a97936128476127819d9a9661276f9c9961475e565b04809d6142cf565b9c509350939682965081959899506126d8565b506010548901808a116116ad5761287c8a9160209d61475e565b046126cd565b60046040517f75e595fa000000000000000000000000000000000000000000000000000000008152fd5b604490604051907f5ba2a8d50000000000000000000000000000000000000000000000000000000082524260048301526024820152fd5b60046040517f6d2c35dc000000000000000000000000000000000000000000000000000000008152fd5b3461053257600036600319011261053257612926613eda565b60006001600160a01b036001600160a01b03198060035416600355600254908116600255167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a3005b34610532576020366003190112610532576001600160a01b03612992613d5a565b1660005260086020526020604060002054604051908152f35b34610532576040366003190112610532576004356129c7613d70565b906129d061460d565b6001600160a01b03821615610ca5576129e7614b01565b50505050506129f4614283565b600654612a0b836001600160801b03845116613f32565b11611df15760209281612a2a612a24856118e695615b18565b94614454565b611deb85614454565b3461053257602036600319011261053257612a4c613d5a565b612a5461584b565b601254604080516001600160a01b038084168252848116602083015292936001600160a01b0319939290917faeae842c8b3cd009fbb602e1ed072dc1aec69750e431ceae97f7543b466cd04c9190a116911617601255600080f35b3461053257600036600319011261053257612ac86144d2565b60006006557f854df3eb95564502c8bc871ebdd15310ee26270f955f6c6bd8cea68e75045bc0602060405160008152a1005b3461053257600036600319011261053257602060ff60075460101c166040519015158152f35b612b2936613e8f565b9190612b3361460d565b33600052602160205260ff6040600020541615612c51576001600160a01b0380821615610ca5578316918215612c27578390612b6d614b01565b505050505083600052601f602052604060002054612c0f575b91612b90926155c3565b612b986143f7565b50612ba6601a548093615455565b15612bb2576001600d55005b612bd2612bbd6142a9565b82600052601f60205260406000205490615be3565b90600052601e602052610bbf60406000205492604051938493633b49de0f60e21b8552600485016040919493926060820195825260208201520152565b9050612c19614dc8565b505015610c6a578390612b86565b60046040517f6f5f81d7000000000000000000000000000000000000000000000000000000008152fd5b60046040517fb9f0f171000000000000000000000000000000000000000000000000000000008152fd5b34610532576000366003190112610532576060604051600381526000602082015260006040820152f35b34610532576020366003190112610532576001600160a01b03612cc6613d5a565b16600052601f6020526020604060002054604051908152f35b3461053257600036600319011261053257612cf861584b565b612d00615889565b6001600160a01b0319806000541660005560015460006001600160a01b03821681817f162998b90abc2507f3953aa797827b03a14c42dbd9a35f09feaf02e0d592773a8280a37f31b6c5a04b069b6ec1b3cef44c4e7c1eadd721349cda9823d0b1877b3551cdc68280a316600155005b34610532576020366003190112610532576001600160a01b03612d91613d5a565b166000526021602052602060ff604060002054166040519015158152f35b3461053257600036600319011261053257612dc861584b565b61010061ff001960075416176007557f269ac55859865c2ff127a862e95c81ce7e3b9b13582036d3df419df5c07ec8b4600080a1005b3461053257602036600319011261053257612e17613d9c565b8015612e7c57612e256144d2565b6007549060ff8260281c16610848577f28bc4f9e24da61e7ba3aa697dfaefd0167093d2425c00b6190a7d3152ee6dfaa9160209115159064ff0000000082841b169064ff00000000191617600755604051908152a1005b612e84614572565b612e25565b346105325760003660031901126105325760206001600160a01b0360015416604051908152f35b3461053257602036600319011261053257612ec9613d9c565b8015612f2457612ed76144d2565b6007549060ff8260081c16610848577f34a71a12fa81891b738d910d4d44ffabeeb12f8bc026844db237ea8bf8ebe8be9160209115159060ff82169060ff191617600755604051908152a1005b612f2c614572565b612ed7565b34610532576000366003190112610532576020601d54604051908152f35b346105325760003660031901126105325760206001600160a01b0360045416604051908152f35b34610532576000366003190112610532576020601054604051908152f35b3461053257602036600319011261053257612fad613d5a565b612fb561584b565b6001600160a01b0380911690816001600160a01b03196000541617600055600154167f162998b90abc2507f3953aa797827b03a14c42dbd9a35f09feaf02e0d592773a600080a3005b3461053257602036600319011261053257613017613d5a565b506001600160801b036130286146ae565b50935050505051166006548082101560001461304c57505060206000604051908152f35b602091611c0b916142cf565b3461053257600036600319011261053257613071614572565b7fdea8bb46eee4300a7d2de86939c245f568dc5994576194cbfb69969e010dcb677fbf1ce7fb3a8e648b70ea830f99b52f7ea31554186d29763280751f42e77f63867f854df3eb95564502c8bc871ebdd15310ee26270f955f6c6bd8cea68e75045bc06000198060055560405190808252602093848093a180600655604051908152a16007805460ff8160081c16156131bd575b50805460ff8160181c1615613185575b50805460ff8160281c161561314b575b5061312e614b01565b505050505066ff00000000000019815416905560405160008152a1005b64ff00000000191681557f28bc4f9e24da61e7ba3aa697dfaefd0167093d2425c00b6190a7d3152ee6dfaa8260405160008152a183613125565b62ff0000191681557fc56dd3e14f5af3a74c61b7cdf855a3d8ab4401c78c0622a4d312de8a8f8736a28260405160008152a183613115565b60ff191681557f34a71a12fa81891b738d910d4d44ffabeeb12f8bc026844db237ea8bf8ebe8be8260405160008152a183613105565b34610532576040366003190112610532577fea1eefb4fd58778d7b274fe54045a9feeec8f2847899c2e71126d3a74d486da5604061322f613d5a565b6001600160a01b0361323f613dab565b91613248613eda565b169081600052601360205261326c81846000209060ff801983541691151516179055565b825191825215156020820152a1005b3461053257604036600319011261053257613294613d5a565b61329c613d70565b906001600160a01b0380911660005260208052604060002091166000526020526020604060002054604051908152f35b34610532576040366003190112610532576004356132e8613d70565b906132f161460d565b6001600160a01b03821615610ca55760ff6007541661333c576118e6602092613318614b01565b50505050506133256142a9565b61332f8482615be3565b936127676118da86614454565b60046040517f3cc383d2000000000000000000000000000000000000000000000000000000008152fd5b3461053257604036600319011261053257611a78613382613d5a565b33600052600960205260406000206001600160a01b0382166000526020526133b1602435604060002054613f32565b90336140f5565b34610532576000366003190112610532576133d161584b565b600160ff1960225416176022557f0af6d9d6ea0e3f0cdb71562ce1fce30aa597445ea04f5b25a939cfe0a252171c600080a1005b346105325760003660031901126105325760206040516001600160a01b037f0000000000000000000000004200000000000000000000000000000000000006168152f35b3461053257600036600319011261053257602060ff60075460281c166040519015158152f35b3461053257600036600319011261053257602060405160ff7f0000000000000000000000000000000000000000000000000000000000000012168152f35b34610532576040366003190112610532576004356134c9613d70565b906134d261460d565b6001600160a01b03821691821580156137c3575b613799576134f2614b01565b5050505050600554916001600160801b03926135128285601c5416613f32565b11610c7b5761351f614dc8565b505015610c6a5761352f90614454565b926135386142a9565b928061354681610a4d614283565b16948181169586811061376e575082908160005260209687805260406000203360005288528783826040600020549061357e916142cf565b8160005282805260406000203360005283528060406000205560405190815233927f399f462d2df28f9d69d52cdcfd7e6ef0598b231d0b9baa75ae424e43195ffe8191a36135cc8188615aae565b968480848a97845116906135df916147a6565b168252808a83019281881682855116906135f8916147a6565b9382851690525116613620906001600160801b03166001600160801b0319601c541617601c55565b601c549160801b6001600160801b031916911617601c5582600052601f885260406000208481549061365191613f32565b905560405163a9059cbb60e01b8982015233602482015260448082019290925290815261367f606482614261565b6136a9907f00000000000000000000000042000000000000000000000000000000000000066158c7565b604080516001600160801b03929092168252602082019390935233927f01348584ec81ac7acd52b7d66d9ade986dd909f3d513881c190fc31c90527efe91a36136f06143f7565b50601a5491826136ff91615455565b156137135750506001600d55604051908152f35b601e846137356137216142a9565b84600052601f835260406000205490615be3565b9260005252610bbf60406000205492604051938493633b49de0f60e21b8552600485016040919493926060820195825260208201520152565b6040516362ddb6d760e11b815260048101919091526001600160801b03919091166024820152604490fd5b60046040517f1aa699c6000000000000000000000000000000000000000000000000000000008152fd5b508233146134e6565b34610532576060366003190112610532576137e5613d5a565b6137ed613d70565b604435906001600160a01b038316600052600960205260406000203360005260205260406000205492600019840361382a575b611a789350613f3f565b8284106138465761384183611a78950333836140f5565b613820565b606460405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152fd5b34610532576020366003190112610532576138a3613d9c565b6138ab6145e2565b506040516138b881614229565b6000815260006020820152610569604051916138d383614229565b60008352600060208401526138e661460d565b916138ef614b01565b92969350909661390b575b6001600d5560405196879687613de6565b92509050613917614283565b906139206142a9565b926138fa565b3461053257602061393636613dba565b1561395257610780916139476146ae565b509350505050615b45565b611c0b91611e53614283565b346105325760603660031901126105325760443560243560043561398061584b565b7fc9aa62b60be8f25ac9f285edbb80bde64199b3c53e1da1027058551d32695fca60c0600f5460105460115490604051928352602083015260408201528360608201528460808201528560a0820152a1600f55601055601155005b34610532576000366003190112610532576020601b5460801c604051908152f35b34610532576000366003190112610532576020600f54604051908152f35b3461053257600036600319011261053257602060ff600754166040519015158152f35b3461053257600036600319011261053257602060ff60075460081c166040519015158152f35b34610532576020366003190112610532576020610780613a816146ae565b50935050505060043590615aae565b3461053257604036600319011261053257611a78613aac613d5a565b60243590336140f5565b346105325760003660031901126105325760206001600160a01b0360005416604051908152f35b3461053257602036600319011261053257600435613af961584b565b60ff60225416613b3a577fe796e9ae748449310fcd1cc6718aab236c9b8d2e0e04dacb232ba564d5b338cc6040600e548151908152836020820152a1600e55005b60046040517f8c34a9b8000000000000000000000000000000000000000000000000000000008152fd5b34610532576020366003190112610532576020610780613b826146ae565b50935050505060043590615bb2565b3461053257600036600319011261053257604051600090601454600181811c90808316928315613c45575b6020938484108114611cf157838652908115611cd15750600114613bea5761056984611c6a81880382614261565b601460009081529294507fce6d7b5282bd9a3661ae061feed1dbda4e52ab073b1f9285be6e155d9c38d4ec5b828410613c32575050508161056993611c6a9282010193611c5a565b8054858501870152928501928101613c16565b91607f1691613bbc565b3461053257600036600319011261053257613c6861584b565b630100000063ff0000001960075416176007557fb949af551d0c88280e648f9205b986bb5f1d899c425498238655ee37617c0c39600080a1005b3461053257600036600319011261053257613cbb61460d565b6060613cc5614dc8565b906001600d55604051921515835260208301526040820152f35b346105325760003660031901126105325760206001600160801b03613d026146ae565b50516040519516855250505050f35b6020808252825181830181905290939260005b828110613d4657505060409293506000838284010152601f8019910116010190565b818101860151848201604001528501613d24565b600435906001600160a01b038216820361053257565b602435906001600160a01b038216820361053257565b604435906001600160a01b038216820361053257565b60043590811515820361053257565b60243590811515820361053257565b606090600319011261053257600435906024358015158103610532579060443580151581036105325790565b9194613e709197969461014094613e8d9761018086019a86526020860152604085015263ffffffff8082511660608601526020820151166080850152608060408201519167ffffffffffffffff80931660a08701528260608201511660c087015201511660e0840152610100830190602090816001600160801b0391828151168552015116910152565b0190602090816001600160801b0391828151168552015116910152565b565b606090600319011261053257600435906001600160a01b03906024358281168103610532579160443590811681036105325790565b600435906001600160801b038216820361053257565b6001600160a01b03600254163303613eee57565b606460405162461bcd60e51b815260206004820152602060248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152fd5b919082018092116116ad57565b6001600160a01b0380911691821561408b57169182156140215760008281526008602052604081205491808310613fb757604082827fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef95876020965260088652038282205586815220818154019055604051908152a3565b608460405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206260448201527f616c616e636500000000000000000000000000000000000000000000000000006064820152fd5b608460405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201527f65737300000000000000000000000000000000000000000000000000000000006064820152fd5b608460405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f20616460448201527f64726573730000000000000000000000000000000000000000000000000000006064820152fd5b6001600160a01b038091169182156141c057169182156141565760207f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925918360005260098252604060002085600052825280604060002055604051908152a3565b608460405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f20616464726560448201527f73730000000000000000000000000000000000000000000000000000000000006064820152fd5b608460405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152fd5b6040810190811067ffffffffffffffff82111761158a57604052565b60a0810190811067ffffffffffffffff82111761158a57604052565b90601f8019910116810190811067ffffffffffffffff82111761158a57604052565b6040519061429082614229565b601b546001600160801b038116835260801c6020830152565b604051906142b682614229565b601c546001600160801b038116835260801c6020830152565b919082039182116116ad57565b60ff60075460101c166143725761434d6001600160a01b036142fc6146ae565b95935096919350501690600030831460001461435e575061432a916000526008602052604060002054613f32565b905b6143466001600160801b03918280875116915116906145c9565b1692615bb2565b80821015614359575090565b905090565b90506040918152600860205220549061432c565b50600090565b60ff60075460101c16614372576143c06001600160a01b036143986146ae565b929694509250506143b96001600160801b03918280855116915116906145c9565b1690615b18565b92169060003083036143e4575061434d916000526008602052604060002054613f32565b905060409181526008602052205461434d565b6040519061440482614245565b6017546001600160a01b038116835260a01c63ffffffff16602083015260185476ffffffffffffffffffffffffffffffffffffffffffffff1660408301526019546060830152601a546080830152565b6001600160801b0390818111614468571690565b608460405162461bcd60e51b815260206004820152602760248201527f53616665436173743a2076616c756520646f65736e27742066697420696e203160448201527f32382062697473000000000000000000000000000000000000000000000000006064820152fd5b6001600160a01b0380600454163314159081614562575b81614535575b81614526575b506144fc57565b60046040517f1d1e647b000000000000000000000000000000000000000000000000000000008152fd5b905060015416331415386144f5565b337f0000000000000000000000005c0801270b471311e3bf7bb3637a7d12b13d747c8216141591506144ef565b80915060025416331415906144e9565b6001600160a01b03806002541633141590816145ba575b5061459057565b60046040517f6f545269000000000000000000000000000000000000000000000000000000008152fd5b90506001541633141538614589565b6001600160801b0391821690821603919082116116ad57565b604051906145ef82614245565b60006080838281528260208201528260408201528260608201520152565b6002600d541461461e576002600d55565b606460405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152fd5b6040519061466f82614245565b81608060165463ffffffff80821684528160201c16602084015267ffffffffffffffff808260401c16604085015281831c16606084015260c01c910152565b600090819081806146bd6145e2565b508060206040516146cd81614229565b828152015260206040516146e081614229565b82815201526146ed614662565b936146f7856147c1565b8051909490156147435750505060608201519260808301519260a08101519267ffffffffffffffff806020840151166060850152604083015116608084015260e060c083015192015190565b92909350614752949194614283565b9061475b6142a9565b90565b818102929181159184041417156116ad57565b811561477b570490565b634e487b7160e01b600052601260045260246000fd5b519067ffffffffffffffff8216820361053257565b9190916001600160801b03808094169116019182116116ad57565b60408051929167ffffffffffffffff919061010085018381118682101761158a57825260009182865260208087019284845282880190858252606089019386855260808a019587875260a08b0198888a5260c08c0194835161482281614229565b8a81528a88820152865260e08d0193805161483c81614229565b8b81528b8982015285528d818701908482511642141580614af1575b61486d575b5050505050505050505050505050565b61489291600186925261487e614283565b8a526148886142a9565b88525116426142cf565b916001600160801b039b8c8951511615600014614ab457805b836001600160a01b03601254169160648860808d01511691835194859384927fcd3181d50000000000000000000000000000000000000000000000000000000084528b6004850152602484015260448301525afa918215614aa95780948193614a44575b5050509284809361493a9361494397670de0b6b3a764000099971690521684528c875151169061475e565b9151169061475e565b04808652878115159182614a2a575b505080614a11575b61496a575b80808080808061485d565b63ffffffff9184918861498681895116925192828451166147a6565b169052878651168861499d865192828451166147a6565b16905201511692836149b0575b8061495f565b614a02946149ec6149de620186a06149cd8a986149f2965161475e565b04808452878787510151169061475e565b9186855151169051906142cf565b90614771565b80965251019316828451166147a6565b169052388080808080806149aa565b5086614a238651828651511690613f32565b111561495a565b81614a3b9293508451511690613f32565b11158738614952565b919450915083813d8111614aa2575b614a5d8183614261565b81010312614a9f5750670de0b6b3a76400009492848361493a9382614a908e614a896149439b99614791565b9401614791565b9497995050938195975061490f565b80fd5b503d614a53565b8451903d90823e3d90fd5b8c87515116620186a09080820291820403614add57614ad8908e8b51511690614771565b6148ab565b602482634e487b7160e01b81526011600452fd5b5060ff60075460301c1615614858565b600090600090600090600090614b156145e2565b50614b1e614662565b90614b28826147c1565b8051151580614b35575050565b935095509250925092606081015192608092838301519360a084015193606084019067ffffffffffffffff80835116928487018281511692602095868601828151169189604097888a019486865116918a519485528c8501528984015260608301527fc63977c8e2362a31182dc8e89a52252f9836922738e0abcfc0de6924972eafe591a18d838251168751918252898201528d87820152898d60608301527f2b5229f33f1d24d5baab718e1e25d0d86195a9b6d786c2c0868edfb21a460e2591a151938285169052519181831690524216838901524363ffffffff1680895285890151861b67ffffffff00000000169160c01b7fffffffffffffffff000000000000000000000000000000000000000000000000169342901b6fffffffffffffffff00000000000000001691171790851b77ffffffffffffffff0000000000000000000000000000000016171760165560c081015191806001600160801b039384815116614cba906001600160801b03166001600160801b0319601b541617601b55565b015191601b54846001600160801b03198095881b16911617601b5560e0015183815116614cfd906001600160801b03166001600160801b0319601c541617601c55565b0151601c54931b16911617601c5582614d1257565b613e8d83305b6001600160a01b0316908115614d77577fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef602082614d5a600094600a54613f32565b600a558484526008825260408420818154019055604051908152a3565b606460405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152fd5b5190811515820361053257565b600090600090614dd66143f7565b906040918281019376ffffffffffffffffffffffffffffffffffffffffffffff93848651164214156000146150555760046001600160a01b03966060888651168451938480927fbd9a548b0000000000000000000000000000000000000000000000000000000082525afa90811561504857849885938693614fd1575b5090614eb683927fc1f41e029acf5127d111625602160c4cee3e1a4d38e691e50544d1f7c68b77be9695949a859c614f9f575b42168093528460608a01528360808a01528851166001600160a01b03166001600160a01b03196017541617601755565b60208701517fffffffffffffffff00000000ffffffffffffffffffffffffffffffffffffffff77ffffffff00000000000000000000000000000000000000006017549260a01b169116176017557fffffffffffffffffff000000000000000000000000000000000000000000000060185416176018558160195580601a5582519182526020820152a15b60808201614f5481516060850151906142cf565b91620186a09280840293840403614f8b5750614f7963ffffffff926020925190614771565b920151161015614f8557565b60019350565b80634e487b7160e01b602492526011600452fd5b7ffc131c36b7e444dacda44901fd43641dcdcfdc43fe9e2601b3c1dd87061db9e56020838c51168951908152a1614e86565b9950915091506060883d8211615040575b81614fef60609383614261565b8101031261503c57907fc1f41e029acf5127d111625602160c4cee3e1a4d38e691e50544d1f7c68b77be929161502489614dbb565b60208a01519984015190999394509190614eb6614e53565b8380fd5b3d9150614fe2565b50505051903d90823e3d90fd5b50606082015160808301519095509350614f40565b7fdcbc1c05240f31ff3ad067ef1ee35ce4997762752e3a095284754544f4c709d79192936151426001600160a01b03926001600160801b0390816150b188828451166147a6565b1681526150f8826020830192816150cb8c828751166147a6565b1684526150da828c1688614d18565b51166001600160801b03166001600160801b0319601b541617601b55565b51816001600160801b0319601b549260801b16911617601b55604051906323b872dd60e01b60208301523360248301523060448301528616606482015260648152610c0281614245565b604080516001600160801b03958616815295909416602086015216923392819081015b0390a3565b9091926151a76001600160a01b039283871696873303615403575b5061518e6142a9565b6001600160801b039283918280855116915116906145c9565b1691808616928381106153da5750806151c387828551166145c9565b16825260209161520282848301926151de8b838651166145c9565b93828516905251166001600160801b03166001600160801b0319601b541617601b55565b816001600160801b0319601b549260801b16911617601b558616918715615370578760005260088252604092836000205481811061530757610c0284610bf47ffbde797d201c681b91056529119e0b02407c7bb96a4a2c75c01fc9667232c8db9998979560008e7fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef6153029a896152de9a63a9059cbb60e01b9a85875260088452038c86205580600a5403600a558b51908152a386519485938401528860248401602090939291936001600160a01b0360408201951681520152565b516001600160801b0395861681529590941660208601521692339281906040820190565b0390a4565b60848486519062461bcd60e51b82526004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e60448201527f63650000000000000000000000000000000000000000000000000000000000006064820152fd5b6084826040519062461bcd60e51b82526004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f2061646472657360448201527f73000000000000000000000000000000000000000000000000000000000000006064820152fd5b6040516362ddb6d760e11b815260048101919091526001600160801b0387166024820152604490fd5b87600052600960205260406000203360005260205260406000205490600019820361542f575b50615185565b61544661544e926001600160801b038a16906142cf565b9033906140f5565b3880615429565b90600e549182156154f2576001600160a01b036154706142a9565b91169161548c600092848452601f602052604084205490615be3565b9283156154e8578252601e60205260408220549283156154e057670de0b6b3a7640000916154b99161475e565b0490620186a091828102928184041490151715614f8b5750906154db91614771565b111590565b505091505090565b5050505050600190565b505050600190565b9160207fa32435755c235de2976ed44a75a2f85cb01faf0c894f639fe0c32bb9455fea8f916001600160a01b038091169485600052601e83526040600020615543868254613f32565b905561555185601d54613f32565b601d551692308403615567575b604051908152a3565b6155be6040516323b872dd60e01b848201528560248201523060448201528260648201526064815261559881614245565b7f0000000000000000000000002416092f143378750bb29b79ed961ab195cceea56158c7565b61555e565b6001600160a01b038093169283600052601e60205260406000206155e88382546142cf565b90556155f682601d546142cf565b601d5582169181308403615635575b50506040519081527fbc290bb45104f73cf92115c9603987c3f8fd30c182a13603d8cffa49b5f5995260203392a4565b60405163a9059cbb60e01b60208201526001600160a01b039092166024830152604482015261566b906155988160648101610bf4565b3881615605565b93907f9dc1449a0ff0c152e18e8289d865b47acc6e1b76b1ecb239c13d6ee22a9206a792916001600160801b0394856156ae84828a51166145c9565b16875260208701866156c386828451166145c9565b168152615711876001600160a01b03809516998a600052601f60205260406000206156f1838a1682546142cf565b905551166001600160801b03166001600160801b0319601c541617601c55565b51866001600160801b0319601c549260801b16911617601c551693308503615758575b50604080516001600160801b03928316815292909116602083015281908101615165565b61578d90604051906323b872dd60e01b60208301528660248301523060448301528316606482015260648152610c0281614245565b38615734565b7f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81116157bd5790565b608460405162461bcd60e51b815260206004820152602860248201527f53616665436173743a2076616c756520646f65736e27742066697420696e206160448201527f6e20696e743235360000000000000000000000000000000000000000000000006064820152fd5b91908110156116f85760051b0190565b356001600160a01b03811681036105325790565b6001600160a01b0360015416330361585f57565b60046040517f1c0be90a000000000000000000000000000000000000000000000000000000008152fd5b6001600160a01b0360005416330361589d57565b60046040517ff5c49e64000000000000000000000000000000000000000000000000000000008152fd5b6001600160a01b0316906040516158dd81614229565b6020928382527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564848301526000808486829651910182855af13d15615a14573d9167ffffffffffffffff8311615a0057906159589392916040519261594b88601f19601f8401160185614261565b83523d868885013e615a1e565b908151908382159283156159de575b5050509050156159745750565b6084906040519062461bcd60e51b82526004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152fd5b848092939450010312614a9f5750816159f79101614dbb565b80388381615967565b602485634e487b7160e01b81526041600452fd5b9061595892916060915b91929015615a7f5750815115615a32575090565b3b15615a3b5790565b606460405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152fd5b825190915015615a925750805190602001fd5b610bbf9060405191829162461bcd60e51b835260048301613d11565b91906001600160801b038084511615600014615ac957509150565b615b02906020850190615af981615af0615ae6828651168861475e565b828a511690614771565b9751168761475e565b91511690614771565b10615b0957565b90600181018091116116ad5790565b6001600160801b038082511615600014615b3157505090565b615af961475b93826020850151169061475e565b90916001600160801b038083511615600014615b615750505090565b602083959492930190615b84615b7a828451168561475e565b8288511690614771565b9584615b95575b50505050615b0957565b615ba893945081615af99151168761475e565b1038808080615b8b565b60208101906001600160801b03908183511615600014615bd25750505090565b61475b9382615af99251169061475e565b919060208301926001600160801b038085511615600014615c05575090925050565b9081615af981615af0615ae6615b02968651168861475e565b909160208201916001600160801b038084511615600014615c40575050505090565b615b84615b7a8284989795969851168561475e56fea2646970667358221220950145088734ec1324c4998366cd7e7f4c0e7a1d4d28aecb58ab68af82f2cdac64736f6c63430008150033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000001a00000000000000000000000000000000000000000000000000000000000000220000000000000000000000000000000000000000000000000000000000000012000000000000000000000000042000000000000000000000000000000000000060000000000000000000000002416092f143378750bb29b79ed961ab195cceea500000000000000000000000061EeA4770d7E15e7036f8632f4bcB33AF1Af1e250000000000000000000000000000000000000000000000000000000000000000000000000000000000000000942C5B9502aAB7cA792dEB9a456D88efd31F7eCf000000000000000000000000000000000000000000000000000000046d490d3e0000000000000000000000000000000000000000000000000000000000015f900000000000000000000000000000000000000000000000000000000000000bb8000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000600000000000000000000000002532c3d363306fa6d625e4cbad996bcf534e81540000000000000000000000002532c3d363306fa6d625e4cbad996bcf534e81540000000000000000000000002532c3d363306fa6d625e4cbad996bcf534e81540000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000012000000000000000000000000000000000000000000000000000000000000003553747572647920496e7465726573742042656172696e672057455448202852656e7a6f2052657374616b65642045544829202d20310000000000000000000000000000000000000000000000000000000000000000000000000000000000000e665745544828657a455448292d31000000000000000000000000000000000000
-----Decoded View---------------
Arg [0] : _configData (bytes): 0x00000000000000000000000042000000000000000000000000000000000000060000000000000000000000002416092f143378750bb29b79ed961ab195cceea500000000000000000000000061eea4770d7e15e7036f8632f4bcb33af1af1e250000000000000000000000000000000000000000000000000000000000000000000000000000000000000000942c5b9502aab7ca792deb9a456d88efd31f7ecf000000000000000000000000000000000000000000000000000000046d490d3e0000000000000000000000000000000000000000000000000000000000015f900000000000000000000000000000000000000000000000000000000000000bb80000000000000000000000000000000000000000000000000000000000000000
Arg [1] : _immutables (bytes): 0x0000000000000000000000002532c3d363306fa6d625e4cbad996bcf534e81540000000000000000000000002532c3d363306fa6d625e4cbad996bcf534e81540000000000000000000000002532c3d363306fa6d625e4cbad996bcf534e8154
Arg [2] : _customConfigData (bytes): 0x000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000012000000000000000000000000000000000000000000000000000000000000003553747572647920496e7465726573742042656172696e672057455448202852656e7a6f2052657374616b65642045544829202d20310000000000000000000000000000000000000000000000000000000000000000000000000000000000000e665745544828657a455448292d31000000000000000000000000000000000000
-----Encoded View---------------
26 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000060
Arg [1] : 00000000000000000000000000000000000000000000000000000000000001a0
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000220
Arg [3] : 0000000000000000000000000000000000000000000000000000000000000120
Arg [4] : 0000000000000000000000004200000000000000000000000000000000000006
Arg [5] : 0000000000000000000000002416092f143378750bb29b79ed961ab195cceea5
Arg [6] : 00000000000000000000000061EeA4770d7E15e7036f8632f4bcB33AF1Af1e25
Arg [7] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [8] : 000000000000000000000000942C5B9502aAB7cA792dEB9a456D88efd31F7eCf
Arg [9] : 000000000000000000000000000000000000000000000000000000046d490d3e
Arg [10] : 0000000000000000000000000000000000000000000000000000000000015f90
Arg [11] : 0000000000000000000000000000000000000000000000000000000000000bb8
Arg [12] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [13] : 0000000000000000000000000000000000000000000000000000000000000060
Arg [14] : 0000000000000000000000002532c3d363306fa6d625e4cbad996bcf534e8154
Arg [15] : 0000000000000000000000002532c3d363306fa6d625e4cbad996bcf534e8154
Arg [16] : 0000000000000000000000002532c3d363306fa6d625e4cbad996bcf534e8154
Arg [17] : 0000000000000000000000000000000000000000000000000000000000000100
Arg [18] : 0000000000000000000000000000000000000000000000000000000000000060
Arg [19] : 00000000000000000000000000000000000000000000000000000000000000c0
Arg [20] : 0000000000000000000000000000000000000000000000000000000000000012
Arg [21] : 0000000000000000000000000000000000000000000000000000000000000035
Arg [22] : 53747572647920496e7465726573742042656172696e67205745544820285265
Arg [23] : 6e7a6f2052657374616b65642045544829202d20310000000000000000000000
Arg [24] : 000000000000000000000000000000000000000000000000000000000000000e
Arg [25] : 665745544828657a455448292d31000000000000000000000000000000000000
Deployed Bytecode Sourcemap
918:22449:13:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1399:12:23;918:22449:13;1399:12:23;;;918:22449:13;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;918:22449:13;;;;;3729:40:17;918:22449:13;;3729:40:17;918:22449:13;;3729:40:17;918:22449:13;3729:40:17;918:22449:13;;;;;;-1:-1:-1;;;;;918:22449:13;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;918:22449:13;;;;4040:30:17;918:22449:13;;;;-1:-1:-1;;;;;918:22449:13;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;918:22449:13;;;;4172:128:18;;:::i;:::-;-1:-1:-1;;;;;;918:22449:13;;;;;;3588:15:18;918:22449:13;3273:10:18;;-1:-1:-1;;;;;918:22449:13;;3568:50:18;918:22449:13;3568:50:18;;918:22449:13;3273:10:18;918:22449:13;3588:15:18;918:22449:13;;;;;;;;-1:-1:-1;;918:22449:13;;;;;;:::i;:::-;;;41945:12:17;;;41944:69;;;918:22449:13;41940:139:17;;42110:10;918:22449:13;;;;;-1:-1:-1;;;;;918:22449:13;;;;;;;;;;;;;;;;;;;;;42158:61:17;918:22449:13;42110:10:17;42158:61;;918:22449:13;41940:139:17;918:22449:13;;;42036:32:17;;;;41944:69;41984:10;;918:22449:13;;;;;;;;-1:-1:-1;;;;;918:22449:13;;;;;;;;;;41963:49:17;;41944:69;;918:22449:13;;;;;;-1:-1:-1;;918:22449:13;;;;;1953:21:17;918:22449:13;;;;;;;;;;;;;-1:-1:-1;;918:22449:13;;;;;;:::i;:::-;1063:62:0;;:::i;:::-;-1:-1:-1;;;;;918:22449:13;;;;;-1:-1:-1;;;;;;1228:24:1;918:22449:13;;;1228:24:1;918:22449:13;1273:6:0;918:22449:13;;1267:43:1;918:22449:13;1267:43:1;;918:22449:13;;;;;;;-1:-1:-1;;918:22449:13;;;;;;1164:28:14;918:22449:13;;;;;;;;;;;;;;;;;;-1:-1:-1;;918:22449:13;;;;;25609:36:17;25561:20;;:::i;:::-;918:22449:13;;;;;;;;25609:36:17;;:::i;:::-;918:22449:13;;;;;;;;;;;;-1:-1:-1;;918:22449:13;;;;;-1:-1:-1;;;;;2549:37:17;918:22449:13;;;;;;;;;;;;;;-1:-1:-1;;918:22449:13;;;;;865:47:14;918:22449:13;;;;;;;;;;;;;-1:-1:-1;;918:22449:13;;;;;;:::i;:::-;21769:121;;;;;;:::i;:::-;21903:30;918:22449;;;;;;;21899:65;;4366:24:14;918:22449:13;;;;;;;;;;;;;;;;21903:30;918:22449;;;;;;4366:24:14;918:22449:13;21899:65;918:22449;;;21942:22;;;;21769:121;;;:::i;:::-;;;918:22449;;;;;;-1:-1:-1;;918:22449:13;;;;;2464:37:17;918:22449:13;;;;;;;;;;-1:-1:-1;;918:22449:13;;;;;;:::i;:::-;47516:46:17;918:22449:13;-1:-1:-1;;;;;918:22449:13;;:::i;:::-;1063:62:0;;;:::i;:::-;918:22449:13;;;;;47457:21:17;918:22449:13;;47457:44:17;918:22449:13;;;;;;;;;;;;;;;;;;;47457:44:17;918:22449:13;;;;;;;47516:46:17;918:22449:13;;;;;;;-1:-1:-1;;918:22449:13;;;;20175:102;;:::i;:::-;918:22449;2813:20:14;918:22449:13;2848:22:14;918:22449:13;;;;;;2848:22:14;918:22449:13;;;;;;;-1:-1:-1;;918:22449:13;;;;2848:22:14;918:22449:13;;;20398:124;;:::i;:::-;918:22449;2813:20:14;918:22449:13;;;;;;2848:22:14;918:22449:13;;;;;;;-1:-1:-1;;918:22449:13;;;;;;;;;;:::i;:::-;2227:103:3;;;:::i;:::-;-1:-1:-1;;;;;918:22449:13;;38735:23:17;;;38731:53;;38835:14;;:::i;:::-;918:22449:13;;;;;38945:11:17;918:22449:13;;-1:-1:-1;;;;;918:22449:13;38959:34:17;918:22449:13;;38959:11:17;918:22449:13;;38959:34:17;:::i;:::-;-1:-1:-1;38941:81:17;;39145:21;;:::i;:::-;39180:17;;;39176:57;;39292:21;39480:25;39292:21;39288:109;;918:22449:13;39480:25:17;;:::i;:::-;918:22449:13;;:::i;:::-;;;9029:40:17;918:22449:13;;;:::i;:::-;;;;;;;9029:40:17;;:::i;:::-;918:22449:13;;;;35004:32:17;;;;35000:131;;35235:42;;;;;:::i;:::-;918:22449:13;;35371:36:17;918:22449:13;;;;;35371:36:17;:::i;:::-;918:22449:13;;;;35417:19:17;918:22449:13;35417:19:17;;;;918:22449:13;35417:44:17;918:22449:13;;;;;;;35417:44:17;:::i;:::-;918:22449:13;;;;;;;;-1:-1:-1;;;;;918:22449:13;-1:-1:-1;;;;;;40413:11:17;918:22449:13;;;40413:11:17;918:22449:13;;;-1:-1:-1;;;;;;38959:11:17;918:22449:13;;;;;;;;38959:11:17;918:22449:13;38683:10:17;918:22449:13;;35663:16:17;918:22449:13;;;;;35663:44:17;918:22449:13;;;35663:44:17;:::i;:::-;918:22449:13;;35767:4:17;35746:26;;35742:109;;918:22449:13;-1:-1:-1;;918:22449:13;;;-1:-1:-1;;;;;918:22449:13;;;;;;;;;;;;38683:10:17;;35865:63;;918:22449:13;35865:63:17;918:22449:13;;:::i;:::-;;10447:33:17;918:22449:13;10425:56:17;38683:10;;10425:56;:::i;:::-;10424:57;10420:292;;918:22449:13;;2809:22:3;918:22449:13;;;;;;;10420:292:17;918:22449:13;10604:21:17;10531:55;918:22449:13;;:::i;:::-;38683:10:17;918:22449:13;;35663:16:17;918:22449:13;;;;;;10531:55:17;;:::i;:::-;38683:10;;918:22449:13;;;10504:197:17;918:22449:13;;;;;;;10504:197:17;;;-1:-1:-1;;;10504:197:17;;918:22449:13;10504:197:17;;918:22449:13;;;;;;;;;;;;;;;;;;10504:197:17;;;;35742:109;918:22449:13;;-1:-1:-1;;;1050:58:8;;;;-1:-1:-1;;;;;918:22449:13;;;;1050:58:8;;918:22449:13;;;;;1050:58:8;;;918:22449:13;;;;1050:58:8;;;;;;;;;;:::i;:::-;35788:13:17;1050:58:8;:::i;:::-;35742:109:17;;;;35000:131;918:22449:13;;-1:-1:-1;;;35059:61:17;;918:22449:13;35059:61:17;;918:22449:13;;;;-1:-1:-1;;;;;918:22449:13;;;;;;;;10504:197:17;39288:109;39375:10;38683;;;;39375;:::i;:::-;39288:109;;;39176:57;918:22449:13;;;-1:-1:-1;;;39206:27:17;;;38941:81;918:22449:13;;;39002:20:17;;;;38731:53;918:22449:13;;;38767:17:17;;;;918:22449:13;;;;;;-1:-1:-1;;918:22449:13;;;;;812:46:14;918:22449:13;;;;;;;;;;;;;-1:-1:-1;;918:22449:13;;;;;-1:-1:-1;;;;;926:13:1;918:22449:13;;;;;;;;;;;;;;-1:-1:-1;;918:22449:13;;;;;;:::i;:::-;;;:::i;:::-;;-1:-1:-1;;;;;918:22449:13;;;;;4102:11:4;918:22449:13;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;918:22449:13;;;;;;:::i;:::-;;;:::i;:::-;1063:62:0;;;:::i;:::-;17339:946:13;-1:-1:-1;;;;;918:22449:13;;17467:24;;;17463:54;;918:22449;;;;:::i;:::-;;-1:-1:-1;;;;;918:22449:13;;;17684:12;17680:61;;918:22449;;18207:71;918:22449;;18031:13;918:22449;;;;17858:35;;;;;;:::i;:::-;17928:10;17904:44;17928:10;;17921:4;17904:44;:::i;:::-;17921:4;17979:29;;;;:::i;:::-;18031:13;;:::i;:::-;17921:4;918:22449;;18083:21;918:22449;;18178:13;918:22449;;;;17921:4;;18178:13;;;:::i;:::-;918:22449;;;;;;;;;;;;;;;;;;18207:71;918:22449;;;;;;17680:61;17734:4;918:22449;;;;3519:9:4;918:22449:13;;;;;;;;;-1:-1:-1;17680:61:13;;918:22449;;;;;;-1:-1:-1;;918:22449:13;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;-1:-1:-1;;918:22449:13;;;;;;:::i;:::-;2227:103:3;;:::i;:::-;-1:-1:-1;;;;;918:22449:13;;46273:23:17;46269:53;;46333:14;;:::i;:::-;46247:10;;;;;;918:22449:13;;46439:16:17;918:22449:13;;;;;;46435:185:17;;918:22449:13;46677:10:17;46247;;918:22449:13;;;46677:10:17;:::i;:::-;918:22449:13;;:::i;:::-;;10447:33:17;918:22449:13;10425:56:17;46247:10;;10425:56;:::i;:::-;10424:57;10420:292;;918:22449:13;2809:22:3;918:22449:13;;10420:292:17;10531:55;918:22449:13;;:::i;:::-;46247:10:17;918:22449:13;;46439:16:17;918:22449:13;;;;;;10531:55:17;;:::i;:::-;46247:10;918:22449:13;;10604:21:17;918:22449:13;;10504:197:17;918:22449:13;;;;;;;10504:197:17;;;-1:-1:-1;;;10504:197:17;;918:22449:13;10504:197:17;;918:22449:13;;;;;;;;;;;;;;;;;;46435:185:17;46517:21;;:::i;:::-;46556:17;;46435:185;46552:57;918:22449:13;;;-1:-1:-1;;;46582:27:17;;;918:22449:13;;;;;;-1:-1:-1;;918:22449:13;;;;;;;-1:-1:-1;;;;;676:41:14;918:22449:13;;;;;;;;;;-1:-1:-1;;918:22449:13;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;-1:-1:-1;;918:22449:13;;;;;5095:20;;:::i;:::-;918:22449;;;;;;-1:-1:-1;;;;;918:22449:13;;5193:18;918:22449;;;;5193:18;;918:22449;;;5193:18;918:22449;;;;5292:19;;918:22449;;;5340:15;918:22449;;;;;;;5193:18;918:22449;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;918:22449:13;;;;;;:::i;:::-;2227:103:3;;:::i;:::-;-1:-1:-1;;;;;918:22449:13;;44001:23:17;43997:53;;44131:9;44061:14;;;:::i;:::-;918:22449:13;;;;;;;44100:10:17;44131:9;:::i;:::-;918:22449:13;2809:22:3;918:22449:13;;;;;;;;-1:-1:-1;;918:22449:13;;;;;;;:::i;:::-;;;;;;;;;;;;;;;:::i;:::-;;;;;;-1:-1:-1;;918:22449:13;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2227:103:3;;:::i;:::-;60460:14:17;;:::i;:::-;60593:21;;;;;;;:::i;:::-;60628:17;;;60624:57;;-1:-1:-1;;;;;918:22449:13;;;;60802:8:17;918:22449:13;;;;;;;;60801:26:17;60797:76;;918:22449:13;;;;;;;-1:-1:-1;;;;;60886:8:17;918:22449:13;;;60886:8:17;:::i;:::-;60768:18;;918:22449:13;;;;;60886:40:17;60882:129;;918:22449:13;;;;-1:-1:-1;;918:22449:13;;;;;;;61024:23:17;;918:22449:13;;;;;;;;61024:23:17;:::i;:::-;;:::i;:::-;-1:-1:-1;;;;;60716:13:17;;918:22449:13;;;61024:50:17;61020:149;;60364:10;61408;60364;61401:4;918:22449:13;;61408:10:17;:::i;:::-;918:22449:13;;;61454:63:17;;-1:-1:-1;;;;;918:22449:13;;;61454:63:17;;918:22449:13;;;;;;;;;;;;;;;;;-1:-1:-1;;61454:63:17;;;;;;;;918:22449:13;;;;61648:39:17;-1:-1:-1;;;61648:39:17;;61401:4;918:22449:13;61648:39:17;;918:22449:13;;60716:13:17;918:22449:13;60716:13:17;-1:-1:-1;;;;;60716:13:17;918:22449:13;61648:39:17;;;;;;;918:22449:13;61648:39:17;;;918:22449:13;;;;61697:198:17;;918:22449:13;61697:198:17;;918:22449:13;;;;;;61697:198:17;;918:22449:13;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;61401:4:17;;;;;918:22449:13;61401:4:17;;918:22449:13;;;;61870:15:17;918:22449:13;;;;61697:198:17;918:22449:13;;-1:-1:-1;;;;;918:22449:13;;61697:198:17;;;;;;;;918:22449:13;;;;61934:39:17;-1:-1:-1;;;61934:39:17;;61401:4;918:22449:13;61934:39:17;;918:22449:13;;60716:13:17;918:22449:13;60716:13:17;-1:-1:-1;;;;;60716:13:17;918:22449:13;61934:39:17;;;;;;918:22449:13;61934:39:17;;;918:22449:13;62131:41:17;;;;:::i;:::-;918:22449:13;;;62186:36:17;;62182:126;;918:22449:13;;:::i;:::-;62702:10:17;62399:45;;;;:::i;:::-;62630:27;;;;:::i;:::-;60364:10;61401:4;;62659:26;;;;:::i;:::-;62702:10;;:::i;:::-;-1:-1:-1;;;;;918:22449:13;;;;;;;;;;;;;;;;;;;;;62729:105:17;918:22449:13;60364:10:17;62729:105;;918:22449:13;;:::i;:::-;;10447:33:17;918:22449:13;60364:10:17;10425:56;60364:10;;10425:56;:::i;:::-;10424:57;10420:292;;918:22449:13;;;2809:22:3;918:22449:13;;;;;;;10420:292:17;918:22449:13;10531:55:17;918:22449:13;;:::i;62182:126:17:-;918:22449:13;;;;62245:52:17;;;;918:22449:13;;;62245:52:17;;918:22449:13;;;;;62245:52:17;61934:39;;918:22449:13;61934:39:17;;918:22449:13;61934:39:17;;;;;;918:22449:13;61934:39:17;;;:::i;:::-;;;918:22449:13;;;;62131:41:17;918:22449:13;;61934:39:17;;;;;-1:-1:-1;61934:39:17;;;918:22449:13;;;;;;;;;61697:198:17;;;918:22449:13;61697:198:17;;;;;;:::i;:::-;;;918:22449:13;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;61697:198:17;;;;918:22449:13;;;;;;;;;;;;;;-1:-1:-1;;;918:22449:13;;;;;;;;;;;-1:-1:-1;918:22449:13;;;;-1:-1:-1;;;;;918:22449:13;;;;;;;;;-1:-1:-1;;;;;918:22449:13;;;;;;;;;;;;;;;;61648:39:17;;;;918:22449:13;61648:39:17;;918:22449:13;61648:39:17;;;;;;918:22449:13;61648:39:17;;;:::i;:::-;;;918:22449:13;;;;;61648:39:17;;;;;;;-1:-1:-1;61648:39:17;;61454:63;918:22449:13;61454:63:17;;918:22449:13;61454:63:17;;;;;;918:22449:13;61454:63:17;;;:::i;:::-;;;918:22449:13;;;;;;;:::i;:::-;;61454:63:17;;;;;;-1:-1:-1;61454:63:17;;61020:149;61134:23;;61097:61;918:22449:13;;;;;;;;;61134:23:17;:::i;:::-;918:22449:13;;-1:-1:-1;;;61097:61:17;;60716:13;-1:-1:-1;;;;;918:22449:13;;;;61097:61:17;;918:22449:13;;;;;;;;;;;;;;;;;-1:-1:-1;;;918:22449:13;;;;;;;;60882:129:17;60991:8;918:22449:13;;;60991:8:17;:::i;:::-;918:22449:13;;-1:-1:-1;;;60949:51:17;;-1:-1:-1;;;;;918:22449:13;;;;60949:51:17;;918:22449:13;;;;;;;;;10504:197:17;918:22449:13;-1:-1:-1;;;918:22449:13;;;;;;;;60797:76:17;918:22449:13;;;60850:12:17;;;;918:22449:13;;;;;;-1:-1:-1;;918:22449:13;;;;;;;-1:-1:-1;;;;;1803:42:17;918:22449:13;;;;;;;;;;-1:-1:-1;;918:22449:13;;;;;;:::i;:::-;;;9587:40;9438:20;;:::i;:::-;918:22449;;;;;;-1:-1:-1;;;;;918:22449:13;;;9512:12;918:22449;9490:74;:34;;;;:74;:34;;;:74;;918:22449;9490:74;9587:40;:::i;9490:74::-;9531:33;;;:::i;:::-;9490:74;9587:40;:::i;918:22449::-;;;;;;-1:-1:-1;;918:22449:13;;;;;1079:29:14;918:22449:13;;;;;;;;;;;;;;;;;;;-1:-1:-1;;918:22449:13;;;;3155:23:14;918:22449:13;;;20833:126;;:::i;:::-;918:22449;3119:21:14;918:22449:13;;;;;;3155:23:14;918:22449:13;;;;;;;-1:-1:-1;;918:22449:13;;;;;;1030:42:14;918:22449:13;;;;;;;;;;;;;;;;;;;:::i;:::-;2227:103:3;;;;:::i;:::-;-1:-1:-1;;;;;918:22449:13;;31128:23:17;31124:53;;918:22449:13;31255:16:17;918:22449:13;;;;31251:45:17;;918:22449:13;31347:14:17;31737:6;31347:14;;;:::i;:::-;918:22449:13;;;;;;;:::i;:::-;31568:36:17;;;;:::i;:::-;31676:27;31705:19;31676:27;;;:::i;:::-;31705:19;;:::i;:::-;31737:6;;:::i;:::-;1716:1:3;2809:22;918:22449:13;;;;;;;31251:45:17;918:22449:13;;;31280:16:17;;;;918:22449:13;;;;;;-1:-1:-1;;918:22449:13;;;;;;12878:33;918:22449;;;;;;;;;;;;;;;;-1:-1:-1;;918:22449:13;;;;-1:-1:-1;;;;;918:22449:13;;:::i;:::-;;;;3519:9:4;918:22449:13;;;;;;4230:16;918:22449;;;;;;;4291:21;918:22449;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;918:22449:13;;;;-1:-1:-1;;;;;918:22449:13;;:::i;:::-;;;;4443:56:17;918:22449:13;;;;;;;;;;;;;;;;;;;;:::i;:::-;2227:103:3;;;;:::i;:::-;-1:-1:-1;;;;;918:22449:13;;32845:23:17;32841:53;;918:22449:13;32972:16:17;918:22449:13;;;;32968:45:17;;918:22449:13;33064:14:17;33449:6;33064:14;;;:::i;:::-;918:22449:13;;;;;;;:::i;:::-;33390:19:17;33283:35;;;;:::i;:::-;33390:19;;:::i;:::-;33411:25;;;:::i;918:22449:13:-;;:::i;:::-;;;;;;-1:-1:-1;;918:22449:13;;;;3894:6:4;918:22449:13;;:::i;:::-;;;719:10:10;;3894:6:4;:::i;:::-;918:22449:13;;;;;;;;;;;;;-1:-1:-1;;918:22449:13;;;;;;:::i;:::-;;;719:10:10;;918:22449:13;;4102:11:4;918:22449:13;;;;;-1:-1:-1;;;;;918:22449:13;;;;;;;;;;6792:35:4;;;;918:22449:13;;6928:34:4;918:22449:13;;719:10:10;;6928:34:4;:::i;918:22449:13:-;;;;-1:-1:-1;;;918:22449:13;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;918:22449:13;;;;;;;661:3:16;918:22449:13;;;;;;;;;;;;;;;;;;880:4:16;918:22449:13;;;;;;;;;;;;;;1066:3:16;918:22449:13;;;;;;;;;;;-1:-1:-1;;918:22449:13;;;;7459:20;;:::i;:::-;7503:39;;;;;;1399:12:23;;;-1:-1:-1;;;;;918:22449:13;;;;;1399:17:23;1395:270;918:22449:13;;;1432:15:23;;;1399:12;8827:4:13;918:22449;;;;;;1395:270:23;918:22449:13;8827:4;918:22449;;;;;;;;;;;;1399:12:23;918:22449:13;1487:38:23;918:22449:13;;;1487:38:23;;:::i;:::-;1395:270;;918:22449:13;;;;;;-1:-1:-1;;918:22449:13;;;;;;;;2284:16;918:22449;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;:::i;:::-;2284:16;918:22449;;;;;;-1:-1:-1;918:22449:13;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;918:22449:13;;;;;-1:-1:-1;;918:22449:13;;;;;;;;-1:-1:-1;918:22449:13;;;;;;-1:-1:-1;;;918:22449:13;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;918:22449:13;;;;;3282:38:17;918:22449:13;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;918:22449:13;;;;;;;;:::i;:::-;2227:103:3;;:::i;:::-;-1:-1:-1;;;;;918:22449:13;;27189:23:17;27185:53;;27289:14;;:::i;:::-;918:22449:13;;;;;;;:::i;:::-;27502:36:17;;;;;:::i;:::-;918:22449:13;27617:12:17;918:22449:13;27632:28:17;918:22449:13;-1:-1:-1;;;;;918:22449:13;;;27632:28:17;:::i;:::-;-1:-1:-1;27613:77:17;;918:22449:13;27762:19:17;27804:9;27762:19;27783;27762;;;:::i;27783:::-;27804:9;;:::i;27613:77::-;918:22449:13;;;27669:21:17;;;;918:22449:13;;;;;;;;:::i;:::-;5855:258;;;5982:40;5938:20;;;:::i;:::-;5982:40;;;;;;;:::i;5855:258::-;6063:39;918:22449;;;:::i;:::-;6063:39;:::i;918:22449::-;;;;;;-1:-1:-1;;918:22449:13;;;;;;:::i;:::-;;;;;;;;;;;;;;;12338:534;12530:171;12338:534;918:22449;12338:534;;;:::i;:::-;918:22449;;:::i;:::-;;-1:-1:-1;;;;;918:22449:13;;;;;12595:36;918:22449;12595:36;;918:22449;;;;;;;;;;;;;;;;;;;;;;12530:171;-1:-1:-1;;;;;918:22449:13;-1:-1:-1;;;;;;12499:16:13;918:22449;;;12499:16;918:22449;;;;;12499:16;918:22449;;;;;;;;12499:16;918:22449;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;918:22449:13;;;;;-1:-1:-1;;;;;1273:6:0;918:22449:13;;;;;;;;;;;;;;-1:-1:-1;;918:22449:13;;;;-1:-1:-1;;;;;918:22449:13;;:::i;:::-;;;;2641:40:17;918:22449:13;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;918:22449:13;;;;5320:24:14;918:22449:13;;;:::i;:::-;23076:121;;;;;;:::i;:::-;23309:14;;:::i;:::-;918:22449;;;;;;;5277:28:14;918:22449:13;-1:-1:-1;;918:22449:13;;;;;;;;5277:28:14;918:22449:13;;;;;;5320:24:14;918:22449:13;23076:121;;;:::i;:::-;;;918:22449;;;;;;-1:-1:-1;;918:22449:13;;;;19208:378;;:::i;:::-;918:22449;2813:20:14;918:22449:13;5320:24:14;918:22449:13;;;;;2848:22:14;918:22449:13;2848:22:14;;;918:22449:13;3119:21:14;918:22449:13;3155:23:14;918:22449:13;;;;;;3155:23:14;19342:27:13;918:22449;;;;;;;19341:28;19337:51;;918:22449;;;;;;;;;19402:31;19398:57;;918:22449;;;;;;;;;19469:32;19465:59;;918:22449;19535:14;;;:::i;:::-;918:22449;;;;;;-1:-1:-1;;918:22449:13;;;;;;;;19574:4;918:22449;;5320:24:14;918:22449:13;19465:59;918:22449;;;;;;;;5001:25:14;918:22449:13;;;19519:4;918:22449;;5001:25:14;19465:59:13;;;19398:57;918:22449;;;;;;;;4366:24:14;918:22449:13;;;19450:4;918:22449;;4366:24:14;19398:57:13;;;19337:51;19383:4;918:22449;;;;;;;3745:21:14;918:22449:13;;;19383:4;918:22449;;3745:21:14;19337:51:13;;;918:22449;;;;;;-1:-1:-1;;918:22449:13;;;;6028:56:14;918:22449:13;;:::i;:::-;6261:155:14;;:::i;:::-;918:22449:13;;;-1:-1:-1;;;;;918:22449:13;;;-1:-1:-1;;;;;;918:22449:13;;;;;;;;;;;;;;;;;;;;;;;;6028:56:14;918:22449:13;;;;;;;-1:-1:-1;;918:22449:13;;;;4146:31:17;918:22449:13;;;;-1:-1:-1;;;;;918:22449:13;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;918:22449:13;;;;;;;;;;;;;;;16389:333;;:::i;:::-;918:22449;16475:16;918:22449;;;;16471:45;;1066:3:16;16530:26:13;;16526:80;;16697:18;16615:14;918:22449;16615:14;;;:::i;:::-;918:22449;;;;;;;16639:15;918:22449;;;;;;;;16639:15;918:22449;;;;;;16697:18;918:22449;16526:80;918:22449;;;16579:16;;;;16471:45;918:22449;;;16500:16;;;;918:22449;;;;;;-1:-1:-1;;918:22449:13;;;;22763:125;;:::i;:::-;918:22449;;;4619:38:14;918:22449:13;;;4619:38:14;918:22449:13;4672:30:14;918:22449:13;4672:30:14;;918:22449:13;;;;;;;;;:::i;:::-;6611:258;;;6738:40;6694:20;;;:::i;:::-;6738:40;;;;;;;:::i;6611:258::-;6819:39;918:22449;;;:::i;:::-;6819:39;:::i;918:22449::-;;;;;;;;:::i;:::-;7377:255;;;7503:39;7459:20;;;:::i;:::-;7503:39;;;;;;;:::i;7377:255::-;7583:38;918:22449;;;:::i;:::-;;;;;;-1:-1:-1;;918:22449:13;;;;926:13:1;918:22449:13;-1:-1:-1;;;;;719:10:10;918:22449:13;;;1833:24:1;918:22449:13;;-1:-1:-1;;;;;;918:22449:13;;;926:13:1;918:22449:13;2518:6:0;918:22449:13;719:10:10;;918:22449:13;;;;2518:6:0;918:22449:13;719:10:10;918:22449:13;;2566:40:0;918:22449:13;2566:40:0;;918:22449:13;;;;;-1:-1:-1;;;918:22449:13;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;918:22449:13;;;;;;:::i;:::-;;;;;;:::i;:::-;2227:103:3;;:::i;:::-;-1:-1:-1;;;;;918:22449:13;;53471:23:17;;;53467:53;;918:22449:13;53595:17:17;918:22449:13;;;;53591:47:17;;53695:15;;:27;53691:80;;53822:14;;;:::i;:::-;53949:21;;;;;;;:::i;:::-;54045:36;;;;;;;:::i;:::-;54041:91;;918:22449:13;;:::i;:::-;;;;;54258:21:17;918:22449:13;;;;;;;54326:16:17;918:22449:13;;54326:39:17;918:22449:13;;;;54326:39:17;:::i;:::-;54446:19;918:22449:13;;-1:-1:-1;;;;;918:22449:13;880:4:16;54692:80:17;918:22449:13;;;54692:48:17;;;;;:::i;:::-;:80;:::i;:::-;918:22449:13;;55145:19:17;918:22449:13;661:3:16;;918:22449:13;;;;;;;;55074:91:17;;;;;:::i;:::-;918:22449:13;55542:45:17;55506:33;;;:::i;:::-;55542:45;;:::i;:::-;918:22449:13;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;55828:24:17;;;:177;;;918:22449:13;55828:177:17;;;55801:204;918:22449:13;56024:22:17;918:22449:13;56024:26:17;56020:229;;55828:177;56404:47;;;;;;;58334:9;56404:47;;;;;58473:13;56404:47;;57752:36;56404:47;;56403:61;56404:47;57826:9;56404:47;;;:::i;:::-;56403:61;:::i;:::-;56527:27;918:22449:13;56578:27:17;918:22449:13;56619:651:17;;;55828:177;918:22449:13;;;;;57288:265:17;918:22449:13;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;57288:265:17;57752:36;:::i;:::-;57802:10;;57826:9;;:::i;:::-;58193;57802:10;;58193:9;;:::i;:::-;58327:4;58334:9;;:::i;:::-;58327:4;;;58473:13;:::i;56619:651::-;57288:265;56746:36;;;;;;;;918:22449:13;56746:36:17;;;:::i;:::-;918:22449:13;;;;;;56804:19:17;56800:456;;56619:651;;;;;;;;;;;;56800:456;56908:45;;;;56907:59;56908:45;57093:38;56908:45;;;:::i;56907:59::-;918:22449:13;;;;;57093:38:17;:::i;:::-;918:22449:13;;;57201:10:17;918:22449:13;-1:-1:-1;;;;;;918:22449:13;57201:36:17;918:22449:13;;;;57201:36:17;:::i;:::-;918:22449:13;;;;57201:10:17;918:22449:13;56800:456:17;;;;;56020:229;58473:13;56085:49;;;;;;57752:36;56085:49;56196:38;56085:49;;;;;58334:9;56085:49;;;57826:9;56085:49;;;:::i;:::-;918:22449:13;56196:38:17;;;:::i;:::-;56020:229;;;;;;;;;;;;;;;;55828:177;918:22449:13;55968:19:17;918:22449:13;;;;;;;;55913:75:17;;;918:22449:13;55913:75:17;;:::i;:::-;918:22449:13;55828:177:17;;54041:91;918:22449:13;;;54104:17:17;;;;53691:80;918:22449:13;;;;53731:40:17;;;;53695:15;918:22449:13;53731:40:17;;918:22449:13;;;;;53731:40:17;53591:47;918:22449:13;;;53621:17:17;;;;918:22449:13;;;;;;-1:-1:-1;;918:22449:13;;;;1063:62:0;;:::i;:::-;918:22449:13;-1:-1:-1;;;;;;;;;;;918:22449:13;1583:20:1;918:22449:13;;1583:20:1;918:22449:13;2518:6:0;918:22449:13;;;;2518:6:0;918:22449:13;;2566:40:0;;;;918:22449:13;;;;;;;-1:-1:-1;;918:22449:13;;;;-1:-1:-1;;;;;918:22449:13;;:::i;:::-;;;;3519:9:4;918:22449:13;;;;;;;;;;;;;;;;;;;-1:-1:-1;;918:22449:13;;;;;;;;:::i;:::-;2227:103:3;;;:::i;:::-;-1:-1:-1;;;;;918:22449:13;;26231:23:17;26227:53;;26331:14;;:::i;:::-;918:22449:13;;;;;;;:::i;:::-;26520:12:17;918:22449:13;26535:28:17;918:22449:13;-1:-1:-1;;;;;918:22449:13;;;26535:28:17;:::i;:::-;-1:-1:-1;26516:77:17;;918:22449:13;26673:36:17;;26781:19;26673:36;;26831:9;26673:36;;:::i;:::-;26781:19;;:::i;:::-;26802:27;;;:::i;918:22449:13:-;;;;;;-1:-1:-1;;918:22449:13;;;;;;:::i;:::-;14243:226;;:::i;:::-;14370:12;918:22449;;;;-1:-1:-1;;;;;918:22449:13;;;;;;;;;;;;;;-1:-1:-1;;;;;;918:22449:13;;;;14346:56;;918:22449;14346:56;918:22449;;;;14370:12;918:22449;;;;;;;;;;-1:-1:-1;;918:22449:13;;;;20605:104;;:::i;:::-;918:22449;3119:21:14;918:22449:13;3155:23:14;918:22449:13;;;;;;3155:23:14;918:22449:13;;;;;;;-1:-1:-1;;918:22449:13;;;;;;996:28:14;918:22449:13;;;;;;;;;;;;;;;;:::i;:::-;2227:103:3;;;;:::i;:::-;48231:10:17;918:22449:13;;48209:21:17;918:22449:13;;;;;;;;;48206:72:17;;-1:-1:-1;;;;;918:22449:13;;;48292:23:17;48288:53;;918:22449:13;;48355:23:17;;;48351:53;;48415:14;;;;:::i;:::-;918:22449:13;;;;;;;;48521:16:17;918:22449:13;;;;;;48517:184:17;;918:22449:13;48758:9:17;;;;:::i;:::-;918:22449:13;;:::i;:::-;;10425:56:17;10447:33;918:22449:13;10425:56:17;;;:::i;:::-;10424:57;10420:292;;918:22449:13;2809:22:3;918:22449:13;;10420:292:17;10531:55;918:22449:13;;:::i;:::-;;;;48521:16:17;918:22449:13;;;;;;10531:55:17;;:::i;:::-;918:22449:13;;;10604:21:17;918:22449:13;;10504:197:17;918:22449:13;;;;;;;10504:197:17;;;-1:-1:-1;;;10504:197:17;;918:22449:13;10504:197:17;;918:22449:13;;;;;;;;;;;;;;;;;;48517:184:17;48598:21;;;;:::i;:::-;48637:17;;;48633:57;;48517:184;;;;48351:53;918:22449:13;;;48387:17:17;;;;48206:72;918:22449:13;;;48260:18:17;;;;918:22449:13;;;;;;-1:-1:-1;;918:22449:13;;;;;;;1428:1:17;918:22449:13;;;;;;;;;;;;;;;;;;;-1:-1:-1;;918:22449:13;;;;-1:-1:-1;;;;;918:22449:13;;:::i;:::-;;;;4615:51:17;918:22449:13;;;;;;;;;;;;;;;;;;;-1:-1:-1;;918:22449:13;;;;4548:188:18;;:::i;:::-;;;:::i;:::-;-1:-1:-1;;;;;;918:22449:13;;;;;;2958:15:18;918:22449:13;;-1:-1:-1;;;;;918:22449:13;;2934:54:18;;;;;;3568:50;;;;918:22449:13;2958:15:18;918:22449:13;;;;;;;;-1:-1:-1;;918:22449:13;;;;-1:-1:-1;;;;;918:22449:13;;:::i;:::-;;;;5017:53:17;918:22449:13;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;918:22449:13;;;;21464:117;;:::i;:::-;918:22449;;;3391:34:14;918:22449:13;;;3391:34:14;918:22449:13;3440:26:14;918:22449:13;3440:26:14;;918:22449:13;;;;;;;-1:-1:-1;;918:22449:13;;;;;;:::i;:::-;22421:121;;;;;;:::i;:::-;22555:31;918:22449;;;;;;;22551:66;;5001:25:14;918:22449:13;;;;;;;;;;;;;;;;22555:31;918:22449;;;;;;5001:25:14;918:22449:13;22421:121;;;:::i;:::-;;;918:22449;;;;;;-1:-1:-1;;918:22449:13;;;;;-1:-1:-1;;;;;566:30:18;918:22449:13;;;;;;;;;;;;;;-1:-1:-1;;918:22449:13;;;;;;:::i;:::-;21138:121;;;;;;:::i;:::-;21272:27;918:22449;;;;;;;21268:62;;3745:21:14;918:22449:13;;;;;;;;;;;;;;21272:27;918:22449;;;;;;3745:21:14;918:22449:13;21138:121;;;:::i;:::-;;;918:22449;;;;;;-1:-1:-1;;918:22449:13;;;;;4272:30:17;918:22449:13;;;;;;;;;;;;;-1:-1:-1;;918:22449:13;;;;;-1:-1:-1;;;;;918:22449:13;;;;;;;;;;;;;;;-1:-1:-1;;918:22449:13;;;;;2328:34:17;918:22449:13;;;;;;;;;;;;;-1:-1:-1;;918:22449:13;;;;;;:::i;:::-;3883:141:18;;:::i;:::-;-1:-1:-1;;;;;918:22449:13;;;;;-1:-1:-1;;;;;;918:22449:13;;;;;;2958:15:18;918:22449:13;;2934:54:18;918:22449:13;2934:54:18;;918:22449:13;;;;;;;-1:-1:-1;;918:22449:13;;;;;;:::i;:::-;;-1:-1:-1;;;;;9173:20:13;;:::i;:::-;918:22449;;;;;;;;9238:12;918:22449;9216:34;;;;:74;:34;;;:74;;918:22449;;;;;;;;9216:74;918:22449;9257:33;;;;:::i;918:22449::-;;;;;;-1:-1:-1;;918:22449:13;;;;19683:416;;:::i;:::-;5320:24:14;2848:22;3155:23;11264:17:4;;918:22449:13;2813:20:14;918:22449:13;;;;;;;;2848:22:14;;;;;918:22449:13;3119:21:14;918:22449:13;;;;;;3155:23:14;19851:27:13;918:22449;;;;;;;19850:28;19846:52;;918:22449;;;;;;;;;19912:31;19908:58;;918:22449;;;;;;;;;19980:32;19976:60;;918:22449;20047:14;;;:::i;:::-;918:22449;;;;;-1:-1:-1;;918:22449:13;;;;;;;;;;5320:24:14;918:22449:13;19976:60;918:22449;;;;;5001:25:14;918:22449:13;;;;;;5001:25:14;19976:60:13;;;19908:58;918:22449;;;;;4366:24:14;918:22449:13;;;;;;4366:24:14;19908:58:13;;;19846:52;918:22449;;;;;3745:21:14;918:22449:13;;;;;;3745:21:14;19846:52:13;;;918:22449;;;;;;-1:-1:-1;;918:22449:13;;;;18843:31;918:22449;;;:::i;:::-;-1:-1:-1;;;;;918:22449:13;;:::i;:::-;1063:62:0;;;:::i;:::-;918:22449:13;;;;;18798:8;918:22449;;18798:30;918:22449;;;;;;;;;;;;;;;;;;;18798:30;918:22449;;;;;;;;;;;18843:31;918:22449;;;;;;;-1:-1:-1;;918:22449:13;;;;;;:::i;:::-;;;:::i;:::-;;-1:-1:-1;;;;;918:22449:13;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;918:22449:13;;;;;;;;:::i;:::-;2227:103:3;;;:::i;:::-;-1:-1:-1;;;;;918:22449:13;;51124:23:17;51120:53;;918:22449:13;51244:13:17;918:22449:13;;51240:39:17;;51652:9;918:22449:13;51330:14:17;;;:::i;:::-;918:22449:13;;;;;;;:::i;:::-;51481:36:17;;;;:::i;:::-;51591:26;51619:19;51591:26;;;:::i;51240:39::-;918:22449:13;;;51266:13:17;;;;918:22449:13;;;;;;-1:-1:-1;;918:22449:13;;;;6021:38:4;918:22449:13;;:::i;:::-;719:10:10;918:22449:13;;4102:11:4;918:22449:13;;;;;-1:-1:-1;;;;;918:22449:13;;;;;;6021:38:4;918:22449:13;;;;;;6021:38:4;:::i;:::-;719:10:10;;6021:38:4;:::i;918:22449:13:-;;;;;;-1:-1:-1;;918:22449:13;;;;13129:147;;:::i;:::-;13230:4;918:22449;;13206:28;918:22449;;;13206:28;918:22449;13249:20;918:22449;13249:20;;918:22449;;;;;;;-1:-1:-1;;918:22449:13;;;;;;;-1:-1:-1;;;;;2916:13:13;918:22449;;;;;;;;;;-1:-1:-1;;918:22449:13;;;;;;1114:43:14;918:22449:13;;;;;;;;;;;;;;;;;;-1:-1:-1;;918:22449:13;;;;;;;;2410:18;918:22449;;;;;;;;;;-1:-1:-1;;918:22449:13;;;;;;;;:::i;:::-;2227:103:3;;;:::i;:::-;-1:-1:-1;;;;;918:22449:13;;40156:25:17;;;:54;;;;918:22449:13;40152:86:17;;40289:14;;:::i;:::-;918:22449:13;;;;;40399:11:17;918:22449:13;;-1:-1:-1;;;;;918:22449:13;40413:34:17;918:22449:13;;40413:11:17;918:22449:13;;40413:34:17;:::i;:::-;-1:-1:-1;40395:81:17;;40599:21;;:::i;:::-;40634:17;;;40630:57;;40781:25;;;:::i;:::-;918:22449:13;;;:::i;:::-;;;9029:40:17;918:22449:13;;;:::i;9029:40:17:-;918:22449:13;;;;;36844:32:17;;;;36840:131;;918:22449:13;;;;;;;;;;;;;;37092:10:17;918:22449:13;;;;;;;;;;;37058:61:17;;;;:::i;:::-;918:22449:13;;;;;;;;;37092:10:17;918:22449:13;;;;;;;;;;;;;;37092:10:17;37204:67;;;;37376:42;;;;:::i;:::-;918:22449:13;;;;;;;;;37512:36:17;;;;:::i;:::-;918:22449:13;;;37558:19:17;;;;918:22449:13;;;;;;;;37558:44:17;;;;:::i;:::-;918:22449:13;;;;;;;;;;-1:-1:-1;;;;;918:22449:13;-1:-1:-1;;;;;;40413:11:17;918:22449:13;;;40413:11:17;918:22449:13;;;40413:11:17;918:22449:13;;;;-1:-1:-1;;;;;;918:22449:13;;;;40413:11:17;918:22449:13;;;;37804:16:17;918:22449:13;;;;;;;;37804:45:17;;;;:::i;:::-;918:22449:13;;;;-1:-1:-1;;;1050:58:8;;;;37092:10:17;918:22449:13;1050:58:8;;918:22449:13;;;;;;;;;1050:58:8;;;;918:22449:13;;1050:58:8;:::i;:::-;;;37884:13:17;1050:58:8;:::i;:::-;918:22449:13;;;-1:-1:-1;;;;;918:22449:13;;;;;;;;;;;;;37092:10:17;;37953:65;;;918:22449:13;;:::i;:::-;;10447:33:17;918:22449:13;10425:56:17;;;;;:::i;:::-;10424:57;10420:292;;918:22449:13;;;2809:22:3;918:22449:13;;;;;;;10420:292:17;10604:21;918:22449:13;10531:55:17;918:22449:13;;:::i;:::-;;;;37804:16:17;918:22449:13;;;;;;10531:55:17;;:::i;:::-;918:22449:13;;;;10504:197:17;918:22449:13;;;;;;;10504:197:17;;;-1:-1:-1;;;10504:197:17;;918:22449:13;10504:197:17;;918:22449:13;;;;;;;;;;;;;;;;;;36840:131:17;918:22449:13;;-1:-1:-1;;;36899:61:17;;918:22449:13;36899:61:17;;918:22449:13;;;;-1:-1:-1;;;;;918:22449:13;;;;;;;;;;10504:197:17;40152:86;918:22449:13;;;40219:19:17;;;;40156:54;40185:10;;;:25;40156:54;;918:22449:13;;;;;;-1:-1:-1;;918:22449:13;;;;;;:::i;:::-;;;:::i;:::-;;;;-1:-1:-1;;;;;918:22449:13;;;;4102:11:4;918:22449:13;;;;;719:10:10;918:22449:13;;;;;;;;11264:17:4;;;11244:37;;11240:243;;918:22449:13;5424:6:4;;;;:::i;11240:243::-;11305:26;;;918:22449:13;;11432:25:4;918:22449:13;5424:6:4;918:22449:13;;719:10:10;11432:25:4;;:::i;:::-;11240:243;;918:22449:13;;;;-1:-1:-1;;;918:22449:13;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;918:22449:13;;;;;;:::i;:::-;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;2227:103:3;;:::i;:::-;12503:591:17;12952:14;;:::i;:::-;12976:112;;;;;;;;918:22449:13;1716:1:3;2809:22;918:22449:13;;;;;;;;:::i;12976:112:17:-;918:22449:13;;;;;;:::i;:::-;;;;:::i;:::-;12976:112:17;;;918:22449:13;;;;;;;;:::i;:::-;8161:255;;;8287:39;8243:20;;;:::i;:::-;8287:39;;;;;;;:::i;8161:255::-;8367:38;918:22449;;;:::i;:::-;;;;;;-1:-1:-1;;918:22449:13;;;;;;;;;;15492:634;;:::i;:::-;15704:244;918:22449;15736:19;918:22449;15769:19;918:22449;15802:22;918:22449;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;15704:244;15736:19;918:22449;15769:19;918:22449;15802:22;918:22449;;;;;;;;-1:-1:-1;;918:22449:13;;;;;2585:10;918:22449;;;;;;;;;;;;;;;-1:-1:-1;;918:22449:13;;;;;2150:34:17;918:22449:13;;;;;;;;;;;;;-1:-1:-1;;918:22449:13;;;;;;919:25:14;918:22449:13;;;;;;;;;;;;;;;;-1:-1:-1;;918:22449:13;;;;;;950:39:14;918:22449:13;;;;;;;;;;;;;;;;;;-1:-1:-1;;918:22449:13;;;;;32237:35:17;32191:20;;:::i;:::-;918:22449:13;;;;;;;;32237:35:17;;:::i;918:22449:13:-;;;;;;-1:-1:-1;;918:22449:13;;;;4606:6:4;918:22449:13;;:::i;:::-;;;719:10:10;;4606:6:4;:::i;918:22449:13:-;;;;;;-1:-1:-1;;918:22449:13;;;;;-1:-1:-1;;;;;918:22449:13;;;;;;;;;;;;;;;-1:-1:-1;;918:22449:13;;;;;;13605:215;;:::i;:::-;918:22449;13695:21;918:22449;;13691:49;;13755:29;918:22449;13765:6;918:22449;;;;;;;;;;;13755:29;13765:6;918:22449;;13691:49;918:22449;;;13725:15;;;;918:22449;;;;;;-1:-1:-1;;918:22449:13;;;;;7503:39;7459:20;;:::i;:::-;918:22449;;;;;;;;7503:39;;:::i;918:22449::-;;;;;;-1:-1:-1;;918:22449:13;;;;;;;;2154:14;918:22449;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;2154:14;918:22449;;;;;;-1:-1:-1;918:22449:13;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;918:22449:13;;;;22107:123;;:::i;:::-;918:22449;;;3991:37:14;918:22449:13;;;3991:37:14;918:22449:13;4043:29:14;918:22449:13;4043:29:14;;918:22449:13;;;;;;;-1:-1:-1;;918:22449:13;;;;2227:103:3;;:::i;:::-;918:22449:13;21595:21:17;;:::i;:::-;918:22449:13;1716:1:3;2809:22;918:22449:13;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;918:22449:13;;;;;-1:-1:-1;;;;;8969:20:13;;:::i;:::-;-1:-1:-1;918:22449:13;;;;;;;-1:-1:-1;;;;918:22449:13;;;;;;;;;;;;;;;;;-1:-1:-1;918:22449:13;;;;;;;;;;;;;;;;;;;;1050:58:8;;918:22449:13;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;918:22449:13;;;;;;:::o;:::-;;;;-1:-1:-1;;;;;918:22449:13;;;;;;:::o;:::-;;;;-1:-1:-1;;;;;918:22449:13;;;;;;:::o;:::-;;;;;;;;;;;:::o;:::-;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;918:22449:13;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;918:22449:13;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;-1:-1:-1;;;;;918:22449:13;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;-1:-1:-1;;;;;918:22449:13;;;;;;:::o;1359:130:0:-;-1:-1:-1;;;;;1273:6:0;918:22449:13;;719:10:10;1422:23:0;918:22449:13;;1359:130:0:o;918:22449:13:-;;;;-1:-1:-1;;;918:22449:13;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;7456:788:4:-;-1:-1:-1;;;;;918:22449:13;;;7552:18:4;;;918:22449:13;;;7630:16:4;;;918:22449:13;;7568:1:4;918:22449:13;;;7768:9:4;918:22449:13;;;;;;7801:21:4;;;;918:22449:13;;;;;8163:26:4;918:22449:13;;;;;7768:9:4;918:22449:13;;;;;;;;;;;;;;;;;;;;;;8163:26:4;7456:788::o;918:22449:13:-;;;;-1:-1:-1;;;918:22449:13;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;918:22449:13;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;918:22449:13;;;;;;;;;;;;;;;;;;;;;;;10457:340:4;-1:-1:-1;;;;;918:22449:13;;;10558:19:4;;;918:22449:13;;;10636:21:4;;;918:22449:13;;;10758:32:4;918:22449:13;;10575:1:4;918:22449:13;10707:11:4;918:22449:13;;;10575:1:4;918:22449:13;;10575:1:4;918:22449:13;;;;;10575:1:4;918:22449:13;;;;;;;10758:32:4;10457:340::o;918:22449:13:-;;;;-1:-1:-1;;;918:22449:13;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;918:22449:13;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;:::o;:::-;;;1050:58:8;;918:22449:13;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;:::i;:::-;13027:10:17;918:22449:13;-1:-1:-1;;;;;918:22449:13;;;;;;;;;;:::o;:::-;;;;;;;:::i;:::-;13066:11:17;918:22449:13;-1:-1:-1;;;;;918:22449:13;;;;;;;;;;:::o;:::-;;;;;;;;;;:::o;9640:904::-;918:22449;9734:16;918:22449;;;;9730:30;;10385:42;-1:-1:-1;;;;;9948:20:13;;:::i;:::-;918:22449;;;;;;;;;10088:76;-1:-1:-1;10106:4:13;10088:23;;:76;10106:4;;;918:22449;10114:30;918:22449;-1:-1:-1;918:22449:13;3519:9:4;918:22449:13;;;-1:-1:-1;918:22449:13;;10114:30;:::i;:::-;10088:76;;9029:40:17;-1:-1:-1;;;;;918:22449:13;;;;;;;;;9029:40:17;;:::i;:::-;918:22449:13;10385:42;;:::i;:::-;10450;;;;;;:87;9640:904;:::o;10450:87::-;;;9640:904;:::o;10088:76::-;918:22449;;;;;;3519:9:4;918:22449:13;;;;10088:76;;;9730:30;9752:8;-1:-1:-1;9752:8:13;:::o;10550:860::-;918:22449;10642:16;918:22449;;;;10638:30;;11056:50;-1:-1:-1;;;;;10856:20:13;;:::i;:::-;918:22449;;;;;;;9029:40:17;-1:-1:-1;;;;;918:22449:13;;;;;;;;;9029:40:17;;:::i;:::-;918:22449:13;11056:50;;:::i;:::-;918:22449;;;-1:-1:-1;11245:4:13;11227:23;;11245:4;;918:22449;11253:30;918:22449;-1:-1:-1;918:22449:13;3519:9:4;918:22449:13;;;-1:-1:-1;918:22449:13;;11253:30;:::i;11227:76::-;918:22449;;;;;;3519:9:4;918:22449:13;;;;11227:76;;918:22449;;;;;;;:::i;:::-;10393:16:17;918:22449:13;-1:-1:-1;;;;;918:22449:13;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;9088:192:12:-;-1:-1:-1;;;;;9172:26:12;;;;918:22449:13;;;9088:192:12;:::o;918:22449:13:-;;;;-1:-1:-1;;;918:22449:13;;;;;;;;;;;;;;;;;;;;;;;2083:309:14;-1:-1:-1;;;;;918:22449:13;2173:21:14;918:22449:13;;2159:10:14;:35;;:72;;;;2083:309;2159:118;;;2083:309;2159:163;;;2083:309;2142:244;;;2083:309::o;2142:244::-;2173:21;918:22449:13;;2354:21:14;;;;2159:163;918:22449:13;;2307:15:14;918:22449:13;;2159:10:14;2293:29;;2159:163;;;:118;:10;2261:16;918:22449:13;;2247:30:14;;;-1:-1:-1;2159:118:14;;:72;918:22449:13;;;1273:6:0;918:22449:13;;2159:10:14;2210:21;;2159:72;;;2398:178;-1:-1:-1;;;;;918:22449:13;1273:6:0;918:22449:13;;2461:10:14;:21;;:54;;;;2398:178;2457:113;;;2398:178::o;2457:113::-;2538:21;918:22449:13;;2538:21:14;;;;2461:54;918:22449:13;;2500:15:14;918:22449:13;;2461:10:14;2486:29;;2461:54;;;918:22449:13;-1:-1:-1;;;;;918:22449:13;;;;;;;;;;;;;:::o;:::-;;;;;;;:::i;:::-;-1:-1:-1;918:22449:13;;;;;;;;;;;;;;;;;;;;;;:::o;2336:287:3:-;1759:1;2468:7;918:22449:13;2468:19:3;1759:1;;;2468:7;918:22449:13;2336:287:3:o;1759:1::-;;918:22449:13;;-1:-1:-1;;;1759:1:3;;;;;;;;;;;918:22449:13;1759:1:3;918:22449:13;;;1759:1:3;;918:22449:13;;;;;;;:::i;:::-;;;13913:15:17;918:22449:13;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;13543:1060:17:-;918:22449:13;;;;;;;;:::i;:::-;;;;;;;;;:::i;:::-;;;;;;;;;;;;:::i;:::-;;;;;;;;:::i;:::-;14014:39:17;;;;:::i;:::-;918:22449:13;;;;;;14068:26:17;;14128:23;;;;;;918:22449:13;14179:19:17;;;;918:22449:13;14225:18:17;;;;918:22449:13;;;14291:16:17;918:22449:13;14291:16:17;;918:22449:13;;14128:23:17;14258:30;;918:22449:13;;14363:31:17;;918:22449:13;;14179:19:17;14321:39;;918:22449:13;14471:20:17;14423:19;;;;14471:20;;;14064:533;13543:1060::o;14064:533::-;918:22449:13;;;;;;;;;:::i;:::-;;;;:::i;:::-;14064:533:17;13543:1060::o;918:22449:13:-;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;:::o;:::-;-1:-1:-1;;;918:22449:13;;;;;;;;;;;;;;;;;;:::o;:::-;;;;-1:-1:-1;;;;;918:22449:13;;;;;;;;;;;;:::o;15147:2820:17:-;918:22449:13;;;;15147:2820:17;918:22449:13;;;;;;;;;;;;;;;;;-1:-1:-1;918:22449:13;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;15253:42:17;15403:30;;;918:22449:13;;;;;15437:15:17;15403:49;;:70;;;15147:2820;15399:2562;;15147:2820;;;;;;;;;;;;;;;:::o;15399:2562::-;15833:48;918:22449:13;15582:4:17;918:22449:13;;;;;:::i;:::-;15662:32:17;;918:22449:13;;:::i;:::-;15708:34:17;;918:22449:13;;15437:15:17;15833:48;:::i;:::-;918:22449:13;-1:-1:-1;;;;;15963:19:17;;;;918:22449:13;;15963:31:17;:140;;;;;;918:22449:13;-1:-1:-1;;;;;16282:12:17;918:22449:13;;16386:36:17;918:22449:13;16386:36:17;918:22449:13;16386:36:17;;918:22449:13;;;;;16264:172:17;;;;;918:22449:13;16264:172:17;;;;;;918:22449:13;;;;;;;;;16264:172:17;;;;;;;;-1:-1:-1;;16264:172:17;;;15963:140;918:22449:13;;;;;;;16520:40:17;918:22449:13;16520:59:17;918:22449:13;880:4:16;918:22449:13;;;;;;;;16533:20:17;;;918:22449:13;;16520:40:17;;:::i;:::-;918:22449:13;;;16520:59:17;;:::i;:::-;918:22449:13;;;;16698:27:17;;;;:121;;;;15963:140;16698:214;;;;;15963:140;16677:1274;;15963:140;15399:2562;;;;;;;;16677:1274;918:22449:13;;;;;17019:63:17;918:22449:13;;;;17019:20:17;;918:22449:13;;;;;17019:63:17;:::i;:::-;918:22449:13;;;;;;;17100:19:17;:62;:19;;918:22449:13;;;;;17100:62:17;:::i;:::-;918:22449:13;;;17184:34:17;918:22449:13;;17184:38:17;;17180:757;;16677:1274;;;;17180:757;17861:57;918:22449:13;17540:48:17;17463;661:3:16;17293:60:17;918:22449:13;;17462:127:17;918:22449:13;;17293:60:17;:::i;:::-;918:22449:13;;;;17485:19:17;;;;:26;918:22449:13;;17463:48:17;;:::i;:::-;17540:19;;;;918:22449:13;;;;17540:48:17;;:::i;:::-;17462:127;;:::i;:::-;918:22449:13;;;17861:19:17;:26;918:22449:13;;;;;;17861:57:17;:::i;:::-;918:22449:13;;;17180:757:17;;;;;;;;;16698:214;918:22449:13;;16839:52:17;918:22449:13;;16865:19:17;;;918:22449:13;;16839:52:17;;:::i;:::-;:73;;16698:214;;:121;16771:20;16745:53;16771:20;;;;;918:22449:13;;16745:53:17;;:::i;:::-;:74;;16698:121;;;;16264:172;;;-1:-1:-1;16264:172:17;-1:-1:-1;16264:172:17;;;;;;;;;;;;:::i;:::-;;;918:22449:13;;;;;880:4:16;918:22449:13;;;;16520:40:17;918:22449:13;;;;;16520:59:17;918:22449:13;;;:::i;:::-;;;;:::i;:::-;16264:172:17;;;;;;;;;;;;918:22449:13;;;16264:172:17;;;;;;918:22449:13;;;;;;;;;;15963:140:17;16046:20;;;918:22449:13;;661:3:16;918:22449:13;;;;;;;;;;16033:70:17;16077:19;;;;918:22449:13;;16033:70:17;;:::i;:::-;15963:140;;918:22449:13;;;-1:-1:-1;;;918:22449:13;;;;;;15403:70:17;918:22449:13;;15457:16:17;918:22449:13;;;;15456:17:17;15403:70;;18506:1776;918:22449:13;18614:23:17;918:22449:13;18651:19:17;918:22449:13;18684:18:17;918:22449:13;;;;:::i;:::-;;;;:::i;:::-;18954:36:17;;;;:::i;:::-;918:22449:13;;;;19076:1200:17;;;18506:1776;;:::o;19076:1200::-;19122:47;;;;;;;;19201:23;;;;918:22449:13;19252:19:17;;;;;;918:22449:13;19298:18:17;;;;918:22449:13;19430:27:17;19201:23;19430:27;;918:22449:13;;;;;;19475:36:17;;;;918:22449:13;;;;19529:16:17;;;;;;918:22449:13;;;;19563:31:17;;;;;;;918:22449:13;;;;;;;;;;;;;;;;;;;19201:23:17;918:22449:13;;;19402:206:17;;;918:22449:13;;;;;;;;;;;;;;;;;;;;;19201:23:17;918:22449:13;;;19627:71:17;;;918:22449:13;;;;;;;;;;;;;;19938:15:17;918:22449:13;19898:30:17;;;918:22449:13;20004:12:17;918:22449:13;;;;;;;;;;;;;;;;;;19938:15:17;;918:22449:13;;;;;;;;;;;;;;18858:15:17;918:22449:13;;20132:19:17;;;918:22449:13;;-1:-1:-1;;;;;918:22449:13;;;;;;;-1:-1:-1;;;;;918:22449:13;-1:-1:-1;;;;;;20119:32:17;918:22449:13;;;20119:32:17;918:22449:13;;;;;;20119:32:17;918:22449:13;;-1:-1:-1;;;;;;918:22449:13;;;;;;;;20119:32:17;918:22449:13;20179:20:17;;;918:22449:13;;;;;;-1:-1:-1;;;;;918:22449:13;-1:-1:-1;;;;;;40413:11:17;918:22449:13;;;40413:11:17;918:22449:13;;;;;20165:34:17;918:22449:13;;;;;;;20165:34:17;918:22449:13;20217:14:17;20213:52;;18506:1776::o;20213:52::-;20254:10;20247:4;;8520:535:4;-1:-1:-1;;;;;918:22449:13;8603:21:4;;;918:22449:13;;8952:37:4;918:22449:13;;8731:22:4;8622:1;918:22449:13;8731:22:4;918:22449:13;8731:22:4;:::i;:::-;;918:22449:13;;;;8899:9:4;918:22449:13;;;;;;;;;;;;;;;;8952:37:4;8520:535::o;918:22449:13:-;;;;-1:-1:-1;;;918:22449:13;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;22039:1712:17:-;918:22449:13;22104:21:17;918:22449:13;;;;:::i;:::-;22395:31:17;;;;;;918:22449:13;;;;;;;22430:15:17;22395:50;;22391:1052;22430:15;;;22613:49;-1:-1:-1;;;;;918:22449:13;22613:49:17;918:22449:13;;;;;;22613:49:17;;;;918:22449:13;22613:49:17;;;;;;;;;;918:22449:13;;;;22613:49:17;;;22391:1052;22558:104;;918:22449:13;22558:104:17;;23155:55;22558:104;;;;;22758:64;;;22391:1052;22430:15;918:22449:13;;;;22966:33:17;22613:49;22966:33;;918:22449:13;23032:34:17;;;;918:22449:13;;;;-1:-1:-1;;;;;918:22449:13;-1:-1:-1;;;;;;12499:16:13;918:22449;;;12499:16;918:22449;;;;;;;;;22309:16:17;918:22449:13;;;;;;;;22309:16:17;918:22449:13;;;;;;;;;;;;;;;;;;;;;;;23155:55:17;22391:1052;23510:34;;;:70;918:22449:13;;23547:33:17;;;918:22449:13;23510:70:17;;:::i;:::-;661:3:16;;918:22449:13;;;;;;;;;;;23474:157:17;918:22449:13;;23659:36:17;918:22449:13;;23474:157:17;;:::i;:::-;23659:36;;918:22449:13;;-1:-1:-1;23645:50:17;23641:104;;22039:1712::o;23641:104::-;23730:4;;-1:-1:-1;22039:1712:17:o;918:22449:13:-;;-1:-1:-1;;;918:22449:13;;;;;;;22758:64:17;22782:40;918:22449:13;;;;;;;;;;22782:40:17;22758:64;;22613:49;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;918:22449:13;;;;;23155:55:17;918:22449:13;;;;;:::i;:::-;;;;;;;;;;;;;-1:-1:-1;918:22449:13;;;22613:49:17;;918:22449:13;;;;22613:49:17;;;-1:-1:-1;22613:49:17;;;918:22449:13;;;;;;;;;;;;22391:1052:17;-1:-1:-1;23331:33:17;;;918:22449:13;23398:34:17;;;918:22449:13;;;-1:-1:-1;918:22449:13;-1:-1:-1;22391:1052:17;;24904:506;25355:48;24904:506;;;1482:68:8;-1:-1:-1;;;;;24904:506:17;-1:-1:-1;;;;;918:22449:13;;25059:29:17;918:22449:13;;;;;25059:29:17;:::i;:::-;918:22449:13;;;;25098:18:17;;;;918:22449:13;;25098:29:17;918:22449:13;;;;;25098:29:17;:::i;:::-;918:22449:13;;;25180:25:17;918:22449:13;;;25180:25:17;;:::i;:::-;918:22449:13;;-1:-1:-1;;;;;918:22449:13;-1:-1:-1;;;;;;20119:32:17;918:22449:13;;;20119:32:17;918:22449:13;;;;;-1:-1:-1;;;;;;25215:24:17;918:22449:13;;;;;;;;25215:24:17;918:22449:13;;;1482:68:8;-1:-1:-1;;;25098:18:17;1482:68:8;;;25305:10:17;1482:68:8;;;918:22449:13;25325:4:17;918:22449:13;;;;;;;;;;;1482:68:8;;;;;:::i;:::-;918:22449:13;;;-1:-1:-1;;;;;918:22449:13;;;;;;;;;;;;;;;25305:10:17;;918:22449:13;;;;25355:48:17;;;;24904:506::o;29050:1266::-;;;;9029:40;-1:-1:-1;;;;;918:22449:13;;;;29310:10:17;;;:20;29306:277;;29050:1266;918:22449:13;;;:::i;:::-;-1:-1:-1;;;;;918:22449:13;;;;;;;;;;;9029:40:17;;:::i;:::-;918:22449:13;;;;;29787:34:17;;;;29783:135;;918:22449:13;;29960:37:17;918:22449:13;;;;;29960:37:17;:::i;:::-;918:22449:13;;;30007:18:17;;918:22449:13;30007:18:17;;;;918:22449:13;30007:29:17;918:22449:13;;;;;30007:29:17;:::i;:::-;918:22449:13;;;;;;;;-1:-1:-1;;;;;918:22449:13;-1:-1:-1;;;;;;20119:32:17;918:22449:13;;;20119:32:17;918:22449:13;;;;-1:-1:-1;;;;;;30084:24:17;918:22449:13;;;;;;;;30084:24:17;918:22449:13;;;9458:21:4;;;918:22449:13;;;-1:-1:-1;918:22449:13;9613:9:4;918:22449:13;;;;;-1:-1:-1;918:22449:13;;9649:24:4;;;918:22449:13;;1050:58:8;918:22449:13;1050:58:8;30244:65:17;918:22449:13;;;;-1:-1:-1;918:22449:13;9931:37:4;30244:65:17;918:22449:13;;1050:58:8;918:22449:13;-1:-1:-1;;;918:22449:13;;;;9613:9:4;918:22449:13;;;;;;;;9883:22:4;918:22449:13;;9883:22:4;918:22449:13;;;;;;9931:37:4;918:22449:13;;1050:58:8;;;;;;;;;;918:22449:13;;;;;;-1:-1:-1;;;;;918:22449:13;;;;;;;;;;1050:58:8;918:22449:13;-1:-1:-1;;;;;918:22449:13;;;;;;;;;;;;;;;29310:10:17;;918:22449:13;;;;;;;30244:65:17;;;;29050:1266::o;918:22449:13:-;;;;;;-1:-1:-1;;;918:22449:13;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;918:22449:13;;;;;;;;;;;;;;;;;;;;;;29783:135:17;918:22449:13;;-1:-1:-1;;;29844:63:17;;;;;918:22449:13;;;;-1:-1:-1;;;;;918:22449:13;;;;;;;;10504:197:17;29306:277;918:22449:13;-1:-1:-1;918:22449:13;4102:11:4;918:22449:13;;;-1:-1:-1;918:22449:13;29310:10:17;-1:-1:-1;918:22449:13;;;;-1:-1:-1;918:22449:13;;11264:17:4;;;29495:28:17;;29491:81;;29306:277;;;;29491:81;29554:17;;918:22449:13;-1:-1:-1;;;;;918:22449:13;;29554:17:17;;:::i;:::-;29310:10;;29554:17;;:::i;:::-;29491:81;;;;9388:545;;9493:6;918:22449:13;9493:11:17;;;9489:28;;-1:-1:-1;;;;;918:22449:13;;:::i;:::-;;;-1:-1:-1;9553:55:17;-1:-1:-1;918:22449:13;;;;9574:16:17;918:22449:13;;;;;;9553:55:17;;:::i;:::-;9622:20;;;9618:37;;918:22449:13;;9693:21:17;918:22449:13;;;;;;9739:22:17;;;9735:40;;880:4:16;9804:31:17;;;;:::i;:::-;918:22449:13;661:3:16;;918:22449:13;;;;;;;;;;;;;;;9801:94:17;;;;;:::i;:::-;9912:14;;9388:545;:::o;9735:40::-;9763:12;;;;;;:::o;9618:37::-;9644:11;;;;;9603:4;9644:11;:::o;9489:28::-;9506:11;;;9513:4;9506:11;:::o;43040:481::-;;918:22449:13;43462:52:17;43040:481;-1:-1:-1;;;;;918:22449:13;;;;;-1:-1:-1;918:22449:13;43181:21:17;918:22449:13;;;-1:-1:-1;918:22449:13;43181:53:17;918:22449:13;;;43181:53:17;:::i;:::-;918:22449:13;;43244:36:17;918:22449:13;43244:36:17;918:22449:13;43244:36:17;:::i;:::-;;918:22449:13;;43338:4:17;;43319:24;;43315:133;;43040:481;918:22449:13;;;;;43462:52:17;43040:481::o;43315:133::-;1482:68:8;918:22449:13;;-1:-1:-1;;;1482:68:8;;;;;;;;918:22449:13;43338:4:17;918:22449:13;;;;;;;;;;1482:68:8;;;;;:::i;:::-;43359:18:17;1482:68:8;:::i;:::-;43315:133:17;;45084:686;-1:-1:-1;;;;;918:22449:13;;;;;-1:-1:-1;918:22449:13;45332:21:17;918:22449:13;;;-1:-1:-1;918:22449:13;45332:53:17;918:22449:13;;;45332:53:17;:::i;:::-;918:22449:13;;45491:36:17;918:22449:13;45491:36:17;918:22449:13;45491:36:17;:::i;:::-;;918:22449:13;;;45587:4:17;;;45566:26;;45562:118;;45084:686;918:22449:13;;;;;;;45694:69:17;918:22449:13;45711:10:17;45694:69;;45084:686::o;45562:118::-;918:22449:13;;-1:-1:-1;;;918:22449:13;1050:58:8;;;-1:-1:-1;;;;;918:22449:13;;;1050:58:8;;;918:22449:13;;;;;1050:58:8;;;918:22449:13;;;;1050:58:8;918:22449:13;1050:58:8;45562:118:17;;;;49866:658;;;50463:54;49866:658;;-1:-1:-1;;;;;918:22449:13;;50094:37:17;918:22449:13;;;;;50094:37:17;:::i;:::-;918:22449:13;;;50141:19:17;;;918:22449:13;50141:30:17;918:22449:13;;;;;50141:30:17;:::i;:::-;918:22449:13;;;;;-1:-1:-1;;;;;918:22449:13;;;;;-1:-1:-1;918:22449:13;50217:16:17;50141:19;918:22449:13;;-1:-1:-1;918:22449:13;50217:38:17;918:22449:13;;;;;50217:38:17;:::i;:::-;918:22449:13;;;;-1:-1:-1;;;;;918:22449:13;-1:-1:-1;;;;;;40413:11:17;918:22449:13;;;40413:11:17;918:22449:13;;;;;-1:-1:-1;;;;;;50265:26:17;918:22449:13;;;;;;;;50265:26:17;918:22449:13;;50348:4:17;;50330:23;;50326:123;;49866:658;-1:-1:-1;918:22449:13;;;-1:-1:-1;;;;;918:22449:13;;;;;;;;;;;;;;;;;50463:54:17;918:22449:13;50326:123:17;1482:68:8;918:22449:13;;;1482:68:8;-1:-1:-1;;;50141:19:17;1482:68:8;;;;;;;918:22449:13;50348:4:17;918:22449:13;;;;;;;;;;;1482:68:8;;;;;:::i;:::-;50326:123:17;;;34781:297:12;34979:16;34962:34;;918:22449:13;;34781:297:12;:::o;918:22449:13:-;;;;-1:-1:-1;;;918:22449:13;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;-1:-1:-1;;;;;918:22449:13;;;;;;;:::o;1898:115:18:-;-1:-1:-1;;;;;1968:15:18;918:22449:13;;1954:10:18;:29;1950:56;;1898:115::o;1950:56::-;1992:14;918:22449:13;;1992:14:18;;;;2442:136;-1:-1:-1;;;;;2519:22:18;918:22449:13;;2505:10:18;:36;2501:70;;2442:136::o;2501:70::-;2550:21;918:22449:13;;2550:21:18;;;;5196:642:8;-1:-1:-1;;;;;918:22449:13;;;;;;;:::i;:::-;;;;;;;;;;;-1:-1:-1;5487:31:9;;;;;;;;;;;;918:22449:13;;;;;;;;;;;;5535:69:9;918:22449:13;;;;;1050:58:8;918:22449:13;1050:58:8;;;918:22449:13;;;;;;;:::i;:::-;;;;;;;;;5535:69:9;:::i;:::-;918:22449:13;;;5728:22:8;;;;:56;;;;;918:22449:13;;;;;;;;;5196:642:8;:::o;918:22449:13:-;;;;;;-1:-1:-1;;;918:22449:13;;;;;;;;;;;;;;;;;;;;;;5728:56:8;5754:30;;;;;;;918:22449:13;;;;5754:30:8;;918:22449:13;5754:30:8;;918:22449:13;:::i;:::-;5728:56:8;;;;;;918:22449:13;;;-1:-1:-1;;;918:22449:13;;;;;;;;5535:69:9;918:22449:13;;;;7671:628:9;;;;7875:418;;;918:22449:13;;;7906:22:9;7902:286;;8201:17;;:::o;7902:286::-;1702:19;:23;918:22449:13;;8201:17:9;:::o;918:22449:13:-;;;;-1:-1:-1;;;918:22449:13;;;;;;;;;;;;;;;;;;7875:418:9;918:22449:13;;;;-1:-1:-1;8980:21:9;:17;;9152:142;;;;;;;8976:379;9324:20;918:22449:13;;;9324:20:9;;;-1:-1:-1;;;9324:20:9;;;;;;:::i;711:400:23:-;;;-1:-1:-1;;;;;918:22449:13;;;;839:17:23;835:270;918:22449:13;;;-1:-1:-1;872:15:23;-1:-1:-1;711:400:23:o;835:270::-;994:38;937:12;;;;918:22449:13;995:21:23;918:22449:13;927:38:23;928:21;918:22449:13;;;;928:21:23;;:::i;:::-;918:22449:13;;;;927:38:23;;:::i;:::-;918:22449:13;;;995:21:23;;:::i;:::-;918:22449:13;;;994:38:23;;:::i;:::-;:47;979:116;;711:400::o;979:116::-;918:22449:13;32267:4:17;918:22449:13;;;;;;;979:116:23;918:22449:13:o;711:400:23:-;-1:-1:-1;;;;;918:22449:13;;;;839:17:23;835:270;918:22449:13;;;872:15:23;;835:270;711:400::o;835:270::-;928:21;927:38;937:12;;;;;918:22449:13;;928:21:23;;:::i;711:400::-;;;-1:-1:-1;;;;;918:22449:13;;;;839:17:23;835:270;918:22449:13;;;872:15:23;;;835:270;711:400::o;835:270::-;937:12;;;;;;;918:22449:13;927:38:23;928:21;918:22449:13;;;;928:21:23;;:::i;:::-;918:22449:13;;;;927:38:23;;:::i;:::-;983:58;;;;835:270;979:116;;;;;;711:400::o;983:58::-;994:38;918:22449:13;;;;995:21:23;918:22449:13;;;995:21:23;;:::i;994:38::-;:47;983:58;;;;;;1271:400;1399:12;;;918:22449:13;-1:-1:-1;;;;;918:22449:13;;;;;1399:17:23;1395:270;918:22449:13;;;1432:15:23;;;1395:270;1271:400::o;1395:270::-;1487:38;918:22449:13;;1488:21:23;918:22449:13;;;1488:21:23;;:::i;1271:400::-;;;1399:12;;;918:22449:13;-1:-1:-1;;;;;918:22449:13;;;;1399:17:23;1395:270;918:22449:13;;;-1:-1:-1;1432:15:23;;-1:-1:-1;;1271:400:23:o;1395:270::-;918:22449:13;;1555:21:23;918:22449:13;1487:38:23;1488:21;1554:38;918:22449:13;;;;1488:21:23;;:::i;1271:400::-;;;1399:12;;;918:22449:13;-1:-1:-1;;;;;918:22449:13;;;;1399:17:23;1395:270;918:22449:13;;;1432:15:23;;;;1395:270;1271:400::o;1395:270::-;1487:38;1488:21;918:22449:13;;;;;;;;;1488:21:23;;:::i
Swarm Source
ipfs://950145088734ec1324c4998366cd7e7f4c0e7a1d4d28aecb58ab68af82f2cdac
[ Download: CSV Export ]
[ Download: CSV Export ]
A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.