ETH Price: $2,817.33 (-4.65%)
 

Overview

Max Total Supply

3,202,077.29226856 ERC20 ***

Holders

6,521

Transfers

-
4 (0%)

Market

Price

$0.00 @ 0.000000 ETH

Onchain Market Cap

-

Circulating Supply Market Cap

-

Other Info

Token Contract (WITH 8 Decimals)

Loading...
Loading
Loading...
Loading
Loading...
Loading

Click here to update the token information / general information
This contract may be a proxy contract. Click on More Options and select Is this a proxy? to confirm and enable the "Read as Proxy" & "Write as Proxy" tabs.

Contract Source Code Verified (Exact Match)

Contract Name:
MErc20Delegator

Compiler Version
v0.8.19+commit.7dd6d404

Optimization Enabled:
Yes with 1 runs

Other Settings:
paris EvmVersion
// SPDX-License-Identifier: BSD-3-Clause
pragma solidity 0.8.19;

import "./MTokenInterfaces.sol";

/**
 * @title Moonwell's MErc20Delegator Contract
 * @notice MTokens which wrap an EIP-20 underlying and delegate to an implementation
 * @author Moonwell
 */
contract MErc20Delegator is
    MTokenInterface,
    MErc20Interface,
    MDelegatorInterface
{
    /**
     * @notice Construct a 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
     * @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(
        address underlying_,
        ComptrollerInterface comptroller_,
        InterestRateModel interestRateModel_,
        uint initialExchangeRateMantissa_,
        string memory name_,
        string memory symbol_,
        uint8 decimals_,
        address payable admin_,
        address implementation_,
        bytes memory becomeImplementationData
    ) {
        // Creator of the contract is admin during initialization
        admin = payable(msg.sender);

        // First delegate gets to initialize the delegator (i.e. storage contract)
        delegateTo(
            implementation_,
            abi.encodeWithSignature(
                "initialize(address,address,address,uint256,string,string,uint8)",
                underlying_,
                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 override {
        require(
            msg.sender == admin,
            "MErc20Delegator::_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 mTokens in exchange
     * @dev Accrues interest whether or not the operation succeeds, unless reverted
     * @param mintAmount The amount of the underlying asset to supply
     * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)
     */
    function mint(uint mintAmount) external override returns (uint) {
        bytes memory data = delegateToImplementation(
            abi.encodeWithSignature("mint(uint256)", mintAmount)
        );
        return abi.decode(data, (uint));
    }

    /**
     * @notice Supply assets but without a 2-step approval process, EIP-2612
     * @dev Simply calls the underlying token's `permit()` function and then assumes things worked
     * @param mintAmount The amount of the underlying asset to supply
     * @param deadline The amount of the underlying asset to supply
     * @param v ECDSA recovery id for the signature
     * @param r ECDSA r parameter for the signature
     * @param s ECDSA s parameter for the signature
     * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)
     */
    function mintWithPermit(
        uint mintAmount,
        uint deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external override returns (uint) {
        bytes memory data = delegateToImplementation(
            abi.encodeWithSignature(
                "mintWithPermit(uint256,uint256,uint8,bytes32,bytes32)",
                mintAmount,
                deadline,
                v,
                r,
                s
            )
        );
        return abi.decode(data, (uint));
    }

    /**
     * @notice Sender redeems mTokens in exchange for the underlying asset
     * @dev Accrues interest whether or not the operation succeeds, unless reverted
     * @param redeemTokens The number of mTokens to redeem into underlying
     * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)
     */
    function redeem(uint redeemTokens) external override returns (uint) {
        bytes memory data = delegateToImplementation(
            abi.encodeWithSignature("redeem(uint256)", redeemTokens)
        );
        return abi.decode(data, (uint));
    }

    /**
     * @notice Sender redeems mTokens in exchange for a specified amount of underlying asset
     * @dev Accrues interest whether or not the operation succeeds, unless reverted
     * @param redeemAmount The amount of underlying to redeem
     * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)
     */
    function redeemUnderlying(
        uint redeemAmount
    ) external override returns (uint) {
        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 override returns (uint) {
        bytes memory data = delegateToImplementation(
            abi.encodeWithSignature("borrow(uint256)", borrowAmount)
        );
        return abi.decode(data, (uint));
    }

    /**
     * @notice Sender repays their own borrow
     * @param repayAmount The amount to repay, or uint.max for the full outstanding amount
     * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)
     */
    function repayBorrow(uint repayAmount) external override returns (uint) {
        bytes memory data = delegateToImplementation(
            abi.encodeWithSignature("repayBorrow(uint256)", repayAmount)
        );
        return abi.decode(data, (uint));
    }

    /**
     * @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 uint.max for the full outstanding amount
     * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)
     */
    function repayBorrowBehalf(
        address borrower,
        uint repayAmount
    ) external override returns (uint) {
        bytes memory data = delegateToImplementation(
            abi.encodeWithSignature(
                "repayBorrowBehalf(address,uint256)",
                borrower,
                repayAmount
            )
        );
        return abi.decode(data, (uint));
    }

    /**
     * @notice The sender liquidates the borrowers collateral.
     *  The collateral seized is transferred to the liquidator.
     * @param borrower The borrower of this mToken to be liquidated
     * @param mTokenCollateral The market in which to seize collateral from the borrower
     * @param repayAmount The amount of the underlying borrowed asset to repay
     * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)
     */
    function liquidateBorrow(
        address borrower,
        uint repayAmount,
        MTokenInterface mTokenCollateral
    ) external override returns (uint) {
        bytes memory data = delegateToImplementation(
            abi.encodeWithSignature(
                "liquidateBorrow(address,uint256,address)",
                borrower,
                repayAmount,
                mTokenCollateral
            )
        );
        return abi.decode(data, (uint));
    }

    /**
     * @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 override 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 override 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 (uint.max means infinite)
     * @return Whether or not the approval succeeded
     */
    function approve(
        address spender,
        uint256 amount
    ) external override 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 (uint.max means infinite)
     */
    function allowance(
        address owner,
        address spender
    ) external view override 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 override 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 override 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 override 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 mToken
     * @return The borrow interest rate per timestamp, scaled by 1e18
     */
    function borrowRatePerTimestamp() external view override 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 mToken
     * @return The supply interest rate per timestamp, scaled by 1e18
     */
    function supplyRatePerTimestamp() external view override 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 override 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 override 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 override 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 override returns (uint) {
        bytes memory data = delegateToImplementation(
            abi.encodeWithSignature("exchangeRateCurrent()")
        );
        return abi.decode(data, (uint));
    }

    /**
     * @notice Calculates the exchange rate from the underlying to the MToken
     * @dev This function does not accrue interest before calculating the exchange rate
     * @return Calculated exchange rate scaled by 1e18
     */
    function exchangeRateStored() public view override returns (uint) {
        bytes memory data = delegateToViewImplementation(
            abi.encodeWithSignature("exchangeRateStored()")
        );
        return abi.decode(data, (uint));
    }

    /**
     * @notice Get cash balance of this mToken in the underlying asset
     * @return The quantity of underlying asset owned by this contract
     */
    function getCash() external view override 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 override 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 mToken during the process of liquidation.
     *  Its absolutely critical to use msg.sender as the borrowed mToken and not a parameter.
     * @param liquidator The account receiving seized collateral
     * @param borrower The account having collateral seized
     * @param seizeTokens The number of mTokens to seize
     * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)
     */
    function seize(
        address liquidator,
        address borrower,
        uint seizeTokens
    ) external override returns (uint) {
        bytes memory data = delegateToImplementation(
            abi.encodeWithSignature(
                "seize(address,address,uint256)",
                liquidator,
                borrower,
                seizeTokens
            )
        );
        return abi.decode(data, (uint));
    }

    /**
     * @notice A public function to sweep accidental ERC-20 transfers to this contract. Tokens are sent to admin (timelock)
     * @param token The address of the ERC-20 token to sweep
     */
    function sweepToken(EIP20NonStandardInterface token) external override {
        delegateToImplementation(
            abi.encodeWithSignature("sweepToken(address)", token)
        );
    }

    /*** 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 override 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 override 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 override 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 override returns (uint) {
        bytes memory data = delegateToImplementation(
            abi.encodeWithSignature("_acceptAdmin()")
        );
        return abi.decode(data, (uint));
    }

    /**
     * @notice Accrues interest and adds reserves by transferring from admin
     * @param addAmount Amount of reserves to add
     * @return uint 0=success, otherwise a failure (see ErrorReporter.sol for details)
     */
    function _addReserves(uint addAmount) external override returns (uint) {
        bytes memory data = delegateToImplementation(
            abi.encodeWithSignature("_addReserves(uint256)", addAmount)
        );
        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 override 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 override 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 override 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
     */
    fallback() external payable {
        require(
            msg.value == 0,
            "MErc20Delegator:fallback: cannot send value to fallback"
        );

        // 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())
            }
        }
    }
}

File 2 of 6 : MTokenInterfaces.sol
// SPDX-License-Identifier: BSD-3-Clause
pragma solidity 0.8.19;

import "./ComptrollerInterface.sol";
import "./irm/InterestRateModel.sol";
import "./EIP20NonStandardInterface.sol";
import "./TokenErrorReporter.sol";

contract MTokenStorage {
    /// @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-mToken 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 MTokens (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;
}

