Transactions
Token Transfers
Internal Transactions
Coin Balance History
Logs
Code
Read Contract
Read Proxy
Write Contract
Write Proxy
Warning! Contract bytecode has been changed and doesn't match the verified one. Therefore, interaction with this smart contract may be risky.
- Contract name:
- CNativeDelegator
- Optimization enabled
- true
- Compiler version
- v0.5.17+commit.d19bba13
- Optimization runs
- 200
- EVM Version
- istanbul
- Verified at
- 2023-11-20T16:09:19.879292Z
Constructor Arguments
0x0000000000000000000000003a4ec955a18ef6eb33025599505e7d404a4d59ec0000000000000000000000005f887f27b489fb02212da6059220fa735e60d47a000000000000000000000000000000000000000000a56fa5b99019a5c8000000000000000000000000000000000000000000000000000000000000000000012000000000000000000000000000000000000000000000000000000000000001600000000000000000000000000000000000000000000000000000000000000008000000000000000000000000f4efdf1e9b0badfd2dfa8a22937d4458152bc90900000000000000000000000039c18a98d1d5e432a9f7469009f65f1da0c706b400000000000000000000000000000000000000000000000000000000000001a0000000000000000000000000000000000000000000000000000000000000000c4c656e64696e67204b41564100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005684b41564100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000
Arg [0] (address) : 0x3a4ec955a18ef6eb33025599505e7d404a4d59ec
Arg [1] (address) : 0x5f887f27b489fb02212da6059220fa735e60d47a
Arg [2] (uint256) : 200000000000000000000000000
Arg [3] (string) : Lending KAVA
Arg [4] (string) : hKAVA
Arg [5] (uint8) : 8
Arg [6] (address) : 0xf4efdf1e9b0badfd2dfa8a22937d4458152bc909
Arg [7] (address) : 0x39c18a98d1d5e432a9f7469009f65f1da0c706b4
Arg [8] (bytes) : 00
Contract source code
/** *Submitted for verification at escan.live on 2023-06-20 */ // Sources flattened with hardhat v2.14.0 https://hardhat.org // File contracts/ComptrollerInterface.sol pragma solidity 0.5.17; 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) external returns (uint[] memory); function exitMarket(address cToken) external returns (uint); /*** Policy Hooks ***/ function mintAllowed(address qiToken, address minter, uint mintAmount) external returns (uint); function redeemAllowed(address cToken, address redeemer, uint redeemTokens) external returns (uint); function redeemVerify(address cToken, address redeemer, uint redeemAmount, uint redeemTokens) external; function borrowAllowed(address qiToken, address borrower, uint borrowAmount) external returns (uint); function repayBorrowAllowed( address cToken, address payer, address borrower, uint repayAmount) external returns (uint); function liquidateBorrowAllowed( address cTokenBorrowed, address cTokenCollateral, address liquidator, address borrower, uint repayAmount) external returns (uint); function seizeAllowed( address cTokenCollateral, address cTokenBorrowed, address liquidator, address borrower, uint seizeTokens) external returns (uint); function transferAllowed(address qiToken, address src, address dst, uint transferTokens) external returns (uint); /*** Liquidity/Liquidation Calculations ***/ function liquidateCalculateSeizeTokens( address cTokenBorrowed, address cTokenCollateral, uint repayAmount) external view returns (uint, uint); } // File contracts/EIP20NonStandardInterface.sol pragma solidity 0.5.17; /** * @title EIP20NonStandardInterface * @dev Version of ERC20 with no return values for `transfer` and `transferFrom` * See https://medium.com/coinmonks/missing-return-value-bug-at-least-130-tokens-affected-d67bf08521ca */ interface EIP20NonStandardInterface { /** * @notice Get the total number of tokens in circulation * @return The supply of tokens */ function totalSupply() external view returns (uint256); /** * @notice Gets the balance of the specified address * @param owner The address from which the balance will be retrieved * @return The balance */ function balanceOf(address owner) external view returns (uint256 balance); /// /// !!!!!!!!!!!!!! /// !!! NOTICE !!! `transfer` does not return a value, in violation of the ERC-20 specification /// !!!!!!!!!!!!!! /// /** * @notice Transfer `amount` tokens from `msg.sender` to `dst` * @param dst The address of the destination account * @param amount The number of tokens to transfer */ function transfer(address dst, uint256 amount) external; /// /// !!!!!!!!!!!!!! /// !!! NOTICE !!! `transferFrom` does not return a value, in violation of the ERC-20 specification /// !!!!!!!!!!!!!! /// /** * @notice Transfer `amount` tokens from `src` to `dst` * @param src The address of the source account * @param dst The address of the destination account * @param amount The number of tokens to transfer */ function transferFrom(address src, address dst, uint256 amount) external; /** * @notice Approve `spender` to transfer up to `amount` from `src` * @dev This will overwrite the approval amount for `spender` * and is subject to issues noted [here](https://eips.ethereum.org/EIPS/eip-20#approve) * @param spender The address of the account which may transfer tokens * @param amount The number of tokens that are approved * @return Whether or not the approval succeeded */ function approve(address spender, uint256 amount) external returns (bool success); /** * @notice Get the current allowance from `owner` for `spender` * @param owner The address of the account which owns the tokens to be spent * @param spender The address of the account which may transfer tokens * @return The number of tokens allowed to be spent */ function allowance(address owner, address spender) external view returns (uint256 remaining); event Transfer(address indexed from, address indexed to, uint256 amount); event Approval(address indexed owner, address indexed spender, uint256 amount); } // File contracts/InterestRateModel.sol pragma solidity 0.5.17; /** * @title Protocol's InterestRateModel Interface * @author RBL */ 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 timestmp * @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 timestmp (as a percentage, and scaled by 1e18) */ function getBorrowRate(uint cash, uint borrows, uint reserves) external view returns (uint); /** * @notice Calculates the current supply interest rate per timestmp * @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 timestmp (as a percentage, and scaled by 1e18) */ function getSupplyRate(uint cash, uint borrows, uint reserves, uint reserveFactorMantissa) external view returns (uint); } // File contracts/CTokenInterfaces.sol pragma solidity 0.5.17; 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; /** * @notice Maximum borrow rate that can ever be applied (.0005% / block) */ uint internal constant borrowRateMaxMantissa = 0.0005e16; /** * @notice Maximum fraction of interest that can be set aside for reserves */ uint internal constant reserveFactorMaxMantissa = 1e18; /** * @notice Administrator for this contract */ address payable public admin; /** * @notice Pending administrator for this contract */ address payable public pendingAdmin; /** * @notice Contract which oversees inter-cToken operations */ ComptrollerInterface public comptroller; /** * @notice Model which tells what the current interest rate should be */ InterestRateModel public interestRateModel; /** * @notice 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 accrualBlockTimestamp; /** * @notice Accumulator of the total earned interest rate since the opening of the market */ uint public borrowIndex; /** * @notice Total amount of outstanding borrows of the underlying in this market */ uint public totalBorrows; /** * @notice Total amount of reserves of the underlying held in this market */ uint public totalReserves; /** * @notice Total number of tokens in circulation */ uint public totalSupply; /** * @notice Official record of token balances for each account */ mapping (address => uint) internal accountTokens; /** * @notice Approved token transfer amounts on behalf of others */ mapping (address => mapping (address => uint)) internal transferAllowances; /** * @notice Container for borrow balance information * @member principal Total balance (with accrued interest), after applying the most recent balance-changing action * @member interestIndex Global borrowIndex as of the most recent balance-changing action */ struct BorrowSnapshot { uint principal; uint interestIndex; } /** * @notice Mapping of account addresses to outstanding borrow balances */ mapping(address => BorrowSnapshot) internal accountBorrows; /** * @notice Share of seized collateral that is added to reserves */ uint public protocolSeizeShareMantissa; } 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 protocol seize share is changed */ event NewProtocolSeizeShare(uint oldProtocolSeizeShareMantissa, uint newProtocolSeizeShareMantissa); /** * @notice Event emitted when the reserves are added */ event ReservesAdded(address benefactor, uint addAmount, uint newTotalReserves); /** * @notice Event emitted when the reserves are reduced */ event ReservesReduced(address admin, uint reduceAmount, uint newTotalReserves); /** * @notice EIP20 Transfer event */ event Transfer(address indexed from, address indexed to, uint amount); /** * @notice EIP20 Approval event */ event Approval(address indexed owner, address indexed spender, uint amount); /** * @notice Failure event */ event Failure(uint error, uint info, uint detail); /*** User Interface ***/ function transfer(address dst, uint amount) external returns (bool); function transferFrom(address src, address dst, uint amount) external returns (bool); function approve(address spender, uint amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint); function balanceOf(address owner) external view returns (uint); function balanceOfUnderlying(address owner) external returns (uint); function getAccountSnapshot(address account) external view returns (uint, uint, uint, uint); function borrowRatePerTimestamp() external view returns (uint); function supplyRatePerTimestamp() external view returns (uint); function totalBorrowsCurrent() external returns (uint); function borrowBalanceCurrent(address account) external returns (uint); function borrowBalanceStored(address account) public view returns (uint); function exchangeRateCurrent() public returns (uint); function exchangeRateStored() public view returns (uint); function getCash() external view returns (uint); function accrueInterest() public returns (uint); function seize(address liquidator, address borrower, uint seizeTokens) external returns (uint); /*** Admin Functions ***/ function _setPendingAdmin(address payable newPendingAdmin) external returns (uint); function _acceptAdmin() external returns (uint); function _setComptroller(ComptrollerInterface newComptroller) public returns (uint); function _setReserveFactor(uint newReserveFactorMantissa) external returns (uint); function _reduceReserves(uint reduceAmount) external returns (uint); function _setInterestRateModel(InterestRateModel newInterestRateModel) public returns (uint); function _setProtocolSeizeShare(uint newProtocolSeizeShareMantissa) external returns (uint); } contract CErc20Storage { /** * @notice Underlying asset for this CToken */ address public underlying; } contract CErc20Interface is CErc20Storage { /*** User Interface ***/ function mint(uint mintAmount) external returns (uint); function redeem(uint redeemTokens) external returns (uint); function redeemUnderlying(uint redeemAmount) external returns (uint); function borrow(uint borrowAmount) external returns (uint); function repayBorrow(uint repayAmount) external returns (uint); function repayBorrowBehalf(address borrower, uint repayAmount) external returns (uint); function liquidateBorrow(address borrower, uint repayAmount, CTokenInterface cTokenCollateral) external returns (uint); function sweepToken(EIP20NonStandardInterface token) external; /*** Admin Functions ***/ function _addReserves(uint addAmount) external returns (uint); } contract CNativeInterface { /*** User Interface ***/ function mint() external payable; function redeem(uint redeemTokens) external returns (uint); function redeemUnderlying(uint redeemAmount) external returns (uint); function borrow(uint borrowAmount) external returns (uint); function repayBorrow() external payable; function repayBorrowBehalf(address borrower) external payable; function liquidateBorrow(address borrower, CTokenInterface cTokenCollateral) external payable; function () external payable; /*** Admin Functions ***/ function _addReserves() external payable returns (uint); } contract ProtocolTokenDelegationStorage { /** * @notice Implementation address for this contract */ address public implementation; } contract ProtocolTokenDelegatorInterface is ProtocolTokenDelegationStorage { /** * @notice Emitted when implementation is changed */ event NewImplementation(address oldImplementation, address newImplementation); /** * @notice Called by the admin to update the implementation of the delegator * @param implementation_ The address of the new implementation for delegation * @param allowResign Flag to indicate whether to call _resignImplementation on the old implementation * @param becomeImplementationData The encoded bytes data to be passed to _becomeImplementation */ function _setImplementation(address implementation_, bool allowResign, bytes memory becomeImplementationData) public; } contract ProtocolTokenDelegateInterface is ProtocolTokenDelegationStorage { /** * @notice Called by the delegator on a delegate to initialize it for duty * @dev Should revert if any issues arise which make it unfit for delegation * @param data The encoded bytes data for any initialization */ function _becomeImplementation(bytes memory data) public; /** * @notice Called by the delegator on a delegate to forfeit its responsibility */ function _resignImplementation() public; } // File contracts/CNativeDelegator.sol pragma solidity 0.5.17; /** * @title Protocol's CNativeDelegator Contract * @notice CTokens which wrap the native token and delegate to an implementation * @author RBL */ contract CNativeDelegator is CTokenInterface, CNativeInterface, ProtocolTokenDelegatorInterface { /** * @notice Construct a new 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_ ERC-20 name of this token * @param symbol_ ERC-20 symbol of this token * @param decimals_ ERC-20 decimal precision of this token * @param admin_ Address of the administrator of this token * @param implementation_ The address of the implementation the contract delegates to * @param becomeImplementationData The encoded args for becomeImplementation */ constructor(ComptrollerInterface comptroller_, InterestRateModel interestRateModel_, uint initialExchangeRateMantissa_, string memory name_, string memory symbol_, uint8 decimals_, address payable admin_, address implementation_, bytes memory becomeImplementationData) public { // Creator of the contract is admin during initialization admin = msg.sender; // First delegate gets to initialize the delegator (i.e. storage contract) delegateTo(implementation_, abi.encodeWithSignature("initialize(address,address,uint256,string,string,uint8)", comptroller_, interestRateModel_, initialExchangeRateMantissa_, name_, symbol_, decimals_)); // New implementations always get set via the settor (post-initialize) _setImplementation(implementation_, false, becomeImplementationData); // Set the proper admin now that initialization is done admin = admin_; } /** * @notice Called by the admin to update the implementation of the delegator * @param implementation_ The address of the new implementation for delegation * @param allowResign Flag to indicate whether to call _resignImplementation on the old implementation * @param becomeImplementationData The encoded bytes data to be passed to _becomeImplementation */ function _setImplementation(address implementation_, bool allowResign, bytes memory becomeImplementationData) public { require(msg.sender == admin, "CNativeDelegator::_setImplementation: Caller must be admin"); if (allowResign) { delegateToImplementation(abi.encodeWithSignature("_resignImplementation()")); } address oldImplementation = implementation; implementation = implementation_; delegateToImplementation(abi.encodeWithSignature("_becomeImplementation(bytes)", becomeImplementationData)); emit NewImplementation(oldImplementation, implementation); } /** * @notice Sender supplies assets into the market and receives cTokens in exchange * @dev Reverts upon any failure */ function mint() external payable { delegateToImplementation(abi.encodeWithSignature("mint()")); } /** * @notice Sender redeems cTokens in exchange for the underlying asset * @dev Accrues interest whether or not the operation succeeds, unless reverted * @param redeemTokens The number of cTokens to redeem into underlying * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details) */ function redeem(uint redeemTokens) external returns (uint) { bytes memory data = delegateToImplementation(abi.encodeWithSignature("redeem(uint256)", redeemTokens)); return abi.decode(data, (uint)); } /** * @notice Sender redeems cTokens in exchange for a specified amount of underlying asset * @dev Accrues interest whether or not the operation succeeds, unless reverted * @param redeemAmount The amount of underlying to redeem * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details) */ function redeemUnderlying(uint redeemAmount) external returns (uint) { bytes memory data = delegateToImplementation(abi.encodeWithSignature("redeemUnderlying(uint256)", redeemAmount)); return abi.decode(data, (uint)); } /** * @notice Sender borrows assets from the protocol to their own address * @param borrowAmount The amount of the underlying asset to borrow * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details) */ function borrow(uint borrowAmount) external returns (uint) { bytes memory data = delegateToImplementation(abi.encodeWithSignature("borrow(uint256)", borrowAmount)); return abi.decode(data, (uint)); } /** * @notice Sender repays their own borrow * @dev Reverts upon any failure */ function repayBorrow() external payable { delegateToImplementation(abi.encodeWithSignature("repayBorrow()")); } /** * @notice Sender repays a borrow belonging to borrower * @dev Reverts upon any failure * @param borrower the account with the debt being payed off */ function repayBorrowBehalf(address borrower) external payable { delegateToImplementation(abi.encodeWithSignature("repayBorrowBehalf(address)", borrower)); } /** * @notice The sender liquidates the borrowers collateral. * The collateral seized is transferred to the liquidator. * @dev Reverts upon any failure * @param borrower The borrower of this cToken to be liquidated * @param cTokenCollateral The market in which to seize collateral from the borrower */ function liquidateBorrow(address borrower, CTokenInterface cTokenCollateral) external payable { delegateToImplementation(abi.encodeWithSignature("liquidateBorrow(address,address)", borrower, cTokenCollateral)); } /** * @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, uint amount) external returns (bool) { bytes memory data = delegateToImplementation(abi.encodeWithSignature("transfer(address,uint256)", dst, amount)); return abi.decode(data, (bool)); } /** * @notice Transfer `amount` tokens from `src` to `dst` * @param src The address of the source account * @param dst The address of the destination account * @param amount The number of tokens to transfer * @return Whether or not the transfer succeeded */ function transferFrom(address src, address dst, uint256 amount) external returns (bool) { bytes memory data = delegateToImplementation(abi.encodeWithSignature("transferFrom(address,address,uint256)", src, dst, amount)); return abi.decode(data, (bool)); } /** * @notice Approve `spender` to transfer up to `amount` from `src` * @dev This will overwrite the approval amount for `spender` * and is subject to issues noted [here](https://eips.ethereum.org/EIPS/eip-20#approve) * @param spender The address of the account which may transfer tokens * @param amount The number of tokens that are approved (-1 means infinite) * @return Whether or not the approval succeeded */ function approve(address spender, uint256 amount) external returns (bool) { bytes memory data = delegateToImplementation(abi.encodeWithSignature("approve(address,uint256)", spender, amount)); return abi.decode(data, (bool)); } /** * @notice Get the current allowance from `owner` for `spender` * @param owner The address of the account which owns the tokens to be spent * @param spender The address of the account which may transfer tokens * @return The number of tokens allowed to be spent (-1 means infinite) */ function allowance(address owner, address spender) external view returns (uint) { bytes memory data = delegateToViewImplementation(abi.encodeWithSignature("allowance(address,address)", owner, spender)); return abi.decode(data, (uint)); } /** * @notice Get the token balance of the `owner` * @param owner The address of the account to query * @return The number of tokens owned by `owner` */ function balanceOf(address owner) external view returns (uint) { bytes memory data = delegateToViewImplementation(abi.encodeWithSignature("balanceOf(address)", owner)); return abi.decode(data, (uint)); } /** * @notice Get the underlying balance of the `owner` * @dev This also accrues interest in a transaction * @param owner The address of the account to query * @return The amount of underlying owned by `owner` */ function balanceOfUnderlying(address owner) external returns (uint) { bytes memory data = delegateToImplementation(abi.encodeWithSignature("balanceOfUnderlying(address)", owner)); return abi.decode(data, (uint)); } /** * @notice Get a snapshot of the account's balances, and the cached exchange rate * @dev This is used by comptroller to more efficiently perform liquidity checks. * @param account Address of the account to snapshot * @return (possible error, token balance, borrow balance, exchange rate mantissa) */ function getAccountSnapshot(address account) external view returns (uint, uint, uint, uint) { bytes memory data = delegateToViewImplementation(abi.encodeWithSignature("getAccountSnapshot(address)", account)); return abi.decode(data, (uint, uint, uint, uint)); } /** * @notice Returns the current per-timestamp borrow interest rate for this cToken * @return The borrow interest rate per timestmp, scaled by 1e18 */ function borrowRatePerTimestamp() external view returns (uint) { bytes memory data = delegateToViewImplementation(abi.encodeWithSignature("borrowRatePerTimestamp()")); return abi.decode(data, (uint)); } /** * @notice Returns the current per-timestamp supply interest rate for this cToken * @return The supply interest rate per timestmp, scaled by 1e18 */ function supplyRatePerTimestamp() external view returns (uint) { bytes memory data = delegateToViewImplementation(abi.encodeWithSignature("supplyRatePerTimestamp()")); return abi.decode(data, (uint)); } /** * @notice Returns the current total borrows plus accrued interest * @return The total borrows with interest */ function totalBorrowsCurrent() external returns (uint) { bytes memory data = delegateToImplementation(abi.encodeWithSignature("totalBorrowsCurrent()")); return abi.decode(data, (uint)); } /** * @notice Accrue interest to updated borrowIndex and then calculate account's borrow balance using the updated borrowIndex * @param account The address whose balance should be calculated after updating borrowIndex * @return The calculated balance */ function borrowBalanceCurrent(address account) external returns (uint) { bytes memory data = delegateToImplementation(abi.encodeWithSignature("borrowBalanceCurrent(address)", account)); return abi.decode(data, (uint)); } /** * @notice Return the borrow balance of account based on stored data * @param account The address whose balance should be calculated * @return The calculated balance */ function borrowBalanceStored(address account) public view returns (uint) { bytes memory data = delegateToViewImplementation(abi.encodeWithSignature("borrowBalanceStored(address)", account)); return abi.decode(data, (uint)); } /** * @notice Accrue interest then return the up-to-date exchange rate * @return Calculated exchange rate scaled by 1e18 */ function exchangeRateCurrent() public returns (uint) { bytes memory data = delegateToImplementation(abi.encodeWithSignature("exchangeRateCurrent()")); return abi.decode(data, (uint)); } /** * @notice Calculates the exchange rate from the underlying to the CToken * @dev This function does not accrue interest before calculating the exchange rate * @return Calculated exchange rate scaled by 1e18 */ function exchangeRateStored() public view returns (uint) { bytes memory data = delegateToViewImplementation(abi.encodeWithSignature("exchangeRateStored()")); return abi.decode(data, (uint)); } /** * @notice Get cash balance of this cToken in the underlying asset * @return The quantity of underlying asset owned by this contract */ function getCash() external view returns (uint) { bytes memory data = delegateToViewImplementation(abi.encodeWithSignature("getCash()")); return abi.decode(data, (uint)); } /** * @notice Applies accrued interest to total borrows and reserves. * @dev This calculates interest accrued from the last checkpointed block * up to the current block and writes new checkpoint to storage. */ function accrueInterest() public returns (uint) { bytes memory data = delegateToImplementation(abi.encodeWithSignature("accrueInterest()")); return abi.decode(data, (uint)); } /** * @notice Transfers collateral tokens (this market) to the liquidator. * @dev Will fail unless called by another cToken during the process of liquidation. * Its absolutely critical to use msg.sender as the borrowed cToken and not a parameter. * @param liquidator The account receiving seized collateral * @param borrower The account having collateral seized * @param seizeTokens The number of cTokens to seize * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details) */ function seize(address liquidator, address borrower, uint seizeTokens) external returns (uint) { bytes memory data = delegateToImplementation(abi.encodeWithSignature("seize(address,address,uint256)", liquidator, borrower, seizeTokens)); return abi.decode(data, (uint)); } /*** Admin Functions ***/ /** * @notice Begins transfer of admin rights. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer. * @dev Admin function to begin change of admin. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer. * @param newPendingAdmin New pending admin. * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details) */ function _setPendingAdmin(address payable newPendingAdmin) external returns (uint) { bytes memory data = delegateToImplementation(abi.encodeWithSignature("_setPendingAdmin(address)", newPendingAdmin)); return abi.decode(data, (uint)); } /** * @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) public returns (uint) { bytes memory data = delegateToImplementation(abi.encodeWithSignature("_setComptroller(address)", newComptroller)); return abi.decode(data, (uint)); } /** * @notice accrues interest and sets a new reserve factor for the protocol using _setReserveFactorFresh * @dev Admin function to accrue interest and set a new reserve factor * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details) */ function _setReserveFactor(uint newReserveFactorMantissa) external returns (uint) { bytes memory data = delegateToImplementation(abi.encodeWithSignature("_setReserveFactor(uint256)", newReserveFactorMantissa)); return abi.decode(data, (uint)); } /** * @notice Accepts transfer of admin rights. msg.sender must be pendingAdmin * @dev Admin function for pending admin to accept role and update admin * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details) */ function _acceptAdmin() external returns (uint) { bytes memory data = delegateToImplementation(abi.encodeWithSignature("_acceptAdmin()")); return abi.decode(data, (uint)); } /** * @notice The sender adds to reserves. * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details) */ function _addReserves() external payable returns (uint) { bytes memory data = delegateToImplementation(abi.encodeWithSignature("_addReserves()")); return abi.decode(data, (uint)); } /** * @notice Accrues interest and reduces reserves by transferring to admin * @param reduceAmount Amount of reduction to reserves * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details) */ function _reduceReserves(uint reduceAmount) external returns (uint) { bytes memory data = delegateToImplementation(abi.encodeWithSignature("_reduceReserves(uint256)", reduceAmount)); return abi.decode(data, (uint)); } /** * @notice Accrues interest and updates the interest rate model using _setInterestRateModelFresh * @dev Admin function to accrue interest and update the interest rate model * @param newInterestRateModel the new interest rate model to use * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details) */ function _setInterestRateModel(InterestRateModel newInterestRateModel) public returns (uint) { bytes memory data = delegateToImplementation(abi.encodeWithSignature("_setInterestRateModel(address)", newInterestRateModel)); return abi.decode(data, (uint)); } /** * @notice accrues interest and sets a new protocol seize share for the protocol using _setProtocolSeizeShareFresh * @dev Admin function to accrue interest and set a new protocol seize share * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details) */ function _setProtocolSeizeShare(uint newProtocolSeizeShareMantissa) external returns (uint) { bytes memory data = delegateToImplementation(abi.encodeWithSignature("_setProtocolSeizeShare(uint256)", newProtocolSeizeShareMantissa)); return abi.decode(data, (uint)); } /** * @notice Internal method to delegate execution to another contract * @dev It returns to the external caller whatever the implementation returns or forwards reverts * @param callee The contract to delegatecall * @param data The raw data to delegatecall * @return The returned bytes from the delegatecall */ function delegateTo(address callee, bytes memory data) internal returns (bytes memory) { (bool success, bytes memory returnData) = callee.delegatecall(data); assembly { if eq(success, 0) { revert(add(returnData, 0x20), returndatasize) } } return returnData; } /** * @notice Delegates execution to the implementation contract * @dev It returns to the external caller whatever the implementation returns or forwards reverts * @param data The raw data to delegatecall * @return The returned bytes from the delegatecall */ function delegateToImplementation(bytes memory data) public returns (bytes memory) { return delegateTo(implementation, data); } /** * @notice Delegates execution to an implementation contract * @dev It returns to the external caller whatever the implementation returns or forwards reverts * There are an additional 2 prefix uints from the wrapper returndata, which we ignore since we make an extra hop. * @param data The raw data to delegatecall * @return The returned bytes from the delegatecall */ function delegateToViewImplementation(bytes memory data) public view returns (bytes memory) { (bool success, bytes memory returnData) = address(this).staticcall(abi.encodeWithSignature("delegateToImplementation(bytes)", data)); assembly { if eq(success, 0) { revert(add(returnData, 0x20), returndatasize) } } return abi.decode(returnData, (bytes)); } /** * @notice Delegates execution to an implementation contract * @dev It returns to the external caller whatever the implementation returns or forwards reverts */ function () external payable { // delegate all other functions to current implementation (bool success, ) = implementation.delegatecall(msg.data); assembly { let free_mem_ptr := mload(0x40) returndatacopy(free_mem_ptr, 0, returndatasize) switch success case 0 { revert(free_mem_ptr, returndatasize) } default { return(free_mem_ptr, returndatasize) } } } }
Contract ABI
[{"type":"constructor","stateMutability":"nonpayable","payable":false,"inputs":[{"type":"address","name":"comptroller_","internalType":"contract ComptrollerInterface"},{"type":"address","name":"interestRateModel_","internalType":"contract InterestRateModel"},{"type":"uint256","name":"initialExchangeRateMantissa_","internalType":"uint256"},{"type":"string","name":"name_","internalType":"string"},{"type":"string","name":"symbol_","internalType":"string"},{"type":"uint8","name":"decimals_","internalType":"uint8"},{"type":"address","name":"admin_","internalType":"address payable"},{"type":"address","name":"implementation_","internalType":"address"},{"type":"bytes","name":"becomeImplementationData","internalType":"bytes"}]},{"type":"event","name":"AccrueInterest","inputs":[{"type":"uint256","name":"cashPrior","internalType":"uint256","indexed":false},{"type":"uint256","name":"interestAccumulated","internalType":"uint256","indexed":false},{"type":"uint256","name":"borrowIndex","internalType":"uint256","indexed":false},{"type":"uint256","name":"totalBorrows","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"Approval","inputs":[{"type":"address","name":"owner","internalType":"address","indexed":true},{"type":"address","name":"spender","internalType":"address","indexed":true},{"type":"uint256","name":"amount","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"Borrow","inputs":[{"type":"address","name":"borrower","internalType":"address","indexed":false},{"type":"uint256","name":"borrowAmount","internalType":"uint256","indexed":false},{"type":"uint256","name":"accountBorrows","internalType":"uint256","indexed":false},{"type":"uint256","name":"totalBorrows","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"Failure","inputs":[{"type":"uint256","name":"error","internalType":"uint256","indexed":false},{"type":"uint256","name":"info","internalType":"uint256","indexed":false},{"type":"uint256","name":"detail","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"LiquidateBorrow","inputs":[{"type":"address","name":"liquidator","internalType":"address","indexed":false},{"type":"address","name":"borrower","internalType":"address","indexed":false},{"type":"uint256","name":"repayAmount","internalType":"uint256","indexed":false},{"type":"address","name":"cTokenCollateral","internalType":"address","indexed":false},{"type":"uint256","name":"seizeTokens","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"Mint","inputs":[{"type":"address","name":"minter","internalType":"address","indexed":false},{"type":"uint256","name":"mintAmount","internalType":"uint256","indexed":false},{"type":"uint256","name":"mintTokens","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"NewAdmin","inputs":[{"type":"address","name":"oldAdmin","internalType":"address","indexed":false},{"type":"address","name":"newAdmin","internalType":"address","indexed":false}],"anonymous":false},{"type":"event","name":"NewComptroller","inputs":[{"type":"address","name":"oldComptroller","internalType":"contract ComptrollerInterface","indexed":false},{"type":"address","name":"newComptroller","internalType":"contract ComptrollerInterface","indexed":false}],"anonymous":false},{"type":"event","name":"NewImplementation","inputs":[{"type":"address","name":"oldImplementation","internalType":"address","indexed":false},{"type":"address","name":"newImplementation","internalType":"address","indexed":false}],"anonymous":false},{"type":"event","name":"NewMarketInterestRateModel","inputs":[{"type":"address","name":"oldInterestRateModel","internalType":"contract InterestRateModel","indexed":false},{"type":"address","name":"newInterestRateModel","internalType":"contract InterestRateModel","indexed":false}],"anonymous":false},{"type":"event","name":"NewPendingAdmin","inputs":[{"type":"address","name":"oldPendingAdmin","internalType":"address","indexed":false},{"type":"address","name":"newPendingAdmin","internalType":"address","indexed":false}],"anonymous":false},{"type":"event","name":"NewProtocolSeizeShare","inputs":[{"type":"uint256","name":"oldProtocolSeizeShareMantissa","internalType":"uint256","indexed":false},{"type":"uint256","name":"newProtocolSeizeShareMantissa","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"NewReserveFactor","inputs":[{"type":"uint256","name":"oldReserveFactorMantissa","internalType":"uint256","indexed":false},{"type":"uint256","name":"newReserveFactorMantissa","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"Redeem","inputs":[{"type":"address","name":"redeemer","internalType":"address","indexed":false},{"type":"uint256","name":"redeemAmount","internalType":"uint256","indexed":false},{"type":"uint256","name":"redeemTokens","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"RepayBorrow","inputs":[{"type":"address","name":"payer","internalType":"address","indexed":false},{"type":"address","name":"borrower","internalType":"address","indexed":false},{"type":"uint256","name":"repayAmount","internalType":"uint256","indexed":false},{"type":"uint256","name":"accountBorrows","internalType":"uint256","indexed":false},{"type":"uint256","name":"totalBorrows","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"ReservesAdded","inputs":[{"type":"address","name":"benefactor","internalType":"address","indexed":false},{"type":"uint256","name":"addAmount","internalType":"uint256","indexed":false},{"type":"uint256","name":"newTotalReserves","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"ReservesReduced","inputs":[{"type":"address","name":"admin","internalType":"address","indexed":false},{"type":"uint256","name":"reduceAmount","internalType":"uint256","indexed":false},{"type":"uint256","name":"newTotalReserves","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"Transfer","inputs":[{"type":"address","name":"from","internalType":"address","indexed":true},{"type":"address","name":"to","internalType":"address","indexed":true},{"type":"uint256","name":"amount","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"fallback","stateMutability":"payable","payable":true},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"_acceptAdmin","inputs":[],"constant":false},{"type":"function","stateMutability":"payable","payable":true,"outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"_addReserves","inputs":[],"constant":false},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"_reduceReserves","inputs":[{"type":"uint256","name":"reduceAmount","internalType":"uint256"}],"constant":false},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"_setComptroller","inputs":[{"type":"address","name":"newComptroller","internalType":"contract ComptrollerInterface"}],"constant":false},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[],"name":"_setImplementation","inputs":[{"type":"address","name":"implementation_","internalType":"address"},{"type":"bool","name":"allowResign","internalType":"bool"},{"type":"bytes","name":"becomeImplementationData","internalType":"bytes"}],"constant":false},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"_setInterestRateModel","inputs":[{"type":"address","name":"newInterestRateModel","internalType":"contract InterestRateModel"}],"constant":false},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"_setPendingAdmin","inputs":[{"type":"address","name":"newPendingAdmin","internalType":"address payable"}],"constant":false},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"_setProtocolSeizeShare","inputs":[{"type":"uint256","name":"newProtocolSeizeShareMantissa","internalType":"uint256"}],"constant":false},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"_setReserveFactor","inputs":[{"type":"uint256","name":"newReserveFactorMantissa","internalType":"uint256"}],"constant":false},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"accrualBlockTimestamp","inputs":[],"constant":true},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"accrueInterest","inputs":[],"constant":false},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"address","name":"","internalType":"address payable"}],"name":"admin","inputs":[],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"allowance","inputs":[{"type":"address","name":"owner","internalType":"address"},{"type":"address","name":"spender","internalType":"address"}],"constant":true},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"approve","inputs":[{"type":"address","name":"spender","internalType":"address"},{"type":"uint256","name":"amount","internalType":"uint256"}],"constant":false},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"balanceOf","inputs":[{"type":"address","name":"owner","internalType":"address"}],"constant":true},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"balanceOfUnderlying","inputs":[{"type":"address","name":"owner","internalType":"address"}],"constant":false},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"borrow","inputs":[{"type":"uint256","name":"borrowAmount","internalType":"uint256"}],"constant":false},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"borrowBalanceCurrent","inputs":[{"type":"address","name":"account","internalType":"address"}],"constant":false},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"borrowBalanceStored","inputs":[{"type":"address","name":"account","internalType":"address"}],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"borrowIndex","inputs":[],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"borrowRatePerTimestamp","inputs":[],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"address","name":"","internalType":"contract ComptrollerInterface"}],"name":"comptroller","inputs":[],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint8","name":"","internalType":"uint8"}],"name":"decimals","inputs":[],"constant":true},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[{"type":"bytes","name":"","internalType":"bytes"}],"name":"delegateToImplementation","inputs":[{"type":"bytes","name":"data","internalType":"bytes"}],"constant":false},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"bytes","name":"","internalType":"bytes"}],"name":"delegateToViewImplementation","inputs":[{"type":"bytes","name":"data","internalType":"bytes"}],"constant":true},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"exchangeRateCurrent","inputs":[],"constant":false},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"exchangeRateStored","inputs":[],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint256","name":"","internalType":"uint256"},{"type":"uint256","name":"","internalType":"uint256"},{"type":"uint256","name":"","internalType":"uint256"},{"type":"uint256","name":"","internalType":"uint256"}],"name":"getAccountSnapshot","inputs":[{"type":"address","name":"account","internalType":"address"}],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"getCash","inputs":[],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"address","name":"","internalType":"address"}],"name":"implementation","inputs":[],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"address","name":"","internalType":"contract InterestRateModel"}],"name":"interestRateModel","inputs":[],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"isCToken","inputs":[],"constant":true},{"type":"function","stateMutability":"payable","payable":true,"outputs":[],"name":"liquidateBorrow","inputs":[{"type":"address","name":"borrower","internalType":"address"},{"type":"address","name":"cTokenCollateral","internalType":"contract CTokenInterface"}],"constant":false},{"type":"function","stateMutability":"payable","payable":true,"outputs":[],"name":"mint","inputs":[],"constant":false},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"string","name":"","internalType":"string"}],"name":"name","inputs":[],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"address","name":"","internalType":"address payable"}],"name":"pendingAdmin","inputs":[],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"protocolSeizeShareMantissa","inputs":[],"constant":true},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"redeem","inputs":[{"type":"uint256","name":"redeemTokens","internalType":"uint256"}],"constant":false},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"redeemUnderlying","inputs":[{"type":"uint256","name":"redeemAmount","internalType":"uint256"}],"constant":false},{"type":"function","stateMutability":"payable","payable":true,"outputs":[],"name":"repayBorrow","inputs":[],"constant":false},{"type":"function","stateMutability":"payable","payable":true,"outputs":[],"name":"repayBorrowBehalf","inputs":[{"type":"address","name":"borrower","internalType":"address"}],"constant":false},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"reserveFactorMantissa","inputs":[],"constant":true},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"seize","inputs":[{"type":"address","name":"liquidator","internalType":"address"},{"type":"address","name":"borrower","internalType":"address"},{"type":"uint256","name":"seizeTokens","internalType":"uint256"}],"constant":false},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"supplyRatePerTimestamp","inputs":[],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"string","name":"","internalType":"string"}],"name":"symbol","inputs":[],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"totalBorrows","inputs":[],"constant":true},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"totalBorrowsCurrent","inputs":[],"constant":false},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"totalReserves","inputs":[],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"totalSupply","inputs":[],"constant":true},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"transfer","inputs":[{"type":"address","name":"dst","internalType":"address"},{"type":"uint256","name":"amount","internalType":"uint256"}],"constant":false},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"transferFrom","inputs":[{"type":"address","name":"src","internalType":"address"},{"type":"address","name":"dst","internalType":"address"},{"type":"uint256","name":"amount","internalType":"uint256"}],"constant":false}]
Contract Creation Code
0x60806040523480156200001157600080fd5b50604051620024123803806200241283398181016040526101208110156200003857600080fd5b8151602083015160408085015160608601805192519496939591949391820192846401000000008211156200006c57600080fd5b9083019060208201858111156200008257600080fd5b82516401000000008111828201881017156200009d57600080fd5b82525081516020918201929091019080838360005b83811015620000cc578181015183820152602001620000b2565b50505050905090810190601f168015620000fa5780820380516001836020036101000a031916815260200191505b50604052602001805160405193929190846401000000008211156200011e57600080fd5b9083019060208201858111156200013457600080fd5b82516401000000008111828201881017156200014f57600080fd5b82525081516020918201929091019080838360005b838110156200017e57818101518382015260200162000164565b50505050905090810190601f168015620001ac5780820380516001836020036101000a031916815260200191505b50604081815260208301519083015160608401516080909401805192969195919284640100000000821115620001e157600080fd5b908301906020820185811115620001f757600080fd5b82516401000000008111828201881017156200021257600080fd5b82525081516020918201929091019080838360005b838110156200024157818101518382015260200162000227565b50505050905090810190601f1680156200026f5780820380516001836020036101000a031916815260200191505b50604081905260038054610100600160a81b03191633610100021790556001600160a01b038d811660248301908152908d166044830152606482018c905260ff891660c483015260c0608483019081528b5160e48401528b51620003e196508895508f94508e938e938e938e938e9360a481019161010490910190602088019080838360005b838110156200030f578181015183820152602001620002f5565b50505050905090810190601f1680156200033d5780820380516001836020036101000a031916815260200191505b50838103825285518152855160209182019187019080838360005b838110156200037257818101518382015260200162000358565b50505050905090810190601f168015620003a05780820380516001836020036101000a031916815260200191505b5060408051601f198184030181529190526020810180516001600160e01b03908116632676306d60e21b179091529099506200042e16975050505050505050565b50620003f9826000836001600160e01b03620004f516565b5050600380546001600160a01b0390921661010002610100600160a81b031990921691909117905550620006d6945050505050565b606060006060846001600160a01b0316846040518082805190602001908083835b60208310620004705780518252601f1990920191602091820191016200044f565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855af49150503d8060008114620004d2576040519150601f19603f3d011682016040523d82523d6000602084013e620004d7565b606091505b50915091506000821415620004ed573d60208201fd5b949350505050565b60035461010090046001600160a01b03163314620005455760405162461bcd60e51b815260040180806020018281038252603a815260200180620023d8603a913960400191505060405180910390fd5b811562000587576040805160048152602481019091526020810180516001600160e01b0390811663153ab50560e01b17909152620005859190620006ac16565b505b601280546001600160a01b038581166001600160a01b031983161790925560405160206024820181815285516044840152855194909316936200065d938693909283926064909201919085019080838360005b83811015620005f4578181015183820152602001620005da565b50505050905090810190601f168015620006225780820380516001836020036101000a031916815260200191505b5060408051601f198184030181529190526020810180516001600160e01b03908116630adccee560e31b17909152909350620006ac16915050565b50601254604080516001600160a01b038085168252909216602083015280517fd604de94d45953f9138079ec1b82d533cb2160c906d1076d1f7ed54befbca97a9281900390910190a150505050565b601254606090620006d0906001600160a01b0316836001600160e01b036200042e16565b92915050565b611cf280620006e66000396000f3fe6080604052600436106102e45760003560e01c8063852a12e311610190578063cd91801c116100dc578063e9c714f211610095578063f851a4401161006f578063f851a44014610c55578063fca7820b14610c6a578063fcb6414714610c94578063fe9c44ae14610c9c576102e4565b8063e9c714f214610bf8578063f2b3abbd14610c0d578063f3fdb15a14610c40576102e4565b8063cd91801c14610b2e578063cfa9920114610b43578063d3bd2c7214610b58578063db006a7514610b6d578063dd62ed3e14610b97578063e597461914610bd2576102e4565b8063aa5af0fd11610149578063b71d1a0c11610123578063b71d1a0c14610a63578063bd6d894d14610a96578063c37f68e214610aab578063c5ebeaec14610b04576102e4565b8063aa5af0fd146109dd578063aae40a2a146109f2578063b2a02ff114610a20576102e4565b8063852a12e3146109085780638f840ddd1461093257806395d89b411461094757806395dd91931461095c578063a6afed951461098f578063a9059cbb146109a4576102e4565b80633b1d21a21161024f5780635c60da1b116102085780636752e702116101e25780636752e7021461088157806370a082311461089657806373acee98146108c957806383030846146108de576102e4565b80635c60da1b1461082d5780635fe3b56714610842578063601a0bf114610857576102e4565b80633b1d21a21461064f5780634487152f146106645780634576b5db1461071557806347bd3718146107485780634e4d9fea1461075d578063555bcc4014610765576102e4565b806318160ddd116102a157806318160ddd14610553578063182df0f51461056857806323b872dd1461057d57806326782247146105c0578063313ce567146105f15780633af9e6691461061c576102e4565b806306fdde03146103675780630933c1ed146103f1578063095ea7b3146104a25780631249c58b146104ef578063173b9904146104f957806317bfdfbc14610520575b6012546040516000916001600160a01b031690829036908083838082843760405192019450600093509091505080830381855af49150503d8060008114610347576040519150601f19603f3d011682016040523d82523d6000602084013e61034c565b606091505b505090506040513d6000823e818015610363573d82f35b3d82fd5b34801561037357600080fd5b5061037c610cb1565b6040805160208082528351818301528351919283929083019185019080838360005b838110156103b657818101518382015260200161039e565b50505050905090810190601f1680156103e35780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156103fd57600080fd5b5061037c6004803603602081101561041457600080fd5b810190602081018135600160201b81111561042e57600080fd5b82018360208201111561044057600080fd5b803590602001918460018302840111600160201b8311171561046157600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550610d3e945050505050565b3480156104ae57600080fd5b506104db600480360360408110156104c557600080fd5b506001600160a01b038135169060200135610d5d565b604080519115158252519081900360200190f35b6104f7610dd4565b005b34801561050557600080fd5b5061050e610e09565b60408051918252519081900360200190f35b34801561052c57600080fd5b5061050e6004803603602081101561054357600080fd5b50356001600160a01b0316610e0f565b34801561055f57600080fd5b5061050e610e81565b34801561057457600080fd5b5061050e610e87565b34801561058957600080fd5b506104db600480360360608110156105a057600080fd5b506001600160a01b03813581169160208101359091169060400135610ede565b3480156105cc57600080fd5b506105d5610f5e565b604080516001600160a01b039092168252519081900360200190f35b3480156105fd57600080fd5b50610606610f6d565b6040805160ff9092168252519081900360200190f35b34801561062857600080fd5b5061050e6004803603602081101561063f57600080fd5b50356001600160a01b0316610f76565b34801561065b57600080fd5b5061050e610fc8565b34801561067057600080fd5b5061037c6004803603602081101561068757600080fd5b810190602081018135600160201b8111156106a157600080fd5b8201836020820111156106b357600080fd5b803590602001918460018302840111600160201b831117156106d457600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550610ffc945050505050565b34801561072157600080fd5b5061050e6004803603602081101561073857600080fd5b50356001600160a01b031661121b565b34801561075457600080fd5b5061050e61126d565b6104f7611273565b34801561077157600080fd5b506104f76004803603606081101561078857600080fd5b6001600160a01b03823516916020810135151591810190606081016040820135600160201b8111156107b957600080fd5b8201836020820111156107cb57600080fd5b803590602001918460018302840111600160201b831117156107ec57600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295506112a5945050505050565b34801561083957600080fd5b506105d5611448565b34801561084e57600080fd5b506105d5611457565b34801561086357600080fd5b5061050e6004803603602081101561087a57600080fd5b5035611466565b34801561088d57600080fd5b5061050e6114ad565b3480156108a257600080fd5b5061050e600480360360208110156108b957600080fd5b50356001600160a01b03166114b3565b3480156108d557600080fd5b5061050e611505565b3480156108ea57600080fd5b5061050e6004803603602081101561090157600080fd5b503561153d565b34801561091457600080fd5b5061050e6004803603602081101561092b57600080fd5b5035611584565b34801561093e57600080fd5b5061050e6115cb565b34801561095357600080fd5b5061037c6115d1565b34801561096857600080fd5b5061050e6004803603602081101561097f57600080fd5b50356001600160a01b0316611629565b34801561099b57600080fd5b5061050e61167b565b3480156109b057600080fd5b506104db600480360360408110156109c757600080fd5b506001600160a01b0381351690602001356116b3565b3480156109e957600080fd5b5061050e611709565b6104f760048036036040811015610a0857600080fd5b506001600160a01b038135811691602001351661170f565b348015610a2c57600080fd5b5061050e60048036036060811015610a4357600080fd5b506001600160a01b03813581169160208101359091169060400135611768565b348015610a6f57600080fd5b5061050e60048036036020811015610a8657600080fd5b50356001600160a01b03166117c6565b348015610aa257600080fd5b5061050e611818565b348015610ab757600080fd5b50610ade60048036036020811015610ace57600080fd5b50356001600160a01b0316611850565b604080519485526020850193909352838301919091526060830152519081900360800190f35b348015610b1057600080fd5b5061050e60048036036020811015610b2757600080fd5b50356118e2565b348015610b3a57600080fd5b5061050e611929565b348015610b4f57600080fd5b5061050e611961565b348015610b6457600080fd5b5061050e611967565b348015610b7957600080fd5b5061050e60048036036020811015610b9057600080fd5b503561199f565b348015610ba357600080fd5b5061050e60048036036040811015610bba57600080fd5b506001600160a01b03813581169160200135166119e6565b6104f760048036036020811015610be857600080fd5b50356001600160a01b0316611a40565b348015610c0457600080fd5b5061050e611a90565b348015610c1957600080fd5b5061050e60048036036020811015610c3057600080fd5b50356001600160a01b0316611ac8565b348015610c4c57600080fd5b506105d5611b1a565b348015610c6157600080fd5b506105d5611b29565b348015610c7657600080fd5b5061050e60048036036020811015610c8d57600080fd5b5035611b3d565b61050e611b84565b348015610ca857600080fd5b506104db611bbc565b60018054604080516020600284861615610100026000190190941693909304601f81018490048402820184019092528181529291830182828015610d365780601f10610d0b57610100808354040283529160200191610d36565b820191906000526020600020905b815481529060010190602001808311610d1957829003601f168201915b505050505081565b601254606090610d57906001600160a01b031683611bc1565b92915050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663095ea7b360e01b179052600090606090610db390610d3e565b9050808060200190516020811015610dca57600080fd5b5051949350505050565b6040805160048152602481019091526020810180516001600160e01b0316631249c58b60e01b179052610e0690610d3e565b50565b60085481565b604080516001600160a01b0383166024808301919091528251808303909101815260449091019091526020810180516001600160e01b03166305eff7ef60e21b179052600090606090610e6190610d3e565b9050808060200190516020811015610e7857600080fd5b50519392505050565b600d5481565b6040805160048152602481019091526020810180516001600160e01b031663182df0f560e01b179052600090606090610ebf90610ffc565b9050808060200190516020811015610ed657600080fd5b505191505090565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b179052600090606090610f3c90610d3e565b9050808060200190516020811015610f5357600080fd5b505195945050505050565b6004546001600160a01b031681565b60035460ff1681565b604080516001600160a01b0383166024808301919091528251808303909101815260449091019091526020810180516001600160e01b0316633af9e66960e01b179052600090606090610e6190610d3e565b6040805160048152602481019091526020810180516001600160e01b0316631d8e90d160e11b179052600090606090610ebf905b606060006060306001600160a01b0316846040516024018080602001828103825283818151815260200191508051906020019080838360005b8381101561104d578181015183820152602001611035565b50505050905090810190601f16801561107a5780820380516001836020036101000a031916815260200191505b5060408051601f198184030181529181526020820180516001600160e01b0316630933c1ed60e01b178152905182519295509350839250908083835b602083106110d55780518252601f1990920191602091820191016110b6565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855afa9150503d8060008114611135576040519150601f19603f3d011682016040523d82523d6000602084013e61113a565b606091505b5091509150600082141561114f573d60208201fd5b80806020019051602081101561116457600080fd5b8101908080516040519392919084600160201b82111561118357600080fd5b90830190602082018581111561119857600080fd5b8251600160201b8111828201881017156111b157600080fd5b82525081516020918201929091019080838360005b838110156111de5781810151838201526020016111c6565b50505050905090810190601f16801561120b5780820380516001836020036101000a031916815260200191505b5060405250505092505050919050565b604080516001600160a01b0383166024808301919091528251808303909101815260449091019091526020810180516001600160e01b0316634576b5db60e01b179052600090606090610e6190610d3e565b600b5481565b6040805160048152602481019091526020810180516001600160e01b0316632726cff560e11b179052610e0690610d3e565b60035461010090046001600160a01b031633146112f35760405162461bcd60e51b815260040180806020018281038252603a815260200180611c84603a913960400191505060405180910390fd5b811561132d576040805160048152602481019091526020810180516001600160e01b031663153ab50560e01b17905261132b90610d3e565b505b601280546001600160a01b038581166001600160a01b031983161790925560405160206024820181815285516044840152855194909316936113f9938693909283926064909201919085019080838360005b8381101561139757818101518382015260200161137f565b50505050905090810190601f1680156113c45780820380516001836020036101000a031916815260200191505b5060408051601f198184030181529190526020810180516001600160e01b0316630adccee560e31b1790529250610d3e915050565b50601254604080516001600160a01b038085168252909216602083015280517fd604de94d45953f9138079ec1b82d533cb2160c906d1076d1f7ed54befbca97a9281900390910190a150505050565b6012546001600160a01b031681565b6005546001600160a01b031681565b6040805160248082018490528251808303909101815260449091019091526020810180516001600160e01b031663601a0bf160e01b179052600090606090610e6190610d3e565b60115481565b604080516001600160a01b0383166024808301919091528251808303909101815260449091019091526020810180516001600160e01b03166370a0823160e01b179052600090606090610e6190610ffc565b6040805160048152602481019091526020810180516001600160e01b0316630e759dd360e31b179052600090606090610ebf90610d3e565b6040805160248082018490528251808303909101815260449091019091526020810180516001600160e01b0316634181842360e11b179052600090606090610e6190610d3e565b6040805160248082018490528251808303909101815260449091019091526020810180516001600160e01b031663852a12e360e01b179052600090606090610e6190610d3e565b600c5481565b6002805460408051602060018416156101000260001901909316849004601f81018490048402820184019092528181529291830182828015610d365780601f10610d0b57610100808354040283529160200191610d36565b604080516001600160a01b0383166024808301919091528251808303909101815260449091019091526020810180516001600160e01b03166395dd919360e01b179052600090606090610e6190610ffc565b6040805160048152602481019091526020810180516001600160e01b031663a6afed9560e01b179052600090606090610ebf90610d3e565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052600090606090610db390610d3e565b600a5481565b604080516001600160a01b03808516602483015283166044808301919091528251808303909101815260649091019091526020810180516001600160e01b0316635572051560e11b17905261176390610d3e565b505050565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b031663b2a02ff160e01b179052600090606090610f3c90610d3e565b604080516001600160a01b0383166024808301919091528251808303909101815260449091019091526020810180516001600160e01b0316632dc7468360e21b179052600090606090610e6190610d3e565b6040805160048152602481019091526020810180516001600160e01b031663bd6d894d60e01b179052600090606090610ebf90610d3e565b604080516001600160a01b0383166024808301919091528251808303909101815260449091019091526020810180516001600160e01b03166361bfb47160e11b1790526000908190819081906060906118a890610ffc565b90508080602001905160808110156118bf57600080fd5b508051602082015160408301516060909301519199909850919650945092505050565b6040805160248082018490528251808303909101815260449091019091526020810180516001600160e01b031663317afabb60e21b179052600090606090610e6190610d3e565b6040805160048152602481019091526020810180516001600160e01b0316633364600760e21b179052600090606090610ebf90610ffc565b60095481565b6040805160048152602481019091526020810180516001600160e01b03166369de963960e11b179052600090606090610ebf90610ffc565b6040805160248082018490528251808303909101815260449091019091526020810180516001600160e01b031663db006a7560e01b179052600090606090610e6190610d3e565b604080516001600160a01b03808516602483015283166044808301919091528251808303909101815260649091019091526020810180516001600160e01b0316636eb1769f60e11b179052600090606090610db390610ffc565b604080516001600160a01b0383166024808301919091528251808303909101815260449091019091526020810180516001600160e01b031663e597461960e01b179052611a8c90610d3e565b5050565b6040805160048152602481019091526020810180516001600160e01b03166374e38a7960e11b179052600090606090610ebf90610d3e565b604080516001600160a01b0383166024808301919091528251808303909101815260449091019091526020810180516001600160e01b031663f2b3abbd60e01b179052600090606090610e6190610d3e565b6006546001600160a01b031681565b60035461010090046001600160a01b031681565b6040805160248082018490528251808303909101815260449091019091526020810180516001600160e01b031663fca7820b60e01b179052600090606090610e6190610d3e565b6040805160048152602481019091526020810180516001600160e01b031663fcb6414760e01b179052600090606090610ebf90610d3e565b600181565b606060006060846001600160a01b0316846040518082805190602001908083835b60208310611c015780518252601f199092019160209182019101611be2565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855af49150503d8060008114611c61576040519150601f19603f3d011682016040523d82523d6000602084013e611c66565b606091505b50915091506000821415611c7b573d60208201fd5b94935050505056fe434e617469766544656c656761746f723a3a5f736574496d706c656d656e746174696f6e3a2043616c6c6572206d7573742062652061646d696ea265627a7a723158208812bbef89f05dc7ed50844e10261de248ab7a0066fb2fa4f702da2db5849d6064736f6c63430005110032434e617469766544656c656761746f723a3a5f736574496d706c656d656e746174696f6e3a2043616c6c6572206d7573742062652061646d696e0000000000000000000000003a4ec955a18ef6eb33025599505e7d404a4d59ec0000000000000000000000005f887f27b489fb02212da6059220fa735e60d47a000000000000000000000000000000000000000000a56fa5b99019a5c8000000000000000000000000000000000000000000000000000000000000000000012000000000000000000000000000000000000000000000000000000000000001600000000000000000000000000000000000000000000000000000000000000008000000000000000000000000f4efdf1e9b0badfd2dfa8a22937d4458152bc90900000000000000000000000039c18a98d1d5e432a9f7469009f65f1da0c706b400000000000000000000000000000000000000000000000000000000000001a0000000000000000000000000000000000000000000000000000000000000000c4c656e64696e67204b41564100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005684b41564100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000
Deployed ByteCode
0x6080604052600436106102e45760003560e01c8063852a12e311610190578063cd91801c116100dc578063e9c714f211610095578063f851a4401161006f578063f851a44014610c55578063fca7820b14610c6a578063fcb6414714610c94578063fe9c44ae14610c9c576102e4565b8063e9c714f214610bf8578063f2b3abbd14610c0d578063f3fdb15a14610c40576102e4565b8063cd91801c14610b2e578063cfa9920114610b43578063d3bd2c7214610b58578063db006a7514610b6d578063dd62ed3e14610b97578063e597461914610bd2576102e4565b8063aa5af0fd11610149578063b71d1a0c11610123578063b71d1a0c14610a63578063bd6d894d14610a96578063c37f68e214610aab578063c5ebeaec14610b04576102e4565b8063aa5af0fd146109dd578063aae40a2a146109f2578063b2a02ff114610a20576102e4565b8063852a12e3146109085780638f840ddd1461093257806395d89b411461094757806395dd91931461095c578063a6afed951461098f578063a9059cbb146109a4576102e4565b80633b1d21a21161024f5780635c60da1b116102085780636752e702116101e25780636752e7021461088157806370a082311461089657806373acee98146108c957806383030846146108de576102e4565b80635c60da1b1461082d5780635fe3b56714610842578063601a0bf114610857576102e4565b80633b1d21a21461064f5780634487152f146106645780634576b5db1461071557806347bd3718146107485780634e4d9fea1461075d578063555bcc4014610765576102e4565b806318160ddd116102a157806318160ddd14610553578063182df0f51461056857806323b872dd1461057d57806326782247146105c0578063313ce567146105f15780633af9e6691461061c576102e4565b806306fdde03146103675780630933c1ed146103f1578063095ea7b3146104a25780631249c58b146104ef578063173b9904146104f957806317bfdfbc14610520575b6012546040516000916001600160a01b031690829036908083838082843760405192019450600093509091505080830381855af49150503d8060008114610347576040519150601f19603f3d011682016040523d82523d6000602084013e61034c565b606091505b505090506040513d6000823e818015610363573d82f35b3d82fd5b34801561037357600080fd5b5061037c610cb1565b6040805160208082528351818301528351919283929083019185019080838360005b838110156103b657818101518382015260200161039e565b50505050905090810190601f1680156103e35780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156103fd57600080fd5b5061037c6004803603602081101561041457600080fd5b810190602081018135600160201b81111561042e57600080fd5b82018360208201111561044057600080fd5b803590602001918460018302840111600160201b8311171561046157600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550610d3e945050505050565b3480156104ae57600080fd5b506104db600480360360408110156104c557600080fd5b506001600160a01b038135169060200135610d5d565b604080519115158252519081900360200190f35b6104f7610dd4565b005b34801561050557600080fd5b5061050e610e09565b60408051918252519081900360200190f35b34801561052c57600080fd5b5061050e6004803603602081101561054357600080fd5b50356001600160a01b0316610e0f565b34801561055f57600080fd5b5061050e610e81565b34801561057457600080fd5b5061050e610e87565b34801561058957600080fd5b506104db600480360360608110156105a057600080fd5b506001600160a01b03813581169160208101359091169060400135610ede565b3480156105cc57600080fd5b506105d5610f5e565b604080516001600160a01b039092168252519081900360200190f35b3480156105fd57600080fd5b50610606610f6d565b6040805160ff9092168252519081900360200190f35b34801561062857600080fd5b5061050e6004803603602081101561063f57600080fd5b50356001600160a01b0316610f76565b34801561065b57600080fd5b5061050e610fc8565b34801561067057600080fd5b5061037c6004803603602081101561068757600080fd5b810190602081018135600160201b8111156106a157600080fd5b8201836020820111156106b357600080fd5b803590602001918460018302840111600160201b831117156106d457600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550610ffc945050505050565b34801561072157600080fd5b5061050e6004803603602081101561073857600080fd5b50356001600160a01b031661121b565b34801561075457600080fd5b5061050e61126d565b6104f7611273565b34801561077157600080fd5b506104f76004803603606081101561078857600080fd5b6001600160a01b03823516916020810135151591810190606081016040820135600160201b8111156107b957600080fd5b8201836020820111156107cb57600080fd5b803590602001918460018302840111600160201b831117156107ec57600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295506112a5945050505050565b34801561083957600080fd5b506105d5611448565b34801561084e57600080fd5b506105d5611457565b34801561086357600080fd5b5061050e6004803603602081101561087a57600080fd5b5035611466565b34801561088d57600080fd5b5061050e6114ad565b3480156108a257600080fd5b5061050e600480360360208110156108b957600080fd5b50356001600160a01b03166114b3565b3480156108d557600080fd5b5061050e611505565b3480156108ea57600080fd5b5061050e6004803603602081101561090157600080fd5b503561153d565b34801561091457600080fd5b5061050e6004803603602081101561092b57600080fd5b5035611584565b34801561093e57600080fd5b5061050e6115cb565b34801561095357600080fd5b5061037c6115d1565b34801561096857600080fd5b5061050e6004803603602081101561097f57600080fd5b50356001600160a01b0316611629565b34801561099b57600080fd5b5061050e61167b565b3480156109b057600080fd5b506104db600480360360408110156109c757600080fd5b506001600160a01b0381351690602001356116b3565b3480156109e957600080fd5b5061050e611709565b6104f760048036036040811015610a0857600080fd5b506001600160a01b038135811691602001351661170f565b348015610a2c57600080fd5b5061050e60048036036060811015610a4357600080fd5b506001600160a01b03813581169160208101359091169060400135611768565b348015610a6f57600080fd5b5061050e60048036036020811015610a8657600080fd5b50356001600160a01b03166117c6565b348015610aa257600080fd5b5061050e611818565b348015610ab757600080fd5b50610ade60048036036020811015610ace57600080fd5b50356001600160a01b0316611850565b604080519485526020850193909352838301919091526060830152519081900360800190f35b348015610b1057600080fd5b5061050e60048036036020811015610b2757600080fd5b50356118e2565b348015610b3a57600080fd5b5061050e611929565b348015610b4f57600080fd5b5061050e611961565b348015610b6457600080fd5b5061050e611967565b348015610b7957600080fd5b5061050e60048036036020811015610b9057600080fd5b503561199f565b348015610ba357600080fd5b5061050e60048036036040811015610bba57600080fd5b506001600160a01b03813581169160200135166119e6565b6104f760048036036020811015610be857600080fd5b50356001600160a01b0316611a40565b348015610c0457600080fd5b5061050e611a90565b348015610c1957600080fd5b5061050e60048036036020811015610c3057600080fd5b50356001600160a01b0316611ac8565b348015610c4c57600080fd5b506105d5611b1a565b348015610c6157600080fd5b506105d5611b29565b348015610c7657600080fd5b5061050e60048036036020811015610c8d57600080fd5b5035611b3d565b61050e611b84565b348015610ca857600080fd5b506104db611bbc565b60018054604080516020600284861615610100026000190190941693909304601f81018490048402820184019092528181529291830182828015610d365780601f10610d0b57610100808354040283529160200191610d36565b820191906000526020600020905b815481529060010190602001808311610d1957829003601f168201915b505050505081565b601254606090610d57906001600160a01b031683611bc1565b92915050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663095ea7b360e01b179052600090606090610db390610d3e565b9050808060200190516020811015610dca57600080fd5b5051949350505050565b6040805160048152602481019091526020810180516001600160e01b0316631249c58b60e01b179052610e0690610d3e565b50565b60085481565b604080516001600160a01b0383166024808301919091528251808303909101815260449091019091526020810180516001600160e01b03166305eff7ef60e21b179052600090606090610e6190610d3e565b9050808060200190516020811015610e7857600080fd5b50519392505050565b600d5481565b6040805160048152602481019091526020810180516001600160e01b031663182df0f560e01b179052600090606090610ebf90610ffc565b9050808060200190516020811015610ed657600080fd5b505191505090565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b179052600090606090610f3c90610d3e565b9050808060200190516020811015610f5357600080fd5b505195945050505050565b6004546001600160a01b031681565b60035460ff1681565b604080516001600160a01b0383166024808301919091528251808303909101815260449091019091526020810180516001600160e01b0316633af9e66960e01b179052600090606090610e6190610d3e565b6040805160048152602481019091526020810180516001600160e01b0316631d8e90d160e11b179052600090606090610ebf905b606060006060306001600160a01b0316846040516024018080602001828103825283818151815260200191508051906020019080838360005b8381101561104d578181015183820152602001611035565b50505050905090810190601f16801561107a5780820380516001836020036101000a031916815260200191505b5060408051601f198184030181529181526020820180516001600160e01b0316630933c1ed60e01b178152905182519295509350839250908083835b602083106110d55780518252601f1990920191602091820191016110b6565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855afa9150503d8060008114611135576040519150601f19603f3d011682016040523d82523d6000602084013e61113a565b606091505b5091509150600082141561114f573d60208201fd5b80806020019051602081101561116457600080fd5b8101908080516040519392919084600160201b82111561118357600080fd5b90830190602082018581111561119857600080fd5b8251600160201b8111828201881017156111b157600080fd5b82525081516020918201929091019080838360005b838110156111de5781810151838201526020016111c6565b50505050905090810190601f16801561120b5780820380516001836020036101000a031916815260200191505b5060405250505092505050919050565b604080516001600160a01b0383166024808301919091528251808303909101815260449091019091526020810180516001600160e01b0316634576b5db60e01b179052600090606090610e6190610d3e565b600b5481565b6040805160048152602481019091526020810180516001600160e01b0316632726cff560e11b179052610e0690610d3e565b60035461010090046001600160a01b031633146112f35760405162461bcd60e51b815260040180806020018281038252603a815260200180611c84603a913960400191505060405180910390fd5b811561132d576040805160048152602481019091526020810180516001600160e01b031663153ab50560e01b17905261132b90610d3e565b505b601280546001600160a01b038581166001600160a01b031983161790925560405160206024820181815285516044840152855194909316936113f9938693909283926064909201919085019080838360005b8381101561139757818101518382015260200161137f565b50505050905090810190601f1680156113c45780820380516001836020036101000a031916815260200191505b5060408051601f198184030181529190526020810180516001600160e01b0316630adccee560e31b1790529250610d3e915050565b50601254604080516001600160a01b038085168252909216602083015280517fd604de94d45953f9138079ec1b82d533cb2160c906d1076d1f7ed54befbca97a9281900390910190a150505050565b6012546001600160a01b031681565b6005546001600160a01b031681565b6040805160248082018490528251808303909101815260449091019091526020810180516001600160e01b031663601a0bf160e01b179052600090606090610e6190610d3e565b60115481565b604080516001600160a01b0383166024808301919091528251808303909101815260449091019091526020810180516001600160e01b03166370a0823160e01b179052600090606090610e6190610ffc565b6040805160048152602481019091526020810180516001600160e01b0316630e759dd360e31b179052600090606090610ebf90610d3e565b6040805160248082018490528251808303909101815260449091019091526020810180516001600160e01b0316634181842360e11b179052600090606090610e6190610d3e565b6040805160248082018490528251808303909101815260449091019091526020810180516001600160e01b031663852a12e360e01b179052600090606090610e6190610d3e565b600c5481565b6002805460408051602060018416156101000260001901909316849004601f81018490048402820184019092528181529291830182828015610d365780601f10610d0b57610100808354040283529160200191610d36565b604080516001600160a01b0383166024808301919091528251808303909101815260449091019091526020810180516001600160e01b03166395dd919360e01b179052600090606090610e6190610ffc565b6040805160048152602481019091526020810180516001600160e01b031663a6afed9560e01b179052600090606090610ebf90610d3e565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052600090606090610db390610d3e565b600a5481565b604080516001600160a01b03808516602483015283166044808301919091528251808303909101815260649091019091526020810180516001600160e01b0316635572051560e11b17905261176390610d3e565b505050565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b031663b2a02ff160e01b179052600090606090610f3c90610d3e565b604080516001600160a01b0383166024808301919091528251808303909101815260449091019091526020810180516001600160e01b0316632dc7468360e21b179052600090606090610e6190610d3e565b6040805160048152602481019091526020810180516001600160e01b031663bd6d894d60e01b179052600090606090610ebf90610d3e565b604080516001600160a01b0383166024808301919091528251808303909101815260449091019091526020810180516001600160e01b03166361bfb47160e11b1790526000908190819081906060906118a890610ffc565b90508080602001905160808110156118bf57600080fd5b508051602082015160408301516060909301519199909850919650945092505050565b6040805160248082018490528251808303909101815260449091019091526020810180516001600160e01b031663317afabb60e21b179052600090606090610e6190610d3e565b6040805160048152602481019091526020810180516001600160e01b0316633364600760e21b179052600090606090610ebf90610ffc565b60095481565b6040805160048152602481019091526020810180516001600160e01b03166369de963960e11b179052600090606090610ebf90610ffc565b6040805160248082018490528251808303909101815260449091019091526020810180516001600160e01b031663db006a7560e01b179052600090606090610e6190610d3e565b604080516001600160a01b03808516602483015283166044808301919091528251808303909101815260649091019091526020810180516001600160e01b0316636eb1769f60e11b179052600090606090610db390610ffc565b604080516001600160a01b0383166024808301919091528251808303909101815260449091019091526020810180516001600160e01b031663e597461960e01b179052611a8c90610d3e565b5050565b6040805160048152602481019091526020810180516001600160e01b03166374e38a7960e11b179052600090606090610ebf90610d3e565b604080516001600160a01b0383166024808301919091528251808303909101815260449091019091526020810180516001600160e01b031663f2b3abbd60e01b179052600090606090610e6190610d3e565b6006546001600160a01b031681565b60035461010090046001600160a01b031681565b6040805160248082018490528251808303909101815260449091019091526020810180516001600160e01b031663fca7820b60e01b179052600090606090610e6190610d3e565b6040805160048152602481019091526020810180516001600160e01b031663fcb6414760e01b179052600090606090610ebf90610d3e565b600181565b606060006060846001600160a01b0316846040518082805190602001908083835b60208310611c015780518252601f199092019160209182019101611be2565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855af49150503d8060008114611c61576040519150601f19603f3d011682016040523d82523d6000602084013e611c66565b606091505b50915091506000821415611c7b573d60208201fd5b94935050505056fe434e617469766544656c656761746f723a3a5f736574496d706c656d656e746174696f6e3a2043616c6c6572206d7573742062652061646d696ea265627a7a723158208812bbef89f05dc7ed50844e10261de248ab7a0066fb2fa4f702da2db5849d6064736f6c63430005110032