Source Code
More Info
Private Name Tags
ContractCreator
TokenTracker
Latest 25 from a total of 183 transactions
| Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
|---|---|---|---|---|---|---|---|---|---|
| Redeem Underlyin... | 12986700 | 371 days ago | IN | 0 ETH | 0.00050181 | ||||
| Repay Borrow | 12444288 | 393 days ago | IN | 0 ETH | 0.00000905 | ||||
| Repay Borrow | 12444258 | 393 days ago | IN | 0 ETH | 0.0000081 | ||||
| Redeem Underlyin... | 11238939 | 439 days ago | IN | 0 ETH | 0.00001957 | ||||
| Repay Borrow | 10408919 | 467 days ago | IN | 0 ETH | 0.00000978 | ||||
| Mint | 10262889 | 472 days ago | IN | 0 ETH | 0.00001733 | ||||
| Redeem Underlyin... | 10262875 | 472 days ago | IN | 0 ETH | 0.0000182 | ||||
| Redeem Underlyin... | 9744099 | 489 days ago | IN | 0 ETH | 0.00001211 | ||||
| Redeem Underlyin... | 8717518 | 524 days ago | IN | 0 ETH | 0.0000176 | ||||
| Redeem Underlyin... | 7495247 | 565 days ago | IN | 0 ETH | 0.00001718 | ||||
| Repay Borrow | 7243806 | 573 days ago | IN | 0 ETH | 0.00002325 | ||||
| Redeem Underlyin... | 6492466 | 599 days ago | IN | 0 ETH | 0.00010588 | ||||
| Repay Borrow | 6117754 | 612 days ago | IN | 0 ETH | 0.00002675 | ||||
| Repay Borrow | 5720993 | 626 days ago | IN | 0 ETH | 0.00002548 | ||||
| Mint | 5517101 | 633 days ago | IN | 0 ETH | 0.00006578 | ||||
| Redeem Underlyin... | 5513727 | 633 days ago | IN | 0 ETH | 0.00024503 | ||||
| Redeem Underlyin... | 5513697 | 633 days ago | IN | 0 ETH | 0.00010372 | ||||
| Repay Borrow | 5441226 | 636 days ago | IN | 0 ETH | 0.00017914 | ||||
| Redeem Underlyin... | 5372980 | 638 days ago | IN | 0 ETH | 0.00023604 | ||||
| Redeem Underlyin... | 5098917 | 648 days ago | IN | 0 ETH | 0.00093465 | ||||
| Repay Borrow | 5098907 | 648 days ago | IN | 0 ETH | 0.0002457 | ||||
| Redeem Underlyin... | 5098887 | 648 days ago | IN | 0 ETH | 0.00094845 | ||||
| Mint | 5060893 | 649 days ago | IN | 0 ETH | 0.00024727 | ||||
| Mint | 4969874 | 652 days ago | IN | 0 ETH | 0.00017797 | ||||
| Redeem Underlyin... | 4912679 | 654 days ago | IN | 0 ETH | 0.00041116 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Cross-Chain Transactions
Loading...
Loading
Contract Name:
CErc20
Compiler Version
v0.8.21+commit.d9974bed
Contract Source Code (Solidity)
/**
*Submitted for verification at scrollscan.com on 2023-10-28
*/
/**
*Submitted for verification at scrollscan.com on 2023-10-18
*/
// Sources flattened with hardhat v2.14.0 https://hardhat.org
// File contracts/ComptrollerInterface.sol
// SPDX-License-Identifier: BSD-3-Clause
pragma solidity ^0.8.10;
abstract contract ComptrollerInterface {
/// @notice Indicator that this is a Comptroller contract (for inspection)
bool public constant isComptroller = true;
/*** Assets You Are In ***/
function enterMarkets(address[] calldata cTokens) virtual external returns (uint[] memory);
function exitMarket(address cToken) virtual external returns (uint);
/*** Policy Hooks ***/
function mintAllowed(address cToken, address minter, uint mintAmount) virtual external returns (uint);
function mintVerify(address cToken, address minter, uint mintAmount, uint mintTokens) virtual external;
function redeemAllowed(address cToken, address redeemer, uint redeemTokens) virtual external returns (uint);
function redeemVerify(address cToken, address redeemer, uint redeemAmount, uint redeemTokens) virtual external;
function borrowAllowed(address cToken, address borrower, uint borrowAmount) virtual external returns (uint);
function borrowVerify(address cToken, address borrower, uint borrowAmount) virtual external;
function repayBorrowAllowed(
address cToken,
address payer,
address borrower,
uint repayAmount) virtual external returns (uint);
function repayBorrowVerify(
address cToken,
address payer,
address borrower,
uint repayAmount,
uint borrowerIndex) virtual external;
function liquidateBorrowAllowed(
address cTokenBorrowed,
address cTokenCollateral,
address liquidator,
address borrower,
uint repayAmount) virtual external returns (uint);
function liquidateBorrowVerify(
address cTokenBorrowed,
address cTokenCollateral,
address liquidator,
address borrower,
uint repayAmount,
uint seizeTokens) virtual external;
function seizeAllowed(
address cTokenCollateral,
address cTokenBorrowed,
address liquidator,
address borrower,
uint seizeTokens) virtual external returns (uint);
function seizeVerify(
address cTokenCollateral,
address cTokenBorrowed,
address liquidator,
address borrower,
uint seizeTokens) virtual external;
function transferAllowed(address cToken, address src, address dst, uint transferTokens) virtual external returns (uint);
function transferVerify(address cToken, address src, address dst, uint transferTokens) virtual external;
/*** Liquidity/Liquidation Calculations ***/
function liquidateCalculateSeizeTokens(
address cTokenBorrowed,
address cTokenCollateral,
uint repayAmount) virtual external view returns (uint, uint);
}
// File contracts/EIP20NonStandardInterface.sol
pragma solidity ^0.8.10;
/**
* @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 balance 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 success Whether or not the approval succeeded
*/
function approve(address spender, uint256 amount) external returns (bool success);
/**
* @notice Get the current allowance from `owner` for `spender`
* @param owner The address of the account which owns the tokens to be spent
* @param spender The address of the account which may transfer tokens
* @return remaining The number of tokens allowed to be spent
*/
function allowance(address owner, address spender) external view returns (uint256 remaining);
event Transfer(address indexed from, address indexed to, uint256 amount);
event Approval(address indexed owner, address indexed spender, uint256 amount);
}
// File contracts/ErrorReporter.sol
pragma solidity ^0.8.10;
contract ComptrollerErrorReporter {
enum Error {
NO_ERROR,
UNAUTHORIZED,
COMPTROLLER_MISMATCH,
INSUFFICIENT_SHORTFALL,
INSUFFICIENT_LIQUIDITY,
INVALID_CLOSE_FACTOR,
INVALID_COLLATERAL_FACTOR,
INVALID_LIQUIDATION_INCENTIVE,
MARKET_NOT_ENTERED, // no longer possible
MARKET_NOT_LISTED,
MARKET_ALREADY_LISTED,
MATH_ERROR,
NONZERO_BORROW_BALANCE,
PRICE_ERROR,
REJECTION,
SNAPSHOT_ERROR,
TOO_MANY_ASSETS,
TOO_MUCH_REPAY
}
enum FailureInfo {
ACCEPT_ADMIN_PENDING_ADMIN_CHECK,
ACCEPT_PENDING_IMPLEMENTATION_ADDRESS_CHECK,
EXIT_MARKET_BALANCE_OWED,
EXIT_MARKET_REJECTION,
SET_CLOSE_FACTOR_OWNER_CHECK,
SET_CLOSE_FACTOR_VALIDATION,
SET_COLLATERAL_FACTOR_OWNER_CHECK,
SET_COLLATERAL_FACTOR_NO_EXISTS,
SET_COLLATERAL_FACTOR_VALIDATION,
SET_COLLATERAL_FACTOR_WITHOUT_PRICE,
SET_IMPLEMENTATION_OWNER_CHECK,
SET_LIQUIDATION_INCENTIVE_OWNER_CHECK,
SET_LIQUIDATION_INCENTIVE_VALIDATION,
SET_MAX_ASSETS_OWNER_CHECK,
SET_PENDING_ADMIN_OWNER_CHECK,
SET_PENDING_IMPLEMENTATION_OWNER_CHECK,
SET_PRICE_ORACLE_OWNER_CHECK,
SUPPORT_MARKET_EXISTS,
SUPPORT_MARKET_OWNER_CHECK,
SET_PAUSE_GUARDIAN_OWNER_CHECK
}
/**
* @dev `error` corresponds to enum Error; `info` corresponds to enum FailureInfo, and `detail` is an arbitrary
* contract-specific code that enables us to report opaque error codes from upgradeable contracts.
**/
event Failure(uint error, uint info, uint detail);
/**
* @dev use this when reporting a known error from the money market or a non-upgradeable collaborator
*/
function fail(Error err, FailureInfo info) internal returns (uint) {
emit Failure(uint(err), uint(info), 0);
return uint(err);
}
/**
* @dev use this when reporting an opaque error from an upgradeable collaborator contract
*/
function failOpaque(Error err, FailureInfo info, uint opaqueError) internal returns (uint) {
emit Failure(uint(err), uint(info), opaqueError);
return uint(err);
}
}
contract TokenErrorReporter {
uint public constant NO_ERROR = 0; // support legacy return codes
error TransferComptrollerRejection(uint256 errorCode);
error TransferNotAllowed();
error TransferNotEnough();
error TransferTooMuch();
error MintComptrollerRejection(uint256 errorCode);
error MintFreshnessCheck();
error RedeemComptrollerRejection(uint256 errorCode);
error RedeemFreshnessCheck();
error RedeemTransferOutNotPossible();
error BorrowComptrollerRejection(uint256 errorCode);
error BorrowFreshnessCheck();
error BorrowCashNotAvailable();
error RepayBorrowComptrollerRejection(uint256 errorCode);
error RepayBorrowFreshnessCheck();
error LiquidateComptrollerRejection(uint256 errorCode);
error LiquidateFreshnessCheck();
error LiquidateCollateralFreshnessCheck();
error LiquidateAccrueBorrowInterestFailed(uint256 errorCode);
error LiquidateAccrueCollateralInterestFailed(uint256 errorCode);
error LiquidateLiquidatorIsBorrower();
error LiquidateCloseAmountIsZero();
error LiquidateCloseAmountIsUintMax();
error LiquidateRepayBorrowFreshFailed(uint256 errorCode);
error LiquidateSeizeComptrollerRejection(uint256 errorCode);
error LiquidateSeizeLiquidatorIsBorrower();
error AcceptAdminPendingAdminCheck();
error SetComptrollerOwnerCheck();
error SetPendingAdminOwnerCheck();
error SetReserveFactorAdminCheck();
error SetReserveFactorFreshCheck();
error SetReserveFactorBoundsCheck();
error AddReservesFactorFreshCheck(uint256 actualAddAmount);
error ReduceReservesAdminCheck();
error ReduceReservesFreshCheck();
error ReduceReservesCashNotAvailable();
error ReduceReservesCashValidation();
error SetInterestRateModelOwnerCheck();
error SetInterestRateModelFreshCheck();
}
// File contracts/InterestRateModel.sol
pragma solidity ^0.8.10;
/**
* @title Loanshark's InterestRateModel Interface
* @author Loanshark
*/
abstract 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) virtual 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) virtual external view returns (uint);
}
// File contracts/CTokenInterfaces.sol
pragma solidity ^0.8.10;
contract CTokenStorage {
/**
* @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;
// Maximum borrow rate that can ever be applied (.0005% / block)
uint internal constant borrowRateMaxMantissa = 0.0005e16;
// 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-cToken operations
*/
ComptrollerInterface public comptroller;
/**
* @notice Model which tells what the current interest rate should be
*/
InterestRateModel public interestRateModel;
// Initial exchange rate used when minting the first CTokens (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;
// Official record of token balances for each account
mapping (address => uint) internal accountTokens;
// 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;
}
// 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%
}
abstract contract CTokenInterface is CTokenStorage {
/**
* @notice Indicator that this is a CToken contract (for inspection)
*/
bool public constant isCToken = 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 cTokenCollateral, 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 comptroller is changed
*/
event NewComptroller(ComptrollerInterface oldComptroller, ComptrollerInterface newComptroller);
/**
* @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);
/*** User Interface ***/
function transfer(address dst, uint amount) virtual external returns (bool);
function transferFrom(address src, address dst, uint amount) virtual external returns (bool);
function approve(address spender, uint amount) virtual external returns (bool);
function allowance(address owner, address spender) virtual external view returns (uint);
function balanceOf(address owner) virtual external view returns (uint);
function balanceOfUnderlying(address owner) virtual external returns (uint);
function getAccountSnapshot(address account) virtual external view returns (uint, uint, uint, uint);
function borrowRatePerBlock() virtual external view returns (uint);
function supplyRatePerBlock() virtual external view returns (uint);
function totalBorrowsCurrent() virtual external returns (uint);
function borrowBalanceCurrent(address account) virtual external returns (uint);
function borrowBalanceStored(address account) virtual external view returns (uint);
function exchangeRateCurrent() virtual external returns (uint);
function exchangeRateStored() virtual external view returns (uint);
function getCash() virtual external view returns (uint);
function accrueInterest() virtual external returns (uint);
function seize(address liquidator, address borrower, uint seizeTokens) virtual external returns (uint);
/*** Admin Functions ***/
function _setPendingAdmin(address payable newPendingAdmin) virtual external returns (uint);
function _acceptAdmin() virtual external returns (uint);
function _setComptroller(ComptrollerInterface newComptroller) virtual external returns (uint);
function _setReserveFactor(uint newReserveFactorMantissa) virtual external returns (uint);
function _reduceReserves(uint reduceAmount) virtual external returns (uint);
function _setInterestRateModel(InterestRateModel newInterestRateModel) virtual external returns (uint);
}
contract CErc20Storage {
/**
* @notice Underlying asset for this CToken
*/
address public underlying;
}
abstract contract CErc20Interface is CErc20Storage {
/*** User Interface ***/
function mint(uint mintAmount) virtual external returns (uint);
function redeem(uint redeemTokens) virtual external returns (uint);
function redeemUnderlying(uint redeemAmount) virtual external returns (uint);
function borrow(uint borrowAmount) virtual external returns (uint);
function repayBorrow(uint repayAmount) virtual external returns (uint);
function repayBorrowBehalf(address borrower, uint repayAmount) virtual external returns (uint);
function liquidateBorrow(address borrower, uint repayAmount, CTokenInterface cTokenCollateral) virtual external returns (uint);
function sweepToken(EIP20NonStandardInterface token) virtual external;
/*** Admin Functions ***/
function _addReserves(uint addAmount) virtual external returns (uint);
}
contract CDelegationStorage {
/**
* @notice Implementation address for this contract
*/
address public implementation;
}
abstract 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) virtual external;
}
abstract 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) virtual external;
/**
* @notice Called by the delegator on a delegate to forfeit its responsibility
*/
function _resignImplementation() virtual external;
}
// File contracts/EIP20Interface.sol
pragma solidity ^0.8.10;
/**
* @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 balance The balance
*/
function balanceOf(address owner) external view returns (uint256 balance);
/**
* @notice Transfer `amount` tokens from `msg.sender` to `dst`
* @param dst The address of the destination account
* @param amount The number of tokens to transfer
* @return success Whether or not the transfer succeeded
*/
function transfer(address dst, uint256 amount) external returns (bool success);
/**
* @notice Transfer `amount` tokens from `src` to `dst`
* @param src The address of the source account
* @param dst The address of the destination account
* @param amount The number of tokens to transfer
* @return success Whether or not the transfer succeeded
*/
function transferFrom(address src, address dst, uint256 amount) external returns (bool success);
/**
* @notice Approve `spender` to transfer up to `amount` from `src`
* @dev This will overwrite the approval amount for `spender`
* and is subject to issues noted [here](https://eips.ethereum.org/EIPS/eip-20#approve)
* @param spender The address of the account which may transfer tokens
* @param amount The number of tokens that are approved (-1 means infinite)
* @return success Whether or not the approval succeeded
*/
function approve(address spender, uint256 amount) external returns (bool success);
/**
* @notice Get the current allowance from `owner` for `spender`
* @param owner The address of the account which owns the tokens to be spent
* @param spender The address of the account which may transfer tokens
* @return remaining The number of tokens allowed to be spent (-1 means infinite)
*/
function allowance(address owner, address spender) external view returns (uint256 remaining);
event Transfer(address indexed from, address indexed to, uint256 amount);
event Approval(address indexed owner, address indexed spender, uint256 amount);
}
// File contracts/ExponentialNoError.sol
pragma solidity ^0.8.10;
/**
* @title Exponential module for storing fixed-precision decimals
* @author Loanshark
* @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 a + b;
}
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 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 a * b;
}
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 a / b;
}
function fraction(uint a, uint b) pure internal returns (Double memory) {
return Double({mantissa: div_(mul_(a, doubleScale), b)});
}
}
// File contracts/CToken.sol
pragma solidity ^0.8.10;
/**
* @title The base contract with helpful constants
* @author The Redstone Oracles team
* @dev It mainly contains redstone-related values, which improve readability
* of other contracts (e.g. CalldataExtractor and RedstoneConsumerBase)
*/
contract RedstoneConstants {
// === Abbreviations ===
// BS - Bytes size
// PTR - Pointer (memory location)
// SIG - Signature
// Solidity and YUL constants
uint256 internal constant STANDARD_SLOT_BS = 32;
uint256 internal constant FREE_MEMORY_PTR = 0x40;
uint256 internal constant BYTES_ARR_LEN_VAR_BS = 32;
uint256 internal constant FUNCTION_SIGNATURE_BS = 4;
uint256 internal constant REVERT_MSG_OFFSET = 68; // Revert message structure described here: https://ethereum.stackexchange.com/a/66173/106364
uint256 internal constant STRING_ERR_MESSAGE_MASK = 0x08c379a000000000000000000000000000000000000000000000000000000000;
// RedStone protocol consts
uint256 internal constant SIG_BS = 65;
uint256 internal constant TIMESTAMP_BS = 6;
uint256 internal constant DATA_PACKAGES_COUNT_BS = 2;
uint256 internal constant DATA_POINTS_COUNT_BS = 3;
uint256 internal constant DATA_POINT_VALUE_BYTE_SIZE_BS = 4;
uint256 internal constant DATA_POINT_SYMBOL_BS = 32;
uint256 internal constant DEFAULT_DATA_POINT_VALUE_BS = 32;
uint256 internal constant UNSIGNED_METADATA_BYTE_SIZE_BS = 3;
uint256 internal constant REDSTONE_MARKER_BS = 9; // byte size of 0x000002ed57011e0000
uint256 internal constant REDSTONE_MARKER_MASK = 0x0000000000000000000000000000000000000000000000000002ed57011e0000;
// Derived values (based on consts)
uint256 internal constant TIMESTAMP_NEGATIVE_OFFSET_IN_DATA_PACKAGE_WITH_STANDARD_SLOT_BS = 104; // SIG_BS + DATA_POINTS_COUNT_BS + DATA_POINT_VALUE_BYTE_SIZE_BS + STANDARD_SLOT_BS
uint256 internal constant DATA_PACKAGE_WITHOUT_DATA_POINTS_BS = 78; // DATA_POINT_VALUE_BYTE_SIZE_BS + TIMESTAMP_BS + DATA_POINTS_COUNT_BS + SIG_BS
uint256 internal constant DATA_PACKAGE_WITHOUT_DATA_POINTS_AND_SIG_BS = 13; // DATA_POINT_VALUE_BYTE_SIZE_BS + TIMESTAMP_BS + DATA_POINTS_COUNT_BS
uint256 internal constant REDSTONE_MARKER_BS_PLUS_STANDARD_SLOT_BS = 41; // REDSTONE_MARKER_BS + STANDARD_SLOT_BS
// Error messages
error CalldataOverOrUnderFlow();
error IncorrectUnsignedMetadataSize();
error InsufficientNumberOfUniqueSigners(uint256 receivedSignersCount, uint256 requiredSignersCount);
error EachSignerMustProvideTheSameValue();
error EmptyCalldataPointersArr();
error InvalidCalldataPointer();
error CalldataMustHaveValidPayload();
error SignerNotAuthorised(address receivedSigner);
}
library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
uint256 c = a + b;
if (c < a) return (false, 0);
return (true, c);
}
}
/**
* @dev Returns the subtraction of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
if (b > a) return (false, 0);
return (true, a - b);
}
}
/**
* @dev Returns the multiplication of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
// Gas optimization: this is cheaper than requiring 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
// See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
if (a == 0) return (true, 0);
uint256 c = a * b;
if (c / a != b) return (false, 0);
return (true, c);
}
}
/**
* @dev Returns the division of two unsigned integers, with a division by zero flag.
*
* _Available since v3.4._
*/
function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
if (b == 0) return (false, 0);
return (true, a / b);
}
}
/**
* @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.
*
* _Available since v3.4._
*/
function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
if (b == 0) return (false, 0);
return (true, a % b);
}
}
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {
return a + b;
}
/**
* @dev Returns the subtraction of two unsigned integers, reverting on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
return a - b;
}
/**
* @dev Returns the multiplication of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `*` operator.
*
* Requirements:
*
* - Multiplication cannot overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
return a * b;
}
/**
* @dev Returns the integer division of two unsigned integers, reverting on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator.
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function div(uint256 a, uint256 b) internal pure returns (uint256) {
return a / b;
}
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* reverting when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
return a % b;
}
/**
* @dev Returns the subtraction of two unsigned integers, reverting with custom message on
* overflow (when the result is negative).
*
* CAUTION: This function is deprecated because it requires allocating memory for the error
* message unnecessarily. For custom revert reasons use {trySub}.
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/
function sub(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
unchecked {
require(b <= a, errorMessage);
return a - b;
}
}
/**
* @dev Returns the integer division of two unsigned integers, reverting with custom message on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function div(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
unchecked {
require(b > 0, errorMessage);
return a / b;
}
}
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* reverting with custom message when dividing by zero.
*
* CAUTION: This function is deprecated because it requires allocating memory for the error
* message unnecessarily. For custom revert reasons use {tryMod}.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function mod(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
unchecked {
require(b > 0, errorMessage);
return a % b;
}
}
}
/**
* @title The base contract with the main logic of data extraction from calldata
* @author The Redstone Oracles team
* @dev This contract was created to reuse the same logic in the RedstoneConsumerBase
* and the ProxyConnector contracts
*/
contract CalldataExtractor is RedstoneConstants {
using SafeMath for uint256;
error DataPackageTimestampMustNotBeZero();
error DataPackageTimestampsMustBeEqual();
error RedstonePayloadMustHaveAtLeastOneDataPackage();
function extractTimestampsAndAssertAllAreEqual() public pure returns (uint256 extractedTimestamp) {
uint256 calldataNegativeOffset = _extractByteSizeOfUnsignedMetadata();
uint256 dataPackagesCount = _extractDataPackagesCountFromCalldata(calldataNegativeOffset);
if (dataPackagesCount == 0) {
revert RedstonePayloadMustHaveAtLeastOneDataPackage();
}
calldataNegativeOffset += DATA_PACKAGES_COUNT_BS;
for (uint256 dataPackageIndex = 0; dataPackageIndex < dataPackagesCount; dataPackageIndex++) {
uint256 dataPackageByteSize = _getDataPackageByteSize(calldataNegativeOffset);
// Extracting timestamp for the current data package
uint48 dataPackageTimestamp; // uint48, because timestamp uses 6 bytes
uint256 timestampNegativeOffset = (calldataNegativeOffset + TIMESTAMP_NEGATIVE_OFFSET_IN_DATA_PACKAGE_WITH_STANDARD_SLOT_BS);
uint256 timestampOffset = msg.data.length - timestampNegativeOffset;
assembly {
dataPackageTimestamp := calldataload(timestampOffset)
}
if (dataPackageTimestamp == 0) {
revert DataPackageTimestampMustNotBeZero();
}
if (extractedTimestamp == 0) {
extractedTimestamp = dataPackageTimestamp;
} else if (dataPackageTimestamp != extractedTimestamp) {
revert DataPackageTimestampsMustBeEqual();
}
calldataNegativeOffset += dataPackageByteSize;
}
}
function _getDataPackageByteSize(uint256 calldataNegativeOffset) internal pure returns (uint256) {
(
uint256 dataPointsCount,
uint256 eachDataPointValueByteSize
) = _extractDataPointsDetailsForDataPackage(calldataNegativeOffset);
return
dataPointsCount *
(DATA_POINT_SYMBOL_BS + eachDataPointValueByteSize) +
DATA_PACKAGE_WITHOUT_DATA_POINTS_BS;
}
function _extractByteSizeOfUnsignedMetadata() internal pure returns (uint256) {
// Checking if the calldata ends with the RedStone marker
bool hasValidRedstoneMarker;
assembly {
let calldataLast32Bytes := calldataload(sub(calldatasize(), STANDARD_SLOT_BS))
hasValidRedstoneMarker := eq(
REDSTONE_MARKER_MASK,
and(calldataLast32Bytes, REDSTONE_MARKER_MASK)
)
}
if (!hasValidRedstoneMarker) {
revert CalldataMustHaveValidPayload();
}
// Using uint24, because unsigned metadata byte size number has 3 bytes
uint24 unsignedMetadataByteSize;
if (REDSTONE_MARKER_BS_PLUS_STANDARD_SLOT_BS > msg.data.length) {
revert CalldataOverOrUnderFlow();
}
assembly {
unsignedMetadataByteSize := calldataload(
sub(calldatasize(), REDSTONE_MARKER_BS_PLUS_STANDARD_SLOT_BS)
)
}
uint256 calldataNegativeOffset = unsignedMetadataByteSize
+ UNSIGNED_METADATA_BYTE_SIZE_BS
+ REDSTONE_MARKER_BS;
if (calldataNegativeOffset + DATA_PACKAGES_COUNT_BS > msg.data.length) {
revert IncorrectUnsignedMetadataSize();
}
return calldataNegativeOffset;
}
// We return uint16, because unsigned metadata byte size number has 2 bytes
function _extractDataPackagesCountFromCalldata(uint256 calldataNegativeOffset)
internal
pure
returns (uint16 dataPackagesCount)
{
uint256 calldataNegativeOffsetWithStandardSlot = calldataNegativeOffset + STANDARD_SLOT_BS;
if (calldataNegativeOffsetWithStandardSlot > msg.data.length) {
revert CalldataOverOrUnderFlow();
}
assembly {
dataPackagesCount := calldataload(
sub(calldatasize(), calldataNegativeOffsetWithStandardSlot)
)
}
return dataPackagesCount;
}
function _extractDataPointValueAndDataFeedId(
uint256 calldataNegativeOffsetForDataPackage,
uint256 defaultDataPointValueByteSize,
uint256 dataPointIndex
) internal pure virtual returns (bytes32 dataPointDataFeedId, uint256 dataPointValue) {
uint256 negativeOffsetToDataPoints = calldataNegativeOffsetForDataPackage + DATA_PACKAGE_WITHOUT_DATA_POINTS_BS;
uint256 dataPointNegativeOffset = negativeOffsetToDataPoints.add(
(1 + dataPointIndex).mul((defaultDataPointValueByteSize + DATA_POINT_SYMBOL_BS))
);
uint256 dataPointCalldataOffset = msg.data.length.sub(dataPointNegativeOffset);
assembly {
dataPointDataFeedId := calldataload(dataPointCalldataOffset)
dataPointValue := calldataload(add(dataPointCalldataOffset, DATA_POINT_SYMBOL_BS))
}
}
function _extractDataPointsDetailsForDataPackage(uint256 calldataNegativeOffsetForDataPackage)
internal
pure
returns (uint256 dataPointsCount, uint256 eachDataPointValueByteSize)
{
// Using uint24, because data points count byte size number has 3 bytes
uint24 dataPointsCount_;
// Using uint32, because data point value byte size has 4 bytes
uint32 eachDataPointValueByteSize_;
// Extract data points count
uint256 negativeCalldataOffset = calldataNegativeOffsetForDataPackage + SIG_BS;
uint256 calldataOffset = msg.data.length.sub(negativeCalldataOffset + STANDARD_SLOT_BS);
assembly {
dataPointsCount_ := calldataload(calldataOffset)
}
// Extract each data point value size
calldataOffset = calldataOffset.sub(DATA_POINTS_COUNT_BS);
assembly {
eachDataPointValueByteSize_ := calldataload(calldataOffset)
}
// Prepare returned values
dataPointsCount = dataPointsCount_;
eachDataPointValueByteSize = eachDataPointValueByteSize_;
}
}
/**
* @title The base contract for forwarding redstone payload to other contracts
* @author The Redstone Oracles team
*/
contract ProxyConnector is RedstoneConstants, CalldataExtractor {
error ProxyCalldataFailedWithoutErrMsg();
error ProxyCalldataFailedWithStringMessage(string message);
error ProxyCalldataFailedWithCustomError(bytes result);
function proxyCalldata(
address contractAddress,
bytes memory encodedFunction,
bool forwardValue
) internal returns (bytes memory) {
bytes memory message = _prepareMessage(encodedFunction);
(bool success, bytes memory result) =
contractAddress.call{value: forwardValue ? msg.value : 0}(message);
return _prepareReturnValue(success, result);
}
function proxyDelegateCalldata(address contractAddress, bytes memory encodedFunction)
internal
returns (bytes memory)
{
bytes memory message = _prepareMessage(encodedFunction);
(bool success, bytes memory result) = contractAddress.delegatecall(message);
return _prepareReturnValue(success, result);
}
function proxyCalldataView(address contractAddress, bytes memory encodedFunction)
internal
view
returns (bytes memory)
{
bytes memory message = _prepareMessage(encodedFunction);
(bool success, bytes memory result) = contractAddress.staticcall(message);
return _prepareReturnValue(success, result);
}
function _prepareMessage(bytes memory encodedFunction) private pure returns (bytes memory) {
uint256 encodedFunctionBytesCount = encodedFunction.length;
uint256 redstonePayloadByteSize = _getRedstonePayloadByteSize();
uint256 resultMessageByteSize = encodedFunctionBytesCount + redstonePayloadByteSize;
if (redstonePayloadByteSize > msg.data.length) {
revert CalldataOverOrUnderFlow();
}
bytes memory message;
assembly {
message := mload(FREE_MEMORY_PTR) // sets message pointer to first free place in memory
// Saving the byte size of the result message (it's a standard in EVM)
mstore(message, resultMessageByteSize)
// Copying function and its arguments
for {
let from := add(BYTES_ARR_LEN_VAR_BS, encodedFunction)
let fromEnd := add(from, encodedFunctionBytesCount)
let to := add(BYTES_ARR_LEN_VAR_BS, message)
} lt (from, fromEnd) {
from := add(from, STANDARD_SLOT_BS)
to := add(to, STANDARD_SLOT_BS)
} {
// Copying data from encodedFunction to message (32 bytes at a time)
mstore(to, mload(from))
}
// Copying redstone payload to the message bytes
calldatacopy(
add(message, add(BYTES_ARR_LEN_VAR_BS, encodedFunctionBytesCount)), // address
sub(calldatasize(), redstonePayloadByteSize), // offset
redstonePayloadByteSize // bytes length to copy
)
// Updating free memory pointer
mstore(
FREE_MEMORY_PTR,
add(
add(message, add(redstonePayloadByteSize, encodedFunctionBytesCount)),
BYTES_ARR_LEN_VAR_BS
)
)
}
return message;
}
function _getRedstonePayloadByteSize() private pure returns (uint256) {
uint256 calldataNegativeOffset = _extractByteSizeOfUnsignedMetadata();
uint256 dataPackagesCount = _extractDataPackagesCountFromCalldata(calldataNegativeOffset);
calldataNegativeOffset += DATA_PACKAGES_COUNT_BS;
for (uint256 dataPackageIndex = 0; dataPackageIndex < dataPackagesCount; dataPackageIndex++) {
uint256 dataPackageByteSize = _getDataPackageByteSize(calldataNegativeOffset);
calldataNegativeOffset += dataPackageByteSize;
}
return calldataNegativeOffset;
}
function _prepareReturnValue(bool success, bytes memory result)
internal
pure
returns (bytes memory)
{
if (!success) {
if (result.length == 0) {
revert ProxyCalldataFailedWithoutErrMsg();
} else {
bool isStringErrorMessage;
assembly {
let first32BytesOfResult := mload(add(result, BYTES_ARR_LEN_VAR_BS))
isStringErrorMessage := eq(first32BytesOfResult, STRING_ERR_MESSAGE_MASK)
}
if (isStringErrorMessage) {
string memory receivedErrMsg;
assembly {
receivedErrMsg := add(result, REVERT_MSG_OFFSET)
}
revert ProxyCalldataFailedWithStringMessage(receivedErrMsg);
} else {
revert ProxyCalldataFailedWithCustomError(result);
}
}
}
return result;
}
}
/**
* @title Loanshark's CToken Contract
* @notice Abstract base for CTokens
* @author Loanshark
*/
abstract contract CToken is CTokenInterface, ExponentialNoError, TokenErrorReporter, ProxyConnector {
constructor() {
admin = payable(msg.sender);
}
/**
* @notice Initialize the money market
* @param comptroller_ The address of the Comptroller
* @param interestRateModel_ The address of the interest rate model
* @param initialExchangeRateMantissa_ The initial exchange rate, scaled by 1e18
* @param name_ EIP-20 name of this token
* @param symbol_ EIP-20 symbol of this token
* @param decimals_ EIP-20 decimal precision of this token
*/
function initialize(ComptrollerInterface comptroller_,
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 comptroller
uint err = _setComptroller(comptroller_);
require(err == NO_ERROR, "setting comptroller failed");
// Initialize block number and borrow index (block number mocks depend on comptroller being set)
accrualBlockNumber = getBlockNumber();
borrowIndex = mantissaOne;
// Set the interest rate model (depends on block number / borrow index)
err = _setInterestRateModelFresh(interestRateModel_);
require(err == 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 0 if the transfer succeeded, else revert
*/
function transferTokens(address spender, address src, address dst, uint tokens) internal returns (uint) {
/* Fail if transfer not allowed */
uint allowed = comptroller.transferAllowed(address(this), src, dst, tokens);
if (allowed != 0) {
revert TransferComptrollerRejection(allowed);
}
/* Do not allow self-transfers */
if (src == dst) {
revert TransferNotAllowed();
}
/* Get the allowance, infinite for the account owner */
uint startingAllowance = 0;
if (spender == src) {
startingAllowance = type(uint).max;
} else {
startingAllowance = transferAllowances[src][spender];
}
/* Do the calculations, checking for {under,over}flow */
uint allowanceNew = startingAllowance - tokens;
uint srcTokensNew = accountTokens[src] - tokens;
uint dstTokensNew = accountTokens[dst] + tokens;
/////////////////////////
// EFFECTS & INTERACTIONS
// (No safe failures beyond this point)
accountTokens[src] = srcTokensNew;
accountTokens[dst] = dstTokensNew;
/* Eat some of the allowance (if necessary) */
if (startingAllowance != type(uint).max) {
transferAllowances[src][spender] = allowanceNew;
}
/* We emit a Transfer event */
emit Transfer(src, dst, tokens);
// unused function
// comptroller.transferVerify(address(this), src, dst, tokens);
return 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) override external nonReentrant returns (bool) {
return transferTokens(msg.sender, msg.sender, dst, amount) == 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) override external nonReentrant returns (bool) {
return transferTokens(msg.sender, src, dst, amount) == 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 (uint256.max means infinite)
* @return Whether or not the approval succeeded
*/
function approve(address spender, uint256 amount) override 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) override 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) override 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) override external returns (uint) {
Exp memory exchangeRate = Exp({mantissa: exchangeRateCurrent()});
return mul_ScalarTruncate(exchangeRate, accountTokens[owner]);
}
/**
* @notice Get a snapshot of the account's balances, and the cached exchange rate
* @dev This is used by comptroller to more efficiently perform liquidity checks.
* @param account Address of the account to snapshot
* @return (possible error, token balance, borrow balance, exchange rate mantissa)
*/
function getAccountSnapshot(address account) override external view returns (uint, uint, uint, uint) {
return (
NO_ERROR,
accountTokens[account],
borrowBalanceStoredInternal(account),
exchangeRateStoredInternal()
);
}
/**
* @dev Function to simply retrieve block number
* This exists mainly for inheriting test contracts to stub this result.
*/
function getBlockNumber() virtual internal view returns (uint) {
return block.number;
}
/**
* @notice Returns the current per-block borrow interest rate for this cToken
* @return The borrow interest rate per block, scaled by 1e18
*/
function borrowRatePerBlock() override external view returns (uint) {
return interestRateModel.getBorrowRate(getCashPrior(), totalBorrows, totalReserves);
}
/**
* @notice Returns the current per-block supply interest rate for this cToken
* @return The supply interest rate per block, scaled by 1e18
*/
function supplyRatePerBlock() override 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() override external nonReentrant returns (uint) {
accrueInterest();
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) override external nonReentrant returns (uint) {
accrueInterest();
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) override public view returns (uint) {
return borrowBalanceStoredInternal(account);
}
/**
* @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 (uint) {
/* 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 0;
}
/* Calculate new borrow balance using the interest index:
* recentBorrowBalance = borrower.borrowBalance * market.borrowIndex / borrower.borrowIndex
*/
uint principalTimesIndex = borrowSnapshot.principal * borrowIndex;
return principalTimesIndex / borrowSnapshot.interestIndex;
}
/**
* @notice Accrue interest then return the up-to-date exchange rate
* @return Calculated exchange rate scaled by 1e18
*/
function exchangeRateCurrent() override public nonReentrant returns (uint) {
accrueInterest();
return exchangeRateStored();
}
/**
* @notice Calculates the exchange rate from the underlying to the CToken
* @dev This function does not accrue interest before calculating the exchange rate
* @return Calculated exchange rate scaled by 1e18
*/
function exchangeRateStored() override public view returns (uint) {
return exchangeRateStoredInternal();
}
/**
* @notice Calculates the exchange rate from the underlying to the CToken
* @dev This function does not accrue interest before calculating the exchange rate
* @return calculated exchange rate scaled by 1e18
*/
function exchangeRateStoredInternal() virtual internal view returns (uint) {
uint _totalSupply = totalSupply;
if (_totalSupply == 0) {
/*
* If there are no tokens minted:
* exchangeRate = initialExchangeRate
*/
return initialExchangeRateMantissa;
} else {
/*
* Otherwise:
* exchangeRate = (totalCash + totalBorrows - totalReserves) / totalSupply
*/
uint totalCash = getCashPrior();
uint cashPlusBorrowsMinusReserves = totalCash + totalBorrows - totalReserves;
uint exchangeRate = cashPlusBorrowsMinusReserves * expScale / _totalSupply;
return exchangeRate;
}
}
/**
* @notice Get cash balance of this cToken in the underlying asset
* @return The quantity of underlying asset owned by this contract
*/
function getCash() override 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() virtual override public returns (uint) {
/* Remember the initial block number */
uint currentBlockNumber = getBlockNumber();
uint accrualBlockNumberPrior = accrualBlockNumber;
/* Short-circuit accumulating 0 interest */
if (accrualBlockNumberPrior == currentBlockNumber) {
return 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 */
uint blockDelta = currentBlockNumber - accrualBlockNumberPrior;
/*
* 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 = mul_(Exp({mantissa: borrowRateMantissa}), blockDelta);
uint interestAccumulated = mul_ScalarTruncate(simpleInterestFactor, borrowsPrior);
uint totalBorrowsNew = interestAccumulated + borrowsPrior;
uint totalReservesNew = mul_ScalarTruncateAddUInt(Exp({mantissa: reserveFactorMantissa}), interestAccumulated, reservesPrior);
uint borrowIndexNew = mul_ScalarTruncateAddUInt(simpleInterestFactor, borrowIndexPrior, borrowIndexPrior);
/////////////////////////
// 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 NO_ERROR;
}
/**
* @notice Sender supplies assets into the market and receives cTokens in exchange
* @dev Accrues interest whether or not the operation succeeds, unless reverted
* @param mintAmount The amount of the underlying asset to supply
*/
function mintInternal(uint mintAmount) internal nonReentrant {
accrueInterest();
// mintFresh emits the actual Mint event if successful and logs on errors, so we don't need to
mintFresh(msg.sender, mintAmount);
}
/**
* @notice User supplies assets into the market and receives cTokens in exchange
* @dev Assumes interest has already been accrued up to the current block
* @param minter The address of the account which is supplying the assets
* @param mintAmount The amount of the underlying asset to supply
*/
function mintFresh(address minter, uint mintAmount) internal {
/* Fail if mint not allowed */
uint allowed = comptroller.mintAllowed(address(this), minter, mintAmount);
if (allowed != 0) {
revert MintComptrollerRejection(allowed);
}
/* Verify market's block number equals current block number */
if (accrualBlockNumber != getBlockNumber()) {
revert MintFreshnessCheck();
}
Exp memory exchangeRate = Exp({mantissa: exchangeRateStoredInternal()});
/////////////////////////
// EFFECTS & INTERACTIONS
// (No safe failures beyond this point)
/*
* We call `doTransferIn` for the minter and the mintAmount.
* Note: The cToken must handle variations between ERC-20 and ETH underlying.
* `doTransferIn` reverts if anything goes wrong, since we can't be sure if
* side-effects occurred. The function returns the amount actually transferred,
* in case of a fee. On success, the cToken holds an additional `actualMintAmount`
* of cash.
*/
uint actualMintAmount = doTransferIn(minter, mintAmount);
/*
* We get the current exchange rate and calculate the number of cTokens to be minted:
* mintTokens = actualMintAmount / exchangeRate
*/
uint mintTokens = div_(actualMintAmount, exchangeRate);
/*
* We calculate the new total supply of cTokens and minter token balance, checking for overflow:
* totalSupplyNew = totalSupply + mintTokens
* accountTokensNew = accountTokens[minter] + mintTokens
* And write them into storage
*/
totalSupply = totalSupply + mintTokens;
accountTokens[minter] = accountTokens[minter] + mintTokens;
/* We emit a Mint event, and a Transfer event */
emit Mint(minter, actualMintAmount, mintTokens);
emit Transfer(address(this), minter, mintTokens);
/* We call the defense hook */
// unused function
// comptroller.mintVerify(address(this), minter, actualMintAmount, mintTokens);
}
/**
* @notice Sender redeems cTokens in exchange for the underlying asset
* @dev Accrues interest whether or not the operation succeeds, unless reverted
* @param redeemTokens The number of cTokens to redeem into underlying
*/
function redeemInternal(uint redeemTokens) internal nonReentrant {
accrueInterest();
// redeemFresh emits redeem-specific logs on errors, so we don't need to
redeemFresh(payable(msg.sender), redeemTokens, 0);
}
/**
* @notice Sender redeems cTokens in exchange for a specified amount of underlying asset
* @dev Accrues interest whether or not the operation succeeds, unless reverted
* @param redeemAmount The amount of underlying to receive from redeeming cTokens
*/
function redeemUnderlyingInternal(uint redeemAmount) internal nonReentrant {
accrueInterest();
// redeemFresh emits redeem-specific logs on errors, so we don't need to
redeemFresh(payable(msg.sender), 0, redeemAmount);
}
/**
* @notice User redeems cTokens in exchange for the underlying asset
* @dev Assumes interest has already been accrued up to the current block
* @param redeemer The address of the account which is redeeming the tokens
* @param redeemTokensIn The number of cTokens to redeem into underlying (only one of redeemTokensIn or redeemAmountIn may be non-zero)
* @param redeemAmountIn The number of underlying tokens to receive from redeeming cTokens (only one of redeemTokensIn or redeemAmountIn may be non-zero)
*/
function redeemFresh(address payable redeemer, uint redeemTokensIn, uint redeemAmountIn) internal {
require(redeemTokensIn == 0 || redeemAmountIn == 0, "one of redeemTokensIn or redeemAmountIn must be zero");
/* exchangeRate = invoke Exchange Rate Stored() */
Exp memory exchangeRate = Exp({mantissa: exchangeRateStoredInternal() });
uint redeemTokens;
uint redeemAmount;
/* 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
*/
redeemTokens = redeemTokensIn;
redeemAmount = mul_ScalarTruncate(exchangeRate, redeemTokensIn);
} else {
/*
* We get the current exchange rate and calculate the amount to be redeemed:
* redeemTokens = redeemAmountIn / exchangeRate
* redeemAmount = redeemAmountIn
*/
redeemTokens = div_(redeemAmountIn, exchangeRate);
redeemAmount = redeemAmountIn;
}
/* Fail if redeem not allowed */
/* USE REDSTONE */
//uint allowed = comptroller.redeemAllowed(address(this), redeemer, redeemTokens);
bytes memory encodedFunction = abi.encodeWithSelector(
ComptrollerInterface.redeemAllowed.selector,
address(this),
redeemer,
redeemTokens
);
bytes memory encodedResult = proxyCalldata(
address(comptroller),
encodedFunction,
true
);
uint allowed = abi.decode(encodedResult, (uint256));
if (allowed != 0) {
revert RedeemComptrollerRejection(allowed);
}
/* Verify market's block number equals current block number */
if (accrualBlockNumber != getBlockNumber()) {
revert RedeemFreshnessCheck();
}
/* Fail gracefully if protocol has insufficient cash */
if (getCashPrior() < redeemAmount) {
revert RedeemTransferOutNotPossible();
}
/////////////////////////
// EFFECTS & INTERACTIONS
// (No safe failures beyond this point)
/*
* We write the previously calculated values into storage.
* Note: Avoid token reentrancy attacks by writing reduced supply before external transfer.
*/
totalSupply = totalSupply - redeemTokens;
accountTokens[redeemer] = accountTokens[redeemer] - redeemTokens;
/*
* We invoke doTransferOut for the redeemer and the redeemAmount.
* Note: The cToken must handle variations between ERC-20 and ETH underlying.
* On success, the cToken has redeemAmount less of cash.
* doTransferOut reverts if anything goes wrong, since we can't be sure if side effects occurred.
*/
doTransferOut(redeemer, redeemAmount);
/* We emit a Transfer event, and a Redeem event */
emit Transfer(redeemer, address(this), redeemTokens);
emit Redeem(redeemer, redeemAmount, redeemTokens);
/* We call the defense hook */
comptroller.redeemVerify(address(this), redeemer, redeemAmount, redeemTokens);
}
/**
* @notice Sender borrows assets from the protocol to their own address
* @param borrowAmount The amount of the underlying asset to borrow
*/
function borrowInternal(uint borrowAmount) internal nonReentrant {
accrueInterest();
// borrowFresh emits borrow-specific logs on errors, so we don't need to
borrowFresh(payable(msg.sender), borrowAmount);
}
/**
* @notice Users borrow assets from the protocol to their own address
* @param borrowAmount The amount of the underlying asset to borrow
*/
function borrowFresh(address payable borrower, uint borrowAmount) internal {
/* Fail if borrow not allowed */
/* USE REDSTONE */
//uint allowed = comptroller.borrowAllowed(address(this), borrower, borrowAmount);
bytes memory encodedFunction = abi.encodeWithSelector(
ComptrollerInterface.borrowAllowed.selector,
address(this),
borrower,
borrowAmount
);
bytes memory encodedResult = proxyCalldata(
address(comptroller),
encodedFunction,
true
);
uint allowed = abi.decode(encodedResult, (uint256));
if (allowed != 0) {
revert BorrowComptrollerRejection(allowed);
}
/* Verify market's block number equals current block number */
if (accrualBlockNumber != getBlockNumber()) {
revert BorrowFreshnessCheck();
}
/* Fail gracefully if protocol has insufficient underlying cash */
if (getCashPrior() < borrowAmount) {
revert BorrowCashNotAvailable();
}
/*
* We calculate the new borrower and total borrow balances, failing on overflow:
* accountBorrowNew = accountBorrow + borrowAmount
* totalBorrowsNew = totalBorrows + borrowAmount
*/
uint accountBorrowsPrev = borrowBalanceStoredInternal(borrower);
uint accountBorrowsNew = accountBorrowsPrev + borrowAmount;
uint totalBorrowsNew = totalBorrows + borrowAmount;
/////////////////////////
// EFFECTS & INTERACTIONS
// (No safe failures beyond this point)
/*
* We write the previously calculated values into storage.
* Note: Avoid token reentrancy attacks by writing increased borrow before external transfer.
`*/
accountBorrows[borrower].principal = accountBorrowsNew;
accountBorrows[borrower].interestIndex = borrowIndex;
totalBorrows = totalBorrowsNew;
/*
* We invoke doTransferOut for the borrower and the borrowAmount.
* Note: The cToken must handle variations between ERC-20 and ETH underlying.
* On success, the cToken borrowAmount less of cash.
* doTransferOut reverts if anything goes wrong, since we can't be sure if side effects occurred.
*/
doTransferOut(borrower, borrowAmount);
/* We emit a Borrow event */
emit Borrow(borrower, borrowAmount, accountBorrowsNew, totalBorrowsNew);
}
/**
* @notice Sender repays their own borrow
* @param repayAmount The amount to repay, or -1 for the full outstanding amount
*/
function repayBorrowInternal(uint repayAmount) internal nonReentrant {
accrueInterest();
// repayBorrowFresh emits repay-borrow-specific logs on errors, so we don't need to
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, or -1 for the full outstanding amount
*/
function repayBorrowBehalfInternal(address borrower, uint repayAmount) internal nonReentrant {
accrueInterest();
// repayBorrowFresh emits repay-borrow-specific logs on errors, so we don't need to
repayBorrowFresh(msg.sender, borrower, repayAmount);
}
/**
* @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 underlying tokens being returned, or -1 for the full outstanding amount
* @return (uint) the actual repayment amount.
*/
function repayBorrowFresh(address payer, address borrower, uint repayAmount) internal returns (uint) {
/* Fail if repayBorrow not allowed */
uint allowed = comptroller.repayBorrowAllowed(address(this), payer, borrower, repayAmount);
if (allowed != 0) {
revert RepayBorrowComptrollerRejection(allowed);
}
/* Verify market's block number equals current block number */
if (accrualBlockNumber != getBlockNumber()) {
revert RepayBorrowFreshnessCheck();
}
/* We fetch the amount the borrower owes, with accumulated interest */
uint accountBorrowsPrev = borrowBalanceStoredInternal(borrower);
/* If repayAmount == -1, repayAmount = accountBorrows */
uint repayAmountFinal = repayAmount == type(uint).max ? accountBorrowsPrev : repayAmount;
/////////////////////////
// EFFECTS & INTERACTIONS
// (No safe failures beyond this point)
/*
* We call doTransferIn for the payer and the repayAmount
* Note: The cToken must handle variations between ERC-20 and ETH underlying.
* On success, the cToken holds an additional repayAmount of cash.
* doTransferIn reverts if anything goes wrong, since we can't be sure if side effects occurred.
* it returns the amount actually transferred, in case of a fee.
*/
uint actualRepayAmount = doTransferIn(payer, repayAmountFinal);
/*
* We calculate the new borrower and total borrow balances, failing on underflow:
* accountBorrowsNew = accountBorrows - actualRepayAmount
* totalBorrowsNew = totalBorrows - actualRepayAmount
*/
uint accountBorrowsNew = accountBorrowsPrev - actualRepayAmount;
uint totalBorrowsNew = totalBorrows - actualRepayAmount;
/* We write the previously calculated values into storage */
accountBorrows[borrower].principal = accountBorrowsNew;
accountBorrows[borrower].interestIndex = borrowIndex;
totalBorrows = totalBorrowsNew;
/* We emit a RepayBorrow event */
emit RepayBorrow(payer, borrower, actualRepayAmount, accountBorrowsNew, totalBorrowsNew);
return actualRepayAmount;
}
/**
* @notice The sender liquidates the borrowers collateral.
* The collateral seized is transferred to the liquidator.
* @param borrower The borrower of this cToken to be liquidated
* @param cTokenCollateral The market in which to seize collateral from the borrower
* @param repayAmount The amount of the underlying borrowed asset to repay
*/
function liquidateBorrowInternal(address borrower, uint repayAmount, CTokenInterface cTokenCollateral) internal nonReentrant {
accrueInterest();
uint error = cTokenCollateral.accrueInterest();
if (error != NO_ERROR) {
// accrueInterest emits logs on errors, but we still want to log the fact that an attempted liquidation failed
revert LiquidateAccrueCollateralInterestFailed(error);
}
// liquidateBorrowFresh emits borrow-specific logs on errors, so we don't need to
liquidateBorrowFresh(msg.sender, borrower, repayAmount, cTokenCollateral);
}
/**
* @notice The liquidator liquidates the borrowers collateral.
* The collateral seized is transferred to the liquidator.
* @param borrower The borrower of this cToken to be liquidated
* @param liquidator The address repaying the borrow and seizing collateral
* @param cTokenCollateral The market in which to seize collateral from the borrower
* @param repayAmount The amount of the underlying borrowed asset to repay
*/
function liquidateBorrowFresh(address liquidator, address borrower, uint repayAmount, CTokenInterface cTokenCollateral) internal {
/* Fail if liquidate not allowed */
/* Use redstone */
// uint allowed = comptroller.liquidateBorrowAllowed(address(this), address(cTokenCollateral), liquidator, borrower, repayAmount);
bytes memory encodedFunction = abi.encodeWithSelector(
ComptrollerInterface.liquidateBorrowAllowed.selector,
address(this),
address(cTokenCollateral),
liquidator,
borrower,
repayAmount
);
bytes memory encodedResult = proxyCalldata(
address(comptroller),
encodedFunction,
true
);
uint allowed = abi.decode(encodedResult, (uint));
if (allowed != 0) {
revert LiquidateComptrollerRejection(allowed);
}
/* Verify market's block number equals current block number */
if (accrualBlockNumber != getBlockNumber()) {
revert LiquidateFreshnessCheck();
}
/* Verify cTokenCollateral market's block number equals current block number */
if (cTokenCollateral.accrualBlockNumber() != getBlockNumber()) {
revert LiquidateCollateralFreshnessCheck();
}
/* Fail if borrower = liquidator */
if (borrower == liquidator) {
revert LiquidateLiquidatorIsBorrower();
}
/* Fail if repayAmount = 0 */
if (repayAmount == 0) {
revert LiquidateCloseAmountIsZero();
}
/* Fail if repayAmount = -1 */
if (repayAmount == type(uint).max) {
revert LiquidateCloseAmountIsUintMax();
}
/* Fail if repayBorrow fails */
uint actualRepayAmount = repayBorrowFresh(liquidator, borrower, repayAmount);
/////////////////////////
// EFFECTS & INTERACTIONS
// (No safe failures beyond this point)
/* We calculate the number of collateral tokens that will be seized */
/* use redstone */
//(uint amountSeizeError, uint seizeTokens) = comptroller.liquidateCalculateSeizeTokens(address(this), address(cTokenCollateral), actualRepayAmount);
bytes memory encodedFunction2 = abi.encodeWithSelector(
ComptrollerInterface.liquidateCalculateSeizeTokens.selector,
address(this),
address(cTokenCollateral),
actualRepayAmount
);
bytes memory encodedResult2 = proxyCalldataView(
address(comptroller),
encodedFunction2
);
(uint amountSeizeError, uint seizeTokens) = abi.decode(encodedResult2, (uint, uint));
require(amountSeizeError == NO_ERROR, "LIQUIDATE_COMPTROLLER_CALCULATE_AMOUNT_SEIZE_FAILED");
/* Revert if borrower collateral token balance < seizeTokens */
require(cTokenCollateral.balanceOf(borrower) >= seizeTokens, "LIQUIDATE_SEIZE_TOO_MUCH");
// If this is also the collateral, run seizeInternal to avoid re-entrancy, otherwise make an external call
if (address(cTokenCollateral) == address(this)) {
seizeInternal(address(this), liquidator, borrower, seizeTokens);
} else {
require(cTokenCollateral.seize(liquidator, borrower, seizeTokens) == NO_ERROR, "token seizure failed");
}
/* We emit a LiquidateBorrow event */
emit LiquidateBorrow(liquidator, borrower, actualRepayAmount, address(cTokenCollateral), seizeTokens);
}
/**
* @notice Transfers collateral tokens (this market) to the liquidator.
* @dev Will fail unless called by another cToken during the process of liquidation.
* Its absolutely critical to use msg.sender as the borrowed cToken and not a parameter.
* @param liquidator The account receiving seized collateral
* @param borrower The account having collateral seized
* @param seizeTokens The number of cTokens to seize
* @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)
*/
function seize(address liquidator, address borrower, uint seizeTokens) override external nonReentrant returns (uint) {
seizeInternal(msg.sender, liquidator, borrower, seizeTokens);
return NO_ERROR;
}
/**
* @notice Transfers collateral tokens (this market) to the liquidator.
* @dev Called only during an in-kind liquidation, or by liquidateBorrow during the liquidation of another CToken.
* Its absolutely critical to use msg.sender as the seizer cToken and not a parameter.
* @param seizerToken The contract seizing the collateral (i.e. borrowed cToken)
* @param liquidator The account receiving seized collateral
* @param borrower The account having collateral seized
* @param seizeTokens The number of cTokens to seize
*/
function seizeInternal(address seizerToken, address liquidator, address borrower, uint seizeTokens) internal {
/* Fail if seize not allowed */
uint allowed = comptroller.seizeAllowed(address(this), seizerToken, liquidator, borrower, seizeTokens);
if (allowed != 0) {
revert LiquidateSeizeComptrollerRejection(allowed);
}
/* Fail if borrower = liquidator */
if (borrower == liquidator) {
revert LiquidateSeizeLiquidatorIsBorrower();
}
/*
* We calculate the new borrower and liquidator token balances, failing on underflow/overflow:
* borrowerTokensNew = accountTokens[borrower] - seizeTokens
* liquidatorTokensNew = accountTokens[liquidator] + seizeTokens
*/
uint protocolSeizeTokens = mul_(seizeTokens, Exp({mantissa: protocolSeizeShareMantissa}));
uint liquidatorSeizeTokens = seizeTokens - protocolSeizeTokens;
Exp memory exchangeRate = Exp({mantissa: exchangeRateStoredInternal()});
uint protocolSeizeAmount = mul_ScalarTruncate(exchangeRate, protocolSeizeTokens);
uint totalReservesNew = totalReserves + protocolSeizeAmount;
/////////////////////////
// EFFECTS & INTERACTIONS
// (No safe failures beyond this point)
/* We write the calculated values into storage */
totalReserves = totalReservesNew;
totalSupply = totalSupply - protocolSeizeTokens;
accountTokens[borrower] = accountTokens[borrower] - seizeTokens;
accountTokens[liquidator] = accountTokens[liquidator] + liquidatorSeizeTokens;
/* Emit a Transfer event */
emit Transfer(borrower, liquidator, liquidatorSeizeTokens);
emit Transfer(borrower, address(this), protocolSeizeTokens);
emit ReservesAdded(address(this), protocolSeizeAmount, totalReservesNew);
}
/*** 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) override external returns (uint) {
// Check caller = admin
if (msg.sender != admin) {
revert SetPendingAdminOwnerCheck();
}
// 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 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() override external returns (uint) {
// Check caller is pendingAdmin and pendingAdmin ??address(0)
if (msg.sender != pendingAdmin || msg.sender == address(0)) {
revert AcceptAdminPendingAdminCheck();
}
// 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 = payable(address(0));
emit NewAdmin(oldAdmin, admin);
emit NewPendingAdmin(oldPendingAdmin, pendingAdmin);
return NO_ERROR;
}
/**
* @notice Sets a new comptroller for the market
* @dev Admin function to set a new comptroller
* @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)
*/
function _setComptroller(ComptrollerInterface newComptroller) override public returns (uint) {
// Check caller is admin
if (msg.sender != admin) {
revert SetComptrollerOwnerCheck();
}
ComptrollerInterface oldComptroller = comptroller;
// Ensure invoke comptroller.isComptroller() returns true
require(newComptroller.isComptroller(), "marker method returned false");
// Set market's comptroller to newComptroller
comptroller = newComptroller;
// Emit NewComptroller(oldComptroller, newComptroller)
emit NewComptroller(oldComptroller, newComptroller);
return 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) override external nonReentrant returns (uint) {
accrueInterest();
// _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) {
revert SetReserveFactorAdminCheck();
}
// Verify market's block number equals current block number
if (accrualBlockNumber != getBlockNumber()) {
revert SetReserveFactorFreshCheck();
}
// Check newReserveFactor ??maxReserveFactor
if (newReserveFactorMantissa > reserveFactorMaxMantissa) {
revert SetReserveFactorBoundsCheck();
}
uint oldReserveFactorMantissa = reserveFactorMantissa;
reserveFactorMantissa = newReserveFactorMantissa;
emit NewReserveFactor(oldReserveFactorMantissa, newReserveFactorMantissa);
return 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) {
accrueInterest();
// _addReservesFresh emits reserve-addition-specific logs on errors, so we don't need to.
_addReservesFresh(addAmount);
return NO_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()) {
revert AddReservesFactorFreshCheck(actualAddAmount);
}
/////////////////////////
// EFFECTS & INTERACTIONS
// (No safe failures beyond this point)
/*
* We call doTransferIn for the caller and the addAmount
* Note: The cToken must handle variations between ERC-20 and ETH underlying.
* On success, the cToken holds an additional addAmount of cash.
* doTransferIn reverts if anything goes wrong, since we can't be sure if side effects occurred.
* it returns the amount actually transferred, in case of a fee.
*/
actualAddAmount = doTransferIn(msg.sender, addAmount);
totalReservesNew = totalReserves + actualAddAmount;
// 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 (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) override external nonReentrant returns (uint) {
accrueInterest();
// _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) {
revert ReduceReservesAdminCheck();
}
// We fail gracefully unless market's block number equals current block number
if (accrualBlockNumber != getBlockNumber()) {
revert ReduceReservesFreshCheck();
}
// Fail gracefully if protocol has insufficient underlying cash
if (getCashPrior() < reduceAmount) {
revert ReduceReservesCashNotAvailable();
}
// Check reduceAmount ??reserves[n] (totalReserves)
if (reduceAmount > totalReserves) {
revert ReduceReservesCashValidation();
}
/////////////////////////
// EFFECTS & INTERACTIONS
// (No safe failures beyond this point)
totalReservesNew = totalReserves - reduceAmount;
// 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 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) override public returns (uint) {
accrueInterest();
// _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) {
revert SetInterestRateModelOwnerCheck();
}
// We fail gracefully unless market's block number equals current block number
if (accrualBlockNumber != getBlockNumber()) {
revert SetInterestRateModelFreshCheck();
}
// 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 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() virtual 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) virtual internal returns (uint);
/**
* @dev Performs a transfer out, ideally returning an explanatory error code upon failure rather 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) virtual 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/CErc20.sol
pragma solidity ^0.8.10;
interface CompLike {
function delegate(address delegatee) external;
}
/**
* @title Loanshark's CErc20 Contract
* @notice CTokens which wrap an EIP-20 underlying
* @author Loanshark
*/
contract CErc20 is CToken, CErc20Interface {
/**
* @notice Initialize the new money market
* @param underlying_ The address of the underlying asset
* @param comptroller_ The address of the Comptroller
* @param interestRateModel_ The address of the interest rate model
* @param initialExchangeRateMantissa_ The initial exchange rate, scaled by 1e18
* @param name_ ERC-20 name of this token
* @param symbol_ ERC-20 symbol of this token
* @param decimals_ ERC-20 decimal precision of this token
*/
function initialize(address underlying_,
ComptrollerInterface comptroller_,
InterestRateModel interestRateModel_,
uint initialExchangeRateMantissa_,
string memory name_,
string memory symbol_,
uint8 decimals_) public {
// Creator of the contract is admin during initialization
admin = payable(msg.sender);
// CToken initialize does the bulk of the work
super.initialize(comptroller_, 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 cTokens in exchange
* @dev Accrues interest whether or not the operation succeeds, unless reverted
* @param mintAmount The amount of the underlying asset to supply
* @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)
*/
function mint(uint mintAmount) override external returns (uint) {
mintInternal(mintAmount);
return NO_ERROR;
}
/**
* @notice Sender redeems cTokens in exchange for the underlying asset
* @dev Accrues interest whether or not the operation succeeds, unless reverted
* @param redeemTokens The number of cTokens to redeem into underlying
* @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)
*/
function redeem(uint redeemTokens) override external returns (uint) {
redeemInternal(redeemTokens);
return NO_ERROR;
}
/**
* @notice Sender redeems cTokens in exchange for a specified amount of underlying asset
* @dev Accrues interest whether or not the operation succeeds, unless reverted
* @param redeemAmount The amount of underlying to redeem
* @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)
*/
function redeemUnderlying(uint redeemAmount) override external returns (uint) {
redeemUnderlyingInternal(redeemAmount);
return 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 borrow(uint borrowAmount) override external returns (uint) {
borrowInternal(borrowAmount);
return NO_ERROR;
}
/**
* @notice Sender repays their own borrow
* @param repayAmount The amount to repay, or -1 for the full outstanding amount
* @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)
*/
function repayBorrow(uint repayAmount) override external returns (uint) {
repayBorrowInternal(repayAmount);
return NO_ERROR;
}
/**
* @notice Sender repays a borrow belonging to borrower
* @param borrower the account with the debt being payed off
* @param repayAmount The amount to repay, or -1 for the full outstanding amount
* @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)
*/
function repayBorrowBehalf(address borrower, uint repayAmount) override external returns (uint) {
repayBorrowBehalfInternal(borrower, repayAmount);
return NO_ERROR;
}
/**
* @notice The sender liquidates the borrowers collateral.
* The collateral seized is transferred to the liquidator.
* @param borrower The borrower of this cToken to be liquidated
* @param repayAmount The amount of the underlying borrowed asset to repay
* @param cTokenCollateral The market in which to seize collateral from the borrower
* @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)
*/
function liquidateBorrow(address borrower, uint repayAmount, CTokenInterface cTokenCollateral) override external returns (uint) {
liquidateBorrowInternal(borrower, repayAmount, cTokenCollateral);
return NO_ERROR;
}
/**
* @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) override external {
require(msg.sender == admin, "CErc20::sweepToken: only admin can sweep tokens");
require(address(token) != underlying, "CErc20::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) override 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() virtual override 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) virtual override internal returns (uint) {
// Read from storage once
address underlying_ = underlying;
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 override 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));
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) virtual override 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 override 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 COMP-like underlying
* @param compLikeDelegatee The address to delegate votes to
* @dev CTokens whose underlying are not CompLike should revert here
*/
function _delegateCompLikeTo(address compLikeDelegatee) external {
require(msg.sender == admin, "only the admin may set the comp-like delegate");
CompLike(underlying).delegate(compLikeDelegatee);
}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[],"name":"AcceptAdminPendingAdminCheck","type":"error"},{"inputs":[{"internalType":"uint256","name":"actualAddAmount","type":"uint256"}],"name":"AddReservesFactorFreshCheck","type":"error"},{"inputs":[],"name":"BorrowCashNotAvailable","type":"error"},{"inputs":[{"internalType":"uint256","name":"errorCode","type":"uint256"}],"name":"BorrowComptrollerRejection","type":"error"},{"inputs":[],"name":"BorrowFreshnessCheck","type":"error"},{"inputs":[],"name":"CalldataMustHaveValidPayload","type":"error"},{"inputs":[],"name":"CalldataOverOrUnderFlow","type":"error"},{"inputs":[],"name":"DataPackageTimestampMustNotBeZero","type":"error"},{"inputs":[],"name":"DataPackageTimestampsMustBeEqual","type":"error"},{"inputs":[],"name":"EachSignerMustProvideTheSameValue","type":"error"},{"inputs":[],"name":"EmptyCalldataPointersArr","type":"error"},{"inputs":[],"name":"IncorrectUnsignedMetadataSize","type":"error"},{"inputs":[{"internalType":"uint256","name":"receivedSignersCount","type":"uint256"},{"internalType":"uint256","name":"requiredSignersCount","type":"uint256"}],"name":"InsufficientNumberOfUniqueSigners","type":"error"},{"inputs":[],"name":"InvalidCalldataPointer","type":"error"},{"inputs":[{"internalType":"uint256","name":"errorCode","type":"uint256"}],"name":"LiquidateAccrueBorrowInterestFailed","type":"error"},{"inputs":[{"internalType":"uint256","name":"errorCode","type":"uint256"}],"name":"LiquidateAccrueCollateralInterestFailed","type":"error"},{"inputs":[],"name":"LiquidateCloseAmountIsUintMax","type":"error"},{"inputs":[],"name":"LiquidateCloseAmountIsZero","type":"error"},{"inputs":[],"name":"LiquidateCollateralFreshnessCheck","type":"error"},{"inputs":[{"internalType":"uint256","name":"errorCode","type":"uint256"}],"name":"LiquidateComptrollerRejection","type":"error"},{"inputs":[],"name":"LiquidateFreshnessCheck","type":"error"},{"inputs":[],"name":"LiquidateLiquidatorIsBorrower","type":"error"},{"inputs":[{"internalType":"uint256","name":"errorCode","type":"uint256"}],"name":"LiquidateRepayBorrowFreshFailed","type":"error"},{"inputs":[{"internalType":"uint256","name":"errorCode","type":"uint256"}],"name":"LiquidateSeizeComptrollerRejection","type":"error"},{"inputs":[],"name":"LiquidateSeizeLiquidatorIsBorrower","type":"error"},{"inputs":[{"internalType":"uint256","name":"errorCode","type":"uint256"}],"name":"MintComptrollerRejection","type":"error"},{"inputs":[],"name":"MintFreshnessCheck","type":"error"},{"inputs":[{"internalType":"bytes","name":"result","type":"bytes"}],"name":"ProxyCalldataFailedWithCustomError","type":"error"},{"inputs":[{"internalType":"string","name":"message","type":"string"}],"name":"ProxyCalldataFailedWithStringMessage","type":"error"},{"inputs":[],"name":"ProxyCalldataFailedWithoutErrMsg","type":"error"},{"inputs":[{"internalType":"uint256","name":"errorCode","type":"uint256"}],"name":"RedeemComptrollerRejection","type":"error"},{"inputs":[],"name":"RedeemFreshnessCheck","type":"error"},{"inputs":[],"name":"RedeemTransferOutNotPossible","type":"error"},{"inputs":[],"name":"RedstonePayloadMustHaveAtLeastOneDataPackage","type":"error"},{"inputs":[],"name":"ReduceReservesAdminCheck","type":"error"},{"inputs":[],"name":"ReduceReservesCashNotAvailable","type":"error"},{"inputs":[],"name":"ReduceReservesCashValidation","type":"error"},{"inputs":[],"name":"ReduceReservesFreshCheck","type":"error"},{"inputs":[{"internalType":"uint256","name":"errorCode","type":"uint256"}],"name":"RepayBorrowComptrollerRejection","type":"error"},{"inputs":[],"name":"RepayBorrowFreshnessCheck","type":"error"},{"inputs":[],"name":"SetComptrollerOwnerCheck","type":"error"},{"inputs":[],"name":"SetInterestRateModelFreshCheck","type":"error"},{"inputs":[],"name":"SetInterestRateModelOwnerCheck","type":"error"},{"inputs":[],"name":"SetPendingAdminOwnerCheck","type":"error"},{"inputs":[],"name":"SetReserveFactorAdminCheck","type":"error"},{"inputs":[],"name":"SetReserveFactorBoundsCheck","type":"error"},{"inputs":[],"name":"SetReserveFactorFreshCheck","type":"error"},{"inputs":[{"internalType":"address","name":"receivedSigner","type":"address"}],"name":"SignerNotAuthorised","type":"error"},{"inputs":[{"internalType":"uint256","name":"errorCode","type":"uint256"}],"name":"TransferComptrollerRejection","type":"error"},{"inputs":[],"name":"TransferNotAllowed","type":"error"},{"inputs":[],"name":"TransferNotEnough","type":"error"},{"inputs":[],"name":"TransferTooMuch","type":"error"},{"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":"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":"cTokenCollateral","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 ComptrollerInterface","name":"oldComptroller","type":"address"},{"indexed":false,"internalType":"contract ComptrollerInterface","name":"newComptroller","type":"address"}],"name":"NewComptroller","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":"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"},{"inputs":[],"name":"NO_ERROR","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_acceptAdmin","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"addAmount","type":"uint256"}],"name":"_addReserves","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"compLikeDelegatee","type":"address"}],"name":"_delegateCompLikeTo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"reduceAmount","type":"uint256"}],"name":"_reduceReserves","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract ComptrollerInterface","name":"newComptroller","type":"address"}],"name":"_setComptroller","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract InterestRateModel","name":"newInterestRateModel","type":"address"}],"name":"_setInterestRateModel","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"newPendingAdmin","type":"address"}],"name":"_setPendingAdmin","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newReserveFactorMantissa","type":"uint256"}],"name":"_setReserveFactor","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"accrualBlockNumber","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"accrueInterest","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"admin","outputs":[{"internalType":"address payable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOfUnderlying","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"borrowAmount","type":"uint256"}],"name":"borrow","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"borrowBalanceCurrent","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"borrowBalanceStored","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"borrowIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"borrowRatePerBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"comptroller","outputs":[{"internalType":"contract ComptrollerInterface","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"exchangeRateCurrent","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"exchangeRateStored","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"extractTimestampsAndAssertAllAreEqual","outputs":[{"internalType":"uint256","name":"extractedTimestamp","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"getAccountSnapshot","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getCash","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"underlying_","type":"address"},{"internalType":"contract ComptrollerInterface","name":"comptroller_","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":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract ComptrollerInterface","name":"comptroller_","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":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"interestRateModel","outputs":[{"internalType":"contract InterestRateModel","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isCToken","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"borrower","type":"address"},{"internalType":"uint256","name":"repayAmount","type":"uint256"},{"internalType":"contract CTokenInterface","name":"cTokenCollateral","type":"address"}],"name":"liquidateBorrow","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"mintAmount","type":"uint256"}],"name":"mint","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pendingAdmin","outputs":[{"internalType":"address payable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"protocolSeizeShareMantissa","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"redeemTokens","type":"uint256"}],"name":"redeem","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"redeemAmount","type":"uint256"}],"name":"redeemUnderlying","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"repayAmount","type":"uint256"}],"name":"repayBorrow","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"borrower","type":"address"},{"internalType":"uint256","name":"repayAmount","type":"uint256"}],"name":"repayBorrowBehalf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"reserveFactorMantissa","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"liquidator","type":"address"},{"internalType":"address","name":"borrower","type":"address"},{"internalType":"uint256","name":"seizeTokens","type":"uint256"}],"name":"seize","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"supplyRatePerBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract EIP20NonStandardInterface","name":"token","type":"address"}],"name":"sweepToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalBorrows","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalBorrowsCurrent","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"totalReserves","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"dst","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"src","type":"address"},{"internalType":"address","name":"dst","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"underlying","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"}]Contract Creation Code
608060405234801561000f575f80fd5b5060038054610100600160a81b0319163361010002179055613e69806100345f395ff3fe608060405234801561000f575f80fd5b5060043610610319575f3560e01c806373acee98116101af578063b71d1a0c116100fe578063f2b3abbd1161009e578063f851a44011610079578063f851a440146106b9578063f8f9da28146106d1578063fca7820b146106d9578063fe9c44ae146106ec575f80fd5b8063f2b3abbd14610680578063f3fdb15a14610693578063f5e3c462146106a6575f80fd5b8063c5ebeaec116100d9578063c5ebeaec1461061a578063db006a751461062d578063dd62ed3e14610640578063e9c714f214610678575f80fd5b8063b71d1a0c146105cc578063bd6d894d146105df578063c37f68e2146105e7575f80fd5b806399d8c1b411610169578063a9059cbb11610144578063a9059cbb14610595578063aa5af0fd146105a8578063ae9d70b0146105b1578063b2a02ff1146105b9575f80fd5b806399d8c1b414610567578063a0712d681461057a578063a6afed951461058d575f80fd5b806373acee98146105155780637f1e06be1461051d578063852a12e3146105305780638f840ddd1461054357806395d89b411461054c57806395dd919314610554575f80fd5b80633af9e6691161026b5780635fe3b5671161022557806369ab32501161020057806369ab3250146104ca5780636c540baf146104d15780636f307dc3146104da57806370a08231146104ed575f80fd5b80635fe3b56714610496578063601a0bf1146104a95780636752e702146104bc575f80fd5b80633af9e669146104445780633b1d21a2146104575780633e9410101461045f5780634576b5db1461047257806347bd37181461048557806355a547d51461048e575f80fd5b8063182df0f5116102d657806323b872dd116102b157806323b872dd146103d45780632608f818146103e757806326782247146103fa578063313ce56714610425575f80fd5b8063182df0f5146103a45780631a31d465146103ac5780631be19560146103c1575f80fd5b806306fdde031461031d578063095ea7b31461033b5780630e7527021461035e578063173b99041461037f57806317bfdfbc1461038857806318160ddd1461039b575b5f80fd5b6103256106f4565b6040516103329190613841565b60405180910390f35b61034e61034936600461386a565b610780565b6040519015158152602001610332565b61037161036c366004613894565b6107ef565b604051908152602001610332565b61037160085481565b6103716103963660046138ab565b610800565b610371600d5481565b610371610859565b6103bf6103ba366004613978565b610867565b005b6103bf6103cf3660046138ab565b610911565b61034e6103e2366004613a27565b610ad5565b6103716103f536600461386a565b610b22565b60045461040d906001600160a01b031681565b6040516001600160a01b039091168152602001610332565b6003546104329060ff1681565b60405160ff9091168152602001610332565b6103716104523660046138ab565b610b35565b610371610b79565b61037161046d366004613894565b610b82565b6103716104803660046138ab565b610b8c565b610371600b5481565b610371610cda565b60055461040d906001600160a01b031681565b6103716104b7366004613894565b610de9565b610371666379da05b6000081565b6103715f81565b61037160095481565b60115461040d906001600160a01b031681565b6103716104fb3660046138ab565b6001600160a01b03165f908152600e602052604090205490565b610371610e26565b6103bf61052b3660046138ab565b610e6d565b61037161053e366004613894565b610f3f565b610371600c5481565b610325610f49565b6103716105623660046138ab565b610f56565b6103bf610575366004613a65565b610f60565b610371610588366004613894565b6111ab565b6103716111b5565b61034e6105a336600461386a565b611395565b610371600a5481565b6103716113e1565b6103716105c7366004613a27565b611476565b6103716105da3660046138ab565b6114c2565b61037161154e565b6105fa6105f53660046138ab565b61159b565b604080519485526020850193909352918301526060820152608001610332565b610371610628366004613894565b6115db565b61037161063b366004613894565b6115e5565b61037161064e366004613b01565b6001600160a01b039182165f908152600f6020908152604080832093909416825291909152205490565b6103716115ef565b61037161068e3660046138ab565b6116f4565b60065461040d906001600160a01b031681565b6103716106b4366004613b38565b611707565b60035461040d9061010090046001600160a01b031681565b61037161171c565b6103716106e7366004613894565b61176e565b61034e600181565b6001805461070190613b77565b80601f016020809104026020016040519081016040528092919081815260200182805461072d90613b77565b80156107785780601f1061074f57610100808354040283529160200191610778565b820191905f5260205f20905b81548152906001019060200180831161075b57829003601f168201915b505050505081565b335f818152600f602090815260408083206001600160a01b03871680855292528083208590555191929182907f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925906107db9087815260200190565b60405180910390a360019150505b92915050565b5f6107f9826117ab565b505f919050565b5f805460ff1661082b5760405162461bcd60e51b815260040161082290613ba9565b60405180910390fd5b5f805460ff1916905561083c6111b5565b5061084682610f56565b90505f805460ff19166001179055919050565b5f6108626117f9565b905090565b60038054610100600160a81b031916336101000217905561088c868686868686610f60565b601180546001600160a01b0319166001600160a01b038916908117909155604080516318160ddd60e01b815290516318160ddd916004808201926020929091908290030181865afa1580156108e3573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906109079190613bcd565b5050505050505050565b60035461010090046001600160a01b031633146109885760405162461bcd60e51b815260206004820152602f60248201527f4345726332303a3a7377656570546f6b656e3a206f6e6c792061646d696e206360448201526e616e20737765657020746f6b656e7360881b6064820152608401610822565b6011546001600160a01b0390811690821603610a015760405162461bcd60e51b815260206004820152603260248201527f4345726332303a3a7377656570546f6b656e3a2063616e206e6f74207377656560448201527138103ab73232b9363cb4b733903a37b5b2b760711b6064820152608401610822565b6040516370a0823160e01b81523060048201525f906001600160a01b038316906370a0823190602401602060405180830381865afa158015610a45573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610a699190613bcd565b60035460405163a9059cbb60e01b81526001600160a01b03610100909204821660048201526024810183905291925083169063a9059cbb906044015f604051808303815f87803b158015610abb575f80fd5b505af1158015610acd573d5f803e3d5ffd5b505050505050565b5f805460ff16610af75760405162461bcd60e51b815260040161082290613ba9565b5f805460ff19168155610b0c3386868661185d565b1490505f805460ff191660011790559392505050565b5f610b2d8383611a7a565b505f92915050565b5f806040518060200160405280610b4a61154e565b90526001600160a01b0384165f908152600e6020526040902054909150610b72908290611ac9565b9392505050565b5f610862611ae8565b5f6107e982611b5a565b6003545f9061010090046001600160a01b03163314610bbe5760405163d219dc1f60e01b815260040160405180910390fd5b60055460408051623f1ee960e11b815290516001600160a01b0392831692851691627e3dd29160048083019260209291908290030181865afa158015610c06573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610c2a9190613be4565b610c765760405162461bcd60e51b815260206004820152601c60248201527f6d61726b6572206d6574686f642072657475726e65642066616c7365000000006044820152606401610822565b600580546001600160a01b0319166001600160a01b0385811691821790925560408051928416835260208301919091527f7ac369dbd14fa5ea3f473ed67cc9d598964a77501540ba6751eb0b3decf5870d91015b60405180910390a1505f92915050565b5f80610ce4611bad565b90505f610cf082611c51565b61ffff169050805f03610d1657604051632154bfcf60e21b815260040160405180910390fd5b610d21600283613c17565b91505f5b81811015610de3575f610d3784611c8a565b90505f80610d46606887613c17565b90505f610d538236613c2a565b9050803592508265ffffffffffff165f03610d8157604051630336dc9d60e41b815260040160405180910390fd5b875f03610d98578265ffffffffffff169750610dc0565b878365ffffffffffff1614610dc05760405163d9d1f46560e01b815260040160405180910390fd5b610dca8488613c17565b9650505050508080610ddb90613c3d565b915050610d25565b50505090565b5f805460ff16610e0b5760405162461bcd60e51b815260040161082290613ba9565b5f805460ff19169055610e1c6111b5565b5061084682611cbc565b5f805460ff16610e485760405162461bcd60e51b815260040161082290613ba9565b5f805460ff19169055610e596111b5565b5050600b545f805460ff1916600117905590565b60035461010090046001600160a01b03163314610ee25760405162461bcd60e51b815260206004820152602d60248201527f6f6e6c79207468652061646d696e206d6179207365742074686520636f6d702d60448201526c6c696b652064656c656761746560981b6064820152608401610822565b6011546040516317066a5760e21b81526001600160a01b03838116600483015290911690635c19a95c906024015f604051808303815f87803b158015610f26575f80fd5b505af1158015610f38573d5f803e3d5ffd5b5050505050565b5f6107f982611dd6565b6002805461070190613b77565b5f6107e982611e23565b60035461010090046001600160a01b03163314610fcb5760405162461bcd60e51b8152602060048201526024808201527f6f6e6c792061646d696e206d617920696e697469616c697a6520746865206d616044820152631c9ad95d60e21b6064820152608401610822565b600954158015610fdb5750600a54155b6110335760405162461bcd60e51b815260206004820152602360248201527f6d61726b6574206d6179206f6e6c7920626520696e697469616c697a6564206f6044820152626e636560e81b6064820152608401610822565b60078490558361109e5760405162461bcd60e51b815260206004820152603060248201527f696e697469616c2065786368616e67652072617465206d75737420626520677260448201526f32b0ba32b9103a3430b7103d32b9379760811b6064820152608401610822565b5f6110a887610b8c565b905080156110f85760405162461bcd60e51b815260206004820152601a60248201527f73657474696e6720636f6d7074726f6c6c6572206661696c65640000000000006044820152606401610822565b43600955670de0b6b3a7640000600a5561111186611e6c565b9050801561116c5760405162461bcd60e51b815260206004820152602260248201527f73657474696e6720696e7465726573742072617465206d6f64656c206661696c604482015261195960f21b6064820152608401610822565b60016111788582613c9f565b5060026111858482613c9f565b50506003805460ff90921660ff199283161790555f805490911660011790555050505050565b5f6107f982611fdd565b6009545f9043908181036111cb575f9250505090565b5f6111d4611ae8565b600b54600c54600a546006546040516315f2405360e01b81526004810186905260248101859052604481018490529495509293919290915f916001600160a01b0316906315f2405390606401602060405180830381865afa15801561123b573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061125f9190613bcd565b905065048c273950008111156112b75760405162461bcd60e51b815260206004820152601c60248201527f626f72726f772072617465206973206162737572646c792068696768000000006044820152606401610822565b5f6112c28789613c2a565b90505f6112dd6040518060200160405280858152508361201a565b90505f6112ea8288611ac9565b90505f6112f78883613c17565b90505f6113156040518060200160405280600854815250848a612049565b90505f61132385898a612049565b60098e9055600a819055600b849055600c839055604080518d815260208101879052908101829052606081018590529091507f4dec04e750ca11537cabcd8a9eab06494de08da3735bc8871cd41250e190bc049060800160405180910390a15f9d505050505050505050505050505090565b5f805460ff166113b75760405162461bcd60e51b815260040161082290613ba9565b5f805460ff191681556113cc3380868661185d565b1490505f805460ff1916600117905592915050565b6006545f906001600160a01b031663b81688166113fc611ae8565b600b54600c546008546040516001600160e01b031960e087901b16815260048101949094526024840192909252604483015260648201526084015b602060405180830381865afa158015611452573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906108629190613bcd565b5f805460ff166114985760405162461bcd60e51b815260040161082290613ba9565b5f805460ff191690556114ad33858585612069565b505f80805460ff191660011790559392505050565b6003545f9061010090046001600160a01b031633146114f457604051635cb56c2b60e01b815260040160405180910390fd5b600480546001600160a01b038481166001600160a01b031983168117909355604080519190921680825260208201939093527fca4f2f25d0898edd99413412fb94012f9e54ec8142f9b093e7720646a95b16a99101610cca565b5f805460ff166115705760405162461bcd60e51b815260040161082290613ba9565b5f805460ff191690556115816111b5565b5061158a610859565b90505f805460ff1916600117905590565b6001600160a01b0381165f908152600e602052604081205481908190819081906115c487611e23565b6115cc6117f9565b93509350935093509193509193565b5f6107f9826122d3565b5f6107f982612310565b6004545f906001600160a01b031633141580611609575033155b1561162757604051631ba24f2960e21b815260040160405180910390fd5b60038054600480546001600160a01b03808216610100818102610100600160a81b0319871617968790556001600160a01b031990931690935560408051948390048216808652929095041660208401529290917ff9ffabca9c8276e99321725bcb43fb076a6c66a54b7f21c4e8146d8519b417dc910160405180910390a1600454604080516001600160a01b03808516825290921660208301527fca4f2f25d0898edd99413412fb94012f9e54ec8142f9b093e7720646a95b16a9910160405180910390a15f9250505090565b5f6116fd6111b5565b506107e982611e6c565b5f61171384848461234e565b505f9392505050565b6006545f906001600160a01b03166315f24053611737611ae8565b600b54600c546040516001600160e01b031960e086901b168152600481019390935260248301919091526044820152606401611437565b5f805460ff166117905760405162461bcd60e51b815260040161082290613ba9565b5f805460ff191690556117a16111b5565b5061084682612425565b5f5460ff166117cc5760405162461bcd60e51b815260040161082290613ba9565b5f805460ff191690556117dd6111b5565b506117e93333836124e0565b50505f805460ff19166001179055565b600d545f9080820361180d57505060075490565b5f611816611ae8565b90505f600c54600b548361182a9190613c17565b6118349190613c2a565b90505f8361184a670de0b6b3a764000084613d5b565b6118549190613d72565b95945050505050565b6005546040516317b9b84b60e31b81523060048201526001600160a01b0385811660248301528481166044830152606482018490525f92839291169063bdcdc258906084016020604051808303815f875af11580156118be573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906118e29190613bcd565b905080156119065760405163089d427760e11b815260048101829052602401610822565b836001600160a01b0316856001600160a01b03160361193857604051638cd22d1960e01b815260040160405180910390fd5b5f856001600160a01b0316876001600160a01b03160361195a57505f19611981565b506001600160a01b038086165f908152600f60209081526040808320938a16835292905220545b5f61198c8583613c2a565b6001600160a01b0388165f908152600e6020526040812054919250906119b3908790613c2a565b6001600160a01b0388165f908152600e6020526040812054919250906119da908890613c17565b6001600160a01b03808b165f908152600e6020526040808220869055918b1681522081905590505f198414611a31576001600160a01b03808a165f908152600f60209081526040808320938e168352929052208390555b876001600160a01b0316896001600160a01b03165f80516020613e1483398151915289604051611a6391815260200190565b60405180910390a3505f9998505050505050505050565b5f5460ff16611a9b5760405162461bcd60e51b815260040161082290613ba9565b5f805460ff19169055611aac6111b5565b50611ab83383836124e0565b50505f805460ff1916600117905550565b5f80611ad5848461201a565b9050611ae08161267e565b949350505050565b6011546040516370a0823160e01b81523060048201525f916001600160a01b03169081906370a0823190602401602060405180830381865afa158015611b30573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611b549190613bcd565b91505090565b5f805460ff16611b7c5760405162461bcd60e51b815260040161082290613ba9565b5f805460ff19169055611b8d6111b5565b50611b9782612695565b50505f90505f805460ff19166001179055919050565b5f6602ed57011e0000601f1936013581161480611bdd576040516373bb264f60e11b815260040160405180910390fd5b5f3660291115611c0057604051632bcb7bc560e11b815260040160405180910390fd5b506028193601355f6009611c1a600362ffffff8516613c17565b611c249190613c17565b905036611c32600283613c17565b1115610b725760405163c30a7bd760e01b815260040160405180910390fd5b5f80611c5e602084613c17565b905036811115611c8157604051632bcb7bc560e11b815260040160405180910390fd5b36033592915050565b5f805f611c9684612727565b9092509050604e611ca8826020613c17565b611cb29084613d5b565b611ae09190613c17565b6003545f90819061010090046001600160a01b03163314611cf057604051630f7e5e6d60e41b815260040160405180910390fd5b4360095414611d1257604051630dff50cb60e41b815260040160405180910390fd5b82611d1b611ae8565b1015611d3a57604051633345e99960e01b815260040160405180910390fd5b600c54831115611d5d576040516378d2980560e11b815260040160405180910390fd5b82600c54611d6b9190613c2a565b600c819055600354909150611d8e9061010090046001600160a01b03168461277c565b7f3bad0c59cf2f06e7314077049f48a93578cd16f5ef92329f1dab1420a99c177e600360019054906101000a90046001600160a01b03168483604051610cca93929190613d91565b5f5460ff16611df75760405162461bcd60e51b815260040161082290613ba9565b5f805460ff19169055611e086111b5565b50611e14335f8361285b565b505f805460ff19166001179055565b6001600160a01b0381165f90815260106020526040812080548203611e4a57505f92915050565b600a5481545f91611e5a91613d5b565b9050816001015481611ae09190613d72565b6003545f90819061010090046001600160a01b03163314611ea05760405163407fded560e01b815260040160405180910390fd5b4360095414611ec257604051630be2a5cb60e11b815260040160405180910390fd5b60065f9054906101000a90046001600160a01b03169050826001600160a01b0316632191f92a6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611f15573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611f399190613be4565b611f855760405162461bcd60e51b815260206004820152601c60248201527f6d61726b6572206d6574686f642072657475726e65642066616c7365000000006044820152606401610822565b600680546001600160a01b0319166001600160a01b0385811691821790925560408051928416835260208301919091527fedffc32e068c7c95dfd4bdfd5c4d939a084d6b11c4199eac8436ed234d72f9269101610cca565b5f5460ff16611ffe5760405162461bcd60e51b815260040161082290613ba9565b5f805460ff1916905561200f6111b5565b50611e143382612b3c565b60408051602081019091525f81526040518060200160405280612040855f015185612ce8565b90529392505050565b5f80612055858561201a565b90506118546120638261267e565b84612cf3565b60055460405163d02f735160e01b81523060048201526001600160a01b03868116602483015285811660448301528481166064830152608482018490525f92169063d02f73519060a4016020604051808303815f875af11580156120cf573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906120f39190613bcd565b90508015612117576040516363e00e3360e11b815260048101829052602401610822565b836001600160a01b0316836001600160a01b03160361214957604051633a94626760e11b815260040160405180910390fd5b5f612169836040518060200160405280666379da05b60000815250612cfe565b90505f6121768285613c2a565b90505f604051806020016040528061218c6117f9565b905290505f61219b8285611ac9565b90505f81600c546121ac9190613c17565b600c819055600d549091506121c2908690613c2a565b600d556001600160a01b0388165f908152600e60205260409020546121e8908890613c2a565b6001600160a01b03808a165f908152600e602052604080822093909355908b1681522054612217908590613c17565b6001600160a01b03808b165f818152600e602052604090819020939093559151908a16905f80516020613e14833981519152906122579088815260200190565b60405180910390a360405185815230906001600160a01b038a16905f80516020613e148339815191529060200160405180910390a37fa91e67c5ea634cd43a12c5a482724b03de01e85ca68702a53d0c2f45cb7c1dc53083836040516122bf93929190613d91565b60405180910390a150505050505050505050565b5f5460ff166122f45760405162461bcd60e51b815260040161082290613ba9565b5f805460ff191690556123056111b5565b50611e143382612d1f565b5f5460ff166123315760405162461bcd60e51b815260040161082290613ba9565b5f805460ff191690556123426111b5565b50611e1433825f61285b565b5f5460ff1661236f5760405162461bcd60e51b815260040161082290613ba9565b5f805460ff191690556123806111b5565b505f816001600160a01b031663a6afed956040518163ffffffff1660e01b81526004016020604051808303815f875af11580156123bf573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906123e39190613bcd565b9050801561240757604051633eea49b760e11b815260048101829052602401610822565b61241333858585612ec8565b50505f805460ff191660011790555050565b6003545f9061010090046001600160a01b0316331461245757604051631205b57b60e11b815260040160405180910390fd5b436009541461247957604051637dfca6b760e11b815260040160405180910390fd5b670de0b6b3a76400008211156124a25760405163717220f360e11b815260040160405180910390fd5b600880549083905560408051828152602081018590527faaa68312e2ea9d50e16af5068410ab56e1a1fd06037b1a35664812c30f8214609101610cca565b600554604051631200453160e11b81523060048201526001600160a01b0385811660248301528481166044830152606482018490525f9283929116906324008a62906084016020604051808303815f875af1158015612541573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906125659190613bcd565b9050801561258957604051638c81362d60e01b815260048101829052602401610822565b43600954146125ab5760405163c9021e2f60e01b815260040160405180910390fd5b5f6125b585611e23565b90505f5f1985146125c657846125c8565b815b90505f6125d5888361337f565b90505f6125e28285613c2a565b90505f82600b546125f39190613c2a565b6001600160a01b038a81165f81815260106020908152604091829020878155600a54600190910155600b8590558151938f168452830191909152810185905260608101849052608081018290529091507f1a2a22cb034d26d1854bdc6666a5b91fe25efbbb5dcad3b0355478d6f5c362a19060a00160405180910390a1509098975050505050505050565b80515f906107e990670de0b6b3a764000090613d72565b5f80808043600954146126be576040516338acf79960e01b815260048101829052602401610822565b6126c8338661337f565b905080600c546126d89190613c17565b915081600c819055507fa91e67c5ea634cd43a12c5a482724b03de01e85ca68702a53d0c2f45cb7c1dc533828460405161271493929190613d91565b60405180910390a15f9590945092505050565b5f80808080612737604187613c17565b90505f61274f612748602084613c17565b3690613545565b803594509050612760816003613545565b62ffffff9490941697933563ffffffff16965092945050505050565b60115460405163a9059cbb60e01b81526001600160a01b0384811660048301526024820184905290911690819063a9059cbb906044015f604051808303815f87803b1580156127c9575f80fd5b505af11580156127db573d5f803e3d5ffd5b505050505f3d5f81146127f457602081146127fd575f80fd5b5f199150612807565b60205f803e5f5191505b50806128555760405162461bcd60e51b815260206004820152601960248201527f544f4b454e5f5452414e534645525f4f55545f4641494c4544000000000000006044820152606401610822565b50505050565b811580612866575080155b6128cf5760405162461bcd60e51b815260206004820152603460248201527f6f6e65206f662072656465656d546f6b656e73496e206f722072656465656d416044820152736d6f756e74496e206d757374206265207a65726f60601b6064820152608401610822565b5f60405180602001604052806128e36117f9565b905290505f808415612903578491506128fc8386611ac9565b9050612913565b61290d8484613550565b91508390505b5f63eabe7d9160e01b30888560405160240161293193929190613db2565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b0319909316929092179091526005549091505f90612980906001600160a01b031683600161356d565b90505f818060200190518101906129979190613bcd565b905080156129bb5760405163480f424760e01b815260048101829052602401610822565b43600954146129dd576040516397b5cfcd60e01b815260040160405180910390fd5b836129e6611ae8565b1015612a05576040516391240a1b60e01b815260040160405180910390fd5b84600d54612a139190613c2a565b600d556001600160a01b0389165f908152600e6020526040902054612a39908690613c2a565b6001600160a01b038a165f908152600e6020526040902055612a5b898561277c565b60405185815230906001600160a01b038b16905f80516020613e148339815191529060200160405180910390a37fe5b754fb1abb7f01b499791d0b820ae3b6af3424ac1c59768edb53f4ec31a929898587604051612abb93929190613d91565b60405180910390a16005546040516351dff98960e01b81523060048201526001600160a01b038b811660248301526044820187905260648201889052909116906351dff989906084015f604051808303815f87803b158015612b1b575f80fd5b505af1158015612b2d573d5f803e3d5ffd5b50505050505050505050505050565b600554604051634ef4c3e160e01b81525f916001600160a01b031690634ef4c3e190612b7090309087908790600401613db2565b6020604051808303815f875af1158015612b8c573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612bb09190613bcd565b90508015612bd4576040516349abd4fd60e01b815260048101829052602401610822565b4360095414612bf6576040516338d8859760e01b815260040160405180910390fd5b5f6040518060200160405280612c0a6117f9565b905290505f612c19858561337f565b90505f612c268284613550565b905080600d54612c369190613c17565b600d556001600160a01b0386165f908152600e6020526040902054612c5c908290613c17565b6001600160a01b0387165f908152600e60205260409081902091909155517f4c209b5fc8ad50758f13e2e1088ba56a560dff690a1c6fef26394f4c03821c4f90612cab90889085908590613d91565b60405180910390a16040518181526001600160a01b0387169030905f80516020613e148339815191529060200160405180910390a3505050505050565b5f610b728284613d5b565b5f610b728284613c17565b5f670de0b6b3a7640000612d1584845f0151612ce8565b610b729190613d72565b5f63da3d454c60e01b308484604051602401612d3d93929190613db2565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b0319909316929092179091526005549091505f90612d8c906001600160a01b031683600161356d565b90505f81806020019051810190612da39190613bcd565b90508015612dc75760405163918db40f60e01b815260048101829052602401610822565b4360095414612de957604051630e8d8c6160e21b815260040160405180910390fd5b83612df2611ae8565b1015612e11576040516348c2588160e01b815260040160405180910390fd5b5f612e1b86611e23565b90505f612e288683613c17565b90505f86600b54612e399190613c17565b6001600160a01b0389165f908152601060205260409020838155600a54600190910155600b8190559050612e6d888861277c565b604080516001600160a01b038a16815260208101899052908101839052606081018290527f13ed6866d4e1ee6da46f845c46d7e54120883d75c5ea9a2dacc1c4ca8984ab809060800160405180910390a15050505050505050565b604080513060248201526001600160a01b0383811660448301528681166064830152858116608483015260a48083018690528351808403909101815260c49092019092526020810180516001600160e01b0316632fe3f38f60e11b17905260055490915f91612f3a911683600161356d565b90505f81806020019051810190612f519190613bcd565b90508015612f7557604051630a14d17960e11b815260048101829052602401610822565b4360095414612f97576040516380965b1b60e01b815260040160405180910390fd5b43846001600160a01b0316636c540baf6040518163ffffffff1660e01b8152600401602060405180830381865afa158015612fd4573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612ff89190613bcd565b1461301657604051631046f38d60e31b815260040160405180910390fd5b866001600160a01b0316866001600160a01b03160361304857604051631bd1a62160e21b815260040160405180910390fd5b845f036130685760405163d29da7ef60e01b815260040160405180910390fd5b5f19850361308957604051635982c5bb60e11b815260040160405180910390fd5b5f6130958888886124e0565b90505f63c488847b60e01b3087846040516024016130b593929190613db2565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b0319909316929092179091526005549091505f90613102906001600160a01b0316836135fb565b90505f808280602001905181019061311a9190613dd6565b915091505f82146131895760405162461bcd60e51b815260206004820152603360248201527f4c49515549444154455f434f4d5054524f4c4c45525f43414c43554c4154455f604482015272105353d5539517d4d152569157d19052531151606a1b6064820152608401610822565b6040516370a0823160e01b81526001600160a01b038c811660048301528291908b16906370a0823190602401602060405180830381865afa1580156131d0573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906131f49190613bcd565b10156132425760405162461bcd60e51b815260206004820152601860248201527f4c49515549444154455f5345495a455f544f4f5f4d55434800000000000000006044820152606401610822565b306001600160a01b038a16036132635761325e308d8d84612069565b613318565b5f896001600160a01b031663b2a02ff18e8e856040518463ffffffff1660e01b815260040161329493929190613db2565b6020604051808303815f875af11580156132b0573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906132d49190613bcd565b146133185760405162461bcd60e51b81526020600482015260146024820152731d1bdad95b881cd95a5e9d5c994819985a5b195960621b6044820152606401610822565b604080516001600160a01b038e811682528d811660208301528183018890528b1660608201526080810183905290517f298637f684da70674f26509b10f07ec2fbc77a335ab1e7d6215a4b2484d8bb529181900360a00190a1505050505050505050505050565b6011546040516370a0823160e01b81523060048201525f916001600160a01b0316908190839082906370a0823190602401602060405180830381865afa1580156133cb573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906133ef9190613bcd565b6040516323b872dd60e01b81529091506001600160a01b038316906323b872dd9061342290899030908a90600401613db2565b5f604051808303815f87803b158015613439575f80fd5b505af115801561344b573d5f803e3d5ffd5b505050505f3d5f8114613464576020811461346d575f80fd5b5f199150613477565b60205f803e5f5191505b50806134c55760405162461bcd60e51b815260206004820152601860248201527f544f4b454e5f5452414e534645525f494e5f4641494c454400000000000000006044820152606401610822565b6040516370a0823160e01b81523060048201525f906001600160a01b038616906370a0823190602401602060405180830381865afa158015613509573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061352d9190613bcd565b90506135398382613c2a565b98975050505050505050565b5f610b728284613c2a565b5f610b7261356684670de0b6b3a7640000612ce8565b8351613679565b60605f61357984613684565b90505f80866001600160a01b031685613592575f613594565b345b846040516135a29190613df8565b5f6040518083038185875af1925050503d805f81146135dc576040519150601f19603f3d011682016040523d82523d5f602084013e6135e1565b606091505b50915091506135f08282613711565b979650505050505050565b60605f61360783613684565b90505f80856001600160a01b0316836040516136239190613df8565b5f60405180830381855afa9150503d805f811461365b576040519150601f19603f3d011682016040523d82523d5f602084013e613660565b606091505b509150915061366f8282613711565b9695505050505050565b5f610b728284613d72565b80516060905f61369261378d565b90505f61369f8284613c17565b9050368211156136c257604051632bcb7bc560e11b815260040160405180910390fd5b6060604051905081815285602001848101826020015b818310156136f05782518152602092830192016136d8565b50505082833603856020018301379190920181016020016040529392505050565b6060826137875781515f0361373957604051632b3ff13d60e11b815260040160405180910390fd5b602082015162461bcd60e51b14801561376c576040516301efd04f60e31b81526044840190610822908290600401613841565b8260405163fd36fde360e01b81526004016108229190613841565b50919050565b5f80613797611bad565b90505f6137a382611c51565b61ffff1690506137b4600283613c17565b91505f5b818110156137ec575f6137ca84611c8a565b90506137d68185613c17565b93505080806137e490613c3d565b9150506137b8565b509092915050565b5f5b8381101561380e5781810151838201526020016137f6565b50505f910152565b5f815180845261382d8160208601602086016137f4565b601f01601f19169290920160200192915050565b602081525f610b726020830184613816565b6001600160a01b0381168114613867575f80fd5b50565b5f806040838503121561387b575f80fd5b823561388681613853565b946020939093013593505050565b5f602082840312156138a4575f80fd5b5035919050565b5f602082840312156138bb575f80fd5b8135610b7281613853565b634e487b7160e01b5f52604160045260245ffd5b5f82601f8301126138e9575f80fd5b813567ffffffffffffffff80821115613904576139046138c6565b604051601f8301601f19908116603f0116810190828211818310171561392c5761392c6138c6565b81604052838152866020858801011115613944575f80fd5b836020870160208301375f602085830101528094505050505092915050565b803560ff81168114613973575f80fd5b919050565b5f805f805f805f60e0888a03121561398e575f80fd5b873561399981613853565b965060208801356139a981613853565b955060408801356139b981613853565b945060608801359350608088013567ffffffffffffffff808211156139dc575f80fd5b6139e88b838c016138da565b945060a08a01359150808211156139fd575f80fd5b50613a0a8a828b016138da565b925050613a1960c08901613963565b905092959891949750929550565b5f805f60608486031215613a39575f80fd5b8335613a4481613853565b92506020840135613a5481613853565b929592945050506040919091013590565b5f805f805f8060c08789031215613a7a575f80fd5b8635613a8581613853565b95506020870135613a9581613853565b945060408701359350606087013567ffffffffffffffff80821115613ab8575f80fd5b613ac48a838b016138da565b94506080890135915080821115613ad9575f80fd5b50613ae689828a016138da565b925050613af560a08801613963565b90509295509295509295565b5f8060408385031215613b12575f80fd5b8235613b1d81613853565b91506020830135613b2d81613853565b809150509250929050565b5f805f60608486031215613b4a575f80fd5b8335613b5581613853565b9250602084013591506040840135613b6c81613853565b809150509250925092565b600181811c90821680613b8b57607f821691505b60208210810361378757634e487b7160e01b5f52602260045260245ffd5b6020808252600a90820152691c994b595b9d195c995960b21b604082015260600190565b5f60208284031215613bdd575f80fd5b5051919050565b5f60208284031215613bf4575f80fd5b81518015158114610b72575f80fd5b634e487b7160e01b5f52601160045260245ffd5b808201808211156107e9576107e9613c03565b818103818111156107e9576107e9613c03565b5f60018201613c4e57613c4e613c03565b5060010190565b601f821115613c9a575f81815260208120601f850160051c81016020861015613c7b5750805b601f850160051c820191505b81811015610acd57828155600101613c87565b505050565b815167ffffffffffffffff811115613cb957613cb96138c6565b613ccd81613cc78454613b77565b84613c55565b602080601f831160018114613d00575f8415613ce95750858301515b5f19600386901b1c1916600185901b178555610acd565b5f85815260208120601f198616915b82811015613d2e57888601518255948401946001909101908401613d0f565b5085821015613d4b57878501515f19600388901b60f8161c191681555b5050505050600190811b01905550565b80820281158282048414176107e9576107e9613c03565b5f82613d8c57634e487b7160e01b5f52601260045260245ffd5b500490565b6001600160a01b039390931683526020830191909152604082015260600190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b5f8060408385031215613de7575f80fd5b505080516020909101519092909150565b5f8251613e098184602087016137f4565b919091019291505056feddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa2646970667358221220d023ef85bf9889fc4e666fa7b8a0c7b16f103318fd10e0bacd3d5a0767aff1cd64736f6c63430008150033
Deployed Bytecode
0x608060405234801561000f575f80fd5b5060043610610319575f3560e01c806373acee98116101af578063b71d1a0c116100fe578063f2b3abbd1161009e578063f851a44011610079578063f851a440146106b9578063f8f9da28146106d1578063fca7820b146106d9578063fe9c44ae146106ec575f80fd5b8063f2b3abbd14610680578063f3fdb15a14610693578063f5e3c462146106a6575f80fd5b8063c5ebeaec116100d9578063c5ebeaec1461061a578063db006a751461062d578063dd62ed3e14610640578063e9c714f214610678575f80fd5b8063b71d1a0c146105cc578063bd6d894d146105df578063c37f68e2146105e7575f80fd5b806399d8c1b411610169578063a9059cbb11610144578063a9059cbb14610595578063aa5af0fd146105a8578063ae9d70b0146105b1578063b2a02ff1146105b9575f80fd5b806399d8c1b414610567578063a0712d681461057a578063a6afed951461058d575f80fd5b806373acee98146105155780637f1e06be1461051d578063852a12e3146105305780638f840ddd1461054357806395d89b411461054c57806395dd919314610554575f80fd5b80633af9e6691161026b5780635fe3b5671161022557806369ab32501161020057806369ab3250146104ca5780636c540baf146104d15780636f307dc3146104da57806370a08231146104ed575f80fd5b80635fe3b56714610496578063601a0bf1146104a95780636752e702146104bc575f80fd5b80633af9e669146104445780633b1d21a2146104575780633e9410101461045f5780634576b5db1461047257806347bd37181461048557806355a547d51461048e575f80fd5b8063182df0f5116102d657806323b872dd116102b157806323b872dd146103d45780632608f818146103e757806326782247146103fa578063313ce56714610425575f80fd5b8063182df0f5146103a45780631a31d465146103ac5780631be19560146103c1575f80fd5b806306fdde031461031d578063095ea7b31461033b5780630e7527021461035e578063173b99041461037f57806317bfdfbc1461038857806318160ddd1461039b575b5f80fd5b6103256106f4565b6040516103329190613841565b60405180910390f35b61034e61034936600461386a565b610780565b6040519015158152602001610332565b61037161036c366004613894565b6107ef565b604051908152602001610332565b61037160085481565b6103716103963660046138ab565b610800565b610371600d5481565b610371610859565b6103bf6103ba366004613978565b610867565b005b6103bf6103cf3660046138ab565b610911565b61034e6103e2366004613a27565b610ad5565b6103716103f536600461386a565b610b22565b60045461040d906001600160a01b031681565b6040516001600160a01b039091168152602001610332565b6003546104329060ff1681565b60405160ff9091168152602001610332565b6103716104523660046138ab565b610b35565b610371610b79565b61037161046d366004613894565b610b82565b6103716104803660046138ab565b610b8c565b610371600b5481565b610371610cda565b60055461040d906001600160a01b031681565b6103716104b7366004613894565b610de9565b610371666379da05b6000081565b6103715f81565b61037160095481565b60115461040d906001600160a01b031681565b6103716104fb3660046138ab565b6001600160a01b03165f908152600e602052604090205490565b610371610e26565b6103bf61052b3660046138ab565b610e6d565b61037161053e366004613894565b610f3f565b610371600c5481565b610325610f49565b6103716105623660046138ab565b610f56565b6103bf610575366004613a65565b610f60565b610371610588366004613894565b6111ab565b6103716111b5565b61034e6105a336600461386a565b611395565b610371600a5481565b6103716113e1565b6103716105c7366004613a27565b611476565b6103716105da3660046138ab565b6114c2565b61037161154e565b6105fa6105f53660046138ab565b61159b565b604080519485526020850193909352918301526060820152608001610332565b610371610628366004613894565b6115db565b61037161063b366004613894565b6115e5565b61037161064e366004613b01565b6001600160a01b039182165f908152600f6020908152604080832093909416825291909152205490565b6103716115ef565b61037161068e3660046138ab565b6116f4565b60065461040d906001600160a01b031681565b6103716106b4366004613b38565b611707565b60035461040d9061010090046001600160a01b031681565b61037161171c565b6103716106e7366004613894565b61176e565b61034e600181565b6001805461070190613b77565b80601f016020809104026020016040519081016040528092919081815260200182805461072d90613b77565b80156107785780601f1061074f57610100808354040283529160200191610778565b820191905f5260205f20905b81548152906001019060200180831161075b57829003601f168201915b505050505081565b335f818152600f602090815260408083206001600160a01b03871680855292528083208590555191929182907f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925906107db9087815260200190565b60405180910390a360019150505b92915050565b5f6107f9826117ab565b505f919050565b5f805460ff1661082b5760405162461bcd60e51b815260040161082290613ba9565b60405180910390fd5b5f805460ff1916905561083c6111b5565b5061084682610f56565b90505f805460ff19166001179055919050565b5f6108626117f9565b905090565b60038054610100600160a81b031916336101000217905561088c868686868686610f60565b601180546001600160a01b0319166001600160a01b038916908117909155604080516318160ddd60e01b815290516318160ddd916004808201926020929091908290030181865afa1580156108e3573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906109079190613bcd565b5050505050505050565b60035461010090046001600160a01b031633146109885760405162461bcd60e51b815260206004820152602f60248201527f4345726332303a3a7377656570546f6b656e3a206f6e6c792061646d696e206360448201526e616e20737765657020746f6b656e7360881b6064820152608401610822565b6011546001600160a01b0390811690821603610a015760405162461bcd60e51b815260206004820152603260248201527f4345726332303a3a7377656570546f6b656e3a2063616e206e6f74207377656560448201527138103ab73232b9363cb4b733903a37b5b2b760711b6064820152608401610822565b6040516370a0823160e01b81523060048201525f906001600160a01b038316906370a0823190602401602060405180830381865afa158015610a45573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610a699190613bcd565b60035460405163a9059cbb60e01b81526001600160a01b03610100909204821660048201526024810183905291925083169063a9059cbb906044015f604051808303815f87803b158015610abb575f80fd5b505af1158015610acd573d5f803e3d5ffd5b505050505050565b5f805460ff16610af75760405162461bcd60e51b815260040161082290613ba9565b5f805460ff19168155610b0c3386868661185d565b1490505f805460ff191660011790559392505050565b5f610b2d8383611a7a565b505f92915050565b5f806040518060200160405280610b4a61154e565b90526001600160a01b0384165f908152600e6020526040902054909150610b72908290611ac9565b9392505050565b5f610862611ae8565b5f6107e982611b5a565b6003545f9061010090046001600160a01b03163314610bbe5760405163d219dc1f60e01b815260040160405180910390fd5b60055460408051623f1ee960e11b815290516001600160a01b0392831692851691627e3dd29160048083019260209291908290030181865afa158015610c06573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610c2a9190613be4565b610c765760405162461bcd60e51b815260206004820152601c60248201527f6d61726b6572206d6574686f642072657475726e65642066616c7365000000006044820152606401610822565b600580546001600160a01b0319166001600160a01b0385811691821790925560408051928416835260208301919091527f7ac369dbd14fa5ea3f473ed67cc9d598964a77501540ba6751eb0b3decf5870d91015b60405180910390a1505f92915050565b5f80610ce4611bad565b90505f610cf082611c51565b61ffff169050805f03610d1657604051632154bfcf60e21b815260040160405180910390fd5b610d21600283613c17565b91505f5b81811015610de3575f610d3784611c8a565b90505f80610d46606887613c17565b90505f610d538236613c2a565b9050803592508265ffffffffffff165f03610d8157604051630336dc9d60e41b815260040160405180910390fd5b875f03610d98578265ffffffffffff169750610dc0565b878365ffffffffffff1614610dc05760405163d9d1f46560e01b815260040160405180910390fd5b610dca8488613c17565b9650505050508080610ddb90613c3d565b915050610d25565b50505090565b5f805460ff16610e0b5760405162461bcd60e51b815260040161082290613ba9565b5f805460ff19169055610e1c6111b5565b5061084682611cbc565b5f805460ff16610e485760405162461bcd60e51b815260040161082290613ba9565b5f805460ff19169055610e596111b5565b5050600b545f805460ff1916600117905590565b60035461010090046001600160a01b03163314610ee25760405162461bcd60e51b815260206004820152602d60248201527f6f6e6c79207468652061646d696e206d6179207365742074686520636f6d702d60448201526c6c696b652064656c656761746560981b6064820152608401610822565b6011546040516317066a5760e21b81526001600160a01b03838116600483015290911690635c19a95c906024015f604051808303815f87803b158015610f26575f80fd5b505af1158015610f38573d5f803e3d5ffd5b5050505050565b5f6107f982611dd6565b6002805461070190613b77565b5f6107e982611e23565b60035461010090046001600160a01b03163314610fcb5760405162461bcd60e51b8152602060048201526024808201527f6f6e6c792061646d696e206d617920696e697469616c697a6520746865206d616044820152631c9ad95d60e21b6064820152608401610822565b600954158015610fdb5750600a54155b6110335760405162461bcd60e51b815260206004820152602360248201527f6d61726b6574206d6179206f6e6c7920626520696e697469616c697a6564206f6044820152626e636560e81b6064820152608401610822565b60078490558361109e5760405162461bcd60e51b815260206004820152603060248201527f696e697469616c2065786368616e67652072617465206d75737420626520677260448201526f32b0ba32b9103a3430b7103d32b9379760811b6064820152608401610822565b5f6110a887610b8c565b905080156110f85760405162461bcd60e51b815260206004820152601a60248201527f73657474696e6720636f6d7074726f6c6c6572206661696c65640000000000006044820152606401610822565b43600955670de0b6b3a7640000600a5561111186611e6c565b9050801561116c5760405162461bcd60e51b815260206004820152602260248201527f73657474696e6720696e7465726573742072617465206d6f64656c206661696c604482015261195960f21b6064820152608401610822565b60016111788582613c9f565b5060026111858482613c9f565b50506003805460ff90921660ff199283161790555f805490911660011790555050505050565b5f6107f982611fdd565b6009545f9043908181036111cb575f9250505090565b5f6111d4611ae8565b600b54600c54600a546006546040516315f2405360e01b81526004810186905260248101859052604481018490529495509293919290915f916001600160a01b0316906315f2405390606401602060405180830381865afa15801561123b573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061125f9190613bcd565b905065048c273950008111156112b75760405162461bcd60e51b815260206004820152601c60248201527f626f72726f772072617465206973206162737572646c792068696768000000006044820152606401610822565b5f6112c28789613c2a565b90505f6112dd6040518060200160405280858152508361201a565b90505f6112ea8288611ac9565b90505f6112f78883613c17565b90505f6113156040518060200160405280600854815250848a612049565b90505f61132385898a612049565b60098e9055600a819055600b849055600c839055604080518d815260208101879052908101829052606081018590529091507f4dec04e750ca11537cabcd8a9eab06494de08da3735bc8871cd41250e190bc049060800160405180910390a15f9d505050505050505050505050505090565b5f805460ff166113b75760405162461bcd60e51b815260040161082290613ba9565b5f805460ff191681556113cc3380868661185d565b1490505f805460ff1916600117905592915050565b6006545f906001600160a01b031663b81688166113fc611ae8565b600b54600c546008546040516001600160e01b031960e087901b16815260048101949094526024840192909252604483015260648201526084015b602060405180830381865afa158015611452573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906108629190613bcd565b5f805460ff166114985760405162461bcd60e51b815260040161082290613ba9565b5f805460ff191690556114ad33858585612069565b505f80805460ff191660011790559392505050565b6003545f9061010090046001600160a01b031633146114f457604051635cb56c2b60e01b815260040160405180910390fd5b600480546001600160a01b038481166001600160a01b031983168117909355604080519190921680825260208201939093527fca4f2f25d0898edd99413412fb94012f9e54ec8142f9b093e7720646a95b16a99101610cca565b5f805460ff166115705760405162461bcd60e51b815260040161082290613ba9565b5f805460ff191690556115816111b5565b5061158a610859565b90505f805460ff1916600117905590565b6001600160a01b0381165f908152600e602052604081205481908190819081906115c487611e23565b6115cc6117f9565b93509350935093509193509193565b5f6107f9826122d3565b5f6107f982612310565b6004545f906001600160a01b031633141580611609575033155b1561162757604051631ba24f2960e21b815260040160405180910390fd5b60038054600480546001600160a01b03808216610100818102610100600160a81b0319871617968790556001600160a01b031990931690935560408051948390048216808652929095041660208401529290917ff9ffabca9c8276e99321725bcb43fb076a6c66a54b7f21c4e8146d8519b417dc910160405180910390a1600454604080516001600160a01b03808516825290921660208301527fca4f2f25d0898edd99413412fb94012f9e54ec8142f9b093e7720646a95b16a9910160405180910390a15f9250505090565b5f6116fd6111b5565b506107e982611e6c565b5f61171384848461234e565b505f9392505050565b6006545f906001600160a01b03166315f24053611737611ae8565b600b54600c546040516001600160e01b031960e086901b168152600481019390935260248301919091526044820152606401611437565b5f805460ff166117905760405162461bcd60e51b815260040161082290613ba9565b5f805460ff191690556117a16111b5565b5061084682612425565b5f5460ff166117cc5760405162461bcd60e51b815260040161082290613ba9565b5f805460ff191690556117dd6111b5565b506117e93333836124e0565b50505f805460ff19166001179055565b600d545f9080820361180d57505060075490565b5f611816611ae8565b90505f600c54600b548361182a9190613c17565b6118349190613c2a565b90505f8361184a670de0b6b3a764000084613d5b565b6118549190613d72565b95945050505050565b6005546040516317b9b84b60e31b81523060048201526001600160a01b0385811660248301528481166044830152606482018490525f92839291169063bdcdc258906084016020604051808303815f875af11580156118be573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906118e29190613bcd565b905080156119065760405163089d427760e11b815260048101829052602401610822565b836001600160a01b0316856001600160a01b03160361193857604051638cd22d1960e01b815260040160405180910390fd5b5f856001600160a01b0316876001600160a01b03160361195a57505f19611981565b506001600160a01b038086165f908152600f60209081526040808320938a16835292905220545b5f61198c8583613c2a565b6001600160a01b0388165f908152600e6020526040812054919250906119b3908790613c2a565b6001600160a01b0388165f908152600e6020526040812054919250906119da908890613c17565b6001600160a01b03808b165f908152600e6020526040808220869055918b1681522081905590505f198414611a31576001600160a01b03808a165f908152600f60209081526040808320938e168352929052208390555b876001600160a01b0316896001600160a01b03165f80516020613e1483398151915289604051611a6391815260200190565b60405180910390a3505f9998505050505050505050565b5f5460ff16611a9b5760405162461bcd60e51b815260040161082290613ba9565b5f805460ff19169055611aac6111b5565b50611ab83383836124e0565b50505f805460ff1916600117905550565b5f80611ad5848461201a565b9050611ae08161267e565b949350505050565b6011546040516370a0823160e01b81523060048201525f916001600160a01b03169081906370a0823190602401602060405180830381865afa158015611b30573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611b549190613bcd565b91505090565b5f805460ff16611b7c5760405162461bcd60e51b815260040161082290613ba9565b5f805460ff19169055611b8d6111b5565b50611b9782612695565b50505f90505f805460ff19166001179055919050565b5f6602ed57011e0000601f1936013581161480611bdd576040516373bb264f60e11b815260040160405180910390fd5b5f3660291115611c0057604051632bcb7bc560e11b815260040160405180910390fd5b506028193601355f6009611c1a600362ffffff8516613c17565b611c249190613c17565b905036611c32600283613c17565b1115610b725760405163c30a7bd760e01b815260040160405180910390fd5b5f80611c5e602084613c17565b905036811115611c8157604051632bcb7bc560e11b815260040160405180910390fd5b36033592915050565b5f805f611c9684612727565b9092509050604e611ca8826020613c17565b611cb29084613d5b565b611ae09190613c17565b6003545f90819061010090046001600160a01b03163314611cf057604051630f7e5e6d60e41b815260040160405180910390fd5b4360095414611d1257604051630dff50cb60e41b815260040160405180910390fd5b82611d1b611ae8565b1015611d3a57604051633345e99960e01b815260040160405180910390fd5b600c54831115611d5d576040516378d2980560e11b815260040160405180910390fd5b82600c54611d6b9190613c2a565b600c819055600354909150611d8e9061010090046001600160a01b03168461277c565b7f3bad0c59cf2f06e7314077049f48a93578cd16f5ef92329f1dab1420a99c177e600360019054906101000a90046001600160a01b03168483604051610cca93929190613d91565b5f5460ff16611df75760405162461bcd60e51b815260040161082290613ba9565b5f805460ff19169055611e086111b5565b50611e14335f8361285b565b505f805460ff19166001179055565b6001600160a01b0381165f90815260106020526040812080548203611e4a57505f92915050565b600a5481545f91611e5a91613d5b565b9050816001015481611ae09190613d72565b6003545f90819061010090046001600160a01b03163314611ea05760405163407fded560e01b815260040160405180910390fd5b4360095414611ec257604051630be2a5cb60e11b815260040160405180910390fd5b60065f9054906101000a90046001600160a01b03169050826001600160a01b0316632191f92a6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611f15573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611f399190613be4565b611f855760405162461bcd60e51b815260206004820152601c60248201527f6d61726b6572206d6574686f642072657475726e65642066616c7365000000006044820152606401610822565b600680546001600160a01b0319166001600160a01b0385811691821790925560408051928416835260208301919091527fedffc32e068c7c95dfd4bdfd5c4d939a084d6b11c4199eac8436ed234d72f9269101610cca565b5f5460ff16611ffe5760405162461bcd60e51b815260040161082290613ba9565b5f805460ff1916905561200f6111b5565b50611e143382612b3c565b60408051602081019091525f81526040518060200160405280612040855f015185612ce8565b90529392505050565b5f80612055858561201a565b90506118546120638261267e565b84612cf3565b60055460405163d02f735160e01b81523060048201526001600160a01b03868116602483015285811660448301528481166064830152608482018490525f92169063d02f73519060a4016020604051808303815f875af11580156120cf573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906120f39190613bcd565b90508015612117576040516363e00e3360e11b815260048101829052602401610822565b836001600160a01b0316836001600160a01b03160361214957604051633a94626760e11b815260040160405180910390fd5b5f612169836040518060200160405280666379da05b60000815250612cfe565b90505f6121768285613c2a565b90505f604051806020016040528061218c6117f9565b905290505f61219b8285611ac9565b90505f81600c546121ac9190613c17565b600c819055600d549091506121c2908690613c2a565b600d556001600160a01b0388165f908152600e60205260409020546121e8908890613c2a565b6001600160a01b03808a165f908152600e602052604080822093909355908b1681522054612217908590613c17565b6001600160a01b03808b165f818152600e602052604090819020939093559151908a16905f80516020613e14833981519152906122579088815260200190565b60405180910390a360405185815230906001600160a01b038a16905f80516020613e148339815191529060200160405180910390a37fa91e67c5ea634cd43a12c5a482724b03de01e85ca68702a53d0c2f45cb7c1dc53083836040516122bf93929190613d91565b60405180910390a150505050505050505050565b5f5460ff166122f45760405162461bcd60e51b815260040161082290613ba9565b5f805460ff191690556123056111b5565b50611e143382612d1f565b5f5460ff166123315760405162461bcd60e51b815260040161082290613ba9565b5f805460ff191690556123426111b5565b50611e1433825f61285b565b5f5460ff1661236f5760405162461bcd60e51b815260040161082290613ba9565b5f805460ff191690556123806111b5565b505f816001600160a01b031663a6afed956040518163ffffffff1660e01b81526004016020604051808303815f875af11580156123bf573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906123e39190613bcd565b9050801561240757604051633eea49b760e11b815260048101829052602401610822565b61241333858585612ec8565b50505f805460ff191660011790555050565b6003545f9061010090046001600160a01b0316331461245757604051631205b57b60e11b815260040160405180910390fd5b436009541461247957604051637dfca6b760e11b815260040160405180910390fd5b670de0b6b3a76400008211156124a25760405163717220f360e11b815260040160405180910390fd5b600880549083905560408051828152602081018590527faaa68312e2ea9d50e16af5068410ab56e1a1fd06037b1a35664812c30f8214609101610cca565b600554604051631200453160e11b81523060048201526001600160a01b0385811660248301528481166044830152606482018490525f9283929116906324008a62906084016020604051808303815f875af1158015612541573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906125659190613bcd565b9050801561258957604051638c81362d60e01b815260048101829052602401610822565b43600954146125ab5760405163c9021e2f60e01b815260040160405180910390fd5b5f6125b585611e23565b90505f5f1985146125c657846125c8565b815b90505f6125d5888361337f565b90505f6125e28285613c2a565b90505f82600b546125f39190613c2a565b6001600160a01b038a81165f81815260106020908152604091829020878155600a54600190910155600b8590558151938f168452830191909152810185905260608101849052608081018290529091507f1a2a22cb034d26d1854bdc6666a5b91fe25efbbb5dcad3b0355478d6f5c362a19060a00160405180910390a1509098975050505050505050565b80515f906107e990670de0b6b3a764000090613d72565b5f80808043600954146126be576040516338acf79960e01b815260048101829052602401610822565b6126c8338661337f565b905080600c546126d89190613c17565b915081600c819055507fa91e67c5ea634cd43a12c5a482724b03de01e85ca68702a53d0c2f45cb7c1dc533828460405161271493929190613d91565b60405180910390a15f9590945092505050565b5f80808080612737604187613c17565b90505f61274f612748602084613c17565b3690613545565b803594509050612760816003613545565b62ffffff9490941697933563ffffffff16965092945050505050565b60115460405163a9059cbb60e01b81526001600160a01b0384811660048301526024820184905290911690819063a9059cbb906044015f604051808303815f87803b1580156127c9575f80fd5b505af11580156127db573d5f803e3d5ffd5b505050505f3d5f81146127f457602081146127fd575f80fd5b5f199150612807565b60205f803e5f5191505b50806128555760405162461bcd60e51b815260206004820152601960248201527f544f4b454e5f5452414e534645525f4f55545f4641494c4544000000000000006044820152606401610822565b50505050565b811580612866575080155b6128cf5760405162461bcd60e51b815260206004820152603460248201527f6f6e65206f662072656465656d546f6b656e73496e206f722072656465656d416044820152736d6f756e74496e206d757374206265207a65726f60601b6064820152608401610822565b5f60405180602001604052806128e36117f9565b905290505f808415612903578491506128fc8386611ac9565b9050612913565b61290d8484613550565b91508390505b5f63eabe7d9160e01b30888560405160240161293193929190613db2565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b0319909316929092179091526005549091505f90612980906001600160a01b031683600161356d565b90505f818060200190518101906129979190613bcd565b905080156129bb5760405163480f424760e01b815260048101829052602401610822565b43600954146129dd576040516397b5cfcd60e01b815260040160405180910390fd5b836129e6611ae8565b1015612a05576040516391240a1b60e01b815260040160405180910390fd5b84600d54612a139190613c2a565b600d556001600160a01b0389165f908152600e6020526040902054612a39908690613c2a565b6001600160a01b038a165f908152600e6020526040902055612a5b898561277c565b60405185815230906001600160a01b038b16905f80516020613e148339815191529060200160405180910390a37fe5b754fb1abb7f01b499791d0b820ae3b6af3424ac1c59768edb53f4ec31a929898587604051612abb93929190613d91565b60405180910390a16005546040516351dff98960e01b81523060048201526001600160a01b038b811660248301526044820187905260648201889052909116906351dff989906084015f604051808303815f87803b158015612b1b575f80fd5b505af1158015612b2d573d5f803e3d5ffd5b50505050505050505050505050565b600554604051634ef4c3e160e01b81525f916001600160a01b031690634ef4c3e190612b7090309087908790600401613db2565b6020604051808303815f875af1158015612b8c573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612bb09190613bcd565b90508015612bd4576040516349abd4fd60e01b815260048101829052602401610822565b4360095414612bf6576040516338d8859760e01b815260040160405180910390fd5b5f6040518060200160405280612c0a6117f9565b905290505f612c19858561337f565b90505f612c268284613550565b905080600d54612c369190613c17565b600d556001600160a01b0386165f908152600e6020526040902054612c5c908290613c17565b6001600160a01b0387165f908152600e60205260409081902091909155517f4c209b5fc8ad50758f13e2e1088ba56a560dff690a1c6fef26394f4c03821c4f90612cab90889085908590613d91565b60405180910390a16040518181526001600160a01b0387169030905f80516020613e148339815191529060200160405180910390a3505050505050565b5f610b728284613d5b565b5f610b728284613c17565b5f670de0b6b3a7640000612d1584845f0151612ce8565b610b729190613d72565b5f63da3d454c60e01b308484604051602401612d3d93929190613db2565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b0319909316929092179091526005549091505f90612d8c906001600160a01b031683600161356d565b90505f81806020019051810190612da39190613bcd565b90508015612dc75760405163918db40f60e01b815260048101829052602401610822565b4360095414612de957604051630e8d8c6160e21b815260040160405180910390fd5b83612df2611ae8565b1015612e11576040516348c2588160e01b815260040160405180910390fd5b5f612e1b86611e23565b90505f612e288683613c17565b90505f86600b54612e399190613c17565b6001600160a01b0389165f908152601060205260409020838155600a54600190910155600b8190559050612e6d888861277c565b604080516001600160a01b038a16815260208101899052908101839052606081018290527f13ed6866d4e1ee6da46f845c46d7e54120883d75c5ea9a2dacc1c4ca8984ab809060800160405180910390a15050505050505050565b604080513060248201526001600160a01b0383811660448301528681166064830152858116608483015260a48083018690528351808403909101815260c49092019092526020810180516001600160e01b0316632fe3f38f60e11b17905260055490915f91612f3a911683600161356d565b90505f81806020019051810190612f519190613bcd565b90508015612f7557604051630a14d17960e11b815260048101829052602401610822565b4360095414612f97576040516380965b1b60e01b815260040160405180910390fd5b43846001600160a01b0316636c540baf6040518163ffffffff1660e01b8152600401602060405180830381865afa158015612fd4573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612ff89190613bcd565b1461301657604051631046f38d60e31b815260040160405180910390fd5b866001600160a01b0316866001600160a01b03160361304857604051631bd1a62160e21b815260040160405180910390fd5b845f036130685760405163d29da7ef60e01b815260040160405180910390fd5b5f19850361308957604051635982c5bb60e11b815260040160405180910390fd5b5f6130958888886124e0565b90505f63c488847b60e01b3087846040516024016130b593929190613db2565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b0319909316929092179091526005549091505f90613102906001600160a01b0316836135fb565b90505f808280602001905181019061311a9190613dd6565b915091505f82146131895760405162461bcd60e51b815260206004820152603360248201527f4c49515549444154455f434f4d5054524f4c4c45525f43414c43554c4154455f604482015272105353d5539517d4d152569157d19052531151606a1b6064820152608401610822565b6040516370a0823160e01b81526001600160a01b038c811660048301528291908b16906370a0823190602401602060405180830381865afa1580156131d0573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906131f49190613bcd565b10156132425760405162461bcd60e51b815260206004820152601860248201527f4c49515549444154455f5345495a455f544f4f5f4d55434800000000000000006044820152606401610822565b306001600160a01b038a16036132635761325e308d8d84612069565b613318565b5f896001600160a01b031663b2a02ff18e8e856040518463ffffffff1660e01b815260040161329493929190613db2565b6020604051808303815f875af11580156132b0573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906132d49190613bcd565b146133185760405162461bcd60e51b81526020600482015260146024820152731d1bdad95b881cd95a5e9d5c994819985a5b195960621b6044820152606401610822565b604080516001600160a01b038e811682528d811660208301528183018890528b1660608201526080810183905290517f298637f684da70674f26509b10f07ec2fbc77a335ab1e7d6215a4b2484d8bb529181900360a00190a1505050505050505050505050565b6011546040516370a0823160e01b81523060048201525f916001600160a01b0316908190839082906370a0823190602401602060405180830381865afa1580156133cb573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906133ef9190613bcd565b6040516323b872dd60e01b81529091506001600160a01b038316906323b872dd9061342290899030908a90600401613db2565b5f604051808303815f87803b158015613439575f80fd5b505af115801561344b573d5f803e3d5ffd5b505050505f3d5f8114613464576020811461346d575f80fd5b5f199150613477565b60205f803e5f5191505b50806134c55760405162461bcd60e51b815260206004820152601860248201527f544f4b454e5f5452414e534645525f494e5f4641494c454400000000000000006044820152606401610822565b6040516370a0823160e01b81523060048201525f906001600160a01b038616906370a0823190602401602060405180830381865afa158015613509573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061352d9190613bcd565b90506135398382613c2a565b98975050505050505050565b5f610b728284613c2a565b5f610b7261356684670de0b6b3a7640000612ce8565b8351613679565b60605f61357984613684565b90505f80866001600160a01b031685613592575f613594565b345b846040516135a29190613df8565b5f6040518083038185875af1925050503d805f81146135dc576040519150601f19603f3d011682016040523d82523d5f602084013e6135e1565b606091505b50915091506135f08282613711565b979650505050505050565b60605f61360783613684565b90505f80856001600160a01b0316836040516136239190613df8565b5f60405180830381855afa9150503d805f811461365b576040519150601f19603f3d011682016040523d82523d5f602084013e613660565b606091505b509150915061366f8282613711565b9695505050505050565b5f610b728284613d72565b80516060905f61369261378d565b90505f61369f8284613c17565b9050368211156136c257604051632bcb7bc560e11b815260040160405180910390fd5b6060604051905081815285602001848101826020015b818310156136f05782518152602092830192016136d8565b50505082833603856020018301379190920181016020016040529392505050565b6060826137875781515f0361373957604051632b3ff13d60e11b815260040160405180910390fd5b602082015162461bcd60e51b14801561376c576040516301efd04f60e31b81526044840190610822908290600401613841565b8260405163fd36fde360e01b81526004016108229190613841565b50919050565b5f80613797611bad565b90505f6137a382611c51565b61ffff1690506137b4600283613c17565b91505f5b818110156137ec575f6137ca84611c8a565b90506137d68185613c17565b93505080806137e490613c3d565b9150506137b8565b509092915050565b5f5b8381101561380e5781810151838201526020016137f6565b50505f910152565b5f815180845261382d8160208601602086016137f4565b601f01601f19169290920160200192915050565b602081525f610b726020830184613816565b6001600160a01b0381168114613867575f80fd5b50565b5f806040838503121561387b575f80fd5b823561388681613853565b946020939093013593505050565b5f602082840312156138a4575f80fd5b5035919050565b5f602082840312156138bb575f80fd5b8135610b7281613853565b634e487b7160e01b5f52604160045260245ffd5b5f82601f8301126138e9575f80fd5b813567ffffffffffffffff80821115613904576139046138c6565b604051601f8301601f19908116603f0116810190828211818310171561392c5761392c6138c6565b81604052838152866020858801011115613944575f80fd5b836020870160208301375f602085830101528094505050505092915050565b803560ff81168114613973575f80fd5b919050565b5f805f805f805f60e0888a03121561398e575f80fd5b873561399981613853565b965060208801356139a981613853565b955060408801356139b981613853565b945060608801359350608088013567ffffffffffffffff808211156139dc575f80fd5b6139e88b838c016138da565b945060a08a01359150808211156139fd575f80fd5b50613a0a8a828b016138da565b925050613a1960c08901613963565b905092959891949750929550565b5f805f60608486031215613a39575f80fd5b8335613a4481613853565b92506020840135613a5481613853565b929592945050506040919091013590565b5f805f805f8060c08789031215613a7a575f80fd5b8635613a8581613853565b95506020870135613a9581613853565b945060408701359350606087013567ffffffffffffffff80821115613ab8575f80fd5b613ac48a838b016138da565b94506080890135915080821115613ad9575f80fd5b50613ae689828a016138da565b925050613af560a08801613963565b90509295509295509295565b5f8060408385031215613b12575f80fd5b8235613b1d81613853565b91506020830135613b2d81613853565b809150509250929050565b5f805f60608486031215613b4a575f80fd5b8335613b5581613853565b9250602084013591506040840135613b6c81613853565b809150509250925092565b600181811c90821680613b8b57607f821691505b60208210810361378757634e487b7160e01b5f52602260045260245ffd5b6020808252600a90820152691c994b595b9d195c995960b21b604082015260600190565b5f60208284031215613bdd575f80fd5b5051919050565b5f60208284031215613bf4575f80fd5b81518015158114610b72575f80fd5b634e487b7160e01b5f52601160045260245ffd5b808201808211156107e9576107e9613c03565b818103818111156107e9576107e9613c03565b5f60018201613c4e57613c4e613c03565b5060010190565b601f821115613c9a575f81815260208120601f850160051c81016020861015613c7b5750805b601f850160051c820191505b81811015610acd57828155600101613c87565b505050565b815167ffffffffffffffff811115613cb957613cb96138c6565b613ccd81613cc78454613b77565b84613c55565b602080601f831160018114613d00575f8415613ce95750858301515b5f19600386901b1c1916600185901b178555610acd565b5f85815260208120601f198616915b82811015613d2e57888601518255948401946001909101908401613d0f565b5085821015613d4b57878501515f19600388901b60f8161c191681555b5050505050600190811b01905550565b80820281158282048414176107e9576107e9613c03565b5f82613d8c57634e487b7160e01b5f52601260045260245ffd5b500490565b6001600160a01b039390931683526020830191909152604082015260600190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b5f8060408385031215613de7575f80fd5b505080516020909101519092909150565b5f8251613e098184602087016137f4565b919091019291505056feddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa2646970667358221220d023ef85bf9889fc4e666fa7b8a0c7b16f103318fd10e0bacd3d5a0767aff1cd64736f6c63430008150033
Deployed Bytecode Sourcemap
103105:10415:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;11952:18;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;56438:246;;;;;;:::i;:::-;;:::i;:::-;;;1391:14:1;;1384:22;1366:41;;1354:2;1339:18;56438:246:0;1226:187:1;106651:149:0;;;;;;:::i;:::-;;:::i;:::-;;;1749:25:1;;;1737:2;1722:18;106651:149:0;1603:177:1;13175:33:0;;;;;;60157:174;;;;;;:::i;:::-;;:::i;13820:23::-;;;;;;62304:120;;;:::i;103664:799::-;;;;;;:::i;:::-;;:::i;:::-;;108248:371;;;;;;:::i;:::-;;:::i;55767:192::-;;;;;;:::i;:::-;;:::i;107127:189::-;;;;;;:::i;:::-;;:::i;12625:35::-;;;;;-1:-1:-1;;;;;12625:35:0;;;;;;-1:-1:-1;;;;;5140:32:1;;;5122:51;;5110:2;5095:18;12625:35:0;4960:219:1;12148:21:0;;;;;;;;;;;;5356:4:1;5344:17;;;5326:36;;5314:2;5299:18;12148:21:0;5184:184:1;57733:232:0;;;;;;:::i;:::-;;:::i;63624:97::-;;;:::i;108853:128::-;;;;;;:::i;:::-;;:::i;92240:693::-;;;;;;:::i;:::-;;:::i;13584:24::-;;;;;;40507:1448;;;:::i;12751:39::-;;;;;-1:-1:-1;;;;;12751:39:0;;;97237:280;;;;;;:::i;:::-;;:::i;14715:56::-;;14765:6;14715:56;;8372:33;;8404:1;8372:33;;13298:30;;;;;;19674:25;;;;;-1:-1:-1;;;;;19674:25:0;;;57356:121;;;;;;:::i;:::-;-1:-1:-1;;;;;57449:20:0;57422:7;57449:20;;;:13;:20;;;;;;;57356:121;59724:142;;;:::i;113297:220::-;;;;;;:::i;:::-;;:::i;105834:161::-;;;;;;:::i;:::-;;:::i;13714:25::-;;;;;;12048:20;;;:::i;60540:144::-;;;;;;:::i;:::-;;:::i;51450:1505::-;;;;;;:::i;:::-;;:::i;104853:133::-;;;;;;:::i;:::-;;:::i;63969:2570::-;;;:::i;55278:182::-;;;;;;:::i;:::-;;:::i;13449:23::-;;;;;;59385:193;;;:::i;87235:224::-;;;;;;:::i;:::-;;:::i;90427:604::-;;;;;;:::i;:::-;;:::i;61906:148::-;;;:::i;58311:292::-;;;;;;:::i;:::-;;:::i;:::-;;;;7606:25:1;;;7662:2;7647:18;;7640:34;;;;7690:18;;;7683:34;7748:2;7733:18;;7726:34;7593:3;7578:19;58311:292:0;7375:391:1;106263:141:0;;;;;;:::i;:::-;;:::i;105337:::-;;;;;;:::i;:::-;;:::i;57014:152::-;;;;;;:::i;:::-;-1:-1:-1;;;;;57124:25:0;;;57097:7;57124:25;;;:18;:25;;;;;;;;:34;;;;;;;;;;;;;57014:152;91309:706;;;:::i;99550:321::-;;;;;;:::i;:::-;;:::i;12892:42::-;;;;;-1:-1:-1;;;;;12892:42:0;;;107798:237;;;;;;:::i;:::-;;:::i;12514:28::-;;;;;;;;-1:-1:-1;;;;;12514:28:0;;;59039:170;;;:::i;93236:307::-;;;;;;:::i;:::-;;:::i;14936:36::-;;14968:4;14936:36;;11952:18;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;56438:246::-;56546:10;56515:4;56567:23;;;:18;:23;;;;;;;;-1:-1:-1;;;;;56567:32:0;;;;;;;;;;:41;;;56624:30;56515:4;;56546:10;;;56624:30;;;;56602:6;1749:25:1;;1737:2;1722:18;;1603:177;56624:30:0;;;;;;;;56672:4;56665:11;;;56438:246;;;;;:::o;106651:149::-;106717:4;106734:32;106754:11;106734:19;:32::i;:::-;-1:-1:-1;8404:1:0;;106651:149;-1:-1:-1;106651:149:0:o;60157:174::-;60244:4;102693:11;;;;102685:34;;;;-1:-1:-1;;;102685:34:0;;;;;;;:::i;:::-;;;;;;;;;102744:5;102730:19;;-1:-1:-1;;102730:19:0;;;60261:16:::1;:14;:16::i;:::-;;60295:28;60315:7;60295:19;:28::i;:::-;60288:35;;102772:11:::0;:18;;-1:-1:-1;;102772:18:0;102786:4;102772:18;;;60157:174;;-1:-1:-1;60157:174:0:o;62304:120::-;62364:4;62388:28;:26;:28::i;:::-;62381:35;;62304:120;:::o;103664:799::-;104109:5;:27;;-1:-1:-1;;;;;;104109:27:0;104125:10;104109:27;;;;;104213:107;104230:12;104244:18;104264:28;104294:5;104301:7;104310:9;104213:16;:107::i;:::-;104380:10;:24;;-1:-1:-1;;;;;;104380:24:0;-1:-1:-1;;;;;104380:24:0;;;;;;;;104415:40;;;-1:-1:-1;;;104415:40:0;;;;:38;;:40;;;;;;;;;;;;;;;104380:24;104415:40;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;103664:799;;;;;;;:::o;108248:371::-;108352:5;;;;;-1:-1:-1;;;;;108352:5:0;108338:10;:19;108330:79;;;;-1:-1:-1;;;108330:79:0;;10273:2:1;108330:79:0;;;10255:21:1;10312:2;10292:18;;;10285:30;10351:34;10331:18;;;10324:62;-1:-1:-1;;;10402:18:1;;;10395:45;10457:19;;108330:79:0;10071:411:1;108330:79:0;108446:10;;-1:-1:-1;;;;;108446:10:0;;;108428:28;;;;108420:91;;;;-1:-1:-1;;;108420:91:0;;10689:2:1;108420:91:0;;;10671:21:1;10728:2;10708:18;;;10701:30;10767:34;10747:18;;;10740:62;-1:-1:-1;;;10818:18:1;;;10811:48;10876:19;;108420:91:0;10487:414:1;108420:91:0;108540:30;;-1:-1:-1;;;108540:30:0;;108564:4;108540:30;;;5122:51:1;108522:15:0;;-1:-1:-1;;;;;108540:15:0;;;;;5095:18:1;;108540:30:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;108596:5;;108581:30;;-1:-1:-1;;;108581:30:0;;-1:-1:-1;;;;;108596:5:0;;;;;;108581:30;;;11088:51:1;11155:18;;;11148:34;;;;;-1:-1:-1;108581:14:0;;;;;11061:18:1;;108581:30:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;108319:300;108248:371;:::o;55767:192::-;55871:4;102693:11;;;;102685:34;;;;-1:-1:-1;;;102685:34:0;;;;;;;:::i;:::-;102744:5;102730:19;;-1:-1:-1;;102730:19:0;;;55895:44:::1;55910:10;55922:3:::0;55927;55932:6;55895:14:::1;:44::i;:::-;:56;55888:63;;102772:11:::0;:18;;-1:-1:-1;;102772:18:0;102786:4;102772:18;;;55767:192;;-1:-1:-1;;;55767:192:0:o;107127:189::-;107217:4;107234:48;107260:8;107270:11;107234:25;:48::i;:::-;-1:-1:-1;8404:1:0;107127:189;;;;:::o;57733:232::-;57804:4;57821:23;57847:38;;;;;;;;57862:21;:19;:21::i;:::-;57847:38;;-1:-1:-1;;;;;57936:20:0;;;;;;:13;:20;;;;;;57821:64;;-1:-1:-1;57903:54:0;;57821:64;;57903:18;:54::i;:::-;57896:61;57733:232;-1:-1:-1;;;57733:232:0:o;63624:97::-;63675:4;63699:14;:12;:14::i;108853:128::-;108918:4;108942:31;108963:9;108942:20;:31::i;92240:693::-;92396:5;;92327:4;;92396:5;;;-1:-1:-1;;;;;92396:5:0;92382:10;:19;92378:85;;92425:26;;-1:-1:-1;;;92425:26:0;;;;;;;;;;;92378:85;92513:11;;92610:30;;;-1:-1:-1;;;92610:30:0;;;;-1:-1:-1;;;;;92513:11:0;;;;92610:28;;;;;:30;;;;;;;;;;;;;;:28;:30;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;92602:71;;;;-1:-1:-1;;;92602:71:0;;11677:2:1;92602:71:0;;;11659:21:1;11716:2;11696:18;;;11689:30;11755;11735:18;;;11728:58;11803:18;;92602:71:0;11475:352:1;92602:71:0;92741:11;:28;;-1:-1:-1;;;;;;92741:28:0;-1:-1:-1;;;;;92741:28:0;;;;;;;;;92851:46;;;12118:15:1;;;12100:34;;12165:2;12150:18;;12143:43;;;;92851:46:0;;12035:18:1;92851:46:0;;;;;;;;-1:-1:-1;8404:1:0;;92240:693;-1:-1:-1;;92240:693:0:o;40507:1448::-;40577:26;40612:30;40645:36;:34;:36::i;:::-;40612:69;;40688:25;40716:61;40754:22;40716:37;:61::i;:::-;40688:89;;;;40790:17;40811:1;40790:22;40786:98;;40830:46;;-1:-1:-1;;;40830:46:0;;;;;;;;;;;40786:98;40892:48;31915:1;40892:48;;:::i;:::-;;;40952:24;40947:1003;41001:17;40982:16;:36;40947:1003;;;41049:27;41079:47;41103:22;41079:23;:47::i;:::-;41049:77;-1:-1:-1;41197:27:0;;41310:88;32567:3;41310:22;:88;:::i;:::-;41275:124;-1:-1:-1;41408:23:0;41434:41;41275:124;41434:8;:41;:::i;:::-;41408:67;;41541:15;41528:29;41504:53;;41580:20;:25;;41604:1;41580:25;41576:94;;41625:35;;-1:-1:-1;;;41625:35:0;;;;;;;;;;;41576:94;41684:18;41706:1;41684:23;41680:207;;41741:20;41720:41;;;;41680:207;;;41805:18;41781:20;:42;;;41777:110;;41843:34;;-1:-1:-1;;;41843:34:0;;;;;;;;;;;41777:110;41897:45;41923:19;41897:45;;:::i;:::-;;;41040:910;;;;41020:18;;;;;:::i;:::-;;;;40947:1003;;;;40605:1350;;40507:1448;:::o;97237:280::-;97321:4;102693:11;;;;102685:34;;;;-1:-1:-1;;;102685:34:0;;;;;;;:::i;:::-;102744:5;102730:19;;-1:-1:-1;;102730:19:0;;;97338:16:::1;:14;:16::i;:::-;;97475:34;97496:12;97475:20;:34::i;59724:142::-:0;59795:4;102693:11;;;;102685:34;;;;-1:-1:-1;;;102685:34:0;;;;;;;:::i;:::-;102744:5;102730:19;;-1:-1:-1;;102730:19:0;;;59812:16:::1;:14;:16::i;:::-;-1:-1:-1::0;;59846:12:0::1;::::0;102772:11;:18;;-1:-1:-1;;102772:18:0;102786:4;102772:18;;;59724:142;:::o;113297:220::-;113395:5;;;;;-1:-1:-1;;;;;113395:5:0;113381:10;:19;113373:77;;;;-1:-1:-1;;;113373:77:0;;12934:2:1;113373:77:0;;;12916:21:1;12973:2;12953:18;;;12946:30;13012:34;12992:18;;;12985:62;-1:-1:-1;;;13063:18:1;;;13056:43;13116:19;;113373:77:0;12732:409:1;113373:77:0;113470:10;;113461:48;;-1:-1:-1;;;113461:48:0;;-1:-1:-1;;;;;5140:32:1;;;113461:48:0;;;5122:51:1;113470:10:0;;;;113461:29;;5095:18:1;;113461:48:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;113297:220;:::o;105834:161::-;105906:4;105923:38;105948:12;105923:24;:38::i;12048:20::-;;;;;;;:::i;60540:144::-;60616:4;60640:36;60668:7;60640:27;:36::i;51450:1505::-;51804:5;;;;;-1:-1:-1;;;;;51804:5:0;51790:10;:19;51782:68;;;;-1:-1:-1;;;51782:68:0;;13348:2:1;51782:68:0;;;13330:21:1;13387:2;13367:18;;;13360:30;13426:34;13406:18;;;13399:62;-1:-1:-1;;;13477:18:1;;;13470:34;13521:19;;51782:68:0;13146:400:1;51782:68:0;51869:18;;:23;:43;;;;-1:-1:-1;51896:11:0;;:16;51869:43;51861:91;;;;-1:-1:-1;;;51861:91:0;;13753:2:1;51861:91:0;;;13735:21:1;13792:2;13772:18;;;13765:30;13831:34;13811:18;;;13804:62;-1:-1:-1;;;13882:18:1;;;13875:33;13925:19;;51861:91:0;13551:399:1;51861:91:0;52003:27;:58;;;52080:31;52072:92;;;;-1:-1:-1;;;52072:92:0;;14157:2:1;52072:92:0;;;14139:21:1;14196:2;14176:18;;;14169:30;14235:34;14215:18;;;14208:62;-1:-1:-1;;;14286:18:1;;;14279:46;14342:19;;52072:92:0;13955:412:1;52072:92:0;52209:8;52220:29;52236:12;52220:15;:29::i;:::-;52209:40;-1:-1:-1;52268:15:0;;52260:54;;;;-1:-1:-1;;;52260:54:0;;14574:2:1;52260:54:0;;;14556:21:1;14613:2;14593:18;;;14586:30;14652:28;14632:18;;;14625:56;14698:18;;52260:54:0;14372:350:1;52260:54:0;58843:12;52433:18;:37;25284:4;52481:11;:25;52606:46;52633:18;52606:26;:46::i;:::-;52600:52;-1:-1:-1;52671:15:0;;52663:62;;;;-1:-1:-1;;;52663:62:0;;14929:2:1;52663:62:0;;;14911:21:1;14968:2;14948:18;;;14941:30;15007:34;14987:18;;;14980:62;-1:-1:-1;;;15058:18:1;;;15051:32;15100:19;;52663:62:0;14727:398:1;52663:62:0;52738:4;:12;52745:5;52738:4;:12;:::i;:::-;-1:-1:-1;52761:6:0;:16;52770:7;52761:6;:16;:::i;:::-;-1:-1:-1;;52788:8:0;:20;;;;;;-1:-1:-1;;52788:20:0;;;;;;:8;52929:18;;;;;52788:20;52929:18;;;-1:-1:-1;;;;;51450:1505:0:o;104853:133::-;104911:4;104928:24;104941:10;104928:12;:24::i;63969:2570::-;64178:18;;64028:4;;58843:12;;64266:45;;;64262:93;;8404:1;64328:15;;;;63969:2570;:::o;64262:93::-;64422:14;64439;:12;:14::i;:::-;64484:12;;64528:13;;64576:11;;64684:17;;:71;;-1:-1:-1;;;64684:71:0;;;;;17536:25:1;;;17577:18;;;17570:34;;;17620:18;;;17613:34;;;64422:31:0;;-1:-1:-1;64484:12:0;;64528:13;;64576:11;;64464:17;;-1:-1:-1;;;;;64684:17:0;;:31;;17509:18:1;;64684:71:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;64658:97;;12295:9;64774:18;:43;;64766:84;;;;-1:-1:-1;;;64766:84:0;;17860:2:1;64766:84:0;;;17842:21:1;17899:2;17879:18;;;17872:30;17938;17918:18;;;17911:58;17986:18;;64766:84:0;17658:352:1;64766:84:0;64940:15;64958:44;64979:23;64958:18;:44;:::i;:::-;64940:62;;65494:31;65528:53;65533:35;;;;;;;;65548:18;65533:35;;;65570:10;65528:4;:53::i;:::-;65494:87;;65592:24;65619:54;65638:20;65660:12;65619:18;:54::i;:::-;65592:81;-1:-1:-1;65684:20:0;65707:34;65729:12;65592:81;65707:34;:::i;:::-;65684:57;;65752:21;65776:101;65802:38;;;;;;;;65817:21;;65802:38;;;65842:19;65863:13;65776:25;:101::i;:::-;65752:125;;65888:19;65910:83;65936:20;65958:16;65976;65910:25;:83::i;:::-;66197:18;:39;;;66247:11;:28;;;66286:12;:30;;;66327:13;:32;;;66424:79;;;7606:25:1;;;7662:2;7647:18;;7640:34;;;7690:18;;;7683:34;;;7748:2;7733:18;;7726:34;;;66247:28:0;;-1:-1:-1;66424:79:0;;7593:3:1;7578:19;66424:79:0;;;;;;;8404:1;66516:15;;;;;;;;;;;;;;;63969:2570;:::o;55278:182::-;55365:4;102693:11;;;;102685:34;;;;-1:-1:-1;;;102685:34:0;;;;;;;:::i;:::-;102744:5;102730:19;;-1:-1:-1;;102730:19:0;;;55389:51:::1;55404:10;::::0;55428:3;55433:6;55389:14:::1;:51::i;:::-;:63;55382:70;;102772:11:::0;:18;;-1:-1:-1;;102772:18:0;102786:4;102772:18;;;55278:182;;-1:-1:-1;;55278:182:0:o;59385:193::-;59471:17;;59447:4;;-1:-1:-1;;;;;59471:17:0;:31;59503:14;:12;:14::i;:::-;59519:12;;59533:13;;59548:21;;59471:99;;-1:-1:-1;;;;;;59471:99:0;;;;;;;;;;7606:25:1;;;;7647:18;;;7640:34;;;;7690:18;;;7683:34;7733:18;;;7726:34;7578:19;;59471:99:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;87235:224::-;87346:4;102693:11;;;;102685:34;;;;-1:-1:-1;;;102685:34:0;;;;;;;:::i;:::-;102744:5;102730:19;;-1:-1:-1;;102730:19:0;;;87363:60:::1;87377:10;87389::::0;87401:8;87411:11;87363:13:::1;:60::i;:::-;-1:-1:-1::0;8404:1:0::1;102772:11:::0;:18;;-1:-1:-1;;102772:18:0;102786:4;102772:18;;;87235:224;;-1:-1:-1;;;87235:224:0:o;90427:604::-;90581:5;;90513:4;;90581:5;;;-1:-1:-1;;;;;90581:5:0;90567:10;:19;90563:86;;90610:27;;-1:-1:-1;;;90610:27:0;;;;;;;;;;;90563:86;90748:12;;;-1:-1:-1;;;;;90831:30:0;;;-1:-1:-1;;;;;;90831:30:0;;;;;;;90946:49;;;90748:12;;;;12100:34:1;;;12165:2;12150:18;;12143:43;;;;90946:49:0;;12035:18:1;90946:49:0;11832:360:1;61906:148:0;61975:4;102693:11;;;;102685:34;;;;-1:-1:-1;;;102685:34:0;;;;;;;:::i;:::-;102744:5;102730:19;;-1:-1:-1;;102730:19:0;;;61992:16:::1;:14;:16::i;:::-;;62026:20;:18;:20::i;:::-;62019:27;;102772:11:::0;:18;;-1:-1:-1;;102772:18:0;102786:4;102772:18;;;61906:148;:::o;58311:292::-;-1:-1:-1;;;;;58468:22:0;;58388:4;58468:22;;;:13;:22;;;;;;58388:4;;;;;;;;58505:36;58482:7;58505:27;:36::i;:::-;58556:28;:26;:28::i;:::-;58423:172;;;;;;;;58311:292;;;;;:::o;106263:141::-;106325:4;106342:28;106357:12;106342:14;:28::i;105337:141::-;105399:4;105416:28;105431:12;105416:14;:28::i;91309:706::-;91466:12;;91360:4;;-1:-1:-1;;;;;91466:12:0;91452:10;:26;;;:54;;-1:-1:-1;91482:10:0;:24;91452:54;91448:124;;;91530:30;;-1:-1:-1;;;91530:30:0;;;;;;;;;;;91448:124;91656:5;;;91698:12;;;-1:-1:-1;;;;;91698:12:0;;;91656:5;91771:20;;;-1:-1:-1;;;;;;91771:20:0;;;;;;;-1:-1:-1;;;;;;91840:34:0;;;;;;91892:25;;;91656:5;;;;;;12100:34:1;;;91911:5:0;;;;;12165:2:1;12150:18;;12143:43;91656:5:0;91698:12;;91892:25;;12035:18:1;91892:25:0;;;;;;;91966:12;;91933:46;;;-1:-1:-1;;;;;12118:15:1;;;12100:34;;91966:12:0;;;12165:2:1;12150:18;;12143:43;91933:46:0;;12035:18:1;91933:46:0;;;;;;;8404:1;91992:15;;;;91309:706;:::o;99550:321::-;99646:4;99663:16;:14;:16::i;:::-;;99815:48;99842:20;99815:26;:48::i;107798:237::-;107920:4;107937:64;107961:8;107971:11;107984:16;107937:23;:64::i;:::-;-1:-1:-1;8404:1:0;107798:237;;;;;:::o;59039:170::-;59125:17;;59101:4;;-1:-1:-1;;;;;59125:17:0;:31;59157:14;:12;:14::i;:::-;59173:12;;59187:13;;59125:76;;-1:-1:-1;;;;;;59125:76:0;;;;;;;;;;17536:25:1;;;;17577:18;;;17570:34;;;;17620:18;;;17613:34;17509:18;;59125:76:0;17334:319:1;93236:307:0;93334:4;102693:11;;;;102685:34;;;;-1:-1:-1;;;102685:34:0;;;;;;;:::i;:::-;102744:5;102730:19;;-1:-1:-1;;102730:19:0;;;93351:16:::1;:14;:16::i;:::-;;93487:48;93510:24;93487:22;:48::i;78023:261::-:0;102693:11;;;;102685:34;;;;-1:-1:-1;;;102685:34:0;;;;;;;:::i;:::-;102744:5;102730:19;;-1:-1:-1;;102730:19:0;;;78103:16:::1;:14;:16::i;:::-;;78223:53;78240:10;78252;78264:11;78223:16;:53::i;:::-;-1:-1:-1::0;;102772:11:0;:18;;-1:-1:-1;;102772:18:0;102786:4;102772:18;;;78023:261::o;62674:780::-;62780:11;;62743:4;;62806:17;;;62802:645;;-1:-1:-1;;62979:27:0;;;62674:780::o;62802:645::-;63188:14;63205;:12;:14::i;:::-;63188:31;;63234:33;63297:13;;63282:12;;63270:9;:24;;;;:::i;:::-;:40;;;;:::i;:::-;63234:76;-1:-1:-1;63325:17:0;63387:12;63345:39;25284:4;63234:76;63345:39;:::i;:::-;:54;;;;:::i;:::-;63325:74;62674:780;-1:-1:-1;;;;;62674:780:0:o;53421:1596::-;53595:11;;:60;;-1:-1:-1;;;53595:60:0;;53631:4;53595:60;;;18996:34:1;-1:-1:-1;;;;;19066:15:1;;;19046:18;;;19039:43;19118:15;;;19098:18;;;19091:43;19150:18;;;19143:34;;;53519:4:0;;;;53595:11;;;:27;;18930:19:1;;53595:60:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;53580:75;-1:-1:-1;53670:12:0;;53666:89;;53706:37;;-1:-1:-1;;;53706:37:0;;;;;1749:25:1;;;1722:18;;53706:37:0;1603:177:1;53666:89:0;53821:3;-1:-1:-1;;;;;53814:10:0;:3;-1:-1:-1;;;;;53814:10:0;;53810:70;;53848:20;;-1:-1:-1;;;53848:20:0;;;;;;;;;;;53810:70;53957:22;54009:3;-1:-1:-1;;;;;53998:14:0;:7;-1:-1:-1;;;;;53998:14:0;;53994:166;;-1:-1:-1;;;53994:166:0;;;-1:-1:-1;;;;;;54116:23:0;;;;;;;:18;:23;;;;;;;;:32;;;;;;;;;;53994:166;54238:17;54258:26;54278:6;54258:17;:26;:::i;:::-;-1:-1:-1;;;;;54315:18:0;;54295:17;54315:18;;;:13;:18;;;;;;54238:46;;-1:-1:-1;54295:17:0;54315:27;;54336:6;;54315:27;:::i;:::-;-1:-1:-1;;;;;54373:18:0;;54353:17;54373:18;;;:13;:18;;;;;;54295:47;;-1:-1:-1;54353:17:0;54373:27;;54394:6;;54373:27;:::i;:::-;-1:-1:-1;;;;;54534:18:0;;;;;;;:13;:18;;;;;;:33;;;54578:18;;;;;;:33;;;54353:47;-1:-1:-1;;;54684:35:0;;54680:115;;-1:-1:-1;;;;;54736:23:0;;;;;;;:18;:23;;;;;;;;:32;;;;;;;;;:47;;;54680:115;54866:3;-1:-1:-1;;;;;54852:26:0;54861:3;-1:-1:-1;;;;;54852:26:0;-1:-1:-1;;;;;;;;;;;54871:6:0;54852:26;;;;1749:25:1;;1737:2;1722:18;;1603:177;54852:26:0;;;;;;;;-1:-1:-1;8404:1:0;;53421:1596;-1:-1:-1;;;;;;;;;53421:1596:0:o;78523:283::-;102693:11;;;;102685:34;;;;-1:-1:-1;;;102685:34:0;;;;;;;:::i;:::-;102744:5;102730:19;;-1:-1:-1;;102730:19:0;;;78627:16:::1;:14;:16::i;:::-;;78747:51;78764:10;78776:8;78786:11;78747:16;:51::i;:::-;-1:-1:-1::0;;102772:11:0;:18;;-1:-1:-1;;102772:18:0;102786:4;102772:18;;;-1:-1:-1;78523:283:0:o;26006:174::-;26084:4;26101:18;26122:15;26127:1;26130:6;26122:4;:15::i;:::-;26101:36;;26155:17;26164:7;26155:8;:17::i;:::-;26148:24;26006:174;-1:-1:-1;;;;26006:174:0:o;109249:186::-;109368:10;;109397:30;;-1:-1:-1;;;109397:30:0;;109421:4;109397:30;;;5122:51:1;109313:4:0;;-1:-1:-1;;;;;109368:10:0;;;;109397:15;;5095:18:1;;109397:30:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;109390:37;;;109249:186;:::o;94905:284::-;94982:4;102693:11;;;;102685:34;;;;-1:-1:-1;;;102685:34:0;;;;;;;:::i;:::-;102744:5;102730:19;;-1:-1:-1;;102730:19:0;;;94999:16:::1;:14;:16::i;:::-;;95127:28;95145:9;95127:17;:28::i;:::-;;;8404:1;95166:15;;102772:11:::0;:18;;-1:-1:-1;;102772:18:0;102786:4;102772:18;;;94905:284;;-1:-1:-1;94905:284:0:o;42369:1200::-;42438:7;42750:20;-1:-1:-1;;42613:14:0;42609:37;42596:51;42725:46;;42681:99;;42793:83;;42838:30;;-1:-1:-1;;;42838:30:0;;;;;;;;;;;42793:83;42961:31;43046:8;33029:2;43003:58;42999:113;;;43079:25;;-1:-1:-1;;;43079:25:0;;;;;;;;;;;42999:113;-1:-1:-1;;;43191:14:0;43187:61;43164:93;43270:30;32271:1;43303:64;32218:1;43303:64;;;;:::i;:::-;:92;;;;:::i;:::-;43270:125;-1:-1:-1;43456:8:0;43406:47;31915:1;43270:125;43406:47;:::i;:::-;:65;43402:126;;;43489:31;;-1:-1:-1;;;43489:31:0;;;;;;;;;;;43654:540;43771:24;;43856:41;31300:2;43856:22;:41;:::i;:::-;43807:90;-1:-1:-1;43949:8:0;43908:56;;43904:111;;;43982:25;;-1:-1:-1;;;43982:25:0;;;;;;;;;;;43904:111;44087:14;44083:59;44060:91;;43654:540;-1:-1:-1;;43654:540:0:o;41961:402::-;42049:7;42074:23;42106:34;42150:63;42190:22;42150:39;:63::i;:::-;42065:148;;-1:-1:-1;42065:148:0;-1:-1:-1;32723:2:0;42262:49;42065:148;32089:2;42262:49;:::i;:::-;42236:76;;:15;:76;:::i;:::-;:121;;;;:::i;97794:1387::-;98005:5;;97861:4;;;;98005:5;;;-1:-1:-1;;;;;98005:5:0;97991:10;:19;97987:85;;98034:26;;-1:-1:-1;;;98034:26:0;;;;;;;;;;;97987:85;58843:12;98176:18;;:38;98172:104;;98238:26;;-1:-1:-1;;;98238:26:0;;;;;;;;;;;98172:104;98382:12;98365:14;:12;:14::i;:::-;:29;98361:101;;;98418:32;;-1:-1:-1;;;98418:32:0;;;;;;;;;;;98361:101;98554:13;;98539:12;:28;98535:98;;;98591:30;;-1:-1:-1;;;98591:30:0;;;;;;;;;;;98535:98;98801:12;98785:13;;:28;;;;:::i;:::-;98887:13;:32;;;99053:5;;98887:32;;-1:-1:-1;99039:34:0;;99053:5;;;-1:-1:-1;;;;;99053:5:0;99060:12;99039:13;:34::i;:::-;99091:54;99107:5;;;;;;;;;-1:-1:-1;;;;;99107:5:0;99114:12;99128:16;99091:54;;;;;;;;:::i;70406:252::-;102693:11;;;;102685:34;;;;-1:-1:-1;;;102685:34:0;;;;;;;:::i;:::-;102744:5;102730:19;;-1:-1:-1;;102730:19:0;;;70492:16:::1;:14;:16::i;:::-;;70601:49;70621:10;70634:1;70637:12;70601:11;:49::i;:::-;-1:-1:-1::0;102772:11:0;:18;;-1:-1:-1;;102772:18:0;102786:4;102772:18;;;70406:252::o;60938:813::-;-1:-1:-1;;;;;61121:23:0;;61015:4;61121:23;;;:14;:23;;;;;61350:24;;:29;;61346:70;;-1:-1:-1;61403:1:0;;60938:813;-1:-1:-1;;60938:813:0:o;61346:70::-;61664:11;;61637:24;;61610;;61637:38;;;:::i;:::-;61610:65;;61715:14;:28;;;61693:19;:50;;;;:::i;100201:1201::-;100501:5;;100295:4;;;;100501:5;;;-1:-1:-1;;;;;100501:5:0;100487:10;:19;100483:91;;100530:32;;-1:-1:-1;;;100530:32:0;;;;;;;;;;;100483:91;58843:12;100678:18;;:38;100674:110;;100740:32;;-1:-1:-1;;;100740:32:0;;;;;;;;;;;100674:110;100878:17;;;;;;;;;-1:-1:-1;;;;;100878:17:0;100855:40;;100998:20;-1:-1:-1;;;;;100998:40:0;;:42;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;100990:83;;;;-1:-1:-1;;;100990:83:0;;11677:2:1;100990:83:0;;;11659:21:1;11716:2;11696:18;;;11689:30;11755;11735:18;;;11728:58;11803:18;;100990:83:0;11475:352:1;100990:83:0;101150:17;:40;;-1:-1:-1;;;;;;101150:40:0;-1:-1:-1;;;;;101150:40:0;;;;;;;;;101296:70;;;12118:15:1;;;12100:34;;12165:2;12150:18;;12143:43;;;;101296:70:0;;12035:18:1;101296:70:0;11832:360:1;66809:244:0;102693:11;;;;102685:34;;;;-1:-1:-1;;;102685:34:0;;;;;;;:::i;:::-;102744:5;102730:19;;-1:-1:-1;;102730:19:0;;;66881:16:::1;:14;:16::i;:::-;;67012:33;67022:10;67034;67012:9;:33::i;28741:133::-:0;-1:-1:-1;;;;;;;;;;;;28830:36:0;;;;;;;;28845:19;28850:1;:10;;;28862:1;28845:4;:19::i;:::-;28830:36;;28823:43;28741:133;-1:-1:-1;;;28741:133:0:o;26325:208::-;26423:4;26440:18;26461:15;26466:1;26469:6;26461:4;:15::i;:::-;26440:36;;26494:31;26499:17;26508:7;26499:8;:17::i;:::-;26518:6;26494:4;:31::i;88046:1932::-;88222:11;;:87;;-1:-1:-1;;;88222:87:0;;88255:4;88222:87;;;20202:34:1;-1:-1:-1;;;;;20272:15:1;;;20252:18;;;20245:43;20324:15;;;20304:18;;;20297:43;20376:15;;;20356:18;;;20349:43;20408:19;;;20401:35;;;88207:12:0;;88222:11;;:24;;20136:19:1;;88222:87:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;88207:102;-1:-1:-1;88324:12:0;;88320:95;;88360:43;;-1:-1:-1;;;88360:43:0;;;;;1749:25:1;;;1722:18;;88360:43:0;1603:177:1;88320:95:0;88488:10;-1:-1:-1;;;;;88476:22:0;:8;-1:-1:-1;;;;;88476:22:0;;88472:98;;88522:36;;-1:-1:-1;;;88522:36:0;;;;;;;;;;;88472:98;88857:24;88884:62;88889:11;88902:43;;;;;;;;14765:6;88902:43;;;88884:4;:62::i;:::-;88857:89;-1:-1:-1;88957:26:0;88986:33;88857:89;88986:11;:33;:::i;:::-;88957:62;;89030:23;89056:45;;;;;;;;89071:28;:26;:28::i;:::-;89056:45;;89030:71;-1:-1:-1;89112:24:0;89139:53;89030:71;89172:19;89139:18;:53::i;:::-;89112:80;;89203:21;89243:19;89227:13;;:35;;;;:::i;:::-;89457:13;:32;;;89514:11;;89203:59;;-1:-1:-1;89514:33:0;;89528:19;;89514:33;:::i;:::-;89500:11;:47;-1:-1:-1;;;;;89584:23:0;;;;;;:13;:23;;;;;;:37;;89610:11;;89584:37;:::i;:::-;-1:-1:-1;;;;;89558:23:0;;;;;;;:13;:23;;;;;;:63;;;;89660:25;;;;;;;:49;;89688:21;;89660:49;:::i;:::-;-1:-1:-1;;;;;89632:25:0;;;;;;;:13;:25;;;;;;;:77;;;;89764:53;;;;;;-1:-1:-1;;;;;;;;;;;89764:53:0;;;89795:21;1749:25:1;;1737:2;1722:18;;1603:177;89764:53:0;;;;;;;;89833:54;;1749:25:1;;;89860:4:0;;-1:-1:-1;;;;;89833:54:0;;;-1:-1:-1;;;;;;;;;;;89833:54:0;1737:2:1;1722:18;89833:54:0;;;;;;;89903:67;89925:4;89932:19;89953:16;89903:67;;;;;;;;:::i;:::-;;;;;;;;88155:1823;;;;;;88046:1932;;;;:::o;74851:239::-;102693:11;;;;102685:34;;;;-1:-1:-1;;;102685:34:0;;;;;;;:::i;:::-;102744:5;102730:19;;-1:-1:-1;;102730:19:0;;;74927:16:::1;:14;:16::i;:::-;;75036:46;75056:10;75069:12;75036:11;:46::i;69872:242::-:0;102693:11;;;;102685:34;;;;-1:-1:-1;;;102685:34:0;;;;;;;:::i;:::-;102744:5;102730:19;;-1:-1:-1;;102730:19:0;;;69948:16:::1;:14;:16::i;:::-;;70057:49;70077:10;70090:12;70104:1;70057:11;:49::i;81907:633::-:0;102693:11;;;;102685:34;;;;-1:-1:-1;;;102685:34:0;;;;;;;:::i;:::-;102744:5;102730:19;;-1:-1:-1;;102730:19:0;;;82043:16:::1;:14;:16::i;:::-;;82072:10;82085:16;-1:-1:-1::0;;;;;82085:31:0::1;;:33;;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;82072:46:::0;-1:-1:-1;82133:17:0;;82129:227:::1;;82298:46;::::0;-1:-1:-1;;;82298:46:0;;::::1;::::0;::::1;1749:25:1::0;;;1722:18;;82298:46:0::1;1603:177:1::0;82129:227:0::1;82459:73;82480:10;82492:8;82502:11;82515:16;82459:20;:73::i;:::-;-1:-1:-1::0;;102772:11:0;:18;;-1:-1:-1;;102772:18:0;102786:4;102772:18;;;-1:-1:-1;;81907:633:0:o;93811:838::-;93961:5;;93892:4;;93961:5;;;-1:-1:-1;;;;;93961:5:0;93947:10;:19;93943:87;;93990:28;;-1:-1:-1;;;93990:28:0;;;;;;;;;;;93943:87;58843:12;94115:18;;:38;94111:106;;94177:28;;-1:-1:-1;;;94177:28:0;;;;;;;;;;;94111:106;12435:4;94287:24;:51;94283:120;;;94362:29;;-1:-1:-1;;;94362:29:0;;;;;;;;;;;94283:120;94447:21;;;94479:48;;;;94545:68;;;20971:25:1;;;21027:2;21012:18;;21005:34;;;94545:68:0;;20944:18:1;94545:68:0;20797:248:1;79194:2319:0;79368:11;;:75;;-1:-1:-1;;;79368:75:0;;79407:4;79368:75;;;18996:34:1;-1:-1:-1;;;;;19066:15:1;;;19046:18;;;19039:43;19118:15;;;19098:18;;;19091:43;19150:18;;;19143:34;;;79289:4:0;;;;79368:11;;;:30;;18930:19:1;;79368:75:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;79353:90;-1:-1:-1;79458:12:0;;79454:92;;79494:40;;-1:-1:-1;;;79494:40:0;;;;;1749:25:1;;;1722:18;;79494:40:0;1603:177:1;79454:92:0;58843:12;79634:18;;:38;79630:105;;79696:27;;-1:-1:-1;;;79696:27:0;;;;;;;;;;;79630:105;79827:23;79853:37;79881:8;79853:27;:37::i;:::-;79827:63;;79969:21;-1:-1:-1;;79993:11:0;:29;:64;;80046:11;79993:64;;;80025:18;79993:64;79969:88;;80631:22;80656:37;80669:5;80676:16;80656:12;:37::i;:::-;80631:62;-1:-1:-1;80954:22:0;80979:38;80631:62;80979:18;:38;:::i;:::-;80954:63;;81028:20;81066:17;81051:12;;:32;;;;:::i;:::-;-1:-1:-1;;;;;81166:24:0;;;;;;;:14;:24;;;;;;;;;:54;;;81272:11;;81231:38;;;;:52;81294:12;:30;;;81385:83;;21365:15:1;;;21347:34;;21397:18;;21390:43;;;;21449:18;;21442:34;;;21507:2;21492:18;;21485:34;;;21550:3;21535:19;;21528:35;;;81294:30:0;;-1:-1:-1;81385:83:0;;21296:3:1;21281:19;81385:83:0;;;;;;;-1:-1:-1;81488:17:0;;79194:2319;-1:-1:-1;;;;;;;;79194:2319:0:o;25680:213::-;25862:12;;25737:4;;25862:23;;25284:4;;25862:23;:::i;95529:1453::-;95590:4;;;;58843:12;95814:18;;:38;95810:122;;95876:44;;-1:-1:-1;;;95876:44:0;;;;;1749:25:1;;;1722:18;;95876:44:0;1603:177:1;95810:122:0;96521:35;96534:10;96546:9;96521:12;:35::i;:::-;96503:53;;96604:15;96588:13;;:31;;;;:::i;:::-;96569:50;;96712:16;96696:13;:32;;;;96817:60;96831:10;96843:15;96860:16;96817:60;;;;;;;;:::i;:::-;;;;;;;;8404:1;;96958:15;;-1:-1:-1;95529:1453:0;-1:-1:-1;;;95529:1453:0:o;45021:1053::-;45154:23;;;;;45513:45;31810:2;45513:36;:45;:::i;:::-;45480:78;-1:-1:-1;45565:22:0;45590:62;45610:41;31300:2;45480:78;45610:41;:::i;:::-;45590:8;;:19;:62::i;:::-;45697:28;;;-1:-1:-1;45565:87:0;-1:-1:-1;45800:40:0;45565:87;31970:1;45800:18;:40::i;:::-;45971:34;;;;;;45896:28;;46012:56;;;-1:-1:-1;45971:34:0;;-1:-1:-1;;;;;45021:1053:0:o;112128:930::-;112281:10;;112303:26;;-1:-1:-1;;;112303:26:0;;-1:-1:-1;;;;;11106:32:1;;;112303:26:0;;;11088:51:1;11155:18;;;11148:34;;;112281:10:0;;;;;;112303:14;;11061:18:1;;112303:26:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;112342:12;112396:16;112435:1;112430:152;;;;112605:2;112600:228;;;;112963:1;112960;112953:12;112430:152;-1:-1:-1;;112525:6:0;-1:-1:-1;112430:152:0;;112600:228;112702:2;112699:1;112696;112681:24;112744:1;112738:8;112727:19;;112389:595;;113013:7;113005:45;;;;-1:-1:-1;;;113005:45:0;;21776:2:1;113005:45:0;;;21758:21:1;21815:2;21795:18;;;21788:30;21854:27;21834:18;;;21827:55;21899:18;;113005:45:0;21574:349:1;113005:45:0;112210:848;;112128:930;;:::o;71218:3454::-;71335:19;;;:42;;-1:-1:-1;71358:19:0;;71335:42;71327:107;;;;-1:-1:-1;;;71327:107:0;;22130:2:1;71327:107:0;;;22112:21:1;22169:2;22149:18;;;22142:30;22208:34;22188:18;;;22181:62;-1:-1:-1;;;22259:18:1;;;22252:50;22319:19;;71327:107:0;21928:416:1;71327:107:0;71507:23;71533:46;;;;;;;;71548:28;:26;:28::i;:::-;71533:46;;71507:72;-1:-1:-1;71592:17:0;;71690:18;;71686:757;;71981:14;71966:29;;72025:48;72044:12;72058:14;72025:18;:48::i;:::-;72010:63;;71686:757;;;72353:34;72358:14;72374:12;72353:4;:34::i;:::-;72338:49;;72417:14;72402:29;;71686:757;72617:28;72685:43;;;72751:4;72772:8;72796:12;72648:171;;;;;;;;;;:::i;:::-;;;;-1:-1:-1;;72648:171:0;;;;;;;;;;;;;;-1:-1:-1;;;;;72648:171:0;-1:-1:-1;;;;;;72648:171:0;;;;;;;;;;72897:11;;72648:171;;-1:-1:-1;;;72861:108:0;;-1:-1:-1;;;;;72897:11:0;72648:171;72897:11;72861:13;:108::i;:::-;72832:137;;72982:12;73008:13;72997:36;;;;;;;;;;;;:::i;:::-;72982:51;-1:-1:-1;73048:12:0;;73044:87;;73084:35;;-1:-1:-1;;;73084:35:0;;;;;1749:25:1;;;1722:18;;73084:35:0;1603:177:1;73044:87:0;58843:12;73219:18;;:38;73215:100;;73281:22;;-1:-1:-1;;;73281:22:0;;;;;;;;;;;73215:100;73413:12;73396:14;:12;:14::i;:::-;:29;73392:99;;;73449:30;;-1:-1:-1;;;73449:30:0;;;;;;;;;;;73392:99;73849:12;73835:11;;:26;;;;:::i;:::-;73821:11;:40;-1:-1:-1;;;;;73898:23:0;;;;;;:13;:23;;;;;;:38;;73924:12;;73898:38;:::i;:::-;-1:-1:-1;;;;;73872:23:0;;;;;;:13;:23;;;;;:64;74312:37;73886:8;74336:12;74312:13;:37::i;:::-;74427:47;;1749:25:1;;;74454:4:0;;-1:-1:-1;;;;;74427:47:0;;;-1:-1:-1;;;;;;;;;;;74427:47:0;1737:2:1;1722:18;74427:47:0;;;;;;;74490:44;74497:8;74507:12;74521;74490:44;;;;;;;;:::i;:::-;;;;;;;;74587:11;;:77;;-1:-1:-1;;;74587:77:0;;74620:4;74587:77;;;23022:34:1;-1:-1:-1;;;;;23092:15:1;;;23072:18;;;23065:43;23124:18;;;23117:34;;;23167:18;;;23160:34;;;74587:11:0;;;;:24;;22956:19:1;;74587:77:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;71316:3356;;;;;;71218:3454;;;:::o;67394:2215::-;67521:11;;:58;;-1:-1:-1;;;67521:58:0;;67506:12;;-1:-1:-1;;;;;67521:11:0;;:23;;:58;;67553:4;;67560:6;;67568:10;;67521:58;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;67506:73;-1:-1:-1;67594:12:0;;67590:85;;67630:33;;-1:-1:-1;;;67630:33:0;;;;;1749:25:1;;;1722:18;;67630:33:0;1603:177:1;67590:85:0;58843:12;67763:18;;:38;67759:98;;67825:20;;-1:-1:-1;;;67825:20:0;;;;;;;;;;;67759:98;67869:23;67895:45;;;;;;;;67910:28;:26;:28::i;:::-;67895:45;;67869:71;-1:-1:-1;68549:21:0;68573:32;68586:6;68594:10;68573:12;:32::i;:::-;68549:56;;68798:15;68816:36;68821:16;68839:12;68816:4;:36::i;:::-;68798:54;;69186:10;69172:11;;:24;;;;:::i;:::-;69158:11;:38;-1:-1:-1;;;;;69231:21:0;;;;;;:13;:21;;;;;;:34;;69255:10;;69231:34;:::i;:::-;-1:-1:-1;;;;;69207:21:0;;;;;;:13;:21;;;;;;;:58;;;;69341:42;;;;;69221:6;;69354:16;;69372:10;;69341:42;:::i;:::-;;;;;;;;69399:43;;1749:25:1;;;-1:-1:-1;;;;;69399:43:0;;;69416:4;;-1:-1:-1;;;;;;;;;;;69399:43:0;1737:2:1;1722:18;69399:43:0;;;;;;;67455:2154;;;;67394:2215;;:::o;29478:90::-;29531:4;29555:5;29559:1;29555;:5;:::i;28054:90::-;28107:4;28131:5;28135:1;28131;:5;:::i;28882:121::-;28941:4;25284;28965:19;28970:1;28973;:10;;;28965:4;:19::i;:::-;:30;;;;:::i;75267:2597::-;75515:28;75583:43;;;75649:4;75670:8;75694:12;75546:171;;;;;;;;;;:::i;:::-;;;;-1:-1:-1;;75546:171:0;;;;;;;;;;;;;;-1:-1:-1;;;;;75546:171:0;-1:-1:-1;;;;;;75546:171:0;;;;;;;;;;75795:11;;75546:171;;-1:-1:-1;;;75759:108:0;;-1:-1:-1;;;;;75795:11:0;75546:171;75795:11;75759:13;:108::i;:::-;75730:137;;75880:12;75906:13;75895:36;;;;;;;;;;;;:::i;:::-;75880:51;-1:-1:-1;75948:12:0;;75944:87;;75984:35;;-1:-1:-1;;;75984:35:0;;;;;1749:25:1;;;1722:18;;75984:35:0;1603:177:1;75944:87:0;58843:12;76119:18;;:38;76115:100;;76181:22;;-1:-1:-1;;;76181:22:0;;;;;;;;;;;76115:100;76324:12;76307:14;:12;:14::i;:::-;:29;76303:93;;;76360:24;;-1:-1:-1;;;76360:24:0;;;;;;;;;;;76303:93;76643:23;76669:37;76697:8;76669:27;:37::i;:::-;76643:63;-1:-1:-1;76717:22:0;76742:33;76763:12;76643:63;76742:33;:::i;:::-;76717:58;;76786:20;76824:12;76809;;:27;;;;:::i;:::-;-1:-1:-1;;;;;77167:24:0;;;;;;:14;:24;;;;;:54;;;77273:11;;77232:38;;;;:52;77295:12;:30;;;76786:50;-1:-1:-1;77697:37:0;77182:8;77721:12;77697:13;:37::i;:::-;77790:66;;;-1:-1:-1;;;;;23842:32:1;;23824:51;;23906:2;23891:18;;23884:34;;;23934:18;;;23927:34;;;23992:2;23977:18;;23970:34;;;77790:66:0;;23811:3:1;23796:19;77790:66:0;;;;;;;75342:2522;;;;;;75267:2597;;:::o;83019:3655::-;83402:244;;;83514:4;83402:244;;;20202:34:1;-1:-1:-1;;;;;20272:15:1;;;20252:18;;;20245:43;20324:15;;;20304:18;;;20297:43;20376:15;;;20356:18;;;20349:43;20408:19;;;;20401:35;;;83402:244:0;;;;;;;;;;20136:19:1;;;;83402:244:0;;;;;;;;-1:-1:-1;;;;;83402:244:0;-1:-1:-1;;;83402:244:0;;;83724:11;;83402:244;;-1:-1:-1;;83688:108:0;;83724:11;83402:244;83724:11;83688:13;:108::i;:::-;83659:137;;83809:12;83835:13;83824:33;;;;;;;;;;;;:::i;:::-;83809:48;-1:-1:-1;83874:12:0;;83870:90;;83910:38;;-1:-1:-1;;;83910:38:0;;;;;1749:25:1;;;1722:18;;83910:38:0;1603:177:1;83870:90:0;58843:12;84048:18;;:38;84044:103;;84110:25;;-1:-1:-1;;;84110:25:0;;;;;;;;;;;84044:103;58843:12;84252:16;-1:-1:-1;;;;;84252:35:0;;:37;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;:57;84248:132;;84333:35;;-1:-1:-1;;;84333:35:0;;;;;;;;;;;84248:132;84453:10;-1:-1:-1;;;;;84441:22:0;:8;-1:-1:-1;;;;;84441:22:0;;84437:93;;84487:31;;-1:-1:-1;;;84487:31:0;;;;;;;;;;;84437:93;84585:11;84600:1;84585:16;84581:84;;84625:28;;-1:-1:-1;;;84625:28:0;;;;;;;;;;;84581:84;-1:-1:-1;;84721:11:0;:29;84717:100;;84774:31;;-1:-1:-1;;;84774:31:0;;;;;;;;;;;84717:100;84870:22;84895:51;84912:10;84924:8;84934:11;84895:16;:51::i;:::-;84870:76;;85348:29;85417:59;;;85499:4;85528:16;85561:17;85380:209;;;;;;;;;;:::i;:::-;;;;-1:-1:-1;;85380:209:0;;;;;;;;;;;;;;-1:-1:-1;;;;;85380:209:0;-1:-1:-1;;;;;;85380:209:0;;;;;;;;;;85672:11;;85380:209;;-1:-1:-1;;;85632:94:0;;-1:-1:-1;;;;;85672:11:0;85380:209;85632:17;:94::i;:::-;85602:124;;85740:21;85763:16;85794:14;85783:40;;;;;;;;;;;;:::i;:::-;85739:84;;;;8404:1;85846:16;:28;85838:92;;;;-1:-1:-1;;;85838:92:0;;24467:2:1;85838:92:0;;;24449:21:1;24506:2;24486:18;;;24479:30;24545:34;24525:18;;;24518:62;-1:-1:-1;;;24596:18:1;;;24589:49;24655:19;;85838:92:0;24265:415:1;85838:92:0;86024:36;;-1:-1:-1;;;86024:36:0;;-1:-1:-1;;;;;5140:32:1;;;86024:36:0;;;5122:51:1;86064:11:0;;86024:26;;;;;;5095:18:1;;86024:36:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;:51;;86016:88;;;;-1:-1:-1;;;86016:88:0;;24887:2:1;86016:88:0;;;24869:21:1;24926:2;24906:18;;;24899:30;24965:26;24945:18;;;24938:54;25009:18;;86016:88:0;24685:348:1;86016:88:0;86274:4;-1:-1:-1;;;;;86237:42:0;;;86233:273;;86296:63;86318:4;86325:10;86337:8;86347:11;86296:13;:63::i;:::-;86233:273;;;8404:1;86400:16;-1:-1:-1;;;;;86400:22:0;;86423:10;86435:8;86445:11;86400:57;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;:69;86392:102;;;;-1:-1:-1;;;86392:102:0;;25240:2:1;86392:102:0;;;25222:21:1;25279:2;25259:18;;;25252:30;-1:-1:-1;;;25298:18:1;;;25291:50;25358:18;;86392:102:0;25038:344:1;86392:102:0;86570:96;;;-1:-1:-1;;;;;25702:15:1;;;25684:34;;25754:15;;;25749:2;25734:18;;25727:43;25786:18;;;25779:34;;;25849:15;;25844:2;25829:18;;25822:43;25896:3;25881:19;;25874:35;;;86570:96:0;;;;;;;25633:3:1;86570:96:0;;;83148:3526;;;;;;;;83019:3655;;;;:::o;110052:1372::-;110210:10;;110335:52;;-1:-1:-1;;;110335:52:0;;110381:4;110335:52;;;5122:51:1;110136:4:0;;-1:-1:-1;;;;;110210:10:0;;;;110136:4;;110210:10;;110335:37;;5095:18:1;;110335:52:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;110398:47;;-1:-1:-1;;;110398:47:0;;110314:73;;-1:-1:-1;;;;;;110398:18:0;;;;;:47;;110417:4;;110431;;110438:6;;110398:47;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;110458:12;110512:16;110551:1;110546:153;;;;110722:2;110717:229;;;;111082:1;111079;111072:12;110546:153;-1:-1:-1;;110642:6:0;-1:-1:-1;110546:153:0;;110717:229;110820:2;110817:1;110814;110799:24;110862:1;110856:8;110845:19;;110505:598;;111132:7;111124:44;;;;-1:-1:-1;;;111124:44:0;;26122:2:1;111124:44:0;;;26104:21:1;26161:2;26141:18;;;26134:30;26200:26;26180:18;;;26173:54;26244:18;;111124:44:0;25920:348:1;111124:44:0;111266:52;;-1:-1:-1;;;111266:52:0;;111312:4;111266:52;;;5122:51:1;111246:17:0;;-1:-1:-1;;;;;111266:37:0;;;;;5095:18:1;;111266:52:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;111246:72;-1:-1:-1;111336:28:0;111351:13;111246:72;111336:28;:::i;:::-;111329:35;110052:1372;-1:-1:-1;;;;;;;;110052:1372:0:o;36233:98::-;36291:7;36318:5;36322:1;36318;:5;:::i;29889:126::-;29948:4;29972:35;29977:17;29982:1;25284:4;29977;:17::i;:::-;29996:10;;29972:4;:35::i;46447:389::-;46582:12;46603:20;46626:32;46642:15;46626;:32::i;:::-;46603:55;;46668:12;46682:19;46712:15;-1:-1:-1;;;;;46712:20:0;46740:12;:28;;46767:1;46740:28;;;46755:9;46740:28;46770:7;46712:66;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;46667:111;;;;46794:36;46814:7;46823:6;46794:19;:36::i;:::-;46787:43;46447:389;-1:-1:-1;;;;;;;46447:389:0:o;47179:335::-;47299:12;47323:20;47346:32;47362:15;47346;:32::i;:::-;47323:55;;47386:12;47400:19;47423:15;-1:-1:-1;;;;;47423:26:0;47450:7;47423:35;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;47385:73;;;;47472:36;47492:7;47501:6;47472:19;:36::i;:::-;47465:43;47179:335;-1:-1:-1;;;;;;47179:335:0:o;30500:90::-;30553:4;30577:5;30581:1;30577;:5;:::i;47520:1738::-;47654:22;;47597:12;;47618:33;47717:29;:27;:29::i;:::-;47683:63;-1:-1:-1;47753:29:0;47785:51;47683:63;47785:25;:51;:::i;:::-;47753:83;-1:-1:-1;47875:8:0;47849:41;;47845:96;;;47908:25;;-1:-1:-1;;;47908:25:0;;;;;;;;;;;47845:96;47949:20;48013:15;48007:22;47996:33;;48187:21;48178:7;48171:38;48317:15;48295:20;48291:42;48368:25;48362:4;48358:36;48440:7;48418:20;48414:34;48264:431;48468:7;48462:4;48458:18;48264:431;;;48674:11;;48663:23;;48506:16;48496:27;;;;48539:25;48264:431;;;48268:189;;;48937:23;48892;48876:14;48872:44;48823:25;48801:20;48797:52;48788:7;48784:66;48761:232;49114:55;;;;49101:69;;49183:20;49085:129;49059:15;49042:181;49105:7;47520:1738;-1:-1:-1;;;47520:1738:0:o;49858:859::-;49960:12;49989:7;49984:706;;50013:6;:13;50030:1;50013:18;50009:674;;50051:34;;-1:-1:-1;;;50051:34:0;;;;;;;;;;;50009:674;50216:20;50204:33;;50198:40;-1:-1:-1;;;50274:49:0;50346:328;;;;50530:52;;-1:-1:-1;;;50530:52:0;;50480:17;50468:30;;;50530:52;;50468:30;;50530:52;;;:::i;50346:328::-;50655:6;50620:42;;-1:-1:-1;;;50620:42:0;;;;;;;;:::i;50009:674::-;-1:-1:-1;50705:6:0;49858:859;-1:-1:-1;49858:859:0:o;49264:588::-;49325:7;49341:30;49374:36;:34;:36::i;:::-;49341:69;;49417:25;49445:61;49483:22;49445:37;:61::i;:::-;49417:89;;;-1:-1:-1;49513:48:0;31915:1;49513:48;;:::i;:::-;;;49573:24;49568:241;49622:17;49603:16;:36;49568:241;;;49670:27;49700:47;49724:22;49700:23;:47::i;:::-;49670:77;-1:-1:-1;49756:45:0;49670:77;49756:45;;:::i;:::-;;;49661:148;49641:18;;;;;:::i;:::-;;;;49568:241;;;-1:-1:-1;49824:22:0;;49264:588;-1:-1:-1;;49264:588:0:o;14:250:1:-;99:1;109:113;123:6;120:1;117:13;109:113;;;199:11;;;193:18;180:11;;;173:39;145:2;138:10;109:113;;;-1:-1:-1;;256:1:1;238:16;;231:27;14:250::o;269:271::-;311:3;349:5;343:12;376:6;371:3;364:19;392:76;461:6;454:4;449:3;445:14;438:4;431:5;427:16;392:76;:::i;:::-;522:2;501:15;-1:-1:-1;;497:29:1;488:39;;;;529:4;484:50;;269:271;-1:-1:-1;;269:271:1:o;545:220::-;694:2;683:9;676:21;657:4;714:45;755:2;744:9;740:18;732:6;714:45;:::i;770:131::-;-1:-1:-1;;;;;845:31:1;;835:42;;825:70;;891:1;888;881:12;825:70;770:131;:::o;906:315::-;974:6;982;1035:2;1023:9;1014:7;1010:23;1006:32;1003:52;;;1051:1;1048;1041:12;1003:52;1090:9;1077:23;1109:31;1134:5;1109:31;:::i;:::-;1159:5;1211:2;1196:18;;;;1183:32;;-1:-1:-1;;;906:315:1:o;1418:180::-;1477:6;1530:2;1518:9;1509:7;1505:23;1501:32;1498:52;;;1546:1;1543;1536:12;1498:52;-1:-1:-1;1569:23:1;;1418:180;-1:-1:-1;1418:180:1:o;1785:247::-;1844:6;1897:2;1885:9;1876:7;1872:23;1868:32;1865:52;;;1913:1;1910;1903:12;1865:52;1952:9;1939:23;1971:31;1996:5;1971:31;:::i;2037:127::-;2098:10;2093:3;2089:20;2086:1;2079:31;2129:4;2126:1;2119:15;2153:4;2150:1;2143:15;2169:719;2212:5;2265:3;2258:4;2250:6;2246:17;2242:27;2232:55;;2283:1;2280;2273:12;2232:55;2319:6;2306:20;2345:18;2382:2;2378;2375:10;2372:36;;;2388:18;;:::i;:::-;2463:2;2457:9;2431:2;2517:13;;-1:-1:-1;;2513:22:1;;;2537:2;2509:31;2505:40;2493:53;;;2561:18;;;2581:22;;;2558:46;2555:72;;;2607:18;;:::i;:::-;2647:10;2643:2;2636:22;2682:2;2674:6;2667:18;2728:3;2721:4;2716:2;2708:6;2704:15;2700:26;2697:35;2694:55;;;2745:1;2742;2735:12;2694:55;2809:2;2802:4;2794:6;2790:17;2783:4;2775:6;2771:17;2758:54;2856:1;2849:4;2844:2;2836:6;2832:15;2828:26;2821:37;2876:6;2867:15;;;;;;2169:719;;;;:::o;2893:156::-;2959:20;;3019:4;3008:16;;2998:27;;2988:55;;3039:1;3036;3029:12;2988:55;2893:156;;;:::o;3054:1155::-;3238:6;3246;3254;3262;3270;3278;3286;3339:3;3327:9;3318:7;3314:23;3310:33;3307:53;;;3356:1;3353;3346:12;3307:53;3395:9;3382:23;3414:31;3439:5;3414:31;:::i;:::-;3464:5;-1:-1:-1;3521:2:1;3506:18;;3493:32;3534:33;3493:32;3534:33;:::i;:::-;3586:7;-1:-1:-1;3645:2:1;3630:18;;3617:32;3658:33;3617:32;3658:33;:::i;:::-;3710:7;-1:-1:-1;3764:2:1;3749:18;;3736:32;;-1:-1:-1;3819:3:1;3804:19;;3791:33;3843:18;3873:14;;;3870:34;;;3900:1;3897;3890:12;3870:34;3923:50;3965:7;3956:6;3945:9;3941:22;3923:50;:::i;:::-;3913:60;;4026:3;4015:9;4011:19;3998:33;3982:49;;4056:2;4046:8;4043:16;4040:36;;;4072:1;4069;4062:12;4040:36;;4095:52;4139:7;4128:8;4117:9;4113:24;4095:52;:::i;:::-;4085:62;;;4166:37;4198:3;4187:9;4183:19;4166:37;:::i;:::-;4156:47;;3054:1155;;;;;;;;;;:::o;4499:456::-;4576:6;4584;4592;4645:2;4633:9;4624:7;4620:23;4616:32;4613:52;;;4661:1;4658;4651:12;4613:52;4700:9;4687:23;4719:31;4744:5;4719:31;:::i;:::-;4769:5;-1:-1:-1;4826:2:1;4811:18;;4798:32;4839:33;4798:32;4839:33;:::i;:::-;4499:456;;4891:7;;-1:-1:-1;;;4945:2:1;4930:18;;;;4917:32;;4499:456::o;6097:1013::-;6272:6;6280;6288;6296;6304;6312;6365:3;6353:9;6344:7;6340:23;6336:33;6333:53;;;6382:1;6379;6372:12;6333:53;6421:9;6408:23;6440:31;6465:5;6440:31;:::i;:::-;6490:5;-1:-1:-1;6547:2:1;6532:18;;6519:32;6560:33;6519:32;6560:33;:::i;:::-;6612:7;-1:-1:-1;6666:2:1;6651:18;;6638:32;;-1:-1:-1;6721:2:1;6706:18;;6693:32;6744:18;6774:14;;;6771:34;;;6801:1;6798;6791:12;6771:34;6824:50;6866:7;6857:6;6846:9;6842:22;6824:50;:::i;:::-;6814:60;;6927:3;6916:9;6912:19;6899:33;6883:49;;6957:2;6947:8;6944:16;6941:36;;;6973:1;6970;6963:12;6941:36;;6996:52;7040:7;7029:8;7018:9;7014:24;6996:52;:::i;:::-;6986:62;;;7067:37;7099:3;7088:9;7084:19;7067:37;:::i;:::-;7057:47;;6097:1013;;;;;;;;:::o;7771:388::-;7839:6;7847;7900:2;7888:9;7879:7;7875:23;7871:32;7868:52;;;7916:1;7913;7906:12;7868:52;7955:9;7942:23;7974:31;7999:5;7974:31;:::i;:::-;8024:5;-1:-1:-1;8081:2:1;8066:18;;8053:32;8094:33;8053:32;8094:33;:::i;:::-;8146:7;8136:17;;;7771:388;;;;;:::o;8674:479::-;8774:6;8782;8790;8843:2;8831:9;8822:7;8818:23;8814:32;8811:52;;;8859:1;8856;8849:12;8811:52;8898:9;8885:23;8917:31;8942:5;8917:31;:::i;:::-;8967:5;-1:-1:-1;9019:2:1;9004:18;;8991:32;;-1:-1:-1;9075:2:1;9060:18;;9047:32;9088:33;9047:32;9088:33;:::i;:::-;9140:7;9130:17;;;8674:479;;;;;:::o;9158:380::-;9237:1;9233:12;;;;9280;;;9301:61;;9355:4;9347:6;9343:17;9333:27;;9301:61;9408:2;9400:6;9397:14;9377:18;9374:38;9371:161;;9454:10;9449:3;9445:20;9442:1;9435:31;9489:4;9486:1;9479:15;9517:4;9514:1;9507:15;9543:334;9745:2;9727:21;;;9784:2;9764:18;;;9757:30;-1:-1:-1;;;9818:2:1;9803:18;;9796:40;9868:2;9853:18;;9543:334::o;9882:184::-;9952:6;10005:2;9993:9;9984:7;9980:23;9976:32;9973:52;;;10021:1;10018;10011:12;9973:52;-1:-1:-1;10044:16:1;;9882:184;-1:-1:-1;9882:184:1:o;11193:277::-;11260:6;11313:2;11301:9;11292:7;11288:23;11284:32;11281:52;;;11329:1;11326;11319:12;11281:52;11361:9;11355:16;11414:5;11407:13;11400:21;11393:5;11390:32;11380:60;;11436:1;11433;11426:12;12197:127;12258:10;12253:3;12249:20;12246:1;12239:31;12289:4;12286:1;12279:15;12313:4;12310:1;12303:15;12329:125;12394:9;;;12415:10;;;12412:36;;;12428:18;;:::i;12459:128::-;12526:9;;;12547:11;;;12544:37;;;12561:18;;:::i;12592:135::-;12631:3;12652:17;;;12649:43;;12672:18;;:::i;:::-;-1:-1:-1;12719:1:1;12708:13;;12592:135::o;15256:545::-;15358:2;15353:3;15350:11;15347:448;;;15394:1;15419:5;15415:2;15408:17;15464:4;15460:2;15450:19;15534:2;15522:10;15518:19;15515:1;15511:27;15505:4;15501:38;15570:4;15558:10;15555:20;15552:47;;;-1:-1:-1;15593:4:1;15552:47;15648:2;15643:3;15639:12;15636:1;15632:20;15626:4;15622:31;15612:41;;15703:82;15721:2;15714:5;15711:13;15703:82;;;15766:17;;;15747:1;15736:13;15703:82;;15347:448;15256:545;;;:::o;15977:1352::-;16103:3;16097:10;16130:18;16122:6;16119:30;16116:56;;;16152:18;;:::i;:::-;16181:97;16271:6;16231:38;16263:4;16257:11;16231:38;:::i;:::-;16225:4;16181:97;:::i;:::-;16333:4;;16397:2;16386:14;;16414:1;16409:663;;;;17116:1;17133:6;17130:89;;;-1:-1:-1;17185:19:1;;;17179:26;17130:89;-1:-1:-1;;15934:1:1;15930:11;;;15926:24;15922:29;15912:40;15958:1;15954:11;;;15909:57;17232:81;;16379:944;;16409:663;15203:1;15196:14;;;15240:4;15227:18;;-1:-1:-1;;16445:20:1;;;16563:236;16577:7;16574:1;16571:14;16563:236;;;16666:19;;;16660:26;16645:42;;16758:27;;;;16726:1;16714:14;;;;16593:19;;16563:236;;;16567:3;16827:6;16818:7;16815:19;16812:201;;;16888:19;;;16882:26;-1:-1:-1;;16971:1:1;16967:14;;;16983:3;16963:24;16959:37;16955:42;16940:58;16925:74;;16812:201;-1:-1:-1;;;;;17059:1:1;17043:14;;;17039:22;17026:36;;-1:-1:-1;15977:1352:1:o;18332:168::-;18405:9;;;18436;;18453:15;;;18447:22;;18433:37;18423:71;;18474:18;;:::i;18505:217::-;18545:1;18571;18561:132;;18615:10;18610:3;18606:20;18603:1;18596:31;18650:4;18647:1;18640:15;18678:4;18675:1;18668:15;18561:132;-1:-1:-1;18707:9:1;;18505:217::o;19188:353::-;-1:-1:-1;;;;;19416:32:1;;;;19398:51;;19480:2;19465:18;;19458:34;;;;19523:2;19508:18;;19501:34;19386:2;19371:18;;19188:353::o;22349:391::-;-1:-1:-1;;;;;22623:15:1;;;22605:34;;22675:15;;;;22670:2;22655:18;;22648:43;22722:2;22707:18;;22700:34;;;;22555:2;22540:18;;22349:391::o;24015:245::-;24094:6;24102;24155:2;24143:9;24134:7;24130:23;24126:32;24123:52;;;24171:1;24168;24161:12;24123:52;-1:-1:-1;;24194:16:1;;24250:2;24235:18;;;24229:25;24194:16;;24229:25;;-1:-1:-1;24015:245:1:o;26273:287::-;26402:3;26440:6;26434:13;26456:66;26515:6;26510:3;26503:4;26495:6;26491:17;26456:66;:::i;:::-;26538:16;;;;;26273:287;-1:-1:-1;;26273:287:1:o
Swarm Source
ipfs://d023ef85bf9889fc4e666fa7b8a0c7b16f103318fd10e0bacd3d5a0767aff1cd
Loading...
Loading
Loading...
Loading
Loading...
Loading
Net Worth in USD
$68.89
Net Worth in ETH
Token Allocations
WSTETH
100.00%
Multichain Portfolio | 35 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|---|---|---|---|---|
| SCROLL | 100.00% | $2,807.82 | 0.0245 | $68.89 |
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.