abstract contract MTokenInterface is MTokenStorage {
    /// @notice Indicator that this is a MToken contract (for inspection)
    bool public constant isMToken = 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 mTokenCollateral,
        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);

    /*** User Interface ***/

    function transfer(address dst, uint amount) external virtual returns (bool);
    function transferFrom(
        address src,
        address dst,
        uint amount
    ) external virtual returns (bool);
    function approve(
        address spender,
        uint amount
    ) external virtual returns (bool);
    function allowance(
        address owner,
        address spender
    ) external view virtual returns (uint);
    function balanceOf(address owner) external view virtual returns (uint);
    function balanceOfUnderlying(address owner) external virtual returns (uint);
    function getAccountSnapshot(
        address account
    ) external view virtual returns (uint, uint, uint, uint);
    function borrowRatePerTimestamp() external view virtual returns (uint);
    function supplyRatePerTimestamp() external view virtual returns (uint);
    function totalBorrowsCurrent() external virtual returns (uint);
    function borrowBalanceCurrent(
        address account
    ) external virtual returns (uint);
    function borrowBalanceStored(
        address account
    ) external view virtual returns (uint);
    function exchangeRateCurrent() external virtual returns (uint);
    function exchangeRateStored() external view virtual returns (uint);
    function getCash() external view virtual returns (uint);
    function accrueInterest() external virtual returns (uint);
    function seize(
        address liquidator,
        address borrower,
        uint seizeTokens
    ) external virtual returns (uint);

    /*** Admin Functions ***/

    function _setPendingAdmin(
        address payable newPendingAdmin
    ) external virtual returns (uint);
    function _acceptAdmin() external virtual returns (uint);
    function _setComptroller(
        ComptrollerInterface newComptroller
    ) external virtual returns (uint);
    function _setReserveFactor(
        uint newReserveFactorMantissa
    ) external virtual returns (uint);
    function _reduceReserves(uint reduceAmount) external virtual returns (uint);
    function _setInterestRateModel(
        InterestRateModel newInterestRateModel
    ) external virtual returns (uint);
    function _setProtocolSeizeShare(
        uint newProtocolSeizeShareMantissa
    ) external virtual returns (uint);
}

contract MErc20Storage {
    /// @notice Underlying asset for this MToken
    address public underlying;
}

abstract contract MErc20Interface is MErc20Storage {
    /*** User Interface ***/

    function mint(uint mintAmount) external virtual returns (uint);
    function mintWithPermit(
        uint mintAmount,
        uint deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external virtual returns (uint);
    function redeem(uint redeemTokens) external virtual returns (uint);
    function redeemUnderlying(
        uint redeemAmount
    ) external virtual returns (uint);
    function borrow(uint borrowAmount) external virtual returns (uint);
    function repayBorrow(uint repayAmount) external virtual returns (uint);
    function repayBorrowBehalf(
        address borrower,
        uint repayAmount
    ) external virtual returns (uint);
    function liquidateBorrow(
        address borrower,
        uint repayAmount,
        MTokenInterface mTokenCollateral
    ) external virtual returns (uint);
    function sweepToken(EIP20NonStandardInterface token) external virtual;

    /*** Admin Functions ***/

    function _addReserves(uint addAmount) external virtual returns (uint);
}

contract MDelegationStorage {
    /// @notice Implementation address for this contract
    address public implementation;
}

abstract contract MDelegatorInterface is MDelegationStorage {
    /// @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
    ) external virtual;
}

abstract contract MDelegateInterface is MDelegationStorage {
    /**
     * @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) external virtual;

    /// @notice Called by the delegator on a delegate to forfeit its responsibility
    function _resignImplementation() external virtual;
}

// SPDX-License-Identifier: BSD-3-Clause
pragma solidity 0.8.19;

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 mTokens
    ) external virtual returns (uint[] memory);
    function exitMarket(address mToken) external virtual returns (uint);

    /*** Policy Hooks ***/

    function mintAllowed(
        address mToken,
        address minter,
        uint mintAmount
    ) external virtual returns (uint);

    function redeemAllowed(
        address mToken,
        address redeemer,
        uint redeemTokens
    ) external virtual returns (uint);

    // Do not remove, still used by MToken
    function redeemVerify(
        address mToken,
        address redeemer,
        uint redeemAmount,
        uint redeemTokens
    ) external pure virtual;

    function borrowAllowed(
        address mToken,
        address borrower,
        uint borrowAmount
    ) external virtual returns (uint);

    function repayBorrowAllowed(
        address mToken,
        address payer,
        address borrower,
        uint repayAmount
    ) external virtual returns (uint);

    function liquidateBorrowAllowed(
        address mTokenBorrowed,
        address mTokenCollateral,
        address liquidator,
        address borrower,
        uint repayAmount
    ) external view virtual returns (uint);

    function seizeAllowed(
        address mTokenCollateral,
        address mTokenBorrowed,
        address liquidator,
        address borrower,
        uint seizeTokens
    ) external virtual returns (uint);

    function transferAllowed(
        address mToken,
        address src,
        address dst,
        uint transferTokens
    ) external virtual returns (uint);

    /*** Liquidity/Liquidation Calculations ***/

    function liquidateCalculateSeizeTokens(
        address mTokenBorrowed,
        address mTokenCollateral,
        uint repayAmount
    ) external view virtual returns (uint, uint);
}

// The hooks that were patched out of the comptroller to make room for the supply caps, if we need them
abstract contract ComptrollerInterfaceWithAllVerificationHooks is
    ComptrollerInterface
{
    function mintVerify(
        address mToken,
        address minter,
        uint mintAmount,
        uint mintTokens
    ) external virtual;

    // Included in ComptrollerInterface already
    // function redeemVerify(address mToken, address redeemer, uint redeemAmount, uint redeemTokens) virtual external;

    function borrowVerify(
        address mToken,
        address borrower,
        uint borrowAmount
    ) external virtual;

    function repayBorrowVerify(
        address mToken,
        address payer,
        address borrower,
        uint repayAmount,
        uint borrowerIndex
    ) external virtual;

    function liquidateBorrowVerify(
        address mTokenBorrowed,
        address mTokenCollateral,
        address liquidator,
        address borrower,
        uint repayAmount,
        uint seizeTokens
    ) external virtual;

    function seizeVerify(
        address mTokenCollateral,
        address mTokenBorrowed,
        address liquidator,
        address borrower,
        uint seizeTokens
    ) external virtual;

    function transferVerify(
        address mToken,
        address src,
        address dst,
        uint transferTokens
    ) external virtual;
}

// SPDX-License-Identifier: BSD-3-Clause
pragma solidity 0.8.19;

/**
 * @title Moonwell's InterestRateModel Interface
 * @author Moonwell
 */
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 timestamp
     * @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 timestamp (as a percentage, and scaled by 1e18)
     */
    function getBorrowRate(
        uint cash,
        uint borrows,
        uint reserves
    ) external view virtual returns (uint);

    /**
     * @notice Calculates the current supply interest rate per timestamp
     * @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 timestamp (as a percentage, and scaled by 1e18)
     */
    function getSupplyRate(
        uint cash,
        uint borrows,
        uint reserves,
        uint reserveFactorMantissa
    ) external view virtual returns (uint);
}

// SPDX-License-Identifier: BSD-3-Clause
pragma solidity 0.8.19;

/**
 * @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
    );
}

// SPDX-License-Identifier: BSD-3-Clause
pragma solidity 0.8.19;

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,
        SET_GAS_AMOUNT_OWNER_CHECK
    }

    /**
     * @dev `error` corresponds to enum Error; `info` corresponds to enum FailureInfo, and `detail` is an arbitrary
     * contract-specific code that enables us to report opaque error codes from upgradeable contracts.
     **/
    event Failure(uint error, uint info, uint detail);

    /**
     * @dev use this when reporting a known error from the money market or a non-upgradeable collaborator
     */
    function fail(Error err, FailureInfo info) internal returns (uint) {
        emit Failure(uint(err), uint(info), 0);

        return uint(err);
    }

    /**
     * @dev use this when reporting an opaque error from an upgradeable collaborator contract
     */
    function failOpaque(
        Error err,
        FailureInfo info,
        uint opaqueError
    ) internal returns (uint) {
        emit Failure(uint(err), uint(info), opaqueError);

        return uint(err);
    }
}

