Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Name:
PERC20
Compiler Version
v0.6.12+commit.27d51765
Contract Source Code (Solidity)
/** *Submitted for verification at Etherscan.io on 2021-01-13 */ pragma solidity ^0.6.0; // COPIED FROM https://github.com/compound-finance/compound-protocol/blob/master/contracts/ComptrollerInterface.sol //Copyright 2020 Compound Labs, Inc. //Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: //1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. //2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. //3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. //THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. interface IComptroller { /*** Assets You Are In ***/ /** * PIGGY-MODIFY: * @notice Add assets to be included in account liquidity calculation * @param pTokens The list of addresses of the cToken markets to be enabled * @return Success indicator for whether each corresponding market was entered */ function enterMarkets(address[] calldata pTokens) external returns (uint[] memory); /** * PIGGY-MODIFY: * @notice Removes asset from sender's account liquidity calculation * @dev Sender must not have an outstanding borrow balance in the asset, * or be providing necessary collateral for an outstanding borrow. * @param pTokenAddress The address of the asset to be removed * @return Whether or not the account successfully exited the market */ function exitMarket(address pTokenAddress) external returns (uint); /*** Policy Hooks ***/ /** * PIGGY-MODIFY: * @notice Checks if the account should be allowed to mint tokens in the given market * @param pToken The market to verify the mint against * @param minter The account which would get the minted tokens * @param mintAmount The amount of underlying being supplied to the market in exchange for tokens * @return 0 if the mint is allowed, otherwise a semi-opaque error code (See ErrorReporter.sol) */ function mintAllowed( address pToken, address minter, uint mintAmount ) external returns (uint); /** * PIGGY-MODIFY: * @notice Validates mint and reverts on rejection. May emit logs. * @param pToken Asset being minted * @param minter The address minting the tokens * @param mintAmount The amount of the underlying asset being minted * @param mintTokens The number of tokens being minted */ function mintVerify( address pToken, address minter, uint mintAmount, uint mintTokens ) external; /** * PIGGY-MODIFY: * @notice Checks if the account should be allowed to redeem tokens in the given market * @param pToken The market to verify the redeem against * @param redeemer The account which would redeem the tokens * @param redeemTokens The number of cTokens to exchange for the underlying asset in the market * @return 0 if the redeem is allowed, otherwise a semi-opaque error code (See ErrorReporter.sol) */ function redeemAllowed( address pToken, address redeemer, uint redeemTokens ) external returns (uint); /** * PIGGY-MODIFY: * @notice Validates redeem and reverts on rejection. May emit logs. * @param pToken Asset being redeemed * @param redeemer The address redeeming the tokens * @param redeemAmount The amount of the underlying asset being redeemed * @param redeemTokens The number of tokens being redeemed */ function redeemVerify( address pToken, address redeemer, uint redeemAmount, uint redeemTokens ) external; /** * PIGGY-MODIFY: * @notice Checks if the account should be allowed to borrow the underlying asset of the given market * @param pToken The market to verify the borrow against * @param borrower The account which would borrow the asset * @param borrowAmount The amount of underlying the account would borrow * @return 0 if the borrow is allowed, otherwise a semi-opaque error code (See ErrorReporter.sol) */ function borrowAllowed( address pToken, address borrower, uint borrowAmount ) external returns (uint); /** * PIGGY-MODIFY: * @notice Validates borrow and reverts on rejection. May emit logs. * @param pToken Asset whose underlying is being borrowed * @param borrower The address borrowing the underlying * @param borrowAmount The amount of the underlying asset requested to borrow */ function borrowVerify( address pToken, address borrower, uint borrowAmount ) external; /** * PIGGY-MODIFY: * @notice Checks if the account should be allowed to repay a borrow in the given market * @param pToken The market to verify the repay against * @param payer The account which would repay the asset * @param borrower The account which would borrowed the asset * @param repayAmount The amount of the underlying asset the account would repay * @return 0 if the repay is allowed, otherwise a semi-opaque error code (See ErrorReporter.sol) */ function repayBorrowAllowed( address pToken, address payer, address borrower, uint repayAmount ) external returns (uint); /** * PIGGY-MODIFY: * @notice Validates repayBorrow and reverts on rejection. May emit logs. * @param pToken Asset being repaid * @param payer The address repaying the borrow * @param borrower The address of the borrower * @param repayAmount The amount of underlying being repaid */ function repayBorrowVerify( address pToken, address payer, address borrower, uint repayAmount, uint borrowerIndex ) external; /** * PIGGY-MODIFY: * @notice Checks if the liquidation should be allowed to occur * @param pTokenBorrowed Asset which was borrowed by the borrower * @param pTokenCollateral Asset which was used as collateral and will be seized * @param liquidator The address repaying the borrow and seizing the collateral * @param borrower The address of the borrower * @param repayAmount The amount of underlying being repaid */ function liquidateBorrowAllowed( address pTokenBorrowed, address pTokenCollateral, address liquidator, address borrower, uint repayAmount ) external returns (uint); /** * PIGGY-MODIFY: * @notice Validates liquidateBorrow and reverts on rejection. May emit logs. * @param pTokenBorrowed Asset which was borrowed by the borrower * @param pTokenCollateral Asset which was used as collateral and will be seized * @param liquidator The address repaying the borrow and seizing the collateral * @param borrower The address of the borrower * @param repayAmount The amount of underlying being repaid */ function liquidateBorrowVerify( address pTokenBorrowed, address pTokenCollateral, address liquidator, address borrower, uint repayAmount, uint seizeTokens ) external; /** * PIGGY-MODIFY: * @notice Checks if the seizing of assets should be allowed to occur * @param pTokenCollateral Asset which was used as collateral and will be seized * @param pTokenBorrowed Asset which was borrowed by the borrower * @param liquidator The address repaying the borrow and seizing the collateral * @param borrower The address of the borrower * @param seizeTokens The number of collateral tokens to seize */ function seizeAllowed( address pTokenCollateral, address pTokenBorrowed, address liquidator, address borrower, uint seizeTokens ) external returns (uint); /** * PIGGY-MODIFY: * @notice Validates seize and reverts on rejection. May emit logs. * @param pTokenCollateral Asset which was used as collateral and will be seized * @param pTokenBorrowed Asset which was borrowed by the borrower * @param liquidator The address repaying the borrow and seizing the collateral * @param borrower The address of the borrower * @param seizeTokens The number of collateral tokens to seize */ function seizeVerify( address pTokenCollateral, address pTokenBorrowed, address liquidator, address borrower, uint seizeTokens ) external; /** * PIGGY-MODIFY: * @notice Checks if the account should be allowed to transfer tokens in the given market * @param pToken The market to verify the transfer against * @param src The account which sources the tokens * @param dst The account which receives the tokens * @param transferTokens The number of pTokens to transfer * @return 0 if the transfer is allowed, otherwise a semi-opaque error code (See ErrorReporter.sol) */ function transferAllowed( address pToken, address src, address dst, uint transferTokens ) external returns (uint); /** * PIGGY-MODIFY: * @notice Validates transfer and reverts on rejection. May emit logs. * @param pToken Asset being transferred * @param src The account which sources the tokens * @param dst The account which receives the tokens * @param transferTokens The number of pTokens to transfer */ function transferVerify( address pToken, address src, address dst, uint transferTokens ) external; /*** Liquidity/Liquidation Calculations ***/ /** * PIGGY-MODIFY: * @notice Calculate number of tokens of collateral asset to seize given an underlying amount * @dev Used in liquidation (called in cToken.liquidateBorrowFresh) * @param pTokenBorrowed The address of the borrowed cToken * @param pTokenCollateral The address of the collateral cToken * @param repayAmount The amount of cTokenBorrowed underlying to convert into cTokenCollateral tokens * @return (errorCode, number of cTokenCollateral tokens to be seized in a liquidation) */ function liquidateCalculateSeizeTokens( address pTokenBorrowed, address pTokenCollateral, uint repayAmount ) external view returns (uint, uint); } // https://github.com/compound-finance/compound-protocol/blob/master/contracts/InterestRateModel.sol //Copyright 2020 Compound Labs, Inc. //Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: //1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. //2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. //3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. //THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. /** * @title wepiggy's IInterestRateModel Interface * @author wepiggy */ interface IInterestRateModel { /** * @notice Calculates the current borrow interest rate per block * @param cash The total amount of cash the market has * @param borrows The total amount of borrows the market has outstanding * @param reserves The total amount of reserves the market has * @return The borrow rate per block (as a percentage, and scaled by 1e18) */ function getBorrowRate(uint cash, uint borrows, uint reserves) external view returns (uint); /** * @notice Calculates the current supply interest rate per block * @param cash The total amount of cash the market has * @param borrows The total amount of borrows the market has outstanding * @param reserves The total amount of reserves the market has * @param reserveFactorMantissa The current reserve factor the market has * @return The supply rate per block (as a percentage, and scaled by 1e18) */ function getSupplyRate(uint cash, uint borrows, uint reserves, uint reserveFactorMantissa) external view returns (uint); } // https://github.com/compound-finance/compound-protocol/blob/master/contracts/CTokenInterfaces.sol //Copyright 2020 Compound Labs, Inc. //Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: //1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. //2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. //3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. //THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. contract PTokenStorage { /** * @notice Indicator that this is a PToken contract (for inspection) */ bool public constant isPToken = true; /** * @dev Guard variable for re-entrancy checks */ bool internal _notEntered; /** * @dev * @notice EIP-20 token name for this token */ string public name; /** * @dev * @notice EIP-20 token symbol for this token */ string public symbol; /** * @dev * @notice EIP-20 token decimals for this token */ uint8 public decimals; /** * @dev * @notice Maximum borrow rate that can ever be applied (.0005% / block) */ uint256 internal constant borrowRateMaxMantissa = 0.0005e16; /** * @dev * @notice Maximum fraction of interest that can be set aside for reserves */ uint256 internal constant reserveFactorMaxMantissa = 1e18; /** * @dev * @notice Contract which oversees inter-pToken operations */ IComptroller public comptroller; /** * @dev * @notice Model which tells what the current interest rate should be */ IInterestRateModel public interestRateModel; /** * @dev * @notice Initial exchange rate used when minting the first PTokens (used when totalSupply = 0) */ uint256 internal initialExchangeRateMantissa; /** * @dev * @notice Fraction of interest currently set aside for reserves */ uint256 public reserveFactorMantissa; /** * @dev * @notice Block number that interest was last accrued at */ uint256 public accrualBlockNumber; /** * @dev * @notice Accumulator of the total earned interest rate since the opening of the market */ uint256 public borrowIndex; /** * @dev * @notice Total amount of outstanding borrows of the underlying in this market */ uint256 public totalBorrows; /** * @dev * @notice Total amount of reserves of the underlying held in this market */ uint256 public totalReserves; /** * @dev * @notice Total number of tokens in circulation */ uint256 public totalSupply; /** * @dev * @notice Official record of token balances for each account */ mapping(address => uint256) internal accountTokens; /** * @dev * @notice Approved token transfer amounts on behalf of others */ mapping(address => mapping(address => uint256)) internal transferAllowances; /** * @notice Container for borrow balance information * @member principal Total balance (with accrued interest), after applying the most recent balance-changing action * @member interestIndex Global borrowIndex as of the most recent balance-changing action */ struct BorrowSnapshot { uint256 principal; uint256 interestIndex; } /** * @dev * @notice Mapping of account addresses to outstanding borrow balances */ mapping(address => BorrowSnapshot) internal accountBorrows; address public migrator; uint256 public minInterestAccumulated; } // https://github.com/compound-finance/compound-protocol/blob/master/contracts/CTokenInterfaces.sol //Copyright 2020 Compound Labs, Inc. //Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: //1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. //2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. //3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. //THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. abstract contract IPToken is PTokenStorage { /*** Market Events ***/ /** * @notice Event emitted when interest is accrued */ event AccrueInterest(uint256 cashPrior, uint256 interestAccumulated, uint256 borrowIndex, uint256 totalBorrows, uint256 totalReserves); /** * @notice Event emitted when tokens are minted */ event Mint(address minter, uint256 mintAmount, uint256 mintTokens, uint256 totalSupply, uint256 accountTokens); /** * @notice Event emitted when tokens are redeemed */ event Redeem(address redeemer, uint256 redeemAmount, uint256 redeemTokens, uint256 totalSupply, uint256 accountTokens); /** * @notice Event emitted when underlying is borrowed */ event Borrow(address borrower, uint256 borrowAmount, uint256 accountBorrows, uint256 totalBorrows, uint256 interestBalancePrior); /** * @notice Event emitted when a borrow is repaid */ event RepayBorrow(address payer, address borrower, uint256 repayAmount, uint256 accountBorrows, uint256 totalBorrows, uint256 interestBalancePrior); /** * @notice Event emitted when a borrow is liquidated */ event LiquidateBorrow(address liquidator, address borrower, uint256 repayAmount, address pTokenCollateral, uint256 seizeTokens); /*** Admin Events ***/ /** * @notice Event emitted when comptroller is changed */ event NewComptroller(IComptroller oldComptroller, IComptroller newComptroller); /** * @notice Event emitted when interestRateModel is changed */ event NewMarketInterestRateModel(IInterestRateModel oldInterestRateModel, IInterestRateModel newInterestRateModel); /** * @notice Event emitted when the reserve factor is changed */ event NewReserveFactor(uint256 oldReserveFactorMantissa, uint256 newReserveFactorMantissa); /** * @notice Event emitted when the reserves are added */ event ReservesAdded(address benefactor, uint256 addAmount, uint256 newTotalReserves); /** * @notice Event emitted when the reserves are reduced */ event ReservesReduced(address admin, uint256 reduceAmount, uint256 newTotalReserves); /** * @notice EIP20 Transfer event */ event Transfer(address indexed from, address indexed to, uint256 amount); /** * @notice EIP20 Approval event */ event Approval(address indexed owner, address indexed spender, uint256 amount); /** * @notice Failure event */ event Failure(uint256 error, uint256 info, uint256 detail); event NewMigrator(address oldMigrator, address newMigrator); event NewMinInterestAccumulated(uint256 oldMinInterestAccumulated, uint256 newMinInterestAccumulated); /*** User Interface ***/ function transfer(address dst, uint256 amount) external virtual returns (bool); function transferFrom(address src, address dst, uint256 amount) external virtual returns (bool); function approve(address spender, uint256 amount) external virtual returns (bool); function allowance(address owner, address spender) external virtual view returns (uint256); function balanceOf(address owner) external virtual view returns (uint256); function balanceOfUnderlying(address owner) external virtual returns (uint256); function getAccountSnapshot(address account) external virtual view returns (uint256, uint256, uint256, uint256); function borrowRatePerBlock() external virtual view returns (uint256); function supplyRatePerBlock() external virtual view returns (uint256); function totalBorrowsCurrent() external virtual returns (uint256); function borrowBalanceCurrent(address account) external virtual returns (uint256); function borrowBalanceStored(address account) public virtual view returns (uint256); function exchangeRateCurrent() public virtual returns (uint256); function exchangeRateStored() public virtual view returns (uint256); function getCash() external virtual view returns (uint256); function accrueInterest() public virtual returns (uint256); function seize(address liquidator, address borrower, uint256 seizeTokens) external virtual returns (uint256); /*** Admin Functions ***/ function _setComptroller(IComptroller newComptroller) public virtual returns (uint256); function _setReserveFactor(uint256 newReserveFactorMantissa) external virtual returns (uint256); function _reduceReserves(uint256 reduceAmount) external virtual returns (uint256); function _setInterestRateModel(IInterestRateModel newInterestRateModel) public virtual returns (uint256); function _setMigrator(address newMigrator) public virtual returns (uint256); function _setMinInterestAccumulated(uint _minInterestAccumulated) public virtual returns (uint256); } // COPIED FROM https://github.com/compound-finance/compound-protocol/blob/master/contracts/CarefulMath.sol //Copyright 2020 Compound Labs, Inc. //Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: //1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. //2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. //3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. //THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. /** * @title Careful Math * @author Compound * @notice Derived from OpenZeppelin's SafeMath library * https://github.com/OpenZeppelin/openzeppelin-solidity/blob/master/contracts/math/SafeMath.sol */ contract CarefulMath { /** * @dev Possible error codes that we can return */ enum MathError { NO_ERROR, DIVISION_BY_ZERO, INTEGER_OVERFLOW, INTEGER_UNDERFLOW } /** * @dev Multiplies two numbers, returns an error on overflow. */ function mulUInt(uint a, uint b) internal pure returns (MathError, uint) { if (a == 0) { return (MathError.NO_ERROR, 0); } uint c = a * b; if (c / a != b) { return (MathError.INTEGER_OVERFLOW, 0); } else { return (MathError.NO_ERROR, c); } } /** * @dev Integer division of two numbers, truncating the quotient. */ function divUInt(uint a, uint b) internal pure returns (MathError, uint) { if (b == 0) { return (MathError.DIVISION_BY_ZERO, 0); } return (MathError.NO_ERROR, a / b); } /** * @dev Subtracts two numbers, returns an error on overflow (i.e. if subtrahend is greater than minuend). */ function subUInt(uint a, uint b) internal pure returns (MathError, uint) { if (b <= a) { return (MathError.NO_ERROR, a - b); } else { return (MathError.INTEGER_UNDERFLOW, 0); } } /** * @dev Adds two numbers, returns an error on overflow. */ function addUInt(uint a, uint b) internal pure returns (MathError, uint) { uint c = a + b; if (c >= a) { return (MathError.NO_ERROR, c); } else { return (MathError.INTEGER_OVERFLOW, 0); } } /** * @dev add a and b and then subtract c */ function addThenSubUInt(uint a, uint b, uint c) internal pure returns (MathError, uint) { (MathError err0, uint sum) = addUInt(a, b); if (err0 != MathError.NO_ERROR) { return (err0, 0); } return subUInt(sum, c); } } // COPIED FROM https://github.com/compound-finance/compound-protocol/blob/master/contracts/Exponential.sol //Copyright 2020 Compound Labs, Inc. //Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: //1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. //2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. //3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. //THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. /** * @title Exponential module for storing fixed-precision decimals * @author Compound * @notice Exp is a struct which stores decimals with a fixed precision of 18 decimal places. * Thus, if we wanted to store the 5.1, mantissa would store 5.1e18. That is: * `Exp({mantissa: 5100000000000000000})`. */ contract Exponential is CarefulMath { uint constant expScale = 1e18; uint constant doubleScale = 1e36; uint constant halfExpScale = expScale/2; uint constant mantissaOne = expScale; struct Exp { uint mantissa; } struct Double { uint mantissa; } /** * @dev Creates an exponential from numerator and denominator values. * Note: Returns an error if (`num` * 10e18) > MAX_INT, * or if `denom` is zero. */ function getExp(uint num, uint denom) pure internal returns (MathError, Exp memory) { (MathError err0, uint scaledNumerator) = mulUInt(num, expScale); if (err0 != MathError.NO_ERROR) { return (err0, Exp({mantissa: 0})); } (MathError err1, uint rational) = divUInt(scaledNumerator, denom); if (err1 != MathError.NO_ERROR) { return (err1, Exp({mantissa: 0})); } return (MathError.NO_ERROR, Exp({mantissa: rational})); } /** * @dev Adds two exponentials, returning a new exponential. */ function addExp(Exp memory a, Exp memory b) pure internal returns (MathError, Exp memory) { (MathError error, uint result) = addUInt(a.mantissa, b.mantissa); return (error, Exp({mantissa: result})); } /** * @dev Subtracts two exponentials, returning a new exponential. */ function subExp(Exp memory a, Exp memory b) pure internal returns (MathError, Exp memory) { (MathError error, uint result) = subUInt(a.mantissa, b.mantissa); return (error, Exp({mantissa: result})); } /** * @dev Multiply an Exp by a scalar, returning a new Exp. */ function mulScalar(Exp memory a, uint scalar) pure internal returns (MathError, Exp memory) { (MathError err0, uint scaledMantissa) = mulUInt(a.mantissa, scalar); if (err0 != MathError.NO_ERROR) { return (err0, Exp({mantissa: 0})); } return (MathError.NO_ERROR, Exp({mantissa: scaledMantissa})); } /** * @dev Multiply an Exp by a scalar, then truncate to return an unsigned integer. */ function mulScalarTruncate(Exp memory a, uint scalar) pure internal returns (MathError, uint) { (MathError err, Exp memory product) = mulScalar(a, scalar); if (err != MathError.NO_ERROR) { return (err, 0); } return (MathError.NO_ERROR, truncate(product)); } /** * @dev Multiply an Exp by a scalar, truncate, then add an to an unsigned integer, returning an unsigned integer. */ function mulScalarTruncateAddUInt(Exp memory a, uint scalar, uint addend) pure internal returns (MathError, uint) { (MathError err, Exp memory product) = mulScalar(a, scalar); if (err != MathError.NO_ERROR) { return (err, 0); } return addUInt(truncate(product), addend); } /** * @dev Divide an Exp by a scalar, returning a new Exp. */ function divScalar(Exp memory a, uint scalar) pure internal returns (MathError, Exp memory) { (MathError err0, uint descaledMantissa) = divUInt(a.mantissa, scalar); if (err0 != MathError.NO_ERROR) { return (err0, Exp({mantissa: 0})); } return (MathError.NO_ERROR, Exp({mantissa: descaledMantissa})); } /** * @dev Divide a scalar by an Exp, returning a new Exp. */ function divScalarByExp(uint scalar, Exp memory divisor) pure internal returns (MathError, Exp memory) { /* We are doing this as: getExp(mulUInt(expScale, scalar), divisor.mantissa) How it works: Exp = a / b; Scalar = s; `s / (a / b)` = `b * s / a` and since for an Exp `a = mantissa, b = expScale` */ (MathError err0, uint numerator) = mulUInt(expScale, scalar); if (err0 != MathError.NO_ERROR) { return (err0, Exp({mantissa: 0})); } return getExp(numerator, divisor.mantissa); } /** * @dev Divide a scalar by an Exp, then truncate to return an unsigned integer. */ function divScalarByExpTruncate(uint scalar, Exp memory divisor) pure internal returns (MathError, uint) { (MathError err, Exp memory fraction) = divScalarByExp(scalar, divisor); if (err != MathError.NO_ERROR) { return (err, 0); } return (MathError.NO_ERROR, truncate(fraction)); } /** * @dev Multiplies two exponentials, returning a new exponential. */ function mulExp(Exp memory a, Exp memory b) pure internal returns (MathError, Exp memory) { (MathError err0, uint doubleScaledProduct) = mulUInt(a.mantissa, b.mantissa); if (err0 != MathError.NO_ERROR) { return (err0, Exp({mantissa: 0})); } // We add half the scale before dividing so that we get rounding instead of truncation. // See "Listing 6" and text above it at https://accu.org/index.php/journals/1717 // Without this change, a result like 6.6...e-19 will be truncated to 0 instead of being rounded to 1e-18. (MathError err1, uint doubleScaledProductWithHalfScale) = addUInt(halfExpScale, doubleScaledProduct); if (err1 != MathError.NO_ERROR) { return (err1, Exp({mantissa: 0})); } (MathError err2, uint product) = divUInt(doubleScaledProductWithHalfScale, expScale); // The only error `div` can return is MathError.DIVISION_BY_ZERO but we control `expScale` and it is not zero. assert(err2 == MathError.NO_ERROR); return (MathError.NO_ERROR, Exp({mantissa: product})); } /** * @dev Multiplies two exponentials given their mantissas, returning a new exponential. */ function mulExp(uint a, uint b) pure internal returns (MathError, Exp memory) { return mulExp(Exp({mantissa: a}), Exp({mantissa: b})); } /** * @dev Multiplies three exponentials, returning a new exponential. */ function mulExp3(Exp memory a, Exp memory b, Exp memory c) pure internal returns (MathError, Exp memory) { (MathError err, Exp memory ab) = mulExp(a, b); if (err != MathError.NO_ERROR) { return (err, ab); } return mulExp(ab, c); } /** * @dev Divides two exponentials, returning a new exponential. * (a/scale) / (b/scale) = (a/scale) * (scale/b) = a/b, * which we can scale as an Exp by calling getExp(a.mantissa, b.mantissa) */ function divExp(Exp memory a, Exp memory b) pure internal returns (MathError, Exp memory) { return getExp(a.mantissa, b.mantissa); } /** * @dev Truncates the given exp to a whole number value. * For example, truncate(Exp{mantissa: 15 * expScale}) = 15 */ function truncate(Exp memory exp) pure internal returns (uint) { // Note: We are not using careful math here as we're performing a division that cannot fail return exp.mantissa / expScale; } /** * @dev Checks if first Exp is less than second Exp. */ function lessThanExp(Exp memory left, Exp memory right) pure internal returns (bool) { return left.mantissa < right.mantissa; } /** * @dev Checks if left Exp <= right Exp. */ function lessThanOrEqualExp(Exp memory left, Exp memory right) pure internal returns (bool) { return left.mantissa <= right.mantissa; } /** * @dev Checks if left Exp > right Exp. */ function greaterThanExp(Exp memory left, Exp memory right) pure internal returns (bool) { return left.mantissa > right.mantissa; } /** * @dev returns true if Exp is exactly zero */ function isZeroExp(Exp memory value) pure internal returns (bool) { return value.mantissa == 0; } function safe224(uint n, string memory errorMessage) pure internal returns (uint224) { require(n < 2**224, errorMessage); return uint224(n); } function safe32(uint n, string memory errorMessage) pure internal returns (uint32) { require(n < 2**32, errorMessage); return uint32(n); } function add_(Exp memory a, Exp memory b) pure internal returns (Exp memory) { return Exp({mantissa: add_(a.mantissa, b.mantissa)}); } function add_(Double memory a, Double memory b) pure internal returns (Double memory) { return Double({mantissa: add_(a.mantissa, b.mantissa)}); } function add_(uint a, uint b) pure internal returns (uint) { return add_(a, b, "addition overflow"); } function add_(uint a, uint b, string memory errorMessage) pure internal returns (uint) { uint c = a + b; require(c >= a, errorMessage); return c; } function sub_(Exp memory a, Exp memory b) pure internal returns (Exp memory) { return Exp({mantissa: sub_(a.mantissa, b.mantissa)}); } function sub_(Double memory a, Double memory b) pure internal returns (Double memory) { return Double({mantissa: sub_(a.mantissa, b.mantissa)}); } function sub_(uint a, uint b) pure internal returns (uint) { return sub_(a, b, "subtraction underflow"); } function sub_(uint a, uint b, string memory errorMessage) pure internal returns (uint) { require(b <= a, errorMessage); return a - b; } function mul_(Exp memory a, Exp memory b) pure internal returns (Exp memory) { return Exp({mantissa: mul_(a.mantissa, b.mantissa) / expScale}); } function mul_(Exp memory a, uint b) pure internal returns (Exp memory) { return Exp({mantissa: mul_(a.mantissa, b)}); } function mul_(uint a, Exp memory b) pure internal returns (uint) { return mul_(a, b.mantissa) / expScale; } function mul_(Double memory a, Double memory b) pure internal returns (Double memory) { return Double({mantissa: mul_(a.mantissa, b.mantissa) / doubleScale}); } function mul_(Double memory a, uint b) pure internal returns (Double memory) { return Double({mantissa: mul_(a.mantissa, b)}); } function mul_(uint a, Double memory b) pure internal returns (uint) { return mul_(a, b.mantissa) / doubleScale; } function mul_(uint a, uint b) pure internal returns (uint) { return mul_(a, b, "multiplication overflow"); } function mul_(uint a, uint b, string memory errorMessage) pure internal returns (uint) { if (a == 0 || b == 0) { return 0; } uint c = a * b; require(c / a == b, errorMessage); return c; } function div_(Exp memory a, Exp memory b) pure internal returns (Exp memory) { return Exp({mantissa: div_(mul_(a.mantissa, expScale), b.mantissa)}); } function div_(Exp memory a, uint b) pure internal returns (Exp memory) { return Exp({mantissa: div_(a.mantissa, b)}); } function div_(uint a, Exp memory b) pure internal returns (uint) { return div_(mul_(a, expScale), b.mantissa); } function div_(Double memory a, Double memory b) pure internal returns (Double memory) { return Double({mantissa: div_(mul_(a.mantissa, doubleScale), b.mantissa)}); } function div_(Double memory a, uint b) pure internal returns (Double memory) { return Double({mantissa: div_(a.mantissa, b)}); } function div_(uint a, Double memory b) pure internal returns (uint) { return div_(mul_(a, doubleScale), b.mantissa); } function div_(uint a, uint b) pure internal returns (uint) { return div_(a, b, "divide by zero"); } function div_(uint a, uint b, string memory errorMessage) pure internal returns (uint) { require(b > 0, errorMessage); return a / b; } function fraction(uint a, uint b) pure internal returns (Double memory) { return Double({mantissa: div_(mul_(a, doubleScale), b)}); } } // COPIED FROM https://github.com/compound-finance/compound-protocol/blob/master/contracts/ErrorReporter.sol //Copyright 2020 Compound Labs, Inc. //Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: //1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. //2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. //3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. //THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. contract ComptrollerErrorReporter { enum Error { NO_ERROR, UNAUTHORIZED, COMPTROLLER_MISMATCH, INSUFFICIENT_SHORTFALL, INSUFFICIENT_LIQUIDITY, INVALID_CLOSE_FACTOR, INVALID_COLLATERAL_FACTOR, INVALID_LIQUIDATION_INCENTIVE, MARKET_NOT_ENTERED, // no longer possible MARKET_NOT_LISTED, MARKET_ALREADY_LISTED, MATH_ERROR, NONZERO_BORROW_BALANCE, PRICE_ERROR, REJECTION, SNAPSHOT_ERROR, TOO_MANY_ASSETS, TOO_MUCH_REPAY } enum FailureInfo { ACCEPT_ADMIN_PENDING_ADMIN_CHECK, ACCEPT_PENDING_IMPLEMENTATION_ADDRESS_CHECK, EXIT_MARKET_BALANCE_OWED, EXIT_MARKET_REJECTION, SET_CLOSE_FACTOR_OWNER_CHECK, SET_CLOSE_FACTOR_VALIDATION, SET_COLLATERAL_FACTOR_OWNER_CHECK, SET_COLLATERAL_FACTOR_NO_EXISTS, SET_COLLATERAL_FACTOR_VALIDATION, SET_COLLATERAL_FACTOR_WITHOUT_PRICE, SET_IMPLEMENTATION_OWNER_CHECK, SET_LIQUIDATION_INCENTIVE_OWNER_CHECK, SET_LIQUIDATION_INCENTIVE_VALIDATION, SET_MAX_ASSETS_OWNER_CHECK, SET_PENDING_ADMIN_OWNER_CHECK, SET_PENDING_IMPLEMENTATION_OWNER_CHECK, SET_PRICE_ORACLE_OWNER_CHECK, SUPPORT_MARKET_EXISTS, SUPPORT_MARKET_OWNER_CHECK, SET_PAUSE_GUARDIAN_OWNER_CHECK } /** * @dev `error` corresponds to enum Error; `info` corresponds to enum FailureInfo, and `detail` is an arbitrary * contract-specific code that enables us to report opaque error codes from upgradeable contracts. **/ event Failure(uint error, uint info, uint detail); /** * @dev use this when reporting a known error from the money market or a non-upgradeable collaborator */ function fail(Error err, FailureInfo info) internal returns (uint) { emit Failure(uint(err), uint(info), 0); return uint(err); } /** * @dev use this when reporting an opaque error from an upgradeable collaborator contract */ function failOpaque(Error err, FailureInfo info, uint opaqueError) internal returns (uint) { emit Failure(uint(err), uint(info), opaqueError); return uint(err); } } contract TokenErrorReporter { enum Error { NO_ERROR, UNAUTHORIZED, BAD_INPUT, COMPTROLLER_REJECTION, COMPTROLLER_CALCULATION_ERROR, INTEREST_RATE_MODEL_ERROR, INVALID_ACCOUNT_PAIR, INVALID_CLOSE_AMOUNT_REQUESTED, INVALID_COLLATERAL_FACTOR, MATH_ERROR, MARKET_NOT_FRESH, MARKET_NOT_LISTED, TOKEN_INSUFFICIENT_ALLOWANCE, TOKEN_INSUFFICIENT_BALANCE, TOKEN_INSUFFICIENT_CASH, TOKEN_TRANSFER_IN_FAILED, TOKEN_TRANSFER_OUT_FAILED } /* * Note: FailureInfo (but not Error) is kept in alphabetical order * This is because FailureInfo grows significantly faster, and * the order of Error has some meaning, while the order of FailureInfo * is entirely arbitrary. */ enum FailureInfo { ACCEPT_ADMIN_PENDING_ADMIN_CHECK, ACCRUE_INTEREST_ACCUMULATED_INTEREST_CALCULATION_FAILED, ACCRUE_INTEREST_BORROW_RATE_CALCULATION_FAILED, ACCRUE_INTEREST_NEW_BORROW_INDEX_CALCULATION_FAILED, ACCRUE_INTEREST_NEW_TOTAL_BORROWS_CALCULATION_FAILED, ACCRUE_INTEREST_NEW_TOTAL_RESERVES_CALCULATION_FAILED, ACCRUE_INTEREST_SIMPLE_INTEREST_FACTOR_CALCULATION_FAILED, BORROW_INTEREST_BALANCE_CALCULATION_FAILED, BORROW_ACCUMULATED_BALANCE_CALCULATION_FAILED, BORROW_ACCRUE_INTEREST_FAILED, BORROW_CASH_NOT_AVAILABLE, BORROW_FRESHNESS_CHECK, BORROW_NEW_TOTAL_BALANCE_CALCULATION_FAILED, BORROW_NEW_ACCOUNT_BORROW_BALANCE_CALCULATION_FAILED, BORROW_MARKET_NOT_LISTED, BORROW_COMPTROLLER_REJECTION, LIQUIDATE_ACCRUE_BORROW_INTEREST_FAILED, LIQUIDATE_ACCRUE_COLLATERAL_INTEREST_FAILED, LIQUIDATE_COLLATERAL_FRESHNESS_CHECK, LIQUIDATE_COMPTROLLER_REJECTION, LIQUIDATE_COMPTROLLER_CALCULATE_AMOUNT_SEIZE_FAILED, LIQUIDATE_CLOSE_AMOUNT_IS_UINT_MAX, LIQUIDATE_CLOSE_AMOUNT_IS_ZERO, LIQUIDATE_FRESHNESS_CHECK, LIQUIDATE_LIQUIDATOR_IS_BORROWER, LIQUIDATE_REPAY_BORROW_FRESH_FAILED, LIQUIDATE_SEIZE_BALANCE_INCREMENT_FAILED, LIQUIDATE_SEIZE_BALANCE_DECREMENT_FAILED, LIQUIDATE_SEIZE_COMPTROLLER_REJECTION, LIQUIDATE_SEIZE_LIQUIDATOR_IS_BORROWER, LIQUIDATE_SEIZE_TOO_MUCH, MINT_ACCRUE_INTEREST_FAILED, MINT_COMPTROLLER_REJECTION, MINT_EXCHANGE_CALCULATION_FAILED, MINT_EXCHANGE_RATE_READ_FAILED, MINT_FRESHNESS_CHECK, MINT_NEW_ACCOUNT_BALANCE_CALCULATION_FAILED, MINT_NEW_TOTAL_SUPPLY_CALCULATION_FAILED, MINT_TRANSFER_IN_FAILED, MINT_TRANSFER_IN_NOT_POSSIBLE, REDEEM_ACCRUE_INTEREST_FAILED, REDEEM_COMPTROLLER_REJECTION, REDEEM_EXCHANGE_TOKENS_CALCULATION_FAILED, REDEEM_EXCHANGE_AMOUNT_CALCULATION_FAILED, REDEEM_EXCHANGE_RATE_READ_FAILED, REDEEM_FRESHNESS_CHECK, REDEEM_NEW_ACCOUNT_BALANCE_CALCULATION_FAILED, REDEEM_NEW_TOTAL_SUPPLY_CALCULATION_FAILED, REDEEM_TRANSFER_OUT_NOT_POSSIBLE, REDUCE_RESERVES_ACCRUE_INTEREST_FAILED, REDUCE_RESERVES_ADMIN_CHECK, REDUCE_RESERVES_CASH_NOT_AVAILABLE, REDUCE_RESERVES_FRESH_CHECK, REDUCE_RESERVES_VALIDATION, REPAY_BEHALF_ACCRUE_INTEREST_FAILED, REPAY_BORROW_ACCRUE_INTEREST_FAILED, REPAY_BORROW_INTEREST_BALANCE_CALCULATION_FAILED, REPAY_BORROW_ACCUMULATED_BALANCE_CALCULATION_FAILED, REPAY_BORROW_COMPTROLLER_REJECTION, REPAY_BORROW_FRESHNESS_CHECK, REPAY_BORROW_NEW_ACCOUNT_BORROW_BALANCE_CALCULATION_FAILED, REPAY_BORROW_NEW_TOTAL_BALANCE_CALCULATION_FAILED, REPAY_BORROW_TRANSFER_IN_NOT_POSSIBLE, SET_COLLATERAL_FACTOR_OWNER_CHECK, SET_COLLATERAL_FACTOR_VALIDATION, SET_COMPTROLLER_OWNER_CHECK, SET_INTEREST_RATE_MODEL_ACCRUE_INTEREST_FAILED, SET_INTEREST_RATE_MODEL_FRESH_CHECK, SET_INTEREST_RATE_MODEL_OWNER_CHECK, SET_MAX_ASSETS_OWNER_CHECK, SET_ORACLE_MARKET_NOT_LISTED, SET_PENDING_ADMIN_OWNER_CHECK, SET_RESERVE_FACTOR_ACCRUE_INTEREST_FAILED, SET_RESERVE_FACTOR_ADMIN_CHECK, SET_RESERVE_FACTOR_FRESH_CHECK, SET_RESERVE_FACTOR_BOUNDS_CHECK, TRANSFER_COMPTROLLER_REJECTION, TRANSFER_NOT_ALLOWED, TRANSFER_NOT_ENOUGH, TRANSFER_TOO_MUCH, ADD_RESERVES_ACCRUE_INTEREST_FAILED, ADD_RESERVES_FRESH_CHECK, ADD_RESERVES_TRANSFER_IN_NOT_POSSIBLE } /** * @dev `error` corresponds to enum Error; `info` corresponds to enum FailureInfo, and `detail` is an arbitrary * contract-specific code that enables us to report opaque error codes from upgradeable contracts. **/ event Failure(uint error, uint info, uint detail); /** * @dev use this when reporting a known error from the money market or a non-upgradeable collaborator */ function fail(Error err, FailureInfo info) internal returns (uint) { emit Failure(uint(err), uint(info), 0); return uint(err); } /** * @dev use this when reporting an opaque error from an upgradeable collaborator contract */ function failOpaque(Error err, FailureInfo info, uint opaqueError) internal returns (uint) { emit Failure(uint(err), uint(info), opaqueError); return uint(err); } } /** * @title Initializable * * @dev Helper contract to support initializer functions. To use it, replace * the constructor with a function that has the `initializer` modifier. * WARNING: Unlike constructors, initializer functions must be manually * invoked. This applies both to deploying an Initializable contract, as well * as extending an Initializable contract via inheritance. * WARNING: When used with inheritance, manual care must be taken to not invoke * a parent initializer twice, or ensure that all initializers are idempotent, * because this is not dealt with automatically as with constructors. */ contract Initializable { /** * @dev Indicates that the contract has been initialized. */ bool private initialized; /** * @dev Indicates that the contract is in the process of being initialized. */ bool private initializing; /** * @dev Modifier to use in the initializer function of a contract. */ modifier initializer() { require(initializing || isConstructor() || !initialized, "Contract instance has already been initialized"); bool isTopLevelCall = !initializing; if (isTopLevelCall) { initializing = true; initialized = true; } _; if (isTopLevelCall) { initializing = false; } } /// @dev Returns true if and only if the function is running in the constructor function isConstructor() private view returns (bool) { // extcodesize checks the size of the code stored in an address, and // address returns the current address. Since the code is still not // deployed when running a constructor, any checks on its code size will // yield zero, making it an effective way to detect if a contract is // under construction or not. address self = address(this); uint256 cs; assembly { cs := extcodesize(self) } return cs == 0; } // Reserved storage space to allow for layout changes in the future. uint256[50] private ______gap; } /* * @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 GSN 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. */ contract ContextUpgradeSafe is Initializable { // Empty internal constructor, to prevent people from mistakenly deploying // an instance of this contract, which should be used via inheritance. function __Context_init() internal initializer { __Context_init_unchained(); } function __Context_init_unchained() internal initializer { } function _msgSender() internal view virtual returns (address payable) { return msg.sender; } function _msgData() internal view virtual returns (bytes memory) { this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691 return msg.data; } uint256[50] private __gap; } /** * @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. */ contract OwnableUpgradeSafe is Initializable, ContextUpgradeSafe { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ function __Ownable_init() internal initializer { __Context_init_unchained(); __Ownable_init_unchained(); } function __Ownable_init_unchained() internal initializer { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } /** * @dev Returns the address of the current owner. */ function owner() public view returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = 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"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } uint256[49] private __gap; } // https://github.com/compound-finance/compound-protocol/blob/master/contracts/CToken.sol //Copyright 2020 Compound Labs, Inc. //Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: //1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. //2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. //3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. //THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. /** * @title WePiggy's PToken Contract * @notice Abstract base for PTokens * @author Compound */ abstract contract PToken is IPToken, Exponential, TokenErrorReporter, OwnableUpgradeSafe { /** * @notice Initialize the money market * @param comptroller_ The address of the Comptroller * @param interestRateModel_ The address of the interest rate model * @param initialExchangeRateMantissa_ The initial exchange rate, scaled by 1e18 * @param name_ EIP-20 name of this token * @param symbol_ EIP-20 symbol of this token * @param decimals_ EIP-20 decimal precision of this token */ function init(IComptroller comptroller_, IInterestRateModel interestRateModel_, uint initialExchangeRateMantissa_, string memory name_, string memory symbol_, uint8 decimals_) public onlyOwner { require(accrualBlockNumber == 0 && borrowIndex == 0, "market may only be initialized once"); // Set initial exchange rate initialExchangeRateMantissa = initialExchangeRateMantissa_; require(initialExchangeRateMantissa > 0, "initial exchange rate must be greater than zero."); // Set the comptroller uint err = _setComptroller(comptroller_); require(err == uint(Error.NO_ERROR), "setting comptroller failed"); // Initialize block number and borrow index (block number mocks depend on comptroller being set) accrualBlockNumber = getBlockNumber(); borrowIndex = mantissaOne; // Set the interest rate model (depends on block number / borrow index) err = _setInterestRateModelFresh(interestRateModel_); require(err == uint(Error.NO_ERROR), "setting interest rate model failed"); name = name_; symbol = symbol_; decimals = decimals_; // The counter starts true to prevent changing it from zero to non-zero (i.e. smaller cost/refund) _notEntered = true; } /** * @notice Transfer `tokens` tokens from `src` to `dst` by `spender` * @dev Called by both `transfer` and `transferFrom` internally * @param spender The address of the account performing the transfer * @param src The address of the source account * @param dst The address of the destination account * @param tokens The number of tokens to transfer * @return Whether or not the transfer succeeded */ function transferTokens(address spender, address src, address dst, uint tokens) internal returns (uint) { /* Fail if transfer not allowed */ uint allowed = comptroller.transferAllowed(address(this), src, dst, tokens); if (allowed != 0) { return failOpaque(Error.COMPTROLLER_REJECTION, FailureInfo.TRANSFER_COMPTROLLER_REJECTION, allowed); } /* Do not allow self-transfers */ if (src == dst) { return fail(Error.BAD_INPUT, FailureInfo.TRANSFER_NOT_ALLOWED); } /* Get the allowance, infinite for the account owner */ uint startingAllowance = 0; if (spender == src) { startingAllowance = uint(- 1); } else { startingAllowance = transferAllowances[src][spender]; } /* Do the calculations, checking for {under,over}flow */ MathError mathErr; uint allowanceNew; uint srcTokensNew; uint dstTokensNew; (mathErr, allowanceNew) = subUInt(startingAllowance, tokens); if (mathErr != MathError.NO_ERROR) { return fail(Error.MATH_ERROR, FailureInfo.TRANSFER_NOT_ALLOWED); } (mathErr, srcTokensNew) = subUInt(accountTokens[src], tokens); if (mathErr != MathError.NO_ERROR) { return fail(Error.MATH_ERROR, FailureInfo.TRANSFER_NOT_ENOUGH); } (mathErr, dstTokensNew) = addUInt(accountTokens[dst], tokens); if (mathErr != MathError.NO_ERROR) { return fail(Error.MATH_ERROR, FailureInfo.TRANSFER_TOO_MUCH); } ///////////////////////// // EFFECTS & INTERACTIONS // (No safe failures beyond this point) accountTokens[src] = srcTokensNew; accountTokens[dst] = dstTokensNew; /* Eat some of the allowance (if necessary) */ if (startingAllowance != uint(- 1)) { transferAllowances[src][spender] = allowanceNew; } /* We emit a Transfer event */ emit Transfer(src, dst, tokens); comptroller.transferVerify(address(this), src, dst, tokens); return uint(Error.NO_ERROR); } /** * @notice Transfer `amount` tokens from `msg.sender` to `dst` * @param dst The address of the destination account * @param amount The number of tokens to transfer * @return Whether or not the transfer succeeded */ function transfer(address dst, uint256 amount) external override nonReentrant returns (bool) { return transferTokens(msg.sender, msg.sender, dst, amount) == uint(Error.NO_ERROR); } /** * @notice Transfer `amount` tokens from `src` to `dst` * @param src The address of the source account * @param dst The address of the destination account * @param amount The number of tokens to transfer * @return Whether or not the transfer succeeded */ function transferFrom(address src, address dst, uint256 amount) external override nonReentrant returns (bool) { return transferTokens(msg.sender, src, dst, amount) == uint(Error.NO_ERROR); } /** * @notice Approve `spender` to transfer up to `amount` from `src` * @dev This will overwrite the approval amount for `spender` * and is subject to issues noted [here](https://eips.ethereum.org/EIPS/eip-20#approve) * @param spender The address of the account which may transfer tokens * @param amount The number of tokens that are approved (-1 means infinite) * @return Whether or not the approval succeeded */ function approve(address spender, uint256 amount) external override returns (bool) { address src = msg.sender; transferAllowances[src][spender] = amount; emit Approval(src, spender, amount); return true; } /** * @notice Get the current allowance from `owner` for `spender` * @param owner The address of the account which owns the tokens to be spent * @param spender The address of the account which may transfer tokens * @return The number of tokens allowed to be spent (-1 means infinite) */ function allowance(address owner, address spender) external override view returns (uint256) { return transferAllowances[owner][spender]; } /** * @notice Get the token balance of the `owner` * @param owner The address of the account to query * @return The number of tokens owned by `owner` */ function balanceOf(address owner) external override view returns (uint256) { return accountTokens[owner]; } /** * @notice Get the underlying balance of the `owner` * @dev This also accrues interest in a transaction * @param owner The address of the account to query * @return The amount of underlying owned by `owner` */ function balanceOfUnderlying(address owner) external override returns (uint) { Exp memory exchangeRate = Exp({mantissa : exchangeRateCurrent()}); (MathError mErr, uint balance) = mulScalarTruncate(exchangeRate, accountTokens[owner]); require(mErr == MathError.NO_ERROR, "balance could not be calculated"); return balance; } /** * @notice Get a snapshot of the account's balances, and the cached exchange rate * @dev This is used by comptroller to more efficiently perform liquidity checks. * @param account Address of the account to snapshot * @return (possible error, token balance, borrow balance, exchange rate mantissa) */ function getAccountSnapshot(address account) external override view returns (uint, uint, uint, uint) { uint cTokenBalance = accountTokens[account]; uint borrowBalance; uint exchangeRateMantissa; MathError mErr; (mErr, borrowBalance) = borrowBalanceStoredInternal(account); if (mErr != MathError.NO_ERROR) { return (uint(Error.MATH_ERROR), 0, 0, 0); } (mErr, exchangeRateMantissa) = exchangeRateStoredInternal(); if (mErr != MathError.NO_ERROR) { return (uint(Error.MATH_ERROR), 0, 0, 0); } return (uint(Error.NO_ERROR), cTokenBalance, borrowBalance, exchangeRateMantissa); } /** * @dev Function to simply retrieve block number * This exists mainly for inheriting test contracts to stub this result. */ function getBlockNumber() internal view returns (uint) { return block.number; } /** * @notice Returns the current per-block borrow interest rate for this cToken * @return The borrow interest rate per block, scaled by 1e18 */ function borrowRatePerBlock() external override view returns (uint) { return interestRateModel.getBorrowRate(getCashPrior(), totalBorrows, totalReserves); } /** * @notice Returns the current per-block supply interest rate for this cToken * @return The supply interest rate per block, scaled by 1e18 */ function supplyRatePerBlock() external override view returns (uint) { return interestRateModel.getSupplyRate(getCashPrior(), totalBorrows, totalReserves, reserveFactorMantissa); } /** * @notice Returns the current total borrows plus accrued interest * @return The total borrows with interest */ function totalBorrowsCurrent() external override nonReentrant returns (uint) { require(accrueInterest() == uint(Error.NO_ERROR), "accrue interest failed"); return totalBorrows; } /** * @notice Accrue interest to updated borrowIndex and then calculate account's borrow balance using the updated borrowIndex * @param account The address whose balance should be calculated after updating borrowIndex * @return The calculated balance */ function borrowBalanceCurrent(address account) external override nonReentrant returns (uint) { require(accrueInterest() == uint(Error.NO_ERROR), "accrue interest failed"); return borrowBalanceStored(account); } /** * @notice Return the borrow balance of account based on stored data * @param account The address whose balance should be calculated * @return The calculated balance */ function borrowBalanceStored(address account) public override view returns (uint) { (MathError err, uint result) = borrowBalanceStoredInternal(account); require(err == MathError.NO_ERROR, "borrowBalanceStored: borrowBalanceStoredInternal failed"); return result; } /** * @notice Return the borrow balance of account based on stored data * @param account The address whose balance should be calculated * @return (error code, the calculated balance or 0 if error code is non-zero) */ function borrowBalanceStoredInternal(address account) internal view returns (MathError, uint) { /* Note: we do not assert that the market is up to date */ MathError mathErr; uint principalTimesIndex; uint result; /* Get borrowBalance and borrowIndex */ BorrowSnapshot storage borrowSnapshot = accountBorrows[account]; /* If borrowBalance = 0 then borrowIndex is likely also 0. * Rather than failing the calculation with a division by 0, we immediately return 0 in this case. */ if (borrowSnapshot.principal == 0) { return (MathError.NO_ERROR, 0); } /* Calculate new borrow balance using the interest index: * recentBorrowBalance = borrower.borrowBalance * market.borrowIndex / borrower.borrowIndex */ (mathErr, principalTimesIndex) = mulUInt(borrowSnapshot.principal, borrowIndex); if (mathErr != MathError.NO_ERROR) { return (mathErr, 0); } (mathErr, result) = divUInt(principalTimesIndex, borrowSnapshot.interestIndex); if (mathErr != MathError.NO_ERROR) { return (mathErr, 0); } return (MathError.NO_ERROR, result); } /** * @notice Return the borrow interest balance of account based on stored data * @param account The address whose balance should be calculated * @return (error code, the calculated balance or 0 if error code is non-zero) */ function borrowInterestBalancePriorInternal(address account) internal view returns (MathError, uint) { MathError mathErr; uint interestTimesIndex; uint principalTimesIndex; uint interestAmountPrior; /* Get borrowBalance and borrowIndex */ BorrowSnapshot storage borrowSnapshot = accountBorrows[account]; if (borrowSnapshot.principal == 0) { return (MathError.NO_ERROR, 0); } (mathErr, interestTimesIndex) = mulUInt(borrowSnapshot.principal, borrowIndex); if (mathErr != MathError.NO_ERROR) { return (mathErr, 0); } if (borrowSnapshot.interestIndex == 0) { return (MathError.NO_ERROR, 0); } (mathErr, principalTimesIndex) = divUInt(interestTimesIndex, borrowSnapshot.interestIndex); if (mathErr != MathError.NO_ERROR) { return (mathErr, 0); } (mathErr, interestAmountPrior) = subUInt(principalTimesIndex, borrowSnapshot.principal); if (mathErr != MathError.NO_ERROR) { return (mathErr, 0); } return (MathError.NO_ERROR, interestAmountPrior); } /** * @notice Accrue interest then return the up-to-date exchange rate * @return Calculated exchange rate scaled by 1e18 */ function exchangeRateCurrent() public override nonReentrant returns (uint) { require(accrueInterest() == uint(Error.NO_ERROR), "accrue interest failed"); return exchangeRateStored(); } /** * @notice Calculates the exchange rate from the underlying to the CToken * @dev This function does not accrue interest before calculating the exchange rate * @return Calculated exchange rate scaled by 1e18 */ function exchangeRateStored() public override view returns (uint) { (MathError err, uint result) = exchangeRateStoredInternal(); require(err == MathError.NO_ERROR, "exchangeRateStored: exchangeRateStoredInternal failed"); return result; } /** * @notice Calculates the exchange rate from the underlying to the CToken * @dev This function does not accrue interest before calculating the exchange rate * @return (error code, calculated exchange rate scaled by 1e18) */ function exchangeRateStoredInternal() internal view returns (MathError, uint) { uint _totalSupply = totalSupply; if (_totalSupply == 0) { /* * If there are no tokens minted: * exchangeRate = initialExchangeRate */ return (MathError.NO_ERROR, initialExchangeRateMantissa); } else { /* * Otherwise: * exchangeRate = (totalCash + totalBorrows - totalReserves) / totalSupply */ uint totalCash = getCashPrior(); uint cashPlusBorrowsMinusReserves; Exp memory exchangeRate; MathError mathErr; (mathErr, cashPlusBorrowsMinusReserves) = addThenSubUInt(totalCash, totalBorrows, totalReserves); if (mathErr != MathError.NO_ERROR) { return (mathErr, 0); } (mathErr, exchangeRate) = getExp(cashPlusBorrowsMinusReserves, _totalSupply); if (mathErr != MathError.NO_ERROR) { return (mathErr, 0); } return (MathError.NO_ERROR, exchangeRate.mantissa); } } /** * @notice Get cash balance of this cToken in the underlying asset * @return The quantity of underlying asset owned by this contract */ function getCash() external override view returns (uint) { return getCashPrior(); } /** * @notice Applies accrued interest to total borrows and reserves * @dev This function is copy form accrueInterest. */ function accrueInterestSnapshot() public view returns (uint[] memory) { /* Remember the initial block number */ uint currentBlockNumber = getBlockNumber(); uint accrualBlockNumberPrior = accrualBlockNumber; /* Read the previous values out of storage */ uint cashPrior = getCashPrior(); uint borrowsPrior = totalBorrows; uint reservesPrior = totalReserves; uint borrowIndexPrior = borrowIndex; /* Calculate the current borrow interest rate */ uint borrowRateMantissa = interestRateModel.getBorrowRate(cashPrior, borrowsPrior, reservesPrior); require(borrowRateMantissa <= borrowRateMaxMantissa, "borrow rate is absurdly high"); /* Calculate the number of blocks elapsed since the last accrual */ (MathError mathErr, uint blockDelta) = subUInt(currentBlockNumber, accrualBlockNumberPrior); require(mathErr == MathError.NO_ERROR, "could not calculate block delta"); /* * Calculate the interest accumulated into borrows and reserves and the new index: * simpleInterestFactor = borrowRate * blockDelta * interestAccumulated = simpleInterestFactor * totalBorrows * totalBorrowsNew = interestAccumulated + totalBorrows * totalReservesNew = interestAccumulated * reserveFactor + totalReserves * borrowIndexNew = simpleInterestFactor * borrowIndex + borrowIndex */ Exp memory simpleInterestFactor; uint interestAccumulated; uint totalBorrowsNew; uint totalReservesNew; uint borrowIndexNew; uint[] memory res = new uint[](6); (mathErr, simpleInterestFactor) = mulScalar(Exp({mantissa : borrowRateMantissa}), blockDelta); if (mathErr != MathError.NO_ERROR) { return res; } (mathErr, interestAccumulated) = mulScalarTruncate(simpleInterestFactor, borrowsPrior); if (mathErr != MathError.NO_ERROR) { return res; } (mathErr, totalBorrowsNew) = addUInt(interestAccumulated, borrowsPrior); if (mathErr != MathError.NO_ERROR) { return res; } (mathErr, totalReservesNew) = mulScalarTruncateAddUInt(Exp({mantissa : reserveFactorMantissa}), interestAccumulated, reservesPrior); if (mathErr != MathError.NO_ERROR) { return res; } (mathErr, borrowIndexNew) = mulScalarTruncateAddUInt(simpleInterestFactor, borrowIndexPrior, borrowIndexPrior); if (mathErr != MathError.NO_ERROR) { return res; } res[0] = currentBlockNumber; res[1] = cashPrior; res[2] = interestAccumulated; res[3] = totalBorrowsNew; res[4] = totalReservesNew; res[5] = borrowIndexNew; return res; } /** * @notice Applies accrued interest to total borrows and reserves * @dev This calculates interest accrued from the last checkpointed block * up to the current block and writes new checkpoint to storage. */ function accrueInterest() public override returns (uint) { /* Remember the initial block number */ uint currentBlockNumber = getBlockNumber(); uint accrualBlockNumberPrior = accrualBlockNumber; /* Short-circuit accumulating 0 interest */ if (accrualBlockNumberPrior == currentBlockNumber) { return uint(Error.NO_ERROR); } /* Read the previous values out of storage */ uint cashPrior = getCashPrior(); uint borrowsPrior = totalBorrows; uint reservesPrior = totalReserves; uint borrowIndexPrior = borrowIndex; /* Calculate the current borrow interest rate */ uint borrowRateMantissa = interestRateModel.getBorrowRate(cashPrior, borrowsPrior, reservesPrior); require(borrowRateMantissa <= borrowRateMaxMantissa, "borrow rate is absurdly high"); /* Calculate the number of blocks elapsed since the last accrual */ (MathError mathErr, uint blockDelta) = subUInt(currentBlockNumber, accrualBlockNumberPrior); require(mathErr == MathError.NO_ERROR, "could not calculate block delta"); /* * Calculate the interest accumulated into borrows and reserves and the new index: * simpleInterestFactor = borrowRate * blockDelta * interestAccumulated = simpleInterestFactor * totalBorrows * totalBorrowsNew = interestAccumulated + totalBorrows * totalReservesNew = interestAccumulated * reserveFactor + totalReserves * borrowIndexNew = simpleInterestFactor * borrowIndex + borrowIndex */ Exp memory simpleInterestFactor; uint interestAccumulated; uint totalBorrowsNew; uint totalReservesNew; uint borrowIndexNew; (mathErr, simpleInterestFactor) = mulScalar(Exp({mantissa : borrowRateMantissa}), blockDelta); if (mathErr != MathError.NO_ERROR) { return failOpaque(Error.MATH_ERROR, FailureInfo.ACCRUE_INTEREST_SIMPLE_INTEREST_FACTOR_CALCULATION_FAILED, uint(mathErr)); } (mathErr, interestAccumulated) = mulScalarTruncate(simpleInterestFactor, borrowsPrior); if (mathErr != MathError.NO_ERROR) { return failOpaque(Error.MATH_ERROR, FailureInfo.ACCRUE_INTEREST_ACCUMULATED_INTEREST_CALCULATION_FAILED, uint(mathErr)); } // if interestAccumulated < minInterestAccumulated, set interestAccumulated = minInterestAccumulated (mathErr,) = subUInt(interestAccumulated, minInterestAccumulated); if (mathErr != MathError.NO_ERROR) { interestAccumulated = minInterestAccumulated; } (mathErr, totalBorrowsNew) = addUInt(interestAccumulated, borrowsPrior); if (mathErr != MathError.NO_ERROR) { return failOpaque(Error.MATH_ERROR, FailureInfo.ACCRUE_INTEREST_NEW_TOTAL_BORROWS_CALCULATION_FAILED, uint(mathErr)); } (mathErr, totalReservesNew) = mulScalarTruncateAddUInt(Exp({mantissa : reserveFactorMantissa}), interestAccumulated, reservesPrior); if (mathErr != MathError.NO_ERROR) { return failOpaque(Error.MATH_ERROR, FailureInfo.ACCRUE_INTEREST_NEW_TOTAL_RESERVES_CALCULATION_FAILED, uint(mathErr)); } (mathErr, borrowIndexNew) = mulScalarTruncateAddUInt(simpleInterestFactor, borrowIndexPrior, borrowIndexPrior); if (mathErr != MathError.NO_ERROR) { return failOpaque(Error.MATH_ERROR, FailureInfo.ACCRUE_INTEREST_NEW_BORROW_INDEX_CALCULATION_FAILED, uint(mathErr)); } ///////////////////////// // EFFECTS & INTERACTIONS // (No safe failures beyond this point) /* We write the previously calculated values into storage */ accrualBlockNumber = currentBlockNumber; borrowIndex = borrowIndexNew; totalBorrows = totalBorrowsNew; totalReserves = totalReservesNew; /* We emit an AccrueInterest event */ emit AccrueInterest(cashPrior, interestAccumulated, borrowIndexNew, totalBorrowsNew, totalReservesNew); return uint(Error.NO_ERROR); } /** * @notice Sender supplies assets into the market and receives cTokens in exchange * @dev Accrues interest whether or not the operation succeeds, unless reverted * @param mintAmount The amount of the underlying asset to supply * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual mint amount. */ function mintInternal(uint mintAmount) internal nonReentrant returns (uint, uint) { uint error = accrueInterest(); if (error != uint(Error.NO_ERROR)) { // accrueInterest emits logs on errors, but we still want to log the fact that an attempted borrow failed return (fail(Error(error), FailureInfo.MINT_ACCRUE_INTEREST_FAILED), 0); } // mintFresh emits the actual Mint event if successful and logs on errors, so we don't need to return mintFresh(msg.sender, mintAmount, 0); } function mintInternalForMigrate(uint mintAmount, uint mintTokens) internal nonReentrant returns (uint, uint) { require(msg.sender == migrator, "mintInternalForMigrate: caller is not the migrator"); uint error = accrueInterest(); if (error != uint(Error.NO_ERROR)) { // accrueInterest emits logs on errors, but we still want to log the fact that an attempted borrow failed return (fail(Error(error), FailureInfo.MINT_ACCRUE_INTEREST_FAILED), 0); } // mintFresh emits the actual Mint event if successful and logs on errors, so we don't need to return mintFresh(msg.sender, mintAmount, mintTokens); } struct MintLocalVars { Error err; MathError mathErr; uint exchangeRateMantissa; uint mintTokens; uint totalSupplyNew; uint accountTokensNew; uint actualMintAmount; } /** * @notice User supplies assets into the market and receives cTokens in exchange * @dev Assumes interest has already been accrued up to the current block * @param minter The address of the account which is supplying the assets * @param mintAmount The amount of the underlying asset to supply * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual mint amount. */ function mintFresh(address minter, uint mintAmount, uint mintTokens) internal returns (uint, uint) { /* Fail if mint not allowed */ if (mintTokens == 0) { uint allowed = comptroller.mintAllowed(address(this), minter, mintAmount); if (allowed != 0) { return (failOpaque(Error.COMPTROLLER_REJECTION, FailureInfo.MINT_COMPTROLLER_REJECTION, allowed), 0); } } /* Verify market's block number equals current block number */ if (accrualBlockNumber != getBlockNumber()) { return (fail(Error.MARKET_NOT_FRESH, FailureInfo.MINT_FRESHNESS_CHECK), 0); } MintLocalVars memory vars; if (mintTokens == 0) { (vars.mathErr, vars.exchangeRateMantissa) = exchangeRateStoredInternal(); if (vars.mathErr != MathError.NO_ERROR) { return (failOpaque(Error.MATH_ERROR, FailureInfo.MINT_EXCHANGE_RATE_READ_FAILED, uint(vars.mathErr)), 0); } } ///////////////////////// // EFFECTS & INTERACTIONS // (No safe failures beyond this point) /* * We call `doTransferIn` for the minter and the mintAmount. * Note: The cToken must handle variations between ERC-20 and ETH underlying. * `doTransferIn` reverts if anything goes wrong, since we can't be sure if * side-effects occurred. The function returns the amount actually transferred, * in case of a fee. On success, the cToken holds an additional `actualMintAmount` * of cash. */ vars.actualMintAmount = doTransferIn(minter, mintAmount); if (mintTokens == 0) { /* * We get the current exchange rate and calculate the number of cTokens to be minted: * mintTokens = actualMintAmount / exchangeRate */ (vars.mathErr, vars.mintTokens) = divScalarByExpTruncate(vars.actualMintAmount, Exp({mantissa : vars.exchangeRateMantissa})); require(vars.mathErr == MathError.NO_ERROR, "MINT_EXCHANGE_CALCULATION_FAILED"); } else { vars.mintTokens = mintTokens; } /* * We calculate the new total supply of cTokens and minter token balance, checking for overflow: * totalSupplyNew = totalSupply + mintTokens * accountTokensNew = accountTokens[minter] + mintTokens */ (vars.mathErr, vars.totalSupplyNew) = addUInt(totalSupply, vars.mintTokens); require(vars.mathErr == MathError.NO_ERROR, "MINT_NEW_TOTAL_SUPPLY_CALCULATION_FAILED"); (vars.mathErr, vars.accountTokensNew) = addUInt(accountTokens[minter], vars.mintTokens); require(vars.mathErr == MathError.NO_ERROR, "MINT_NEW_ACCOUNT_BALANCE_CALCULATION_FAILED"); /* We write previously calculated values into storage */ totalSupply = vars.totalSupplyNew; accountTokens[minter] = vars.accountTokensNew; /* We emit a Mint event, and a Transfer event */ emit Mint(minter, vars.actualMintAmount, vars.mintTokens, vars.totalSupplyNew, vars.accountTokensNew); emit Transfer(address(this), minter, vars.mintTokens); /* We call the defense hook */ comptroller.mintVerify(address(this), minter, vars.actualMintAmount, vars.mintTokens); return (uint(Error.NO_ERROR), vars.actualMintAmount); } /** * @notice Sender redeems cTokens in exchange for the underlying asset * @dev Accrues interest whether or not the operation succeeds, unless reverted * @param redeemTokens The number of cTokens to redeem into underlying * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details) */ function redeemInternal(uint redeemTokens) internal nonReentrant returns (uint) { uint error = accrueInterest(); if (error != uint(Error.NO_ERROR)) { // accrueInterest emits logs on errors, but we still want to log the fact that an attempted redeem failed return fail(Error(error), FailureInfo.REDEEM_ACCRUE_INTEREST_FAILED); } // redeemFresh emits redeem-specific logs on errors, so we don't need to return redeemFresh(msg.sender, redeemTokens, 0); } /** * @notice Sender redeems cTokens in exchange for a specified amount of underlying asset * @dev Accrues interest whether or not the operation succeeds, unless reverted * @param redeemAmount The amount of underlying to receive from redeeming cTokens * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details) */ function redeemUnderlyingInternal(uint redeemAmount) internal nonReentrant returns (uint) { uint error = accrueInterest(); if (error != uint(Error.NO_ERROR)) { // accrueInterest emits logs on errors, but we still want to log the fact that an attempted redeem failed return fail(Error(error), FailureInfo.REDEEM_ACCRUE_INTEREST_FAILED); } // redeemFresh emits redeem-specific logs on errors, so we don't need to return redeemFresh(msg.sender, 0, redeemAmount); } struct RedeemLocalVars { Error err; MathError mathErr; uint exchangeRateMantissa; uint redeemTokens; uint redeemAmount; uint totalSupplyNew; uint accountTokensNew; } /** * @notice User redeems cTokens in exchange for the underlying asset * @dev Assumes interest has already been accrued up to the current block * @param redeemer The address of the account which is redeeming the tokens * @param redeemTokensIn The number of cTokens to redeem into underlying (only one of redeemTokensIn or redeemAmountIn may be non-zero) * @param redeemAmountIn The number of underlying tokens to receive from redeeming cTokens (only one of redeemTokensIn or redeemAmountIn may be non-zero) * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details) */ function redeemFresh(address payable redeemer, uint redeemTokensIn, uint redeemAmountIn) internal returns (uint) { require(redeemTokensIn == 0 || redeemAmountIn == 0, "one of redeemTokensIn or redeemAmountIn must be zero"); RedeemLocalVars memory vars; /* exchangeRate = invoke Exchange Rate Stored() */ (vars.mathErr, vars.exchangeRateMantissa) = exchangeRateStoredInternal(); if (vars.mathErr != MathError.NO_ERROR) { return failOpaque(Error.MATH_ERROR, FailureInfo.REDEEM_EXCHANGE_RATE_READ_FAILED, uint(vars.mathErr)); } /* If redeemTokensIn > 0: */ if (redeemTokensIn > 0) { /* * We calculate the exchange rate and the amount of underlying to be redeemed: * redeemTokens = redeemTokensIn * redeemAmount = redeemTokensIn x exchangeRateCurrent */ vars.redeemTokens = redeemTokensIn; (vars.mathErr, vars.redeemAmount) = mulScalarTruncate(Exp({mantissa : vars.exchangeRateMantissa}), redeemTokensIn); if (vars.mathErr != MathError.NO_ERROR) { return failOpaque(Error.MATH_ERROR, FailureInfo.REDEEM_EXCHANGE_TOKENS_CALCULATION_FAILED, uint(vars.mathErr)); } } else { /* * We get the current exchange rate and calculate the amount to be redeemed: * redeemTokens = redeemAmountIn / exchangeRate * redeemAmount = redeemAmountIn */ (vars.mathErr, vars.redeemTokens) = divScalarByExpTruncate(redeemAmountIn, Exp({mantissa : vars.exchangeRateMantissa})); if (vars.mathErr != MathError.NO_ERROR) { return failOpaque(Error.MATH_ERROR, FailureInfo.REDEEM_EXCHANGE_AMOUNT_CALCULATION_FAILED, uint(vars.mathErr)); } vars.redeemAmount = redeemAmountIn; } /* Fail if redeem not allowed */ uint allowed = comptroller.redeemAllowed(address(this), redeemer, vars.redeemTokens); if (allowed != 0) { return failOpaque(Error.COMPTROLLER_REJECTION, FailureInfo.REDEEM_COMPTROLLER_REJECTION, allowed); } /* Verify market's block number equals current block number */ if (accrualBlockNumber != getBlockNumber()) { return fail(Error.MARKET_NOT_FRESH, FailureInfo.REDEEM_FRESHNESS_CHECK); } /* * We calculate the new total supply and redeemer balance, checking for underflow: * totalSupplyNew = totalSupply - redeemTokens * accountTokensNew = accountTokens[redeemer] - redeemTokens */ (vars.mathErr, vars.totalSupplyNew) = subUInt(totalSupply, vars.redeemTokens); if (vars.mathErr != MathError.NO_ERROR) { return failOpaque(Error.MATH_ERROR, FailureInfo.REDEEM_NEW_TOTAL_SUPPLY_CALCULATION_FAILED, uint(vars.mathErr)); } (vars.mathErr, vars.accountTokensNew) = subUInt(accountTokens[redeemer], vars.redeemTokens); if (vars.mathErr != MathError.NO_ERROR) { return failOpaque(Error.MATH_ERROR, FailureInfo.REDEEM_NEW_ACCOUNT_BALANCE_CALCULATION_FAILED, uint(vars.mathErr)); } /* Fail gracefully if protocol has insufficient cash */ if (getCashPrior() < vars.redeemAmount) { return fail(Error.TOKEN_INSUFFICIENT_CASH, FailureInfo.REDEEM_TRANSFER_OUT_NOT_POSSIBLE); } ///////////////////////// // EFFECTS & INTERACTIONS // (No safe failures beyond this point) /* * We invoke doTransferOut for the redeemer and the redeemAmount. * Note: The cToken must handle variations between ERC-20 and ETH underlying. * On success, the cToken has redeemAmount less of cash. * doTransferOut reverts if anything goes wrong, since we can't be sure if side effects occurred. */ doTransferOut(redeemer, vars.redeemAmount); /* We write previously calculated values into storage */ totalSupply = vars.totalSupplyNew; accountTokens[redeemer] = vars.accountTokensNew; /* We emit a Transfer event, and a Redeem event */ emit Transfer(redeemer, address(this), vars.redeemTokens); emit Redeem(redeemer, vars.redeemAmount, vars.redeemTokens, vars.totalSupplyNew, vars.accountTokensNew); /* We call the defense hook */ comptroller.redeemVerify(address(this), redeemer, vars.redeemAmount, vars.redeemTokens); return uint(Error.NO_ERROR); } /** * @notice Sender borrows assets from the protocol to their own address * @param borrowAmount The amount of the underlying asset to borrow * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details) */ function borrowInternal(uint borrowAmount) internal nonReentrant returns (uint) { uint error = accrueInterest(); if (error != uint(Error.NO_ERROR)) { // accrueInterest emits logs on errors, but we still want to log the fact that an attempted borrow failed return fail(Error(error), FailureInfo.BORROW_ACCRUE_INTEREST_FAILED); } // borrowFresh emits borrow-specific logs on errors, so we don't need to return borrowFresh(msg.sender, borrowAmount); } struct BorrowLocalVars { MathError mathErr; uint accountBorrows; uint accountBorrowsNew; uint totalBorrowsNew; uint interestBalancePrior; //interest balance before now. } /** * @notice Users borrow assets from the protocol to their own address * @param borrowAmount The amount of the underlying asset to borrow * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details) */ function borrowFresh(address payable borrower, uint borrowAmount) internal returns (uint) { /* Fail if borrow not allowed */ uint allowed = comptroller.borrowAllowed(address(this), borrower, borrowAmount); if (allowed != 0) { return failOpaque(Error.COMPTROLLER_REJECTION, FailureInfo.BORROW_COMPTROLLER_REJECTION, allowed); } /* Verify market's block number equals current block number */ if (accrualBlockNumber != getBlockNumber()) { return fail(Error.MARKET_NOT_FRESH, FailureInfo.BORROW_FRESHNESS_CHECK); } /* Fail gracefully if protocol has insufficient underlying cash */ if (getCashPrior() < borrowAmount) { return fail(Error.TOKEN_INSUFFICIENT_CASH, FailureInfo.BORROW_CASH_NOT_AVAILABLE); } BorrowLocalVars memory vars; /* * We calculate the new borrower and total borrow balances, failing on overflow: * accountBorrowsNew = accountBorrows + borrowAmount * totalBorrowsNew = totalBorrows + borrowAmount */ (vars.mathErr, vars.interestBalancePrior) = borrowInterestBalancePriorInternal(borrower); if (vars.mathErr != MathError.NO_ERROR) { return failOpaque(Error.MATH_ERROR, FailureInfo.BORROW_INTEREST_BALANCE_CALCULATION_FAILED, uint(vars.mathErr)); } (vars.mathErr, vars.accountBorrows) = borrowBalanceStoredInternal(borrower); if (vars.mathErr != MathError.NO_ERROR) { return failOpaque(Error.MATH_ERROR, FailureInfo.BORROW_ACCUMULATED_BALANCE_CALCULATION_FAILED, uint(vars.mathErr)); } (vars.mathErr, vars.accountBorrowsNew) = addUInt(vars.accountBorrows, borrowAmount); if (vars.mathErr != MathError.NO_ERROR) { return failOpaque(Error.MATH_ERROR, FailureInfo.BORROW_NEW_ACCOUNT_BORROW_BALANCE_CALCULATION_FAILED, uint(vars.mathErr)); } (vars.mathErr, vars.totalBorrowsNew) = addUInt(totalBorrows, borrowAmount); if (vars.mathErr != MathError.NO_ERROR) { return failOpaque(Error.MATH_ERROR, FailureInfo.BORROW_NEW_TOTAL_BALANCE_CALCULATION_FAILED, uint(vars.mathErr)); } ///////////////////////// // EFFECTS & INTERACTIONS // (No safe failures beyond this point) /* * We invoke doTransferOut for the borrower and the borrowAmount. * Note: The cToken must handle variations between ERC-20 and ETH underlying. * On success, the cToken borrowAmount less of cash. * doTransferOut reverts if anything goes wrong, since we can't be sure if side effects occurred. */ doTransferOut(borrower, borrowAmount); /* We write the previously calculated values into storage */ accountBorrows[borrower].principal = vars.accountBorrowsNew; accountBorrows[borrower].interestIndex = borrowIndex; totalBorrows = vars.totalBorrowsNew; /* We emit a Borrow event */ emit Borrow(borrower, borrowAmount, vars.accountBorrowsNew, vars.totalBorrowsNew, vars.interestBalancePrior); /* We call the defense hook */ comptroller.borrowVerify(address(this), borrower, borrowAmount); return uint(Error.NO_ERROR); } /** * @notice Sender repays their own borrow * @param repayAmount The amount to repay * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual repayment amount. */ function repayBorrowInternal(uint repayAmount) internal nonReentrant returns (uint, uint) { uint error = accrueInterest(); if (error != uint(Error.NO_ERROR)) { // accrueInterest emits logs on errors, but we still want to log the fact that an attempted borrow failed return (fail(Error(error), FailureInfo.REPAY_BORROW_ACCRUE_INTEREST_FAILED), 0); } // repayBorrowFresh emits repay-borrow-specific logs on errors, so we don't need to return repayBorrowFresh(msg.sender, msg.sender, repayAmount); } /** * @notice Sender repays a borrow belonging to borrower * @param borrower the account with the debt being payed off * @param repayAmount The amount to repay * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual repayment amount. */ function repayBorrowBehalfInternal(address borrower, uint repayAmount) internal nonReentrant returns (uint, uint) { uint error = accrueInterest(); if (error != uint(Error.NO_ERROR)) { // accrueInterest emits logs on errors, but we still want to log the fact that an attempted borrow failed return (fail(Error(error), FailureInfo.REPAY_BEHALF_ACCRUE_INTEREST_FAILED), 0); } // repayBorrowFresh emits repay-borrow-specific logs on errors, so we don't need to return repayBorrowFresh(msg.sender, borrower, repayAmount); } struct RepayBorrowLocalVars { Error err; MathError mathErr; uint repayAmount; uint borrowerIndex; uint accountBorrows; uint accountBorrowsNew; uint totalBorrowsNew; uint actualRepayAmount; uint interestBalancePrior; } /** * @notice Borrows are repaid by another user (possibly the borrower). * @param payer the account paying off the borrow * @param borrower the account with the debt being payed off * @param repayAmount the amount of undelrying tokens being returned * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual repayment amount. */ function repayBorrowFresh(address payer, address borrower, uint repayAmount) internal returns (uint, uint) { /* Fail if repayBorrow not allowed */ uint allowed = comptroller.repayBorrowAllowed(address(this), payer, borrower, repayAmount); if (allowed != 0) { return (failOpaque(Error.COMPTROLLER_REJECTION, FailureInfo.REPAY_BORROW_COMPTROLLER_REJECTION, allowed), 0); } /* Verify market's block number equals current block number */ if (accrualBlockNumber != getBlockNumber()) { return (fail(Error.MARKET_NOT_FRESH, FailureInfo.REPAY_BORROW_FRESHNESS_CHECK), 0); } RepayBorrowLocalVars memory vars; /* We remember the original borrowerIndex for verification purposes */ vars.borrowerIndex = accountBorrows[borrower].interestIndex; (vars.mathErr, vars.interestBalancePrior) = borrowInterestBalancePriorInternal(borrower); if (vars.mathErr != MathError.NO_ERROR) { return (failOpaque(Error.MATH_ERROR, FailureInfo.REPAY_BORROW_INTEREST_BALANCE_CALCULATION_FAILED, uint(vars.mathErr)), 0); } /* We fetch the amount the borrower owes, with accumulated interest */ (vars.mathErr, vars.accountBorrows) = borrowBalanceStoredInternal(borrower); if (vars.mathErr != MathError.NO_ERROR) { return (failOpaque(Error.MATH_ERROR, FailureInfo.REPAY_BORROW_ACCUMULATED_BALANCE_CALCULATION_FAILED, uint(vars.mathErr)), 0); } /* If repayAmount == -1, repayAmount = accountBorrows */ if (repayAmount == uint(- 1)) { vars.repayAmount = vars.accountBorrows; } else { vars.repayAmount = repayAmount; } ///////////////////////// // EFFECTS & INTERACTIONS // (No safe failures beyond this point) /* * We call doTransferIn for the payer and the repayAmount * Note: The cToken must handle variations between ERC-20 and ETH underlying. * On success, the cToken holds an additional repayAmount of cash. * doTransferIn reverts if anything goes wrong, since we can't be sure if side effects occurred. * it returns the amount actually transferred, in case of a fee. */ vars.actualRepayAmount = doTransferIn(payer, vars.repayAmount); /* * We calculate the new borrower and total borrow balances, failing on underflow: * accountBorrowsNew = accountBorrows - actualRepayAmount * totalBorrowsNew = totalBorrows - actualRepayAmount */ (vars.mathErr, vars.accountBorrowsNew) = subUInt(vars.accountBorrows, vars.actualRepayAmount); require(vars.mathErr == MathError.NO_ERROR, "REPAY_BORROW_NEW_ACCOUNT_BORROW_BALANCE_CALCULATION_FAILED"); (vars.mathErr, vars.totalBorrowsNew) = subUInt(totalBorrows, vars.actualRepayAmount); require(vars.mathErr == MathError.NO_ERROR, "REPAY_BORROW_NEW_TOTAL_BALANCE_CALCULATION_FAILED"); /* We write the previously calculated values into storage */ accountBorrows[borrower].principal = vars.accountBorrowsNew; accountBorrows[borrower].interestIndex = borrowIndex; totalBorrows = vars.totalBorrowsNew; /* We emit a RepayBorrow event */ emit RepayBorrow(payer, borrower, vars.actualRepayAmount, vars.accountBorrowsNew, vars.totalBorrowsNew, vars.interestBalancePrior); /* We call the defense hook */ comptroller.repayBorrowVerify(address(this), payer, borrower, vars.actualRepayAmount, vars.borrowerIndex); return (uint(Error.NO_ERROR), vars.actualRepayAmount); } /** * @notice The sender liquidates the borrowers collateral. * The collateral seized is transferred to the liquidator. * @param borrower The borrower of this cToken to be liquidated * @param pTokenCollateral The market in which to seize collateral from the borrower * @param repayAmount The amount of the underlying borrowed asset to repay * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual repayment amount. */ function liquidateBorrowInternal(address borrower, uint repayAmount, IPToken pTokenCollateral) internal nonReentrant returns (uint, uint) { uint error = accrueInterest(); if (error != uint(Error.NO_ERROR)) { // accrueInterest emits logs on errors, but we still want to log the fact that an attempted liquidation failed return (fail(Error(error), FailureInfo.LIQUIDATE_ACCRUE_BORROW_INTEREST_FAILED), 0); } error = pTokenCollateral.accrueInterest(); if (error != uint(Error.NO_ERROR)) { // accrueInterest emits logs on errors, but we still want to log the fact that an attempted liquidation failed return (fail(Error(error), FailureInfo.LIQUIDATE_ACCRUE_COLLATERAL_INTEREST_FAILED), 0); } // liquidateBorrowFresh emits borrow-specific logs on errors, so we don't need to return liquidateBorrowFresh(msg.sender, borrower, repayAmount, pTokenCollateral); } /** * @notice The liquidator liquidates the borrowers collateral. * The collateral seized is transferred to the liquidator. * @param borrower The borrower of this cToken to be liquidated * @param liquidator The address repaying the borrow and seizing collateral * @param pTokenCollateral The market in which to seize collateral from the borrower * @param repayAmount The amount of the underlying borrowed asset to repay * @return (uint, uint) An error code (0=success, otherwise a failure, see ErrorReporter.sol), and the actual repayment amount. */ function liquidateBorrowFresh(address liquidator, address borrower, uint repayAmount, IPToken pTokenCollateral) internal returns (uint, uint) { /* Fail if liquidate not allowed */ uint allowed = comptroller.liquidateBorrowAllowed(address(this), address(pTokenCollateral), liquidator, borrower, repayAmount); if (allowed != 0) { return (failOpaque(Error.COMPTROLLER_REJECTION, FailureInfo.LIQUIDATE_COMPTROLLER_REJECTION, allowed), 0); } /* Verify market's block number equals current block number */ if (accrualBlockNumber != getBlockNumber()) { return (fail(Error.MARKET_NOT_FRESH, FailureInfo.LIQUIDATE_FRESHNESS_CHECK), 0); } /* Verify pTokenCollateral market's block number equals current block number */ if (pTokenCollateral.accrualBlockNumber() != getBlockNumber()) { return (fail(Error.MARKET_NOT_FRESH, FailureInfo.LIQUIDATE_COLLATERAL_FRESHNESS_CHECK), 0); } /* Fail if borrower = liquidator */ if (borrower == liquidator) { return (fail(Error.INVALID_ACCOUNT_PAIR, FailureInfo.LIQUIDATE_LIQUIDATOR_IS_BORROWER), 0); } /* Fail if repayAmount = 0 */ if (repayAmount == 0) { return (fail(Error.INVALID_CLOSE_AMOUNT_REQUESTED, FailureInfo.LIQUIDATE_CLOSE_AMOUNT_IS_ZERO), 0); } /* Fail if repayAmount = -1 */ if (repayAmount == uint(- 1)) { return (fail(Error.INVALID_CLOSE_AMOUNT_REQUESTED, FailureInfo.LIQUIDATE_CLOSE_AMOUNT_IS_UINT_MAX), 0); } /* Fail if repayBorrow fails */ (uint repayBorrowError, uint actualRepayAmount) = repayBorrowFresh(liquidator, borrower, repayAmount); if (repayBorrowError != uint(Error.NO_ERROR)) { return (fail(Error(repayBorrowError), FailureInfo.LIQUIDATE_REPAY_BORROW_FRESH_FAILED), 0); } ///////////////////////// // EFFECTS & INTERACTIONS // (No safe failures beyond this point) /* We calculate the number of collateral tokens that will be seized */ (uint amountSeizeError, uint seizeTokens) = comptroller.liquidateCalculateSeizeTokens(address(this), address(pTokenCollateral), actualRepayAmount); require(amountSeizeError == uint(Error.NO_ERROR), "LIQUIDATE_COMPTROLLER_CALCULATE_AMOUNT_SEIZE_FAILED"); /* Revert if borrower collateral token balance < seizeTokens */ require(pTokenCollateral.balanceOf(borrower) >= seizeTokens, "LIQUIDATE_SEIZE_TOO_MUCH"); // If this is also the collateral, run seizeInternal to avoid re-entrancy, otherwise make an external call uint seizeError; if (address(pTokenCollateral) == address(this)) { seizeError = seizeInternal(address(this), liquidator, borrower, seizeTokens); } else { seizeError = pTokenCollateral.seize(liquidator, borrower, seizeTokens); } /* Revert if seize tokens fails (since we cannot be sure of side effects) */ require(seizeError == uint(Error.NO_ERROR), "token seizure failed"); /* We emit a LiquidateBorrow event */ emit LiquidateBorrow(liquidator, borrower, actualRepayAmount, address(pTokenCollateral), seizeTokens); /* We call the defense hook */ comptroller.liquidateBorrowVerify(address(this), address(pTokenCollateral), liquidator, borrower, actualRepayAmount, seizeTokens); return (uint(Error.NO_ERROR), actualRepayAmount); } /** * @notice Transfers collateral tokens (this market) to the liquidator. * @dev Will fail unless called by another cToken during the process of liquidation. * Its absolutely critical to use msg.sender as the borrowed cToken and not a parameter. * @param liquidator The account receiving seized collateral * @param borrower The account having collateral seized * @param seizeTokens The number of cTokens to seize * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details) */ function seize(address liquidator, address borrower, uint seizeTokens) external override nonReentrant returns (uint) { return seizeInternal(msg.sender, liquidator, borrower, seizeTokens); } /** * @notice Transfers collateral tokens (this market) to the liquidator. * @dev Called only during an in-kind liquidation, or by liquidateBorrow during the liquidation of another CToken. * Its absolutely critical to use msg.sender as the seizer cToken and not a parameter. * @param seizerToken The contract seizing the collateral (i.e. borrowed cToken) * @param liquidator The account receiving seized collateral * @param borrower The account having collateral seized * @param seizeTokens The number of cTokens to seize * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details) */ function seizeInternal(address seizerToken, address liquidator, address borrower, uint seizeTokens) internal returns (uint) { /* Fail if seize not allowed */ uint allowed = comptroller.seizeAllowed(address(this), seizerToken, liquidator, borrower, seizeTokens); if (allowed != 0) { return failOpaque(Error.COMPTROLLER_REJECTION, FailureInfo.LIQUIDATE_SEIZE_COMPTROLLER_REJECTION, allowed); } /* Fail if borrower = liquidator */ if (borrower == liquidator) { return fail(Error.INVALID_ACCOUNT_PAIR, FailureInfo.LIQUIDATE_SEIZE_LIQUIDATOR_IS_BORROWER); } MathError mathErr; uint borrowerTokensNew; uint liquidatorTokensNew; /* * We calculate the new borrower and liquidator token balances, failing on underflow/overflow: * borrowerTokensNew = accountTokens[borrower] - seizeTokens * liquidatorTokensNew = accountTokens[liquidator] + seizeTokens */ (mathErr, borrowerTokensNew) = subUInt(accountTokens[borrower], seizeTokens); if (mathErr != MathError.NO_ERROR) { return failOpaque(Error.MATH_ERROR, FailureInfo.LIQUIDATE_SEIZE_BALANCE_DECREMENT_FAILED, uint(mathErr)); } (mathErr, liquidatorTokensNew) = addUInt(accountTokens[liquidator], seizeTokens); if (mathErr != MathError.NO_ERROR) { return failOpaque(Error.MATH_ERROR, FailureInfo.LIQUIDATE_SEIZE_BALANCE_INCREMENT_FAILED, uint(mathErr)); } ///////////////////////// // EFFECTS & INTERACTIONS // (No safe failures beyond this point) /* We write the previously calculated values into storage */ accountTokens[borrower] = borrowerTokensNew; accountTokens[liquidator] = liquidatorTokensNew; /* Emit a Transfer event */ emit Transfer(borrower, liquidator, seizeTokens); /* We call the defense hook */ comptroller.seizeVerify(address(this), seizerToken, liquidator, borrower, seizeTokens); return uint(Error.NO_ERROR); } /*** Admin Functions ***/ /** * @notice Sets a new comptroller for the market * @dev Admin function to set a new comptroller * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details) */ function _setComptroller(IComptroller newComptroller) public onlyOwner override returns (uint) { IComptroller oldComptroller = comptroller; // Ensure invoke comptroller.isComptroller() returns true // require(newComptroller.isComptroller(), "marker method returned false"); // Set market's comptroller to newComptroller comptroller = newComptroller; // Emit NewComptroller(oldComptroller, newComptroller) emit NewComptroller(oldComptroller, newComptroller); return uint(Error.NO_ERROR); } /** * @notice accrues interest and sets a new reserve factor for the protocol using _setReserveFactorFresh * @dev Admin function to accrue interest and set a new reserve factor * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details) */ function _setReserveFactor(uint newReserveFactorMantissa) external override nonReentrant returns (uint) { uint error = accrueInterest(); if (error != uint(Error.NO_ERROR)) { // accrueInterest emits logs on errors, but on top of that we want to log the fact that an attempted reserve factor change failed. return fail(Error(error), FailureInfo.SET_RESERVE_FACTOR_ACCRUE_INTEREST_FAILED); } // _setReserveFactorFresh emits reserve-factor-specific logs on errors, so we don't need to. return _setReserveFactorFresh(newReserveFactorMantissa); } /** * @notice Sets a new reserve factor for the protocol (*requires fresh interest accrual) * @dev Admin function to set a new reserve factor * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details) */ function _setReserveFactorFresh(uint newReserveFactorMantissa) internal onlyOwner returns (uint) { // Verify market's block number equals current block number if (accrualBlockNumber != getBlockNumber()) { return fail(Error.MARKET_NOT_FRESH, FailureInfo.SET_RESERVE_FACTOR_FRESH_CHECK); } // Check newReserveFactor ≤ maxReserveFactor if (newReserveFactorMantissa > reserveFactorMaxMantissa) { return fail(Error.BAD_INPUT, FailureInfo.SET_RESERVE_FACTOR_BOUNDS_CHECK); } uint oldReserveFactorMantissa = reserveFactorMantissa; reserveFactorMantissa = newReserveFactorMantissa; emit NewReserveFactor(oldReserveFactorMantissa, newReserveFactorMantissa); return uint(Error.NO_ERROR); } /** * @notice Accrues interest and reduces reserves by transferring from msg.sender * @param addAmount Amount of addition to reserves * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details) */ function _addReservesInternal(uint addAmount) internal nonReentrant returns (uint) { uint error = accrueInterest(); if (error != uint(Error.NO_ERROR)) { // accrueInterest emits logs on errors, but on top of that we want to log the fact that an attempted reduce reserves failed. return fail(Error(error), FailureInfo.ADD_RESERVES_ACCRUE_INTEREST_FAILED); } // _addReservesFresh emits reserve-addition-specific logs on errors, so we don't need to. (error,) = _addReservesFresh(addAmount); return error; } /** * @notice Add reserves by transferring from caller * @dev Requires fresh interest accrual * @param addAmount Amount of addition to reserves * @return (uint, uint) An error code (0=success, otherwise a failure (see ErrorReporter.sol for details)) and the actual amount added, net token fees */ function _addReservesFresh(uint addAmount) internal returns (uint, uint) { // totalReserves + actualAddAmount uint totalReservesNew; uint actualAddAmount; // We fail gracefully unless market's block number equals current block number if (accrualBlockNumber != getBlockNumber()) { return (fail(Error.MARKET_NOT_FRESH, FailureInfo.ADD_RESERVES_FRESH_CHECK), actualAddAmount); } ///////////////////////// // EFFECTS & INTERACTIONS // (No safe failures beyond this point) /* * We call doTransferIn for the caller and the addAmount * Note: The cToken must handle variations between ERC-20 and ETH underlying. * On success, the cToken holds an additional addAmount of cash. * doTransferIn reverts if anything goes wrong, since we can't be sure if side effects occurred. * it returns the amount actually transferred, in case of a fee. */ actualAddAmount = doTransferIn(msg.sender, addAmount); totalReservesNew = totalReserves + actualAddAmount; /* Revert on overflow */ require(totalReservesNew >= totalReserves, "add reserves unexpected overflow"); // Store reserves[n+1] = reserves[n] + actualAddAmount totalReserves = totalReservesNew; /* Emit NewReserves(admin, actualAddAmount, reserves[n+1]) */ emit ReservesAdded(msg.sender, actualAddAmount, totalReservesNew); /* Return (NO_ERROR, actualAddAmount) */ return (uint(Error.NO_ERROR), actualAddAmount); } /** * @notice Accrues interest and reduces reserves by transferring to admin * @param reduceAmount Amount of reduction to reserves * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details) */ function _reduceReserves(uint reduceAmount) external override nonReentrant returns (uint) { uint error = accrueInterest(); if (error != uint(Error.NO_ERROR)) { // accrueInterest emits logs on errors, but on top of that we want to log the fact that an attempted reduce reserves failed. return fail(Error(error), FailureInfo.REDUCE_RESERVES_ACCRUE_INTEREST_FAILED); } // _reduceReservesFresh emits reserve-reduction-specific logs on errors, so we don't need to. return _reduceReservesFresh(reduceAmount); } /** * @notice Reduces reserves by transferring to admin * @dev Requires fresh interest accrual * @param reduceAmount Amount of reduction to reserves * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details) */ function _reduceReservesFresh(uint reduceAmount) internal onlyOwner returns (uint) { // totalReserves - reduceAmount uint totalReservesNew; // We fail gracefully unless market's block number equals current block number if (accrualBlockNumber != getBlockNumber()) { return fail(Error.MARKET_NOT_FRESH, FailureInfo.REDUCE_RESERVES_FRESH_CHECK); } // Fail gracefully if protocol has insufficient underlying cash if (getCashPrior() < reduceAmount) { return fail(Error.TOKEN_INSUFFICIENT_CASH, FailureInfo.REDUCE_RESERVES_CASH_NOT_AVAILABLE); } // Check reduceAmount ≤ reserves[n] (totalReserves) if (reduceAmount > totalReserves) { return fail(Error.BAD_INPUT, FailureInfo.REDUCE_RESERVES_VALIDATION); } ///////////////////////// // EFFECTS & INTERACTIONS // (No safe failures beyond this point) totalReservesNew = totalReserves - reduceAmount; // We checked reduceAmount <= totalReserves above, so this should never revert. require(totalReservesNew <= totalReserves, "reduce reserves unexpected underflow"); // Store reserves[n+1] = reserves[n] - reduceAmount totalReserves = totalReservesNew; // doTransferOut reverts if anything goes wrong, since we can't be sure if side effects occurred. doTransferOut(payable(owner()), reduceAmount); emit ReservesReduced(owner(), reduceAmount, totalReservesNew); return uint(Error.NO_ERROR); } /** * @notice accrues interest and updates the interest rate model using _setInterestRateModelFresh * @dev Admin function to accrue interest and update the interest rate model * @param newInterestRateModel the new interest rate model to use * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details) */ function _setInterestRateModel(IInterestRateModel newInterestRateModel) public override returns (uint) { uint error = accrueInterest(); if (error != uint(Error.NO_ERROR)) { // accrueInterest emits logs on errors, but on top of that we want to log the fact that an attempted change of interest rate model failed return fail(Error(error), FailureInfo.SET_INTEREST_RATE_MODEL_ACCRUE_INTEREST_FAILED); } // _setInterestRateModelFresh emits interest-rate-model-update-specific logs on errors, so we don't need to. return _setInterestRateModelFresh(newInterestRateModel); } /** * @notice updates the interest rate model (*requires fresh interest accrual) * @dev Admin function to update the interest rate model * @param newInterestRateModel the new interest rate model to use * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details) */ function _setInterestRateModelFresh(IInterestRateModel newInterestRateModel) internal onlyOwner returns (uint) { // Used to store old model for use in the event that is emitted on success IInterestRateModel oldInterestRateModel; // We fail gracefully unless market's block number equals current block number if (accrualBlockNumber != getBlockNumber()) { return fail(Error.MARKET_NOT_FRESH, FailureInfo.SET_INTEREST_RATE_MODEL_FRESH_CHECK); } // Track the market's current interest rate model oldInterestRateModel = interestRateModel; // Ensure invoke newInterestRateModel.isInterestRateModel() returns true // require(newInterestRateModel.isInterestRateModel(), "marker method returned false"); // Set the interest rate model to newInterestRateModel interestRateModel = newInterestRateModel; // Emit NewMarketInterestRateModel(oldInterestRateModel, newInterestRateModel) emit NewMarketInterestRateModel(oldInterestRateModel, newInterestRateModel); return uint(Error.NO_ERROR); } function _setMigrator(address newMigrator) public onlyOwner override returns (uint) { address oldMigrator = migrator; // Set market's comptroller to newComptroller migrator = newMigrator; // Emit NewComptroller(oldComptroller, newComptroller) emit NewMigrator(oldMigrator, newMigrator); return uint(Error.NO_ERROR); } function _setMinInterestAccumulated(uint _minInterestAccumulated) public onlyOwner override returns (uint256){ uint oldMinInterestAccumulated = minInterestAccumulated; minInterestAccumulated = _minInterestAccumulated; emit NewMinInterestAccumulated(oldMinInterestAccumulated, _minInterestAccumulated); return uint(Error.NO_ERROR); } /*** Safe Token ***/ /** * @notice Gets balance of this contract in terms of the underlying * @dev This excludes the value of the current message, if any * @return The quantity of underlying owned by this contract */ function getCashPrior() internal virtual view returns (uint); /** * @dev Performs a transfer in, reverting upon failure. Returns the amount actually transferred to the protocol, in case of a fee. * This may revert due to insufficient balance or insufficient allowance. */ function doTransferIn(address from, uint amount) internal virtual returns (uint); /** * @dev Performs a transfer out, ideally returning an explanatory error code upon failure tather than reverting. * If caller has not called checked protocol's balance, may revert due to insufficient cash held in the contract. * If caller has checked protocol's balance, and verified it is >= amount, this should not revert in normal conditions. */ function doTransferOut(address payable to, uint amount) internal virtual; /*** Reentrancy Guard ***/ /** * @dev Prevents a contract from calling itself, directly or indirectly. */ modifier nonReentrant() { require(_notEntered, "re-entered"); _notEntered = false; _; _notEntered = true; // get a gas-refund post-Istanbul } } // https://github.com/compound-finance/compound-protocol/blob/master/contracts/CTokenInterfaces.sol //Copyright 2020 Compound Labs, Inc. //Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: //1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. //2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. //3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. //THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. interface IPERC20 { /*** User Interface ***/ function mint(uint256 mintAmount) external returns (uint256); function redeem(uint256 redeemTokens) external returns (uint256); function redeemUnderlying(uint256 redeemAmount) external returns (uint256); function borrow(uint256 borrowAmount) external returns (uint256); function repayBorrow(uint256 repayAmount) external returns (uint256); function repayBorrowBehalf(address borrower, uint256 repayAmount) external returns (uint256); function liquidateBorrow(address borrower, uint256 repayAmount, IPToken pTokenCollateral) external returns (uint256); /*** Admin Functions ***/ function _addReserves(uint256 addAmount) external returns (uint256); } /** * @title ERC 20 Token Standard Interface * https://eips.ethereum.org/EIPS/eip-20 */ interface IEIP20 { function name() external view returns (string memory); function symbol() external view returns (string memory); function decimals() external view returns (uint8); /** * @notice Get the total number of tokens in circulation * @return The supply of tokens */ function totalSupply() external view returns (uint256); /** * @notice Gets the balance of the specified address * @param owner The address from which the balance will be retrieved * @return balance The balance */ function balanceOf(address owner) external view returns (uint256 balance); /** * @notice Transfer `amount` tokens from `msg.sender` to `dst` * @param dst The address of the destination account * @param amount The number of tokens to transfer * @return success Whether or not the transfer succeeded */ function transfer(address dst, uint256 amount) external returns (bool success); /** * @notice Transfer `amount` tokens from `src` to `dst` * @param src The address of the source account * @param dst The address of the destination account * @param amount The number of tokens to transfer * @return success Whether or not the transfer succeeded */ function transferFrom(address src, address dst, uint256 amount) external returns (bool success); /** * @notice Approve `spender` to transfer up to `amount` from `src` * @dev This will overwrite the approval amount for `spender` * and is subject to issues noted [here](https://eips.ethereum.org/EIPS/eip-20#approve) * @param spender The address of the account which may transfer tokens * @param amount The number of tokens that are approved (-1 means infinite) * @return success Whether or not the approval succeeded */ function approve(address spender, uint256 amount) external returns (bool success); /** * @notice Get the current allowance from `owner` for `spender` * @param owner The address of the account which owns the tokens to be spent * @param spender The address of the account which may transfer tokens * @return remaining The number of tokens allowed to be spent (-1 means infinite) */ function allowance(address owner, address spender) external view returns (uint256 remaining); event Transfer(address indexed from, address indexed to, uint256 amount); event Approval(address indexed owner, address indexed spender, uint256 amount); } /** * @title IEIP20NonStandard * @dev Version of ERC20 with no return values for `transfer` and `transferFrom` * See https://medium.com/coinmonks/missing-return-value-bug-at-least-130-tokens-affected-d67bf08521ca */ interface IEIP20NonStandard { /** * @notice Get the total number of tokens in circulation * @return The supply of tokens */ function totalSupply() external view returns (uint256); /** * @notice Gets the balance of the specified address * @param owner The address from which the balance will be retrieved * @return balance */ function balanceOf(address owner) external view returns (uint256 balance); /// /// !!!!!!!!!!!!!! /// !!! NOTICE !!! `transfer` does not return a value, in violation of the ERC-20 specification /// !!!!!!!!!!!!!! /// /** * @notice Transfer `amount` tokens from `msg.sender` to `dst` * @param dst The address of the destination account * @param amount The number of tokens to transfer */ function transfer(address dst, uint256 amount) external; /// /// !!!!!!!!!!!!!! /// !!! NOTICE !!! `transferFrom` does not return a value, in violation of the ERC-20 specification /// !!!!!!!!!!!!!! /// /** * @notice Transfer `amount` tokens from `src` to `dst` * @param src The address of the source account * @param dst The address of the destination account * @param amount The number of tokens to transfer */ function transferFrom(address src, address dst, uint256 amount) external; /** * @notice Approve `spender` to transfer up to `amount` from `src` * @dev This will overwrite the approval amount for `spender` * and is subject to issues noted [here](https://eips.ethereum.org/EIPS/eip-20#approve) * @param spender The address of the account which may transfer tokens * @param amount The number of tokens that are approved * @return success Whether or not the approval succeeded */ function approve(address spender, uint256 amount) external returns (bool success); /** * @notice Get the current allowance from `owner` for `spender` * @param owner The address of the account which owns the tokens to be spent * @param spender The address of the account which may transfer tokens * @return remaining The number of tokens allowed to be spent */ function allowance(address owner, address spender) external view returns (uint256 remaining); event Transfer(address indexed from, address indexed to, uint256 amount); event Approval(address indexed owner, address indexed spender, uint256 amount); } // https://github.com/compound-finance/compound-protocol/blob/master/contracts/CTokenInterfaces.sol //Copyright 2020 Compound Labs, Inc. //Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: //1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. //2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. //3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. //THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. contract PERC20Storage { /** * @notice Underlying asset for this CToken */ address public underlying; } contract PERC20 is PToken, IPERC20, PERC20Storage { /** * @notice Initialize the new money market * @param underlying_ The address of the underlying asset * @param comptroller_ The address of the Comptroller * @param interestRateModel_ The address of the interest rate model * @param initialExchangeRateMantissa_ The initial exchange rate, scaled by 1e18 * @param name_ ERC-20 name of this token * @param symbol_ ERC-20 symbol of this token * @param decimals_ ERC-20 decimal precision of this token */ function initialize(address underlying_, IComptroller comptroller_, IInterestRateModel interestRateModel_, uint initialExchangeRateMantissa_, string memory name_, string memory symbol_, uint8 decimals_) public initializer { super.__Ownable_init(); // PToken initialize does the bulk of the work super.init(comptroller_, interestRateModel_, initialExchangeRateMantissa_, name_, symbol_, decimals_); // Set underlying and sanity check it underlying = underlying_; IEIP20(underlying).totalSupply(); } /*** User Interface ***/ /** * @notice Sender supplies assets into the market and receives cTokens in exchange * @dev Accrues interest whether or not the operation succeeds, unless reverted * @param mintAmount The amount of the underlying asset to supply * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details) */ function mint(uint mintAmount) external override returns (uint) { (uint err,) = mintInternal(mintAmount); return err; } function mintForMigrate(uint mintAmount, uint mintTokens) external returns (uint) { (uint err,) = mintInternalForMigrate(mintAmount, mintTokens); return err; } /** * @notice Sender redeems cTokens in exchange for the underlying asset * @dev Accrues interest whether or not the operation succeeds, unless reverted * @param redeemTokens The number of cTokens to redeem into underlying * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details) */ function redeem(uint redeemTokens) external override returns (uint) { return redeemInternal(redeemTokens); } /** * @notice Sender redeems cTokens in exchange for a specified amount of underlying asset * @dev Accrues interest whether or not the operation succeeds, unless reverted * @param redeemAmount The amount of underlying to redeem * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details) */ function redeemUnderlying(uint redeemAmount) external override returns (uint) { return redeemUnderlyingInternal(redeemAmount); } /** * @notice Sender borrows assets from the protocol to their own address * @param borrowAmount The amount of the underlying asset to borrow * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details) */ function borrow(uint borrowAmount) external override returns (uint) { return borrowInternal(borrowAmount); } /** * @notice Sender repays their own borrow * @param repayAmount The amount to repay * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details) */ function repayBorrow(uint repayAmount) external override returns (uint) { (uint err,) = repayBorrowInternal(repayAmount); return err; } /** * @notice Sender repays a borrow belonging to borrower * @param borrower the account with the debt being payed off * @param repayAmount The amount to repay * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details) */ function repayBorrowBehalf(address borrower, uint repayAmount) external override returns (uint) { (uint err,) = repayBorrowBehalfInternal(borrower, repayAmount); return err; } /** * @notice The sender liquidates the borrowers collateral. * The collateral seized is transferred to the liquidator. * @param borrower The borrower of this cToken to be liquidated * @param repayAmount The amount of the underlying borrowed asset to repay * @param cTokenCollateral The market in which to seize collateral from the borrower * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details) */ function liquidateBorrow(address borrower, uint repayAmount, IPToken cTokenCollateral) external override returns (uint) { (uint err,) = liquidateBorrowInternal(borrower, repayAmount, cTokenCollateral); return err; } /** * @notice The sender adds to reserves. * @param addAmount The amount fo underlying token to add as reserves * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details) */ function _addReserves(uint addAmount) external override returns (uint) { return _addReservesInternal(addAmount); } /*** Safe Token ***/ /** * @notice Gets balance of this contract in terms of the underlying * @dev This excludes the value of the current message, if any * @return The quantity of underlying tokens owned by this contract */ function getCashPrior() internal override view returns (uint) { IEIP20 token = IEIP20(underlying); return token.balanceOf(address(this)); } /** * @dev Similar to EIP20 transfer, except it handles a False result from `transferFrom` and reverts in that case. * This will revert due to insufficient balance or insufficient allowance. * This function returns the actual amount received, * which may be less than `amount` if there is a fee attached to the transfer. * * Note: This wrapper safely handles non-standard ERC-20 tokens that do not return a value. * See here: https://medium.com/coinmonks/missing-return-value-bug-at-least-130-tokens-affected-d67bf08521ca */ function doTransferIn(address from, uint amount) internal override returns (uint) { IEIP20NonStandard token = IEIP20NonStandard(underlying); uint balanceBefore = IEIP20(underlying).balanceOf(address(this)); token.transferFrom(from, address(this), amount); bool success; assembly { switch returndatasize() case 0 {// This is a non-standard ERC-20 success := not(0) // set success to true } case 32 {// This is a compliant ERC-20 returndatacopy(0, 0, 32) success := mload(0) // Set `success = returndata` of external call } default {// This is an excessively non-compliant ERC-20, revert. revert(0, 0) } } require(success, "TOKEN_TRANSFER_IN_FAILED"); // Calculate the amount that was *actually* transferred uint balanceAfter = IEIP20(underlying).balanceOf(address(this)); require(balanceAfter >= balanceBefore, "TOKEN_TRANSFER_IN_OVERFLOW"); return balanceAfter - balanceBefore; // underflow already checked above, just subtract } /** * @dev Similar to EIP20 transfer, except it handles a False success from `transfer` and returns an explanatory * error code rather than reverting. If caller has not called checked protocol's balance, this may revert due to * insufficient cash held in this contract. If caller has checked protocol's balance prior to this call, and verified * it is >= amount, this should not revert in normal conditions. * * Note: This wrapper safely handles non-standard ERC-20 tokens that do not return a value. * See here: https://medium.com/coinmonks/missing-return-value-bug-at-least-130-tokens-affected-d67bf08521ca */ function doTransferOut(address payable to, uint amount) internal override { IEIP20NonStandard token = IEIP20NonStandard(underlying); token.transfer(to, amount); bool success; assembly { switch returndatasize() case 0 {// This is a non-standard ERC-20 success := not(0) // set success to true } case 32 {// This is a complaint ERC-20 returndatacopy(0, 0, 32) success := mload(0) // Set `success = returndata` of external call } default {// This is an excessively non-compliant ERC-20, revert. revert(0, 0) } } require(success, "TOKEN_TRANSFER_OUT_FAILED"); } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"cashPrior","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"interestAccumulated","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"borrowIndex","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"totalBorrows","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"totalReserves","type":"uint256"}],"name":"AccrueInterest","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":"amount","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"borrower","type":"address"},{"indexed":false,"internalType":"uint256","name":"borrowAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"accountBorrows","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"totalBorrows","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"interestBalancePrior","type":"uint256"}],"name":"Borrow","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"error","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"info","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"detail","type":"uint256"}],"name":"Failure","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"liquidator","type":"address"},{"indexed":false,"internalType":"address","name":"borrower","type":"address"},{"indexed":false,"internalType":"uint256","name":"repayAmount","type":"uint256"},{"indexed":false,"internalType":"address","name":"pTokenCollateral","type":"address"},{"indexed":false,"internalType":"uint256","name":"seizeTokens","type":"uint256"}],"name":"LiquidateBorrow","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"minter","type":"address"},{"indexed":false,"internalType":"uint256","name":"mintAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"mintTokens","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"totalSupply","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"accountTokens","type":"uint256"}],"name":"Mint","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"contract IComptroller","name":"oldComptroller","type":"address"},{"indexed":false,"internalType":"contract IComptroller","name":"newComptroller","type":"address"}],"name":"NewComptroller","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"contract IInterestRateModel","name":"oldInterestRateModel","type":"address"},{"indexed":false,"internalType":"contract IInterestRateModel","name":"newInterestRateModel","type":"address"}],"name":"NewMarketInterestRateModel","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"oldMigrator","type":"address"},{"indexed":false,"internalType":"address","name":"newMigrator","type":"address"}],"name":"NewMigrator","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"oldMinInterestAccumulated","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newMinInterestAccumulated","type":"uint256"}],"name":"NewMinInterestAccumulated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"oldReserveFactorMantissa","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newReserveFactorMantissa","type":"uint256"}],"name":"NewReserveFactor","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"redeemer","type":"address"},{"indexed":false,"internalType":"uint256","name":"redeemAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"redeemTokens","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"totalSupply","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"accountTokens","type":"uint256"}],"name":"Redeem","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"payer","type":"address"},{"indexed":false,"internalType":"address","name":"borrower","type":"address"},{"indexed":false,"internalType":"uint256","name":"repayAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"accountBorrows","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"totalBorrows","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"interestBalancePrior","type":"uint256"}],"name":"RepayBorrow","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"benefactor","type":"address"},{"indexed":false,"internalType":"uint256","name":"addAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newTotalReserves","type":"uint256"}],"name":"ReservesAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"admin","type":"address"},{"indexed":false,"internalType":"uint256","name":"reduceAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newTotalReserves","type":"uint256"}],"name":"ReservesReduced","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[{"internalType":"uint256","name":"addAmount","type":"uint256"}],"name":"_addReserves","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"reduceAmount","type":"uint256"}],"name":"_reduceReserves","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IComptroller","name":"newComptroller","type":"address"}],"name":"_setComptroller","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IInterestRateModel","name":"newInterestRateModel","type":"address"}],"name":"_setInterestRateModel","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newMigrator","type":"address"}],"name":"_setMigrator","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_minInterestAccumulated","type":"uint256"}],"name":"_setMinInterestAccumulated","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newReserveFactorMantissa","type":"uint256"}],"name":"_setReserveFactor","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"accrualBlockNumber","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"accrueInterest","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"accrueInterestSnapshot","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","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":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOfUnderlying","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"borrowAmount","type":"uint256"}],"name":"borrow","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"borrowBalanceCurrent","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"borrowBalanceStored","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"borrowIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"borrowRatePerBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"comptroller","outputs":[{"internalType":"contract IComptroller","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"exchangeRateCurrent","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"exchangeRateStored","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"getAccountSnapshot","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getCash","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IComptroller","name":"comptroller_","type":"address"},{"internalType":"contract IInterestRateModel","name":"interestRateModel_","type":"address"},{"internalType":"uint256","name":"initialExchangeRateMantissa_","type":"uint256"},{"internalType":"string","name":"name_","type":"string"},{"internalType":"string","name":"symbol_","type":"string"},{"internalType":"uint8","name":"decimals_","type":"uint8"}],"name":"init","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"underlying_","type":"address"},{"internalType":"contract IComptroller","name":"comptroller_","type":"address"},{"internalType":"contract IInterestRateModel","name":"interestRateModel_","type":"address"},{"internalType":"uint256","name":"initialExchangeRateMantissa_","type":"uint256"},{"internalType":"string","name":"name_","type":"string"},{"internalType":"string","name":"symbol_","type":"string"},{"internalType":"uint8","name":"decimals_","type":"uint8"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"interestRateModel","outputs":[{"internalType":"contract IInterestRateModel","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isPToken","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"borrower","type":"address"},{"internalType":"uint256","name":"repayAmount","type":"uint256"},{"internalType":"contract IPToken","name":"cTokenCollateral","type":"address"}],"name":"liquidateBorrow","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"migrator","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minInterestAccumulated","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"mintAmount","type":"uint256"}],"name":"mint","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"mintAmount","type":"uint256"},{"internalType":"uint256","name":"mintTokens","type":"uint256"}],"name":"mintForMigrate","outputs":[{"internalType":"uint256","name":"","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":[{"internalType":"uint256","name":"redeemTokens","type":"uint256"}],"name":"redeem","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"redeemAmount","type":"uint256"}],"name":"redeemUnderlying","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"repayAmount","type":"uint256"}],"name":"repayBorrow","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"borrower","type":"address"},{"internalType":"uint256","name":"repayAmount","type":"uint256"}],"name":"repayBorrowBehalf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"reserveFactorMantissa","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"liquidator","type":"address"},{"internalType":"address","name":"borrower","type":"address"},{"internalType":"uint256","name":"seizeTokens","type":"uint256"}],"name":"seize","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"supplyRatePerBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalBorrows","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalBorrowsCurrent","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"totalReserves","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":"dst","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"src","type":"address"},{"internalType":"address","name":"dst","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":[],"name":"underlying","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
608060405234801561001057600080fd5b50615c2e80620000216000396000f3fe608060405234801561001057600080fd5b50600436106103275760003560e01c80637cd07e47116101b8578063bd6d894d11610104578063f2b3abbd116100a2578063f5e3c4621161007c578063f5e3c46214610b37578063f8f9da2814610b6d578063fca7820b14610b75578063fe17b28f14610b9257610327565b8063f2b3abbd14610ae3578063f2fde38b14610b09578063f3fdb15a14610b2f57610327565b8063c5ebeaec116100de578063c5ebeaec14610a73578063db006a7514610a90578063dd62ed3e14610aad578063e228bb4314610adb57610327565b8063bd6d894d146109c7578063c23d91bd146109cf578063c37f68e214610a2757610327565b806395dd919311610171578063a9059cbb1161014b578063a9059cbb14610955578063aa5af0fd14610981578063ae9d70b014610989578063b2a02ff11461099157610327565b806395dd91931461090a578063a0712d6814610930578063a6afed951461094d57610327565b80637cd07e471461077f578063852a12e3146107875780638da5cb5b146107a45780638f840ddd146107ac57806394d6c574146107b457806395d89b411461090257610327565b80633e94101011610277578063601a0bf11161023057806370a082311161020a57806370a0823114610726578063715018a61461074c57806373acee9814610754578063791d89151461075c57610327565b8063601a0bf1146106f95780636c540baf146107165780636f307dc31461071e57610327565b80633e9410101461065c5780634576b5db1461067957806347bd37181461069f57806347dfe70d146106a75780635a890c0e146106cd5780635fe3b567146106d557610327565b8063182df0f5116102e45780632608f818116102be5780632608f818146105e4578063313ce567146106105780633af9e6691461062e5780633b1d21a21461065457610327565b8063182df0f51461044e5780631a31d4651461045657806323b872dd146105ae57610327565b806306fdde031461032c578063095ea7b3146103a95780630e752702146103e9578063173b99041461041857806317bfdfbc1461042057806318160ddd14610446575b600080fd5b610334610baf565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561036e578181015183820152602001610356565b50505050905090810190601f16801561039b5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6103d5600480360360408110156103bf57600080fd5b506001600160a01b038135169060200135610c3c565b604080519115158252519081900360200190f35b610406600480360360208110156103ff57600080fd5b5035610ca9565b60408051918252519081900360200190f35b610406610cbf565b6104066004803603602081101561043657600080fd5b50356001600160a01b0316610cc5565b610406610d85565b610406610d8b565b6105ac600480360360e081101561046c57600080fd5b6001600160a01b03823581169260208101358216926040820135909216916060820135919081019060a081016080820135600160201b8111156104ae57600080fd5b8201836020820111156104c057600080fd5b803590602001918460018302840111600160201b831117156104e157600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295949360208101935035915050600160201b81111561053357600080fd5b82018360208201111561054557600080fd5b803590602001918460018302840111600160201b8311171561056657600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295505050903560ff169150610dee9050565b005b6103d5600480360360608110156105c457600080fd5b506001600160a01b03813581169160208101359091169060400135610f35565b610406600480360360408110156105fa57600080fd5b506001600160a01b038135169060200135610fa7565b610618610fbd565b6040805160ff9092168252519081900360200190f35b6104066004803603602081101561064457600080fd5b50356001600160a01b0316610fc6565b61040661107c565b6104066004803603602081101561067257600080fd5b503561108b565b6104066004803603602081101561068f57600080fd5b50356001600160a01b0316611096565b610406611163565b610406600480360360208110156106bd57600080fd5b50356001600160a01b0316611169565b6103d5611229565b6106dd61122e565b604080516001600160a01b039092168252519081900360200190f35b6104066004803603602081101561070f57600080fd5b5035611242565b6104066112dd565b6106dd6112e3565b6104066004803603602081101561073c57600080fd5b50356001600160a01b03166112f2565b6105ac61130d565b6104066113af565b6104066004803603604081101561077257600080fd5b5080359060200135611465565b6106dd611472565b6104066004803603602081101561079d57600080fd5b5035611481565b6106dd61148c565b61040661149b565b6105ac600480360360c08110156107ca57600080fd5b6001600160a01b03823581169260208101359091169160408201359190810190608081016060820135600160201b81111561080457600080fd5b82018360208201111561081657600080fd5b803590602001918460018302840111600160201b8311171561083757600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295949360208101935035915050600160201b81111561088957600080fd5b82018360208201111561089b57600080fd5b803590602001918460018302840111600160201b831117156108bc57600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295505050903560ff1691506114a19050565b610334611692565b6104066004803603602081101561092057600080fd5b50356001600160a01b03166116ea565b6104066004803603602081101561094657600080fd5b5035611747565b610406611753565b6103d56004803603604081101561096b57600080fd5b506001600160a01b038135169060200135611ad7565b610406611b48565b610406611b4e565b610406600480360360608110156109a757600080fd5b506001600160a01b03813581169160208101359091169060400135611bed565b610406611c5e565b6109d7611d1a565b60408051602080825283518183015283519192839290830191858101910280838360005b83811015610a135781810151838201526020016109fb565b505050509050019250505060405180910390f35b610a4d60048036036020811015610a3d57600080fd5b50356001600160a01b03166120b6565b604080519485526020850193909352838301919091526060830152519081900360800190f35b61040660048036036020811015610a8957600080fd5b503561214b565b61040660048036036020811015610aa657600080fd5b5035612156565b61040660048036036040811015610ac357600080fd5b506001600160a01b0381358116916020013516612161565b61040661218c565b61040660048036036020811015610af957600080fd5b50356001600160a01b0316612192565b6105ac60048036036020811015610b1f57600080fd5b50356001600160a01b03166121cc565b6106dd6122c5565b61040660048036036060811015610b4d57600080fd5b506001600160a01b038135811691602081013591604090910135166122d4565b6104066122ec565b61040660048036036020811015610b8b57600080fd5b5035612350565b61040660048036036020811015610ba857600080fd5b50356123ce565b60018054604080516020600284861615610100026000190190941693909304601f81018490048402820184019092528181529291830182828015610c345780601f10610c0957610100808354040283529160200191610c34565b820191906000526020600020905b815481529060010190602001808311610c1757829003601f168201915b505050505081565b336000818152600d602090815260408083206001600160a01b03871680855290835281842086905581518681529151939493909284927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929081900390910190a360019150505b92915050565b600080610cb583612472565b509150505b919050565b60065481565b6000805460ff16610d0a576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff19168155610d1c611753565b14610d67576040805162461bcd60e51b81526020600482015260166024820152751858d8dc9d59481a5b9d195c995cdd0819985a5b195960521b604482015290519081900360640190fd5b610d70826116ea565b90505b6000805460ff19166001179055919050565b600b5481565b6000806000610d9861251a565b90925090506000826003811115610dab57fe5b14610de75760405162461bcd60e51b8152600401808060200182810382526035815260200180615b446035913960400191505060405180910390fd5b9150505b90565b601154610100900460ff1680610e075750610e076125c9565b80610e15575060115460ff16155b610e505760405162461bcd60e51b815260040180806020018281038252602e815260200180615a92602e913960400191505060405180910390fd5b601154610100900460ff16158015610e7b576011805460ff1961ff0019909116610100171660011790555b610e836125cf565b610e918787878787876114a1565b60a880546001600160a01b0319166001600160a01b038a81169190911791829055604080516318160ddd60e01b8152905192909116916318160ddd91600480820192602092909190829003018186803b158015610eed57600080fd5b505afa158015610f01573d6000803e3d6000fd5b505050506040513d6020811015610f1757600080fd5b50508015610f2b576011805461ff00191690555b5050505050505050565b6000805460ff16610f7a576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff19168155610f9033868686612681565b1490506000805460ff191660011790559392505050565b600080610fb484846129a1565b50949350505050565b60035460ff1681565b6000610fd06157a7565b6040518060200160405280610fe3611c5e565b90526001600160a01b0384166000908152600c602052604081205491925090819061100f908490612a4b565b9092509050600082600381111561102257fe5b14611074576040805162461bcd60e51b815260206004820152601f60248201527f62616c616e636520636f756c64206e6f742062652063616c63756c6174656400604482015290519081900360640190fd5b949350505050565b6000611086612a9f565b905090565b6000610ca382612b1f565b60006110a0612bb3565b6076546001600160a01b039081169116146110f0576040805162461bcd60e51b81526020600482018190526024820152600080516020615a38833981519152604482015290519081900360640190fd5b600380546001600160a01b03848116610100818102610100600160a81b03198516179094556040805194909304919091168084526020840191909152815190927f7ac369dbd14fa5ea3f473ed67cc9d598964a77501540ba6751eb0b3decf5870d92908290030190a160005b9392505050565b60095481565b6000611173612bb3565b6076546001600160a01b039081169116146111c3576040805162461bcd60e51b81526020600482018190526024820152600080516020615a38833981519152604482015290519081900360640190fd5b600f80546001600160a01b038481166001600160a01b0319831681179093556040805191909216808252602082019390935281517f99b2b7456799067566d467831e63363500739eac62c12ccb8cf9745078f06d2a929181900390910190a1600061115c565b600181565b60035461010090046001600160a01b031681565b6000805460ff16611287576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff19168155611299611753565b905080156112bf576112b78160108111156112b057fe5b6031612bb7565b915050610d73565b6112c883612c1d565b9150506000805460ff19166001179055919050565b60075481565b60a8546001600160a01b031681565b6001600160a01b03166000908152600c602052604090205490565b611315612bb3565b6076546001600160a01b03908116911614611365576040805162461bcd60e51b81526020600482018190526024820152600080516020615a38833981519152604482015290519081900360640190fd5b6076546040516000916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3607680546001600160a01b0319169055565b6000805460ff166113f4576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff19168155611406611753565b14611451576040805162461bcd60e51b81526020600482015260166024820152751858d8dc9d59481a5b9d195c995cdd0819985a5b195960521b604482015290519081900360640190fd5b506009546000805460ff1916600117905590565b600080610fb48484612d7a565b600f546001600160a01b031681565b6000610ca382612e47565b6076546001600160a01b031690565b600a5481565b6114a9612bb3565b6076546001600160a01b039081169116146114f9576040805162461bcd60e51b81526020600482018190526024820152600080516020615a38833981519152604482015290519081900360640190fd5b6007541580156115095750600854155b6115445760405162461bcd60e51b81526004018080602001828103825260238152602001806159096023913960400191505060405180910390fd5b6005849055836115855760405162461bcd60e51b81526004018080602001828103825260308152602001806159846030913960400191505060405180910390fd5b600061159087611096565b905080156115e5576040805162461bcd60e51b815260206004820152601a60248201527f73657474696e6720636f6d7074726f6c6c6572206661696c6564000000000000604482015290519081900360640190fd5b6115ed612ec8565b600755670de0b6b3a764000060085561160586612ecc565b905080156116445760405162461bcd60e51b81526004018080602001828103825260228152602001806159b46022913960400191505060405180910390fd5b83516116579060019060208701906157ba565b50825161166b9060029060208601906157ba565b50506003805460ff90921660ff199283161790556000805490911660011790555050505050565b6002805460408051602060018416156101000260001901909316849004601f81018490048402820184019092528181529291830182828015610c345780601f10610c0957610100808354040283529160200191610c34565b60008060006116f884612fab565b9092509050600082600381111561170b57fe5b1461115c5760405162461bcd60e51b8152600401808060200182810382526037815260200180615a016037913960400191505060405180910390fd5b600080610cb58361305e565b60008061175e612ec8565b6007549091508082141561177757600092505050610deb565b6000611781612a9f565b600954600a5460085460048054604080516315f2405360e01b81529283018790526024830186905260448301859052519596509394929391926000926001600160a01b0316916315f24053916064808301926020929190829003018186803b1580156117ec57600080fd5b505afa158015611800573d6000803e3d6000fd5b505050506040513d602081101561181657600080fd5b5051905065048c27395000811115611875576040805162461bcd60e51b815260206004820152601c60248201527f626f72726f772072617465206973206162737572646c79206869676800000000604482015290519081900360640190fd5b60008061188289896130da565b9092509050600082600381111561189557fe5b146118e7576040805162461bcd60e51b815260206004820152601f60248201527f636f756c64206e6f742063616c63756c61746520626c6f636b2064656c746100604482015290519081900360640190fd5b6118ef6157a7565b60008060008061190d60405180602001604052808a815250876130fd565b9097509450600087600381111561192057fe5b146119525761193d6009600689600381111561193857fe5b613165565b9e505050505050505050505050505050610deb565b61195c858c612a4b565b9097509350600087600381111561196f57fe5b146119875761193d6009600189600381111561193857fe5b611993846010546130da565b50965060008760038111156119a457fe5b146119af5760105493505b6119b9848c6131cb565b909750925060008760038111156119cc57fe5b146119e45761193d6009600489600381111561193857fe5b6119ff6040518060200160405280600654815250858c6131f1565b90975091506000876003811115611a1257fe5b14611a2a5761193d6009600589600381111561193857fe5b611a35858a8b6131f1565b90975090506000876003811115611a4857fe5b14611a605761193d6009600389600381111561193857fe5b60078e905560088190556009839055600a829055604080518d815260208101869052808201839052606081018590526080810184905290517f717fee053884ab1935ba6d0140f6ed225371439611d9674ff445419d6a0fa1b79181900360a00190a160009e50505050505050505050505050505090565b6000805460ff16611b1c576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff19168155611b3233338686612681565b1490506000805460ff1916600117905592915050565b60085481565b6004546000906001600160a01b031663b8168816611b6a612a9f565b600954600a546006546040518563ffffffff1660e01b81526004018085815260200184815260200183815260200182815260200194505050505060206040518083038186803b158015611bbc57600080fd5b505afa158015611bd0573d6000803e3d6000fd5b505050506040513d6020811015611be657600080fd5b5051905090565b6000805460ff16611c32576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff19169055611c483385858561324d565b90506000805460ff191660011790559392505050565b6000805460ff16611ca3576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff19168155611cb5611753565b14611d00576040805162461bcd60e51b81526020600482015260166024820152751858d8dc9d59481a5b9d195c995cdd0819985a5b195960521b604482015290519081900360640190fd5b611d08610d8b565b90506000805460ff1916600117905590565b60606000611d26612ec8565b6007549091506000611d36612a9f565b600954600a5460085460048054604080516315f2405360e01b81529283018790526024830186905260448301859052519596509394929391926000926001600160a01b0316916315f24053916064808301926020929190829003018186803b158015611da157600080fd5b505afa158015611db5573d6000803e3d6000fd5b505050506040513d6020811015611dcb57600080fd5b5051905065048c27395000811115611e2a576040805162461bcd60e51b815260206004820152601c60248201527f626f72726f772072617465206973206162737572646c79206869676800000000604482015290519081900360640190fd5b600080611e3789896130da565b90925090506000826003811115611e4a57fe5b14611e9c576040805162461bcd60e51b815260206004820152601f60248201527f636f756c64206e6f742063616c63756c61746520626c6f636b2064656c746100604482015290519081900360640190fd5b611ea46157a7565b60408051600680825260e082019092526000918291829182916060916020820160c080368337019050509050611ee860405180602001604052808b815250886130fd565b90985095506000886003811115611efb57fe5b14611f16579e50610deb9d5050505050505050505050505050565b611f20868d612a4b565b90985094506000886003811115611f3357fe5b14611f4e579e50610deb9d5050505050505050505050505050565b611f58858d6131cb565b90985093506000886003811115611f6b57fe5b14611f86579e50610deb9d5050505050505050505050505050565b611fa16040518060200160405280600654815250868d6131f1565b90985092506000886003811115611fb457fe5b14611fcf579e50610deb9d5050505050505050505050505050565b611fda868b8c6131f1565b90985091506000886003811115611fed57fe5b14612008579e50610deb9d5050505050505050505050505050565b8e8160008151811061201657fe5b6020026020010181815250508c8160018151811061203057fe5b602002602001018181525050848160028151811061204a57fe5b602002602001018181525050838160038151811061206457fe5b602002602001018181525050828160048151811061207e57fe5b602002602001018181525050818160058151811061209857fe5b60209081029190910101529e50505050505050505050505050505090565b6001600160a01b0381166000908152600c60205260408120548190819081908180806120e189612fab565b9350905060008160038111156120f357fe5b146121115760095b6000806000975097509750975050505050612144565b61211961251a565b92509050600081600381111561212b57fe5b146121375760096120fb565b5060009650919450925090505b9193509193565b6000610ca3826134bf565b6000610ca38261353e565b6001600160a01b039182166000908152600d6020908152604080832093909416825291909152205490565b60105481565b60008061219d611753565b905080156121c3576121bb8160108111156121b457fe5b6042612bb7565b915050610cba565b61115c83612ecc565b6121d4612bb3565b6076546001600160a01b03908116911614612224576040805162461bcd60e51b81526020600482018190526024820152600080516020615a38833981519152604482015290519081900360640190fd5b6001600160a01b0381166122695760405162461bcd60e51b815260040180806020018281038252602681526020018061592c6026913960400191505060405180910390fd5b6076546040516001600160a01b038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3607680546001600160a01b0319166001600160a01b0392909216919091179055565b6004546001600160a01b031681565b6000806122e28585856135b8565b5095945050505050565b6004546000906001600160a01b03166315f24053612308612a9f565b600954600a546040518463ffffffff1660e01b815260040180848152602001838152602001828152602001935050505060206040518083038186803b158015611bbc57600080fd5b6000805460ff16612395576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff191681556123a7611753565b905080156123c5576112b78160108111156123be57fe5b6048612bb7565b6112c8836136e9565b60006123d8612bb3565b6076546001600160a01b03908116911614612428576040805162461bcd60e51b81526020600482018190526024820152600080516020615a38833981519152604482015290519081900360640190fd5b6010805490839055604080518281526020810185905281517f0fef09b67597ccf3dbb342dd705d9a10d14b4813c09c55e010cd5f4bf219ddaa929181900390910190a1600061115c565b60008054819060ff166124b9576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff191681556124cb611753565b905080156124f5576124e98160108111156124e257fe5b6037612bb7565b60009250925050612506565b6125003333866137cc565b92509250505b6000805460ff191660011790559092909150565b600b54600090819080612535575050600554600091506125c5565b600061253f612a9f565b9050600061254b6157a7565b600061255c84600954600a54613c70565b93509050600081600381111561256e57fe5b14612583579550600094506125c59350505050565b61258d8386613cae565b92509050600081600381111561259f57fe5b146125b4579550600094506125c59350505050565b50516000955093506125c592505050565b9091565b303b1590565b601154610100900460ff16806125e857506125e86125c9565b806125f6575060115460ff16155b6126315760405162461bcd60e51b815260040180806020018281038252602e815260200180615a92602e913960400191505060405180910390fd5b601154610100900460ff1615801561265c576011805460ff1961ff0019909116610100171660011790555b612664613d5f565b61266c613dff565b801561267e576011805461ff00191690555b50565b600354604080516317b9b84b60e31b81523060048201526001600160a01b03868116602483015285811660448301526064820185905291516000938493610100909104169163bdcdc25891608480830192602092919082900301818787803b1580156126ec57600080fd5b505af1158015612700573d6000803e3d6000fd5b505050506040513d602081101561271657600080fd5b5051905080156127355761272d6003604c83613165565b915050611074565b836001600160a01b0316856001600160a01b0316141561275b5761272d6002604d612bb7565b6000856001600160a01b0316876001600160a01b0316141561278057506000196127a8565b506001600160a01b038086166000908152600d60209081526040808320938a16835292905220545b6000806000806127b885896130da565b909450925060008460038111156127cb57fe5b146127e9576127dc6009604d612bb7565b9650505050505050611074565b6001600160a01b038a166000908152600c602052604090205461280c90896130da565b9094509150600084600381111561281f57fe5b14612830576127dc6009604e612bb7565b6001600160a01b0389166000908152600c602052604090205461285390896131cb565b9094509050600084600381111561286657fe5b14612877576127dc6009604f612bb7565b6001600160a01b03808b166000908152600c6020526040808220859055918b1681522081905560001985146128cf576001600160a01b03808b166000908152600d60209081526040808320938f168352929052208390555b886001600160a01b03168a6001600160a01b0316600080516020615ac08339815191528a6040518082815260200191505060405180910390a36003546040805163352b4a3f60e11b81523060048201526001600160a01b038d811660248301528c81166044830152606482018c9052915161010090930490911691636a56947e9160848082019260009290919082900301818387803b15801561297157600080fd5b505af1158015612985573d6000803e3d6000fd5b5060009250612992915050565b9b9a5050505050505050505050565b60008054819060ff166129e8576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff191681556129fa611753565b90508015612a2457612a18816010811115612a1157fe5b6036612bb7565b60009250925050612a35565b612a2f3386866137cc565b92509250505b6000805460ff1916600117905590939092509050565b6000806000612a586157a7565b612a6286866130fd565b90925090506000826003811115612a7557fe5b14612a865750915060009050612a98565b6000612a9182613ef8565b9350935050505b9250929050565b60a854604080516370a0823160e01b815230600482015290516000926001600160a01b03169182916370a0823191602480820192602092909190829003018186803b158015612aed57600080fd5b505afa158015612b01573d6000803e3d6000fd5b505050506040513d6020811015612b1757600080fd5b505191505090565b6000805460ff16612b64576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff19168155612b76611753565b90508015612b94576112b7816010811115612b8d57fe5b6050612bb7565b612b9d83613f07565b509150506000805460ff19166001179055919050565b3390565b60007f45b96fe442630264581b197e84bbada861235052c5a1aadfff9ea4e40a969aa0836010811115612be657fe5b836052811115612bf257fe5b604080519283526020830191909152600082820152519081900360600190a182601081111561115c57fe5b6000612c27612bb3565b6076546001600160a01b03908116911614612c77576040805162461bcd60e51b81526020600482018190526024820152600080516020615a38833981519152604482015290519081900360640190fd5b6000612c81612ec8565b60075414612c95576121bb600a6034612bb7565b82612c9e612a9f565b1015612cb0576121bb600e6033612bb7565b600a54831115612cc6576121bb60026035612bb7565b50600a5482810390811115612d0c5760405162461bcd60e51b8152600401808060200182810382526024815260200180615bd56024913960400191505060405180910390fd5b600a819055612d22612d1c61148c565b84613fef565b7f3bad0c59cf2f06e7314077049f48a93578cd16f5ef92329f1dab1420a99c177e612d4b61148c565b604080516001600160a01b03909216825260208201869052818101849052519081900360600190a1600061115c565b60008054819060ff16612dc1576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff19169055600f546001600160a01b03163314612e145760405162461bcd60e51b81526004018080602001828103825260328152602001806159526032913960400191505060405180910390fd5b6000612e1e611753565b90508015612e3c57612a18816010811115612e3557fe5b601f612bb7565b612a2f3386866140e6565b6000805460ff16612e8c576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff19168155612e9e611753565b90508015612ebc576112b7816010811115612eb557fe5b6028612bb7565b6112c833600085614578565b4390565b6000612ed6612bb3565b6076546001600160a01b03908116911614612f26576040805162461bcd60e51b81526020600482018190526024820152600080516020615a38833981519152604482015290519081900360640190fd5b6000612f30612ec8565b60075414612f44576121bb600a6043612bb7565b50600480546001600160a01b038481166001600160a01b0319831681179093556040805191909216808252602082019390935281517fedffc32e068c7c95dfd4bdfd5c4d939a084d6b11c4199eac8436ed234d72f926929181900390910190a1600061115c565b6001600160a01b0381166000908152600e6020526040812080548291829182918291612fe1576000809550955050505050613059565b612ff18160000154600854614a64565b9094509250600084600381111561300457fe5b14613019578360009550955050505050613059565b613027838260010154614aa3565b9094509150600084600381111561303a57fe5b1461304f578360009550955050505050613059565b5060009450925050505b915091565b60008054819060ff166130a5576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff191681556130b7611753565b905080156130ce576124e9816010811115612e3557fe5b612500338560006140e6565b6000808383116130f1575060009050818303612a98565b50600390506000612a98565b60006131076157a7565b600080613118866000015186614a64565b9092509050600082600381111561312b57fe5b1461314a57506040805160208101909152600081529092509050612a98565b60408051602081019091529081526000969095509350505050565b60007f45b96fe442630264581b197e84bbada861235052c5a1aadfff9ea4e40a969aa084601081111561319457fe5b8460528111156131a057fe5b604080519283526020830191909152818101859052519081900360600190a183601081111561107457fe5b6000808383018481106131e357600092509050612a98565b600260009250925050612a98565b60008060006131fe6157a7565b61320887876130fd565b9092509050600082600381111561321b57fe5b1461322c5750915060009050613245565b61323e61323882613ef8565b866131cb565b9350935050505b935093915050565b6003546040805163d02f735160e01b81523060048201526001600160a01b038781166024830152868116604483015285811660648301526084820185905291516000938493610100909104169163d02f73519160a480830192602092919082900301818787803b1580156132c057600080fd5b505af11580156132d4573d6000803e3d6000fd5b505050506040513d60208110156132ea57600080fd5b5051905080156133015761272d6003601c83613165565b846001600160a01b0316846001600160a01b031614156133275761272d6006601d612bb7565b6001600160a01b0384166000908152600c60205260408120548190819061334e90876130da565b9093509150600083600381111561336157fe5b14613384576133796009601b85600381111561193857fe5b945050505050611074565b6001600160a01b0388166000908152600c60205260409020546133a790876131cb565b909350905060008360038111156133ba57fe5b146133d2576133796009601a85600381111561193857fe5b6001600160a01b038088166000818152600c60209081526040808320879055938c168083529184902085905583518a815293519193600080516020615ac0833981519152929081900390910190a360035460408051636d35bf9160e01b81523060048201526001600160a01b038c811660248301528b811660448301528a81166064830152608482018a9052915161010090930490911691636d35bf919160a48082019260009290919082900301818387803b15801561349157600080fd5b505af11580156134a5573d6000803e3d6000fd5b50600092506134b2915050565b9998505050505050505050565b6000805460ff16613504576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff19168155613516611753565b90508015613534576112b781601081111561352d57fe5b6009612bb7565b6112c83384614ace565b6000805460ff16613583576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff19168155613595611753565b905080156135ac576112b7816010811115612eb557fe5b6112c833846000614578565b60008054819060ff166135ff576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff19168155613611611753565b9050801561363b5761362f81601081111561362857fe5b6010612bb7565b600092509250506136d2565b836001600160a01b031663a6afed956040518163ffffffff1660e01b8152600401602060405180830381600087803b15801561367657600080fd5b505af115801561368a573d6000803e3d6000fd5b505050506040513d60208110156136a057600080fd5b5051905080156136c05761362f8160108111156136b957fe5b6011612bb7565b6136cc33878787614e4b565b92509250505b6000805460ff191660011790559094909350915050565b60006136f3612bb3565b6076546001600160a01b03908116911614613743576040805162461bcd60e51b81526020600482018190526024820152600080516020615a38833981519152604482015290519081900360640190fd5b61374b612ec8565b600754146137665761375f600a604a612bb7565b9050610cba565b670de0b6b3a76400008211156137825761375f6002604b612bb7565b6006805490839055604080518281526020810185905281517faaa68312e2ea9d50e16af5068410ab56e1a1fd06037b1a35664812c30f821460929181900390910190a1600061115c565b60035460408051631200453160e11b81523060048201526001600160a01b03868116602483015285811660448301526064820185905291516000938493849361010090920416916324008a629160848082019260209290919082900301818787803b15801561383a57600080fd5b505af115801561384e573d6000803e3d6000fd5b505050506040513d602081101561386457600080fd5b5051905080156138875761387b6003603a83613165565b60009250925050613245565b61388f612ec8565b600754146138a35761387b600a603b612bb7565b6138ab615838565b6001600160a01b0386166000908152600e602052604090206001015460608201526138d5866153e2565b6101008301819052602083018260038111156138ed57fe5b60038111156138f857fe5b905250600090508160200151600381111561390f57fe5b146139385761392b600960388360200151600381111561193857fe5b6000935093505050613245565b61394186612fab565b608083018190526020830182600381111561395857fe5b600381111561396357fe5b905250600090508160200151600381111561397a57fe5b146139965761392b600960398360200151600381111561193857fe5b6000198514156139af57608081015160408201526139b7565b604081018590525b6139c58782604001516154ec565b60e0820181905260808201516139da916130da565b60a08301819052602083018260038111156139f157fe5b60038111156139fc57fe5b9052506000905081602001516003811115613a1357fe5b14613a4f5760405162461bcd60e51b815260040180806020018281038252603a815260200180615a58603a913960400191505060405180910390fd5b613a5f6009548260e001516130da565b60c0830181905260208301826003811115613a7657fe5b6003811115613a8157fe5b9052506000905081602001516003811115613a9857fe5b14613ad45760405162461bcd60e51b8152600401808060200182810382526031815260200180615ae06031913960400191505060405180910390fd5b8060a00151600e6000886001600160a01b03166001600160a01b0316815260200190815260200160002060000181905550600854600e6000886001600160a01b03166001600160a01b03168152602001908152602001600020600101819055508060c001516009819055507f6fadbf7329d21f278e724fa0d4511001a158f2a97ee35c5bc4cf8b64417399ef87878360e001518460a001518560c0015186610100015160405180876001600160a01b03168152602001866001600160a01b03168152602001858152602001848152602001838152602001828152602001965050505050505060405180910390a160035460e0820151606083015160408051631ededc9160e01b81523060048201526001600160a01b038c811660248301528b81166044830152606482019490945260848101929092525161010090930490911691631ededc919160a48082019260009290919082900301818387803b158015613c3c57600080fd5b505af1158015613c50573d6000803e3d6000fd5b5060009250613c5d915050565b8160e00151935093505050935093915050565b600080600080613c8087876131cb565b90925090506000826003811115613c9357fe5b14613ca45750915060009050613245565b61323e81866130da565b6000613cb86157a7565b600080613ccd86670de0b6b3a7640000614a64565b90925090506000826003811115613ce057fe5b14613cff57506040805160208101909152600081529092509050612a98565b600080613d0c8388614aa3565b90925090506000826003811115613d1f57fe5b14613d425781604051806020016040528060008152509550955050505050612a98565b604080516020810190915290815260009890975095505050505050565b601154610100900460ff1680613d785750613d786125c9565b80613d86575060115460ff16155b613dc15760405162461bcd60e51b815260040180806020018281038252602e815260200180615a92602e913960400191505060405180910390fd5b601154610100900460ff1615801561266c576011805460ff1961ff001990911661010017166001179055801561267e576011805461ff001916905550565b601154610100900460ff1680613e185750613e186125c9565b80613e26575060115460ff16155b613e615760405162461bcd60e51b815260040180806020018281038252602e815260200180615a92602e913960400191505060405180910390fd5b601154610100900460ff16158015613e8c576011805460ff1961ff0019909116610100171660011790555b6000613e96612bb3565b607680546001600160a01b0319166001600160a01b038316908117909155604051919250906000907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a350801561267e576011805461ff001916905550565b51670de0b6b3a7640000900490565b600080600080613f15612ec8565b60075414613f3457613f29600a6051612bb7565b935091506130599050565b613f3e33866154ec565b905080600a54019150600a54821015613f9e576040805162461bcd60e51b815260206004820181905260248201527f61646420726573657276657320756e6578706563746564206f766572666c6f77604482015290519081900360640190fd5b600a829055604080513381526020810183905280820184905290517fa91e67c5ea634cd43a12c5a482724b03de01e85ca68702a53d0c2f45cb7c1dc59181900360600190a160009350915050915091565b60a8546040805163a9059cbb60e01b81526001600160a01b0385811660048301526024820185905291519190921691829163a9059cbb9160448082019260009290919082900301818387803b15801561404757600080fd5b505af115801561405b573d6000803e3d6000fd5b5050505060003d60008114614077576020811461408157600080fd5b600019915061408d565b60206000803e60005191505b50806140e0576040805162461bcd60e51b815260206004820152601960248201527f544f4b454e5f5452414e534645525f4f55545f4641494c454400000000000000604482015290519081900360640190fd5b50505050565b600080826141945760035460408051634ef4c3e160e01b81523060048201526001600160a01b038881166024830152604482018890529151600093610100900490921691634ef4c3e19160648082019260209290919082900301818787803b15801561415157600080fd5b505af1158015614165573d6000803e3d6000fd5b505050506040513d602081101561417b57600080fd5b5051905080156141925761387b6003602083613165565b505b61419c612ec8565b600754146141bb576141b0600a6023612bb7565b600091509150613245565b6141c3615885565b83614225576141d061251a565b60408301819052602083018260038111156141e757fe5b60038111156141f257fe5b905250600090508160200151600381111561420957fe5b146142255761387b600960228360200151600381111561193857fe5b61422f86866154ec565b60c0820152836142e9576142598160c0015160405180602001604052808460400151815250615736565b606083018190526020830182600381111561427057fe5b600381111561427b57fe5b905250600090508160200151600381111561429257fe5b146142e4576040805162461bcd60e51b815260206004820181905260248201527f4d494e545f45584348414e47455f43414c43554c4154494f4e5f4641494c4544604482015290519081900360640190fd5b6142f1565b606081018490525b614301600b5482606001516131cb565b608083018190526020830182600381111561431857fe5b600381111561432357fe5b905250600090508160200151600381111561433a57fe5b146143765760405162461bcd60e51b8152600401808060200182810382526028815260200180615b796028913960400191505060405180910390fd5b6001600160a01b0386166000908152600c6020526040902054606082015161439e91906131cb565b60a08301819052602083018260038111156143b557fe5b60038111156143c057fe5b90525060009050816020015160038111156143d757fe5b146144135760405162461bcd60e51b815260040180806020018281038252602b8152602001806159d6602b913960400191505060405180910390fd5b60808082018051600b5560a080840180516001600160a01b038b166000818152600c60209081526040918290209390935560c08801516060808a01519751955183519485529484019190915282820196909652948101929092529381019390935290517f94c792774c59479f7bd68442f3af3691c02123a5aabee8b6f9116d8af8aa66699281900390910190a1606081015160408051918252516001600160a01b038816913091600080516020615ac08339815191529181900360200190a360035460c08201516060830151604080516341c728b960e01b81523060048201526001600160a01b038b811660248301526044820194909452606481019290925251610100909304909116916341c728b99160848082019260009290919082900301818387803b15801561454557600080fd5b505af1158015614559573d6000803e3d6000fd5b5060009250614566915050565b8160c001519250925050935093915050565b6000821580614585575081155b6145c05760405162461bcd60e51b8152600401808060200182810382526034815260200180615ba16034913960400191505060405180910390fd5b6145c8615885565b6145d061251a565b60408301819052602083018260038111156145e757fe5b60038111156145f257fe5b905250600090508160200151600381111561460957fe5b1461462d576146256009602c8360200151600381111561193857fe5b91505061115c565b83156146ae5760608101849052604080516020810182529082015181526146549085612a4b565b608083018190526020830182600381111561466b57fe5b600381111561467657fe5b905250600090508160200151600381111561468d57fe5b146146a9576146256009602a8360200151600381111561193857fe5b614727565b6146ca8360405180602001604052808460400151815250615736565b60608301819052602083018260038111156146e157fe5b60038111156146ec57fe5b905250600090508160200151600381111561470357fe5b1461471f576146256009602b8360200151600381111561193857fe5b608081018390525b60035460608201516040805163eabe7d9160e01b81523060048201526001600160a01b0389811660248301526044820193909352905160009361010090049092169163eabe7d919160648082019260209290919082900301818787803b15801561479057600080fd5b505af11580156147a4573d6000803e3d6000fd5b505050506040513d60208110156147ba57600080fd5b5051905080156147da576147d16003602983613165565b9250505061115c565b6147e2612ec8565b600754146147f6576147d1600a602d612bb7565b614806600b5483606001516130da565b60a084018190526020840182600381111561481d57fe5b600381111561482857fe5b905250600090508260200151600381111561483f57fe5b1461485b576147d16009602f8460200151600381111561193857fe5b6001600160a01b0386166000908152600c6020526040902054606083015161488391906130da565b60c084018190526020840182600381111561489a57fe5b60038111156148a557fe5b90525060009050826020015160038111156148bc57fe5b146148d8576147d16009602e8460200151600381111561193857fe5b81608001516148e5612a9f565b10156148f7576147d1600e6030612bb7565b614905868360800151613fef565b60a0820151600b5560c08201516001600160a01b0387166000818152600c6020908152604091829020939093556060850151815190815290513093600080516020615ac0833981519152928290030190a37fe02f6383e19e87c24e0c03e2cd5dbd05156cb29a1b0f3dbca1fa3430e444f63d86836080015184606001518560a001518660c0015160405180866001600160a01b031681526020018581526020018481526020018381526020018281526020019550505050505060405180910390a160035460808301516060840151604080516351dff98960e01b81523060048201526001600160a01b038b811660248301526044820194909452606481019290925251610100909304909116916351dff9899160848082019260009290919082900301818387803b158015614a3957600080fd5b505af1158015614a4d573d6000803e3d6000fd5b5060009250614a5a915050565b9695505050505050565b60008083614a7757506000905080612a98565b83830283858281614a8457fe5b0414614a9857600260009250925050612a98565b600092509050612a98565b60008082614ab75750600190506000612a98565b6000838581614ac257fe5b04915091509250929050565b6003546040805163368f515360e21b81523060048201526001600160a01b0385811660248301526044820185905291516000938493610100909104169163da3d454c91606480830192602092919082900301818787803b158015614b3157600080fd5b505af1158015614b45573d6000803e3d6000fd5b505050506040513d6020811015614b5b57600080fd5b505190508015614b7a57614b726003600f83613165565b915050610ca3565b614b82612ec8565b60075414614b9657614b72600a600b612bb7565b82614b9f612a9f565b1015614bb157614b72600e600a612bb7565b614bb96158c3565b614bc2856153e2565b6080830181905282826003811115614bd657fe5b6003811115614be157fe5b9052506000905081516003811115614bf557fe5b14614c1a57614c11600960078360000151600381111561193857fe5b92505050610ca3565b614c2385612fab565b6020830181905282826003811115614c3757fe5b6003811115614c4257fe5b9052506000905081516003811115614c5657fe5b14614c7257614c11600960088360000151600381111561193857fe5b614c808160200151856131cb565b6040830181905282826003811115614c9457fe5b6003811115614c9f57fe5b9052506000905081516003811115614cb357fe5b14614ccf57614c116009600d8360000151600381111561193857fe5b614cdb600954856131cb565b6060830181905282826003811115614cef57fe5b6003811115614cfa57fe5b9052506000905081516003811115614d0e57fe5b14614d2a57614c116009600c8360000151600381111561193857fe5b614d348585613fef565b604080820180516001600160a01b0388166000818152600e6020908152908590209283556008546001909301929092556060808601516009819055935160808088015187519485529484018b905283870191909152908201939093529182015290517f2dd79f4fccfd18c360ce7f9132f3621bf05eee18f995224badb32d17f172df739181900360a00190a160035460408051635c77860560e01b81523060048201526001600160a01b03888116602483015260448201889052915161010090930490911691635c7786059160648082019260009290919082900301818387803b158015614e2157600080fd5b505af1158015614e35573d6000803e3d6000fd5b5060009250614e42915050565b95945050505050565b60035460408051632fe3f38f60e11b81523060048201526001600160a01b03848116602483015287811660448301528681166064830152608482018690529151600093849384936101009092041691635fc7e71e9160a48082019260209290919082900301818787803b158015614ec157600080fd5b505af1158015614ed5573d6000803e3d6000fd5b505050506040513d6020811015614eeb57600080fd5b505190508015614f0e57614f026003601383613165565b600092509250506153d9565b614f16612ec8565b60075414614f2a57614f02600a6017612bb7565b614f32612ec8565b846001600160a01b0316636c540baf6040518163ffffffff1660e01b815260040160206040518083038186803b158015614f6b57600080fd5b505afa158015614f7f573d6000803e3d6000fd5b505050506040513d6020811015614f9557600080fd5b505114614fa857614f02600a6012612bb7565b866001600160a01b0316866001600160a01b03161415614fce57614f0260066018612bb7565b84614fdf57614f0260076016612bb7565b600019851415614ff557614f0260076015612bb7565b6000806150038989896137cc565b909250905081156150325761502482601081111561501d57fe5b6019612bb7565b6000945094505050506153d9565b6003546040805163c488847b60e01b81523060048201526001600160a01b03898116602483015260448201859052825160009485946101009091049092169263c488847b926064808301939192829003018186803b15801561509357600080fd5b505afa1580156150a7573d6000803e3d6000fd5b505050506040513d60408110156150bd57600080fd5b508051602090910151909250905081156151085760405162461bcd60e51b8152600401808060200182810382526033815260200180615b116033913960400191505060405180910390fd5b80886001600160a01b03166370a082318c6040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561515657600080fd5b505afa15801561516a573d6000803e3d6000fd5b505050506040513d602081101561518057600080fd5b505110156151d5576040805162461bcd60e51b815260206004820152601860248201527f4c49515549444154455f5345495a455f544f4f5f4d5543480000000000000000604482015290519081900360640190fd5b60006001600160a01b0389163014156151fb576151f4308d8d8561324d565b9050615292565b886001600160a01b031663b2a02ff18d8d856040518463ffffffff1660e01b815260040180846001600160a01b03168152602001836001600160a01b031681526020018281526020019350505050602060405180830381600087803b15801561526357600080fd5b505af1158015615277573d6000803e3d6000fd5b505050506040513d602081101561528d57600080fd5b505190505b80156152dc576040805162461bcd60e51b81526020600482015260146024820152731d1bdad95b881cd95a5e9d5c994819985a5b195960621b604482015290519081900360640190fd5b604080516001600160a01b03808f168252808e1660208301528183018790528b1660608201526080810184905290517f298637f684da70674f26509b10f07ec2fbc77a335ab1e7d6215a4b2484d8bb529181900360a00190a1600354604080516347ef3b3b60e01b81523060048201526001600160a01b038c811660248301528f811660448301528e811660648301526084820188905260a482018690529151610100909304909116916347ef3b3b9160c48082019260009290919082900301818387803b1580156153ad57600080fd5b505af11580156153c1573d6000803e3d6000fd5b50600092506153ce915050565b975092955050505050505b94509492505050565b6001600160a01b0381166000908152600e602052604081208054829182918291829182919061541c57600080965096505050505050613059565b61542c8160000154600854614a64565b9095509350600085600381111561543f57fe5b1461545557846000965096505050505050613059565b600181015461546f57600080965096505050505050613059565b61547d848260010154614aa3565b9095509250600085600381111561549057fe5b146154a657846000965096505050505050613059565b6154b48382600001546130da565b909550915060008560038111156154c757fe5b146154dd57846000965096505050505050613059565b50600095509350505050915091565b60a854604080516370a0823160e01b815230600482015290516000926001600160a01b031691839183916370a08231916024808301926020929190829003018186803b15801561553b57600080fd5b505afa15801561554f573d6000803e3d6000fd5b505050506040513d602081101561556557600080fd5b5051604080516323b872dd60e01b81526001600160a01b038881166004830152306024830152604482018890529151929350908416916323b872dd9160648082019260009290919082900301818387803b1580156155c257600080fd5b505af11580156155d6573d6000803e3d6000fd5b5050505060003d600081146155f257602081146155fc57600080fd5b6000199150615608565b60206000803e60005191505b508061565b576040805162461bcd60e51b815260206004820152601860248201527f544f4b454e5f5452414e534645525f494e5f4641494c45440000000000000000604482015290519081900360640190fd5b60a854604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b1580156156a657600080fd5b505afa1580156156ba573d6000803e3d6000fd5b505050506040513d60208110156156d057600080fd5b5051905082811015615729576040805162461bcd60e51b815260206004820152601a60248201527f544f4b454e5f5452414e534645525f494e5f4f564552464c4f57000000000000604482015290519081900360640190fd5b9190910395945050505050565b60008060006157436157a7565b612a62868660006157526157a7565b600080615767670de0b6b3a764000087614a64565b9092509050600082600381111561577a57fe5b1461579957506040805160208101909152600081529092509050612a98565b612a91818660000151613cae565b6040518060200160405280600081525090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106157fb57805160ff1916838001178555615828565b82800160010185558215615828579182015b8281111561582857825182559160200191906001019061580d565b506158349291506158f3565b5090565b604080516101208101909152806000815260200160008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081525090565b6040805160e0810190915280600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081525090565b6040805160a081019091528060008152602001600081526020016000815260200160008152602001600081525090565b5b8082111561583457600081556001016158f456fe6d61726b6574206d6179206f6e6c7920626520696e697469616c697a6564206f6e63654f776e61626c653a206e6577206f776e657220697320746865207a65726f20616464726573736d696e74496e7465726e616c466f724d6967726174653a2063616c6c6572206973206e6f7420746865206d69677261746f72696e697469616c2065786368616e67652072617465206d7573742062652067726561746572207468616e207a65726f2e73657474696e6720696e7465726573742072617465206d6f64656c206661696c65644d494e545f4e45575f4143434f554e545f42414c414e43455f43414c43554c4154494f4e5f4641494c4544626f72726f7742616c616e636553746f7265643a20626f72726f7742616c616e636553746f726564496e7465726e616c206661696c65644f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657252455041595f424f52524f575f4e45575f4143434f554e545f424f52524f575f42414c414e43455f43414c43554c4154494f4e5f4641494c4544436f6e747261637420696e7374616e63652068617320616c7265616479206265656e20696e697469616c697a6564ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef52455041595f424f52524f575f4e45575f544f54414c5f42414c414e43455f43414c43554c4154494f4e5f4641494c45444c49515549444154455f434f4d5054524f4c4c45525f43414c43554c4154455f414d4f554e545f5345495a455f4641494c454465786368616e67655261746553746f7265643a2065786368616e67655261746553746f726564496e7465726e616c206661696c65644d494e545f4e45575f544f54414c5f535550504c595f43414c43554c4154494f4e5f4641494c45446f6e65206f662072656465656d546f6b656e73496e206f722072656465656d416d6f756e74496e206d757374206265207a65726f72656475636520726573657276657320756e657870656374656420756e646572666c6f77a264697066735822122028e6ac7f3d654ab13632afc622036def986e2e5c4c6a2768c714490859475ce164736f6c634300060c0033
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106103275760003560e01c80637cd07e47116101b8578063bd6d894d11610104578063f2b3abbd116100a2578063f5e3c4621161007c578063f5e3c46214610b37578063f8f9da2814610b6d578063fca7820b14610b75578063fe17b28f14610b9257610327565b8063f2b3abbd14610ae3578063f2fde38b14610b09578063f3fdb15a14610b2f57610327565b8063c5ebeaec116100de578063c5ebeaec14610a73578063db006a7514610a90578063dd62ed3e14610aad578063e228bb4314610adb57610327565b8063bd6d894d146109c7578063c23d91bd146109cf578063c37f68e214610a2757610327565b806395dd919311610171578063a9059cbb1161014b578063a9059cbb14610955578063aa5af0fd14610981578063ae9d70b014610989578063b2a02ff11461099157610327565b806395dd91931461090a578063a0712d6814610930578063a6afed951461094d57610327565b80637cd07e471461077f578063852a12e3146107875780638da5cb5b146107a45780638f840ddd146107ac57806394d6c574146107b457806395d89b411461090257610327565b80633e94101011610277578063601a0bf11161023057806370a082311161020a57806370a0823114610726578063715018a61461074c57806373acee9814610754578063791d89151461075c57610327565b8063601a0bf1146106f95780636c540baf146107165780636f307dc31461071e57610327565b80633e9410101461065c5780634576b5db1461067957806347bd37181461069f57806347dfe70d146106a75780635a890c0e146106cd5780635fe3b567146106d557610327565b8063182df0f5116102e45780632608f818116102be5780632608f818146105e4578063313ce567146106105780633af9e6691461062e5780633b1d21a21461065457610327565b8063182df0f51461044e5780631a31d4651461045657806323b872dd146105ae57610327565b806306fdde031461032c578063095ea7b3146103a95780630e752702146103e9578063173b99041461041857806317bfdfbc1461042057806318160ddd14610446575b600080fd5b610334610baf565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561036e578181015183820152602001610356565b50505050905090810190601f16801561039b5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6103d5600480360360408110156103bf57600080fd5b506001600160a01b038135169060200135610c3c565b604080519115158252519081900360200190f35b610406600480360360208110156103ff57600080fd5b5035610ca9565b60408051918252519081900360200190f35b610406610cbf565b6104066004803603602081101561043657600080fd5b50356001600160a01b0316610cc5565b610406610d85565b610406610d8b565b6105ac600480360360e081101561046c57600080fd5b6001600160a01b03823581169260208101358216926040820135909216916060820135919081019060a081016080820135600160201b8111156104ae57600080fd5b8201836020820111156104c057600080fd5b803590602001918460018302840111600160201b831117156104e157600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295949360208101935035915050600160201b81111561053357600080fd5b82018360208201111561054557600080fd5b803590602001918460018302840111600160201b8311171561056657600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295505050903560ff169150610dee9050565b005b6103d5600480360360608110156105c457600080fd5b506001600160a01b03813581169160208101359091169060400135610f35565b610406600480360360408110156105fa57600080fd5b506001600160a01b038135169060200135610fa7565b610618610fbd565b6040805160ff9092168252519081900360200190f35b6104066004803603602081101561064457600080fd5b50356001600160a01b0316610fc6565b61040661107c565b6104066004803603602081101561067257600080fd5b503561108b565b6104066004803603602081101561068f57600080fd5b50356001600160a01b0316611096565b610406611163565b610406600480360360208110156106bd57600080fd5b50356001600160a01b0316611169565b6103d5611229565b6106dd61122e565b604080516001600160a01b039092168252519081900360200190f35b6104066004803603602081101561070f57600080fd5b5035611242565b6104066112dd565b6106dd6112e3565b6104066004803603602081101561073c57600080fd5b50356001600160a01b03166112f2565b6105ac61130d565b6104066113af565b6104066004803603604081101561077257600080fd5b5080359060200135611465565b6106dd611472565b6104066004803603602081101561079d57600080fd5b5035611481565b6106dd61148c565b61040661149b565b6105ac600480360360c08110156107ca57600080fd5b6001600160a01b03823581169260208101359091169160408201359190810190608081016060820135600160201b81111561080457600080fd5b82018360208201111561081657600080fd5b803590602001918460018302840111600160201b8311171561083757600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295949360208101935035915050600160201b81111561088957600080fd5b82018360208201111561089b57600080fd5b803590602001918460018302840111600160201b831117156108bc57600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295505050903560ff1691506114a19050565b610334611692565b6104066004803603602081101561092057600080fd5b50356001600160a01b03166116ea565b6104066004803603602081101561094657600080fd5b5035611747565b610406611753565b6103d56004803603604081101561096b57600080fd5b506001600160a01b038135169060200135611ad7565b610406611b48565b610406611b4e565b610406600480360360608110156109a757600080fd5b506001600160a01b03813581169160208101359091169060400135611bed565b610406611c5e565b6109d7611d1a565b60408051602080825283518183015283519192839290830191858101910280838360005b83811015610a135781810151838201526020016109fb565b505050509050019250505060405180910390f35b610a4d60048036036020811015610a3d57600080fd5b50356001600160a01b03166120b6565b604080519485526020850193909352838301919091526060830152519081900360800190f35b61040660048036036020811015610a8957600080fd5b503561214b565b61040660048036036020811015610aa657600080fd5b5035612156565b61040660048036036040811015610ac357600080fd5b506001600160a01b0381358116916020013516612161565b61040661218c565b61040660048036036020811015610af957600080fd5b50356001600160a01b0316612192565b6105ac60048036036020811015610b1f57600080fd5b50356001600160a01b03166121cc565b6106dd6122c5565b61040660048036036060811015610b4d57600080fd5b506001600160a01b038135811691602081013591604090910135166122d4565b6104066122ec565b61040660048036036020811015610b8b57600080fd5b5035612350565b61040660048036036020811015610ba857600080fd5b50356123ce565b60018054604080516020600284861615610100026000190190941693909304601f81018490048402820184019092528181529291830182828015610c345780601f10610c0957610100808354040283529160200191610c34565b820191906000526020600020905b815481529060010190602001808311610c1757829003601f168201915b505050505081565b336000818152600d602090815260408083206001600160a01b03871680855290835281842086905581518681529151939493909284927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929081900390910190a360019150505b92915050565b600080610cb583612472565b509150505b919050565b60065481565b6000805460ff16610d0a576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff19168155610d1c611753565b14610d67576040805162461bcd60e51b81526020600482015260166024820152751858d8dc9d59481a5b9d195c995cdd0819985a5b195960521b604482015290519081900360640190fd5b610d70826116ea565b90505b6000805460ff19166001179055919050565b600b5481565b6000806000610d9861251a565b90925090506000826003811115610dab57fe5b14610de75760405162461bcd60e51b8152600401808060200182810382526035815260200180615b446035913960400191505060405180910390fd5b9150505b90565b601154610100900460ff1680610e075750610e076125c9565b80610e15575060115460ff16155b610e505760405162461bcd60e51b815260040180806020018281038252602e815260200180615a92602e913960400191505060405180910390fd5b601154610100900460ff16158015610e7b576011805460ff1961ff0019909116610100171660011790555b610e836125cf565b610e918787878787876114a1565b60a880546001600160a01b0319166001600160a01b038a81169190911791829055604080516318160ddd60e01b8152905192909116916318160ddd91600480820192602092909190829003018186803b158015610eed57600080fd5b505afa158015610f01573d6000803e3d6000fd5b505050506040513d6020811015610f1757600080fd5b50508015610f2b576011805461ff00191690555b5050505050505050565b6000805460ff16610f7a576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff19168155610f9033868686612681565b1490506000805460ff191660011790559392505050565b600080610fb484846129a1565b50949350505050565b60035460ff1681565b6000610fd06157a7565b6040518060200160405280610fe3611c5e565b90526001600160a01b0384166000908152600c602052604081205491925090819061100f908490612a4b565b9092509050600082600381111561102257fe5b14611074576040805162461bcd60e51b815260206004820152601f60248201527f62616c616e636520636f756c64206e6f742062652063616c63756c6174656400604482015290519081900360640190fd5b949350505050565b6000611086612a9f565b905090565b6000610ca382612b1f565b60006110a0612bb3565b6076546001600160a01b039081169116146110f0576040805162461bcd60e51b81526020600482018190526024820152600080516020615a38833981519152604482015290519081900360640190fd5b600380546001600160a01b03848116610100818102610100600160a81b03198516179094556040805194909304919091168084526020840191909152815190927f7ac369dbd14fa5ea3f473ed67cc9d598964a77501540ba6751eb0b3decf5870d92908290030190a160005b9392505050565b60095481565b6000611173612bb3565b6076546001600160a01b039081169116146111c3576040805162461bcd60e51b81526020600482018190526024820152600080516020615a38833981519152604482015290519081900360640190fd5b600f80546001600160a01b038481166001600160a01b0319831681179093556040805191909216808252602082019390935281517f99b2b7456799067566d467831e63363500739eac62c12ccb8cf9745078f06d2a929181900390910190a1600061115c565b600181565b60035461010090046001600160a01b031681565b6000805460ff16611287576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff19168155611299611753565b905080156112bf576112b78160108111156112b057fe5b6031612bb7565b915050610d73565b6112c883612c1d565b9150506000805460ff19166001179055919050565b60075481565b60a8546001600160a01b031681565b6001600160a01b03166000908152600c602052604090205490565b611315612bb3565b6076546001600160a01b03908116911614611365576040805162461bcd60e51b81526020600482018190526024820152600080516020615a38833981519152604482015290519081900360640190fd5b6076546040516000916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3607680546001600160a01b0319169055565b6000805460ff166113f4576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff19168155611406611753565b14611451576040805162461bcd60e51b81526020600482015260166024820152751858d8dc9d59481a5b9d195c995cdd0819985a5b195960521b604482015290519081900360640190fd5b506009546000805460ff1916600117905590565b600080610fb48484612d7a565b600f546001600160a01b031681565b6000610ca382612e47565b6076546001600160a01b031690565b600a5481565b6114a9612bb3565b6076546001600160a01b039081169116146114f9576040805162461bcd60e51b81526020600482018190526024820152600080516020615a38833981519152604482015290519081900360640190fd5b6007541580156115095750600854155b6115445760405162461bcd60e51b81526004018080602001828103825260238152602001806159096023913960400191505060405180910390fd5b6005849055836115855760405162461bcd60e51b81526004018080602001828103825260308152602001806159846030913960400191505060405180910390fd5b600061159087611096565b905080156115e5576040805162461bcd60e51b815260206004820152601a60248201527f73657474696e6720636f6d7074726f6c6c6572206661696c6564000000000000604482015290519081900360640190fd5b6115ed612ec8565b600755670de0b6b3a764000060085561160586612ecc565b905080156116445760405162461bcd60e51b81526004018080602001828103825260228152602001806159b46022913960400191505060405180910390fd5b83516116579060019060208701906157ba565b50825161166b9060029060208601906157ba565b50506003805460ff90921660ff199283161790556000805490911660011790555050505050565b6002805460408051602060018416156101000260001901909316849004601f81018490048402820184019092528181529291830182828015610c345780601f10610c0957610100808354040283529160200191610c34565b60008060006116f884612fab565b9092509050600082600381111561170b57fe5b1461115c5760405162461bcd60e51b8152600401808060200182810382526037815260200180615a016037913960400191505060405180910390fd5b600080610cb58361305e565b60008061175e612ec8565b6007549091508082141561177757600092505050610deb565b6000611781612a9f565b600954600a5460085460048054604080516315f2405360e01b81529283018790526024830186905260448301859052519596509394929391926000926001600160a01b0316916315f24053916064808301926020929190829003018186803b1580156117ec57600080fd5b505afa158015611800573d6000803e3d6000fd5b505050506040513d602081101561181657600080fd5b5051905065048c27395000811115611875576040805162461bcd60e51b815260206004820152601c60248201527f626f72726f772072617465206973206162737572646c79206869676800000000604482015290519081900360640190fd5b60008061188289896130da565b9092509050600082600381111561189557fe5b146118e7576040805162461bcd60e51b815260206004820152601f60248201527f636f756c64206e6f742063616c63756c61746520626c6f636b2064656c746100604482015290519081900360640190fd5b6118ef6157a7565b60008060008061190d60405180602001604052808a815250876130fd565b9097509450600087600381111561192057fe5b146119525761193d6009600689600381111561193857fe5b613165565b9e505050505050505050505050505050610deb565b61195c858c612a4b565b9097509350600087600381111561196f57fe5b146119875761193d6009600189600381111561193857fe5b611993846010546130da565b50965060008760038111156119a457fe5b146119af5760105493505b6119b9848c6131cb565b909750925060008760038111156119cc57fe5b146119e45761193d6009600489600381111561193857fe5b6119ff6040518060200160405280600654815250858c6131f1565b90975091506000876003811115611a1257fe5b14611a2a5761193d6009600589600381111561193857fe5b611a35858a8b6131f1565b90975090506000876003811115611a4857fe5b14611a605761193d6009600389600381111561193857fe5b60078e905560088190556009839055600a829055604080518d815260208101869052808201839052606081018590526080810184905290517f717fee053884ab1935ba6d0140f6ed225371439611d9674ff445419d6a0fa1b79181900360a00190a160009e50505050505050505050505050505090565b6000805460ff16611b1c576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff19168155611b3233338686612681565b1490506000805460ff1916600117905592915050565b60085481565b6004546000906001600160a01b031663b8168816611b6a612a9f565b600954600a546006546040518563ffffffff1660e01b81526004018085815260200184815260200183815260200182815260200194505050505060206040518083038186803b158015611bbc57600080fd5b505afa158015611bd0573d6000803e3d6000fd5b505050506040513d6020811015611be657600080fd5b5051905090565b6000805460ff16611c32576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff19169055611c483385858561324d565b90506000805460ff191660011790559392505050565b6000805460ff16611ca3576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff19168155611cb5611753565b14611d00576040805162461bcd60e51b81526020600482015260166024820152751858d8dc9d59481a5b9d195c995cdd0819985a5b195960521b604482015290519081900360640190fd5b611d08610d8b565b90506000805460ff1916600117905590565b60606000611d26612ec8565b6007549091506000611d36612a9f565b600954600a5460085460048054604080516315f2405360e01b81529283018790526024830186905260448301859052519596509394929391926000926001600160a01b0316916315f24053916064808301926020929190829003018186803b158015611da157600080fd5b505afa158015611db5573d6000803e3d6000fd5b505050506040513d6020811015611dcb57600080fd5b5051905065048c27395000811115611e2a576040805162461bcd60e51b815260206004820152601c60248201527f626f72726f772072617465206973206162737572646c79206869676800000000604482015290519081900360640190fd5b600080611e3789896130da565b90925090506000826003811115611e4a57fe5b14611e9c576040805162461bcd60e51b815260206004820152601f60248201527f636f756c64206e6f742063616c63756c61746520626c6f636b2064656c746100604482015290519081900360640190fd5b611ea46157a7565b60408051600680825260e082019092526000918291829182916060916020820160c080368337019050509050611ee860405180602001604052808b815250886130fd565b90985095506000886003811115611efb57fe5b14611f16579e50610deb9d5050505050505050505050505050565b611f20868d612a4b565b90985094506000886003811115611f3357fe5b14611f4e579e50610deb9d5050505050505050505050505050565b611f58858d6131cb565b90985093506000886003811115611f6b57fe5b14611f86579e50610deb9d5050505050505050505050505050565b611fa16040518060200160405280600654815250868d6131f1565b90985092506000886003811115611fb457fe5b14611fcf579e50610deb9d5050505050505050505050505050565b611fda868b8c6131f1565b90985091506000886003811115611fed57fe5b14612008579e50610deb9d5050505050505050505050505050565b8e8160008151811061201657fe5b6020026020010181815250508c8160018151811061203057fe5b602002602001018181525050848160028151811061204a57fe5b602002602001018181525050838160038151811061206457fe5b602002602001018181525050828160048151811061207e57fe5b602002602001018181525050818160058151811061209857fe5b60209081029190910101529e50505050505050505050505050505090565b6001600160a01b0381166000908152600c60205260408120548190819081908180806120e189612fab565b9350905060008160038111156120f357fe5b146121115760095b6000806000975097509750975050505050612144565b61211961251a565b92509050600081600381111561212b57fe5b146121375760096120fb565b5060009650919450925090505b9193509193565b6000610ca3826134bf565b6000610ca38261353e565b6001600160a01b039182166000908152600d6020908152604080832093909416825291909152205490565b60105481565b60008061219d611753565b905080156121c3576121bb8160108111156121b457fe5b6042612bb7565b915050610cba565b61115c83612ecc565b6121d4612bb3565b6076546001600160a01b03908116911614612224576040805162461bcd60e51b81526020600482018190526024820152600080516020615a38833981519152604482015290519081900360640190fd5b6001600160a01b0381166122695760405162461bcd60e51b815260040180806020018281038252602681526020018061592c6026913960400191505060405180910390fd5b6076546040516001600160a01b038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3607680546001600160a01b0319166001600160a01b0392909216919091179055565b6004546001600160a01b031681565b6000806122e28585856135b8565b5095945050505050565b6004546000906001600160a01b03166315f24053612308612a9f565b600954600a546040518463ffffffff1660e01b815260040180848152602001838152602001828152602001935050505060206040518083038186803b158015611bbc57600080fd5b6000805460ff16612395576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff191681556123a7611753565b905080156123c5576112b78160108111156123be57fe5b6048612bb7565b6112c8836136e9565b60006123d8612bb3565b6076546001600160a01b03908116911614612428576040805162461bcd60e51b81526020600482018190526024820152600080516020615a38833981519152604482015290519081900360640190fd5b6010805490839055604080518281526020810185905281517f0fef09b67597ccf3dbb342dd705d9a10d14b4813c09c55e010cd5f4bf219ddaa929181900390910190a1600061115c565b60008054819060ff166124b9576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff191681556124cb611753565b905080156124f5576124e98160108111156124e257fe5b6037612bb7565b60009250925050612506565b6125003333866137cc565b92509250505b6000805460ff191660011790559092909150565b600b54600090819080612535575050600554600091506125c5565b600061253f612a9f565b9050600061254b6157a7565b600061255c84600954600a54613c70565b93509050600081600381111561256e57fe5b14612583579550600094506125c59350505050565b61258d8386613cae565b92509050600081600381111561259f57fe5b146125b4579550600094506125c59350505050565b50516000955093506125c592505050565b9091565b303b1590565b601154610100900460ff16806125e857506125e86125c9565b806125f6575060115460ff16155b6126315760405162461bcd60e51b815260040180806020018281038252602e815260200180615a92602e913960400191505060405180910390fd5b601154610100900460ff1615801561265c576011805460ff1961ff0019909116610100171660011790555b612664613d5f565b61266c613dff565b801561267e576011805461ff00191690555b50565b600354604080516317b9b84b60e31b81523060048201526001600160a01b03868116602483015285811660448301526064820185905291516000938493610100909104169163bdcdc25891608480830192602092919082900301818787803b1580156126ec57600080fd5b505af1158015612700573d6000803e3d6000fd5b505050506040513d602081101561271657600080fd5b5051905080156127355761272d6003604c83613165565b915050611074565b836001600160a01b0316856001600160a01b0316141561275b5761272d6002604d612bb7565b6000856001600160a01b0316876001600160a01b0316141561278057506000196127a8565b506001600160a01b038086166000908152600d60209081526040808320938a16835292905220545b6000806000806127b885896130da565b909450925060008460038111156127cb57fe5b146127e9576127dc6009604d612bb7565b9650505050505050611074565b6001600160a01b038a166000908152600c602052604090205461280c90896130da565b9094509150600084600381111561281f57fe5b14612830576127dc6009604e612bb7565b6001600160a01b0389166000908152600c602052604090205461285390896131cb565b9094509050600084600381111561286657fe5b14612877576127dc6009604f612bb7565b6001600160a01b03808b166000908152600c6020526040808220859055918b1681522081905560001985146128cf576001600160a01b03808b166000908152600d60209081526040808320938f168352929052208390555b886001600160a01b03168a6001600160a01b0316600080516020615ac08339815191528a6040518082815260200191505060405180910390a36003546040805163352b4a3f60e11b81523060048201526001600160a01b038d811660248301528c81166044830152606482018c9052915161010090930490911691636a56947e9160848082019260009290919082900301818387803b15801561297157600080fd5b505af1158015612985573d6000803e3d6000fd5b5060009250612992915050565b9b9a5050505050505050505050565b60008054819060ff166129e8576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff191681556129fa611753565b90508015612a2457612a18816010811115612a1157fe5b6036612bb7565b60009250925050612a35565b612a2f3386866137cc565b92509250505b6000805460ff1916600117905590939092509050565b6000806000612a586157a7565b612a6286866130fd565b90925090506000826003811115612a7557fe5b14612a865750915060009050612a98565b6000612a9182613ef8565b9350935050505b9250929050565b60a854604080516370a0823160e01b815230600482015290516000926001600160a01b03169182916370a0823191602480820192602092909190829003018186803b158015612aed57600080fd5b505afa158015612b01573d6000803e3d6000fd5b505050506040513d6020811015612b1757600080fd5b505191505090565b6000805460ff16612b64576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff19168155612b76611753565b90508015612b94576112b7816010811115612b8d57fe5b6050612bb7565b612b9d83613f07565b509150506000805460ff19166001179055919050565b3390565b60007f45b96fe442630264581b197e84bbada861235052c5a1aadfff9ea4e40a969aa0836010811115612be657fe5b836052811115612bf257fe5b604080519283526020830191909152600082820152519081900360600190a182601081111561115c57fe5b6000612c27612bb3565b6076546001600160a01b03908116911614612c77576040805162461bcd60e51b81526020600482018190526024820152600080516020615a38833981519152604482015290519081900360640190fd5b6000612c81612ec8565b60075414612c95576121bb600a6034612bb7565b82612c9e612a9f565b1015612cb0576121bb600e6033612bb7565b600a54831115612cc6576121bb60026035612bb7565b50600a5482810390811115612d0c5760405162461bcd60e51b8152600401808060200182810382526024815260200180615bd56024913960400191505060405180910390fd5b600a819055612d22612d1c61148c565b84613fef565b7f3bad0c59cf2f06e7314077049f48a93578cd16f5ef92329f1dab1420a99c177e612d4b61148c565b604080516001600160a01b03909216825260208201869052818101849052519081900360600190a1600061115c565b60008054819060ff16612dc1576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff19169055600f546001600160a01b03163314612e145760405162461bcd60e51b81526004018080602001828103825260328152602001806159526032913960400191505060405180910390fd5b6000612e1e611753565b90508015612e3c57612a18816010811115612e3557fe5b601f612bb7565b612a2f3386866140e6565b6000805460ff16612e8c576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff19168155612e9e611753565b90508015612ebc576112b7816010811115612eb557fe5b6028612bb7565b6112c833600085614578565b4390565b6000612ed6612bb3565b6076546001600160a01b03908116911614612f26576040805162461bcd60e51b81526020600482018190526024820152600080516020615a38833981519152604482015290519081900360640190fd5b6000612f30612ec8565b60075414612f44576121bb600a6043612bb7565b50600480546001600160a01b038481166001600160a01b0319831681179093556040805191909216808252602082019390935281517fedffc32e068c7c95dfd4bdfd5c4d939a084d6b11c4199eac8436ed234d72f926929181900390910190a1600061115c565b6001600160a01b0381166000908152600e6020526040812080548291829182918291612fe1576000809550955050505050613059565b612ff18160000154600854614a64565b9094509250600084600381111561300457fe5b14613019578360009550955050505050613059565b613027838260010154614aa3565b9094509150600084600381111561303a57fe5b1461304f578360009550955050505050613059565b5060009450925050505b915091565b60008054819060ff166130a5576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff191681556130b7611753565b905080156130ce576124e9816010811115612e3557fe5b612500338560006140e6565b6000808383116130f1575060009050818303612a98565b50600390506000612a98565b60006131076157a7565b600080613118866000015186614a64565b9092509050600082600381111561312b57fe5b1461314a57506040805160208101909152600081529092509050612a98565b60408051602081019091529081526000969095509350505050565b60007f45b96fe442630264581b197e84bbada861235052c5a1aadfff9ea4e40a969aa084601081111561319457fe5b8460528111156131a057fe5b604080519283526020830191909152818101859052519081900360600190a183601081111561107457fe5b6000808383018481106131e357600092509050612a98565b600260009250925050612a98565b60008060006131fe6157a7565b61320887876130fd565b9092509050600082600381111561321b57fe5b1461322c5750915060009050613245565b61323e61323882613ef8565b866131cb565b9350935050505b935093915050565b6003546040805163d02f735160e01b81523060048201526001600160a01b038781166024830152868116604483015285811660648301526084820185905291516000938493610100909104169163d02f73519160a480830192602092919082900301818787803b1580156132c057600080fd5b505af11580156132d4573d6000803e3d6000fd5b505050506040513d60208110156132ea57600080fd5b5051905080156133015761272d6003601c83613165565b846001600160a01b0316846001600160a01b031614156133275761272d6006601d612bb7565b6001600160a01b0384166000908152600c60205260408120548190819061334e90876130da565b9093509150600083600381111561336157fe5b14613384576133796009601b85600381111561193857fe5b945050505050611074565b6001600160a01b0388166000908152600c60205260409020546133a790876131cb565b909350905060008360038111156133ba57fe5b146133d2576133796009601a85600381111561193857fe5b6001600160a01b038088166000818152600c60209081526040808320879055938c168083529184902085905583518a815293519193600080516020615ac0833981519152929081900390910190a360035460408051636d35bf9160e01b81523060048201526001600160a01b038c811660248301528b811660448301528a81166064830152608482018a9052915161010090930490911691636d35bf919160a48082019260009290919082900301818387803b15801561349157600080fd5b505af11580156134a5573d6000803e3d6000fd5b50600092506134b2915050565b9998505050505050505050565b6000805460ff16613504576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff19168155613516611753565b90508015613534576112b781601081111561352d57fe5b6009612bb7565b6112c83384614ace565b6000805460ff16613583576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff19168155613595611753565b905080156135ac576112b7816010811115612eb557fe5b6112c833846000614578565b60008054819060ff166135ff576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff19168155613611611753565b9050801561363b5761362f81601081111561362857fe5b6010612bb7565b600092509250506136d2565b836001600160a01b031663a6afed956040518163ffffffff1660e01b8152600401602060405180830381600087803b15801561367657600080fd5b505af115801561368a573d6000803e3d6000fd5b505050506040513d60208110156136a057600080fd5b5051905080156136c05761362f8160108111156136b957fe5b6011612bb7565b6136cc33878787614e4b565b92509250505b6000805460ff191660011790559094909350915050565b60006136f3612bb3565b6076546001600160a01b03908116911614613743576040805162461bcd60e51b81526020600482018190526024820152600080516020615a38833981519152604482015290519081900360640190fd5b61374b612ec8565b600754146137665761375f600a604a612bb7565b9050610cba565b670de0b6b3a76400008211156137825761375f6002604b612bb7565b6006805490839055604080518281526020810185905281517faaa68312e2ea9d50e16af5068410ab56e1a1fd06037b1a35664812c30f821460929181900390910190a1600061115c565b60035460408051631200453160e11b81523060048201526001600160a01b03868116602483015285811660448301526064820185905291516000938493849361010090920416916324008a629160848082019260209290919082900301818787803b15801561383a57600080fd5b505af115801561384e573d6000803e3d6000fd5b505050506040513d602081101561386457600080fd5b5051905080156138875761387b6003603a83613165565b60009250925050613245565b61388f612ec8565b600754146138a35761387b600a603b612bb7565b6138ab615838565b6001600160a01b0386166000908152600e602052604090206001015460608201526138d5866153e2565b6101008301819052602083018260038111156138ed57fe5b60038111156138f857fe5b905250600090508160200151600381111561390f57fe5b146139385761392b600960388360200151600381111561193857fe5b6000935093505050613245565b61394186612fab565b608083018190526020830182600381111561395857fe5b600381111561396357fe5b905250600090508160200151600381111561397a57fe5b146139965761392b600960398360200151600381111561193857fe5b6000198514156139af57608081015160408201526139b7565b604081018590525b6139c58782604001516154ec565b60e0820181905260808201516139da916130da565b60a08301819052602083018260038111156139f157fe5b60038111156139fc57fe5b9052506000905081602001516003811115613a1357fe5b14613a4f5760405162461bcd60e51b815260040180806020018281038252603a815260200180615a58603a913960400191505060405180910390fd5b613a5f6009548260e001516130da565b60c0830181905260208301826003811115613a7657fe5b6003811115613a8157fe5b9052506000905081602001516003811115613a9857fe5b14613ad45760405162461bcd60e51b8152600401808060200182810382526031815260200180615ae06031913960400191505060405180910390fd5b8060a00151600e6000886001600160a01b03166001600160a01b0316815260200190815260200160002060000181905550600854600e6000886001600160a01b03166001600160a01b03168152602001908152602001600020600101819055508060c001516009819055507f6fadbf7329d21f278e724fa0d4511001a158f2a97ee35c5bc4cf8b64417399ef87878360e001518460a001518560c0015186610100015160405180876001600160a01b03168152602001866001600160a01b03168152602001858152602001848152602001838152602001828152602001965050505050505060405180910390a160035460e0820151606083015160408051631ededc9160e01b81523060048201526001600160a01b038c811660248301528b81166044830152606482019490945260848101929092525161010090930490911691631ededc919160a48082019260009290919082900301818387803b158015613c3c57600080fd5b505af1158015613c50573d6000803e3d6000fd5b5060009250613c5d915050565b8160e00151935093505050935093915050565b600080600080613c8087876131cb565b90925090506000826003811115613c9357fe5b14613ca45750915060009050613245565b61323e81866130da565b6000613cb86157a7565b600080613ccd86670de0b6b3a7640000614a64565b90925090506000826003811115613ce057fe5b14613cff57506040805160208101909152600081529092509050612a98565b600080613d0c8388614aa3565b90925090506000826003811115613d1f57fe5b14613d425781604051806020016040528060008152509550955050505050612a98565b604080516020810190915290815260009890975095505050505050565b601154610100900460ff1680613d785750613d786125c9565b80613d86575060115460ff16155b613dc15760405162461bcd60e51b815260040180806020018281038252602e815260200180615a92602e913960400191505060405180910390fd5b601154610100900460ff1615801561266c576011805460ff1961ff001990911661010017166001179055801561267e576011805461ff001916905550565b601154610100900460ff1680613e185750613e186125c9565b80613e26575060115460ff16155b613e615760405162461bcd60e51b815260040180806020018281038252602e815260200180615a92602e913960400191505060405180910390fd5b601154610100900460ff16158015613e8c576011805460ff1961ff0019909116610100171660011790555b6000613e96612bb3565b607680546001600160a01b0319166001600160a01b038316908117909155604051919250906000907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a350801561267e576011805461ff001916905550565b51670de0b6b3a7640000900490565b600080600080613f15612ec8565b60075414613f3457613f29600a6051612bb7565b935091506130599050565b613f3e33866154ec565b905080600a54019150600a54821015613f9e576040805162461bcd60e51b815260206004820181905260248201527f61646420726573657276657320756e6578706563746564206f766572666c6f77604482015290519081900360640190fd5b600a829055604080513381526020810183905280820184905290517fa91e67c5ea634cd43a12c5a482724b03de01e85ca68702a53d0c2f45cb7c1dc59181900360600190a160009350915050915091565b60a8546040805163a9059cbb60e01b81526001600160a01b0385811660048301526024820185905291519190921691829163a9059cbb9160448082019260009290919082900301818387803b15801561404757600080fd5b505af115801561405b573d6000803e3d6000fd5b5050505060003d60008114614077576020811461408157600080fd5b600019915061408d565b60206000803e60005191505b50806140e0576040805162461bcd60e51b815260206004820152601960248201527f544f4b454e5f5452414e534645525f4f55545f4641494c454400000000000000604482015290519081900360640190fd5b50505050565b600080826141945760035460408051634ef4c3e160e01b81523060048201526001600160a01b038881166024830152604482018890529151600093610100900490921691634ef4c3e19160648082019260209290919082900301818787803b15801561415157600080fd5b505af1158015614165573d6000803e3d6000fd5b505050506040513d602081101561417b57600080fd5b5051905080156141925761387b6003602083613165565b505b61419c612ec8565b600754146141bb576141b0600a6023612bb7565b600091509150613245565b6141c3615885565b83614225576141d061251a565b60408301819052602083018260038111156141e757fe5b60038111156141f257fe5b905250600090508160200151600381111561420957fe5b146142255761387b600960228360200151600381111561193857fe5b61422f86866154ec565b60c0820152836142e9576142598160c0015160405180602001604052808460400151815250615736565b606083018190526020830182600381111561427057fe5b600381111561427b57fe5b905250600090508160200151600381111561429257fe5b146142e4576040805162461bcd60e51b815260206004820181905260248201527f4d494e545f45584348414e47455f43414c43554c4154494f4e5f4641494c4544604482015290519081900360640190fd5b6142f1565b606081018490525b614301600b5482606001516131cb565b608083018190526020830182600381111561431857fe5b600381111561432357fe5b905250600090508160200151600381111561433a57fe5b146143765760405162461bcd60e51b8152600401808060200182810382526028815260200180615b796028913960400191505060405180910390fd5b6001600160a01b0386166000908152600c6020526040902054606082015161439e91906131cb565b60a08301819052602083018260038111156143b557fe5b60038111156143c057fe5b90525060009050816020015160038111156143d757fe5b146144135760405162461bcd60e51b815260040180806020018281038252602b8152602001806159d6602b913960400191505060405180910390fd5b60808082018051600b5560a080840180516001600160a01b038b166000818152600c60209081526040918290209390935560c08801516060808a01519751955183519485529484019190915282820196909652948101929092529381019390935290517f94c792774c59479f7bd68442f3af3691c02123a5aabee8b6f9116d8af8aa66699281900390910190a1606081015160408051918252516001600160a01b038816913091600080516020615ac08339815191529181900360200190a360035460c08201516060830151604080516341c728b960e01b81523060048201526001600160a01b038b811660248301526044820194909452606481019290925251610100909304909116916341c728b99160848082019260009290919082900301818387803b15801561454557600080fd5b505af1158015614559573d6000803e3d6000fd5b5060009250614566915050565b8160c001519250925050935093915050565b6000821580614585575081155b6145c05760405162461bcd60e51b8152600401808060200182810382526034815260200180615ba16034913960400191505060405180910390fd5b6145c8615885565b6145d061251a565b60408301819052602083018260038111156145e757fe5b60038111156145f257fe5b905250600090508160200151600381111561460957fe5b1461462d576146256009602c8360200151600381111561193857fe5b91505061115c565b83156146ae5760608101849052604080516020810182529082015181526146549085612a4b565b608083018190526020830182600381111561466b57fe5b600381111561467657fe5b905250600090508160200151600381111561468d57fe5b146146a9576146256009602a8360200151600381111561193857fe5b614727565b6146ca8360405180602001604052808460400151815250615736565b60608301819052602083018260038111156146e157fe5b60038111156146ec57fe5b905250600090508160200151600381111561470357fe5b1461471f576146256009602b8360200151600381111561193857fe5b608081018390525b60035460608201516040805163eabe7d9160e01b81523060048201526001600160a01b0389811660248301526044820193909352905160009361010090049092169163eabe7d919160648082019260209290919082900301818787803b15801561479057600080fd5b505af11580156147a4573d6000803e3d6000fd5b505050506040513d60208110156147ba57600080fd5b5051905080156147da576147d16003602983613165565b9250505061115c565b6147e2612ec8565b600754146147f6576147d1600a602d612bb7565b614806600b5483606001516130da565b60a084018190526020840182600381111561481d57fe5b600381111561482857fe5b905250600090508260200151600381111561483f57fe5b1461485b576147d16009602f8460200151600381111561193857fe5b6001600160a01b0386166000908152600c6020526040902054606083015161488391906130da565b60c084018190526020840182600381111561489a57fe5b60038111156148a557fe5b90525060009050826020015160038111156148bc57fe5b146148d8576147d16009602e8460200151600381111561193857fe5b81608001516148e5612a9f565b10156148f7576147d1600e6030612bb7565b614905868360800151613fef565b60a0820151600b5560c08201516001600160a01b0387166000818152600c6020908152604091829020939093556060850151815190815290513093600080516020615ac0833981519152928290030190a37fe02f6383e19e87c24e0c03e2cd5dbd05156cb29a1b0f3dbca1fa3430e444f63d86836080015184606001518560a001518660c0015160405180866001600160a01b031681526020018581526020018481526020018381526020018281526020019550505050505060405180910390a160035460808301516060840151604080516351dff98960e01b81523060048201526001600160a01b038b811660248301526044820194909452606481019290925251610100909304909116916351dff9899160848082019260009290919082900301818387803b158015614a3957600080fd5b505af1158015614a4d573d6000803e3d6000fd5b5060009250614a5a915050565b9695505050505050565b60008083614a7757506000905080612a98565b83830283858281614a8457fe5b0414614a9857600260009250925050612a98565b600092509050612a98565b60008082614ab75750600190506000612a98565b6000838581614ac257fe5b04915091509250929050565b6003546040805163368f515360e21b81523060048201526001600160a01b0385811660248301526044820185905291516000938493610100909104169163da3d454c91606480830192602092919082900301818787803b158015614b3157600080fd5b505af1158015614b45573d6000803e3d6000fd5b505050506040513d6020811015614b5b57600080fd5b505190508015614b7a57614b726003600f83613165565b915050610ca3565b614b82612ec8565b60075414614b9657614b72600a600b612bb7565b82614b9f612a9f565b1015614bb157614b72600e600a612bb7565b614bb96158c3565b614bc2856153e2565b6080830181905282826003811115614bd657fe5b6003811115614be157fe5b9052506000905081516003811115614bf557fe5b14614c1a57614c11600960078360000151600381111561193857fe5b92505050610ca3565b614c2385612fab565b6020830181905282826003811115614c3757fe5b6003811115614c4257fe5b9052506000905081516003811115614c5657fe5b14614c7257614c11600960088360000151600381111561193857fe5b614c808160200151856131cb565b6040830181905282826003811115614c9457fe5b6003811115614c9f57fe5b9052506000905081516003811115614cb357fe5b14614ccf57614c116009600d8360000151600381111561193857fe5b614cdb600954856131cb565b6060830181905282826003811115614cef57fe5b6003811115614cfa57fe5b9052506000905081516003811115614d0e57fe5b14614d2a57614c116009600c8360000151600381111561193857fe5b614d348585613fef565b604080820180516001600160a01b0388166000818152600e6020908152908590209283556008546001909301929092556060808601516009819055935160808088015187519485529484018b905283870191909152908201939093529182015290517f2dd79f4fccfd18c360ce7f9132f3621bf05eee18f995224badb32d17f172df739181900360a00190a160035460408051635c77860560e01b81523060048201526001600160a01b03888116602483015260448201889052915161010090930490911691635c7786059160648082019260009290919082900301818387803b158015614e2157600080fd5b505af1158015614e35573d6000803e3d6000fd5b5060009250614e42915050565b95945050505050565b60035460408051632fe3f38f60e11b81523060048201526001600160a01b03848116602483015287811660448301528681166064830152608482018690529151600093849384936101009092041691635fc7e71e9160a48082019260209290919082900301818787803b158015614ec157600080fd5b505af1158015614ed5573d6000803e3d6000fd5b505050506040513d6020811015614eeb57600080fd5b505190508015614f0e57614f026003601383613165565b600092509250506153d9565b614f16612ec8565b60075414614f2a57614f02600a6017612bb7565b614f32612ec8565b846001600160a01b0316636c540baf6040518163ffffffff1660e01b815260040160206040518083038186803b158015614f6b57600080fd5b505afa158015614f7f573d6000803e3d6000fd5b505050506040513d6020811015614f9557600080fd5b505114614fa857614f02600a6012612bb7565b866001600160a01b0316866001600160a01b03161415614fce57614f0260066018612bb7565b84614fdf57614f0260076016612bb7565b600019851415614ff557614f0260076015612bb7565b6000806150038989896137cc565b909250905081156150325761502482601081111561501d57fe5b6019612bb7565b6000945094505050506153d9565b6003546040805163c488847b60e01b81523060048201526001600160a01b03898116602483015260448201859052825160009485946101009091049092169263c488847b926064808301939192829003018186803b15801561509357600080fd5b505afa1580156150a7573d6000803e3d6000fd5b505050506040513d60408110156150bd57600080fd5b508051602090910151909250905081156151085760405162461bcd60e51b8152600401808060200182810382526033815260200180615b116033913960400191505060405180910390fd5b80886001600160a01b03166370a082318c6040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561515657600080fd5b505afa15801561516a573d6000803e3d6000fd5b505050506040513d602081101561518057600080fd5b505110156151d5576040805162461bcd60e51b815260206004820152601860248201527f4c49515549444154455f5345495a455f544f4f5f4d5543480000000000000000604482015290519081900360640190fd5b60006001600160a01b0389163014156151fb576151f4308d8d8561324d565b9050615292565b886001600160a01b031663b2a02ff18d8d856040518463ffffffff1660e01b815260040180846001600160a01b03168152602001836001600160a01b031681526020018281526020019350505050602060405180830381600087803b15801561526357600080fd5b505af1158015615277573d6000803e3d6000fd5b505050506040513d602081101561528d57600080fd5b505190505b80156152dc576040805162461bcd60e51b81526020600482015260146024820152731d1bdad95b881cd95a5e9d5c994819985a5b195960621b604482015290519081900360640190fd5b604080516001600160a01b03808f168252808e1660208301528183018790528b1660608201526080810184905290517f298637f684da70674f26509b10f07ec2fbc77a335ab1e7d6215a4b2484d8bb529181900360a00190a1600354604080516347ef3b3b60e01b81523060048201526001600160a01b038c811660248301528f811660448301528e811660648301526084820188905260a482018690529151610100909304909116916347ef3b3b9160c48082019260009290919082900301818387803b1580156153ad57600080fd5b505af11580156153c1573d6000803e3d6000fd5b50600092506153ce915050565b975092955050505050505b94509492505050565b6001600160a01b0381166000908152600e602052604081208054829182918291829182919061541c57600080965096505050505050613059565b61542c8160000154600854614a64565b9095509350600085600381111561543f57fe5b1461545557846000965096505050505050613059565b600181015461546f57600080965096505050505050613059565b61547d848260010154614aa3565b9095509250600085600381111561549057fe5b146154a657846000965096505050505050613059565b6154b48382600001546130da565b909550915060008560038111156154c757fe5b146154dd57846000965096505050505050613059565b50600095509350505050915091565b60a854604080516370a0823160e01b815230600482015290516000926001600160a01b031691839183916370a08231916024808301926020929190829003018186803b15801561553b57600080fd5b505afa15801561554f573d6000803e3d6000fd5b505050506040513d602081101561556557600080fd5b5051604080516323b872dd60e01b81526001600160a01b038881166004830152306024830152604482018890529151929350908416916323b872dd9160648082019260009290919082900301818387803b1580156155c257600080fd5b505af11580156155d6573d6000803e3d6000fd5b5050505060003d600081146155f257602081146155fc57600080fd5b6000199150615608565b60206000803e60005191505b508061565b576040805162461bcd60e51b815260206004820152601860248201527f544f4b454e5f5452414e534645525f494e5f4641494c45440000000000000000604482015290519081900360640190fd5b60a854604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b1580156156a657600080fd5b505afa1580156156ba573d6000803e3d6000fd5b505050506040513d60208110156156d057600080fd5b5051905082811015615729576040805162461bcd60e51b815260206004820152601a60248201527f544f4b454e5f5452414e534645525f494e5f4f564552464c4f57000000000000604482015290519081900360640190fd5b9190910395945050505050565b60008060006157436157a7565b612a62868660006157526157a7565b600080615767670de0b6b3a764000087614a64565b9092509050600082600381111561577a57fe5b1461579957506040805160208101909152600081529092509050612a98565b612a91818660000151613cae565b6040518060200160405280600081525090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106157fb57805160ff1916838001178555615828565b82800160010185558215615828579182015b8281111561582857825182559160200191906001019061580d565b506158349291506158f3565b5090565b604080516101208101909152806000815260200160008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081525090565b6040805160e0810190915280600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081525090565b6040805160a081019091528060008152602001600081526020016000815260200160008152602001600081525090565b5b8082111561583457600081556001016158f456fe6d61726b6574206d6179206f6e6c7920626520696e697469616c697a6564206f6e63654f776e61626c653a206e6577206f776e657220697320746865207a65726f20616464726573736d696e74496e7465726e616c466f724d6967726174653a2063616c6c6572206973206e6f7420746865206d69677261746f72696e697469616c2065786368616e67652072617465206d7573742062652067726561746572207468616e207a65726f2e73657474696e6720696e7465726573742072617465206d6f64656c206661696c65644d494e545f4e45575f4143434f554e545f42414c414e43455f43414c43554c4154494f4e5f4641494c4544626f72726f7742616c616e636553746f7265643a20626f72726f7742616c616e636553746f726564496e7465726e616c206661696c65644f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657252455041595f424f52524f575f4e45575f4143434f554e545f424f52524f575f42414c414e43455f43414c43554c4154494f4e5f4641494c4544436f6e747261637420696e7374616e63652068617320616c7265616479206265656e20696e697469616c697a6564ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef52455041595f424f52524f575f4e45575f544f54414c5f42414c414e43455f43414c43554c4154494f4e5f4641494c45444c49515549444154455f434f4d5054524f4c4c45525f43414c43554c4154455f414d4f554e545f5345495a455f4641494c454465786368616e67655261746553746f7265643a2065786368616e67655261746553746f726564496e7465726e616c206661696c65644d494e545f4e45575f544f54414c5f535550504c595f43414c43554c4154494f4e5f4641494c45446f6e65206f662072656465656d546f6b656e73496e206f722072656465656d416d6f756e74496e206d757374206265207a65726f72656475636520726573657276657320756e657870656374656420756e646572666c6f77a264697066735822122028e6ac7f3d654ab13632afc622036def986e2e5c4c6a2768c714490859475ce164736f6c634300060c0033
Deployed Bytecode Sourcemap
141052:8967:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;16383:18;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;67023:246;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;67023:246:0;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;144525:158;;;;;;;;;;;;;;;;-1:-1:-1;144525:158:0;;:::i;:::-;;;;;;;;;;;;;;;;17571:36;;;:::i;71345:233::-;;;;;;;;;;;;;;;;-1:-1:-1;71345:233:0;-1:-1:-1;;;;;71345:233:0;;:::i;18296:26::-;;;:::i;75684:270::-;;;:::i;141618:616::-;;;;;;;;;;;;;;;;-1:-1:-1;;;;;141618:616:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;141618:616:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;141618:616:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;141618:616:0;;;;;;;;-1:-1:-1;141618:616:0;;-1:-1:-1;;;;;141618:616:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;141618:616:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;141618:616:0;;-1:-1:-1;;;141618:616:0;;;;;-1:-1:-1;141618:616:0;;-1:-1:-1;141618:616:0:i;:::-;;66349:204;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;66349:204:0;;;;;;;;;;;;;;;;;:::i;144971:198::-;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;144971:198:0;;;;;;;;:::i;16605:21::-;;;:::i;:::-;;;;;;;;;;;;;;;;;;;68318:364;;;;;;;;;;;;;;;;-1:-1:-1;68318:364:0;-1:-1:-1;;;;;68318:364:0;;:::i;77574:97::-;;;:::i;146123:128::-;;;;;;;;;;;;;;;;-1:-1:-1;146123:128:0;;:::i;118724:571::-;;;;;;;;;;;;;;;;-1:-1:-1;118724:571:0;-1:-1:-1;;;;;118724:571:0;;:::i;18028:27::-;;;:::i;129313:382::-;;;;;;;;;;;;;;;;-1:-1:-1;129313:382:0;-1:-1:-1;;;;;129313:382:0;;:::i;16155:36::-;;;:::i;17086:31::-;;;:::i;:::-;;;;-1:-1:-1;;;;;17086:31:0;;;;;;;;;;;;;;124363:580;;;;;;;;;;;;;;;;-1:-1:-1;124363:580:0;;:::i;17710:33::-;;;:::i;141017:25::-;;;:::i;67941:121::-;;;;;;;;;;;;;;;;-1:-1:-1;67941:121:0;-1:-1:-1;;;;;67941:121:0;;:::i;58735:148::-;;;:::i;70853:201::-;;;:::i;142774:182::-;;;;;;;;;;;;;;;;-1:-1:-1;142774:182:0;;;;;;;:::i;19233:23::-;;;:::i;143785:142::-;;;;;;;;;;;;;;;;-1:-1:-1;143785:142:0;;:::i;58093:79::-;;;:::i;18174:28::-;;;:::i;61539:1367::-;;;;;;;;;;;;;;;;-1:-1:-1;;;;;61539:1367:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;61539:1367:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;61539:1367:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;61539:1367:0;;;;;;;;-1:-1:-1;61539:1367:0;;-1:-1:-1;;;;;61539:1367:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;61539:1367:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;61539:1367:0;;-1:-1:-1;;;61539:1367:0;;;;;-1:-1:-1;61539:1367:0;;-1:-1:-1;61539:1367:0:i;16492:20::-;;;:::i;71787:296::-;;;;;;;;;;;;;;;;-1:-1:-1;71787:296:0;-1:-1:-1;;;;;71787:296:0;;:::i;142624:142::-;;;;;;;;;;;;;;;;-1:-1:-1;142624:142:0;;:::i;80969:4185::-;;;:::i;65848:194::-;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;65848:194:0;;;;;;;;:::i;17877:26::-;;;:::i;70514:193::-;;;:::i;115447:203::-;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;115447:203:0;;;;;;;;;;;;;;;;;:::i;75227:207::-;;;:::i;77821:2900::-;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;69028:712;;;;;;;;;;;;;;;;-1:-1:-1;69028:712:0;-1:-1:-1;;;;;69028:712:0;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;144195:122;;;;;;;;;;;;;;;;-1:-1:-1;144195:122:0;;:::i;143307:::-;;;;;;;;;;;;;;;;-1:-1:-1;143307:122:0;;:::i;67599:152::-;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;67599:152:0;;;;;;;;;;:::i;19265:37::-;;;:::i;127189:643::-;;;;;;;;;;;;;;;;-1:-1:-1;127189:643:0;-1:-1:-1;;;;;127189:643:0;;:::i;59038:244::-;;;;;;;;;;;;;;;;-1:-1:-1;59038:244:0;-1:-1:-1;;;;;59038:244:0;;:::i;17232:43::-;;;:::i;145651:238::-;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;145651:238:0;;;;;;;;;;;;;;;;;:::i;70168:170::-;;;:::i;119598:616::-;;;;;;;;;;;;;;;;-1:-1:-1;119598:616:0;;:::i;129703:379::-;;;;;;;;;;;;;;;;-1:-1:-1;129703:379:0;;:::i;16383:18::-;;;;;;;;;;;;;;;-1:-1:-1;;16383:18:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;67023:246::-;67131:10;67100:4;67152:23;;;:18;:23;;;;;;;;-1:-1:-1;;;;;67152:32:0;;;;;;;;;;;:41;;;67209:30;;;;;;;67100:4;;67131:10;67152:32;;67131:10;;67209:30;;;;;;;;;;;67257:4;67250:11;;;67023:246;;;;;:::o;144525:158::-;144591:4;144609:8;144622:32;144642:11;144622:19;:32::i;:::-;-1:-1:-1;144608:46:0;-1:-1:-1;;144525:158:0;;;;:::o;17571:36::-;;;;:::o;71345:233::-;71432:4;131373:11;;;;131365:34;;;;;-1:-1:-1;;;131365:34:0;;;;;;;;;;;;-1:-1:-1;;;131365:34:0;;;;;;;;;;;;;;;131424:5;131410:19;;-1:-1:-1;;131410:19:0;;;71457:16:::1;:14;:16::i;:::-;:40;71449:75;;;::::0;;-1:-1:-1;;;71449:75:0;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;71449:75:0;;;;;;;;;;;;;::::1;;71542:28;71562:7;71542:19;:28::i;:::-;71535:35;;131440:1;131452:11:::0;:18;;-1:-1:-1;;131452:18:0;131466:4;131452:18;;;71345:233;;-1:-1:-1;71345:233:0:o;18296:26::-;;;;:::o;75684:270::-;75744:4;75762:13;75777:11;75792:28;:26;:28::i;:::-;75761:59;;-1:-1:-1;75761:59:0;-1:-1:-1;75846:18:0;75839:3;:25;;;;;;;;;75831:91;;;;-1:-1:-1;;;75831:91:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;75940:6;-1:-1:-1;;75684:270:0;;:::o;141618:616::-;54557:12;;;;;;;;:31;;;54573:15;:13;:15::i;:::-;54557:47;;;-1:-1:-1;54593:11:0;;;;54592:12;54557:47;54549:106;;;;-1:-1:-1;;;54549:106:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;54687:12;;;;;;;54686:13;54706:83;;;;54735:12;:19;;-1:-1:-1;;;;54735:19:0;;;;;54763:18;54750:4;54763:18;;;54706:83;141907:22:::1;:20;:22::i;:::-;141998:101;142009:12;142023:18;142043:28;142073:5;142080:7;142089:9;141998:10;:101::i;:::-;142159:10;:24:::0;;-1:-1:-1;;;;;;142159:24:0::1;-1:-1:-1::0;;;;;142159:24:0;;::::1;::::0;;;::::1;::::0;;;;142194:32:::1;::::0;;-1:-1:-1;;;142194:32:0;;;;142201:10;;;::::1;::::0;142194:30:::1;::::0;:32:::1;::::0;;::::1;::::0;::::1;::::0;;;;;;;;;142201:10;142194:32;::::1;;::::0;::::1;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;::::0;::::1;;-1:-1:-1::0;;54807:57:0;;;;54836:12;:20;;-1:-1:-1;;54836:20:0;;;54807:57;141618:616;;;;;;;;:::o;66349:204::-;66453:4;131373:11;;;;131365:34;;;;;-1:-1:-1;;;131365:34:0;;;;;;;;;;;;-1:-1:-1;;;131365:34:0;;;;;;;;;;;;;;;131424:5;131410:19;;-1:-1:-1;;131410:19:0;;;66477:44:::1;66492:10;66504:3;66509;66514:6;66477:14;:44::i;:::-;:68;66470:75;;131452:11:::0;:18;;-1:-1:-1;;131452:18:0;131466:4;131452:18;;;66349:204;;-1:-1:-1;;;66349:204:0:o;144971:198::-;145061:4;145079:8;145092:48;145118:8;145128:11;145092:25;:48::i;:::-;-1:-1:-1;145078:62:0;144971:198;-1:-1:-1;;;;144971:198:0:o;16605:21::-;;;;;;:::o;68318:364::-;68389:4;68406:23;;:::i;:::-;68432:39;;;;;;;;68448:21;:19;:21::i;:::-;68432:39;;-1:-1:-1;;;;;68547:20:0;;68483:14;68547:20;;;:13;:20;;;;;;68406:65;;-1:-1:-1;68483:14:0;;;68515:53;;68406:65;;68515:17;:53::i;:::-;68482:86;;-1:-1:-1;68482:86:0;-1:-1:-1;68595:18:0;68587:4;:26;;;;;;;;;68579:70;;;;;-1:-1:-1;;;68579:70:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;68667:7;68318:364;-1:-1:-1;;;;68318:364:0:o;77574:97::-;77625:4;77649:14;:12;:14::i;:::-;77642:21;;77574:97;:::o;146123:128::-;146188:4;146212:31;146233:9;146212:20;:31::i;118724:571::-;118813:4;58315:12;:10;:12::i;:::-;58305:6;;-1:-1:-1;;;;;58305:6:0;;;:22;;;58297:67;;;;;-1:-1:-1;;;58297:67:0;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;58297:67:0;;;;;;;;;;;;;;;118860:11:::1;::::0;;-1:-1:-1;;;;;119091:28:0;;::::1;118860:11;119091:28:::0;;::::1;-1:-1:-1::0;;;;;;119091:28:0;::::1;;::::0;;;119201:46:::1;::::0;;118860:11;;;::::1;::::0;;;::::1;119201:46:::0;;;::::1;::::0;::::1;::::0;;;;;;118860:11;;119201:46:::1;::::0;;;;;;;::::1;119272:14;119267:20;119260:27:::0;118724:571;-1:-1:-1;;;118724:571:0:o;18028:27::-;;;;:::o;129313:382::-;129391:4;58315:12;:10;:12::i;:::-;58305:6;;-1:-1:-1;;;;;58305:6:0;;;:22;;;58297:67;;;;;-1:-1:-1;;;58297:67:0;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;58297:67:0;;;;;;;;;;;;;;;129430:8:::1;::::0;;-1:-1:-1;;;;;129506:22:0;;::::1;-1:-1:-1::0;;;;;;129506:22:0;::::1;::::0;::::1;::::0;;;129610:37:::1;::::0;;129430:8;;;::::1;129610:37:::0;;;::::1;::::0;::::1;::::0;;;;;;::::1;::::0;;;;;;;;;::::1;129672:14;129667:20;::::0;16155:36;16187:4;16155:36;:::o;17086:31::-;;;;;;-1:-1:-1;;;;;17086:31:0;;:::o;124363:580::-;124447:4;131373:11;;;;131365:34;;;;;-1:-1:-1;;;131365:34:0;;;;;;;;;;;;-1:-1:-1;;;131365:34:0;;;;;;;;;;;;;;;131424:5;131410:19;;-1:-1:-1;;131410:19:0;;;124477:16:::1;:14;:16::i;:::-;124464:29:::0;-1:-1:-1;124508:29:0;;124504:277:::1;;124699:70;124710:5;124704:12;;;;;;;;124718:50;124699:4;:70::i;:::-;124692:77;;;;;124504:277;124901:34;124922:12;124901:20;:34::i;:::-;124894:41;;;131452:11:::0;:18;;-1:-1:-1;;131452:18:0;131466:4;131452:18;;;124363:580;;-1:-1:-1;124363:580:0:o;17710:33::-;;;;:::o;141017:25::-;;;-1:-1:-1;;;;;141017:25:0;;:::o;67941:121::-;-1:-1:-1;;;;;68034:20:0;68007:7;68034:20;;;:13;:20;;;;;;;67941:121::o;58735:148::-;58315:12;:10;:12::i;:::-;58305:6;;-1:-1:-1;;;;;58305:6:0;;;:22;;;58297:67;;;;;-1:-1:-1;;;58297:67:0;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;58297:67:0;;;;;;;;;;;;;;;58826:6:::1;::::0;58805:40:::1;::::0;58842:1:::1;::::0;-1:-1:-1;;;;;58826:6:0::1;::::0;58805:40:::1;::::0;58842:1;;58805:40:::1;58856:6;:19:::0;;-1:-1:-1;;;;;;58856:19:0::1;::::0;;58735:148::o;70853:201::-;70924:4;131373:11;;;;131365:34;;;;;-1:-1:-1;;;131365:34:0;;;;;;;;;;;;-1:-1:-1;;;131365:34:0;;;;;;;;;;;;;;;131424:5;131410:19;;-1:-1:-1;;131410:19:0;;;70949:16:::1;:14;:16::i;:::-;:40;70941:75;;;::::0;;-1:-1:-1;;;70941:75:0;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;70941:75:0;;;;;;;;;;;;;::::1;;-1:-1:-1::0;71034:12:0::1;::::0;131452:11;:18;;-1:-1:-1;;131452:18:0;131466:4;131452:18;;;70853:201;:::o;142774:182::-;142850:4;142868:8;142881:46;142904:10;142916;142881:22;:46::i;19233:23::-;;;-1:-1:-1;;;;;19233:23:0;;:::o;143785:142::-;143857:4;143881:38;143906:12;143881:24;:38::i;58093:79::-;58158:6;;-1:-1:-1;;;;;58158:6:0;58093:79;:::o;18174:28::-;;;;:::o;61539:1367::-;58315:12;:10;:12::i;:::-;58305:6;;-1:-1:-1;;;;;58305:6:0;;;:22;;;58297:67;;;;;-1:-1:-1;;;58297:67:0;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;58297:67:0;;;;;;;;;;;;;;;61796:18:::1;::::0;:23;:43;::::1;;;-1:-1:-1::0;61823:11:0::1;::::0;:16;61796:43:::1;61788:91;;;;-1:-1:-1::0;;;61788:91:0::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;61930:27;:58:::0;;;62007:31;61999:92:::1;;;;-1:-1:-1::0;;;61999:92:0::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;62136:8;62147:29;62163:12;62147:15;:29::i;:::-;62136:40:::0;-1:-1:-1;62195:27:0;;62187:66:::1;;;::::0;;-1:-1:-1;;;62187:66:0;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;::::1;::::0;;;;;;;;;;;;;::::1;;62393:16;:14;:16::i;:::-;62372:18;:37:::0;31686:4:::1;62420:11;:25:::0;62545:46:::1;62572:18:::0;62545:26:::1;:46::i;:::-;62539:52:::0;-1:-1:-1;62610:27:0;;62602:74:::1;;;;-1:-1:-1::0;;;62602:74:0::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;62689:12:::0;;::::1;::::0;:4:::1;::::0;:12:::1;::::0;::::1;::::0;::::1;:::i;:::-;-1:-1:-1::0;62712:16:0;;::::1;::::0;:6:::1;::::0;:16:::1;::::0;::::1;::::0;::::1;:::i;:::-;-1:-1:-1::0;;62739:8:0::1;:20:::0;;::::1;::::0;;::::1;-1:-1:-1::0;;62739:20:0;;::::1;;::::0;;:8:::1;62880:18:::0;;;;::::1;62739:20:::0;62880:18:::1;::::0;;-1:-1:-1;;;;;61539:1367:0:o;16492:20::-;;;;;;;;;;;;;;-1:-1:-1;;16492:20:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;71787:296;71863:4;71881:13;71896:11;71911:36;71939:7;71911:27;:36::i;:::-;71880:67;;-1:-1:-1;71880:67:0;-1:-1:-1;71973:18:0;71966:3;:25;;;;;;;;;71958:93;;;;-1:-1:-1;;;71958:93:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;142624:142;142682:4;142700:8;142713:24;142726:10;142713:12;:24::i;80969:4185::-;81020:4;81086:23;81112:16;:14;:16::i;:::-;81170:18;;81086:42;;-1:-1:-1;81258:45:0;;;81254:105;;;81332:14;81320:27;;;;;;81254:105;81426:14;81443;:12;:14::i;:::-;81488:12;;81532:13;;81580:11;;81688:17;;;:71;;;-1:-1:-1;;;81688:71:0;;;;;;;;;;;;;;;;;;;;;81426:31;;-1:-1:-1;81488:12:0;;81532:13;;81580:11;;81468:17;;-1:-1:-1;;;;;81688:17:0;;:31;;:71;;;;;;;;;;;;;;:17;:71;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;81688:71:0;;-1:-1:-1;16796:9:0;81778:43;;;81770:84;;;;;-1:-1:-1;;;81770:84:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;81945:17;81964:15;81983:52;81991:18;82011:23;81983:7;:52::i;:::-;81944:91;;-1:-1:-1;81944:91:0;-1:-1:-1;82065:18:0;82054:7;:29;;;;;;;;;82046:73;;;;;-1:-1:-1;;;82046:73:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;82611:31;;:::i;:::-;82653:24;82688:20;82719:21;82751:19;82817:59;82827:36;;;;;;;;82843:18;82827:36;;;82865:10;82817:9;:59::i;:::-;82783:93;;-1:-1:-1;82783:93:0;-1:-1:-1;82902:18:0;82891:7;:29;;;;;;;;;82887:183;;82944:114;82955:16;82973:69;83049:7;83044:13;;;;;;;;82944:10;:114::i;:::-;82937:121;;;;;;;;;;;;;;;;;;82887:183;83115:53;83133:20;83155:12;83115:17;:53::i;:::-;83082:86;;-1:-1:-1;83082:86:0;-1:-1:-1;83194:18:0;83183:7;:29;;;;;;;;;83179:181;;83236:112;83247:16;83265:67;83339:7;83334:13;;;;;;;83179:181;83495:52;83503:19;83524:22;;83495:7;:52::i;:::-;-1:-1:-1;83482:65:0;-1:-1:-1;83573:18:0;83562:7;:29;;;;;;;;;83558:106;;83630:22;;83608:44;;83558:106;83705:42;83713:19;83734:12;83705:7;:42::i;:::-;83676:71;;-1:-1:-1;83676:71:0;-1:-1:-1;83773:18:0;83762:7;:29;;;;;;;;;83758:178;;83815:109;83826:16;83844:64;83915:7;83910:13;;;;;;;83758:178;83978:101;84003:39;;;;;;;;84019:21;;84003:39;;;84044:19;84065:13;83978:24;:101::i;:::-;83948:131;;-1:-1:-1;83948:131:0;-1:-1:-1;84105:18:0;84094:7;:29;;;;;;;;;84090:179;;84147:110;84158:16;84176:65;84248:7;84243:13;;;;;;;84090:179;84309:82;84334:20;84356:16;84374;84309:24;:82::i;:::-;84281:110;;-1:-1:-1;84281:110:0;-1:-1:-1;84417:18:0;84406:7;:29;;;;;;;;;84402:177;;84459:108;84470:16;84488:63;84558:7;84553:13;;;;;;;84402:177;84782:18;:39;;;84832:11;:28;;;84871:12;:30;;;84912:13;:32;;;85009:97;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;85131:14;85119:27;;;;;;;;;;;;;;;;80969:4185;:::o;65848:194::-;65935:4;131373:11;;;;131365:34;;;;;-1:-1:-1;;;131365:34:0;;;;;;;;;;;;-1:-1:-1;;;131365:34:0;;;;;;;;;;;;;;;131424:5;131410:19;;-1:-1:-1;;131410:19:0;;;65959:51:::1;65974:10;65986;65998:3;66003:6;65959:14;:51::i;:::-;:75;65952:82;;131452:11:::0;:18;;-1:-1:-1;;131452:18:0;131466:4;131452:18;;;65848:194;;-1:-1:-1;;65848:194:0:o;17877:26::-;;;;:::o;70514:193::-;70600:17;;70576:4;;-1:-1:-1;;;;;70600:17:0;:31;70632:14;:12;:14::i;:::-;70648:12;;70662:13;;70677:21;;70600:99;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;70600:99:0;;-1:-1:-1;70514:193:0;:::o;115447:203::-;115558:4;131373:11;;;;131365:34;;;;;-1:-1:-1;;;131365:34:0;;;;;;;;;;;;-1:-1:-1;;;131365:34:0;;;;;;;;;;;;;;;131424:5;131410:19;;-1:-1:-1;;131410:19:0;;;115582:60:::1;115596:10;115608::::0;115620:8;115630:11;115582:13:::1;:60::i;:::-;115575:67;;131452:11:::0;:18;;-1:-1:-1;;131452:18:0;131466:4;131452:18;;;115447:203;;-1:-1:-1;;;115447:203:0:o;75227:207::-;75296:4;131373:11;;;;131365:34;;;;;-1:-1:-1;;;131365:34:0;;;;;;;;;;;;-1:-1:-1;;;131365:34:0;;;;;;;;;;;;;;;131424:5;131410:19;;-1:-1:-1;;131410:19:0;;;75321:16:::1;:14;:16::i;:::-;:40;75313:75;;;::::0;;-1:-1:-1;;;75313:75:0;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;75313:75:0;;;;;;;;;;;;;::::1;;75406:20;:18;:20::i;:::-;75399:27;;131452:11:::0;:18;;-1:-1:-1;;131452:18:0;131466:4;131452:18;;;75227:207;:::o;77821:2900::-;77876:13;77953:23;77979:16;:14;:16::i;:::-;78037:18;;77953:42;;-1:-1:-1;78006:28:0;78140:14;:12;:14::i;:::-;78185:12;;78229:13;;78277:11;;78385:17;;;:71;;;-1:-1:-1;;;78385:71:0;;;;;;;;;;;;;;;;;;;;;78123:31;;-1:-1:-1;78185:12:0;;78229:13;;78277:11;;78165:17;;-1:-1:-1;;;;;78385:17:0;;:31;;:71;;;;;;;;;;;;;;:17;:71;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;78385:71:0;;-1:-1:-1;16796:9:0;78475:43;;;78467:84;;;;;-1:-1:-1;;;78467:84:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;78642:17;78661:15;78680:52;78688:18;78708:23;78680:7;:52::i;:::-;78641:91;;-1:-1:-1;78641:91:0;-1:-1:-1;78762:18:0;78751:7;:29;;;;;;;;;78743:73;;;;;-1:-1:-1;;;78743:73:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;79306:31;;:::i;:::-;79498:13;;;79509:1;79498:13;;;;;;;;;79348:24;;;;;;;;79478:17;;79498:13;;;;;;;;;;-1:-1:-1;79498:13:0;79478:33;;79558:59;79568:36;;;;;;;;79584:18;79568:36;;;79606:10;79558:9;:59::i;:::-;79524:93;;-1:-1:-1;79524:93:0;-1:-1:-1;79643:18:0;79632:7;:29;;;;;;;;;79628:72;;79685:3;-1:-1:-1;79678:10:0;;-1:-1:-1;;;;;;;;;;;;;;79678:10:0;79628:72;79745:53;79763:20;79785:12;79745:17;:53::i;:::-;79712:86;;-1:-1:-1;79712:86:0;-1:-1:-1;79824:18:0;79813:7;:29;;;;;;;;;79809:72;;79866:3;-1:-1:-1;79859:10:0;;-1:-1:-1;;;;;;;;;;;;;;79859:10:0;79809:72;79922:42;79930:19;79951:12;79922:7;:42::i;:::-;79893:71;;-1:-1:-1;79893:71:0;-1:-1:-1;79990:18:0;79979:7;:29;;;;;;;;;79975:72;;80032:3;-1:-1:-1;80025:10:0;;-1:-1:-1;;;;;;;;;;;;;;80025:10:0;79975:72;80089:101;80114:39;;;;;;;;80130:21;;80114:39;;;80155:19;80176:13;80089:24;:101::i;:::-;80059:131;;-1:-1:-1;80059:131:0;-1:-1:-1;80216:18:0;80205:7;:29;;;;;;;;;80201:72;;80258:3;-1:-1:-1;80251:10:0;;-1:-1:-1;;;;;;;;;;;;;;80251:10:0;80201:72;80313:82;80338:20;80360:16;80378;80313:24;:82::i;:::-;80285:110;;-1:-1:-1;80285:110:0;-1:-1:-1;80421:18:0;80410:7;:29;;;;;;;;;80406:72;;80463:3;-1:-1:-1;80456:10:0;;-1:-1:-1;;;;;;;;;;;;;;80456:10:0;80406:72;80499:18;80490:3;80494:1;80490:6;;;;;;;;;;;;;:27;;;;;80537:9;80528:3;80532:1;80528:6;;;;;;;;;;;;;:18;;;;;80566:19;80557:3;80561:1;80557:6;;;;;;;;;;;;;:28;;;;;80605:15;80596:3;80600:1;80596:6;;;;;;;;;;;;;:24;;;;;80640:16;80631:3;80635:1;80631:6;;;;;;;;;;;;;:25;;;;;80676:14;80667:3;80671:1;80667:6;;;;;;;;;;;;;;;;;:23;80710:3;-1:-1:-1;;;;;;;;;;;;;;;77821:2900:0;:::o;69028:712::-;-1:-1:-1;;;;;69161:22:0;;69105:4;69161:22;;;:13;:22;;;;;;69105:4;;;;;;;;;69312:36;69175:7;69312:27;:36::i;:::-;69288:60;-1:-1:-1;69288:60:0;-1:-1:-1;69371:18:0;69363:4;:26;;;;;;;;;69359:99;;69419:16;69414:22;69438:1;69441;69444;69406:40;;;;;;;;;;;;;;69359:99;69501:28;:26;:28::i;:::-;69470:59;-1:-1:-1;69470:59:0;-1:-1:-1;69552:18:0;69544:4;:26;;;;;;;;;69540:99;;69600:16;69595:22;;69540:99;-1:-1:-1;69664:14:0;;-1:-1:-1;69681:13:0;;-1:-1:-1;69696:13:0;-1:-1:-1;69696:13:0;-1:-1:-1;69028:712:0;;;;;;:::o;144195:122::-;144257:4;144281:28;144296:12;144281:14;:28::i;143307:122::-;143369:4;143393:28;143408:12;143393:14;:28::i;67599:152::-;-1:-1:-1;;;;;67709:25:0;;;67682:7;67709:25;;;:18;:25;;;;;;;;:34;;;;;;;;;;;;;67599:152::o;19265:37::-;;;;:::o;127189:643::-;127286:4;127303:10;127316:16;:14;:16::i;:::-;127303:29;-1:-1:-1;127347:29:0;;127343:298;;127551:78;127562:5;127556:12;;;;;;;;127570:58;127551:4;:78::i;:::-;127544:85;;;;;127343:298;127776:48;127803:20;127776:26;:48::i;59038:244::-;58315:12;:10;:12::i;:::-;58305:6;;-1:-1:-1;;;;;58305:6:0;;;:22;;;58297:67;;;;;-1:-1:-1;;;58297:67:0;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;58297:67:0;;;;;;;;;;;;;;;-1:-1:-1;;;;;59127:22:0;::::1;59119:73;;;;-1:-1:-1::0;;;59119:73:0::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;59229:6;::::0;59208:38:::1;::::0;-1:-1:-1;;;;;59208:38:0;;::::1;::::0;59229:6:::1;::::0;59208:38:::1;::::0;59229:6:::1;::::0;59208:38:::1;59257:6;:17:::0;;-1:-1:-1;;;;;;59257:17:0::1;-1:-1:-1::0;;;;;59257:17:0;;;::::1;::::0;;;::::1;::::0;;59038:244::o;17232:43::-;;;-1:-1:-1;;;;;17232:43:0;;:::o;145651:238::-;145765:4;145783:8;145796:64;145820:8;145830:11;145843:16;145796:23;:64::i;:::-;-1:-1:-1;145782:78:0;145651:238;-1:-1:-1;;;;;145651:238:0:o;70168:170::-;70254:17;;70230:4;;-1:-1:-1;;;;;70254:17:0;:31;70286:14;:12;:14::i;:::-;70302:12;;70316:13;;70254:76;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;119598:616;119696:4;131373:11;;;;131365:34;;;;;-1:-1:-1;;;131365:34:0;;;;;;;;;;;;-1:-1:-1;;;131365:34:0;;;;;;;;;;;;;;;131424:5;131410:19;;-1:-1:-1;;131410:19:0;;;119726:16:::1;:14;:16::i;:::-;119713:29:::0;-1:-1:-1;119757:29:0;;119753:286:::1;;119954:73;119965:5;119959:12;;;;;;;;119973:53;119954:4;:73::i;119753:286::-;120158:48;120181:24;120158:22;:48::i;129703:379::-:0;129804:7;58315:12;:10;:12::i;:::-;58305:6;;-1:-1:-1;;;;;58305:6:0;;;:22;;;58297:67;;;;;-1:-1:-1;;;58297:67:0;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;58297:67:0;;;;;;;;;;;;;;;129856:22:::1;::::0;;129891:48;;;;129957:77:::1;::::0;;;;;::::1;::::0;::::1;::::0;;;;;::::1;::::0;;;;;;;;;::::1;130059:14;130054:20;::::0;103209:572;103287:4;131373:11;;103287:4;;131373:11;;131365:34;;;;;-1:-1:-1;;;131365:34:0;;;;;;;;;;;;-1:-1:-1;;;131365:34:0;;;;;;;;;;;;;;;131424:5;131410:19;;-1:-1:-1;;131410:19:0;;;103323:16:::1;:14;:16::i;:::-;103310:29:::0;-1:-1:-1;103354:29:0;;103350:260:::1;;103527:67;103538:5;103532:12;;;;;;;;103546:47;103527:4;:67::i;:::-;103596:1;103519:79;;;;;;;103350:260;103720:53;103737:10;103749;103761:11;103720:16;:53::i;:::-;103713:60;;;;;131440:1;131452:11:::0;:18;;-1:-1:-1;;131452:18:0;131466:4;131452:18;;;103209:572;;;;-1:-1:-1;103209:572:0:o;76218:1186::-;76327:11;;76279:9;;;;76353:17;76349:1048;;-1:-1:-1;;76547:27:0;;76527:18;;-1:-1:-1;76519:56:0;;76349:1048;76757:14;76774;:12;:14::i;:::-;76757:31;;76803:33;76851:23;;:::i;:::-;76889:17;76965:54;76980:9;76991:12;;77005:13;;76965:14;:54::i;:::-;76923:96;-1:-1:-1;76923:96:0;-1:-1:-1;77049:18:0;77038:7;:29;;;;;;;;;77034:89;;77096:7;-1:-1:-1;77105:1:0;;-1:-1:-1;77088:19:0;;-1:-1:-1;;;;77088:19:0;77034:89;77165:50;77172:28;77202:12;77165:6;:50::i;:::-;77139:76;-1:-1:-1;77139:76:0;-1:-1:-1;77245:18:0;77234:7;:29;;;;;;;;;77230:89;;77292:7;-1:-1:-1;77301:1:0;;-1:-1:-1;77284:19:0;;-1:-1:-1;;;;77284:19:0;77230:89;-1:-1:-1;77363:21:0;77343:18;;-1:-1:-1;77363:21:0;-1:-1:-1;77335:50:0;;-1:-1:-1;;;77335:50:0;76218:1186;;;:::o;54958:508::-;55375:4;55421:17;55453:7;54958:508;:::o;57671:129::-;54557:12;;;;;;;;:31;;;54573:15;:13;:15::i;:::-;54557:47;;;-1:-1:-1;54593:11:0;;;;54592:12;54557:47;54549:106;;;;-1:-1:-1;;;54549:106:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;54687:12;;;;;;;54686:13;54706:83;;;;54735:12;:19;;-1:-1:-1;;;;54735:19:0;;;;;54763:18;54750:4;54763:18;;;54706:83;57729:26:::1;:24;:26::i;:::-;57766;:24;:26::i;:::-;54811:14:::0;54807:57;;;54836:12;:20;;-1:-1:-1;;54836:20:0;;;54807:57;57671:129;:::o;63369:2218::-;63543:11;;:60;;;-1:-1:-1;;;63543:60:0;;63579:4;63543:60;;;;-1:-1:-1;;;;;63543:60:0;;;;;;;;;;;;;;;;;;;;;;63467:4;;;;63543:11;;;;;;:27;;:60;;;;;;;;;;;;;;63467:4;63543:11;:60;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;63543:60:0;;-1:-1:-1;63618:12:0;;63614:144;;63654:92;63665:27;63694:42;63738:7;63654:10;:92::i;:::-;63647:99;;;;;63614:144;63824:3;-1:-1:-1;;;;;63817:10:0;:3;-1:-1:-1;;;;;63817:10:0;;63813:105;;;63851:55;63856:15;63873:32;63851:4;:55::i;63813:105::-;63995:22;64047:3;-1:-1:-1;;;;;64036:14:0;:7;-1:-1:-1;;;;;64036:14:0;;64032:161;;;-1:-1:-1;;;64032:161:0;;;-1:-1:-1;;;;;;64149:23:0;;;;;;;:18;:23;;;;;;;;:32;;;;;;;;;;64032:161;64271:17;64299;64327;64355;64411:34;64419:17;64438:6;64411:7;:34::i;:::-;64385:60;;-1:-1:-1;64385:60:0;-1:-1:-1;64471:18:0;64460:7;:29;;;;;;;;;64456:125;;64513:56;64518:16;64536:32;64513:4;:56::i;:::-;64506:63;;;;;;;;;;64456:125;-1:-1:-1;;;;;64627:18:0;;;;;;:13;:18;;;;;;64619:35;;64647:6;64619:7;:35::i;:::-;64593:61;;-1:-1:-1;64593:61:0;-1:-1:-1;64680:18:0;64669:7;:29;;;;;;;;;64665:124;;64722:55;64727:16;64745:31;64722:4;:55::i;64665:124::-;-1:-1:-1;;;;;64835:18:0;;;;;;:13;:18;;;;;;64827:35;;64855:6;64827:7;:35::i;:::-;64801:61;;-1:-1:-1;64801:61:0;-1:-1:-1;64888:18:0;64877:7;:29;;;;;;;;;64873:122;;64930:53;64935:16;64953:29;64930:4;:53::i;64873:122::-;-1:-1:-1;;;;;65128:18:0;;;;;;;:13;:18;;;;;;:33;;;65172:18;;;;;;:33;;;-1:-1:-1;;65278:30:0;;65274:110;;-1:-1:-1;;;;;65325:23:0;;;;;;;:18;:23;;;;;;;;:32;;;;;;;;;:47;;;65274:110;65455:3;-1:-1:-1;;;;;65441:26:0;65450:3;-1:-1:-1;;;;;65441:26:0;-1:-1:-1;;;;;;;;;;;65460:6:0;65441:26;;;;;;;;;;;;;;;;;;65480:11;;:59;;;-1:-1:-1;;;65480:59:0;;65515:4;65480:59;;;;-1:-1:-1;;;;;65480:59:0;;;;;;;;;;;;;;;;;;;;;;:11;;;;;;;;:26;;:59;;;;;-1:-1:-1;;65480:59:0;;;;;;;;-1:-1:-1;65480:11:0;:59;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;65564:14:0;;-1:-1:-1;65559:20:0;;-1:-1:-1;;65559:20:0;;65552:27;63369:2218;-1:-1:-1;;;;;;;;;;;63369:2218:0:o;104114:594::-;104216:4;131373:11;;104216:4;;131373:11;;131365:34;;;;;-1:-1:-1;;;131365:34:0;;;;;;;;;;;;-1:-1:-1;;;131365:34:0;;;;;;;;;;;;;;;131424:5;131410:19;;-1:-1:-1;;131410:19:0;;;104252:16:::1;:14;:16::i;:::-;104239:29:::0;-1:-1:-1;104283:29:0;;104279:260:::1;;104456:67;104467:5;104461:12;;;;;;;;104475:47;104456:4;:67::i;:::-;104525:1;104448:79;;;;;;;104279:260;104649:51;104666:10;104678:8;104688:11;104649:16;:51::i;:::-;104642:58;;;;;131440:1;131452:11:::0;:18;;-1:-1:-1;;131452:18:0;131466:4;131452:18;;;104114:594;;;;-1:-1:-1;104114:594:0;-1:-1:-1;104114:594:0:o;33840:313::-;33917:9;33928:4;33946:13;33961:18;;:::i;:::-;33983:20;33993:1;33996:6;33983:9;:20::i;:::-;33945:58;;-1:-1:-1;33945:58:0;-1:-1:-1;34025:18:0;34018:3;:25;;;;;;;;;34014:73;;-1:-1:-1;34068:3:0;-1:-1:-1;34073:1:0;;-1:-1:-1;34060:15:0;;34014:73;34107:18;34127:17;34136:7;34127:8;:17::i;:::-;34099:46;;;;;;33840:313;;;;;;:::o;146519:162::-;146614:10;;146643:30;;;-1:-1:-1;;;146643:30:0;;146667:4;146643:30;;;;;;146575:4;;-1:-1:-1;;;;;146614:10:0;;;;146643:15;;:30;;;;;;;;;;;;;;;146614:10;146643:30;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;146643:30:0;;-1:-1:-1;;146519:162:0;:::o;121548:589::-;121625:4;131373:11;;;;131365:34;;;;;-1:-1:-1;;;131365:34:0;;;;;;;;;;;;-1:-1:-1;;;131365:34:0;;;;;;;;;;;;;;;131424:5;131410:19;;-1:-1:-1;;131410:19:0;;;121655:16:::1;:14;:16::i;:::-;121642:29:::0;-1:-1:-1;121686:29:0;;121682:274:::1;;121877:67;121888:5;121882:12;;;;;;;;121896:47;121877:4;:67::i;121682:274::-;122078:28;122096:9;122078:17;:28::i;:::-;-1:-1:-1::0;122067:39:0;-1:-1:-1;;131452:11:0;:18;;-1:-1:-1;;131452:18:0;131466:4;131452:18;;;121548:589;;-1:-1:-1;121548:589:0:o;56480:106::-;56568:10;56480:106;:::o;53070:153::-;53131:4;53153:33;53166:3;53161:9;;;;;;;;53177:4;53172:10;;;;;;;;53153:33;;;;;;;;;;;;;53184:1;53153:33;;;;;;;;;;;;;53211:3;53206:9;;;;;;;125220:1600;125297:4;58315:12;:10;:12::i;:::-;58305:6;;-1:-1:-1;;;;;58305:6:0;;;:22;;;58297:67;;;;;-1:-1:-1;;;58297:67:0;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;58297:67:0;;;;;;;;;;;;;;;125355:21:::1;125503:16;:14;:16::i;:::-;125481:18;;:38;125477:147;;125543:69;125548:22;125572:39;125543:4;:69::i;125477:147::-;125730:12;125713:14;:12;:14::i;:::-;:29;125709:152;;;125766:83;125771:29;125802:46;125766:4;:83::i;125709:152::-;125955:13;;125940:12;:28;125936:129;;;125992:61;125997:15;126014:38;125992:4;:61::i;125936:129::-;-1:-1:-1::0;126217:13:0::1;::::0;:28;;::::1;::::0;126353:33;::::1;;126345:82;;;;-1:-1:-1::0;;;126345:82:0::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;126501:13;:32:::0;;;126653:45:::1;126675:7;:5;:7::i;:::-;126685:12;126653:13;:45::i;:::-;126716:56;126732:7;:5;:7::i;:::-;126716:56;::::0;;-1:-1:-1;;;;;126716:56:0;;::::1;::::0;;::::1;::::0;::::1;::::0;;;;;;;;;;;;;;;;;::::1;126797:14;126792:20;::::0;86110:684;86207:4;131373:11;;86207:4;;131373:11;;131365:34;;;;;-1:-1:-1;;;131365:34:0;;;;;;;;;;;;-1:-1:-1;;;131365:34:0;;;;;;;;;;;;;;;131424:5;131410:19;;-1:-1:-1;;131410:19:0;;;86252:8:::1;::::0;-1:-1:-1;;;;;86252:8:0::1;86238:10;:22;86230:85;;;;-1:-1:-1::0;;;86230:85:0::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;86328:10;86341:16;:14;:16::i;:::-;86328:29:::0;-1:-1:-1;86372:29:0;;86368:252:::1;;86545:59;86556:5;86550:12;;;;;;;;86564:39;86545:4;:59::i;86368:252::-;86741:45;86751:10;86763;86775;86741:9;:45::i;92250:537::-:0;92334:4;131373:11;;;;131365:34;;;;;-1:-1:-1;;;131365:34:0;;;;;;;;;;;;-1:-1:-1;;;131365:34:0;;;;;;;;;;;;;;;131424:5;131410:19;;-1:-1:-1;;131410:19:0;;;92364:16:::1;:14;:16::i;:::-;92351:29:::0;-1:-1:-1;92395:29:0;;92391:249:::1;;92567:61;92578:5;92572:12;;;;;;;;92586:41;92567:4;:61::i;92391:249::-;92739:40;92751:10;92763:1;92766:12;92739:11;:40::i;69899:93::-:0;69972:12;69899:93;:::o;128162:1143::-;128267:4;58315:12;:10;:12::i;:::-;58305:6;;-1:-1:-1;;;;;58305:6:0;;;:22;;;58297:67;;;;;-1:-1:-1;;;58297:67:0;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;58297:67:0;;;;;;;;;;;;;;;128370:39:::1;128536:16;:14;:16::i;:::-;128514:18;;:38;128510:155;;128576:77;128581:22;128605:47;128576:4;:77::i;128510:155::-;-1:-1:-1::0;128759:17:0::1;::::0;;-1:-1:-1;;;;;129041:40:0;;::::1;-1:-1:-1::0;;;;;;129041:40:0;::::1;::::0;::::1;::::0;;;129187:70:::1;::::0;;128759:17;;;::::1;129187:70:::0;;;::::1;::::0;::::1;::::0;;;;;;::::1;::::0;;;;;;;;;::::1;129282:14;129277:20;::::0;72337:1268;-1:-1:-1;;;;;72686:23:0;;72414:9;72686:23;;;:14;:23;;;;;72915:24;;72414:9;;;;;;;;72911:92;;72969:18;72989:1;72961:30;;;;;;;;;;72911:92;73230:46;73238:14;:24;;;73264:11;;73230:7;:46::i;:::-;73197:79;;-1:-1:-1;73197:79:0;-1:-1:-1;73302:18:0;73291:7;:29;;;;;;;;;73287:81;;73345:7;73354:1;73337:19;;;;;;;;;;73287:81;73400:58;73408:19;73429:14;:28;;;73400:7;:58::i;:::-;73380:78;;-1:-1:-1;73380:78:0;-1:-1:-1;73484:18:0;73473:7;:29;;;;;;;;;73469:81;;73527:7;73536:1;73519:19;;;;;;;;;;73469:81;-1:-1:-1;73570:18:0;;-1:-1:-1;73590:6:0;-1:-1:-1;;;72337:1268:0;;;;:::o;85552:550::-;85622:4;131373:11;;85622:4;;131373:11;;131365:34;;;;;-1:-1:-1;;;131365:34:0;;;;;;;;;;;;-1:-1:-1;;;131365:34:0;;;;;;;;;;;;;;;131424:5;131410:19;;-1:-1:-1;;131410:19:0;;;85658:16:::1;:14;:16::i;:::-;85645:29:::0;-1:-1:-1;85689:29:0;;85685:252:::1;;85862:59;85873:5;85867:12;;;;;;;85685:252;86058:36;86068:10;86080;86092:1;86058:9;:36::i;28773:236::-:0;28829:9;28840:4;28866:1;28861;:6;28857:145;;-1:-1:-1;28892:18:0;;-1:-1:-1;28912:5:0;;;28884:34;;28857:145;-1:-1:-1;28959:27:0;;-1:-1:-1;28988:1:0;28951:39;;33374:353;33443:9;33454:10;;:::i;:::-;33478:14;33494:19;33517:27;33525:1;:10;;;33537:6;33517:7;:27::i;:::-;33477:67;;-1:-1:-1;33477:67:0;-1:-1:-1;33567:18:0;33559:4;:26;;;;;;;;;33555:92;;-1:-1:-1;33616:18:0;;;;;;;;;-1:-1:-1;33616:18:0;;33610:4;;-1:-1:-1;33616:18:0;-1:-1:-1;33602:33:0;;33555:92;33687:31;;;;;;;;;;;;-1:-1:-1;;33687:31:0;;-1:-1:-1;33374:353:0;-1:-1:-1;;;;33374:353:0:o;53346:187::-;53431:4;53453:43;53466:3;53461:9;;;;;;;;53477:4;53472:10;;;;;;;;53453:43;;;;;;;;;;;;;;;;;;;;;;;;;;;;53521:3;53516:9;;;;;;;29094:258;29150:9;;29187:5;;;29209:6;;;29205:140;;29240:18;;-1:-1:-1;29260:1:0;-1:-1:-1;29232:30:0;;29205:140;29303:26;29331:1;29295:38;;;;;;;34298:328;34395:9;34406:4;34424:13;34439:18;;:::i;:::-;34461:20;34471:1;34474:6;34461:9;:20::i;:::-;34423:58;;-1:-1:-1;34423:58:0;-1:-1:-1;34503:18:0;34496:3;:25;;;;;;;;;34492:73;;-1:-1:-1;34546:3:0;-1:-1:-1;34551:1:0;;-1:-1:-1;34538:15:0;;34492:73;34584:34;34592:17;34601:7;34592:8;:17::i;:::-;34611:6;34584:7;:34::i;:::-;34577:41;;;;;;34298:328;;;;;;;:::o;116325:2139::-;116516:11;;:87;;;-1:-1:-1;;;116516:87:0;;116549:4;116516:87;;;;-1:-1:-1;;;;;116516:87:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;116443:4;;;;116516:11;;;;;;:24;;:87;;;;;;;;;;;;;;116443:4;116516:11;:87;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;116516:87:0;;-1:-1:-1;116618:12:0;;116614:151;;116654:99;116665:27;116694:49;116745:7;116654:10;:99::i;116614:151::-;116838:10;-1:-1:-1;;;;;116826:22:0;:8;-1:-1:-1;;;;;116826:22:0;;116822:146;;;116872:84;116877:26;116905:50;116872:4;:84::i;116822:146::-;-1:-1:-1;;;;;117392:23:0;;116980:17;117392:23;;;:13;:23;;;;;;116980:17;;;;117384:45;;117417:11;117384:7;:45::i;:::-;117353:76;;-1:-1:-1;117353:76:0;-1:-1:-1;117455:18:0;117444:7;:29;;;;;;;;;117440:166;;117497:97;117508:16;117526:52;117585:7;117580:13;;;;;;;117497:97;117490:104;;;;;;;;117440:166;-1:-1:-1;;;;;117659:25:0;;;;;;:13;:25;;;;;;117651:47;;117686:11;117651:7;:47::i;:::-;117618:80;;-1:-1:-1;117618:80:0;-1:-1:-1;117724:18:0;117713:7;:29;;;;;;;;;117709:166;;117766:97;117777:16;117795:52;117854:7;117849:13;;;;;;;117709:166;-1:-1:-1;;;;;118078:23:0;;;;;;;:13;:23;;;;;;;;:43;;;118132:25;;;;;;;;;;:47;;;118234:43;;;;;;;118132:25;;-1:-1:-1;;;;;;;;;;;118234:43:0;;;;;;;;;;118330:11;;:86;;;-1:-1:-1;;;118330:86:0;;118362:4;118330:86;;;;-1:-1:-1;;;;;118330:86:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:11;;;;;;;;:23;;:86;;;;;-1:-1:-1;;118330:86:0;;;;;;;;-1:-1:-1;118330:11:0;:86;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;118441:14:0;;-1:-1:-1;118436:20:0;;-1:-1:-1;;118436:20:0;;118429:27;116325:2139;-1:-1:-1;;;;;;;;;116325:2139:0:o;98588:524::-;98662:4;131373:11;;;;131365:34;;;;;-1:-1:-1;;;131365:34:0;;;;;;;;;;;;-1:-1:-1;;;131365:34:0;;;;;;;;;;;;;;;131424:5;131410:19;;-1:-1:-1;;131410:19:0;;;98692:16:::1;:14;:16::i;:::-;98679:29:::0;-1:-1:-1;98723:29:0;;98719:249:::1;;98895:61;98906:5;98900:12;;;;;;;;98914:41;98895:4;:61::i;98719:249::-;99067:37;99079:10;99091:12;99067:11;:37::i;91343:527::-:0;91417:4;131373:11;;;;131365:34;;;;;-1:-1:-1;;;131365:34:0;;;;;;;;;;;;-1:-1:-1;;;131365:34:0;;;;;;;;;;;;;;;131424:5;131410:19;;-1:-1:-1;;131410:19:0;;;91447:16:::1;:14;:16::i;:::-;91434:29:::0;-1:-1:-1;91478:29:0;;91474:249:::1;;91650:61;91661:5;91655:12;;;;;;;91474:249;91822:40;91834:10;91846:12;91860:1;91822:11;:40::i;109713:986::-:0;109839:4;131373:11;;109839:4;;131373:11;;131365:34;;;;;-1:-1:-1;;;131365:34:0;;;;;;;;;;;;-1:-1:-1;;;131365:34:0;;;;;;;;;;;;;;;131424:5;131410:19;;-1:-1:-1;;131410:19:0;;;109875:16:::1;:14;:16::i;:::-;109862:29:::0;-1:-1:-1;109906:29:0;;109902:269:::1;;110084:71;110095:5;110089:12;;;;;;;;110103:51;110084:4;:71::i;:::-;110157:1;110076:83;;;;;;;109902:269;110191:16;-1:-1:-1::0;;;;;110191:31:0::1;;:33;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;::::0;::::1;;-1:-1:-1::0;110191:33:0;;-1:-1:-1;110239:29:0;;110235:273:::1;;110417:75;110428:5;110422:12;;;;;;;;110436:55;110417:4;:75::i;110235:273::-;110618:73;110639:10;110651:8;110661:11;110674:16;110618:20;:73::i;:::-;110611:80;;;;;131440:1;131452:11:::0;:18;;-1:-1:-1;;131452:18:0;131466:4;131452:18;;;109713:986;;;;-1:-1:-1;109713:986:0;-1:-1:-1;;109713:986:0:o;120482:810::-;120573:4;58315:12;:10;:12::i;:::-;58305:6;;-1:-1:-1;;;;;58305:6:0;;;:22;;;58297:67;;;;;-1:-1:-1;;;58297:67:0;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;58297:67:0;;;;;;;;;;;;;;;120685:16:::1;:14;:16::i;:::-;120663:18;;:38;120659:150;;120725:72;120730:22;120754:42;120725:4;:72::i;:::-;120718:79;;;;120659:150;16978:4;120881:24;:51;120877:157;;;120956:66;120961:15;120978:43;120956:4;:66::i;120877:157::-;121078:21;::::0;;121110:48;;;;121176:68:::1;::::0;;;;;::::1;::::0;::::1;::::0;;;;;::::1;::::0;;;;;;;;;::::1;121269:14;121264:20;::::0;105449:3737;105629:11;;:75;;;-1:-1:-1;;;105629:75:0;;105668:4;105629:75;;;;-1:-1:-1;;;;;105629:75:0;;;;;;;;;;;;;;;;;;;;;;105544:4;;;;;;105629:11;;;;;;:30;;:75;;;;;;;;;;;;;;;105544:4;105629:11;:75;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;105629:75:0;;-1:-1:-1;105719:12:0;;105715:153;;105756:96;105767:27;105796:46;105844:7;105756:10;:96::i;:::-;105854:1;105748:108;;;;;;;105715:153;105978:16;:14;:16::i;:::-;105956:18;;:38;105952:153;;106019:70;106024:22;106048:40;106019:4;:70::i;105952:153::-;106117:32;;:::i;:::-;-1:-1:-1;;;;;106263:24:0;;;;;;:14;:24;;;;;:38;;;106242:18;;;:59;106358:44;106278:8;106358:34;:44::i;:::-;106329:25;;;106314:88;;;106315:12;;;106314:88;;;;;;;;;;;;;;;;;;;-1:-1:-1;106433:18:0;;-1:-1:-1;106417:4:0;:12;;;:34;;;;;;;;;106413:189;;106476:110;106487:16;106505:60;106572:4;:12;;;106567:18;;;;;;;106476:110;106588:1;106468:122;;;;;;;;106413:189;106732:37;106760:8;106732:27;:37::i;:::-;106709:19;;;106694:75;;;106695:12;;;106694:75;;;;;;;;;;;;;;;;;;;-1:-1:-1;106800:18:0;;-1:-1:-1;106784:4:0;:12;;;:34;;;;;;;;;106780:192;;106843:113;106854:16;106872:63;106942:4;:12;;;106937:18;;;;;;;106780:192;-1:-1:-1;;107054:11:0;:24;107050:158;;;107114:19;;;;107095:16;;;:38;107050:158;;;107166:16;;;:30;;;107050:158;107806:37;107819:5;107826:4;:16;;;107806:12;:37::i;:::-;107781:22;;;:62;;;108153:19;;;;108145:52;;:7;:52::i;:::-;108119:22;;;108104:93;;;108105:12;;;108104:93;;;;;;;;;;;;;;;;;;;-1:-1:-1;108232:18:0;;-1:-1:-1;108216:4:0;:12;;;:34;;;;;;;;;108208:105;;;;-1:-1:-1;;;108208:105:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;108365:45;108373:12;;108387:4;:22;;;108365:7;:45::i;:::-;108341:20;;;108326:84;;;108327:12;;;108326:84;;;;;;;;;;;;;;;;;;;-1:-1:-1;108445:18:0;;-1:-1:-1;108429:4:0;:12;;;:34;;;;;;;;;108421:96;;;;-1:-1:-1;;;108421:96:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;108637:4;:22;;;108600:14;:24;108615:8;-1:-1:-1;;;;;108600:24:0;-1:-1:-1;;;;;108600:24:0;;;;;;;;;;;;:34;;:59;;;;108711:11;;108670:14;:24;108685:8;-1:-1:-1;;;;;108670:24:0;-1:-1:-1;;;;;108670:24:0;;;;;;;;;;;;:38;;:52;;;;108748:4;:20;;;108733:12;:35;;;;108829:125;108841:5;108848:8;108858:4;:22;;;108882:4;:22;;;108906:4;:20;;;108928:4;:25;;;108829:125;;;;-1:-1:-1;;;;;108829:125:0;;;;;;-1:-1:-1;;;;;108829:125:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;109007:11;;109069:22;;;;109093:18;;;;109007:105;;;-1:-1:-1;;;109007:105:0;;109045:4;109007:105;;;;-1:-1:-1;;;;;109007:105:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:11;;;;;;;;:29;;:105;;;;;-1:-1:-1;;109007:105:0;;;;;;;;-1:-1:-1;109007:11:0;:105;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;109138:14:0;;-1:-1:-1;109133:20:0;;-1:-1:-1;;109133:20:0;;109155:4;:22;;;109125:53;;;;;;105449:3737;;;;;;:::o;29421:271::-;29492:9;29503:4;29521:14;29537:8;29549:13;29557:1;29560;29549:7;:13::i;:::-;29520:42;;-1:-1:-1;29520:42:0;-1:-1:-1;29587:18:0;29579:4;:26;;;;;;;;;29575:75;;-1:-1:-1;29630:4:0;-1:-1:-1;29636:1:0;;-1:-1:-1;29622:16:0;;29575:75;29669:15;29677:3;29682:1;29669:7;:15::i;32133:515::-;32194:9;32205:10;;:::i;:::-;32229:14;32245:20;32269:22;32277:3;31686:4;32269:7;:22::i;:::-;32228:63;;-1:-1:-1;32228:63:0;-1:-1:-1;32314:18:0;32306:4;:26;;;;;;;;;32302:92;;-1:-1:-1;32363:18:0;;;;;;;;;-1:-1:-1;32363:18:0;;32357:4;;-1:-1:-1;32363:18:0;-1:-1:-1;32349:33:0;;32302:92;32407:14;32423:13;32440:31;32448:15;32465:5;32440:7;:31::i;:::-;32406:65;;-1:-1:-1;32406:65:0;-1:-1:-1;32494:18:0;32486:4;:26;;;;;;;;;32482:92;;32537:4;32543:18;;;;;;;;32558:1;32543:18;;;32529:33;;;;;;;;;;32482:92;32614:25;;;;;;;;;;;;-1:-1:-1;;32614:25:0;;-1:-1:-1;32133:515:0;-1:-1:-1;;;;;;32133:515:0:o;56401:69::-;54557:12;;;;;;;;:31;;;54573:15;:13;:15::i;:::-;54557:47;;;-1:-1:-1;54593:11:0;;;;54592:12;54557:47;54549:106;;;;-1:-1:-1;;;54549:106:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;54687:12;;;;;;;54686:13;54706:83;;;;54735:12;:19;;-1:-1:-1;;;;54735:19:0;;;;;54763:18;54750:4;54763:18;;;54811:14;54807:57;;;54836:12;:20;;-1:-1:-1;;54836:20:0;;;56401:69;:::o;57808:202::-;54557:12;;;;;;;;:31;;;54573:15;:13;:15::i;:::-;54557:47;;;-1:-1:-1;54593:11:0;;;;54592:12;54557:47;54549:106;;;;-1:-1:-1;;;54549:106:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;54687:12;;;;;;;54686:13;54706:83;;;;54735:12;:19;;-1:-1:-1;;;;54735:19:0;;;;;54763:18;54750:4;54763:18;;;54706:83;57880:17:::1;57900:12;:10;:12::i;:::-;57923:6;:18:::0;;-1:-1:-1;;;;;;57923:18:0::1;-1:-1:-1::0;;;;;57923:18:0;::::1;::::0;;::::1;::::0;;;57957:43:::1;::::0;57923:18;;-1:-1:-1;57923:18:0;-1:-1:-1;;57957:43:0::1;::::0;-1:-1:-1;;57957:43:0::1;54797:1;54811:14:::0;54807:57;;;54836:12;:20;;-1:-1:-1;;54836:20:0;;;57808:202;:::o;38653:213::-;38835:12;31686:4;38835:23;;;38653:213::o;122477:1631::-;122538:4;122544;122605:21;122637:20;122784:16;:14;:16::i;:::-;122762:18;;:38;122758:163;;122825:66;122830:22;122854:36;122825:4;:66::i;:::-;122817:92;-1:-1:-1;122893:15:0;-1:-1:-1;122817:92:0;;-1:-1:-1;122817:92:0;122758:163;123510:35;123523:10;123535:9;123510:12;:35::i;:::-;123492:53;;123593:15;123577:13;;:31;123558:50;;123683:13;;123663:16;:33;;123655:78;;;;;-1:-1:-1;;;123655:78:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;123810:13;:32;;;123931:60;;;123945:10;123931:60;;;;;;;;;;;;;;;;;;;;;;;;;124067:14;124054:46;-1:-1:-1;124084:15:0;-1:-1:-1;;122477:1631:0;;;:::o;149223:793::-;149352:10;;149374:26;;;-1:-1:-1;;;149374:26:0;;-1:-1:-1;;;;;149374:26:0;;;;;;;;;;;;;;;149352:10;;;;;;;149374:14;;:26;;;;;149308:23;;149374:26;;;;;;;;149308:23;149352:10;149374:26;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;149413:12;149467:16;149502:1;149497:122;;;;149638:2;149633:186;;;;149925:1;149922;149915:12;149497:122;-1:-1:-1;;149566:6:0;-1:-1:-1;149497:122:0;;149633:186;149710:2;149707:1;149704;149689:24;149748:1;149742:8;149731:19;;149460:482;;149971:7;149963:45;;;;;-1:-1:-1;;;149963:45:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;149223:793;;;;:::o;87504:3488::-;87591:4;;87660:15;87656:288;;87707:11;;:58;;;-1:-1:-1;;;87707:58:0;;87739:4;87707:58;;;;-1:-1:-1;;;;;87707:58:0;;;;;;;;;;;;;;;-1:-1:-1;;87707:11:0;;;;;;;:23;;:58;;;;;;;;;;;;;;;-1:-1:-1;87707:11:0;:58;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;87707:58:0;;-1:-1:-1;87784:12:0;;87780:153;;87825:88;87836:27;87865:38;87905:7;87825:10;:88::i;87780:153::-;87656:288;;88054:16;:14;:16::i;:::-;88032:18;;:38;88028:145;;88095:62;88100:22;88124:32;88095:4;:62::i;:::-;88159:1;88087:74;;;;;;88028:145;88185:25;;:::i;:::-;88227:15;88223:313;;88303:28;:26;:28::i;:::-;88274:25;;;88259:72;;;88260:12;;;88259:72;;;;;;;;;;;;;;;;;;;-1:-1:-1;88366:18:0;;-1:-1:-1;88350:4:0;:12;;;:34;;;;;;;;;88346:179;;88413:92;88424:16;88442:42;88491:4;:12;;;88486:18;;;;;;;88346:179;89168:32;89181:6;89189:10;89168:12;:32::i;:::-;89144:21;;;:56;89217:15;89213:523;;89479:90;89502:4;:21;;;89525:43;;;;;;;;89541:4;:25;;;89525:43;;;89479:22;:90::i;:::-;89460:15;;;89445:124;;;89446:12;;;89445:124;;;;;;;;;;;;;;;;;;;-1:-1:-1;89608:18:0;;-1:-1:-1;89592:4:0;:12;;;:34;;;;;;;;;89584:79;;;;;-1:-1:-1;;;89584:79:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;89213:523;;;89696:15;;;:28;;;89213:523;90041:37;90049:11;;90062:4;:15;;;90041:7;:37::i;:::-;90018:19;;;90003:75;;;90004:12;;;90003:75;;;;;;;;;;;;;;;;;;;-1:-1:-1;90113:18:0;;-1:-1:-1;90097:4:0;:12;;;:34;;;;;;;;;90089:87;;;;-1:-1:-1;;;90089:87:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;90237:21:0;;;;;;:13;:21;;;;;;90260:15;;;;90229:47;;90237:21;90229:7;:47::i;:::-;90204:21;;;90189:87;;;90190:12;;;90189:87;;;;;;;;;;;;;;;;;;;-1:-1:-1;90311:18:0;;-1:-1:-1;90295:4:0;:12;;;:34;;;;;;;;;90287:90;;;;-1:-1:-1;;;90287:90:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;90470:19;;;;;;90456:11;:33;90524:21;;;;;;-1:-1:-1;;;;;90500:21:0;;;;;;:13;:21;;;;;;;;;:45;;;;90634:21;;;;90657:15;;;;;90674:19;;90695:21;;90621:96;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;90765:15;;;;90733:48;;;;;;;-1:-1:-1;;;;;90733:48:0;;;90750:4;;-1:-1:-1;;;;;;;;;;;90733:48:0;;;;;;;;90834:11;;90880:21;;;;90903:15;;;;90834:85;;;-1:-1:-1;;;90834:85:0;;90865:4;90834:85;;;;-1:-1:-1;;;;;90834:85:0;;;;;;;;;;;;;;;;;;;;;;:11;;;;;;;;:22;;:85;;;;;-1:-1:-1;;90834:85:0;;;;;;;;-1:-1:-1;90834:11:0;:85;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;90945:14:0;;-1:-1:-1;90940:20:0;;-1:-1:-1;;90940:20:0;;90962:4;:21;;;90932:52;;;;;87504:3488;;;;;;:::o;93676:4644::-;93783:4;93808:19;;;:42;;-1:-1:-1;93831:19:0;;93808:42;93800:107;;;;-1:-1:-1;;;93800:107:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;93920:27;;:::i;:::-;94064:28;:26;:28::i;:::-;94035:25;;;94020:72;;;94021:12;;;94020:72;;;;;;;;;;;;;;;;;;;-1:-1:-1;94123:18:0;;-1:-1:-1;94107:4:0;:12;;;:34;;;;;;;;;94103:168;;94165:94;94176:16;94194:44;94245:4;:12;;;94240:18;;;;;;;94165:94;94158:101;;;;;94103:168;94325:18;;94321:1292;;94601:17;;;:34;;;94706:43;;;;;;;;94722:25;;;;94706:43;;94688:78;;94621:14;94688:17;:78::i;:::-;94667:17;;;94652:114;;;94653:12;;;94652:114;;;;;;;;;;;;;;;;;;;-1:-1:-1;94801:18:0;;-1:-1:-1;94785:4:0;:12;;;:34;;;;;;;;;94781:185;;94847:103;94858:16;94876:53;94936:4;:12;;;94931:18;;;;;;;94781:185;94321:1292;;;95268:83;95291:14;95307:43;;;;;;;;95323:4;:25;;;95307:43;;;95268:22;:83::i;:::-;95247:17;;;95232:119;;;95233:12;;;95232:119;;;;;;;;;;;;;;;;;;;-1:-1:-1;95386:18:0;;-1:-1:-1;95370:4:0;:12;;;:34;;;;;;;;;95366:185;;95432:103;95443:16;95461:53;95521:4;:12;;;95516:18;;;;;;;95366:185;95567:17;;;:34;;;94321:1292;95682:11;;95733:17;;;;95682:69;;;-1:-1:-1;;;95682:69:0;;95716:4;95682:69;;;;-1:-1:-1;;;;;95682:69:0;;;;;;;;;;;;;;;;-1:-1:-1;;95682:11:0;;;;;;;:25;;:69;;;;;;;;;;;;;;;-1:-1:-1;95682:11:0;:69;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;95682:69:0;;-1:-1:-1;95766:12:0;;95762:142;;95802:90;95813:27;95842:40;95884:7;95802:10;:90::i;:::-;95795:97;;;;;;95762:142;96014:16;:14;:16::i;:::-;95992:18;;:38;95988:142;;96054:64;96059:22;96083:34;96054:4;:64::i;95988:142::-;96425:39;96433:11;;96446:4;:17;;;96425:7;:39::i;:::-;96402:19;;;96387:77;;;96388:12;;;96387:77;;;;;;;;;;;;;;;;;;;-1:-1:-1;96495:18:0;;-1:-1:-1;96479:4:0;:12;;;:34;;;;;;;;;96475:178;;96537:104;96548:16;96566:54;96627:4;:12;;;96622:18;;;;;;;96475:178;-1:-1:-1;;;;;96713:23:0;;;;;;:13;:23;;;;;;96738:17;;;;96705:51;;96713:23;96705:7;:51::i;:::-;96680:21;;;96665:91;;;96666:12;;;96665:91;;;;;;;;;;;;;;;;;;;-1:-1:-1;96787:18:0;;-1:-1:-1;96771:4:0;:12;;;:34;;;;;;;;;96767:181;;96829:107;96840:16;96858:57;96922:4;:12;;;96917:18;;;;;;;96767:181;97046:4;:17;;;97029:14;:12;:14::i;:::-;:34;97025:155;;;97087:81;97092:29;97123:44;97087:4;:81::i;97025:155::-;97676:42;97690:8;97700:4;:17;;;97676:13;:42::i;:::-;97811:19;;;;97797:11;:33;97867:21;;;;-1:-1:-1;;;;;97841:23:0;;;;;;:13;:23;;;;;;;;;:47;;;;98000:17;;;;97966:52;;;;;;;97993:4;;-1:-1:-1;;;;;;;;;;;97966:52:0;;;;;;;98034:98;98041:8;98051:4;:17;;;98070:4;:17;;;98089:4;:19;;;98110:4;:21;;;98034:98;;;;-1:-1:-1;;;;;98034:98:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;98185:11;;98235:17;;;;98254;;;;98185:87;;;-1:-1:-1;;;98185:87:0;;98218:4;98185:87;;;;-1:-1:-1;;;;;98185:87:0;;;;;;;;;;;;;;;;;;;;;;:11;;;;;;;;:24;;:87;;;;;-1:-1:-1;;98185:87:0;;;;;;;;-1:-1:-1;98185:11:0;:87;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;98297:14:0;;-1:-1:-1;98292:20:0;;-1:-1:-1;;98292:20:0;;98285:27;93676:4644;-1:-1:-1;;;;;;93676:4644:0:o;27985:343::-;28041:9;;28073:6;28069:69;;-1:-1:-1;28104:18:0;;-1:-1:-1;28104:18:0;28096:30;;28069:69;28159:5;;;28163:1;28159;:5;:1;28181:5;;;;;:10;28177:144;;28216:26;28244:1;28208:38;;;;;;;28177:144;28287:18;;-1:-1:-1;28307:1:0;-1:-1:-1;28279:30:0;;28423:215;28479:9;;28511:6;28507:77;;-1:-1:-1;28542:26:0;;-1:-1:-1;28570:1:0;28534:38;;28507:77;28604:18;28628:1;28624;:5;;;;;;28596:34;;;;28423:215;;;;;:::o;99606:3350::-;99764:11;;:64;;;-1:-1:-1;;;99764:64:0;;99798:4;99764:64;;;;-1:-1:-1;;;;;99764:64:0;;;;;;;;;;;;;;;99690:4;;;;99764:11;;;;;;:25;;:64;;;;;;;;;;;;;;99690:4;99764:11;:64;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;99764:64:0;;-1:-1:-1;99843:12:0;;99839:142;;99879:90;99890:27;99919:40;99961:7;99879:10;:90::i;:::-;99872:97;;;;;99839:142;100091:16;:14;:16::i;:::-;100069:18;;:38;100065:142;;100131:64;100136:22;100160:34;100131:4;:64::i;100065:142::-;100316:12;100299:14;:12;:14::i;:::-;:29;100295:143;;;100352:74;100357:29;100388:37;100352:4;:74::i;100295:143::-;100450:27;;:::i;:::-;100771:44;100806:8;100771:34;:44::i;:::-;100742:25;;;100727:88;;;100728:4;100727:88;;;;;;;;;;;;;;;;;;;-1:-1:-1;100846:18:0;;-1:-1:-1;100830:12:0;;:34;;;;;;;;;100826:178;;100888:104;100899:16;100917:54;100978:4;:12;;;100973:18;;;;;;;100888:104;100881:111;;;;;;100826:178;101054:37;101082:8;101054:27;:37::i;:::-;101031:19;;;101016:75;;;101017:4;101016:75;;;;;;;;;;;;;;;;;;;-1:-1:-1;101122:18:0;;-1:-1:-1;101106:12:0;;:34;;;;;;;;;101102:181;;101164:107;101175:16;101193:57;101257:4;:12;;;101252:18;;;;;;;101102:181;101336:42;101344:4;:19;;;101365:12;101336:7;:42::i;:::-;101310:22;;;101295:83;;;101296:4;101295:83;;;;;;;;;;;;;;;;;;;-1:-1:-1;101409:18:0;;-1:-1:-1;101393:12:0;;:34;;;;;;;;;101389:188;;101451:114;101462:16;101480:64;101551:4;:12;;;101546:18;;;;;;;101389:188;101628:35;101636:12;;101650;101628:7;:35::i;:::-;101604:20;;;101589:74;;;101590:4;101589:74;;;;;;;;;;;;;;;;;;;-1:-1:-1;101694:18:0;;-1:-1:-1;101678:12:0;;:34;;;;;;;;;101674:179;;101736:105;101747:16;101765:55;101827:4;:12;;;101822:18;;;;;;;101674:179;102345:37;102359:8;102369:12;102345:13;:37::i;:::-;102502:22;;;;;;-1:-1:-1;;;;;102465:24:0;;;;;;:14;:24;;;;;;;;:59;;;102576:11;;102535:38;;;;:52;;;;102613:20;;;;;102598:12;:35;;;102720:22;;102766:25;;;;;102689:103;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;102845:11;;:63;;;-1:-1:-1;;;102845:63:0;;102878:4;102845:63;;;;-1:-1:-1;;;;;102845:63:0;;;;;;;;;;;;;;;:11;;;;;;;;:24;;:63;;;;;-1:-1:-1;;102845:63:0;;;;;;;;-1:-1:-1;102845:11:0;:63;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;102933:14:0;;-1:-1:-1;102928:20:0;;-1:-1:-1;;102928:20:0;;102921:27;99606:3350;-1:-1:-1;;;;;99606:3350:0:o;111311:3575::-;111524:11;;:111;;;-1:-1:-1;;;111524:111:0;;111567:4;111524:111;;;;-1:-1:-1;;;;;111524:111:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;111441:4;;;;;;111524:11;;;;;;:34;;:111;;;;;;;;;;;;;;;111441:4;111524:11;:111;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;111524:111:0;;-1:-1:-1;111650:12:0;;111646:150;;111687:93;111698:27;111727:43;111772:7;111687:10;:93::i;:::-;111782:1;111679:105;;;;;;;111646:150;111906:16;:14;:16::i;:::-;111884:18;;:38;111880:150;;111947:67;111952:22;111976:37;111947:4;:67::i;111880:150::-;112176:16;:14;:16::i;:::-;112135;-1:-1:-1;;;;;112135:35:0;;:37;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;112135:37:0;:57;112131:180;;112217:78;112222:22;112246:48;112217:4;:78::i;112131:180::-;112384:10;-1:-1:-1;;;;;112372:22:0;:8;-1:-1:-1;;;;;112372:22:0;;112368:145;;;112419:78;112424:26;112452:44;112419:4;:78::i;112368:145::-;112568:16;112564:147;;112609:86;112614:36;112652:42;112609:4;:86::i;112564:147::-;-1:-1:-1;;112767:11:0;:24;112763:159;;;112816:90;112821:36;112859:46;112816:4;:90::i;112763:159::-;112978:21;113001:22;113027:51;113044:10;113056:8;113066:11;113027:16;:51::i;:::-;112977:101;;-1:-1:-1;112977:101:0;-1:-1:-1;113093:40:0;;113089:163;;113158:78;113169:16;113163:23;;;;;;;;113188:47;113158:4;:78::i;:::-;113238:1;113150:90;;;;;;;;;113089:163;113509:11;;:102;;;-1:-1:-1;;;113509:102:0;;113559:4;113509:102;;;;-1:-1:-1;;;;;113509:102:0;;;;;;;;;;;;;;;-1:-1:-1;;;;113509:11:0;;;;;;;;:41;;:102;;;;;;;;;;;;:11;:102;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;113509:102:0;;;;;;;;;-1:-1:-1;113509:102:0;-1:-1:-1;113630:40:0;;113622:104;;;;-1:-1:-1;;;113622:104:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;113860:11;113820:16;-1:-1:-1;;;;;113820:26:0;;113847:8;113820:36;;;;;;;;;;;;;-1:-1:-1;;;;;113820:36:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;113820:36:0;:51;;113812:88;;;;;-1:-1:-1;;;113812:88:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;114029:15;-1:-1:-1;;;;;114059:42:0;;114096:4;114059:42;114055:254;;;114131:63;114153:4;114160:10;114172:8;114182:11;114131:13;:63::i;:::-;114118:76;;114055:254;;;114240:16;-1:-1:-1;;;;;114240:22:0;;114263:10;114275:8;114285:11;114240:57;;;;;;;;;;;;;-1:-1:-1;;;;;114240:57:0;;;;;;-1:-1:-1;;;;;114240:57:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;114240:57:0;;-1:-1:-1;114055:254:0;114415:34;;114407:67;;;;;-1:-1:-1;;;114407:67:0;;;;;;;;;;;;-1:-1:-1;;;114407:67:0;;;;;;;;;;;;;;;114539:96;;;-1:-1:-1;;;;;114539:96:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;114688:11;;:129;;;-1:-1:-1;;;114688:129:0;;114730:4;114688:129;;;;-1:-1:-1;;;;;114688:129:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:11;;;;;;;;:33;;:129;;;;;-1:-1:-1;;114688:129:0;;;;;;;;-1:-1:-1;114688:11:0;:129;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;114843:14:0;;-1:-1:-1;114838:20:0;;-1:-1:-1;;114838:20:0;;114830:48;-1:-1:-1;114860:17:0;;-1:-1:-1;;;;;;111311:3575:0;;;;;;;;:::o;73868:1204::-;-1:-1:-1;;;;;74205:23:0;;73952:9;74205:23;;;:14;:23;;;;;74245:24;;73952:9;;;;;;;;;;74205:23;74241:92;;74299:18;74319:1;74291:30;;;;;;;;;;;74241:92;74375:46;74383:14;:24;;;74409:11;;74375:7;:46::i;:::-;74343:78;;-1:-1:-1;74343:78:0;-1:-1:-1;74447:18:0;74436:7;:29;;;;;;;;;74432:81;;74490:7;74499:1;74482:19;;;;;;;;;;;74432:81;74529:28;;;;74525:96;;74587:18;74607:1;74579:30;;;;;;;;;;;74525:96;74664:57;74672:18;74692:14;:28;;;74664:7;:57::i;:::-;74631:90;;-1:-1:-1;74631:90:0;-1:-1:-1;74747:18:0;74736:7;:29;;;;;;;;;74732:81;;74790:7;74799:1;74782:19;;;;;;;;;;;74732:81;74858:54;74866:19;74887:14;:24;;;74858:7;:54::i;:::-;74825:87;;-1:-1:-1;74825:87:0;-1:-1:-1;74938:18:0;74927:7;:29;;;;;;;;;74923:81;;74981:7;74990:1;74973:19;;;;;;;;;;;74923:81;-1:-1:-1;75024:18:0;;-1:-1:-1;75044:19:0;-1:-1:-1;;;;73868:1204:0;;;:::o;147298:1221::-;147435:10;;147478:43;;;-1:-1:-1;;;147478:43:0;;147515:4;147478:43;;;;;;147374:4;;-1:-1:-1;;;;;147435:10:0;;147374:4;;147435:10;;147478:28;;:43;;;;;;;;;;;;;;147435:10;147478:43;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;147478:43:0;147532:47;;;-1:-1:-1;;;147532:47:0;;-1:-1:-1;;;;;147532:47:0;;;;;;;147565:4;147532:47;;;;;;;;;;;;147478:43;;-1:-1:-1;147532:18:0;;;;;;:47;;;;;-1:-1:-1;;147532:47:0;;;;;;;;-1:-1:-1;147532:18:0;:47;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;147592:12;147646:16;147681:1;147676:122;;;;147817:2;147812:186;;;;148104:1;148101;148094:12;147676:122;-1:-1:-1;;147745:6:0;-1:-1:-1;147676:122:0;;147812:186;147889:2;147886:1;147883;147868:24;147927:1;147921:8;147910:19;;147639:482;;148150:7;148142:44;;;;;-1:-1:-1;;;148142:44:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;148291:10;;148284:43;;;-1:-1:-1;;;148284:43:0;;148321:4;148284:43;;;;;;148264:17;;-1:-1:-1;;;;;148291:10:0;;148284:28;;:43;;;;;;;;;;;;;;148291:10;148284:43;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;148284:43:0;;-1:-1:-1;148346:29:0;;;;148338:68;;;;;-1:-1:-1;;;148338:68:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;148424:28;;;;;147298:1221;-1:-1:-1;;;;;147298:1221:0:o;35888:337::-;35976:9;35987:4;36005:13;36020:19;;:::i;:::-;36043:31;36058:6;36066:7;35237:9;35248:10;;:::i;:::-;35555:14;35571;35589:25;31686:4;35607:6;35589:7;:25::i;:::-;35554:60;;-1:-1:-1;35554:60:0;-1:-1:-1;35637:18:0;35629:4;:26;;;;;;;;;35625:92;;-1:-1:-1;35686:18:0;;;;;;;;;-1:-1:-1;35686:18:0;;35680:4;;-1:-1:-1;35686:18:0;-1:-1:-1;35672:33:0;;35625:92;35734:35;35741:9;35752:7;:16;;;35734:6;:35::i;-1:-1:-1:-;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;
Swarm Source
ipfs://28e6ac7f3d654ab13632afc622036def986e2e5c4c6a2768c714490859475ce1
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.