Contract Overview
Balance:
0 CRO
CRO Value:
$0.00
My Name Tag:
Not Available, login to update
Txn Hash | Method |
Block
|
From
|
To
|
Value | [Txn Fee] | |||
---|---|---|---|---|---|---|---|---|---|
0x810ff299121e9d3df75caa6ae92bf12772a3e65863f5bec8e6db8281338efa80 | 0x60806040 | 570290 | 413 days 9 hrs ago | Tectonic: Deployer | IN | Create: TErc20Delegate | 0 CRO | 23.73923 |
[ Download CSV Export ]
Contract Name:
TErc20Delegate
Compiler Version
v0.5.16+commit.9c3226ce
Contract Source Code (Solidity)
/** *Submitted for verification at cronoscan.com on 2022-01-17 */ // Sources flattened with hardhat v2.6.4 https://hardhat.org // File contracts/TectonicCoreInterface.sol pragma solidity ^0.5.16; contract TectonicCoreInterface { /// @notice Indicator that this is a TectonicCore contract (for inspection) bool public constant isTectonicCore = true; /*** Assets You Are In ***/ function enterMarkets(address[] calldata tTokens) external returns (uint[] memory); function exitMarket(address tToken) external returns (uint); /*** Policy Hooks ***/ function mintAllowed(address tToken, address minter, uint mintAmount) external returns (uint); function mintVerify(address tToken, address minter, uint mintAmount, uint mintTokens) external; function redeemAllowed(address tToken, address redeemer, uint redeemTokens) external returns (uint); function redeemVerify(address tToken, address redeemer, uint redeemAmount, uint redeemTokens) external; function borrowAllowed(address tToken, address borrower, uint borrowAmount) external returns (uint); function borrowVerify(address tToken, address borrower, uint borrowAmount) external; function repayBorrowAllowed( address tToken, address payer, address borrower, uint repayAmount) external returns (uint); function repayBorrowVerify( address tToken, address payer, address borrower, uint repayAmount, uint borrowerIndex) external; function liquidateBorrowAllowed( address tTokenBorrowed, address tTokenCollateral, address liquidator, address borrower, uint repayAmount) external returns (uint); function liquidateBorrowVerify( address tTokenBorrowed, address tTokenCollateral, address liquidator, address borrower, uint repayAmount, uint seizeTokens) external; function seizeAllowed( address tTokenCollateral, address tTokenBorrowed, address liquidator, address borrower, uint seizeTokens) external returns (uint); function seizeVerify( address tTokenCollateral, address tTokenBorrowed, address liquidator, address borrower, uint seizeTokens) external; function transferAllowed(address tToken, address src, address dst, uint transferTokens) external returns (uint); function transferVerify(address tToken, address src, address dst, uint transferTokens) external; /*** Liquidity/Liquidation Calculations ***/ function liquidateCalculateSeizeTokens( address tTokenBorrowed, address tTokenCollateral, uint repayAmount) external view returns (uint, uint); } // File contracts/Interfaces/EIP20NonStandardInterface.sol pragma solidity ^0.5.16; /** * @title EIP20NonStandardInterface * @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 EIP20NonStandardInterface { /** * @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 The 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 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 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); } // File contracts/InterestModels/InterestRateModel.sol pragma solidity ^0.5.16; /** * @title Tectonic's InterestRateModel Interface * @author Tectonic */ contract InterestRateModel { /// @notice Indicator that this is an InterestRateModel contract (for inspection) bool public constant isInterestRateModel = true; /** * @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); } // File contracts/TTokenInterfaces.sol pragma solidity ^0.5.16; contract TTokenStorage { /** * @dev Guard variable for re-entrancy checks */ bool internal _notEntered; /** * @notice EIP-20 token name for this token */ string public name; /** * @notice EIP-20 token symbol for this token */ string public symbol; /** * @notice EIP-20 token decimals for this token */ uint8 public decimals; /** * @notice Maximum borrow rate that can ever be applied (.0005% / block) */ uint internal constant borrowRateMaxMantissa = 0.0005e16; /** * @notice Maximum fraction of interest that can be set aside for reserves */ uint internal constant reserveFactorMaxMantissa = 1e18; /** * @notice Administrator for this contract */ address payable public admin; /** * @notice Pending administrator for this contract */ address payable public pendingAdmin; /** * @notice Contract which oversees inter-tToken operations */ TectonicCoreInterface public tectonicCore; /** * @notice Model which tells what the current interest rate should be */ InterestRateModel public interestRateModel; /** * @notice Initial exchange rate used when minting the first TTokens (used when totalSupply = 0) */ uint internal initialExchangeRateMantissa; /** * @notice Fraction of interest currently set aside for reserves */ uint public reserveFactorMantissa; /** * @notice Block number that interest was last accrued at */ uint public accrualBlockNumber; /** * @notice Accumulator of the total earned interest rate since the opening of the market */ uint public borrowIndex; /** * @notice Total amount of outstanding borrows of the underlying in this market */ uint public totalBorrows; /** * @notice Total amount of reserves of the underlying held in this market */ uint public totalReserves; /** * @notice Total number of tokens in circulation */ uint public totalSupply; /** * @notice Official record of token balances for each account */ mapping (address => uint) internal accountTokens; /** * @notice Approved token transfer amounts on behalf of others */ mapping (address => mapping (address => uint)) 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 { uint principal; uint interestIndex; } /** * @notice Mapping of account addresses to outstanding borrow balances */ mapping(address => BorrowSnapshot) internal accountBorrows; /** * @notice Share of seized collateral that is added to reserves */ uint public constant protocolSeizeShareMantissa = 2.8e16; //2.8% } contract TTokenInterface is TTokenStorage { /** * @notice Indicator that this is a TToken contract (for inspection) */ bool public constant isTToken = true; /*** Market Events ***/ /** * @notice Event emitted when interest is accrued */ event AccrueInterest(uint cashPrior, uint interestAccumulated, uint borrowIndex, uint totalBorrows); /** * @notice Event emitted when tokens are minted */ event Mint(address minter, uint mintAmount, uint mintTokens); /** * @notice Event emitted when tokens are redeemed */ event Redeem(address redeemer, uint redeemAmount, uint redeemTokens); /** * @notice Event emitted when underlying is borrowed */ event Borrow(address borrower, uint borrowAmount, uint accountBorrows, uint totalBorrows); /** * @notice Event emitted when a borrow is repaid */ event RepayBorrow(address payer, address borrower, uint repayAmount, uint accountBorrows, uint totalBorrows); /** * @notice Event emitted when a borrow is liquidated */ event LiquidateBorrow(address liquidator, address borrower, uint repayAmount, address tTokenCollateral, uint seizeTokens); /*** Admin Events ***/ /** * @notice Event emitted when pendingAdmin is changed */ event NewPendingAdmin(address oldPendingAdmin, address newPendingAdmin); /** * @notice Event emitted when pendingAdmin is accepted, which means admin is updated */ event NewAdmin(address oldAdmin, address newAdmin); /** * @notice Event emitted when tectonicCore is changed */ event NewTectonicCore(TectonicCoreInterface oldTectonicCore, TectonicCoreInterface newTectonicCore); /** * @notice Event emitted when interestRateModel is changed */ event NewMarketInterestRateModel(InterestRateModel oldInterestRateModel, InterestRateModel newInterestRateModel); /** * @notice Event emitted when the reserve factor is changed */ event NewReserveFactor(uint oldReserveFactorMantissa, uint newReserveFactorMantissa); /** * @notice Event emitted when the reserves are added */ event ReservesAdded(address benefactor, uint addAmount, uint newTotalReserves); /** * @notice Event emitted when the reserves are reduced */ event ReservesReduced(address admin, uint reduceAmount, uint newTotalReserves); /** * @notice EIP20 Transfer event */ event Transfer(address indexed from, address indexed to, uint amount); /** * @notice EIP20 Approval event */ event Approval(address indexed owner, address indexed spender, uint amount); /** * @notice Failure event */ event Failure(uint error, uint info, uint detail); /*** User Interface ***/ function transfer(address dst, uint amount) external returns (bool); function transferFrom(address src, address dst, uint amount) external returns (bool); function approve(address spender, uint amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint); function balanceOf(address owner) external view returns (uint); function balanceOfUnderlying(address owner) external returns (uint); function getAccountSnapshot(address account) external view returns (uint, uint, uint, uint); function borrowRatePerBlock() external view returns (uint); function supplyRatePerBlock() external view returns (uint); function totalBorrowsCurrent() external returns (uint); function borrowBalanceCurrent(address account) external returns (uint); function borrowBalanceStored(address account) public view returns (uint); function exchangeRateCurrent() public returns (uint); function exchangeRateStored() public view returns (uint); function getCash() external view returns (uint); function accrueInterest() public returns (uint); function seize(address liquidator, address borrower, uint seizeTokens) external returns (uint); /*** Admin Functions ***/ function _setPendingAdmin(address payable newPendingAdmin) external returns (uint); function _acceptAdmin() external returns (uint); function _setTectonicCore(TectonicCoreInterface newTectonicCore) public returns (uint); function _setReserveFactor(uint newReserveFactorMantissa) external returns (uint); function _reduceReserves(uint reduceAmount) external returns (uint); function _setInterestRateModel(InterestRateModel newInterestRateModel) public returns (uint); } contract TErc20Storage { /** * @notice Underlying asset for this TToken */ address public underlying; } contract TErc20Interface is TErc20Storage { /*** User Interface ***/ function mint(uint mintAmount) external returns (uint); function redeem(uint redeemTokens) external returns (uint); function redeemUnderlying(uint redeemAmount) external returns (uint); function borrow(uint borrowAmount) external returns (uint); function repayBorrow(uint repayAmount) external returns (uint); function repayBorrowBehalf(address borrower, uint repayAmount) external returns (uint); function liquidateBorrow(address borrower, uint repayAmount, TTokenInterface tTokenCollateral) external returns (uint); function sweepToken(EIP20NonStandardInterface token) external; /*** Admin Functions ***/ function _addReserves(uint addAmount) external returns (uint); } contract CDelegationStorage { /** * @notice Implementation address for this contract */ address public implementation; } contract CDelegatorInterface is CDelegationStorage { /** * @notice Emitted when implementation is changed */ event NewImplementation(address oldImplementation, address newImplementation); /** * @notice Called by the admin to update the implementation of the delegator * @param implementation_ The address of the new implementation for delegation * @param allowResign Flag to indicate whether to call _resignImplementation on the old implementation * @param becomeImplementationData The encoded bytes data to be passed to _becomeImplementation */ function _setImplementation(address implementation_, bool allowResign, bytes memory becomeImplementationData) public; } contract CDelegateInterface is CDelegationStorage { /** * @notice Called by the delegator on a delegate to initialize it for duty * @dev Should revert if any issues arise which make it unfit for delegation * @param data The encoded bytes data for any initialization */ function _becomeImplementation(bytes memory data) public; /** * @notice Called by the delegator on a delegate to forfeit its responsibility */ function _resignImplementation() public; } // File contracts/ErrorReporter.sol pragma solidity ^0.5.16; contract TectonicCoreErrorReporter { enum Error { NO_ERROR, UNAUTHORIZED, TECTONIC_CORE_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, WHITELIST_REJECTED, TVL_PROTECT_EXCEEDED } 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, TECTONIC_CORE_REJECTION, TECTONIC_CORE_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_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_TECTONIC_CORE_REJECTION, LIQUIDATE_ACCRUE_BORROW_INTEREST_FAILED, LIQUIDATE_ACCRUE_COLLATERAL_INTEREST_FAILED, LIQUIDATE_COLLATERAL_FRESHNESS_CHECK, LIQUIDATE_TECTONIC_CORE_REJECTION, LIQUIDATE_TECTONIC_CORE_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_TECTONIC_CORE_REJECTION, LIQUIDATE_SEIZE_LIQUIDATOR_IS_BORROWER, LIQUIDATE_SEIZE_TOO_MUCH, MINT_ACCRUE_INTEREST_FAILED, MINT_TECTONIC_CORE_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_TECTONIC_CORE_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_ACCUMULATED_BALANCE_CALCULATION_FAILED, REPAY_BORROW_TECTONIC_CORE_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_TECTONIC_CORE_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_TECTONIC_CORE_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); } } // File contracts/CarefulMath.sol pragma solidity ^0.5.16; /** * @title Careful Math * @author Tectonic * @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); } } // File contracts/ExponentialNoError.sol pragma solidity ^0.5.16; /** * @title Exponential module for storing fixed-precision decimals * @author Tectonic * @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 ExponentialNoError { 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 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 Multiply an Exp by a scalar, then truncate to return an unsigned integer. */ function mul_ScalarTruncate(Exp memory a, uint scalar) pure internal returns (uint) { Exp memory product = mul_(a, scalar); return truncate(product); } /** * @dev Multiply an Exp by a scalar, truncate, then add an to an unsigned integer, returning an unsigned integer. */ function mul_ScalarTruncateAddUInt(Exp memory a, uint scalar, uint addend) pure internal returns (uint) { Exp memory product = mul_(a, scalar); return add_(truncate(product), addend); } /** * @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)}); } } // File contracts/Exponential.sol pragma solidity ^0.5.16; /** * @title Exponential module for storing fixed-precision decimals * @author Tectonic * @dev Legacy contract for compatibility reasons with existing contracts that still use MathError * @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, ExponentialNoError { /** * @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); } } // File contracts/Interfaces/EIP20Interface.sol pragma solidity ^0.5.16; /** * @title ERC 20 Token Standard Interface * https://eips.ethereum.org/EIPS/eip-20 */ interface EIP20Interface { 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 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 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 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 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 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); } // File contracts/TToken.sol pragma solidity ^0.5.16; /** * @title Tectonic's TToken Contract * @notice Abstract base for TTokens * @author Tectonic */ contract TToken is TTokenInterface, Exponential, TokenErrorReporter { /** * @notice Initialize the money market * @param tcore_ The address of the TectonicCore * @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 initialize(TectonicCoreInterface tcore_, InterestRateModel interestRateModel_, uint initialExchangeRateMantissa_, string memory name_, string memory symbol_, uint8 decimals_) public { require(msg.sender == admin, "only admin may initialize the market"); 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 tectonicCore uint err = _setTectonicCore(tcore_); require(err == uint(Error.NO_ERROR), "setting tectonicCore failed"); // Initialize block number and borrow index (block number mocks depend on tectonicCore 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 = tectonicCore.transferAllowed(address(this), src, dst, tokens); if (allowed != 0) { return failOpaque(Error.TECTONIC_CORE_REJECTION, FailureInfo.TRANSFER_TECTONIC_CORE_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 srtTokensNew; uint dstTokensNew; (mathErr, allowanceNew) = subUInt(startingAllowance, tokens); if (mathErr != MathError.NO_ERROR) { return fail(Error.MATH_ERROR, FailureInfo.TRANSFER_NOT_ALLOWED); } (mathErr, srtTokensNew) = 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] = srtTokensNew; 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); // unused function // tectonicCore.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 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 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 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 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 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 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 tectonicCore 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 view returns (uint, uint, uint, uint) { uint tTokenBalance = 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), tTokenBalance, 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 tToken * @return The borrow interest rate per block, scaled by 1e18 */ function borrowRatePerBlock() external view returns (uint) { return interestRateModel.getBorrowRate(getCashPrior(), totalBorrows, totalReserves); } /** * @notice Returns the current per-block supply interest rate for this tToken * @return The supply interest rate per block, scaled by 1e18 */ function supplyRatePerBlock() external 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 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 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 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 Accrue interest then return the up-to-date exchange rate * @return Calculated exchange rate scaled by 1e18 */ function exchangeRateCurrent() public nonReentrant returns (uint) { require(accrueInterest() == uint(Error.NO_ERROR), "accrue interest failed"); return exchangeRateStored(); } /** * @notice Calculates the exchange rate from the underlying to the TToken * @dev This function does not accrue interest before calculating the exchange rate * @return Calculated exchange rate scaled by 1e18 */ function exchangeRateStored() public 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 TToken * @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 tToken in the underlying asset * @return The quantity of underlying asset owned by this contract */ function getCash() external view returns (uint) { return getCashPrior(); } /** * @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 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)); } (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); return uint(Error.NO_ERROR); } /** * @notice Sender supplies assets into the market and receives tTokens 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); } 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 tTokens 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) internal returns (uint, uint) { /* Fail if mint not allowed */ uint allowed = tectonicCore.mintAllowed(address(this), minter, mintAmount); if (allowed != 0) { return (failOpaque(Error.TECTONIC_CORE_REJECTION, FailureInfo.MINT_TECTONIC_CORE_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; (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 tToken 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 tToken holds an additional `actualMintAmount` * of cash. */ vars.actualMintAmount = doTransferIn(minter, mintAmount); /* * We get the current exchange rate and calculate the number of tTokens 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"); /* * We calculate the new total supply of tTokens 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); emit Transfer(address(this), minter, vars.mintTokens); /* We call the defense hook */ // unused function // tectonicCore.mintVerify(address(this), minter, vars.actualMintAmount, vars.mintTokens); return (uint(Error.NO_ERROR), vars.actualMintAmount); } /** * @notice Sender redeems tTokens in exchange for the underlying asset * @dev Accrues interest whether or not the operation succeeds, unless reverted * @param redeemTokens The number of tTokens 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 tTokens 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 tTokens * @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 tTokens 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 tTokens 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 tTokens (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 = tectonicCore.redeemAllowed(address(this), redeemer, vars.redeemTokens); if (allowed != 0) { return failOpaque(Error.TECTONIC_CORE_REJECTION, FailureInfo.REDEEM_TECTONIC_CORE_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 tToken must handle variations between ERC-20 and ETH underlying. * On success, the tToken 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); /* We call the defense hook */ tectonicCore.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; } /** * @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 = tectonicCore.borrowAllowed(address(this), borrower, borrowAmount); if (allowed != 0) { return failOpaque(Error.TECTONIC_CORE_REJECTION, FailureInfo.BORROW_TECTONIC_CORE_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.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 tToken must handle variations between ERC-20 and ETH underlying. * On success, the tToken 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); /* We call the defense hook */ // unused function // tectonicCore.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; } /** * @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 = tectonicCore.repayBorrowAllowed(address(this), payer, borrower, repayAmount); if (allowed != 0) { return (failOpaque(Error.TECTONIC_CORE_REJECTION, FailureInfo.REPAY_BORROW_TECTONIC_CORE_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; /* 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 tToken must handle variations between ERC-20 and ETH underlying. * On success, the tToken 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); /* We call the defense hook */ // unused function // tectonicCore.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 tToken to be liquidated * @param tTokenCollateral 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, TTokenInterface tTokenCollateral) 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 = tTokenCollateral.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, tTokenCollateral); } /** * @notice The liquidator liquidates the borrowers collateral. * The collateral seized is transferred to the liquidator. * @param borrower The borrower of this tToken to be liquidated * @param liquidator The address repaying the borrow and seizing collateral * @param tTokenCollateral 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, TTokenInterface tTokenCollateral) internal returns (uint, uint) { /* Fail if liquidate not allowed */ uint allowed = tectonicCore.liquidateBorrowAllowed(address(this), address(tTokenCollateral), liquidator, borrower, repayAmount); if (allowed != 0) { return (failOpaque(Error.TECTONIC_CORE_REJECTION, FailureInfo.LIQUIDATE_TECTONIC_CORE_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 tTokenCollateral market's block number equals current block number */ if (tTokenCollateral.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) = tectonicCore.liquidateCalculateSeizeTokens(address(this), address(tTokenCollateral), actualRepayAmount); require(amountSeizeError == uint(Error.NO_ERROR), "LIQUIDATE_TECTONIC_CORE_CALCULATE_AMOUNT_SEIZE_FAILED"); /* Revert if borrower collateral token balance < seizeTokens */ require(tTokenCollateral.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(tTokenCollateral) == address(this)) { seizeError = seizeInternal(address(this), liquidator, borrower, seizeTokens); } else { seizeError = tTokenCollateral.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(tTokenCollateral), seizeTokens); /* We call the defense hook */ // unused function // tectonicCore.liquidateBorrowVerify(address(this), address(tTokenCollateral), 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 tToken during the process of liquidation. * Its absolutely critical to use msg.sender as the borrowed tToken and not a parameter. * @param liquidator The account receiving seized collateral * @param borrower The account having collateral seized * @param seizeTokens The number of tTokens to seize * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details) */ function seize(address liquidator, address borrower, uint seizeTokens) external nonReentrant returns (uint) { return seizeInternal(msg.sender, liquidator, borrower, seizeTokens); } struct SeizeInternalLocalVars { MathError mathErr; uint borrowerTokensNew; uint liquidatorTokensNew; uint liquidatorSeizeTokens; uint protocolSeizeTokens; uint protocolSeizeAmount; uint exchangeRateMantissa; uint totalReservesNew; uint totalSupplyNew; } /** * @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 TToken. * Its absolutely critical to use msg.sender as the seizer tToken and not a parameter. * @param seizerToken The contract seizing the collateral (i.e. borrowed tToken) * @param liquidator The account receiving seized collateral * @param borrower The account having collateral seized * @param seizeTokens The number of tTokens 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 = tectonicCore.seizeAllowed(address(this), seizerToken, liquidator, borrower, seizeTokens); if (allowed != 0) { return failOpaque(Error.TECTONIC_CORE_REJECTION, FailureInfo.LIQUIDATE_SEIZE_TECTONIC_CORE_REJECTION, allowed); } /* Fail if borrower = liquidator */ if (borrower == liquidator) { return fail(Error.INVALID_ACCOUNT_PAIR, FailureInfo.LIQUIDATE_SEIZE_LIQUIDATOR_IS_BORROWER); } SeizeInternalLocalVars memory vars; /* * We calculate the new borrower and liquidator token balances, failing on underflow/overflow: * borrowerTokensNew = accountTokens[borrower] - seizeTokens * liquidatorTokensNew = accountTokens[liquidator] + seizeTokens */ (vars.mathErr, vars.borrowerTokensNew) = subUInt(accountTokens[borrower], seizeTokens); if (vars.mathErr != MathError.NO_ERROR) { return failOpaque(Error.MATH_ERROR, FailureInfo.LIQUIDATE_SEIZE_BALANCE_DECREMENT_FAILED, uint(vars.mathErr)); } vars.protocolSeizeTokens = mul_(seizeTokens, Exp({mantissa: protocolSeizeShareMantissa})); vars.liquidatorSeizeTokens = sub_(seizeTokens, vars.protocolSeizeTokens); (vars.mathErr, vars.exchangeRateMantissa) = exchangeRateStoredInternal(); require(vars.mathErr == MathError.NO_ERROR, "exchange rate math error"); vars.protocolSeizeAmount = mul_ScalarTruncate(Exp({mantissa: vars.exchangeRateMantissa}), vars.protocolSeizeTokens); vars.totalReservesNew = add_(totalReserves, vars.protocolSeizeAmount); vars.totalSupplyNew = sub_(totalSupply, vars.protocolSeizeTokens); (vars.mathErr, vars.liquidatorTokensNew) = addUInt(accountTokens[liquidator], vars.liquidatorSeizeTokens); if (vars.mathErr != MathError.NO_ERROR) { return failOpaque(Error.MATH_ERROR, FailureInfo.LIQUIDATE_SEIZE_BALANCE_INCREMENT_FAILED, uint(vars.mathErr)); } ///////////////////////// // EFFECTS & INTERACTIONS // (No safe failures beyond this point) /* We write the previously calculated values into storage */ totalReserves = vars.totalReservesNew; totalSupply = vars.totalSupplyNew; accountTokens[borrower] = vars.borrowerTokensNew; accountTokens[liquidator] = vars.liquidatorTokensNew; /* Emit a Transfer event */ emit Transfer(borrower, liquidator, vars.liquidatorSeizeTokens); emit Transfer(borrower, address(this), vars.protocolSeizeTokens); emit ReservesAdded(address(this), vars.protocolSeizeAmount, vars.totalReservesNew); /* We call the defense hook */ // unused function // tectonicCore.seizeVerify(address(this), seizerToken, liquidator, borrower, seizeTokens); return uint(Error.NO_ERROR); } /*** Admin Functions ***/ /** * @notice Begins transfer of admin rights. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer. * @dev Admin function to begin change of admin. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer. * @param newPendingAdmin New pending admin. * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details) */ function _setPendingAdmin(address payable newPendingAdmin) external returns (uint) { // Check caller = admin if (msg.sender != admin) { return fail(Error.UNAUTHORIZED, FailureInfo.SET_PENDING_ADMIN_OWNER_CHECK); } // Save current value, if any, for inclusion in log address oldPendingAdmin = pendingAdmin; // Store pendingAdmin with value newPendingAdmin pendingAdmin = newPendingAdmin; // Emit NewPendingAdmin(oldPendingAdmin, newPendingAdmin) emit NewPendingAdmin(oldPendingAdmin, newPendingAdmin); return uint(Error.NO_ERROR); } /** * @notice Accepts transfer of admin rights. msg.sender must be pendingAdmin * @dev Admin function for pending admin to accept role and update admin * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details) */ function _acceptAdmin() external returns (uint) { // Check caller is pendingAdmin and pendingAdmin ≠ address(0) if (msg.sender != pendingAdmin || msg.sender == address(0)) { return fail(Error.UNAUTHORIZED, FailureInfo.ACCEPT_ADMIN_PENDING_ADMIN_CHECK); } // Save current values for inclusion in log address oldAdmin = admin; address oldPendingAdmin = pendingAdmin; // Store admin with value pendingAdmin admin = pendingAdmin; // Clear the pending value pendingAdmin = address(0); emit NewAdmin(oldAdmin, admin); emit NewPendingAdmin(oldPendingAdmin, pendingAdmin); return uint(Error.NO_ERROR); } /** * @notice Sets a new tectonicCore for the market * @dev Admin function to set a new tectonicCore * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details) */ function _setTectonicCore(TectonicCoreInterface newTectonicCore) public returns (uint) { // Check caller is admin if (msg.sender != admin) { return fail(Error.UNAUTHORIZED, FailureInfo.SET_TECTONIC_CORE_OWNER_CHECK); } TectonicCoreInterface oldTectonicCore = tectonicCore; // Ensure invoke tectonicCore.isTectonicCore() returns true require(newTectonicCore.isTectonicCore(), "marker method returned false"); // Set market's tectonicCore to newTectonicCore tectonicCore = newTectonicCore; // Emit NewTectonicCore(oldTectonicCore, newTectonicCore) emit NewTectonicCore(oldTectonicCore, newTectonicCore); 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 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 returns (uint) { // Check caller is admin if (msg.sender != admin) { return fail(Error.UNAUTHORIZED, FailureInfo.SET_RESERVE_FACTOR_ADMIN_CHECK); } // 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 tToken must handle variations between ERC-20 and ETH underlying. * On success, the tToken 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 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 returns (uint) { // totalReserves - reduceAmount uint totalReservesNew; // Check caller is admin if (msg.sender != admin) { return fail(Error.UNAUTHORIZED, FailureInfo.REDUCE_RESERVES_ADMIN_CHECK); } // 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(admin, reduceAmount); emit ReservesReduced(admin, 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(InterestRateModel newInterestRateModel) public 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(InterestRateModel newInterestRateModel) internal returns (uint) { // Used to store old model for use in the event that is emitted on success InterestRateModel oldInterestRateModel; // Check caller is admin if (msg.sender != admin) { return fail(Error.UNAUTHORIZED, FailureInfo.SET_INTEREST_RATE_MODEL_OWNER_CHECK); } // 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); } /*** 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 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 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; /*** 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 } } // File contracts/TErc20.sol pragma solidity ^0.5.16; interface TonicLike { function delegate(address delegatee) external; } /** * @title Tectonic's TErc20 Contract * @notice TTokens which wrap an EIP-20 underlying * @author Tectonic */ contract TErc20 is TToken, TErc20Interface { /** * @notice Initialize the new money market * @param underlying_ The address of the underlying asset * @param tcore_ The address of the TectonicCore * @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_, TectonicCoreInterface tcore_, InterestRateModel interestRateModel_, uint initialExchangeRateMantissa_, string memory name_, string memory symbol_, uint8 decimals_) public { // TToken initialize does the bulk of the work super.initialize(tcore_, interestRateModel_, initialExchangeRateMantissa_, name_, symbol_, decimals_); // Set underlying and sanity check it underlying = underlying_; EIP20Interface(underlying).totalSupply(); } /*** User Interface ***/ /** * @notice Sender supplies assets into the market and receives tTokens 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 returns (uint) { (uint err,) = mintInternal(mintAmount); return err; } /** * @notice Sender redeems tTokens in exchange for the underlying asset * @dev Accrues interest whether or not the operation succeeds, unless reverted * @param redeemTokens The number of tTokens to redeem into underlying * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details) */ function redeem(uint redeemTokens) external returns (uint) { return redeemInternal(redeemTokens); } /** * @notice Sender redeems tTokens 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 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 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 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 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 tToken to be liquidated * @param repayAmount The amount of the underlying borrowed asset to repay * @param tTokenCollateral 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, TTokenInterface tTokenCollateral) external returns (uint) { (uint err,) = liquidateBorrowInternal(borrower, repayAmount, tTokenCollateral); return err; } /** * @notice A public function to sweep accidental ERC-20 transfers to this contract. Tokens are sent to admin (timelock) * @param token The address of the ERC-20 token to sweep */ function sweepToken(EIP20NonStandardInterface token) external { require(address(token) != underlying, "TErc20::sweepToken: can not sweep underlying token"); uint256 balance = token.balanceOf(address(this)); token.transfer(admin, balance); } /** * @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 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 view returns (uint) { EIP20Interface token = EIP20Interface(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 returns (uint) { EIP20NonStandardInterface token = EIP20NonStandardInterface(underlying); uint balanceBefore = EIP20Interface(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 = EIP20Interface(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 { EIP20NonStandardInterface token = EIP20NonStandardInterface(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 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_OUT_FAILED"); } /** * @notice Admin call to delegate the votes of the TONIC-like underlying * @param tonicLikeDelegatee The address to delegate votes to * @dev TTokens whose underlying are not TonicLike should revert here */ function _delegateTonicLikeTo(address tonicLikeDelegatee) external { require(msg.sender == admin, "only the admin may set the tonic-like delegate"); TonicLike(underlying).delegate(tonicLikeDelegatee); } } // File contracts/TErc20Delegate.sol pragma solidity ^0.5.16; /** * @title Tectonic's TErc20Delegate Contract * @notice TTokens which wrap an EIP-20 underlying and are delegated to * @author Tectonic */ contract TErc20Delegate is TErc20, CDelegateInterface { /** * @notice Construct an empty delegate */ constructor() public {} /** * @notice Called by the delegator on a delegate to initialize it for duty * @param data The encoded bytes data for any initialization */ function _becomeImplementation(bytes memory data) public { // Shh -- currently unused data; // Shh -- we don't ever want this hook to be marked pure if (false) { implementation = address(0); } require(msg.sender == admin, "only the admin may call _becomeImplementation"); } /** * @notice Called by the delegator on a delegate to forfeit its responsibility */ function _resignImplementation() public { // Shh -- we don't ever want this hook to be marked pure if (false) { implementation = address(0); } require(msg.sender == admin, "only the admin may call _resignImplementation"); } }
[{"inputs":[],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"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"}],"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"}],"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":"tTokenCollateral","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"}],"name":"Mint","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"oldAdmin","type":"address"},{"indexed":false,"internalType":"address","name":"newAdmin","type":"address"}],"name":"NewAdmin","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"contract InterestRateModel","name":"oldInterestRateModel","type":"address"},{"indexed":false,"internalType":"contract InterestRateModel","name":"newInterestRateModel","type":"address"}],"name":"NewMarketInterestRateModel","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"oldPendingAdmin","type":"address"},{"indexed":false,"internalType":"address","name":"newPendingAdmin","type":"address"}],"name":"NewPendingAdmin","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":false,"internalType":"contract TectonicCoreInterface","name":"oldTectonicCore","type":"address"},{"indexed":false,"internalType":"contract TectonicCoreInterface","name":"newTectonicCore","type":"address"}],"name":"NewTectonicCore","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"}],"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"}],"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"},{"constant":false,"inputs":[],"name":"_acceptAdmin","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"addAmount","type":"uint256"}],"name":"_addReserves","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"bytes","name":"data","type":"bytes"}],"name":"_becomeImplementation","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"tonicLikeDelegatee","type":"address"}],"name":"_delegateTonicLikeTo","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"reduceAmount","type":"uint256"}],"name":"_reduceReserves","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"_resignImplementation","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"contract InterestRateModel","name":"newInterestRateModel","type":"address"}],"name":"_setInterestRateModel","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address payable","name":"newPendingAdmin","type":"address"}],"name":"_setPendingAdmin","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"newReserveFactorMantissa","type":"uint256"}],"name":"_setReserveFactor","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"contract TectonicCoreInterface","name":"newTectonicCore","type":"address"}],"name":"_setTectonicCore","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"accrualBlockNumber","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"accrueInterest","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"admin","outputs":[{"internalType":"address payable","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOfUnderlying","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"borrowAmount","type":"uint256"}],"name":"borrow","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"borrowBalanceCurrent","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"borrowBalanceStored","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"borrowIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"borrowRatePerBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"exchangeRateCurrent","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"exchangeRateStored","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"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"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getCash","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"implementation","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"underlying_","type":"address"},{"internalType":"contract TectonicCoreInterface","name":"tcore_","type":"address"},{"internalType":"contract InterestRateModel","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":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"contract TectonicCoreInterface","name":"tcore_","type":"address"},{"internalType":"contract InterestRateModel","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":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"interestRateModel","outputs":[{"internalType":"contract InterestRateModel","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"isTToken","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"borrower","type":"address"},{"internalType":"uint256","name":"repayAmount","type":"uint256"},{"internalType":"contract TTokenInterface","name":"tTokenCollateral","type":"address"}],"name":"liquidateBorrow","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"mintAmount","type":"uint256"}],"name":"mint","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"pendingAdmin","outputs":[{"internalType":"address payable","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"protocolSeizeShareMantissa","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"redeemTokens","type":"uint256"}],"name":"redeem","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"redeemAmount","type":"uint256"}],"name":"redeemUnderlying","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"repayAmount","type":"uint256"}],"name":"repayBorrow","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"borrower","type":"address"},{"internalType":"uint256","name":"repayAmount","type":"uint256"}],"name":"repayBorrowBehalf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"reserveFactorMantissa","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"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"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"supplyRatePerBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"contract EIP20NonStandardInterface","name":"token","type":"address"}],"name":"sweepToken","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"tectonicCore","outputs":[{"internalType":"contract TectonicCoreInterface","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"totalBorrows","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"totalBorrowsCurrent","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"totalReserves","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"dst","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"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"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"underlying","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"}]
Contract Creation Code
608060405234801561001057600080fd5b506154ec806100206000396000f3fe608060405234801561001057600080fd5b50600436106102725760003560e01c806306fdde0314610277578063095ea7b3146102f45780630e75270214610334578063153ab50514610363578063173b99041461036d57806317bfdfbc1461037557806318160ddd1461039b578063182df0f5146103a35780631a31d465146103ab5780631be195601461050157806323b872dd146105275780632608f8181461055d5780632678224714610589578063313ce567146105ad5780633af9e669146105cb5780633b1d21a2146105f15780633e941010146105f957806347bd37181461061657806356e677281461061e5780635c60da1b146106c2578063601a0bf1146106ca5780636752e702146106e75780636c540baf146106ef5780636f307dc3146106f757806370a08231146106ff57806373acee9814610725578063852a12e31461072d5780638f840ddd1461074a57806395d89b411461075257806395dd91931461075a57806399d8c1b414610780578063a0097b58146108ce578063a0712d68146108d6578063a12b0681146108f3578063a6afed9514610919578063a9059cbb14610921578063aa5af0fd1461094d578063ae9d70b014610955578063b2a02ff11461095d578063b71d1a0c14610993578063b79b3c8a146109b9578063bd6d894d146109df578063c16a61ec146109e7578063c37f68e2146109ef578063c5ebeaec14610a3b578063db006a7514610a58578063dd62ed3e14610a75578063e9c714f214610aa3578063f2b3abbd14610aab578063f3fdb15a14610ad1578063f5e3c46214610ad9578063f851a44014610b0f578063f8f9da2814610b17578063fca7820b14610b1f575b600080fd5b61027f610b3c565b6040805160208082528351818301528351919283929083019185019080838360005b838110156102b95781810151838201526020016102a1565b50505050905090810190601f1680156102e65780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6103206004803603604081101561030a57600080fd5b506001600160a01b038135169060200135610bc9565b604080519115158252519081900360200190f35b6103516004803603602081101561034a57600080fd5b5035610c36565b60408051918252519081900360200190f35b61036b610c4c565b005b610351610c9c565b6103516004803603602081101561038b57600080fd5b50356001600160a01b0316610ca2565b610351610d62565b610351610d68565b61036b600480360360e08110156103c157600080fd5b6001600160a01b03823581169260208101358216926040820135909216916060820135919081019060a081016080820135600160201b81111561040357600080fd5b82018360208201111561041557600080fd5b803590602001918460018302840111600160201b8311171561043657600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295949360208101935035915050600160201b81111561048857600080fd5b82018360208201111561049a57600080fd5b803590602001918460018302840111600160201b831117156104bb57600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295505050903560ff169150610dcb9050565b61036b6004803603602081101561051757600080fd5b50356001600160a01b0316610e6a565b6103206004803603606081101561053d57600080fd5b506001600160a01b03813581169160208101359091169060400135610fa6565b6103516004803603604081101561057357600080fd5b506001600160a01b038135169060200135611018565b61059161102e565b604080516001600160a01b039092168252519081900360200190f35b6105b561103d565b6040805160ff9092168252519081900360200190f35b610351600480360360208110156105e157600080fd5b50356001600160a01b0316611046565b6103516110fc565b6103516004803603602081101561060f57600080fd5b503561110b565b610351611116565b61036b6004803603602081101561063457600080fd5b810190602081018135600160201b81111561064e57600080fd5b82018360208201111561066057600080fd5b803590602001918460018302840111600160201b8311171561068157600080fd5b91908080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092955061111c945050505050565b61059161116d565b610351600480360360208110156106e057600080fd5b503561117c565b610351611217565b610351611222565b610591611228565b6103516004803603602081101561071557600080fd5b50356001600160a01b0316611237565b610351611252565b6103516004803603602081101561074357600080fd5b5035611308565b610351611313565b61027f611319565b6103516004803603602081101561077057600080fd5b50356001600160a01b0316611371565b61036b600480360360c081101561079657600080fd5b6001600160a01b03823581169260208101359091169160408201359190810190608081016060820135600160201b8111156107d057600080fd5b8201836020820111156107e257600080fd5b803590602001918460018302840111600160201b8311171561080357600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295949360208101935035915050600160201b81111561085557600080fd5b82018360208201111561086757600080fd5b803590602001918460018302840111600160201b8311171561088857600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295505050903560ff1691506113d59050565b6103206115ba565b610351600480360360208110156108ec57600080fd5b50356115bf565b61036b6004803603602081101561090957600080fd5b50356001600160a01b03166115cb565b610351611682565b6103206004803603604081101561093757600080fd5b506001600160a01b0381351690602001356119d9565b610351611a4a565b610351611a50565b6103516004803603606081101561097357600080fd5b506001600160a01b03813581169160208101359091169060400135611aef565b610351600480360360208110156109a957600080fd5b50356001600160a01b0316611b60565b610351600480360360208110156109cf57600080fd5b50356001600160a01b0316611be3565b610351611d2f565b610591611deb565b610a1560048036036020811015610a0557600080fd5b50356001600160a01b0316611dfa565b604080519485526020850193909352838301919091526060830152519081900360800190f35b61035160048036036020811015610a5157600080fd5b5035611e8f565b61035160048036036020811015610a6e57600080fd5b5035611e9a565b61035160048036036040811015610a8b57600080fd5b506001600160a01b0381358116916020013516611ea5565b610351611ed0565b61035160048036036020811015610ac157600080fd5b50356001600160a01b0316611fc1565b610591611ffb565b61035160048036036060811015610aef57600080fd5b506001600160a01b0381358116916020810135916040909101351661200a565b610591612022565b610351612036565b61035160048036036020811015610b3557600080fd5b503561209a565b60018054604080516020600284861615610100026000190190941693909304601f81018490048402820184019092528181529291830182828015610bc15780601f10610b9657610100808354040283529160200191610bc1565b820191906000526020600020905b815481529060010190602001808311610ba457829003601f168201915b505050505081565b336000818152600f602090815260408083206001600160a01b03871680855290835281842086905581518681529151939493909284927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929081900390910190a360019150505b92915050565b600080610c4283612118565b509150505b919050565b60035461010090046001600160a01b03163314610c9a5760405162461bcd60e51b815260040180806020018281038252602d815260200180615235602d913960400191505060405180910390fd5b565b60085481565b6000805460ff16610ce7576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff19168155610cf9611682565b14610d44576040805162461bcd60e51b81526020600482015260166024820152751858d8dc9d59481a5b9d195c995cdd0819985a5b195960521b604482015290519081900360640190fd5b610d4d82611371565b90505b6000805460ff19166001179055919050565b600d5481565b6000806000610d756121c1565b90925090506000826003811115610d8857fe5b14610dc45760405162461bcd60e51b81526004018080602001828103825260358152602001806153a46035913960400191505060405180910390fd5b9150505b90565b610dd98686868686866113d5565b601180546001600160a01b0319166001600160a01b038981169190911791829055604080516318160ddd60e01b8152905192909116916318160ddd91600480820192602092909190829003018186803b158015610e3557600080fd5b505afa158015610e49573d6000803e3d6000fd5b505050506040513d6020811015610e5f57600080fd5b505050505050505050565b6011546001600160a01b0382811691161415610eb75760405162461bcd60e51b81526004018080602001828103825260328152602001806154016032913960400191505060405180910390fd5b604080516370a0823160e01b815230600482015290516000916001600160a01b038416916370a0823191602480820192602092909190829003018186803b158015610f0157600080fd5b505afa158015610f15573d6000803e3d6000fd5b505050506040513d6020811015610f2b57600080fd5b50516003546040805163a9059cbb60e01b81526101009092046001600160a01b03908116600484015260248301849052905192935084169163a9059cbb9160448082019260009290919082900301818387803b158015610f8a57600080fd5b505af1158015610f9e573d6000803e3d6000fd5b505050505050565b6000805460ff16610feb576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff1916815561100133868686612270565b1490506000805460ff191660011790559392505050565b60008061102584846124fc565b50949350505050565b6004546001600160a01b031681565b60035460ff1681565b6000611050614f88565b6040518060200160405280611063611d2f565b90526001600160a01b0384166000908152600e602052604081205491925090819061108f9084906125a7565b909250905060008260038111156110a257fe5b146110f4576040805162461bcd60e51b815260206004820152601f60248201527f62616c616e636520636f756c64206e6f742062652063616c63756c6174656400604482015290519081900360640190fd5b949350505050565b60006111066125fb565b905090565b6000610c308261267b565b600b5481565b60035461010090046001600160a01b0316331461116a5760405162461bcd60e51b815260040180806020018281038252602d81526020018061548b602d913960400191505060405180910390fd5b50565b6012546001600160a01b031681565b6000805460ff166111c1576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff191681556111d3611682565b905080156111f9576111f18160108111156111ea57fe5b603061270f565b915050610d50565b61120283612763565b9150506000805460ff19166001179055919050565b666379da05b6000081565b60095481565b6011546001600160a01b031681565b6001600160a01b03166000908152600e602052604090205490565b6000805460ff16611297576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff191681556112a9611682565b146112f4576040805162461bcd60e51b81526020600482015260166024820152751858d8dc9d59481a5b9d195c995cdd0819985a5b195960521b604482015290519081900360640190fd5b50600b546000805460ff1916600117905590565b6000610c3082612896565b600c5481565b6002805460408051602060018416156101000260001901909316849004601f81018490048402820184019092528181529291830182828015610bc15780601f10610b9657610100808354040283529160200191610bc1565b600080600061137f84612917565b9092509050600082600381111561139257fe5b146113ce5760405162461bcd60e51b81526004018080602001828103825260378152602001806152c26037913960400191505060405180910390fd5b9392505050565b60035461010090046001600160a01b031633146114235760405162461bcd60e51b815260040180806020018281038252602481526020018061514e6024913960400191505060405180910390fd5b6009541580156114335750600a54155b61146e5760405162461bcd60e51b81526004018080602001828103825260238152602001806151a06023913960400191505060405180910390fd5b6007849055836114af5760405162461bcd60e51b81526004018080602001828103825260308152602001806151e36030913960400191505060405180910390fd5b60006114ba87611be3565b9050801561150d576040805162461bcd60e51b815260206004820152601b60248201527a1cd95d1d1a5b99c81d1958dd1bdb9a58d0dbdc994819985a5b1959602a1b604482015290519081900360640190fd5b6115156129cb565b600955670de0b6b3a7640000600a5561152d866129cf565b9050801561156c5760405162461bcd60e51b81526004018080602001828103825260228152602001806152136022913960400191505060405180910390fd5b835161157f906001906020870190614f9b565b508251611593906002906020860190614f9b565b50506003805460ff90921660ff199283161790556000805490911660011790555050505050565b600181565b600080610c4283612b43565b60035461010090046001600160a01b031633146116195760405162461bcd60e51b815260040180806020018281038252602e815260200180615172602e913960400191505060405180910390fd5b601154604080516317066a5760e21b81526001600160a01b03848116600483015291519190921691635c19a95c91602480830192600092919082900301818387803b15801561166757600080fd5b505af115801561167b573d6000803e3d6000fd5b5050505050565b60008061168d6129cb565b600954909150808214156116a657600092505050610dc8565b60006116b06125fb565b600b54600c54600a54600654604080516315f2405360e01b815260048101879052602481018690526044810185905290519596509394929391926000926001600160a01b03909216916315f24053916064808301926020929190829003018186803b15801561171e57600080fd5b505afa158015611732573d6000803e3d6000fd5b505050506040513d602081101561174857600080fd5b5051905065048c273950008111156117a6576040805162461bcd60e51b815260206004820152601c60248201527b0c4dee4e4deee40e4c2e8ca40d2e640c2c4e6eae4c8d8f240d0d2ced60231b604482015290519081900360640190fd5b6000806117b38989612bc4565b909250905060008260038111156117c657fe5b14611818576040805162461bcd60e51b815260206004820152601f60248201527f636f756c64206e6f742063616c63756c61746520626c6f636b2064656c746100604482015290519081900360640190fd5b611820614f88565b60008060008061183e60405180602001604052808a81525087612be7565b9097509450600087600381111561185157fe5b146118835761186e6009600689600381111561186957fe5b612c4f565b9e505050505050505050505050505050610dc8565b61188d858c6125a7565b909750935060008760038111156118a057fe5b146118b85761186e6009600189600381111561186957fe5b6118c2848c612ca3565b909750925060008760038111156118d557fe5b146118ed5761186e6009600489600381111561186957fe5b6119086040518060200160405280600854815250858c612cc9565b9097509150600087600381111561191b57fe5b146119335761186e6009600589600381111561186957fe5b61193e858a8b612cc9565b9097509050600087600381111561195157fe5b146119695761186e6009600389600381111561186957fe5b60098e9055600a819055600b839055600c829055604080518d8152602081018690528082018390526060810185905290517f4dec04e750ca11537cabcd8a9eab06494de08da3735bc8871cd41250e190bc049181900360800190a160009e50505050505050505050505050505090565b6000805460ff16611a1e576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff19168155611a3433338686612270565b1490506000805460ff1916600117905592915050565b600a5481565b6006546000906001600160a01b031663b8168816611a6c6125fb565b600b54600c546008546040518563ffffffff1660e01b81526004018085815260200184815260200183815260200182815260200194505050505060206040518083038186803b158015611abe57600080fd5b505afa158015611ad2573d6000803e3d6000fd5b505050506040513d6020811015611ae857600080fd5b5051905090565b6000805460ff16611b34576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff19169055611b4a33858585612d25565b90506000805460ff191660011790559392505050565b60035460009061010090046001600160a01b03163314611b8d57611b866001604561270f565b9050610c47565b600480546001600160a01b038481166001600160a01b0319831681179093556040805191909216808252602082019390935281516000805160206152f9833981519152929181900390910190a160009392505050565b60035460009061010090046001600160a01b03163314611c0957611b866001603f61270f565b6005546040805163a6df963f60e01b815290516001600160a01b039283169285169163a6df963f916004808301926020929190829003018186803b158015611c5057600080fd5b505afa158015611c64573d6000803e3d6000fd5b505050506040513d6020811015611c7a57600080fd5b5051611ccc576040805162461bcd60e51b815260206004820152601c60248201527b6d61726b6572206d6574686f642072657475726e65642066616c736560201b604482015290519081900360640190fd5b600580546001600160a01b0319166001600160a01b03858116918217909255604080519284168352602083019190915280517f85513d662157b8df3369b7deaa0a6afaff4e5de063a40b4bd2d130cb1c49382d9281900390910190a160006113ce565b6000805460ff16611d74576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff19168155611d86611682565b14611dd1576040805162461bcd60e51b81526020600482015260166024820152751858d8dc9d59481a5b9d195c995cdd0819985a5b195960521b604482015290519081900360640190fd5b611dd9610d68565b90506000805460ff1916600117905590565b6005546001600160a01b031681565b6001600160a01b0381166000908152600e6020526040812054819081908190818080611e2589612917565b935090506000816003811115611e3757fe5b14611e555760095b975060009650869550859450611e889350505050565b611e5d6121c1565b925090506000816003811115611e6f57fe5b14611e7b576009611e3f565b5060009650919450925090505b9193509193565b6000610c30826130e8565b6000610c3082613167565b6001600160a01b039182166000908152600f6020908152604080832093909416825291909152205490565b6004546000906001600160a01b031633141580611eeb575033155b15611f0357611efc6001600061270f565b9050610dc8565b60038054600480546001600160a01b03818116610100818102610100600160a81b0319871617968790556001600160a01b031990931690935560408051948390048216808652929095041660208401528351909391927ff9ffabca9c8276e99321725bcb43fb076a6c66a54b7f21c4e8146d8519b417dc92908290030190a1600454604080516001600160a01b038085168252909216602083015280516000805160206152f98339815191529281900390910190a160009250505090565b600080611fcc611682565b90508015611ff257611fea816010811115611fe357fe5b604061270f565b915050610c47565b6113ce836129cf565b6006546001600160a01b031681565b6000806120188585856131e1565b5095945050505050565b60035461010090046001600160a01b031681565b6006546000906001600160a01b03166315f240536120526125fb565b600b54600c546040518463ffffffff1660e01b815260040180848152602001838152602001828152602001935050505060206040518083038186803b158015611abe57600080fd5b6000805460ff166120df576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff191681556120f1611682565b9050801561210f576111f181601081111561210857fe5b604661270f565b61120283613313565b60008054819060ff1661215f576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff19168155612171611682565b9050801561219c5761218f81601081111561218857fe5b603661270f565b9250600091506121ad9050565b6121a73333866133bb565b92509250505b6000805460ff191660011790559092909150565b600d546000908190806121dc5750506007546000915061226c565b60006121e66125fb565b905060006121f2614f88565b600061220384600b54600c54613709565b93509050600081600381111561221557fe5b1461222a5795506000945061226c9350505050565b6122348386613747565b92509050600081600381111561224657fe5b1461225b5795506000945061226c9350505050565b505160009550935061226c92505050565b9091565b600554604080516317b9b84b60e31b81523060048201526001600160a01b03868116602483015285811660448301526064820185905291516000938493169163bdcdc25891608480830192602092919082900301818787803b1580156122d557600080fd5b505af11580156122e9573d6000803e3d6000fd5b505050506040513d60208110156122ff57600080fd5b50519050801561231e576123166003604a83612c4f565b9150506110f4565b836001600160a01b0316856001600160a01b03161415612344576123166002604b61270f565b60006001600160a01b038781169087161415612363575060001961238b565b506001600160a01b038086166000908152600f60209081526040808320938a16835292905220545b60008060008061239b8589612bc4565b909450925060008460038111156123ae57fe5b146123cc576123bf6009604b61270f565b96505050505050506110f4565b6001600160a01b038a166000908152600e60205260409020546123ef9089612bc4565b9094509150600084600381111561240257fe5b14612413576123bf6009604c61270f565b6001600160a01b0389166000908152600e60205260409020546124369089612ca3565b9094509050600084600381111561244957fe5b1461245a576123bf6009604d61270f565b6001600160a01b03808b166000908152600e6020526040808220859055918b1681522081905560001985146124b2576001600160a01b03808b166000908152600f60209081526040808320938f168352929052208390555b886001600160a01b03168a6001600160a01b03166000805160206153538339815191528a6040518082815260200191505060405180910390a35060009a9950505050505050505050565b60008054819060ff16612543576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff19168155612555611682565b905080156125805761257381601081111561256c57fe5b603561270f565b9250600091506125919050565b61258b3386866133bb565b92509250505b6000805460ff1916600117905590939092509050565b60008060006125b4614f88565b6125be8686612be7565b909250905060008260038111156125d157fe5b146125e257509150600090506125f4565b60006125ed826137f7565b9350935050505b9250929050565b601154604080516370a0823160e01b815230600482015290516000926001600160a01b03169182916370a0823191602480820192602092909190829003018186803b15801561264957600080fd5b505afa15801561265d573d6000803e3d6000fd5b505050506040513d602081101561267357600080fd5b505191505090565b6000805460ff166126c0576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff191681556126d2611682565b905080156126f0576111f18160108111156126e957fe5b604e61270f565b6126f983613806565b509150506000805460ff19166001179055919050565b60006000805160206151c383398151915283601081111561272c57fe5b83605081111561273857fe5b604080519283526020830191909152600082820152519081900360600190a18260108111156113ce57fe5b600354600090819061010090046001600160a01b0316331461278b57611fea6001603161270f565b6127936129cb565b600954146127a757611fea600a603361270f565b826127b06125fb565b10156127c257611fea600e603261270f565b600c548311156127d857611fea6002603461270f565b50600c548281039081111561281e5760405162461bcd60e51b81526004018080602001828103825260248152602001806154676024913960400191505060405180910390fd5b600c81905560035461283e9061010090046001600160a01b0316846138dc565b600354604080516101009092046001600160a01b0316825260208201859052818101839052517f3bad0c59cf2f06e7314077049f48a93578cd16f5ef92329f1dab1420a99c177e916060908290030190a160006113ce565b6000805460ff166128db576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff191681556128ed611682565b9050801561290b576111f181601081111561290457fe5b602761270f565b611202336000856139cf565b6001600160a01b03811660009081526010602052604081208054829182918291829161294e5750600094508493506129c692505050565b61295e8160000154600a54613e96565b9094509250600084600381111561297157fe5b146129865750919350600092506129c6915050565b612994838260010154613ed5565b909450915060008460038111156129a757fe5b146129bc5750919350600092506129c6915050565b5060009450925050505b915091565b4390565b600354600090819061010090046001600160a01b031633146129f757611fea6001604261270f565b6129ff6129cb565b60095414612a1357611fea600a604161270f565b600660009054906101000a90046001600160a01b03169050826001600160a01b0316632191f92a6040518163ffffffff1660e01b815260040160206040518083038186803b158015612a6457600080fd5b505afa158015612a78573d6000803e3d6000fd5b505050506040513d6020811015612a8e57600080fd5b5051612ae0576040805162461bcd60e51b815260206004820152601c60248201527b6d61726b6572206d6574686f642072657475726e65642066616c736560201b604482015290519081900360640190fd5b600680546001600160a01b0319166001600160a01b03858116918217909255604080519284168352602083019190915280517fedffc32e068c7c95dfd4bdfd5c4d939a084d6b11c4199eac8436ed234d72f9269281900390910190a160006113ce565b60008054819060ff16612b8a576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff19168155612b9c611682565b90508015612bba5761218f816010811115612bb357fe5b601e61270f565b6121a73385613f00565b600080838311612bdb5750600090508183036125f4565b506003905060006125f4565b6000612bf1614f88565b600080612c02866000015186613e96565b90925090506000826003811115612c1557fe5b14612c34575060408051602081019091526000815290925090506125f4565b60408051602081019091529081526000969095509350505050565b60006000805160206151c3833981519152846010811115612c6c57fe5b846050811115612c7857fe5b604080519283526020830191909152818101859052519081900360600190a18360108111156110f457fe5b600080838301848110612cbb576000925090506125f4565b5060029150600090506125f4565b6000806000612cd6614f88565b612ce08787612be7565b90925090506000826003811115612cf357fe5b14612d045750915060009050612d1d565b612d16612d10826137f7565b86612ca3565b9350935050505b935093915050565b6005546040805163d02f735160e01b81523060048201526001600160a01b038781166024830152868116604483015285811660648301526084820185905291516000938493169163d02f73519160a480830192602092919082900301818787803b158015612d9257600080fd5b505af1158015612da6573d6000803e3d6000fd5b505050506040513d6020811015612dbc57600080fd5b505190508015612dd3576123166003601b83612c4f565b846001600160a01b0316846001600160a01b03161415612df9576123166006601c61270f565b612e01615019565b6001600160a01b0385166000908152600e6020526040902054612e249085612bc4565b6020830181905282826003811115612e3857fe5b6003811115612e4357fe5b9052506000905081516003811115612e5757fe5b14612e7c57612e736009601a8360000151600381111561186957fe5b925050506110f4565b612e9b846040518060200160405280666379da05b600008152506142d0565b60808201819052612ead9085906142f8565b6060820152612eba6121c1565b60c0830181905282826003811115612ece57fe5b6003811115612ed957fe5b9052506000905081516003811115612eed57fe5b14612f3a576040805162461bcd60e51b815260206004820152601860248201527732bc31b430b733b2903930ba329036b0ba341032b93937b960411b604482015290519081900360640190fd5b612f5a60405180602001604052808360c001518152508260800151614332565b60a08201819052600c54612f6d91614351565b60e0820152600d546080820151612f8491906142f8565b6101008201526001600160a01b0386166000908152600e60205260409020546060820151612fb29190612ca3565b6040830181905282826003811115612fc657fe5b6003811115612fd157fe5b9052506000905081516003811115612fe557fe5b1461300157612e73600960198360000151600381111561186957fe5b60e0810151600c55610100810151600d556020808201516001600160a01b038088166000818152600e855260408082209490945583860151928b16808252908490209290925560608501518351908152925191939092600080516020615353833981519152929081900390910190a36080810151604080519182525130916001600160a01b038816916000805160206153538339815191529181900360200190a360a081015160e0820151604080513081526020810193909352828101919091525160008051602061512e8339815191529181900360600190a16000979650505050505050565b6000805460ff1661312d576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff1916815561313f611682565b9050801561315d576111f181601081111561315657fe5b600861270f565b6112023384614387565b6000805460ff166131ac576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff191681556131be611682565b905080156131d5576111f181601081111561290457fe5b611202338460006139cf565b60008054819060ff16613228576040805162461bcd60e51b815260206004820152600a6024820152691c994b595b9d195c995960b21b604482015290519081900360640190fd5b6000805460ff1916815561323a611682565b905080156132655761325881601081111561325157fe5b600f61270f565b9250600091506132fc9050565b836001600160a01b031663a6afed956040518163ffffffff1660e01b8152600401602060405180830381600087803b1580156132a057600080fd5b505af11580156132b4573d6000803e3d6000fd5b505050506040513d60208110156132ca57600080fd5b5051905080156132ea576132588160108111156132e357fe5b601061270f565b6132f63387878761461b565b92509250505b6000805460ff191660011790559094909350915050565b60035460009061010090046001600160a01b0316331461333957611b866001604761270f565b6133416129cb565b6009541461335557611b86600a604861270f565b670de0b6b3a764000082111561337157611b866002604961270f565b6008805490839055604080518281526020810185905281517faaa68312e2ea9d50e16af5068410ab56e1a1fd06037b1a35664812c30f821460929181900390910190a160006113ce565b60055460408051631200453160e11b81523060048201526001600160a01b0386811660248301528581166044830152606482018590529151600093849384939116916324008a629160848082019260209290919082900301818787803b15801561342457600080fd5b505af1158015613438573d6000803e3d6000fd5b505050506040513d602081101561344e57600080fd5b505190508015613472576134656003603883612c4f565b925060009150612d1d9050565b61347a6129cb565b6009541461348e57613465600a603961270f565b613496615066565b6001600160a01b03861660009081526010602052604090206001015460608201526134c086612917565b60808301819052602083018260038111156134d757fe5b60038111156134e257fe5b90525060009050816020015160038111156134f957fe5b1461352357613515600960378360200151600381111561186957fe5b935060009250612d1d915050565b60001985141561353c5760808101516040820152613544565b604081018590525b613552878260400151614b08565b60e08201819052608082015161356791612bc4565b60a083018190526020830182600381111561357e57fe5b600381111561358957fe5b90525060009050816020015160038111156135a057fe5b146135dc5760405162461bcd60e51b815260040180806020018281038252603a815260200180615319603a913960400191505060405180910390fd5b6135ec600b548260e00151612bc4565b60c083018190526020830182600381111561360357fe5b600381111561360e57fe5b905250600090508160200151600381111561362557fe5b146136615760405162461bcd60e51b81526004018080602001828103825260318152602001806153736031913960400191505060405180910390fd5b60a080820180516001600160a01b03808a16600081815260106020908152604091829020948555600a5460019095019490945560c0870151600b81905560e088015195518251948f16855294840192909252828101949094526060820192909252608081019190915290517f1a2a22cb034d26d1854bdc6666a5b91fe25efbbb5dcad3b0355478d6f5c362a1929181900390910190a160e00151600097909650945050505050565b6000806000806137198787612ca3565b9092509050600082600381111561372c57fe5b1461373d5750915060009050612d1d565b612d168186612bc4565b6000613751614f88565b60008061376686670de0b6b3a7640000613e96565b9092509050600082600381111561377957fe5b14613798575060408051602081019091526000815290925090506125f4565b6000806137a58388613ed5565b909250905060008260038111156137b857fe5b146137da575060408051602081019091526000815290945092506125f4915050565b604080516020810190915290815260009890975095505050505050565b51670de0b6b3a7640000900490565b6000806000806138146129cb565b6009541461383357613828600a604f61270f565b935091506129c69050565b61383d3386614b08565b905080600c54019150600c5482101561389d576040805162461bcd60e51b815260206004820181905260248201527f61646420726573657276657320756e6578706563746564206f766572666c6f77604482015290519081900360640190fd5b600c8290556040805133815260208101839052808201849052905160008051602061512e8339815191529181900360600190a160009350915050915091565b6011546040805163a9059cbb60e01b81526001600160a01b0385811660048301526024820185905291519190921691829163a9059cbb9160448082019260009290919082900301818387803b15801561393457600080fd5b505af1158015613948573d6000803e3d6000fd5b5050505060003d60008114613964576020811461396e57600080fd5b600019915061397a565b60206000803e60005191505b50806139c9576040805162461bcd60e51b81526020600482015260196024820152781513d2d15397d514905394d1915497d3d55517d19052531151603a1b604482015290519081900360640190fd5b50505050565b60008215806139dc575081155b613a175760405162461bcd60e51b81526004018080602001828103825260348152602001806154336034913960400191505060405180910390fd5b613a1f6150ac565b613a276121c1565b6040830181905260208301826003811115613a3e57fe5b6003811115613a4957fe5b9052506000905081602001516003811115613a6057fe5b14613a8457613a7c6009602b8360200151600381111561186957fe5b9150506113ce565b8315613b05576060810184905260408051602081018252908201518152613aab90856125a7565b6080830181905260208301826003811115613ac257fe5b6003811115613acd57fe5b9052506000905081602001516003811115613ae457fe5b14613b0057613a7c600960298360200151600381111561186957fe5b613b7e565b613b218360405180602001604052808460400151815250614d4a565b6060830181905260208301826003811115613b3857fe5b6003811115613b4357fe5b9052506000905081602001516003811115613b5a57fe5b14613b7657613a7c6009602a8360200151600381111561186957fe5b608081018390525b60055460608201516040805163eabe7d9160e01b81523060048201526001600160a01b03898116602483015260448201939093529051600093929092169163eabe7d919160648082019260209290919082900301818787803b158015613be357600080fd5b505af1158015613bf7573d6000803e3d6000fd5b505050506040513d6020811015613c0d57600080fd5b505190508015613c2d57613c246003602883612c4f565b925050506113ce565b613c356129cb565b60095414613c4957613c24600a602c61270f565b613c59600d548360600151612bc4565b60a0840181905260208401826003811115613c7057fe5b6003811115613c7b57fe5b9052506000905082602001516003811115613c9257fe5b14613cae57613c246009602e8460200151600381111561186957fe5b6001600160a01b0386166000908152600e60205260409020546060830151613cd69190612bc4565b60c0840181905260208401826003811115613ced57fe5b6003811115613cf857fe5b9052506000905082602001516003811115613d0f57fe5b14613d2b57613c246009602d8460200151600381111561186957fe5b8160800151613d386125fb565b1015613d4a57613c24600e602f61270f565b613d588683608001516138dc565b60a0820151600d5560c08201516001600160a01b0387166000818152600e6020908152604091829020939093556060850151815190815290513093600080516020615353833981519152928290030190a36080820151606080840151604080516001600160a01b038b168152602081019490945283810191909152517fe5b754fb1abb7f01b499791d0b820ae3b6af3424ac1c59768edb53f4ec31a9299281900390910190a160055460808301516060840151604080516351dff98960e01b81523060048201526001600160a01b038b81166024830152604482019490945260648101929092525191909216916351dff98991608480830192600092919082900301818387803b158015613e6b57600080fd5b505af1158015613e7f573d6000803e3d6000fd5b5060009250613e8c915050565b9695505050505050565b60008083613ea9575060009050806125f4565b83830283858281613eb657fe5b0414613eca575060029150600090506125f4565b6000925090506125f4565b60008082613ee957506001905060006125f4565b6000838581613ef457fe5b04915091509250929050565b60055460408051634ef4c3e160e01b81523060048201526001600160a01b03858116602483015260448201859052915160009384938493911691634ef4c3e19160648082019260209290919082900301818787803b158015613f6157600080fd5b505af1158015613f75573d6000803e3d6000fd5b505050506040513d6020811015613f8b57600080fd5b505190508015613faf57613fa26003601f83612c4f565b9250600091506125f49050565b613fb76129cb565b60095414613fcb57613fa2600a602261270f565b613fd36150ac565b613fdb6121c1565b6040830181905260208301826003811115613ff257fe5b6003811115613ffd57fe5b905250600090508160200151600381111561401457fe5b1461403e57614030600960218360200151600381111561186957fe5b9350600092506125f4915050565b6140488686614b08565b60c08201819052604080516020810182529083015181526140699190614d4a565b606083018190526020830182600381111561408057fe5b600381111561408b57fe5b90525060009050816020015160038111156140a257fe5b146140f4576040805162461bcd60e51b815260206004820181905260248201527f4d494e545f45584348414e47455f43414c43554c4154494f4e5f4641494c4544604482015290519081900360640190fd5b614104600d548260600151612ca3565b608083018190526020830182600381111561411b57fe5b600381111561412657fe5b905250600090508160200151600381111561413d57fe5b146141795760405162461bcd60e51b81526004018080602001828103825260288152602001806153d96028913960400191505060405180910390fd5b6001600160a01b0386166000908152600e602052604090205460608201516141a19190612ca3565b60a08301819052602083018260038111156141b857fe5b60038111156141c357fe5b90525060009050816020015160038111156141da57fe5b146142165760405162461bcd60e51b815260040180806020018281038252602b815260200180615297602b913960400191505060405180910390fd5b6080810151600d5560a08101516001600160a01b0387166000818152600e60209081526040918290209390935560c084015160608086015183519485529484019190915282820193909352517f4c209b5fc8ad50758f13e2e1088ba56a560dff690a1c6fef26394f4c03821c4f929181900390910190a1606081015160408051918252516001600160a01b0388169130916000805160206153538339815191529181900360200190a360c001516000969095509350505050565b6000670de0b6b3a76400006142e9848460000151614d61565b816142f057fe5b049392505050565b60006113ce8383604051806040016040528060158152602001747375627472616374696f6e20756e646572666c6f7760581b815250614d9d565b600061433c614f88565b6143468484614e34565b90506110f4816137f7565b60006113ce8383604051806040016040528060118152602001706164646974696f6e206f766572666c6f7760781b815250614e5e565b6005546040805163368f515360e21b81523060048201526001600160a01b0385811660248301526044820185905291516000938493169163da3d454c91606480830192602092919082900301818787803b1580156143e457600080fd5b505af11580156143f8573d6000803e3d6000fd5b505050506040513d602081101561440e57600080fd5b50519050801561442d576144256003600e83612c4f565b915050610c30565b6144356129cb565b6009541461444857614425600a8061270f565b826144516125fb565b101561446357614425600e600961270f565b61446b6150ea565b61447485612917565b602083018190528282600381111561448857fe5b600381111561449357fe5b90525060009050815160038111156144a757fe5b146144cc576144c3600960078360000151600381111561186957fe5b92505050610c30565b6144da816020015185612ca3565b60408301819052828260038111156144ee57fe5b60038111156144f957fe5b905250600090508151600381111561450d57fe5b14614529576144c36009600c8360000151600381111561186957fe5b614535600b5485612ca3565b606083018190528282600381111561454957fe5b600381111561455457fe5b905250600090508151600381111561456857fe5b14614584576144c36009600b8360000151600381111561186957fe5b61458e85856138dc565b604080820180516001600160a01b03881660008181526010602090815290859020928355600a54600190930192909255606080860151600b81905593518551928352928201899052818501929092529081019190915290517f13ed6866d4e1ee6da46f845c46d7e54120883d75c5ea9a2dacc1c4ca8984ab809181900360800190a1600095945050505050565b60055460408051632fe3f38f60e11b81523060048201526001600160a01b0384811660248301528781166044830152868116606483015260848201869052915160009384938493911691635fc7e71e9160a48082019260209290919082900301818787803b15801561468c57600080fd5b505af11580156146a0573d6000803e3d6000fd5b505050506040513d60208110156146b657600080fd5b5051905080156146da576146cd6003601283612c4f565b925060009150614aff9050565b6146e26129cb565b600954146146f6576146cd600a601661270f565b6146fe6129cb565b846001600160a01b0316636c540baf6040518163ffffffff1660e01b815260040160206040518083038186803b15801561473757600080fd5b505afa15801561474b573d6000803e3d6000fd5b505050506040513d602081101561476157600080fd5b505114614774576146cd600a601161270f565b866001600160a01b0316866001600160a01b0316141561479a576146cd6006601761270f565b846147ab576146cd6007601561270f565b6000198514156147c1576146cd6007601461270f565b6000806147cf8989896133bb565b909250905081156147ff576147f08260108111156147e957fe5b601861270f565b945060009350614aff92505050565b6005546040805163c488847b60e01b81523060048201526001600160a01b038981166024830152604482018590528251600094859492169263c488847b926064808301939192829003018186803b15801561485957600080fd5b505afa15801561486d573d6000803e3d6000fd5b505050506040513d604081101561488357600080fd5b508051602090910151909250905081156148ce5760405162461bcd60e51b81526004018080602001828103825260358152602001806152626035913960400191505060405180910390fd5b80886001600160a01b03166370a082318c6040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b0316815260200191505060206040518083038186803b15801561492557600080fd5b505afa158015614939573d6000803e3d6000fd5b505050506040513d602081101561494f57600080fd5b5051101561499f576040805162461bcd60e51b815260206004820152601860248201527709892a2aa928882a88abea68a92b48abea89e9ebe9aaa86960431b604482015290519081900360640190fd5b60006001600160a01b0389163014156149c5576149be308d8d85612d25565b9050614a4f565b6040805163b2a02ff160e01b81526001600160a01b038e811660048301528d81166024830152604482018590529151918b169163b2a02ff1916064808201926020929091908290030181600087803b158015614a2057600080fd5b505af1158015614a34573d6000803e3d6000fd5b505050506040513d6020811015614a4a57600080fd5b505190505b8015614a99576040805162461bcd60e51b81526020600482015260146024820152731d1bdad95b881cd95a5e9d5c994819985a5b195960621b604482015290519081900360640190fd5b604080516001600160a01b03808f168252808e1660208301528183018790528b1660608201526080810184905290517f298637f684da70674f26509b10f07ec2fbc77a335ab1e7d6215a4b2484d8bb529181900360a00190a16000975092955050505050505b94509492505050565b601154604080516370a0823160e01b815230600482015290516000926001600160a01b031691839183916370a08231916024808301926020929190829003018186803b158015614b5757600080fd5b505afa158015614b6b573d6000803e3d6000fd5b505050506040513d6020811015614b8157600080fd5b5051604080516323b872dd60e01b81526001600160a01b038881166004830152306024830152604482018890529151929350908416916323b872dd9160648082019260009290919082900301818387803b158015614bde57600080fd5b505af1158015614bf2573d6000803e3d6000fd5b5050505060003d60008114614c0e5760208114614c1857600080fd5b6000199150614c24565b60206000803e60005191505b5080614c72576040805162461bcd60e51b81526020600482015260186024820152771513d2d15397d514905394d1915497d25397d1905253115160421b604482015290519081900360640190fd5b601154604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b158015614cbd57600080fd5b505afa158015614cd1573d6000803e3d6000fd5b505050506040513d6020811015614ce757600080fd5b5051905082811015614d3d576040805162461bcd60e51b815260206004820152601a602482015279544f4b454e5f5452414e534645525f494e5f4f564552464c4f5760301b604482015290519081900360640190fd5b9190910395945050505050565b6000806000614d57614f88565b6125be8686614eb3565b60006113ce8383604051806040016040528060178152602001766d756c7469706c69636174696f6e206f766572666c6f7760481b815250614f12565b60008184841115614e2c5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015614df1578181015183820152602001614dd9565b50505050905090810190601f168015614e1e5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b614e3c614f88565b6040518060200160405280614e55856000015185614d61565b90529392505050565b600083830182858210156110255760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315614df1578181015183820152602001614dd9565b6000614ebd614f88565b600080614ed2670de0b6b3a764000087613e96565b90925090506000826003811115614ee557fe5b14614f04575060408051602081019091526000815290925090506125f4565b6125ed818660000151613747565b6000831580614f1f575082155b15614f2c575060006113ce565b83830283858281614f3957fe5b041483906110255760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315614df1578181015183820152602001614dd9565b6040518060200160405280600081525090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10614fdc57805160ff1916838001178555615009565b82800160010185558215615009579182015b82811115615009578251825591602001919060010190614fee565b50615015929150615113565b5090565b604080516101208101909152806000815260200160008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081525090565b6040805161010081019091528060008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081525090565b6040805160e0810190915280600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081525090565b604080516080810190915280600081526020016000815260200160008152602001600081525090565b610dc891905b80821115615015576000815560010161511956fea91e67c5ea634cd43a12c5a482724b03de01e85ca68702a53d0c2f45cb7c1dc56f6e6c792061646d696e206d617920696e697469616c697a6520746865206d61726b65746f6e6c79207468652061646d696e206d6179207365742074686520746f6e69632d6c696b652064656c65676174656d61726b6574206d6179206f6e6c7920626520696e697469616c697a6564206f6e636545b96fe442630264581b197e84bbada861235052c5a1aadfff9ea4e40a969aa0696e697469616c2065786368616e67652072617465206d7573742062652067726561746572207468616e207a65726f2e73657474696e6720696e7465726573742072617465206d6f64656c206661696c65646f6e6c79207468652061646d696e206d61792063616c6c205f72657369676e496d706c656d656e746174696f6e4c49515549444154455f544543544f4e49435f434f52455f43414c43554c4154455f414d4f554e545f5345495a455f4641494c45444d494e545f4e45575f4143434f554e545f42414c414e43455f43414c43554c4154494f4e5f4641494c4544626f72726f7742616c616e636553746f7265643a20626f72726f7742616c616e636553746f726564496e7465726e616c206661696c6564ca4f2f25d0898edd99413412fb94012f9e54ec8142f9b093e7720646a95b16a952455041595f424f52524f575f4e45575f4143434f554e545f424f52524f575f42414c414e43455f43414c43554c4154494f4e5f4641494c4544ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef52455041595f424f52524f575f4e45575f544f54414c5f42414c414e43455f43414c43554c4154494f4e5f4641494c454465786368616e67655261746553746f7265643a2065786368616e67655261746553746f726564496e7465726e616c206661696c65644d494e545f4e45575f544f54414c5f535550504c595f43414c43554c4154494f4e5f4641494c45445445726332303a3a7377656570546f6b656e3a2063616e206e6f7420737765657020756e6465726c79696e6720746f6b656e6f6e65206f662072656465656d546f6b656e73496e206f722072656465656d416d6f756e74496e206d757374206265207a65726f72656475636520726573657276657320756e657870656374656420756e646572666c6f776f6e6c79207468652061646d696e206d61792063616c6c205f6265636f6d65496d706c656d656e746174696f6ea265627a7a723158208e4cfb863cab7cd4f913190eb578d60bda7cd22bf0cd9713d4b6fba2ceb40c7f64736f6c63430005100032
Deployed ByteCode Sourcemap
122283:1059:0:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;122283:1059:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;7331:18;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:100:-1;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;7331:18:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;50746:237;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;50746:237:0;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;115409:149;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;115409:149:0;;:::i;:::-;;;;;;;;;;;;;;;;123060:279;;;:::i;:::-;;8636:33;;;:::i;54996:224::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;54996:224:0;-1:-1:-1;;;;;54996:224:0;;:::i;9281:23::-;;;:::i;57841:261::-;;;:::i;112671:673::-;;;;;;13:3:-1;8;5:12;2:2;;;30:1;27;20:12;2:2;-1:-1;;;;;112671:673:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;5:28;;2:2;;;46:1;43;36:12;2:2;112671:673:0;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;112671:673:0;;;;;;100:9:-1;95:1;81:12;77:20;67:8;63:35;60:50;-1:-1;;;25:12;22:29;11:107;8:2;;;131:1;128;121:12;8:2;112671:673:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;81:16;;74:27;;;;-1:-1;112671:673:0;;;;;;;;-1:-1:-1;112671:673:0;;-1:-1:-1;;;;;5:28;;2:2;;;46:1;43;36:12;2:2;112671:673:0;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;112671:673:0;;;;;;100:9:-1;95:1;81:12;77:20;67:8;63:35;60:50;-1:-1;;;25:12;22:29;11:107;8:2;;;131:1;128;121:12;8:2;112671:673:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;81:16;;74:27;;;;-1:-1;112671:673:0;;-1:-1:-1;;;112671:673:0;;;;;-1:-1:-1;112671:673:0;;-1:-1:-1;112671:673:0:i;116967:263::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;116967:263:0;-1:-1:-1;;;;;116967:263:0;;:::i;50081:195::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;50081:195:0;;;;;;;;;;;;;;;;;:::i;115846:189::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;115846:189:0;;;;;;;;:::i;8058:35::-;;;:::i;:::-;;;;-1:-1:-1;;;;;8058:35:0;;;;;;;;;;;;;;7527:21;;;:::i;:::-;;;;;;;;;;;;;;;;;;;52014:354;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;52014:354:0;-1:-1:-1;;;;;52014:354:0;;:::i;59722:88::-;;;:::i;117464:119::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;117464:119:0;;:::i;9045:24::-;;;:::i;122601:349::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;122601:349:0;;;;;;;;-1:-1:-1;;;5:28;;2:2;;;46:1;43;36:12;2:2;122601:349:0;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;122601:349:0;;;;;;100:9:-1;95:1;81:12;77:20;67:8;63:35;60:50;-1:-1;;;25:12;22:29;11:107;8:2;;;131:1;128;121:12;8:2;122601:349:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;81:16;;74:27;;;;-1:-1;122601:349:0;;-1:-1:-1;122601:349:0;;-1:-1:-1;;;;;122601:349:0:i;16078:29::-;;;:::i;105217:571::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;105217:571:0;;:::i;10254:56::-;;;:::i;8759:30::-;;;:::i;15125:25::-;;;:::i;51646:112::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;51646:112:0;-1:-1:-1;;;;;51646:112:0;;:::i;54513:192::-;;;:::i;114687:133::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;114687:133:0;;:::i;9175:25::-;;;:::i;7427:20::-;;;:::i;55429:287::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;55429:287:0;-1:-1:-1;;;;;55429:287:0;;:::i;45090:1522::-;;;;;;13:3:-1;8;5:12;2:2;;;30:1;27;20:12;2:2;-1:-1;;;;;45090:1522:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;5:28;;2:2;;;46:1;43;36:12;2:2;45090:1522:0;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;45090:1522:0;;;;;;100:9:-1;95:1;81:12;77:20;67:8;63:35;60:50;-1:-1;;;25:12;22:29;11:107;8:2;;;131:1;128;121:12;8:2;45090:1522:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;81:16;;74:27;;;;-1:-1;45090:1522:0;;;;;;;;-1:-1:-1;45090:1522:0;;-1:-1:-1;;;;;5:28;;2:2;;;46:1;43;36:12;2:2;45090:1522:0;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;45090:1522:0;;;;;;100:9:-1;95:1;81:12;77:20;67:8;63:35;60:50;-1:-1;;;25:12;22:29;11:107;8:2;;;131:1;128;121:12;8:2;45090:1522:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;81:16;;74:27;;;;-1:-1;45090:1522:0;;-1:-1:-1;;;45090:1522:0;;;;;-1:-1:-1;45090:1522:0;;-1:-1:-1;45090:1522:0:i;10468:36::-;;;:::i;113734:133::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;113734:133:0;;:::i;121831:225::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;121831:225:0;-1:-1:-1;;;;;121831:225:0;;:::i;60058:3852::-;;;:::i;49589:185::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;49589:185:0;;;;;;;;:::i;8910:23::-;;;:::i;54183:184::-;;;:::i;92575:194::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;92575:194:0;;;;;;;;;;;;;;;;;:::i;97343:647::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;97343:647:0;-1:-1:-1;;;;;97343:647:0;;:::i;99237:757::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;99237:757:0;-1:-1:-1;;;;;99237:757:0;;:::i;57393:198::-;;;:::i;8184:41::-;;;:::i;52715:703::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;52715:703:0;-1:-1:-1;;;;;52715:703:0;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;115088:113;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;115088:113:0;;:::i;114218:::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;114218:113:0;;:::i;51313:143::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;51313:143:0;;;;;;;;;;:::i;98268:742::-;;;:::i;108181:633::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;108181:633:0;-1:-1:-1;;;;;108181:633:0;;:::i;8327:42::-;;;:::i;116517:237::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;116517:237:0;;;;;;;;;;;;;;;;;:::i;7947:28::-;;;:::i;53846:161::-;;;:::i;100297:607::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;100297:607:0;;:::i;7331:18::-;;;;;;;;;;;;;;;-1:-1:-1;;7331:18:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;50746:237::-;50845:10;50814:4;50866:23;;;:18;:23;;;;;;;;-1:-1:-1;;;;;50866:32:0;;;;;;;;;;;:41;;;50923:30;;;;;;;50814:4;;50845:10;50866:32;;50845:10;;50923:30;;;;;;;;;;;50971:4;50964:11;;;50746:237;;;;;:::o;115409:149::-;115466:4;115484:8;115497:32;115517:11;115497:19;:32::i;:::-;-1:-1:-1;115483:46:0;-1:-1:-1;;115409:149:0;;;;:::o;123060:279::-;123276:5;;;;;-1:-1:-1;;;;;123276:5:0;123262:10;:19;123254:77;;;;-1:-1:-1;;;123254:77:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;123060:279::o;8636:33::-;;;;:::o;54996:224::-;55074:4;111710:11;;;;111702:34;;;;;-1:-1:-1;;;111702:34:0;;;;;;;;;;;;-1:-1:-1;;;111702:34:0;;;;;;;;;;;;;;;111761:5;111747:19;;-1:-1:-1;;111747:19:0;;;55099:16;:14;:16::i;:::-;:40;55091:75;;;;;-1:-1:-1;;;55091:75:0;;;;;;;;;;;;-1:-1:-1;;;55091:75:0;;;;;;;;;;;;;;;55184:28;55204:7;55184:19;:28::i;:::-;55177:35;;111777:1;111789:11;:18;;-1:-1:-1;;111789:18:0;111803:4;111789:18;;;54996:224;;-1:-1:-1;54996:224:0:o;9281:23::-;;;;:::o;57841:261::-;57892:4;57910:13;57925:11;57940:28;:26;:28::i;:::-;57909:59;;-1:-1:-1;57909:59:0;-1:-1:-1;57994:18:0;57987:3;:25;;;;;;;;;57979:91;;;;-1:-1:-1;;;57979:91:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;58088:6;-1:-1:-1;;57841:261:0;;:::o;112671:673::-;113100:101;113117:6;113125:18;113145:28;113175:5;113182:7;113191:9;113100:16;:101::i;:::-;113261:10;:24;;-1:-1:-1;;;;;;113261:24:0;-1:-1:-1;;;;;113261:24:0;;;;;;;;;;;113296:40;;;-1:-1:-1;;;113296:40:0;;;;113311:10;;;;;113296:38;;:40;;;;;;;;;;;;;;;113311:10;113296:40;;;5:2:-1;;;;30:1;27;20:12;5:2;113296:40:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;113296:40:0;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;;;;112671:673:0:o;116967:263::-;117063:10;;-1:-1:-1;;;;;117045:28:0;;;117063:10;;117045:28;;117037:91;;;;-1:-1:-1;;;117037:91:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;117154:30;;;-1:-1:-1;;;117154:30:0;;117178:4;117154:30;;;;;;117136:15;;-1:-1:-1;;;;;117154:15:0;;;;;:30;;;;;;;;;;;;;;;:15;:30;;;5:2:-1;;;;30:1;27;20:12;5:2;117154:30:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;117154:30:0;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;117154:30:0;117207:5;;117192:30;;;-1:-1:-1;;;117192:30:0;;117207:5;;;;-1:-1:-1;;;;;117207:5:0;;;117192:30;;;;;;;;;;;;117154;;-1:-1:-1;117192:14:0;;;;;:30;;;;;-1:-1:-1;;117192:30:0;;;;;;;;-1:-1:-1;117192:14:0;:30;;;5:2:-1;;;;30:1;27;20:12;5:2;117192:30:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;117192:30:0;;;;116967:263;;:::o;50081:195::-;50176:4;111710:11;;;;111702:34;;;;;-1:-1:-1;;;111702:34:0;;;;;;;;;;;;-1:-1:-1;;;111702:34:0;;;;;;;;;;;;;;;111761:5;111747:19;;-1:-1:-1;;111747:19:0;;;50200:44;50215:10;50227:3;50232;50237:6;50200:14;:44::i;:::-;:68;50193:75;;111789:11;:18;;-1:-1:-1;;111789:18:0;111803:4;111789:18;;;50081:195;;-1:-1:-1;;;50081:195:0:o;115846:189::-;115927:4;115945:8;115958:48;115984:8;115994:11;115958:25;:48::i;:::-;-1:-1:-1;115944:62:0;115846:189;-1:-1:-1;;;;115846:189:0:o;8058:35::-;;;-1:-1:-1;;;;;8058:35:0;;:::o;7527:21::-;;;;;;:::o;52014:354::-;52076:4;52093:23;;:::i;:::-;52119:38;;;;;;;;52134:21;:19;:21::i;:::-;52119:38;;-1:-1:-1;;;;;52233:20:0;;52169:14;52233:20;;;:13;:20;;;;;;52093:64;;-1:-1:-1;52169:14:0;;;52201:53;;52093:64;;52201:17;:53::i;:::-;52168:86;;-1:-1:-1;52168:86:0;-1:-1:-1;52281:18:0;52273:4;:26;;;;;;;;;52265:70;;;;;-1:-1:-1;;;52265:70:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;52353:7;52014:354;-1:-1:-1;;;;52014:354:0:o;59722:88::-;59764:4;59788:14;:12;:14::i;:::-;59781:21;;59722:88;:::o;117464:119::-;117520:4;117544:31;117565:9;117544:20;:31::i;9045:24::-;;;;:::o;122601:349::-;122887:5;;;;;-1:-1:-1;;;;;122887:5:0;122873:10;:19;122865:77;;;;-1:-1:-1;;;122865:77:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;122601:349;:::o;16078:29::-;;;-1:-1:-1;;;;;16078:29:0;;:::o;105217:571::-;105292:4;111710:11;;;;111702:34;;;;;-1:-1:-1;;;111702:34:0;;;;;;;;;;;;-1:-1:-1;;;111702:34:0;;;;;;;;;;;;;;;111761:5;111747:19;;-1:-1:-1;;111747:19:0;;;105322:16;:14;:16::i;:::-;105309:29;-1:-1:-1;105353:29:0;;105349:277;;105544:70;105555:5;105549:12;;;;;;;;105563:50;105544:4;:70::i;:::-;105537:77;;;;;105349:277;105746:34;105767:12;105746:20;:34::i;:::-;105739:41;;;111789:11;:18;;-1:-1:-1;;111789:18:0;111803:4;111789:18;;;105217:571;;-1:-1:-1;105217:571:0:o;10254:56::-;10304:6;10254:56;:::o;8759:30::-;;;;:::o;15125:25::-;;;-1:-1:-1;;;;;15125:25:0;;:::o;51646:112::-;-1:-1:-1;;;;;51730:20:0;51703:7;51730:20;;;:13;:20;;;;;;;51646:112::o;54513:192::-;54575:4;111710:11;;;;111702:34;;;;;-1:-1:-1;;;111702:34:0;;;;;;;;;;;;-1:-1:-1;;;111702:34:0;;;;;;;;;;;;;;;111761:5;111747:19;;-1:-1:-1;;111747:19:0;;;54600:16;:14;:16::i;:::-;:40;54592:75;;;;;-1:-1:-1;;;54592:75:0;;;;;;;;;;;;-1:-1:-1;;;54592:75:0;;;;;;;;;;;;;;;-1:-1:-1;54685:12:0;;111789:11;:18;;-1:-1:-1;;111789:18:0;111803:4;111789:18;;;54513:192;:::o;114687:133::-;114750:4;114774:38;114799:12;114774:24;:38::i;9175:25::-;;;;:::o;7427:20::-;;;;;;;;;;;;;;-1:-1:-1;;7427:20:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;55429:287;55496:4;55514:13;55529:11;55544:36;55572:7;55544:27;:36::i;:::-;55513:67;;-1:-1:-1;55513:67:0;-1:-1:-1;55606:18:0;55599:3;:25;;;;;;;;;55591:93;;;;-1:-1:-1;;;55591:93:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;55702:6;55429:287;-1:-1:-1;;;55429:287:0:o;45090:1522::-;45439:5;;;;;-1:-1:-1;;;;;45439:5:0;45425:10;:19;45417:68;;;;-1:-1:-1;;;45417:68:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;45504:18;;:23;:43;;;;-1:-1:-1;45531:11:0;;:16;45504:43;45496:91;;;;-1:-1:-1;;;45496:91:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;45638:27;:58;;;45715:31;45707:92;;;;-1:-1:-1;;;45707:92:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;45845:8;45856:24;45873:6;45856:16;:24::i;:::-;45845:35;-1:-1:-1;45899:27:0;;45891:67;;;;;-1:-1:-1;;;45891:67:0;;;;;;;;;;;;-1:-1:-1;;;45891:67:0;;;;;;;;;;;;;;;46099:16;:14;:16::i;:::-;46078:18;:37;28172:4;46126:11;:25;46251:46;46278:18;46251:26;:46::i;:::-;46245:52;-1:-1:-1;46316:27:0;;46308:74;;;;-1:-1:-1;;;46308:74:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;46395:12;;;;:4;;:12;;;;;:::i;:::-;-1:-1:-1;46418:16:0;;;;:6;;:16;;;;;:::i;:::-;-1:-1:-1;;46445:8:0;:20;;;;;;-1:-1:-1;;46445:20:0;;;;;;:8;46586:18;;;;;46445:20;46586:18;;;-1:-1:-1;;;;;45090:1522:0:o;10468:36::-;10500:4;10468:36;:::o;113734:133::-;113783:4;113801:8;113814:24;113827:10;113814:12;:24::i;121831:225::-;121931:5;;;;;-1:-1:-1;;;;;121931:5:0;121917:10;:19;121909:78;;;;-1:-1:-1;;;121909:78:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;122008:10;;121998:50;;;-1:-1:-1;;;121998:50:0;;-1:-1:-1;;;;;121998:50:0;;;;;;;;;122008:10;;;;;121998:30;;:50;;;;;122008:10;;121998:50;;;;;;;122008:10;;121998:50;;;5:2:-1;;;;30:1;27;20:12;5:2;121998:50:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;121998:50:0;;;;121831:225;:::o;60058:3852::-;60100:4;60166:23;60192:16;:14;:16::i;:::-;60250:18;;60166:42;;-1:-1:-1;60338:45:0;;;60334:105;;;60412:14;60400:27;;;;;;60334:105;60506:14;60523;:12;:14::i;:::-;60568:12;;60612:13;;60660:11;;60768:17;;:71;;;-1:-1:-1;;;60768:71:0;;;;;;;;;;;;;;;;;;;;;;60506:31;;-1:-1:-1;60568:12:0;;60612:13;;60660:11;;60548:17;;-1:-1:-1;;;;;60768:17:0;;;;:31;;:71;;;;;;;;;;;;;;:17;:71;;;5:2:-1;;;;30:1;27;20:12;5:2;60768:71:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;60768:71:0;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;60768:71:0;;-1:-1:-1;7702:9:0;60858:43;;;60850:84;;;;;-1:-1:-1;;;60850:84:0;;;;;;;;;;;;-1:-1:-1;;;60850:84:0;;;;;;;;;;;;;;;61025:17;61044:15;61063:52;61071:18;61091:23;61063:7;:52::i;:::-;61024:91;;-1:-1:-1;61024:91:0;-1:-1:-1;61145:18:0;61134:7;:29;;;;;;;;;61126:73;;;;;-1:-1:-1;;;61126:73:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;61691:31;;:::i;:::-;61733:24;61768:20;61799:21;61831:19;61897:58;61907:35;;;;;;;;61922:18;61907:35;;;61944:10;61897:9;:58::i;:::-;61863:92;;-1:-1:-1;61863:92:0;-1:-1:-1;61981:18:0;61970:7;:29;;;;;;;;;61966:183;;62023:114;62034:16;62052:69;62128:7;62123:13;;;;;;;;62023:10;:114::i;:::-;62016:121;;;;;;;;;;;;;;;;;;61966:183;62194:53;62212:20;62234:12;62194:17;:53::i;:::-;62161:86;;-1:-1:-1;62161:86:0;-1:-1:-1;62273:18:0;62262:7;:29;;;;;;;;;62258:181;;62315:112;62326:16;62344:67;62418:7;62413:13;;;;;;;62258:181;62480:42;62488:19;62509:12;62480:7;:42::i;:::-;62451:71;;-1:-1:-1;62451:71:0;-1:-1:-1;62548:18:0;62537:7;:29;;;;;;;;;62533:178;;62590:109;62601:16;62619:64;62690:7;62685:13;;;;;;;62533:178;62753:100;62778:38;;;;;;;;62793:21;;62778:38;;;62818:19;62839:13;62753:24;:100::i;:::-;62723:130;;-1:-1:-1;62723:130:0;-1:-1:-1;62879:18:0;62868:7;:29;;;;;;;;;62864:179;;62921:110;62932:16;62950:65;63022:7;63017:13;;;;;;;62864:179;63083:82;63108:20;63130:16;63148;63083:24;:82::i;:::-;63055:110;;-1:-1:-1;63055:110:0;-1:-1:-1;63191:18:0;63180:7;:29;;;;;;;;;63176:177;;63233:108;63244:16;63262:63;63332:7;63327:13;;;;;;;63176:177;63556:18;:39;;;63606:11;:28;;;63645:12;:30;;;63686:13;:32;;;63783:79;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;63887:14;63875:27;;;;;;;;;;;;;;;;60058:3852;:::o;49589:185::-;49667:4;111710:11;;;;111702:34;;;;;-1:-1:-1;;;111702:34:0;;;;;;;;;;;;-1:-1:-1;;;111702:34:0;;;;;;;;;;;;;;;111761:5;111747:19;;-1:-1:-1;;111747:19:0;;;49691:51;49706:10;49718;49730:3;49735:6;49691:14;:51::i;:::-;:75;49684:82;;111789:11;:18;;-1:-1:-1;;111789:18:0;111803:4;111789:18;;;49589:185;;-1:-1:-1;;49589:185:0:o;8910:23::-;;;;:::o;54183:184::-;54260:17;;54236:4;;-1:-1:-1;;;;;54260:17:0;:31;54292:14;:12;:14::i;:::-;54308:12;;54322:13;;54337:21;;54260:99;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;54260:99:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;54260:99:0;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;54260:99:0;;-1:-1:-1;54183:184:0;:::o;92575:194::-;92677:4;111710:11;;;;111702:34;;;;;-1:-1:-1;;;111702:34:0;;;;;;;;;;;;-1:-1:-1;;;111702:34:0;;;;;;;;;;;;;;;111761:5;111747:19;;-1:-1:-1;;111747:19:0;;;92701:60;92715:10;92727;92739:8;92749:11;92701:13;:60::i;:::-;92694:67;;111789:11;:18;;-1:-1:-1;;111789:18:0;111803:4;111789:18;;;92575:194;;-1:-1:-1;;;92575:194:0:o;97343:647::-;97488:5;;97420:4;;97488:5;;;-1:-1:-1;;;;;97488:5:0;97474:10;:19;97470:126;;97517:67;97522:18;97542:41;97517:4;:67::i;:::-;97510:74;;;;97470:126;97695:12;;;-1:-1:-1;;;;;97778:30:0;;;-1:-1:-1;;;;;;97778:30:0;;;;;;;97893:49;;;97695:12;;;;97893:49;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;97893:49:0;;;;;;;;;;97967:14;97955:27;97343:647;-1:-1:-1;;;97343:647:0:o;99237:757::-;99387:5;;99318:4;;99387:5;;;-1:-1:-1;;;;;99387:5:0;99373:10;:19;99369:126;;99416:67;99421:18;99441:41;99416:4;:67::i;99369:126::-;99547:12;;99647:32;;;-1:-1:-1;;;99647:32:0;;;;-1:-1:-1;;;;;99547:12:0;;;;99647:30;;;;;:32;;;;;;;;;;;;;;:30;:32;;;5:2:-1;;;;30:1;27;20:12;5:2;99647:32:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;99647:32:0;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;99647:32:0;99639:73;;;;;-1:-1:-1;;;99639:73:0;;;;;;;;;;;;-1:-1:-1;;;99639:73:0;;;;;;;;;;;;;;;99782:12;:30;;-1:-1:-1;;;;;;99782:30:0;-1:-1:-1;;;;;99782:30:0;;;;;;;;;99897:49;;;;;;;;;;;;;;;;;;;;;;;;;;;99971:14;99966:20;;57393:198;57453:4;111710:11;;;;111702:34;;;;;-1:-1:-1;;;111702:34:0;;;;;;;;;;;;-1:-1:-1;;;111702:34:0;;;;;;;;;;;;;;;111761:5;111747:19;;-1:-1:-1;;111747:19:0;;;57478:16;:14;:16::i;:::-;:40;57470:75;;;;;-1:-1:-1;;;57470:75:0;;;;;;;;;;;;-1:-1:-1;;;57470:75:0;;;;;;;;;;;;;;;57563:20;:18;:20::i;:::-;57556:27;;111789:11;:18;;-1:-1:-1;;111789:18:0;111803:4;111789:18;;;57393:198;:::o;8184:41::-;;;-1:-1:-1;;;;;8184:41:0;;:::o;52715:703::-;-1:-1:-1;;;;;52839:22:0;;52783:4;52839:22;;;:13;:22;;;;;;52783:4;;;;;;;;;52990:36;52853:7;52990:27;:36::i;:::-;52966:60;-1:-1:-1;52966:60:0;-1:-1:-1;53049:18:0;53041:4;:26;;;;;;;;;53037:99;;53097:16;53092:22;53084:40;-1:-1:-1;53116:1:0;;-1:-1:-1;53116:1:0;;-1:-1:-1;53116:1:0;;-1:-1:-1;53084:40:0;;-1:-1:-1;;;;53084:40:0;53037:99;53179:28;:26;:28::i;:::-;53148:59;-1:-1:-1;53148:59:0;-1:-1:-1;53230:18:0;53222:4;:26;;;;;;;;;53218:99;;53278:16;53273:22;;53218:99;-1:-1:-1;53342:14:0;;-1:-1:-1;53359:13:0;;-1:-1:-1;53374:13:0;-1:-1:-1;53374:13:0;-1:-1:-1;52715:703:0;;;;;;:::o;115088:113::-;115141:4;115165:28;115180:12;115165:14;:28::i;114218:113::-;114271:4;114295:28;114310:12;114295:14;:28::i;51313:143::-;-1:-1:-1;;;;;51414:25:0;;;51387:7;51414:25;;;:18;:25;;;;;;;;:34;;;;;;;;;;;;;51313:143::o;98268:742::-;98418:12;;98310:4;;-1:-1:-1;;;;;98418:12:0;98404:10;:26;;;:54;;-1:-1:-1;98434:10:0;:24;98404:54;98400:164;;;98482:70;98487:18;98507:44;98482:4;:70::i;:::-;98475:77;;;;98400:164;98648:5;;;98690:12;;;-1:-1:-1;;;;;98690:12:0;;;98648:5;98763:20;;;-1:-1:-1;;;;;;98763:20:0;;;;;;;-1:-1:-1;;;;;;98832:25:0;;;;;;98875;;;98648:5;;;;;;98875:25;;;98894:5;;;;;98875:25;;;;;;98648:5;;98690:12;;98875:25;;;;;;;;;98949:12;;98916:46;;;-1:-1:-1;;;;;98916:46:0;;;;;98949:12;;;98916:46;;;;;;-1:-1:-1;;;;;;;;;;;98916:46:0;;;;;;;;;98987:14;98975:27;;;;98268:742;:::o;108181:633::-;108268:4;108285:10;108298:16;:14;:16::i;:::-;108285:29;-1:-1:-1;108329:29:0;;108325:298;;108533:78;108544:5;108538:12;;;;;;;;108552:58;108533:4;:78::i;:::-;108526:85;;;;;108325:298;108758:48;108785:20;108758:26;:48::i;8327:42::-;;;-1:-1:-1;;;;;8327:42:0;;:::o;116517:237::-;116630:4;116648:8;116661:64;116685:8;116695:11;116708:16;116661:23;:64::i;:::-;-1:-1:-1;116647:78:0;116517:237;-1:-1:-1;;;;;116517:237:0:o;7947:28::-;;;;;;-1:-1:-1;;;;;7947:28:0;;:::o;53846:161::-;53923:17;;53899:4;;-1:-1:-1;;;;;53923:17:0;:31;53955:14;:12;:14::i;:::-;53971:12;;53985:13;;53923:76;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;100297:607:0;100386:4;111710:11;;;;111702:34;;;;;-1:-1:-1;;;111702:34:0;;;;;;;;;;;;-1:-1:-1;;;111702:34:0;;;;;;;;;;;;;;;111761:5;111747:19;;-1:-1:-1;;111747:19:0;;;100416:16;:14;:16::i;:::-;100403:29;-1:-1:-1;100447:29:0;;100443:286;;100644:73;100655:5;100649:12;;;;;;;;100663:53;100644:4;:73::i;100443:286::-;100848:48;100871:24;100848:22;:48::i;80609:572::-;80687:4;111710:11;;80687:4;;111710:11;;111702:34;;;;;-1:-1:-1;;;111702:34:0;;;;;;;;;;;;-1:-1:-1;;;111702:34:0;;;;;;;;;;;;;;;111761:5;111747:19;;-1:-1:-1;;111747:19:0;;;80723:16;:14;:16::i;:::-;80710:29;-1:-1:-1;80754:29:0;;80750:260;;80927:67;80938:5;80932:12;;;;;;;;80946:47;80927:4;:67::i;:::-;80919:79;-1:-1:-1;80996:1:0;;-1:-1:-1;80919:79:0;;-1:-1:-1;80919:79:0;80750:260;81120:53;81137:10;81149;81161:11;81120:16;:53::i;:::-;81113:60;;;;;111777:1;111789:11;:18;;-1:-1:-1;;111789:18:0;111803:4;111789:18;;;80609:572;;;;-1:-1:-1;80609:572:0:o;58366:1186::-;58475:11;;58427:9;;;;58501:17;58497:1048;;-1:-1:-1;;58695:27:0;;58675:18;;-1:-1:-1;58667:56:0;;58497:1048;58905:14;58922;:12;:14::i;:::-;58905:31;;58951:33;58999:23;;:::i;:::-;59037:17;59113:54;59128:9;59139:12;;59153:13;;59113:14;:54::i;:::-;59071:96;-1:-1:-1;59071:96:0;-1:-1:-1;59197:18:0;59186:7;:29;;;;;;;;;59182:89;;59244:7;-1:-1:-1;59253:1:0;;-1:-1:-1;59236:19:0;;-1:-1:-1;;;;59236:19:0;59182:89;59313:50;59320:28;59350:12;59313:6;:50::i;:::-;59287:76;-1:-1:-1;59287:76:0;-1:-1:-1;59393:18:0;59382:7;:29;;;;;;;;;59378:89;;59440:7;-1:-1:-1;59449:1:0;;-1:-1:-1;59432:19:0;;-1:-1:-1;;;;59432:19:0;59378:89;-1:-1:-1;59511:21:0;59491:18;;-1:-1:-1;59511:21:0;-1:-1:-1;59483:50:0;;-1:-1:-1;;;59483:50:0;58366:1186;;;:::o;47075:2253::-;47249:12;;:61;;;-1:-1:-1;;;47249:61:0;;47286:4;47249:61;;;;-1:-1:-1;;;;;47249:61:0;;;;;;;;;;;;;;;;;;;;;;47173:4;;;;47249:12;;:28;;:61;;;;;;;;;;;;;;47173:4;47249:12;:61;;;5:2:-1;;;;30:1;27;20:12;5:2;47249:61:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;47249:61:0;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;47249:61:0;;-1:-1:-1;47325:12:0;;47321:148;;47361:96;47372:29;47403:44;47449:7;47361:10;:96::i;:::-;47354:103;;;;;47321:148;47535:3;-1:-1:-1;;;;;47528:10:0;:3;-1:-1:-1;;;;;47528:10:0;;47524:105;;;47562:55;47567:15;47584:32;47562:4;:55::i;47524:105::-;47706:22;-1:-1:-1;;;;;47747:14:0;;;;;;;47743:160;;;-1:-1:-1;;;47743:160:0;;;-1:-1:-1;;;;;;47859:23:0;;;;;;;:18;:23;;;;;;;;:32;;;;;;;;;;47743:160;47981:17;48009;48037;48065;48121:34;48129:17;48148:6;48121:7;:34::i;:::-;48095:60;;-1:-1:-1;48095:60:0;-1:-1:-1;48181:18:0;48170:7;:29;;;;;;;;;48166:125;;48223:56;48228:16;48246:32;48223:4;:56::i;:::-;48216:63;;;;;;;;;;48166:125;-1:-1:-1;;;;;48337:18:0;;;;;;:13;:18;;;;;;48329:35;;48357:6;48329:7;:35::i;:::-;48303:61;;-1:-1:-1;48303:61:0;-1:-1:-1;48390:18:0;48379:7;:29;;;;;;;;;48375:124;;48432:55;48437:16;48455:31;48432:4;:55::i;48375:124::-;-1:-1:-1;;;;;48545:18:0;;;;;;:13;:18;;;;;;48537:35;;48565:6;48537:7;:35::i;:::-;48511:61;;-1:-1:-1;48511:61:0;-1:-1:-1;48598:18:0;48587:7;:29;;;;;;;;;48583:122;;48640:53;48645:16;48663:29;48640:4;:53::i;48583:122::-;-1:-1:-1;;;;;48838:18:0;;;;;;;:13;:18;;;;;;:33;;;48882:18;;;;;;:33;;;-1:-1:-1;;48988:29:0;;48984:109;;-1:-1:-1;;;;;49034:23:0;;;;;;;:18;:23;;;;;;;;:32;;;;;;;;;:47;;;48984:109;49164:3;-1:-1:-1;;;;;49150:26:0;49159:3;-1:-1:-1;;;;;49150:26:0;-1:-1:-1;;;;;;;;;;;49169:6:0;49150:26;;;;;;;;;;;;;;;;;;-1:-1:-1;49305:14:0;;47075:2253;-1:-1:-1;;;;;;;;;;47075:2253:0:o;81514:594::-;81616:4;111710:11;;81616:4;;111710:11;;111702:34;;;;;-1:-1:-1;;;111702:34:0;;;;;;;;;;;;-1:-1:-1;;;111702:34:0;;;;;;;;;;;;;;;111761:5;111747:19;;-1:-1:-1;;111747:19:0;;;81652:16;:14;:16::i;:::-;81639:29;-1:-1:-1;81683:29:0;;81679:260;;81856:67;81867:5;81861:12;;;;;;;;81875:47;81856:4;:67::i;:::-;81848:79;-1:-1:-1;81925:1:0;;-1:-1:-1;81848:79:0;;-1:-1:-1;81848:79:0;81679:260;82049:51;82066:10;82078:8;82088:11;82049:16;:51::i;:::-;82042:58;;;;;111777:1;111789:11;:18;;-1:-1:-1;;111789:18:0;111803:4;111789:18;;;81514:594;;;;-1:-1:-1;81514:594:0;-1:-1:-1;81514:594:0:o;36999:313::-;37076:9;37087:4;37105:13;37120:18;;:::i;:::-;37142:20;37152:1;37155:6;37142:9;:20::i;:::-;37104:58;;-1:-1:-1;37104:58:0;-1:-1:-1;37184:18:0;37177:3;:25;;;;;;;;;37173:73;;-1:-1:-1;37227:3:0;-1:-1:-1;37232:1:0;;-1:-1:-1;37219:15:0;;37173:73;37266:18;37286:17;37295:7;37286:8;:17::i;:::-;37258:46;;;;;;36999:313;;;;;;:::o;117851:169::-;117953:10;;117982:30;;;-1:-1:-1;;;117982:30:0;;118006:4;117982:30;;;;;;117898:4;;-1:-1:-1;;;;;117953:10:0;;;;117982:15;;:30;;;;;;;;;;;;;;;117953:10;117982:30;;;5:2:-1;;;;30:1;27;20:12;5:2;117982:30:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;117982:30:0;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;117982:30:0;;-1:-1:-1;;117851:169:0;:::o;102401:590::-;102478:4;111710:11;;;;111702:34;;;;;-1:-1:-1;;;111702:34:0;;;;;;;;;;;;-1:-1:-1;;;111702:34:0;;;;;;;;;;;;;;;111761:5;111747:19;;-1:-1:-1;;111747:19:0;;;102508:16;:14;:16::i;:::-;102495:29;-1:-1:-1;102539:29:0;;102535:274;;102730:67;102741:5;102735:12;;;;;;;;102749:47;102730:4;:67::i;102535:274::-;102932:28;102950:9;102932:17;:28::i;:::-;-1:-1:-1;102920:40:0;-1:-1:-1;;111789:11:0;:18;;-1:-1:-1;;111789:18:0;111803:4;111789:18;;;102401:590;;-1:-1:-1;102401:590:0:o;24917:153::-;24978:4;-1:-1:-1;;;;;;;;;;;25013:3:0;25008:9;;;;;;;;25024:4;25019:10;;;;;;;;25000:33;;;;;;;;;;;;;25031:1;25000:33;;;;;;;;;;;;;25058:3;25053:9;;;;;;;106065:1747;106276:5;;106132:4;;;;106276:5;;;-1:-1:-1;;;;;106276:5:0;106262:10;:19;106258:124;;106305:65;106310:18;106330:39;106305:4;:65::i;106258:124::-;106508:16;:14;:16::i;:::-;106486:18;;:38;106482:147;;106548:69;106553:22;106577:39;106548:4;:69::i;106482:147::-;106735:12;106718:14;:12;:14::i;:::-;:29;106714:152;;;106771:83;106776:29;106807:46;106771:4;:83::i;106714:152::-;106960:13;;106945:12;:28;106941:129;;;106997:61;107002:15;107019:38;106997:4;:61::i;106941:129::-;-1:-1:-1;107222:13:0;;:28;;;;107358:33;;;107350:82;;;;-1:-1:-1;;;107350:82:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;107506:13;:32;;;107672:5;;107658:34;;107672:5;;;-1:-1:-1;;;;;107672:5:0;107679:12;107658:13;:34::i;:::-;107726:5;;107710:54;;;107726:5;;;;-1:-1:-1;;;;;107726:5:0;107710:54;;;;;;;;;;;;;;;;;;;;;;;;;107789:14;107784:20;;70036:537;70120:4;111710:11;;;;111702:34;;;;;-1:-1:-1;;;111702:34:0;;;;;;;;;;;;-1:-1:-1;;;111702:34:0;;;;;;;;;;;;;;;111761:5;111747:19;;-1:-1:-1;;111747:19:0;;;70150:16;:14;:16::i;:::-;70137:29;-1:-1:-1;70181:29:0;;70177:249;;70353:61;70364:5;70358:12;;;;;;;;70372:41;70353:4;:61::i;70177:249::-;70525:40;70537:10;70549:1;70552:12;70525:11;:40::i;55970:1268::-;-1:-1:-1;;;;;56319:23:0;;56047:9;56319:23;;;:14;:23;;;;;56548:24;;56047:9;;;;;;;;56544:92;;-1:-1:-1;56602:18:0;;-1:-1:-1;56602:18:0;;-1:-1:-1;56594:30:0;;-1:-1:-1;;;56594:30:0;56544:92;56863:46;56871:14;:24;;;56897:11;;56863:7;:46::i;:::-;56830:79;;-1:-1:-1;56830:79:0;-1:-1:-1;56935:18:0;56924:7;:29;;;;;;;;;56920:81;;-1:-1:-1;56978:7:0;;-1:-1:-1;56987:1:0;;-1:-1:-1;56970:19:0;;-1:-1:-1;;56970:19:0;56920:81;57033:58;57041:19;57062:14;:28;;;57033:7;:58::i;:::-;57013:78;;-1:-1:-1;57013:78:0;-1:-1:-1;57117:18:0;57106:7;:29;;;;;;;;;57102:81;;-1:-1:-1;57160:7:0;;-1:-1:-1;57169:1:0;;-1:-1:-1;57152:19:0;;-1:-1:-1;;57152:19:0;57102:81;-1:-1:-1;57203:18:0;;-1:-1:-1;57223:6:0;-1:-1:-1;;;55970:1268:0;;;;:::o;53577:93::-;53650:12;53577:93;:::o;109144:1299::-;109444:5;;109238:4;;;;109444:5;;;-1:-1:-1;;;;;109444:5:0;109430:10;:19;109426:132;;109473:73;109478:18;109498:47;109473:4;:73::i;109426:132::-;109684:16;:14;:16::i;:::-;109662:18;;:38;109658:155;;109724:77;109729:22;109753:47;109724:4;:77::i;109658:155::-;109907:17;;;;;;;;;-1:-1:-1;;;;;109907:17:0;109884:40;;110027:20;-1:-1:-1;;;;;110027:40:0;;:42;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;110027:42:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;110027:42:0;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;110027:42:0;110019:83;;;;;-1:-1:-1;;;110019:83:0;;;;;;;;;;;;-1:-1:-1;;;110019:83:0;;;;;;;;;;;;;;;110179:17;:40;;-1:-1:-1;;;;;;110179:40:0;-1:-1:-1;;;;;110179:40:0;;;;;;;;;110325:70;;;;;;;;;;;;;;;;;;;;;;;;;;;110420:14;110415:20;;64308:547;64378:4;111710:11;;64378:4;;111710:11;;111702:34;;;;;-1:-1:-1;;;111702:34:0;;;;;;;;;;;;-1:-1:-1;;;111702:34:0;;;;;;;;;;;;;;;111761:5;111747:19;;-1:-1:-1;;111747:19:0;;;64414:16;:14;:16::i;:::-;64401:29;-1:-1:-1;64445:29:0;;64441:252;;64618:59;64629:5;64623:12;;;;;;;;64637:39;64618:4;:59::i;64441:252::-;64814:33;64824:10;64836;64814:9;:33::i;26780:236::-;26836:9;26847:4;26873:1;26868;:6;26864:145;;-1:-1:-1;26899:18:0;;-1:-1:-1;26919:5:0;;;26891:34;;26864:145;-1:-1:-1;26966:27:0;;-1:-1:-1;26995:1:0;26958:39;;36533:353;36602:9;36613:10;;:::i;:::-;36637:14;36653:19;36676:27;36684:1;:10;;;36696:6;36676:7;:27::i;:::-;36636:67;;-1:-1:-1;36636:67:0;-1:-1:-1;36726:18:0;36718:4;:26;;;;;;;;;36714:92;;-1:-1:-1;36775:18:0;;;;;;;;;-1:-1:-1;36775:18:0;;36769:4;;-1:-1:-1;36775:18:0;-1:-1:-1;36761:33:0;;36714:92;36846:31;;;;;;;;;;;;-1:-1:-1;;36846:31:0;;-1:-1:-1;36533:353:0;-1:-1:-1;;;;36533:353:0:o;25193:187::-;25278:4;-1:-1:-1;;;;;;;;;;;25313:3:0;25308:9;;;;;;;;25324:4;25319:10;;;;;;;;25300:43;;;;;;;;;;;;;;;;;;;;;;;;;;;;25368:3;25363:9;;;;;;;27101:258;27157:9;;27194:5;;;27216:6;;;27212:140;;27247:18;;-1:-1:-1;27267:1:0;-1:-1:-1;27239:30:0;;27212:140;-1:-1:-1;27310:26:0;;-1:-1:-1;27338:1:0;;-1:-1:-1;27302:38:0;;37457:328;37554:9;37565:4;37583:13;37598:18;;:::i;:::-;37620:20;37630:1;37633:6;37620:9;:20::i;:::-;37582:58;;-1:-1:-1;37582:58:0;-1:-1:-1;37662:18:0;37655:3;:25;;;;;;;;;37651:73;;-1:-1:-1;37705:3:0;-1:-1:-1;37710:1:0;;-1:-1:-1;37697:15:0;;37651:73;37743:34;37751:17;37760:7;37751:8;:17::i;:::-;37770:6;37743:7;:34::i;:::-;37736:41;;;;;;37457:328;;;;;;;:::o;93791:3103::-;93982:12;;:88;;;-1:-1:-1;;;93982:88:0;;94016:4;93982:88;;;;-1:-1:-1;;;;;93982:88:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;93909:4;;;;93982:12;;:25;;:88;;;;;;;;;;;;;;93909:4;93982:12;:88;;;5:2:-1;;;;30:1;27;20:12;5:2;93982:88:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;93982:88:0;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;93982:88:0;;-1:-1:-1;94085:12:0;;94081:155;;94121:103;94132:29;94163:51;94216:7;94121:10;:103::i;94081:155::-;94309:10;-1:-1:-1;;;;;94297:22:0;:8;-1:-1:-1;;;;;94297:22:0;;94293:146;;;94343:84;94348:26;94376:50;94343:4;:84::i;94293:146::-;94451:34;;:::i;:::-;-1:-1:-1;;;;;94822:23:0;;;;;;:13;:23;;;;;;94814:45;;94847:11;94814:7;:45::i;:::-;94788:22;;;94773:86;;;94774:4;94773:86;;;;;;;;;;;;;;;;;;;-1:-1:-1;94890:18:0;;-1:-1:-1;94874:12:0;;:34;;;;;;;;;94870:176;;94932:102;94943:16;94961:52;95020:4;:12;;;95015:18;;;;;;;94932:102;94925:109;;;;;;94870:176;95085:62;95090:11;95103:43;;;;;;;;10304:6;95103:43;;;95085:4;:62::i;:::-;95058:24;;;:89;;;95187:43;;95192:11;;95187:4;:43::i;:::-;95158:26;;;:72;95287:28;:26;:28::i;:::-;95258:25;;;95243:72;;;95244:4;95243:72;;;;;;;;;;;;;;;;;;;-1:-1:-1;95350:18:0;;-1:-1:-1;95334:12:0;;:34;;;;;;;;;95326:71;;;;;-1:-1:-1;;;95326:71:0;;;;;;;;;;;;-1:-1:-1;;;95326:71:0;;;;;;;;;;;;;;;95437:88;95456:42;;;;;;;;95471:4;:25;;;95456:42;;;95500:4;:24;;;95437:18;:88::i;:::-;95410:24;;;:115;;;95567:13;;95562:45;;:4;:45::i;:::-;95538:21;;;:69;95645:11;;95658:24;;;;95640:43;;95645:11;95640:4;:43::i;:::-;95618:19;;;:65;-1:-1:-1;;;;;95747:25:0;;;;;;:13;:25;;;;;;95774:26;;;;95739:62;;95747:25;95739:7;:62::i;:::-;95711:24;;;95696:105;;;95697:4;95696:105;;;;;;;;;;;;;;;;;;;-1:-1:-1;95832:18:0;;-1:-1:-1;95816:12:0;;:34;;;;;;;;;95812:176;;95874:102;95885:16;95903:52;95962:4;:12;;;95957:18;;;;;;;95812:176;96207:21;;;;96191:13;:37;96253:19;;;;96239:11;:33;96309:22;;;;;-1:-1:-1;;;;;96283:23:0;;;-1:-1:-1;96283:23:0;;;:13;:23;;;;;;:48;;;;96370:24;;;;96342:25;;;;;;;;;;:52;;;;96480:26;;;;96449:58;;;;;;;96342:25;;96283:23;;-1:-1:-1;;;;;;;;;;;96449:58:0;;;;;;;;;;96557:24;;;;96523:59;;;;;;;96550:4;;-1:-1:-1;;;;;96523:59:0;;;-1:-1:-1;;;;;;;;;;;96523:59:0;;;;;;;;96627:24;;;;96653:21;;;;96598:77;;;96620:4;96598:77;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;96598:77:0;;;;;;;;96871:14;96859:27;93791:3103;-1:-1:-1;;;;;;;93791:3103:0:o;76334:524::-;76408:4;111710:11;;;;111702:34;;;;;-1:-1:-1;;;111702:34:0;;;;;;;;;;;;-1:-1:-1;;;111702:34:0;;;;;;;;;;;;;;;111761:5;111747:19;;-1:-1:-1;;111747:19:0;;;76438:16;:14;:16::i;:::-;76425:29;-1:-1:-1;76469:29:0;;76465:249;;76641:61;76652:5;76646:12;;;;;;;;76660:41;76641:4;:61::i;76465:249::-;76813:37;76825:10;76837:12;76813:11;:37::i;69129:527::-;69203:4;111710:11;;;;111702:34;;;;;-1:-1:-1;;;111702:34:0;;;;;;;;;;;;-1:-1:-1;;;111702:34:0;;;;;;;;;;;;;;;111761:5;111747:19;;-1:-1:-1;;111747:19:0;;;69233:16;:14;:16::i;:::-;69220:29;-1:-1:-1;69264:29:0;;69260:249;;69436:61;69447:5;69441:12;;;;;;;69260:249;69608:40;69620:10;69632:12;69646:1;69608:11;:40::i;86786:994::-;86920:4;111710:11;;86920:4;;111710:11;;111702:34;;;;;-1:-1:-1;;;111702:34:0;;;;;;;;;;;;-1:-1:-1;;;111702:34:0;;;;;;;;;;;;;;;111761:5;111747:19;;-1:-1:-1;;111747:19:0;;;86956:16;:14;:16::i;:::-;86943:29;-1:-1:-1;86987:29:0;;86983:269;;87165:71;87176:5;87170:12;;;;;;;;87184:51;87165:4;:71::i;:::-;87157:83;-1:-1:-1;87238:1:0;;-1:-1:-1;87157:83:0;;-1:-1:-1;87157:83:0;86983:269;87272:16;-1:-1:-1;;;;;87272:31:0;;:33;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;87272:33:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;87272:33:0;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;87272:33:0;;-1:-1:-1;87320:29:0;;87316:273;;87498:75;87509:5;87503:12;;;;;;;;87517:55;87498:4;:75::i;87316:273::-;87699:73;87720:10;87732:8;87742:11;87755:16;87699:20;:73::i;:::-;87692:80;;;;;111777:1;111789:11;:18;;-1:-1:-1;;111789:18:0;111803:4;111789:18;;;86786:994;;;;-1:-1:-1;86786:994:0;-1:-1:-1;;86786:994:0:o;101172:973::-;101322:5;;101253:4;;101322:5;;;-1:-1:-1;;;;;101322:5:0;101308:10;:19;101304:127;;101351:68;101356:18;101376:42;101351:4;:68::i;101304:127::-;101538:16;:14;:16::i;:::-;101516:18;;:38;101512:150;;101578:72;101583:22;101607:42;101578:4;:72::i;101512:150::-;7868:4;101734:24;:51;101730:157;;;101809:66;101814:15;101831:43;101809:4;:66::i;101730:157::-;101931:21;;;101963:48;;;;102029:68;;;;;;;;;;;;;;;;;;;;;;;;;102122:14;102117:20;;82813:3446;82993:12;;:76;;;-1:-1:-1;;;82993:76:0;;83033:4;82993:76;;;;-1:-1:-1;;;;;82993:76:0;;;;;;;;;;;;;;;;;;;;;;82908:4;;;;;;82993:12;;;:31;;:76;;;;;;;;;;;;;;;82908:4;82993:12;:76;;;5:2:-1;;;;30:1;27;20:12;5:2;82993:76:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;82993:76:0;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;82993:76:0;;-1:-1:-1;83084:12:0;;83080:157;;83121:100;83132:29;83163:48;83213:7;83121:10;:100::i;:::-;83113:112;-1:-1:-1;83223:1:0;;-1:-1:-1;83113:112:0;;-1:-1:-1;83113:112:0;83080:157;83347:16;:14;:16::i;:::-;83325:18;;:38;83321:153;;83388:70;83393:22;83417:40;83388:4;:70::i;83321:153::-;83486:32;;:::i;:::-;-1:-1:-1;;;;;83632:24:0;;;;;;:14;:24;;;;;:38;;;83611:18;;;:59;83801:37;83647:8;83801:27;:37::i;:::-;83778:19;;;83763:75;;;83764:12;;;83763:75;;;;;;;;;;;;;;;;;;;-1:-1:-1;83869:18:0;;-1:-1:-1;83853:4:0;:12;;;:34;;;;;;;;;83849:192;;83912:113;83923:16;83941:63;84011:4;:12;;;84006:18;;;;;;;83912:113;83904:125;-1:-1:-1;84027:1:0;;-1:-1:-1;83904:125:0;;-1:-1:-1;;83904:125:0;83849:192;-1:-1:-1;;84123:11:0;:23;84119:157;;;84182:19;;;;84163:16;;;:38;84119:157;;;84234:16;;;:30;;;84119:157;84874:37;84887:5;84894:4;:16;;;84874:12;:37::i;:::-;84849:22;;;:62;;;85221:19;;;;85213:52;;:7;:52::i;:::-;85187:22;;;85172:93;;;85173:12;;;85172:93;;;;;;;;;;;;;;;;;;;-1:-1:-1;85300:18:0;;-1:-1:-1;85284:4:0;:12;;;:34;;;;;;;;;85276:105;;;;-1:-1:-1;;;85276:105:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;85433:45;85441:12;;85455:4;:22;;;85433:7;:45::i;:::-;85409:20;;;85394:84;;;85395:12;;;85394:84;;;;;;;;;;;;;;;;;;;-1:-1:-1;85513:18:0;;-1:-1:-1;85497:4:0;:12;;;:34;;;;;;;;;85489:96;;;;-1:-1:-1;;;85489:96:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;85705:22;;;;;;-1:-1:-1;;;;;85668:24:0;;;;;;;:14;:24;;;;;;;;;:59;;;85779:11;;85738:38;;;;:52;;;;85816:20;;;;85801:12;:35;;;85926:22;;;;85950;;85897:98;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;86228:22;;;86211:14;;86228:22;;-1:-1:-1;82813:3446:0;-1:-1:-1;;;;;82813:3446:0:o;27428:271::-;27499:9;27510:4;27528:14;27544:8;27556:13;27564:1;27567;27556:7;:13::i;:::-;27527:42;;-1:-1:-1;27527:42:0;-1:-1:-1;27594:18:0;27586:4;:26;;;;;;;;;27582:75;;-1:-1:-1;27637:4:0;-1:-1:-1;27643:1:0;;-1:-1:-1;27629:16:0;;27582:75;27676:15;27684:3;27689:1;27676:7;:15::i;35292:515::-;35353:9;35364:10;;:::i;:::-;35388:14;35404:20;35428:22;35436:3;28172:4;35428:7;:22::i;:::-;35387:63;;-1:-1:-1;35387:63:0;-1:-1:-1;35473:18:0;35465:4;:26;;;;;;;;;35461:92;;-1:-1:-1;35522:18:0;;;;;;;;;-1:-1:-1;35522:18:0;;35516:4;;-1:-1:-1;35522:18:0;-1:-1:-1;35508:33:0;;35461:92;35566:14;35582:13;35599:31;35607:15;35624:5;35599:7;:31::i;:::-;35565:65;;-1:-1:-1;35565:65:0;-1:-1:-1;35653:18:0;35645:4;:26;;;;;;;;;35641:92;;-1:-1:-1;35702:18:0;;;;;;;;;-1:-1:-1;35702:18:0;;35696:4;;-1:-1:-1;35702:18:0;-1:-1:-1;35688:33:0;;-1:-1:-1;;35688:33:0;35641:92;35773:25;;;;;;;;;;;;-1:-1:-1;;35773:25:0;;-1:-1:-1;35292:515:0;-1:-1:-1;;;;;;35292:515:0:o;28568:213::-;28750:12;28172:4;28750:23;;;28568:213::o;103331:1631::-;103392:4;103398;103459:21;103491:20;103638:16;:14;:16::i;:::-;103616:18;;:38;103612:163;;103679:66;103684:22;103708:36;103679:4;:66::i;:::-;103671:92;-1:-1:-1;103747:15:0;-1:-1:-1;103671:92:0;;-1:-1:-1;103671:92:0;103612:163;104364:35;104377:10;104389:9;104364:12;:35::i;:::-;104346:53;;104447:15;104431:13;;:31;104412:50;;104537:13;;104517:16;:33;;104509:78;;;;;-1:-1:-1;;;104509:78:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;104664:13;:32;;;104785:60;;;104799:10;104785:60;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;104785:60:0;;;;;;;;104921:14;104908:46;-1:-1:-1;104938:15:0;-1:-1:-1;;103331:1631:0;;;:::o;120685:904::-;120821:10;;120843:26;;;-1:-1:-1;;;120843:26:0;;-1:-1:-1;;;;;120843:26:0;;;;;;;;;;;;;;;120821:10;;;;;;;120843:14;;:26;;;;;120761:31;;120843:26;;;;;;;;120761:31;120821:10;120843:26;;;5:2:-1;;;;30:1;27;20:12;5:2;120843:26:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;120843:26:0;;;;120882:12;120936:16;120975:1;120970:152;;;;121145:2;121140:219;;;;121494:1;121491;121484:12;120970:152;-1:-1:-1;;121065:6:0;-1:-1:-1;120970:152:0;;121140:219;121242:2;121239:1;121236;121221:24;121284:1;121278:8;121267:19;;120929:586;;121544:7;121536:45;;;;;-1:-1:-1;;;121536:45:0;;;;;;;;;;;;-1:-1:-1;;;121536:45:0;;;;;;;;;;;;;;;120685:904;;;;:::o;71462:4604::-;71569:4;71594:19;;;:42;;-1:-1:-1;71617:19:0;;71594:42;71586:107;;;;-1:-1:-1;;;71586:107:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;71706:27;;:::i;:::-;71850:28;:26;:28::i;:::-;71821:25;;;71806:72;;;71807:12;;;71806:72;;;;;;;;;;;;;;;;;;;-1:-1:-1;71909:18:0;;-1:-1:-1;71893:4:0;:12;;;:34;;;;;;;;;71889:168;;71951:94;71962:16;71980:44;72031:4;:12;;;72026:18;;;;;;;71951:94;71944:101;;;;;71889:168;72111:18;;72107:1290;;72387:17;;;:34;;;72492:42;;;;;;;;72507:25;;;;72492:42;;72474:77;;72407:14;72474:17;:77::i;:::-;72453:17;;;72438:113;;;72439:12;;;72438:113;;;;;;;;;;;;;;;;;;;-1:-1:-1;72586:18:0;;-1:-1:-1;72570:4:0;:12;;;:34;;;;;;;;;72566:185;;72632:103;72643:16;72661:53;72721:4;:12;;;72716:18;;;;;;;72566:185;72107:1290;;;73053:82;73076:14;73092:42;;;;;;;;73107:4;:25;;;73092:42;;;73053:22;:82::i;:::-;73032:17;;;73017:118;;;73018:12;;;73017:118;;;;;;;;;;;;;;;;;;;-1:-1:-1;73170:18:0;;-1:-1:-1;73154:4:0;:12;;;:34;;;;;;;;;73150:185;;73216:103;73227:16;73245:53;73305:4;:12;;;73300:18;;;;;;;73150:185;73351:17;;;:34;;;72107:1290;73466:12;;73518:17;;;;73466:70;;;-1:-1:-1;;;73466:70:0;;73501:4;73466:70;;;;-1:-1:-1;;;;;73466:70:0;;;;;;;;;;;;;;;;73451:12;;73466;;;;;:26;;:70;;;;;;;;;;;;;;;73451:12;73466;:70;;;5:2:-1;;;;30:1;27;20:12;5:2;73466:70:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;73466:70:0;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;73466:70:0;;-1:-1:-1;73551:12:0;;73547:146;;73587:94;73598:29;73629:42;73673:7;73587:10;:94::i;:::-;73580:101;;;;;;73547:146;73803:16;:14;:16::i;:::-;73781:18;;:38;73777:142;;73843:64;73848:22;73872:34;73843:4;:64::i;73777:142::-;74214:39;74222:11;;74235:4;:17;;;74214:7;:39::i;:::-;74191:19;;;74176:77;;;74177:12;;;74176:77;;;;;;;;;;;;;;;;;;;-1:-1:-1;74284:18:0;;-1:-1:-1;74268:4:0;:12;;;:34;;;;;;;;;74264:178;;74326:104;74337:16;74355:54;74416:4;:12;;;74411:18;;;;;;;74264:178;-1:-1:-1;;;;;74502:23:0;;;;;;:13;:23;;;;;;74527:17;;;;74494:51;;74502:23;74494:7;:51::i;:::-;74469:21;;;74454:91;;;74455:12;;;74454:91;;;;;;;;;;;;;;;;;;;-1:-1:-1;74576:18:0;;-1:-1:-1;74560:4:0;:12;;;:34;;;;;;;;;74556:181;;74618:107;74629:16;74647:57;74711:4;:12;;;74706:18;;;;;;;74556:181;74835:4;:17;;;74818:14;:12;:14::i;:::-;:34;74814:155;;;74876:81;74881:29;74912:44;74876:4;:81::i;74814:155::-;75465:42;75479:8;75489:4;:17;;;75465:13;:42::i;:::-;75600:19;;;;75586:11;:33;75656:21;;;;-1:-1:-1;;;;;75630:23:0;;;;;;:13;:23;;;;;;;;;:47;;;;75789:17;;;;75755:52;;;;;;;75782:4;;-1:-1:-1;;;;;;;;;;;75755:52:0;;;;;;;75840:17;;;;75859;;;;;75823:54;;;-1:-1:-1;;;;;75823:54:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;75930:12;;75981:17;;;;76000;;;;75930:88;;;-1:-1:-1;;;75930:88:0;;75964:4;75930:88;;;;-1:-1:-1;;;;;75930:88:0;;;;;;;;;;;;;;;;;;;;;;:12;;;;;:25;;:88;;;;;:12;;:88;;;;;;;:12;;:88;;;5:2:-1;;;;30:1;27;20:12;5:2;75930:88:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;-1:-1;76043:14:0;;-1:-1:-1;76038:20:0;;-1:-1:-1;;76038:20:0;;76031:27;71462:4604;-1:-1:-1;;;;;;71462:4604:0:o;25992:343::-;26048:9;;26080:6;26076:69;;-1:-1:-1;26111:18:0;;-1:-1:-1;26111:18:0;26103:30;;26076:69;26166:5;;;26170:1;26166;:5;:1;26188:5;;;;;:10;26184:144;;-1:-1:-1;26223:26:0;;-1:-1:-1;26251:1:0;;-1:-1:-1;26215:38:0;;26184:144;26294:18;;-1:-1:-1;26314:1:0;-1:-1:-1;26286:30:0;;26430:215;26486:9;;26518:6;26514:77;;-1:-1:-1;26549:26:0;;-1:-1:-1;26577:1:0;26541:38;;26514:77;26611:18;26635:1;26631;:5;;;;;;26603:34;;;;26430:215;;;;;:::o;65565:3213::-;65713:12;;:59;;;-1:-1:-1;;;65713:59:0;;65746:4;65713:59;;;;-1:-1:-1;;;;;65713:59:0;;;;;;;;;;;;;;;65635:4;;;;;;65713:12;;;:24;;:59;;;;;;;;;;;;;;;65635:4;65713:12;:59;;;5:2:-1;;;;30:1;27;20:12;5:2;65713:59:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;65713:59:0;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;65713:59:0;;-1:-1:-1;65787:12:0;;65783:149;;65824:92;65835:29;65866:40;65908:7;65824:10;:92::i;:::-;65816:104;-1:-1:-1;65918:1:0;;-1:-1:-1;65816:104:0;;-1:-1:-1;65816:104:0;65783:149;66042:16;:14;:16::i;:::-;66020:18;;:38;66016:145;;66083:62;66088:22;66112:32;66083:4;:62::i;66016:145::-;66173:25;;:::i;:::-;66255:28;:26;:28::i;:::-;66226:25;;;66211:72;;;66212:12;;;66211:72;;;;;;;;;;;;;;;;;;;-1:-1:-1;66314:18:0;;-1:-1:-1;66298:4:0;:12;;;:34;;;;;;;;;66294:171;;66357:92;66368:16;66386:42;66435:4;:12;;;66430:18;;;;;;;66357:92;66349:104;-1:-1:-1;66451:1:0;;-1:-1:-1;66349:104:0;;-1:-1:-1;;66349:104:0;66294:171;67097:32;67110:6;67118:10;67097:12;:32::i;:::-;67073:21;;;:56;;;67402:42;;;;;;;;67417:25;;;;67402:42;;67356:89;;67073:56;67356:22;:89::i;:::-;67337:15;;;67322:123;;;67323:12;;;67322:123;;;;;;;;;;;;;;;;;;;-1:-1:-1;67480:18:0;;-1:-1:-1;67464:4:0;:12;;;:34;;;;;;;;;67456:79;;;;;-1:-1:-1;;;67456:79:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;67839:37;67847:11;;67860:4;:15;;;67839:7;:37::i;:::-;67816:19;;;67801:75;;;67802:12;;;67801:75;;;;;;;;;;;;;;;;;;;-1:-1:-1;67911:18:0;;-1:-1:-1;67895:4:0;:12;;;:34;;;;;;;;;67887:87;;;;-1:-1:-1;;;67887:87:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;68035:21:0;;;;;;:13;:21;;;;;;68058:15;;;;68027:47;;68035:21;68027:7;:47::i;:::-;68002:21;;;67987:87;;;67988:12;;;67987:87;;;;;;;;;;;;;;;;;;;-1:-1:-1;68109:18:0;;-1:-1:-1;68093:4:0;:12;;;:34;;;;;;;;;68085:90;;;;-1:-1:-1;;;68085:90:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;68268:19;;;;68254:11;:33;68322:21;;;;-1:-1:-1;;;;;68298:21:0;;;;;;:13;:21;;;;;;;;;:45;;;;68432:21;;;;68455:15;;;;;68419:52;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;68519:15;;;;68487:48;;;;;;;-1:-1:-1;;;;;68487:48:0;;;68504:4;;-1:-1:-1;;;;;;;;;;;68487:48:0;;;;;;;;68748:21;;;68731:14;;68748:21;;-1:-1:-1;65565:3213:0;-1:-1:-1;;;;65565:3213:0:o;32179:121::-;32238:4;28172;32262:19;32267:1;32270;:10;;;32262:4;:19::i;:::-;:30;;;;;;;32179:121;-1:-1:-1;;;32179:121:0:o;31577:120::-;31630:4;31654:35;31659:1;31662;31654:35;;;;;;;;;;;;;-1:-1:-1;;;31654:35:0;;;:4;:35::i;28894:174::-;28972:4;28989:18;;:::i;:::-;29010:15;29015:1;29018:6;29010:4;:15::i;:::-;28989:36;;29043:17;29052:7;29043:8;:17::i;30942:116::-;30995:4;31019:31;31024:1;31027;31019:31;;;;;;;;;;;;;-1:-1:-1;;;31019:31:0;;;:4;:31::i;77285:3071::-;77443:12;;:65;;;-1:-1:-1;;;77443:65:0;;77478:4;77443:65;;;;-1:-1:-1;;;;;77443:65:0;;;;;;;;;;;;;;;77369:4;;;;77443:12;;:26;;:65;;;;;;;;;;;;;;77369:4;77443:12;:65;;;5:2:-1;;;;30:1;27;20:12;5:2;77443:65:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;77443:65:0;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;77443:65:0;;-1:-1:-1;77523:12:0;;77519:146;;77559:94;77570:29;77601:42;77645:7;77559:10;:94::i;:::-;77552:101;;;;;77519:146;77775:16;:14;:16::i;:::-;77753:18;;:38;77749:142;;77815:64;77820:22;77844:34;77815:4;:64::i;77749:142::-;78000:12;77983:14;:12;:14::i;:::-;:29;77979:143;;;78036:74;78041:29;78072:37;78036:4;:74::i;77979:143::-;78134:27;;:::i;:::-;78449:37;78477:8;78449:27;:37::i;:::-;78426:19;;;78411:75;;;78412:4;78411:75;;;;;;;;;;;;;;;;;;;-1:-1:-1;78517:18:0;;-1:-1:-1;78501:12:0;;:34;;;;;;;;;78497:181;;78559:107;78570:16;78588:57;78652:4;:12;;;78647:18;;;;;;;78559:107;78552:114;;;;;;78497:181;78731:42;78739:4;:19;;;78760:12;78731:7;:42::i;:::-;78705:22;;;78690:83;;;78691:4;78690:83;;;;;;;;;;;;;;;;;;;-1:-1:-1;78804:18:0;;-1:-1:-1;78788:12:0;;:34;;;;;;;;;78784:188;;78846:114;78857:16;78875:64;78946:4;:12;;;78941:18;;;;;;;78784:188;79023:35;79031:12;;79045;79023:7;:35::i;:::-;78999:20;;;78984:74;;;78985:4;78984:74;;;;;;;;;;;;;;;;;;;-1:-1:-1;79089:18:0;;-1:-1:-1;79073:12:0;;:34;;;;;;;;;79069:179;;79131:105;79142:16;79160:55;79222:4;:12;;;79217:18;;;;;;;79069:179;79740:37;79754:8;79764:12;79740:13;:37::i;:::-;79897:22;;;;;;-1:-1:-1;;;;;79860:24:0;;;;;;:14;:24;;;;;;;;:59;;;79971:11;;79930:38;;;;:52;;;;80008:20;;;;;79993:12;:35;;;80115:22;;80084:76;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;80333:14;80321:27;77285:3071;-1:-1:-1;;;;;77285:3071:0:o;88392:3622::-;88613:12;;:112;;;-1:-1:-1;;;88613:112:0;;88657:4;88613:112;;;;-1:-1:-1;;;;;88613:112:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;88530:4;;;;;;88613:12;;;:35;;:112;;;;;;;;;;;;;;;88530:4;88613:12;:112;;;5:2:-1;;;;30:1;27;20:12;5:2;88613:112:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;88613:112:0;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;88613:112:0;;-1:-1:-1;88740:12:0;;88736:154;;88777:97;88788:29;88819:45;88866:7;88777:10;:97::i;:::-;88769:109;-1:-1:-1;88876:1:0;;-1:-1:-1;88769:109:0;;-1:-1:-1;88769:109:0;88736:154;89000:16;:14;:16::i;:::-;88978:18;;:38;88974:150;;89041:67;89046:22;89070:37;89041:4;:67::i;88974:150::-;89270:16;:14;:16::i;:::-;89229;-1:-1:-1;;;;;89229:35:0;;:37;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;89229:37:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;89229:37:0;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;89229:37:0;:57;89225:180;;89311:78;89316:22;89340:48;89311:4;:78::i;89225:180::-;89478:10;-1:-1:-1;;;;;89466:22:0;:8;-1:-1:-1;;;;;89466:22:0;;89462:145;;;89513:78;89518:26;89546:44;89513:4;:78::i;89462:145::-;89662:16;89658:147;;89703:86;89708:36;89746:42;89703:4;:86::i;89658:147::-;-1:-1:-1;;89861:11:0;:23;89857:158;;;89909:90;89914:36;89952:46;89909:4;:90::i;89857:158::-;90071:21;90094:22;90120:51;90137:10;90149:8;90159:11;90120:16;:51::i;:::-;90070:101;;-1:-1:-1;90070:101:0;-1:-1:-1;90186:40:0;;90182:163;;90251:78;90262:16;90256:23;;;;;;;;90281:47;90251:4;:78::i;:::-;90243:90;-1:-1:-1;90331:1:0;;-1:-1:-1;90243:90:0;;-1:-1:-1;;;90243:90:0;90182:163;90602:12;;:103;;;-1:-1:-1;;;90602:103:0;;90653:4;90602:103;;;;-1:-1:-1;;;;;90602:103:0;;;;;;;;;;;;;;;90559:21;;;;90602:12;;;:42;;:103;;;;;;;;;;;;:12;:103;;;5:2:-1;;;;30:1;27;20:12;5:2;90602:103:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;90602:103:0;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;90602:103:0;;;;;;;;;-1:-1:-1;90602:103:0;-1:-1:-1;90724:40:0;;90716:106;;;;-1:-1:-1;;;90716:106:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;90956:11;90916:16;-1:-1:-1;;;;;90916:26:0;;90943:8;90916:36;;;;;;;;;;;;;-1:-1:-1;;;;;90916:36:0;-1:-1:-1;;;;;90916:36:0;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;90916:36:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;90916:36:0;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;90916:36:0;:51;;90908:88;;;;;-1:-1:-1;;;90908:88:0;;;;;;;;;;;;-1:-1:-1;;;90908:88:0;;;;;;;;;;;;;;;91125:15;-1:-1:-1;;;;;91155:42:0;;91192:4;91155:42;91151:254;;;91227:63;91249:4;91256:10;91268:8;91278:11;91227:13;:63::i;:::-;91214:76;;91151:254;;;91336:57;;;-1:-1:-1;;;91336:57:0;;-1:-1:-1;;;;;91336:57:0;;;;;;;;;;;;;;;;;;;;;;:22;;;;;;:57;;;;;;;;;;;;;;;-1:-1:-1;91336:22:0;:57;;;5:2:-1;;;;30:1;27;20:12;5:2;91336:57:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;91336:57:0;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;91336:57:0;;-1:-1:-1;91151:254:0;91511:34;;91503:67;;;;;-1:-1:-1;;;91503:67:0;;;;;;;;;;;;-1:-1:-1;;;91503:67:0;;;;;;;;;;;;;;;91635:96;;;-1:-1:-1;;;;;91635:96:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;91971:14;91958:48;-1:-1:-1;91988:17:0;;-1:-1:-1;;;;;;88392:3622:0;;;;;;;;:::o;118637:1344::-;118781:10;;118824:51;;;-1:-1:-1;;;118824:51:0;;118869:4;118824:51;;;;;;118704:4;;-1:-1:-1;;;;;118781:10:0;;118704:4;;118781:10;;118824:36;;:51;;;;;;;;;;;;;;118781:10;118824:51;;;5:2:-1;;;;30:1;27;20:12;5:2;118824:51:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;118824:51:0;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;118824:51:0;118886:47;;;-1:-1:-1;;;118886:47:0;;-1:-1:-1;;;;;118886:47:0;;;;;;;118919:4;118886:47;;;;;;;;;;;;118824:51;;-1:-1:-1;118886:18:0;;;;;;:47;;;;;-1:-1:-1;;118886:47:0;;;;;;;;-1:-1:-1;118886:18:0;:47;;;5:2:-1;;;;30:1;27;20:12;5:2;118886:47:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;118886:47:0;;;;118946:12;119000:16;119039:1;119034:153;;;;119210:2;119205:220;;;;119561:1;119558;119551:12;119034:153;-1:-1:-1;;119130:6:0;-1:-1:-1;119034:153:0;;119205:220;119308:2;119305:1;119302;119287:24;119350:1;119344:8;119333:19;;118993:589;;119611:7;119603:44;;;;;-1:-1:-1;;;119603:44:0;;;;;;;;;;;;-1:-1:-1;;;119603:44:0;;;;;;;;;;;;;;;119760:10;;119745:51;;;-1:-1:-1;;;119745:51:0;;119790:4;119745:51;;;;;;119725:17;;-1:-1:-1;;;;;119760:10:0;;119745:36;;:51;;;;;;;;;;;;;;119760:10;119745:51;;;5:2:-1;;;;30:1;27;20:12;5:2;119745:51:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;119745:51:0;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;119745:51:0;;-1:-1:-1;119815:29:0;;;;119807:68;;;;;-1:-1:-1;;;119807:68:0;;;;;;;;;;;;-1:-1:-1;;;119807:68:0;;;;;;;;;;;;;;;119893:28;;;;;118637:1344;-1:-1:-1;;;;;118637:1344:0:o;39047:337::-;39135:9;39146:4;39164:13;39179:19;;:::i;:::-;39202:31;39217:6;39225:7;39202:14;:31::i;32775:122::-;32828:4;32852:37;32857:1;32860;32852:37;;;;;;;;;;;;;-1:-1:-1;;;32852:37:0;;;:4;:37::i;31705:158::-;31786:4;31819:12;31811:6;;;;31803:29;;;;-1:-1:-1;;;31803:29:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;31803:29:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;31850:5:0;;;31705:158::o;32038:133::-;32097:10;;:::i;:::-;32127:36;;;;;;;;32142:19;32147:1;:10;;;32159:1;32142:4;:19::i;:::-;32127:36;;32120:43;32038:133;-1:-1:-1;;;32038:133:0:o;31066:179::-;31147:4;31173:5;;;31205:12;31197:6;;;;31189:29;;;;-1:-1:-1;;;31189:29:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;27:10:-1;;8:100;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;38316:620:0;38396:9;38407:10;;:::i;:::-;38714:14;38730;38748:25;28172:4;38766:6;38748:7;:25::i;:::-;38713:60;;-1:-1:-1;38713:60:0;-1:-1:-1;38796:18:0;38788:4;:26;;;;;;;;;38784:92;;-1:-1:-1;38845:18:0;;;;;;;;;-1:-1:-1;38845:18:0;;38839:4;;-1:-1:-1;38845:18:0;-1:-1:-1;38831:33:0;;38784:92;38893:35;38900:9;38911:7;:16;;;38893:6;:35::i;32905:250::-;32986:4;33007:6;;;:16;;-1:-1:-1;33017:6:0;;33007:16;33003:57;;;-1:-1:-1;33047:1:0;33040:8;;33003:57;33079:5;;;33083:1;33079;:5;:1;33103:5;;;;;:10;33115:12;33095:33;;;;;-1:-1:-1;;;33095:33:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;27:10:-1;;8:100;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;122283:1059:0;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;122283:1059:0;;;-1:-1:-1;122283:1059:0;:::i;:::-;;;:::o;:::-;;;;;;;;;;;-1:-1:-1;122283:1059:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;-1:-1:-1;122283:1059:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;-1:-1:-1;122283:1059:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;-1:-1:-1;122283:1059:0;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;
Swarm Source
bzzr://8e4cfb863cab7cd4f913190eb578d60bda7cd22bf0cd9713d4b6fba2ceb40c7f
Age | Block | Fee Address | BC Fee Address | Voting Power | Jailed | Incoming |
---|
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.