contract TokenErrorReporter {
    enum Error {
        NO_ERROR,
        UNAUTHORIZED,
        BAD_INPUT,
        COMPTROLLER_REJECTION,
        COMPTROLLER_CALCULATION_ERROR,
        INTEREST_RATE_MODEL_ERROR,
        INVALID_ACCOUNT_PAIR,
        INVALID_CLOSE_AMOUNT_REQUESTED,
        INVALID_COLLATERAL_FACTOR,
        MATH_ERROR,
        MARKET_NOT_FRESH,
        MARKET_NOT_LISTED,
        TOKEN_INSUFFICIENT_ALLOWANCE,
        TOKEN_INSUFFICIENT_BALANCE,
        TOKEN_INSUFFICIENT_CASH,
        TOKEN_TRANSFER_IN_FAILED,
        TOKEN_TRANSFER_OUT_FAILED
    }

    /*
     * Note: FailureInfo (but not Error) is kept in alphabetical order
     *       This is because FailureInfo grows significantly faster, and
     *       the order of Error has some meaning, while the order of FailureInfo
     *       is entirely arbitrary.
     */
    enum FailureInfo {
        ACCEPT_ADMIN_PENDING_ADMIN_CHECK,
        ACCRUE_INTEREST_ACCUMULATED_INTEREST_CALCULATION_FAILED,
        ACCRUE_INTEREST_BORROW_RATE_CALCULATION_FAILED,
        ACCRUE_INTEREST_NEW_BORROW_INDEX_CALCULATION_FAILED,
        ACCRUE_INTEREST_NEW_TOTAL_BORROWS_CALCULATION_FAILED,
        ACCRUE_INTEREST_NEW_TOTAL_RESERVES_CALCULATION_FAILED,
        ACCRUE_INTEREST_SIMPLE_INTEREST_FACTOR_CALCULATION_FAILED,
        BORROW_ACCUMULATED_BALANCE_CALCULATION_FAILED,
        BORROW_ACCRUE_INTEREST_FAILED,
        BORROW_CASH_NOT_AVAILABLE,
        BORROW_FRESHNESS_CHECK,
        BORROW_NEW_TOTAL_BALANCE_CALCULATION_FAILED,
        BORROW_NEW_ACCOUNT_BORROW_BALANCE_CALCULATION_FAILED,
        BORROW_MARKET_NOT_LISTED,
        BORROW_COMPTROLLER_REJECTION,
        LIQUIDATE_ACCRUE_BORROW_INTEREST_FAILED,
        LIQUIDATE_ACCRUE_COLLATERAL_INTEREST_FAILED,
        LIQUIDATE_COLLATERAL_FRESHNESS_CHECK,
        LIQUIDATE_COMPTROLLER_REJECTION,
        LIQUIDATE_COMPTROLLER_CALCULATE_AMOUNT_SEIZE_FAILED,
        LIQUIDATE_CLOSE_AMOUNT_IS_UINT_MAX,
        LIQUIDATE_CLOSE_AMOUNT_IS_ZERO,
        LIQUIDATE_FRESHNESS_CHECK,
        LIQUIDATE_LIQUIDATOR_IS_BORROWER,
        LIQUIDATE_REPAY_BORROW_FRESH_FAILED,
        LIQUIDATE_SEIZE_BALANCE_INCREMENT_FAILED,
        LIQUIDATE_SEIZE_BALANCE_DECREMENT_FAILED,
        LIQUIDATE_SEIZE_COMPTROLLER_REJECTION,
        LIQUIDATE_SEIZE_LIQUIDATOR_IS_BORROWER,
        LIQUIDATE_SEIZE_TOO_MUCH,
        MINT_ACCRUE_INTEREST_FAILED,
        MINT_COMPTROLLER_REJECTION,
        MINT_EXCHANGE_CALCULATION_FAILED,
        MINT_EXCHANGE_RATE_READ_FAILED,
        MINT_FRESHNESS_CHECK,
        MINT_NEW_ACCOUNT_BALANCE_CALCULATION_FAILED,
        MINT_NEW_TOTAL_SUPPLY_CALCULATION_FAILED,
        MINT_TRANSFER_IN_FAILED,
        MINT_TRANSFER_IN_NOT_POSSIBLE,
        REDEEM_ACCRUE_INTEREST_FAILED,
        REDEEM_COMPTROLLER_REJECTION,
        REDEEM_EXCHANGE_TOKENS_CALCULATION_FAILED,
        REDEEM_EXCHANGE_AMOUNT_CALCULATION_FAILED,
        REDEEM_EXCHANGE_RATE_READ_FAILED,
        REDEEM_FRESHNESS_CHECK,
        REDEEM_NEW_ACCOUNT_BALANCE_CALCULATION_FAILED,
        REDEEM_NEW_TOTAL_SUPPLY_CALCULATION_FAILED,
        REDEEM_TRANSFER_OUT_NOT_POSSIBLE,
        REDUCE_RESERVES_ACCRUE_INTEREST_FAILED,
        REDUCE_RESERVES_ADMIN_CHECK,
        REDUCE_RESERVES_CASH_NOT_AVAILABLE,
        REDUCE_RESERVES_FRESH_CHECK,
        REDUCE_RESERVES_VALIDATION,
        REPAY_BEHALF_ACCRUE_INTEREST_FAILED,
        REPAY_BORROW_ACCRUE_INTEREST_FAILED,
        REPAY_BORROW_ACCUMULATED_BALANCE_CALCULATION_FAILED,
        REPAY_BORROW_COMPTROLLER_REJECTION,
        REPAY_BORROW_FRESHNESS_CHECK,
        REPAY_BORROW_NEW_ACCOUNT_BORROW_BALANCE_CALCULATION_FAILED,
        REPAY_BORROW_NEW_TOTAL_BALANCE_CALCULATION_FAILED,
        REPAY_BORROW_TRANSFER_IN_NOT_POSSIBLE,
        SET_COLLATERAL_FACTOR_OWNER_CHECK,
        SET_COLLATERAL_FACTOR_VALIDATION,
        SET_COMPTROLLER_OWNER_CHECK,
        SET_INTEREST_RATE_MODEL_ACCRUE_INTEREST_FAILED,
        SET_INTEREST_RATE_MODEL_FRESH_CHECK,
        SET_INTEREST_RATE_MODEL_OWNER_CHECK,
        SET_MAX_ASSETS_OWNER_CHECK,
        SET_ORACLE_MARKET_NOT_LISTED,
        SET_PENDING_ADMIN_OWNER_CHECK,
        SET_RESERVE_FACTOR_ACCRUE_INTEREST_FAILED,
        SET_RESERVE_FACTOR_ADMIN_CHECK,
        SET_RESERVE_FACTOR_FRESH_CHECK,
        SET_RESERVE_FACTOR_BOUNDS_CHECK,
        TRANSFER_COMPTROLLER_REJECTION,
        TRANSFER_NOT_ALLOWED,
        TRANSFER_NOT_ENOUGH,
        TRANSFER_TOO_MUCH,
        ADD_RESERVES_ACCRUE_INTEREST_FAILED,
        ADD_RESERVES_FRESH_CHECK,
        ADD_RESERVES_TRANSFER_IN_NOT_POSSIBLE,
        SET_PROTOCOL_SEIZE_SHARE_ACCRUE_INTEREST_FAILED,
        SET_PROTOCOL_SEIZE_SHARE_OWNER_CHECK,
        SET_PROTOCOL_SEIZE_SHARE_FRESH_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);
    }
}

Settings
{
  "remappings": [
    "@forge-std/=lib/forge-std/src/",
    "@openzeppelin-contracts/=lib/openzeppelin-contracts/",
    "@openzeppelin/=lib/openzeppelin-contracts/",
    "@openzeppelin-contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/",
    "@wormhole/=lib/wormhole/ethereum/contracts/",
    "@protocol/=src/",
    "@test/=test/",
    "@proposals/=proposals/",
    "@utils/=src/utils/",
    "@zelt/=lib/zelt/",
    "@deprecated/=deprecated/",
    "@script/=script/",
    "@zelt-src/=lib/zelt/src/",
    "@zelt-test/=lib/zelt/test/",
    "ds-test/=lib/solmate/lib/ds-test/src/",
    "erc4626-tests/=lib/openzeppelin-contracts-upgradeable/lib/erc4626-tests/",
    "forge-std/=lib/forge-std/src/",
    "openzeppelin-contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/",
    "openzeppelin-contracts/=lib/openzeppelin-contracts/",
    "openzeppelin/=lib/openzeppelin-contracts-upgradeable/contracts/",
    "solmate/=lib/solmate/src/",
    "wormhole/=lib/wormhole/",
    "zelt/=lib/zelt/src/"
  ],
  "optimizer": {
    "enabled": true,
    "runs": 1,
    "details": {}
  },
  "metadata": {
    "useLiteralContent": false,
    "bytecodeHash": "ipfs",
    "appendCBOR": true
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "evmVersion": "paris",
  "viaIR": false,
  "debug": {
    "revertStrings": "debug"
  },
  "libraries": {}
}

Contract Security Audit

Contract ABI

API
[{"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"},{"internalType":"address payable","name":"admin_","type":"address"},{"internalType":"address","name":"implementation_","type":"address"},{"internalType":"bytes","name":"becomeImplementationData","type":"bytes"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"cashPrior","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"interestAccumulated","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"borrowIndex","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"totalBorrows","type":"uint256"}],"name":"AccrueInterest","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"borrower","type":"address"},{"indexed":false,"internalType":"uint256","name":"borrowAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"accountBorrows","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"totalBorrows","type":"uint256"}],"name":"Borrow","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"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":"mTokenCollateral","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":"address","name":"oldImplementation","type":"address"},{"indexed":false,"internalType":"address","name":"newImplementation","type":"address"}],"name":"NewImplementation","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":"oldProtocolSeizeShareMantissa","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newProtocolSeizeShareMantissa","type":"uint256"}],"name":"NewProtocolSeizeShare","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"},{"stateMutability":"payable","type":"fallback"},{"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":"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":"address","name":"implementation_","type":"address"},{"internalType":"bool","name":"allowResign","type":"bool"},{"internalType":"bytes","name":"becomeImplementationData","type":"bytes"}],"name":"_setImplementation","outputs":[],"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":"newProtocolSeizeShareMantissa","type":"uint256"}],"name":"_setProtocolSeizeShare","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":"accrualBlockTimestamp","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":"borrowRatePerTimestamp","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":[{"internalType":"bytes","name":"data","type":"bytes"}],"name":"delegateToImplementation","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes","name":"data","type":"bytes"}],"name":"delegateToViewImplementation","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"exchangeRateCurrent","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"exchangeRateStored","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"getAccountSnapshot","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getCash","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"implementation","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"interestRateModel","outputs":[{"internalType":"contract InterestRateModel","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isMToken","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 MTokenInterface","name":"mTokenCollateral","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":[{"internalType":"uint256","name":"mintAmount","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"mintWithPermit","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":"supplyRatePerTimestamp","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"}]

60806040523480156200005e5760405162461bcd60e51b815260206004820152602260248201527f45746865722073656e7420746f206e6f6e2d70617961626c652066756e637469604482019081526137b760f11b6064830152608482fd5b50604051620032193803806200321983398101604081905262000081916200059d565b60038054610100600160a81b0319163361010002179055604051620000f2908390620000be908d908d908d908d908d908d908d90602401620006ed565b60408051601f198184030181529190526020810180516001600160e01b03908116631a31d46560e01b179091526200013716565b506200010182600083620001b3565b5050600380546001600160a01b0390921661010002610100600160a81b0319909216919091179055506200079095505050505050565b6060600080846001600160a01b03168460405162000156919062000756565b600060405180830381855af49150503d806000811462000193576040519150601f19603f3d011682016040523d82523d6000602084013e62000198565b606091505b50909250905081620001ab573d60208201fd5b949350505050565b60035461010090046001600160a01b031633146200023d5760405162461bcd60e51b815260206004820152603960248201527f4d457263323044656c656761746f723a3a5f736574496d706c656d656e74617460448201527f696f6e3a2043616c6c6572206d7573742062652061646d696e00000000000000606482015260840160405180910390fd5b81156200027f576040805160048152602481019091526020810180516001600160e01b0390811663153ab50560e01b179091526200027d91906200033a16565b505b601380546001600160a01b038581166001600160a01b0319831617909255604051911690620002ec90620002b890849060240162000774565b60408051601f198184030181529190526020810180516001600160e01b03908116630adccee560e31b179091526200033a16565b50601354604080516001600160a01b03808516825290921660208301527fd604de94d45953f9138079ec1b82d533cb2160c906d1076d1f7ed54befbca97a910160405180910390a150505050565b60135460609062000355906001600160a01b03168362000137565b92915050565b60405162461bcd60e51b815260206004820152602260248201527f414249206465636f64696e673a207475706c65206461746120746f6f2073686f6044820152611c9d60f21b6064820152608481fd5b60405162461bcd60e51b815260206004820152602260248201527f414249206465636f64696e673a20696e76616c6964207475706c65206f666673604482015261195d60f21b6064820152608481fd5b80516001600160a01b03811681146200041357600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b838110156200044b57818101518382015260200162000431565b50506000910152565b600082601f830112620004ba5760405162461bcd60e51b815260206004820152602b60248201527f414249206465636f64696e673a20696e76616c69642063616c6c64617461206160448201526a1c9c985e481bd9999cd95d60aa1b6064820152608481fd5b81516001600160401b0380821115620004d757620004d762000418565b604051601f8301601f19908116603f0116810190828211818310171562000502576200050262000418565b816040528381528660208588010111156200056e5760405162461bcd60e51b815260206004820152602760248201527f414249206465636f64696e673a20696e76616c69642062797465206172726179604482015266040d8cadccee8d60cb1b60648201529250608483fd5b620005818460208301602089016200042e565b9695505050505050565b805160ff811681146200041357600080fd5b6000806000806000806000806000806101408b8d031215620005c357620005c36200035b565b620005ce8b620003fb565b9950620005de60208c01620003fb565b9850620005ee60408c01620003fb565b60608c015160808d015191995097506001600160401b0380821115620006185762000618620003ab565b620006268e838f0162000454565b975060a08d0151915080821115620006425762000642620003ab565b620006508e838f0162000454565b96506200066060c08e016200058b565b95506200067060e08e01620003fb565b9450620006816101008e01620003fb565b93506101208d01519150808211156200069e576200069e620003ab565b50620006ad8d828e0162000454565b9150509295989b9194979a5092959850565b60008151808452620006d98160208601602086016200042e565b601f01601f19169290920160200192915050565b6001600160a01b0388811682528781166020830152861660408201526060810185905260e0608082018190526000906200072a90830186620006bf565b82810360a08401526200073e8186620006bf565b91505060ff831660c083015298975050505050505050565b600082516200076a8184602087016200042e565b9190910192915050565b602081526000620007896020830184620006bf565b9392505050565b612a7980620007a06000396000f3fe6080604052600436106102655760003560e01c806306fdde03146103555780630933c1ed146103bb578063095ea7b3146104165780630e75270214610481578063173b9904146104ea57806317bfdfbc1461053b57806318160ddd14610596578063182df0f5146105e75780631be195601461063757806323b872dd146106925780632608f818146106ed5780632678224714610748578063313ce567146107b05780633af9e669146108175780633b1d21a2146108725780633e941010146108c25780634487152f1461091d5780634576b5db1461097857806347bd3718146109d3578063555bcc4014610a245780635c60da1b14610a7f5780635fe3b56714610ada578063601a0bf114610b355780636752e70214610b90578063699cd5e214610be15780636f307dc314610c3157806370a0823114610c8c57806373acee9814610ce75780638303084614610d37578063852a12e314610d925780638f840ddd14610ded57806395d89b4114610e3e57806395dd919314610e8e578063a0712d6814610ee9578063a6afed9514610f44578063a9059cbb14610f94578063aa5af0fd14610fef578063b2a02ff114611040578063b71d1a0c1461109b578063bd6d894d146110f6578063c37f68e214611146578063c5ebeaec146111c1578063cd91801c1461121c578063cfa992011461126c578063d0248fb4146112bd578063d3bd2c7214611318578063db006a7514611368578063dd62ed3e146113c3578063e9c714f21461141e578063f2b3abbd1461146e578063f3fdb15a146114c9578063f5e3c46214611524578063f851a4401461157f578063fca7820b146115df575b34156102d85760405162461bcd60e51b815260206004820152603760248201527f4d457263323044656c656761746f723a66616c6c6261636b3a2063616e6e6f746044820152762073656e642076616c756520746f2066616c6c6261636b60481b60648201526084015b60405180910390fd5b6013546040516000916001600160a01b0316906102f890839036906123a1565b600060405180830381855af49150503d8060008114610333576040519150601f19603f3d011682016040523d82523d6000602084013e610338565b606091505b505090506040513d6000823e81801561034f573d82f35b3d82fd5b005b34801561039c5760405162461bcd60e51b81526020600482015260226024820152600080516020612a24833981519152604482019081526137b760f11b6064830152608482fd5b506103a561163a565b6040516103b29190612401565b60405180910390f35b3480156104025760405162461bcd60e51b81526020600482015260226024820152600080516020612a24833981519152604482019081526137b760f11b6064830152608482fd5b506103a561041136600461262b565b6116c8565b34801561045d5760405162461bcd60e51b81526020600482015260226024820152600080516020612a24833981519152604482019081526137b760f11b6064830152608482fd5b5061047161046c36600461267d565b6116e7565b60405190151581526020016103b2565b3480156104c85760405162461bcd60e51b81526020600482015260226024820152600080516020612a24833981519152604482019081526137b760f11b6064830152608482fd5b506104dc6104d73660046126ac565b61174d565b6040519081526020016103b2565b3480156105315760405162461bcd60e51b81526020600482015260226024820152600080516020612a24833981519152604482019081526137b760f11b6064830152608482fd5b506104dc60085481565b3480156105825760405162461bcd60e51b81526020600482015260226024820152600080516020612a24833981519152604482019081526137b760f11b6064830152608482fd5b506104dc6105913660046126c8565b6117b2565b3480156105dd5760405162461bcd60e51b81526020600482015260226024820152600080516020612a24833981519152604482019081526137b760f11b6064830152608482fd5b506104dc600d5481565b34801561062e5760405162461bcd60e51b81526020600482015260226024820152600080516020612a24833981519152604482019081526137b760f11b6064830152608482fd5b506104dc6117f8565b34801561067e5760405162461bcd60e51b81526020600482015260226024820152600080516020612a24833981519152604482019081526137b760f11b6064830152608482fd5b5061035361068d3660046126c8565b61184b565b3480156106d95760405162461bcd60e51b81526020600482015260226024820152600080516020612a24833981519152604482019081526137b760f11b6064830152608482fd5b506104716106e83660046126e8565b611891565b3480156107345760405162461bcd60e51b81526020600482015260226024820152600080516020612a24833981519152604482019081526137b760f11b6064830152608482fd5b506104dc61074336600461267d565b6118fa565b34801561078f5760405162461bcd60e51b81526020600482015260226024820152600080516020612a24833981519152604482019081526137b760f11b6064830152608482fd5b506004546107a3906001600160a01b031681565b6040516103b2919061272c565b3480156107f75760405162461bcd60e51b81526020600482015260226024820152600080516020612a24833981519152604482019081526137b760f11b6064830152608482fd5b506003546108059060ff1681565b60405160ff90911681526020016103b2565b34801561085e5760405162461bcd60e51b81526020600482015260226024820152600080516020612a24833981519152604482019081526137b760f11b6064830152608482fd5b506104dc61086d3660046126c8565b611958565b3480156108b95760405162461bcd60e51b81526020600482015260226024820152600080516020612a24833981519152604482019081526137b760f11b6064830152608482fd5b506104dc61199e565b3480156109095760405162461bcd60e51b81526020600482015260226024820152600080516020612a24833981519152604482019081526137b760f11b6064830152608482fd5b506104dc6109183660046126ac565b6119d5565b3480156109645760405162461bcd60e51b81526020600482015260226024820152600080516020612a24833981519152604482019081526137b760f11b6064830152608482fd5b506103a561097336600461262b565b611a1d565b3480156109bf5760405162461bcd60e51b81526020600482015260226024820152600080516020612a24833981519152604482019081526137b760f11b6064830152608482fd5b506104dc6109ce3660046126c8565b611ad8565b348015610a1a5760405162461bcd60e51b81526020600482015260226024820152600080516020612a24833981519152604482019081526137b760f11b6064830152608482fd5b506104dc600b5481565b348015610a6b5760405162461bcd60e51b81526020600482015260226024820152600080516020612a24833981519152604482019081526137b760f11b6064830152608482fd5b50610353610a7a36600461274e565b611b1e565b348015610ac65760405162461bcd60e51b81526020600482015260226024820152600080516020612a24833981519152604482019081526137b760f11b6064830152608482fd5b506013546107a3906001600160a01b031681565b348015610b215760405162461bcd60e51b81526020600482015260226024820152600080516020612a24833981519152604482019081526137b760f11b6064830152608482fd5b506005546107a3906001600160a01b031681565b348015610b7c5760405162461bcd60e51b81526020600482015260226024820152600080516020612a24833981519152604482019081526137b760f11b6064830152608482fd5b506104dc610b8b3660046126ac565b611c8a565b348015610bd75760405162461bcd60e51b81526020600482015260226024820152600080516020612a24833981519152604482019081526137b760f11b6064830152608482fd5b506104dc60115481565b348015610c285760405162461bcd60e51b81526020600482015260226024820152600080516020612a24833981519152604482019081526137b760f11b6064830152608482fd5b50610471600181565b348015610c785760405162461bcd60e51b81526020600482015260226024820152600080516020612a24833981519152604482019081526137b760f11b6064830152608482fd5b506012546107a3906001600160a01b031681565b348015610cd35760405162461bcd60e51b81526020600482015260226024820152600080516020612a24833981519152604482019081526137b760f11b6064830152608482fd5b506104dc610ce23660046126c8565b611cd2565b348015610d2e5760405162461bcd60e51b81526020600482015260226024820152600080516020612a24833981519152604482019081526137b760f11b6064830152608482fd5b506104dc611d18565b348015610d7e5760405162461bcd60e51b81526020600482015260226024820152600080516020612a24833981519152604482019081526137b760f11b6064830152608482fd5b506104dc610d8d3660046126ac565b611d4f565b348015610dd95760405162461bcd60e51b81526020600482015260226024820152600080516020612a24833981519152604482019081526137b760f11b6064830152608482fd5b506104dc610de83660046126ac565b611d97565b348015610e345760405162461bcd60e51b81526020600482015260226024820152600080516020612a24833981519152604482019081526137b760f11b6064830152608482fd5b506104dc600c5481565b348015610e855760405162461bcd60e51b81526020600482015260226024820152600080516020612a24833981519152604482019081526137b760f11b6064830152608482fd5b506103a5611ddf565b348015610ed55760405162461bcd60e51b81526020600482015260226024820152600080516020612a24833981519152604482019081526137b760f11b6064830152608482fd5b506104dc610ee43660046126c8565b611dec565b348015610f305760405162461bcd60e51b81526020600482015260226024820152600080516020612a24833981519152604482019081526137b760f11b6064830152608482fd5b506104dc610f3f3660046126ac565b611e32565b348015610f8b5760405162461bcd60e51b81526020600482015260226024820152600080516020612a24833981519152604482019081526137b760f11b6064830152608482fd5b506104dc611e7a565b348015610fdb5760405162461bcd60e51b81526020600482015260226024820152600080516020612a24833981519152604482019081526137b760f11b6064830152608482fd5b50610471610fea36600461267d565b611eb1565b3480156110365760405162461bcd60e51b81526020600482015260226024820152600080516020612a24833981519152604482019081526137b760f11b6064830152608482fd5b506104dc600a5481565b3480156110875760405162461bcd60e51b81526020600482015260226024820152600080516020612a24833981519152604482019081526137b760f11b6064830152608482fd5b506104dc6110963660046126e8565b611ef9565b3480156110e25760405162461bcd60e51b81526020600482015260226024820152600080516020612a24833981519152604482019081526137b760f11b6064830152608482fd5b506104dc6110f13660046126c8565b611f59565b34801561113d5760405162461bcd60e51b81526020600482015260226024820152600080516020612a24833981519152604482019081526137b760f11b6064830152608482fd5b506104dc611f9f565b34801561118d5760405162461bcd60e51b81526020600482015260226024820152600080516020612a24833981519152604482019081526137b760f11b6064830152608482fd5b506111a161119c3660046126c8565b611fd6565b6040805194855260208501939093529183015260608201526080016103b2565b3480156112085760405162461bcd60e51b81526020600482015260226024820152600080516020612a24833981519152604482019081526137b760f11b6064830152608482fd5b506104dc6112173660046126ac565b612047565b3480156112635760405162461bcd60e51b81526020600482015260226024820152600080516020612a24833981519152604482019081526137b760f11b6064830152608482fd5b506104dc61208f565b3480156112b35760405162461bcd60e51b81526020600482015260226024820152600080516020612a24833981519152604482019081526137b760f11b6064830152608482fd5b506104dc60095481565b3480156113045760405162461bcd60e51b81526020600482015260226024820152600080516020612a24833981519152604482019081526137b760f11b6064830152608482fd5b506104dc6113133660046127b5565b6120c6565b34801561135f5760405162461bcd60e51b81526020600482015260226024820152600080516020612a24833981519152604482019081526137b760f11b6064830152608482fd5b506104dc61214a565b3480156113af5760405162461bcd60e51b81526020600482015260226024820152600080516020612a24833981519152604482019081526137b760f11b6064830152608482fd5b506104dc6113be3660046126ac565b612181565b34801561140a5760405162461bcd60e51b81526020600482015260226024820152600080516020612a24833981519152604482019081526137b760f11b6064830152608482fd5b506104dc611419366004612807565b6121c9565b3480156114655760405162461bcd60e51b81526020600482015260226024820152600080516020612a24833981519152604482019081526137b760f11b6064830152608482fd5b506104dc612211565b3480156114b55760405162461bcd60e51b81526020600482015260226024820152600080516020612a24833981519152604482019081526137b760f11b6064830152608482fd5b506104dc6114c43660046126c8565b612248565b3480156115105760405162461bcd60e51b81526020600482015260226024820152600080516020612a24833981519152604482019081526137b760f11b6064830152608482fd5b506006546107a3906001600160a01b031681565b34801561156b5760405162461bcd60e51b81526020600482015260226024820152600080516020612a24833981519152604482019081526137b760f11b6064830152608482fd5b506104dc61157a366004612843565b61228e565b3480156115c65760405162461bcd60e51b81526020600482015260226024820152600080516020612a24833981519152604482019081526137b760f11b6064830152608482fd5b506003546107a39061010090046001600160a01b031681565b3480156116265760405162461bcd60e51b81526020600482015260226024820152600080516020612a24833981519152604482019081526137b760f11b6064830152608482fd5b506104dc6116353660046126ac565b6122ea565b6001805461164790612888565b80601f016020809104026020016040519081016040528092919081815260200182805461167390612888565b80156116c05780601f10611695576101008083540402835291602001916116c0565b820191906000526020600020905b8154815290600101906020018083116116a357829003601f168201915b505050505081565b6013546060906116e1906001600160a01b031683612332565b92915050565b60008061172f84846040516024016117009291906128c2565b60408051601f198184030181529190526020810180516001600160e01b031663095ea7b360e01b1790526116c8565b90508080602001905181019061174591906128db565b949350505050565b6000806117958360405160240161176691815260200190565b60408051601f198184030181529190526020810180516001600160e01b031663073a938160e11b1790526116c8565b9050808060200190518101906117ab91906128fb565b9392505050565b600080611795836040516024016117c9919061272c565b60408051601f198184030181529190526020810180516001600160e01b03166305eff7ef60e21b1790526116c8565b6040805160048152602481019091526020810180516001600160e01b031663182df0f560e01b179052600090819061182f90611a1d565b90508080602001905181019061184591906128fb565b91505090565b61188d8160405160240161185f919061272c565b60408051601f198184030181529190526020810180516001600160e01b031662df0cab60e51b1790526116c8565b5050565b6000806118db8585856040516024016118ac93929190612917565b60408051601f198184030181529190526020810180516001600160e01b03166323b872dd60e01b1790526116c8565b9050808060200190518101906118f191906128db565b95945050505050565b60008061194284846040516024016119139291906128c2565b60408051601f198184030181529190526020810180516001600160e01b03166304c11f0360e31b1790526116c8565b90508080602001905181019061174591906128fb565b6000806117958360405160240161196f919061272c565b60408051601f198184030181529190526020810180516001600160e01b0316633af9e66960e01b1790526116c8565b6040805160048152602481019091526020810180516001600160e01b0316631d8e90d160e11b179052600090819061182f90611a1d565b600080611795836040516024016119ee91815260200190565b60408051601f198184030181529190526020810180516001600160e01b03166303e9410160e41b1790526116c8565b6060600080306001600160a01b031684604051602401611a3d9190612401565b60408051601f198184030181529181526020820180516001600160e01b0316630933c1ed60e01b17905251611a72919061293b565b600060405180830381855afa9150503d8060008114611aad576040519150601f19603f3d011682016040523d82523d6000602084013e611ab2565b606091505b50909250905081611ac4573d60208201fd5b808060200190518101906117459190612957565b60008061179583604051602401611aef919061272c565b60408051601f198184030181529190526020810180516001600160e01b0316634576b5db60e01b1790526116c8565b60035461010090046001600160a01b03163314611b9f5760405162461bcd60e51b815260206004820152603960248201527f4d457263323044656c656761746f723a3a5f736574496d706c656d656e74617460448201527834b7b71d1021b0b63632b91036bab9ba1031329030b236b4b760391b60648201526084016102cf565b8115611bd9576040805160048152602481019091526020810180516001600160e01b031663153ab50560e01b179052611bd7906116c8565b505b601380546001600160a01b038581166001600160a01b0319831617909255604051911690611c3e90611c0f908490602401612401565b60408051601f198184030181529190526020810180516001600160e01b0316630adccee560e31b1790526116c8565b506013546040517fd604de94d45953f9138079ec1b82d533cb2160c906d1076d1f7ed54befbca97a91611c7c9184916001600160a01b0316906129d0565b60405180910390a150505050565b60008061179583604051602401611ca391815260200190565b60408051601f198184030181529190526020810180516001600160e01b031663601a0bf160e01b1790526116c8565b60008061179583604051602401611ce9919061272c565b60408051601f198184030181529190526020810180516001600160e01b03166370a0823160e01b179052611a1d565b6040805160048152602481019091526020810180516001600160e01b0316630e759dd360e31b179052600090819061182f906116c8565b60008061179583604051602401611d6891815260200190565b60408051601f198184030181529190526020810180516001600160e01b0316634181842360e11b1790526116c8565b60008061179583604051602401611db091815260200190565b60408051601f198184030181529190526020810180516001600160e01b031663852a12e360e01b1790526116c8565b6002805461164790612888565b60008061179583604051602401611e03919061272c565b60408051601f198184030181529190526020810180516001600160e01b03166395dd919360e01b179052611a1d565b60008061179583604051602401611e4b91815260200190565b60408051601f198184030181529190526020810180516001600160e01b031663140e25ad60e31b1790526116c8565b6040805160048152602481019091526020810180516001600160e01b031663a6afed9560e01b179052600090819061182f906116c8565b60008061172f8484604051602401611eca9291906128c2565b60408051601f198184030181529190526020810180516001600160e01b031663a9059cbb60e01b1790526116c8565b600080611f43858585604051602401611f1493929190612917565b60408051601f198184030181529190526020810180516001600160e01b031663b2a02ff160e01b1790526116c8565b9050808060200190518101906118f191906128fb565b60008061179583604051602401611f70919061272c565b60408051601f198184030181529190526020810180516001600160e01b0316632dc7468360e21b1790526116c8565b6040805160048152602481019091526020810180516001600160e01b031663bd6d894d60e01b179052600090819061182f906116c8565b600080600080600061202186604051602401611ff2919061272c565b60408051601f198184030181529190526020810180516001600160e01b03166361bfb47160e11b179052611a1d565b90508080602001905181019061203791906129ea565b9450945094509450509193509193565b6000806117958360405160240161206091815260200190565b60408051601f198184030181529190526020810180516001600160e01b031663317afabb60e21b1790526116c8565b6040805160048152602481019091526020810180516001600160e01b0316633364600760e21b179052600090819061182f90611a1d565b604051602481018690526044810185905260ff841660648201526084810183905260a4810182905260009081906121299060c40160408051601f198184030181529190526020810180516001600160e01b031663340923ed60e21b1790526116c8565b90508080602001905181019061213f91906128fb565b979650505050505050565b6040805160048152602481019091526020810180516001600160e01b03166369de963960e11b179052600090819061182f90611a1d565b6000806117958360405160240161219a91815260200190565b60408051601f198184030181529190526020810180516001600160e01b031663db006a7560e01b1790526116c8565b60008061194284846040516024016121e29291906129d0565b60408051601f198184030181529190526020810180516001600160e01b0316636eb1769f60e11b179052611a1d565b6040805160048152602481019091526020810180516001600160e01b03166374e38a7960e11b179052600090819061182f906116c8565b6000806117958360405160240161225f919061272c565b60408051601f198184030181529190526020810180516001600160e01b031663f2b3abbd60e01b1790526116c8565b6040516001600160a01b03808516602483015260448201849052821660648201526000908190611f439060840160408051601f198184030181529190526020810180516001600160e01b0316637af1e23160e11b1790526116c8565b6000806117958360405160240161230391815260200190565b60408051601f198184030181529190526020810180516001600160e01b031663fca7820b60e01b1790526116c8565b6060600080846001600160a01b03168460405161234f919061293b565b600060405180830381855af49150503d806000811461238a576040519150601f19603f3d011682016040523d82523d6000602084013e61238f565b606091505b50909250905081611745573d60208201fd5b8183823760009101908152919050565b60005b838110156123cc5781810151838201526020016123b4565b50506000910152565b600081518084526123ed8160208601602086016123b1565b601f01601f19169290920160200192915050565b6020815260006117ab60208301846123d5565b60405162461bcd60e51b815260206004820152602260248201527f414249206465636f64696e673a207475706c65206461746120746f6f2073686f6044820152611c9d60f21b6064820152608481fd5b60405162461bcd60e51b815260206004820152602260248201527f414249206465636f64696e673a20696e76616c6964207475706c65206f666673604482015261195d60f21b6064820152608481fd5b60405162461bcd60e51b815260206004820152602b60248201527f414249206465636f64696e673a20696e76616c69642063616c6c64617461206160448201526a1c9c985e481bd9999cd95d60aa1b6064820152608481fd5b60405162461bcd60e51b815260206004820152602760248201527f414249206465636f64696e673a20696e76616c69642062797465206172726179604482015266040d8cadccee8d60cb1b6064820152608481fd5b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b03811182821017156125a0576125a0612562565b604052919050565b60006001600160401b038211156125c1576125c1612562565b50601f01601f191660200190565b600082601f8301126125e3576125e36124b4565b81356125f66125f1826125a8565b612578565b81815284602083860101111561260e5761260e61250d565b816020850160208301376000918101602001919091529392505050565b60006020828403121561264057612640612414565b81356001600160401b0381111561265957612659612464565b611745848285016125cf565b6001600160a01b038116811461267a57600080fd5b50565b6000806040838503121561269357612693612414565b823561269e81612665565b946020939093013593505050565b6000602082840312156126c1576126c1612414565b5035919050565b6000602082840312156126dd576126dd612414565b81356117ab81612665565b60008060006060848603121561270057612700612414565b833561270b81612665565b9250602084013561271b81612665565b929592945050506040919091013590565b6001600160a01b0391909116815260200190565b801515811461267a57600080fd5b60008060006060848603121561276657612766612414565b833561277181612665565b9250602084013561278181612740565b915060408401356001600160401b0381111561279f5761279f612464565b6127ab868287016125cf565b9150509250925092565b600080600080600060a086880312156127d0576127d0612414565b8535945060208601359350604086013560ff811681146127ef57600080fd5b94979396509394606081013594506080013592915050565b6000806040838503121561281d5761281d612414565b823561282881612665565b9150602083013561283881612665565b809150509250929050565b60008060006060848603121561285b5761285b612414565b833561286681612665565b925060208401359150604084013561287d81612665565b809150509250925092565b600181811c9082168061289c57607f821691505b6020821081036128bc57634e487b7160e01b600052602260045260246000fd5b50919050565b6001600160a01b03929092168252602082015260400190565b6000602082840312156128f0576128f0612414565b81516117ab81612740565b60006020828403121561291057612910612414565b5051919050565b6001600160a01b039384168152919092166020820152604081019190915260600190565b6000825161294d8184602087016123b1565b9190910192915050565b60006020828403121561296c5761296c612414565b81516001600160401b0381111561298557612985612464565b8201601f81018413612999576129996124b4565b80516129a76125f1826125a8565b8181528560208385010111156129bf576129bf61250d565b6118f18260208301602086016123b1565b6001600160a01b0392831681529116602082015260400190565b60008060008060808587031215612a0357612a03612414565b50508251602084015160408501516060909501519196909550909250905056fe45746865722073656e7420746f206e6f6e2d70617961626c652066756e637469a26469706673582212208b37fc03a8a9185207967e131636cff94924407ce5ddfacd059ae6931bd7e6d864736f6c6343000813003300000000000000000000000001bff41798a0bcf287b996046ca68b395dbc1071000000000000000000000000ca889f40aae37fff165bccf69aef1e82b5c511b9000000000000000000000000eb7605508225517fe289c46406999f31b96c3b4a0000000000000000000000000000000000000000000000000000b5e620f4800000000000000000000000000000000000000000000000000000000000000001400000000000000000000000000000000000000000000000000000000000000180000000000000000000000000000000000000000000000000000000000000000800000000000000000000000017c9ba3fda7ec71ccfd75f978ef31e21927aff3d000000000000000000000000a9ce0a4de55791c5792b50531b18befc30b09dcc00000000000000000000000000000000000000000000000000000000000001c0000000000000000000000000000000000000000000000000000000000000000e4d6f6f6e77656c6c20555344543000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000066d555344543000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000

Deployed Bytecode

0x6080604052600436106102655760003560e01c806306fdde03146103555780630933c1ed146103bb578063095ea7b3146104165780630e75270214610481578063173b9904146104ea57806317bfdfbc1461053b57806318160ddd14610596578063182df0f5146105e75780631be195601461063757806323b872dd146106925780632608f818146106ed5780632678224714610748578063313ce567146107b05780633af9e669146108175780633b1d21a2146108725780633e941010146108c25780634487152f1461091d5780634576b5db1461097857806347bd3718146109d3578063555bcc4014610a245780635c60da1b14610a7f5780635fe3b56714610ada578063601a0bf114610b355780636752e70214610b90578063699cd5e214610be15780636f307dc314610c3157806370a0823114610c8c57806373acee9814610ce75780638303084614610d37578063852a12e314610d925780638f840ddd14610ded57806395d89b4114610e3e57806395dd919314610e8e578063a0712d6814610ee9578063a6afed9514610f44578063a9059cbb14610f94578063aa5af0fd14610fef578063b2a02ff114611040578063b71d1a0c1461109b578063bd6d894d146110f6578063c37f68e214611146578063c5ebeaec146111c1578063cd91801c1461121c578063cfa992011461126c578063d0248fb4146112bd578063d3bd2c7214611318578063db006a7514611368578063dd62ed3e146113c3578063e9c714f21461141e578063f2b3abbd1461146e578063f3fdb15a146114c9578063f5e3c46214611524578063f851a4401461157f578063fca7820b146115df575b34156102d85760405162461bcd60e51b815260206004820152603760248201527f4d457263323044656c656761746f723a66616c6c6261636b3a2063616e6e6f746044820152762073656e642076616c756520746f2066616c6c6261636b60481b60648201526084015b60405180910390fd5b6013546040516000916001600160a01b0316906102f890839036906123a1565b600060405180830381855af49150503d8060008114610333576040519150601f19603f3d011682016040523d82523d6000602084013e610338565b606091505b505090506040513d6000823e81801561034f573d82f35b3d82fd5b005b34801561039c5760405162461bcd60e51b81526020600482015260226024820152600080516020612a24833981519152604482019081526137b760f11b6064830152608482fd5b506103a561163a565b6040516103b29190612401565b60405180910390f35b3480156104025760405162461bcd60e51b81526020600482015260226024820152600080516020612a24833981519152604482019081526137b760f11b6064830152608482fd5b506103a561041136600461262b565b6116c8565b34801561045d5760405162461bcd60e51b81526020600482015260226024820152600080516020612a24833981519152604482019081526137b760f11b6064830152608482fd5b5061047161046c36600461267d565b6116e7565b60405190151581526020016103b2565b3480156104c85760405162461bcd60e51b81526020600482015260226024820152600080516020612a24833981519152604482019081526137b760f11b6064830152608482fd5b506104dc6104d73660046126ac565b61174d565b6040519081526020016103b2565b3480156105315760405162461bcd60e51b81526020600482015260226024820152600080516020612a24833981519152604482019081526137b760f11b6064830152608482fd5b506104dc60085481565b3480156105825760405162461bcd60e51b81526020600482015260226024820152600080516020612a24833981519152604482019081526137b760f11b6064830152608482fd5b506104dc6105913660046126c8565b6117b2565b3480156105dd5760405162461bcd60e51b81526020600482015260226024820152600080516020612a24833981519152604482019081526137b760f11b6064830152608482fd5b506104dc600d5481565b34801561062e5760405162461bcd60e51b81526020600482015260226024820152600080516020612a24833981519152604482019081526137b760f11b6064830152608482fd5b506104dc6117f8565b34801561067e5760405162461bcd60e51b81526020600482015260226024820152600080516020612a24833981519152604482019081526137b760f11b6064830152608482fd5b5061035361068d3660046126c8565b61184b565b3480156106d95760405162461bcd60e51b81526020600482015260226024820152600080516020612a24833981519152604482019081526137b760f11b6064830152608482fd5b506104716106e83660046126e8565b611891565b3480156107345760405162461bcd60e51b81526020600482015260226024820152600080516020612a24833981519152604482019081526137b760f11b6064830152608482fd5b506104dc61074336600461267d565b6118fa565b34801561078f5760405162461bcd60e51b81526020600482015260226024820152600080516020612a24833981519152604482019081526137b760f11b6064830152608482fd5b506004546107a3906001600160a01b031681565b6040516103b2919061272c565b3480156107f75760405162461bcd60e51b81526020600482015260226024820152600080516020612a24833981519152604482019081526137b760f11b6064830152608482fd5b506003546108059060ff1681565b60405160ff90911681526020016103b2565b34801561085e5760405162461bcd60e51b81526020600482015260226024820152600080516020612a24833981519152604482019081526137b760f11b6064830152608482fd5b506104dc61086d3660046126c8565b611958565b3480156108b95760405162461bcd60e51b81526020600482015260226024820152600080516020612a24833981519152604482019081526137b760f11b6064830152608482fd5b506104dc61199e565b3480156109095760405162461bcd60e51b81526020600482015260226024820152600080516020612a24833981519152604482019081526137b760f11b6064830152608482fd5b506104dc6109183660046126ac565b6119d5565b3480156109645760405162461bcd60e51b81526020600482015260226024820152600080516020612a24833981519152604482019081526137b760f11b6064830152608482fd5b506103a561097336600461262b565b611a1d565b3480156109bf5760405162461bcd60e51b81526020600482015260226024820152600080516020612a24833981519152604482019081526137b760f11b6064830152608482fd5b506104dc6109ce3660046126c8565b611ad8565b348015610a1a5760405162461bcd60e51b81526020600482015260226024820152600080516020612a24833981519152604482019081526137b760f11b6064830152608482fd5b506104dc600b5481565b348015610a6b5760405162461bcd60e51b81526020600482015260226024820152600080516020612a24833981519152604482019081526137b760f11b6064830152608482fd5b50610353610a7a36600461274e565b611b1e565b348015610ac65760405162461bcd60e51b81526020600482015260226024820152600080516020612a24833981519152604482019081526137b760f11b6064830152608482fd5b506013546107a3906001600160a01b031681565b348015610b215760405162461bcd60e51b81526020600482015260226024820152600080516020612a24833981519152604482019081526137b760f11b6064830152608482fd5b506005546107a3906001600160a01b031681565b348015610b7c5760405162461bcd60e51b81526020600482015260226024820152600080516020612a24833981519152604482019081526137b760f11b6064830152608482fd5b506104dc610b8b3660046126ac565b611c8a565b348015610bd75760405162461bcd60e51b81526020600482015260226024820152600080516020612a24833981519152604482019081526137b760f11b6064830152608482fd5b506104dc60115481565b348015610c285760405162461bcd60e51b81526020600482015260226024820152600080516020612a24833981519152604482019081526137b760f11b6064830152608482fd5b50610471600181565b348015610c785760405162461bcd60e51b81526020600482015260226024820152600080516020612a24833981519152604482019081526137b760f11b6064830152608482fd5b506012546107a3906001600160a01b031681565b348015610cd35760405162461bcd60e51b81526020600482015260226024820152600080516020612a24833981519152604482019081526137b760f11b6064830152608482fd5b506104dc610ce23660046126c8565b611cd2565b348015610d2e5760405162461bcd60e51b81526020600482015260226024820152600080516020612a24833981519152604482019081526137b760f11b6064830152608482fd5b506104dc611d18565b348015610d7e5760405162461bcd60e51b81526020600482015260226024820152600080516020612a24833981519152604482019081526137b760f11b6064830152608482fd5b506104dc610d8d3660046126ac565b611d4f565b348015610dd95760405162461bcd60e51b81526020600482015260226024820152600080516020612a24833981519152604482019081526137b760f11b6064830152608482fd5b506104dc610de83660046126ac565b611d97565b348015610e345760405162461bcd60e51b81526020600482015260226024820152600080516020612a24833981519152604482019081526137b760f11b6064830152608482fd5b506104dc600c5481565b348015610e855760405162461bcd60e51b81526020600482015260226024820152600080516020612a24833981519152604482019081526137b760f11b6064830152608482fd5b506103a5611ddf565b348015610ed55760405162461bcd60e51b81526020600482015260226024820152600080516020612a24833981519152604482019081526137b760f11b6064830152608482fd5b506104dc610ee43660046126c8565b611dec565b348015610f305760405162461bcd60e51b81526020600482015260226024820152600080516020612a24833981519152604482019081526137b760f11b6064830152608482fd5b506104dc610f3f3660046126ac565b611e32565b348015610f8b5760405162461bcd60e51b81526020600482015260226024820152600080516020612a24833981519152604482019081526137b760f11b6064830152608482fd5b506104dc611e7a565b348015610fdb5760405162461bcd60e51b81526020600482015260226024820152600080516020612a24833981519152604482019081526137b760f11b6064830152608482fd5b50610471610fea36600461267d565b611eb1565b3480156110365760405162461bcd60e51b81526020600482015260226024820152600080516020612a24833981519152604482019081526137b760f11b6064830152608482fd5b506104dc600a5481565b3480156110875760405162461bcd60e51b81526020600482015260226024820152600080516020612a24833981519152604482019081526137b760f11b6064830152608482fd5b506104dc6110963660046126e8565b611ef9565b3480156110e25760405162461bcd60e51b81526020600482015260226024820152600080516020612a24833981519152604482019081526137b760f11b6064830152608482fd5b506104dc6110f13660046126c8565b611f59565b34801561113d5760405162461bcd60e51b81526020600482015260226024820152600080516020612a24833981519152604482019081526137b760f11b6064830152608482fd5b506104dc611f9f565b34801561118d5760405162461bcd60e51b81526020600482015260226024820152600080516020612a24833981519152604482019081526137b760f11b6064830152608482fd5b506111a161119c3660046126c8565b611fd6565b6040805194855260208501939093529183015260608201526080016103b2565b3480156112085760405162461bcd60e51b81526020600482015260226024820152600080516020612a24833981519152604482019081526137b760f11b6064830152608482fd5b506104dc6112173660046126ac565b612047565b3480156112635760405162461bcd60e51b81526020600482015260226024820152600080516020612a24833981519152604482019081526137b760f11b6064830152608482fd5b506104dc61208f565b3480156112b35760405162461bcd60e51b81526020600482015260226024820152600080516020612a24833981519152604482019081526137b760f11b6064830152608482fd5b506104dc60095481565b3480156113045760405162461bcd60e51b81526020600482015260226024820152600080516020612a24833981519152604482019081526137b760f11b6064830152608482fd5b506104dc6113133660046127b5565b6120c6565b34801561135f5760405162461bcd60e51b81526020600482015260226024820152600080516020612a24833981519152604482019081526137b760f11b6064830152608482fd5b506104dc61214a565b3480156113af5760405162461bcd60e51b81526020600482015260226024820152600080516020612a24833981519152604482019081526137b760f11b6064830152608482fd5b506104dc6113be3660046126ac565b612181565b34801561140a5760405162461bcd60e51b81526020600482015260226024820152600080516020612a24833981519152604482019081526137b760f11b6064830152608482fd5b506104dc611419366004612807565b6121c9565b3480156114655760405162461bcd60e51b81526020600482015260226024820152600080516020612a24833981519152604482019081526137b760f11b6064830152608482fd5b506104dc612211565b3480156114b55760405162461bcd60e51b81526020600482015260226024820152600080516020612a24833981519152604482019081526137b760f11b6064830152608482fd5b506104dc6114c43660046126c8565b612248565b3480156115105760405162461bcd60e51b81526020600482015260226024820152600080516020612a24833981519152604482019081526137b760f11b6064830152608482fd5b506006546107a3906001600160a01b031681565b34801561156b5760405162461bcd60e51b81526020600482015260226024820152600080516020612a24833981519152604482019081526137b760f11b6064830152608482fd5b506104dc61157a366004612843565b61228e565b3480156115c65760405162461bcd60e51b81526020600482015260226024820152600080516020612a24833981519152604482019081526137b760f11b6064830152608482fd5b506003546107a39061010090046001600160a01b031681565b3480156116265760405162461bcd60e51b81526020600482015260226024820152600080516020612a24833981519152604482019081526137b760f11b6064830152608482fd5b506104dc6116353660046126ac565b6122ea565b6001805461164790612888565b80601f016020809104026020016040519081016040528092919081815260200182805461167390612888565b80156116c05780601f10611695576101008083540402835291602001916116c0565b820191906000526020600020905b8154815290600101906020018083116116a357829003601f168201915b505050505081565b6013546060906116e1906001600160a01b031683612332565b92915050565b60008061172f84846040516024016117009291906128c2565b60408051601f198184030181529190526020810180516001600160e01b031663095ea7b360e01b1790526116c8565b90508080602001905181019061174591906128db565b949350505050565b6000806117958360405160240161176691815260200190565b60408051601f198184030181529190526020810180516001600160e01b031663073a938160e11b1790526116c8565b9050808060200190518101906117ab91906128fb565b9392505050565b600080611795836040516024016117c9919061272c565b60408051601f198184030181529190526020810180516001600160e01b03166305eff7ef60e21b1790526116c8565b6040805160048152602481019091526020810180516001600160e01b031663182df0f560e01b179052600090819061182f90611a1d565b90508080602001905181019061184591906128fb565b91505090565b61188d8160405160240161185f919061272c565b60408051601f198184030181529190526020810180516001600160e01b031662df0cab60e51b1790526116c8565b5050565b6000806118db8585856040516024016118ac93929190612917565b60408051601f198184030181529190526020810180516001600160e01b03166323b872dd60e01b1790526116c8565b9050808060200190518101906118f191906128db565b95945050505050565b60008061194284846040516024016119139291906128c2565b60408051601f198184030181529190526020810180516001600160e01b03166304c11f0360e31b1790526116c8565b90508080602001905181019061174591906128fb565b6000806117958360405160240161196f919061272c565b60408051601f198184030181529190526020810180516001600160e01b0316633af9e66960e01b1790526116c8565b6040805160048152602481019091526020810180516001600160e01b0316631d8e90d160e11b179052600090819061182f90611a1d565b600080611795836040516024016119ee91815260200190565b60408051601f198184030181529190526020810180516001600160e01b03166303e9410160e41b1790526116c8565b6060600080306001600160a01b031684604051602401611a3d9190612401565b60408051601f198184030181529181526020820180516001600160e01b0316630933c1ed60e01b17905251611a72919061293b565b600060405180830381855afa9150503d8060008114611aad576040519150601f19603f3d011682016040523d82523d6000602084013e611ab2565b606091505b50909250905081611ac4573d60208201fd5b808060200190518101906117459190612957565b60008061179583604051602401611aef919061272c565b60408051601f198184030181529190526020810180516001600160e01b0316634576b5db60e01b1790526116c8565b60035461010090046001600160a01b03163314611b9f5760405162461bcd60e51b815260206004820152603960248201527f4d457263323044656c656761746f723a3a5f736574496d706c656d656e74617460448201527834b7b71d1021b0b63632b91036bab9ba1031329030b236b4b760391b60648201526084016102cf565b8115611bd9576040805160048152602481019091526020810180516001600160e01b031663153ab50560e01b179052611bd7906116c8565b505b601380546001600160a01b038581166001600160a01b0319831617909255604051911690611c3e90611c0f908490602401612401565b60408051601f198184030181529190526020810180516001600160e01b0316630adccee560e31b1790526116c8565b506013546040517fd604de94d45953f9138079ec1b82d533cb2160c906d1076d1f7ed54befbca97a91611c7c9184916001600160a01b0316906129d0565b60405180910390a150505050565b60008061179583604051602401611ca391815260200190565b60408051601f198184030181529190526020810180516001600160e01b031663601a0bf160e01b1790526116c8565b60008061179583604051602401611ce9919061272c565b60408051601f198184030181529190526020810180516001600160e01b03166370a0823160e01b179052611a1d565b6040805160048152602481019091526020810180516001600160e01b0316630e759dd360e31b179052600090819061182f906116c8565b60008061179583604051602401611d6891815260200190565b60408051601f198184030181529190526020810180516001600160e01b0316634181842360e11b1790526116c8565b60008061179583604051602401611db091815260200190565b60408051601f198184030181529190526020810180516001600160e01b031663852a12e360e01b1790526116c8565b6002805461164790612888565b60008061179583604051602401611e03919061272c565b60408051601f198184030181529190526020810180516001600160e01b03166395dd919360e01b179052611a1d565b60008061179583604051602401611e4b91815260200190565b60408051601f198184030181529190526020810180516001600160e01b031663140e25ad60e31b1790526116c8565b6040805160048152602481019091526020810180516001600160e01b031663a6afed9560e01b179052600090819061182f906116c8565b60008061172f8484604051602401611eca9291906128c2565b60408051601f198184030181529190526020810180516001600160e01b031663a9059cbb60e01b1790526116c8565b600080611f43858585604051602401611f1493929190612917565b60408051601f198184030181529190526020810180516001600160e01b031663b2a02ff160e01b1790526116c8565b9050808060200190518101906118f191906128fb565b60008061179583604051602401611f70919061272c565b60408051601f198184030181529190526020810180516001600160e01b0316632dc7468360e21b1790526116c8565b6040805160048152602481019091526020810180516001600160e01b031663bd6d894d60e01b179052600090819061182f906116c8565b600080600080600061202186604051602401611ff2919061272c565b60408051601f198184030181529190526020810180516001600160e01b03166361bfb47160e11b179052611a1d565b90508080602001905181019061203791906129ea565b9450945094509450509193509193565b6000806117958360405160240161206091815260200190565b60408051601f198184030181529190526020810180516001600160e01b031663317afabb60e21b1790526116c8565b6040805160048152602481019091526020810180516001600160e01b0316633364600760e21b179052600090819061182f90611a1d565b604051602481018690526044810185905260ff841660648201526084810183905260a4810182905260009081906121299060c40160408051601f198184030181529190526020810180516001600160e01b031663340923ed60e21b1790526116c8565b90508080602001905181019061213f91906128fb565b979650505050505050565b6040805160048152602481019091526020810180516001600160e01b03166369de963960e11b179052600090819061182f90611a1d565b6000806117958360405160240161219a91815260200190565b60408051601f198184030181529190526020810180516001600160e01b031663db006a7560e01b1790526116c8565b60008061194284846040516024016121e29291906129d0565b60408051601f198184030181529190526020810180516001600160e01b0316636eb1769f60e11b179052611a1d565b6040805160048152602481019091526020810180516001600160e01b03166374e38a7960e11b179052600090819061182f906116c8565b6000806117958360405160240161225f919061272c565b60408051601f198184030181529190526020810180516001600160e01b031663f2b3abbd60e01b1790526116c8565b6040516001600160a01b03808516602483015260448201849052821660648201526000908190611f439060840160408051601f198184030181529190526020810180516001600160e01b0316637af1e23160e11b1790526116c8565b6000806117958360405160240161230391815260200190565b60408051601f198184030181529190526020810180516001600160e01b031663fca7820b60e01b1790526116c8565b6060600080846001600160a01b03168460405161234f919061293b565b600060405180830381855af49150503d806000811461238a576040519150601f19603f3d011682016040523d82523d6000602084013e61238f565b606091505b50909250905081611745573d60208201fd5b8183823760009101908152919050565b60005b838110156123cc5781810151838201526020016123b4565b50506000910152565b600081518084526123ed8160208601602086016123b1565b601f01601f19169290920160200192915050565b6020815260006117ab60208301846123d5565b60405162461bcd60e51b815260206004820152602260248201527f414249206465636f64696e673a207475706c65206461746120746f6f2073686f6044820152611c9d60f21b6064820152608481fd5b60405162461bcd60e51b815260206004820152602260248201527f414249206465636f64696e673a20696e76616c6964207475706c65206f666673604482015261195d60f21b6064820152608481fd5b60405162461bcd60e51b815260206004820152602b60248201527f414249206465636f64696e673a20696e76616c69642063616c6c64617461206160448201526a1c9c985e481bd9999cd95d60aa1b6064820152608481fd5b60405162461bcd60e51b815260206004820152602760248201527f414249206465636f64696e673a20696e76616c69642062797465206172726179604482015266040d8cadccee8d60cb1b6064820152608481fd5b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b03811182821017156125a0576125a0612562565b604052919050565b60006001600160401b038211156125c1576125c1612562565b50601f01601f191660200190565b600082601f8301126125e3576125e36124b4565b81356125f66125f1826125a8565b612578565b81815284602083860101111561260e5761260e61250d565b816020850160208301376000918101602001919091529392505050565b60006020828403121561264057612640612414565b81356001600160401b0381111561265957612659612464565b611745848285016125cf565b6001600160a01b038116811461267a57600080fd5b50565b6000806040838503121561269357612693612414565b823561269e81612665565b946020939093013593505050565b6000602082840312156126c1576126c1612414565b5035919050565b6000602082840312156126dd576126dd612414565b81356117ab81612665565b60008060006060848603121561270057612700612414565b833561270b81612665565b9250602084013561271b81612665565b929592945050506040919091013590565b6001600160a01b0391909116815260200190565b801515811461267a57600080fd5b60008060006060848603121561276657612766612414565b833561277181612665565b9250602084013561278181612740565b915060408401356001600160401b0381111561279f5761279f612464565b6127ab868287016125cf565b9150509250925092565b600080600080600060a086880312156127d0576127d0612414565b8535945060208601359350604086013560ff811681146127ef57600080fd5b94979396509394606081013594506080013592915050565b6000806040838503121561281d5761281d612414565b823561282881612665565b9150602083013561283881612665565b809150509250929050565b60008060006060848603121561285b5761285b612414565b833561286681612665565b925060208401359150604084013561287d81612665565b809150509250925092565b600181811c9082168061289c57607f821691505b6020821081036128bc57634e487b7160e01b600052602260045260246000fd5b50919050565b6001600160a01b03929092168252602082015260400190565b6000602082840312156128f0576128f0612414565b81516117ab81612740565b60006020828403121561291057612910612414565b5051919050565b6001600160a01b039384168152919092166020820152604081019190915260600190565b6000825161294d8184602087016123b1565b9190910192915050565b60006020828403121561296c5761296c612414565b81516001600160401b0381111561298557612985612464565b8201601f81018413612999576129996124b4565b80516129a76125f1826125a8565b8181528560208385010111156129bf576129bf61250d565b6118f18260208301602086016123b1565b6001600160a01b0392831681529116602082015260400190565b60008060008060808587031215612a0357612a03612414565b50508251602084015160408501516060909501519196909550909250905056fe45746865722073656e7420746f206e6f6e2d70617961626c652066756e637469a26469706673582212208b37fc03a8a9185207967e131636cff94924407ce5ddfacd059ae6931bd7e6d864736f6c63430008130033

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

00000000000000000000000001bff41798a0bcf287b996046ca68b395dbc1071000000000000000000000000ca889f40aae37fff165bccf69aef1e82b5c511b9000000000000000000000000eb7605508225517fe289c46406999f31b96c3b4a0000000000000000000000000000000000000000000000000000b5e620f4800000000000000000000000000000000000000000000000000000000000000001400000000000000000000000000000000000000000000000000000000000000180000000000000000000000000000000000000000000000000000000000000000800000000000000000000000017c9ba3fda7ec71ccfd75f978ef31e21927aff3d000000000000000000000000a9ce0a4de55791c5792b50531b18befc30b09dcc00000000000000000000000000000000000000000000000000000000000001c0000000000000000000000000000000000000000000000000000000000000000e4d6f6f6e77656c6c20555344543000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000066d555344543000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000

-----Decoded View---------------
Arg [0] : underlying_ (address): 0x01bFF41798a0BcF287b996046Ca68b395DbC1071
Arg [1] : comptroller_ (address): 0xCa889f40aae37FFf165BccF69aeF1E82b5C511B9
Arg [2] : interestRateModel_ (address): 0xeB7605508225517fE289c46406999F31b96c3B4A
Arg [3] : initialExchangeRateMantissa_ (uint256): 200000000000000
Arg [4] : name_ (string): Moonwell USDT0
Arg [5] : symbol_ (string): mUSDT0
Arg [6] : decimals_ (uint8): 8
Arg [7] : admin_ (address): 0x17C9ba3fDa7EC71CcfD75f978Ef31E21927aFF3d
Arg [8] : implementation_ (address): 0xA9CE0A4DE55791c5792B50531b18Befc30B09dcC
Arg [9] : becomeImplementationData (bytes): 0x

-----Encoded View---------------
15 Constructor Arguments found :
Arg [0] : 00000000000000000000000001bff41798a0bcf287b996046ca68b395dbc1071
Arg [1] : 000000000000000000000000ca889f40aae37fff165bccf69aef1e82b5c511b9
Arg [2] : 000000000000000000000000eb7605508225517fe289c46406999f31b96c3b4a
Arg [3] : 0000000000000000000000000000000000000000000000000000b5e620f48000
Arg [4] : 0000000000000000000000000000000000000000000000000000000000000140
Arg [5] : 0000000000000000000000000000000000000000000000000000000000000180
Arg [6] : 0000000000000000000000000000000000000000000000000000000000000008
Arg [7] : 00000000000000000000000017c9ba3fda7ec71ccfd75f978ef31e21927aff3d
Arg [8] : 000000000000000000000000a9ce0a4de55791c5792b50531b18befc30b09dcc
Arg [9] : 00000000000000000000000000000000000000000000000000000000000001c0
Arg [10] : 000000000000000000000000000000000000000000000000000000000000000e
Arg [11] : 4d6f6f6e77656c6c205553445430000000000000000000000000000000000000
Arg [12] : 0000000000000000000000000000000000000000000000000000000000000006
Arg [13] : 6d55534454300000000000000000000000000000000000000000000000000000
Arg [14] : 0000000000000000000000000000000000000000000000000000000000000000


Loading...
Loading
[ Download: CSV Export  ]
[ Download: CSV Export  ]

A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.