Contract 0x44484f24757418931603acfd5e50ec5a59fd895a

Contract Overview

Balance:
0 DEV
Txn Hash Method
Block
From
To
Value [Txn Fee]
0x983887685cbe8bd58a7e5e24c2f1a517944cde7e16a5bc0219ab1ed91ae99b40Set Master State28627002022-09-19 2:42:42135 days 2 hrs ago0xb6ca26b953a0c5bf5180efb57e7685668a4a6a18 IN 0x44484f24757418931603acfd5e50ec5a59fd895a0 DEV0.003087896
0x4e819cabef7d388454e07b0114e0bd7922c1d630552332481dc0be43225f00cfAdd Route28626882022-09-19 2:40:06135 days 2 hrs ago0xb6ca26b953a0c5bf5180efb57e7685668a4a6a18 IN 0x44484f24757418931603acfd5e50ec5a59fd895a0 DEV0.003259952
0x6141e38727db63d73933aa88e3574120a998e59fe0cda72fefe46131448aa4b4Add Route28626752022-09-19 2:37:12135 days 3 hrs ago0xb6ca26b953a0c5bf5180efb57e7685668a4a6a18 IN 0x44484f24757418931603acfd5e50ec5a59fd895a0 DEV0.003259952
0xfa3f0ab927c214df30b764e4597f751d80f6c58a8ed771b93ae274f86033ea290x6080604028626632022-09-19 2:34:30135 days 3 hrs ago0xb6ca26b953a0c5bf5180efb57e7685668a4a6a18 IN  Contract Creation0 DEV0.044660056
[ Download CSV Export 
Latest 25 internal transaction
Parent Txn Hash Block From To Value
0x966dc6b22d2edaaf426ea3724ae11e4b788883118e027fe631901b486948562930385162022-10-19 22:12:48104 days 7 hrs ago 0x44484f24757418931603acfd5e50ec5a59fd895a0xfce1d972c3869e5693ec93ac6c854de8711ccbaf0 DEV
0x966dc6b22d2edaaf426ea3724ae11e4b788883118e027fe631901b486948562930385162022-10-19 22:12:48104 days 7 hrs ago 0xc483e09d77085345c8ff4b097f40507eb5f23de00x44484f24757418931603acfd5e50ec5a59fd895a0 DEV
0x966dc6b22d2edaaf426ea3724ae11e4b788883118e027fe631901b486948562930385162022-10-19 22:12:48104 days 7 hrs ago 0x44484f24757418931603acfd5e50ec5a59fd895a0xfce1d972c3869e5693ec93ac6c854de8711ccbaf0 DEV
0x966dc6b22d2edaaf426ea3724ae11e4b788883118e027fe631901b486948562930385162022-10-19 22:12:48104 days 7 hrs ago 0xc483e09d77085345c8ff4b097f40507eb5f23de00x44484f24757418931603acfd5e50ec5a59fd895a0 DEV
0x062d5a9267544805388dff3af5bf76e69b4df21085e6933e886e30c6c2b9e9ad29986132022-10-12 13:51:12111 days 15 hrs ago 0x44484f24757418931603acfd5e50ec5a59fd895a0xfce1d972c3869e5693ec93ac6c854de8711ccbaf0 DEV
0x062d5a9267544805388dff3af5bf76e69b4df21085e6933e886e30c6c2b9e9ad29986132022-10-12 13:51:12111 days 15 hrs ago 0xc483e09d77085345c8ff4b097f40507eb5f23de00x44484f24757418931603acfd5e50ec5a59fd895a0 DEV
0x062d5a9267544805388dff3af5bf76e69b4df21085e6933e886e30c6c2b9e9ad29986132022-10-12 13:51:12111 days 15 hrs ago 0x44484f24757418931603acfd5e50ec5a59fd895a0xfce1d972c3869e5693ec93ac6c854de8711ccbaf0 DEV
0x062d5a9267544805388dff3af5bf76e69b4df21085e6933e886e30c6c2b9e9ad29986132022-10-12 13:51:12111 days 15 hrs ago 0xc483e09d77085345c8ff4b097f40507eb5f23de00x44484f24757418931603acfd5e50ec5a59fd895a0 DEV
0x544454bef7cb2f409852a1bebdb8c825cc54125cb10935bd9eb030b6d42ceab529826232022-10-09 18:29:42114 days 11 hrs ago 0x44484f24757418931603acfd5e50ec5a59fd895a0xfce1d972c3869e5693ec93ac6c854de8711ccbaf0 DEV
0x544454bef7cb2f409852a1bebdb8c825cc54125cb10935bd9eb030b6d42ceab529826232022-10-09 18:29:42114 days 11 hrs ago 0xc483e09d77085345c8ff4b097f40507eb5f23de00x44484f24757418931603acfd5e50ec5a59fd895a0 DEV
0x544454bef7cb2f409852a1bebdb8c825cc54125cb10935bd9eb030b6d42ceab529826232022-10-09 18:29:42114 days 11 hrs ago 0x44484f24757418931603acfd5e50ec5a59fd895a0xfce1d972c3869e5693ec93ac6c854de8711ccbaf0 DEV
0x544454bef7cb2f409852a1bebdb8c825cc54125cb10935bd9eb030b6d42ceab529826232022-10-09 18:29:42114 days 11 hrs ago 0xc483e09d77085345c8ff4b097f40507eb5f23de00x44484f24757418931603acfd5e50ec5a59fd895a0 DEV
0x7cb2790ce67a14ce8a94f914ea646ce71eb500448845b0a13060f9270c179f0229825922022-10-09 18:21:42114 days 11 hrs ago 0x44484f24757418931603acfd5e50ec5a59fd895a0xfce1d972c3869e5693ec93ac6c854de8711ccbaf0 DEV
0x7cb2790ce67a14ce8a94f914ea646ce71eb500448845b0a13060f9270c179f0229825922022-10-09 18:21:42114 days 11 hrs ago 0xc483e09d77085345c8ff4b097f40507eb5f23de00x44484f24757418931603acfd5e50ec5a59fd895a0 DEV
0x7cb2790ce67a14ce8a94f914ea646ce71eb500448845b0a13060f9270c179f0229825922022-10-09 18:21:42114 days 11 hrs ago 0x44484f24757418931603acfd5e50ec5a59fd895a0xfce1d972c3869e5693ec93ac6c854de8711ccbaf0 DEV
0x7cb2790ce67a14ce8a94f914ea646ce71eb500448845b0a13060f9270c179f0229825922022-10-09 18:21:42114 days 11 hrs ago 0xc483e09d77085345c8ff4b097f40507eb5f23de00x44484f24757418931603acfd5e50ec5a59fd895a0 DEV
0x54e8452a213ae558c192c5423883f5cee72d9112e455c477afafa3eb5928db0129769642022-10-08 18:51:12115 days 10 hrs ago 0x44484f24757418931603acfd5e50ec5a59fd895a0xfce1d972c3869e5693ec93ac6c854de8711ccbaf0 DEV
0x54e8452a213ae558c192c5423883f5cee72d9112e455c477afafa3eb5928db0129769642022-10-08 18:51:12115 days 10 hrs ago 0xc483e09d77085345c8ff4b097f40507eb5f23de00x44484f24757418931603acfd5e50ec5a59fd895a0 DEV
0x54e8452a213ae558c192c5423883f5cee72d9112e455c477afafa3eb5928db0129769642022-10-08 18:51:12115 days 10 hrs ago 0x44484f24757418931603acfd5e50ec5a59fd895a0xfce1d972c3869e5693ec93ac6c854de8711ccbaf0 DEV
0x54e8452a213ae558c192c5423883f5cee72d9112e455c477afafa3eb5928db0129769642022-10-08 18:51:12115 days 10 hrs ago 0xc483e09d77085345c8ff4b097f40507eb5f23de00x44484f24757418931603acfd5e50ec5a59fd895a0 DEV
0x7241a50ed9f308ec511b2ba0bf8626e0ad8ce1063ac60d38ba2529e5ee4682de29769622022-10-08 18:50:42115 days 10 hrs ago 0x44484f24757418931603acfd5e50ec5a59fd895a0xfce1d972c3869e5693ec93ac6c854de8711ccbaf0 DEV
0x7241a50ed9f308ec511b2ba0bf8626e0ad8ce1063ac60d38ba2529e5ee4682de29769622022-10-08 18:50:42115 days 10 hrs ago 0xc483e09d77085345c8ff4b097f40507eb5f23de00x44484f24757418931603acfd5e50ec5a59fd895a0 DEV
0x7241a50ed9f308ec511b2ba0bf8626e0ad8ce1063ac60d38ba2529e5ee4682de29769622022-10-08 18:50:42115 days 10 hrs ago 0x44484f24757418931603acfd5e50ec5a59fd895a0xfce1d972c3869e5693ec93ac6c854de8711ccbaf0 DEV
0x7241a50ed9f308ec511b2ba0bf8626e0ad8ce1063ac60d38ba2529e5ee4682de29769622022-10-08 18:50:42115 days 10 hrs ago 0xc483e09d77085345c8ff4b097f40507eb5f23de00x44484f24757418931603acfd5e50ec5a59fd895a0 DEV
0x676747b0f5e3c2369400fc3bb3b753d5f207c74862f3489d95928933e35fd94429769562022-10-08 18:49:18115 days 10 hrs ago 0x44484f24757418931603acfd5e50ec5a59fd895a0xfce1d972c3869e5693ec93ac6c854de8711ccbaf0 DEV
[ Download CSV Export 
Loading

Similar Match Source Code
Note: This contract matches the deployed ByteCode of the Source Code for Contract 0xF258784924Ab65c1D6e22Ac91bAC38474B138eBA

Contract Name:
IRMRouter

Compiler Version
v0.8.9+commit.e5eed63a

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 12 : IRMRouter.sol
//SPDX-License-Identifier: Unlicense
pragma solidity ^0.8.4;

import "./interfaces/IIRMRouter.sol";
import "../IRMStorage.sol";
import "../interfaces/IIRM.sol";
import "./IRMRouterAdmin.sol";

contract IRMRouter is IIRMRouter, IRMRouterAdmin {
    constructor () {
        admin = msg.sender;
    }

    function setBorrowRate(
        address loanMarketOverlying,
        uint256 loanMarketUnderlyingChainId,
        address loanMarketUnderlying
    ) external override onlyMasterState() returns (uint256 rate) {
        return IIRM(routes[loanMarketOverlying]).setBorrowRate(
            loanMarketOverlying,
            loanMarketUnderlyingChainId,
            loanMarketUnderlying
        );
    }

    function borrowInterestRatePerBlock(
        address masterLoanMarket
    ) external override view returns (uint256) {
        return IRMStorage(routes[masterLoanMarket]).borrowInterestRatePerBlock();
    }

    function basisPointsTickSize(
        address masterLoanMarket
    ) external override view returns (uint256) {
        return IRMStorage(routes[masterLoanMarket]).basisPointsTickSize();
    }

    function basisPointsUpperTick(
        address masterLoanMarket
    ) external override view returns (uint256) {
        return IRMStorage(routes[masterLoanMarket]).basisPointsUpperTick();
    }

    function basisPointsLowerTick(
        address masterLoanMarket
    ) external override view returns (uint256) {
        return IRMStorage(routes[masterLoanMarket]).basisPointsLowerTick();
    }

    function lowerTargetRatio(
        address masterLoanMarket
    ) external override view returns (uint256) {
        return IRMStorage(routes[masterLoanMarket]).lowerTargetRatio();
    }

    function upperTargetRatio(
        address masterLoanMarket
    ) external override view returns (uint256) {
        return IRMStorage(routes[masterLoanMarket]).upperTargetRatio();
    }

    function lastObservationTimestamp(
        address masterLoanMarket
    ) external override view returns (uint256) {
        return IRMStorage(routes[masterLoanMarket]).lastObservationTimestamp();
    }

    function blocksPerYear(
        address masterLoanMarket
    ) external override view returns (uint256) {
        return IRMStorage(routes[masterLoanMarket]).blocksPerYear();
    }

    function observationPeriod(
        address masterLoanMarket
    ) external override view returns (uint256) {
        return IRMStorage(routes[masterLoanMarket]).observationPeriod();
    }

    function borrowInterestRateDecimals(
        address masterLoanMarket
    ) external override view returns (uint8) {
        return IRMStorage(routes[masterLoanMarket]).borrowInterestRateDecimals();
    }

    function borrowInterestRateBase(
        address masterLoanMarket
    ) external override view returns (uint256) {
        return IRMStorage(routes[masterLoanMarket]).borrowInterestRateBase();
    }
}

File 2 of 12 : IIRMRouter.sol
//SPDX-License-Identifier: Unlicense
pragma solidity ^0.8.4;

interface IIRMRouter {
    function setBorrowRate(
        address loanMarketOverlying,
        uint256 loanMarketUnderlyingChainId,
        address loanMarketUnderlying
    ) external /* onlyMaster() */ returns (uint256 rate);

    function borrowInterestRatePerBlock(
        address masterLoanMarket
    ) external view returns (uint256);

    function basisPointsTickSize(
        address masterLoanMarket
    ) external view returns (uint256);

    function basisPointsUpperTick(
        address masterLoanMarket
    ) external view returns (uint256);

    function basisPointsLowerTick(
        address masterLoanMarket
    ) external view returns (uint256);

    function lowerTargetRatio(
        address masterLoanMarket
    ) external view returns (uint256);

    function upperTargetRatio(
        address masterLoanMarket
    ) external view returns (uint256);

    function lastObservationTimestamp(
        address masterLoanMarket
    ) external view returns (uint256);

    function blocksPerYear(
        address masterLoanMarket
    ) external view returns (uint256);

    function observationPeriod(
        address masterLoanMarket
    ) external view returns (uint256);

    function borrowInterestRateDecimals(
        address masterLoanMarket
    ) external view returns (uint8);

    function borrowInterestRateBase(
        address masterLoanMarket
    ) external view returns (uint256);
}

File 3 of 12 : IRMStorage.sol
//SPDX-License-Identifier: Unlicense
pragma solidity ^0.8.4;

import "../oracle/interfaces/IPrimeOracle.sol";

abstract contract IRMStorage {

    address public admin;
    address public router;
    uint256 public loanMarketUnderlyingChainId;
    address public loanMarketUnderlying;

    IPrimeOracle public primeOracle;

    uint256 public borrowInterestRatePerBlock;
    uint256 public basisPointsTickSize;
    uint256 public borrowInterestRateBase;
    uint256 public basisPointsUpperTick;
    uint256 public basisPointsLowerTick;
    uint256 public lowerTargetRatio;
    uint256 public upperTargetRatio;
    uint256 public lastObservationTimestamp;
    uint256 public blocksPerYear;
    uint256 public observationPeriod;

    uint8 public constant borrowInterestRateDecimals = 18;

}

File 4 of 12 : IIRM.sol
//SPDX-License-Identifier: Unlicense
pragma solidity ^0.8.4;

interface IIRM {
    function setBasisPointsTickSize(uint256 price) external /* onlyAdmin() */ returns (uint256 tickSize);
    function setBasisPointsUpperTick(uint256 upperTick) external /* onlyAdmin() */ returns (uint256 tick);
    function setBasisPointsLowerTick(uint256 lowerTick) external /* onlyAdmin() */ returns (uint256 tick);
    function setlowerTargetRatio(uint256 lowerPrice) external /* onlyAdmin() */ returns (uint256 price);
    function setupperTargetRatio(uint256 upperPrice) external /* onlyAdmin() */ returns (uint256 price);
    function setBorrowRate(address loanMarketOverlying, uint256 loanMarketUnderlyingChainId, address loanMarketUnderlying) external returns (uint256 rate);
    function setRouter(address router) external /* onlyAdmin() */;
    function setObservationPeriod(uint256 obsPeriod) external /* onlyAdmin() */ returns (uint256);
}

File 5 of 12 : IRMRouterAdmin.sol
//SPDX-License-Identifier: Unlicense
pragma solidity ^0.8.4;

import "./IRMRouterModifiers.sol";
import "./IRMRouterEvents.sol";

abstract contract IRMRouterAdmin is IRMRouterModifiers, IRMRouterEvents {
    function setMasterState(
        address newMasterState
    ) external onlyAdmin() {
        masterState = newMasterState;
    }

    function addRoute(
        address masterLoanMarket,
        address newRoute
    ) external onlyAdmin() {
        if (routes[masterLoanMarket] != address(0)) revert RouteExists();
        emit RouteChanged(masterLoanMarket, routes[masterLoanMarket], newRoute);
        routes[masterLoanMarket] = newRoute;
    }

    function removeRoute(
        address masterLoanMarket
    ) external onlyAdmin() {
        emit RouteChanged(masterLoanMarket, routes[masterLoanMarket], address(0));
        routes[masterLoanMarket] = address(0);
    }

    function replaceRoute(
        address masterLoanMarket,
        address newRoute
    ) external onlyAdmin() {
        emit RouteChanged(masterLoanMarket, routes[masterLoanMarket], newRoute);
        routes[masterLoanMarket] = newRoute;
    }
}

File 6 of 12 : IPrimeOracle.sol
//SPDX-License-Identifier: Unlicense
pragma solidity ^0.8.4;

import "./IPrimeOracleGetter.sol";
import "./PrimeOracleStorage.sol";

/**
 * @title IPrimeOracle
 * @author Prime
 * @notice The core interface for the Prime Oracle
 */
abstract contract IPrimeOracle is PrimeOracleStorage {

    /**
     * @dev Emitted after the price data feed of an asset is set/updated
     * @param asset The address of the asset
     * @param chainId The chainId of the asset
     * @param feed The price feed of the asset
     */
    event SetPrimaryFeed(uint256 chainId, address indexed asset, address indexed feed);

    /**
     * @dev Emitted after the price data feed of an asset is set/updated
     * @param asset The address of the asset
     * @param feed The price feed of the asset
     */
    event SetSecondaryFeed(uint256 chainId, address indexed asset, address indexed feed);

    /**
     * @dev Emitted after the exchange rate data feed of a loan market asset is set/updated
     * @param asset The address of the asset
     * @param chainId The chainId of the asset
     * @param feed The price feed of the asset
     */
    event SetExchangRatePrimaryFeed(uint256 chainId, address indexed asset, address indexed feed);

    /**
     * @dev Emitted after the exchange rate data feed of a loan market asset is set/updated
     * @param asset The address of the asset
     * @param feed The price feed of the asset
     */
    event SetExchangeRateSecondaryFeed(uint256 chainId, address indexed asset, address indexed feed);

    /**
     * @notice Get the underlying price of a cToken asset
     * @param collateralMarketUnderlying The PToken collateral to get the sasset price of
     * @param chainId the chainId to get an asset price for
     * @return The underlying asset price.
     *  Zero means the price is unavailable.
     */
    function getUnderlyingPrice(uint256 chainId, address collateralMarketUnderlying) external view virtual returns (uint256, uint8);

    /**
     * @notice Get the underlying borrow price of loanMarketAsset
     * @return The underlying borrow price
     *  Zero means the price is unavailable.
     */
    function getUnderlyingPriceBorrow(
        uint256 chainId,
        address loanMarketUnderlying
    ) external view virtual returns (uint256, uint8);

    /**
     * @notice Get the exchange rate of loanMarketAsset to basis
     * @return The underlying exchange rate of loanMarketAsset to basis
     *  Zero means the price is unavailable.
     */
    function getBorrowAssetExchangeRate(
        address loanMarketOverlying,
        uint256 loanMarketUnderlyingChainId,
        address loanMarketUnderlying
    ) external view virtual returns (uint256 /* ratio */, uint8 /* decimals */);

    /*** Admin Functions ***/

    /**
     * @notice Sets or replaces price feeds of assets
     * @param asset The addresses of the assets
     * @param feed The addresses of the price feeds
     */
    function setPrimaryFeed(uint256 chainId, address asset, IPrimeOracleGetter feed) external virtual;

    /**
     * @notice Sets or replaces price feeds of assets
     * @param asset The addresses of the assets
     * @param feed The addresses of the price feeds
     */
    function setSecondaryFeed(uint256 chainId, address asset, IPrimeOracleGetter feed) external virtual;
}

File 7 of 12 : IPrimeOracleGetter.sol
//SPDX-License-Identifier: Unlicense
pragma solidity ^0.8.4;

/**
 * @title IPrimeOracleGetter
 * @author Prime
 * @notice Interface for the Prime price oracle.
 **/
interface IPrimeOracleGetter {

    /**
     * @dev Emitted after the price data feed of an asset is updated
     * @param asset The address of the asset
     * @param feed The price feed of the asset
     */
    event AssetFeedUpdated(uint256 chainId, address indexed asset, address indexed feed);

    /**
     * @notice Gets the price feed of an asset
     * @param asset The addresses of the asset
     * @return address of asset feed
     */
    function getAssetFeed(uint256 chainId, address asset) external view returns (address);

    /**
     * @notice Sets or replaces price feeds of assets
     * @param asset The addresses of the assets
     * @param feed The addresses of the price feeds
     */
    function setAssetFeed(uint256 chainId, address asset, address feed) external;

    /**
     * @notice Returns the price data in the denom currency
     * @param quoteToken A token to return price data for
     * @param denomToken A token to price quoteToken against
     * @param price of the asset from the oracle
     * @param decimals of the asset from the oracle
     **/
    function getAssetPrice(
        uint256 chainId,
        address quoteToken,
        address denomToken
    ) external view returns (uint256 price, uint8 decimals);

    function getAssetRatio(
        address overlyingAsset,
        address underlyingAsset,
        uint256 underlyingChainId
    ) external view returns (uint256 ratio, uint8 decimals);

    /**
     * @notice Returns the price data in the denom currency
     * @param quoteToken A token to return price data for
     * @return return price of the asset from the oracle
     **/
    function getPriceDecimals(
        uint256 chainId,
        address quoteToken
    ) external view returns (uint256);

}

File 8 of 12 : PrimeOracleStorage.sol
//SPDX-License-Identifier: Unlicense
pragma solidity ^0.8.4;

import "./IPrimeOracleGetter.sol";

/**
 * @title PrimeOracleStorage
 * @author Prime
 * @notice The core interface for the Prime Oracle storage variables
 */
abstract contract PrimeOracleStorage {
    address public pusdAddress;
    //TODO: allow transfer of ownership
    address public admin;
    // Map of asset price feeds (chainasset => priceSource)
    mapping(uint256 => mapping(address => IPrimeOracleGetter)) public primaryFeeds;
    mapping(uint256 => mapping(address => IPrimeOracleGetter)) public secondaryFeeds;
    mapping(uint256 => mapping(address => IPrimeOracleGetter)) public exchangeRatePrimaryFeeds;
    mapping(uint256 => mapping(address => IPrimeOracleGetter)) public exchangeRateSecondaryFeeds;
}

File 9 of 12 : IRMRouterModifiers.sol
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;

import "./IRMRouterStorage.sol";
import "../../../util/CommonErrors.sol";

abstract contract IRMRouterModifiers is IRMRouterStorage, CommonErrors {
    modifier onlyAdmin() {
        if(msg.sender != admin) revert OnlyAdmin();
        _;
    }

    modifier onlyMasterState() {
        if (msg.sender != masterState) revert OnlyMasterState();
        _;
    }
}

File 10 of 12 : IRMRouterEvents.sol
//SPDX-License-Identifier: Unlicense
pragma solidity ^0.8.4;

abstract contract IRMRouterEvents {
    event RouteChanged(
        address masterLoanMarket,
        address oldRoute,
        address newRoute
    );
}

File 11 of 12 : IRMRouterStorage.sol
//SPDX-License-Identifier: Unlicense
pragma solidity ^0.8.4;

abstract contract IRMRouterStorage {
    address public admin;
    address public masterState;

    mapping(address /* MasterLoanMarket */ => address /* IRM Contract */) internal routes;
}

File 12 of 12 : CommonErrors.sol
//SPDX-License-Identifier: Unlicense
pragma solidity ^0.8.4;

abstract contract CommonErrors {
    error AccountNoAssets(address account);
    error AddressExpected();
    error AlreadyInitialized();
    error EccMessageAlreadyProcessed();
    error EccFailedToValidate();
    error ExpectedMintAmount();
    error ExpectedBridgeAmount();
    error ExpectedBorrowAmount();
    error ExpectedWithdrawAmount();
    error ExpectedRepayAmount();
    error ExpectedTradeAmount();
    error ExpectedDepositAmount();
    error ExpectedTransferAmount();
    error InsufficientReserves();
    error InvalidPayload();
    error InvalidPrice();
    error InvalidPrecision();
    error InvalidSelector();
    error MarketExists();
    error LoanMarketIsListed(bool status);
    error MarketIsPaused();
    error MarketNotListed();
    error MsgDataExpected();
    error NameExpected();
    error NothingToWithdraw();
    error NotInMarket(uint256 chainId, address token);
    error OnlyAdmin();
    error OnlyAuth();
    error OnlyGateway();
    error OnlyMiddleLayer();
    error OnlyMintAuth();
    error OnlyRoute();
    error OnlyRouter();
    error OnlyMasterState();
    error ParamOutOfBounds();
    error RouteExists();
    error Reentrancy();
    error EnterLoanMarketFailed();
    error EnterCollMarketFailed();
    error ExitLoanMarketFailed();
    error ExitCollMarketFailed();
    error RepayTooMuch(uint256 repayAmount, uint256 maxAmount);
    error WithdrawTooMuch();
    error NotEnoughBalance(address token, address who);
    error LiquidateDisallowed();
    error SeizeTooMuch();
    error SymbolExpected();
    error RouteNotSupported(address route);
    error MiddleLayerPaused();
    error PairNotSupported(address loanAsset, address tradeAsset);
    error TransferFailed(address from, address dest);
    error TransferPaused();
    error UnknownRevert();
    error UnexpectedValueDelta();
    error ExpectedValue();
    error UnexpectedDelta();
}

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "libraries": {}
}

Contract ABI

[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"AccountNoAssets","type":"error"},{"inputs":[],"name":"AddressExpected","type":"error"},{"inputs":[],"name":"AlreadyInitialized","type":"error"},{"inputs":[],"name":"EccFailedToValidate","type":"error"},{"inputs":[],"name":"EccMessageAlreadyProcessed","type":"error"},{"inputs":[],"name":"EnterCollMarketFailed","type":"error"},{"inputs":[],"name":"EnterLoanMarketFailed","type":"error"},{"inputs":[],"name":"ExitCollMarketFailed","type":"error"},{"inputs":[],"name":"ExitLoanMarketFailed","type":"error"},{"inputs":[],"name":"ExpectedBorrowAmount","type":"error"},{"inputs":[],"name":"ExpectedBridgeAmount","type":"error"},{"inputs":[],"name":"ExpectedDepositAmount","type":"error"},{"inputs":[],"name":"ExpectedMintAmount","type":"error"},{"inputs":[],"name":"ExpectedRepayAmount","type":"error"},{"inputs":[],"name":"ExpectedTradeAmount","type":"error"},{"inputs":[],"name":"ExpectedTransferAmount","type":"error"},{"inputs":[],"name":"ExpectedValue","type":"error"},{"inputs":[],"name":"ExpectedWithdrawAmount","type":"error"},{"inputs":[],"name":"InsufficientReserves","type":"error"},{"inputs":[],"name":"InvalidPayload","type":"error"},{"inputs":[],"name":"InvalidPrecision","type":"error"},{"inputs":[],"name":"InvalidPrice","type":"error"},{"inputs":[],"name":"InvalidSelector","type":"error"},{"inputs":[],"name":"LiquidateDisallowed","type":"error"},{"inputs":[{"internalType":"bool","name":"status","type":"bool"}],"name":"LoanMarketIsListed","type":"error"},{"inputs":[],"name":"MarketExists","type":"error"},{"inputs":[],"name":"MarketIsPaused","type":"error"},{"inputs":[],"name":"MarketNotListed","type":"error"},{"inputs":[],"name":"MiddleLayerPaused","type":"error"},{"inputs":[],"name":"MsgDataExpected","type":"error"},{"inputs":[],"name":"NameExpected","type":"error"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"address","name":"who","type":"address"}],"name":"NotEnoughBalance","type":"error"},{"inputs":[{"internalType":"uint256","name":"chainId","type":"uint256"},{"internalType":"address","name":"token","type":"address"}],"name":"NotInMarket","type":"error"},{"inputs":[],"name":"NothingToWithdraw","type":"error"},{"inputs":[],"name":"OnlyAdmin","type":"error"},{"inputs":[],"name":"OnlyAuth","type":"error"},{"inputs":[],"name":"OnlyGateway","type":"error"},{"inputs":[],"name":"OnlyMasterState","type":"error"},{"inputs":[],"name":"OnlyMiddleLayer","type":"error"},{"inputs":[],"name":"OnlyMintAuth","type":"error"},{"inputs":[],"name":"OnlyRoute","type":"error"},{"inputs":[],"name":"OnlyRouter","type":"error"},{"inputs":[{"internalType":"address","name":"loanAsset","type":"address"},{"internalType":"address","name":"tradeAsset","type":"address"}],"name":"PairNotSupported","type":"error"},{"inputs":[],"name":"ParamOutOfBounds","type":"error"},{"inputs":[],"name":"Reentrancy","type":"error"},{"inputs":[{"internalType":"uint256","name":"repayAmount","type":"uint256"},{"internalType":"uint256","name":"maxAmount","type":"uint256"}],"name":"RepayTooMuch","type":"error"},{"inputs":[],"name":"RouteExists","type":"error"},{"inputs":[{"internalType":"address","name":"route","type":"address"}],"name":"RouteNotSupported","type":"error"},{"inputs":[],"name":"SeizeTooMuch","type":"error"},{"inputs":[],"name":"SymbolExpected","type":"error"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"dest","type":"address"}],"name":"TransferFailed","type":"error"},{"inputs":[],"name":"TransferPaused","type":"error"},{"inputs":[],"name":"UnexpectedDelta","type":"error"},{"inputs":[],"name":"UnexpectedValueDelta","type":"error"},{"inputs":[],"name":"UnknownRevert","type":"error"},{"inputs":[],"name":"WithdrawTooMuch","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"masterLoanMarket","type":"address"},{"indexed":false,"internalType":"address","name":"oldRoute","type":"address"},{"indexed":false,"internalType":"address","name":"newRoute","type":"address"}],"name":"RouteChanged","type":"event"},{"inputs":[{"internalType":"address","name":"masterLoanMarket","type":"address"},{"internalType":"address","name":"newRoute","type":"address"}],"name":"addRoute","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"admin","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"masterLoanMarket","type":"address"}],"name":"basisPointsLowerTick","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"masterLoanMarket","type":"address"}],"name":"basisPointsTickSize","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"masterLoanMarket","type":"address"}],"name":"basisPointsUpperTick","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"masterLoanMarket","type":"address"}],"name":"blocksPerYear","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"masterLoanMarket","type":"address"}],"name":"borrowInterestRateBase","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"masterLoanMarket","type":"address"}],"name":"borrowInterestRateDecimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"masterLoanMarket","type":"address"}],"name":"borrowInterestRatePerBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"masterLoanMarket","type":"address"}],"name":"lastObservationTimestamp","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"masterLoanMarket","type":"address"}],"name":"lowerTargetRatio","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"masterState","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"masterLoanMarket","type":"address"}],"name":"observationPeriod","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"masterLoanMarket","type":"address"}],"name":"removeRoute","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"masterLoanMarket","type":"address"},{"internalType":"address","name":"newRoute","type":"address"}],"name":"replaceRoute","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"loanMarketOverlying","type":"address"},{"internalType":"uint256","name":"loanMarketUnderlyingChainId","type":"uint256"},{"internalType":"address","name":"loanMarketUnderlying","type":"address"}],"name":"setBorrowRate","outputs":[{"internalType":"uint256","name":"rate","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newMasterState","type":"address"}],"name":"setMasterState","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"masterLoanMarket","type":"address"}],"name":"upperTargetRatio","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}]

608060405234801561001057600080fd5b50600080546001600160a01b03191633179055610ab0806100326000396000f3fe608060405234801561001057600080fd5b50600436106101165760003560e01c806367c1053b116100a2578063e57ea58111610071578063e57ea5811461023f578063e5a5b97f14610264578063e5a785a614610277578063ed6a6c181461028a578063f851a4401461029d57600080fd5b806367c1053b146101f357806371093359146102065780638bec427d14610219578063cf8318a51461022c57600080fd5b80634d702418116100e95780634d7024181461017c57806352f632431461018f5780635c1cda99146101a25780635e747ab2146101cd578063650075e1146101e057600080fd5b80630555cfbc1461011b5780632d0bec91146101415780632e24200e146101565780633ebb2c3914610169575b600080fd5b61012e6101293660046109ad565b6102b0565b6040519081526020015b60405180910390f35b61015461014f3660046109ad565b610340565b005b61012e6101643660046109ad565b6103eb565b6101546101773660046109cf565b61043d565b61012e61018a3660046109ad565b6104f2565b61015461019d3660046109ad565b610544565b6001546101b5906001600160a01b031681565b6040516001600160a01b039091168152602001610138565b61012e6101db3660046109ad565b610591565b61012e6101ee3660046109ad565b6105e3565b61012e6102013660046109ad565b610635565b6101546102143660046109cf565b610687565b61012e6102273660046109ad565b6106eb565b61012e61023a366004610a02565b61073d565b61025261024d3660046109ad565b610811565b60405160ff9091168152602001610138565b61012e6102723660046109ad565b61089b565b61012e6102853660046109ad565b6108ed565b61012e6102983660046109ad565b61093f565b6000546101b5906001600160a01b031681565b6001600160a01b038082166000908152600260209081526040808320548151632ee1009d60e01b8152915193941692632ee1009d92600480840193919291829003018186803b15801561030257600080fd5b505afa158015610316573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061033a9190610a3e565b92915050565b6000546001600160a01b0316331461036b57604051634755657960e01b815260040160405180910390fd5b6001600160a01b038181166000818152600260209081526040808320548151948552909416908301528183015290517fd29ca1547222d7c1bc4cc9ffab58d96050e6cd0b42701be11f5c8a30609422ea9181900360600190a16001600160a01b0316600090815260026020526040902080546001600160a01b0319169055565b6001600160a01b03808216600090815260026020908152604080832054815163b233366760e01b815291519394169263b233366792600480840193919291829003018186803b15801561030257600080fd5b6000546001600160a01b0316331461046857604051634755657960e01b815260040160405180910390fd5b6001600160a01b038281166000818152600260209081526040918290205482519384528416908301529183168183015290517fd29ca1547222d7c1bc4cc9ffab58d96050e6cd0b42701be11f5c8a30609422ea9181900360600190a16001600160a01b03918216600090815260026020526040902080546001600160a01b03191691909216179055565b6001600160a01b038082166000908152600260209081526040808320548151630e2f021d60e41b815291519394169263e2f021d092600480840193919291829003018186803b15801561030257600080fd5b6000546001600160a01b0316331461056f57604051634755657960e01b815260040160405180910390fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b0380821660009081526002602090815260408083205481516331fadd0b60e01b81529151939416926331fadd0b92600480840193919291829003018186803b15801561030257600080fd5b6001600160a01b0380821660009081526002602090815260408083205481516351c2fdcb60e11b815291519394169263a385fb9692600480840193919291829003018186803b15801561030257600080fd5b6001600160a01b03808216600090815260026020908152604080832054815163553bf3cb60e01b815291519394169263553bf3cb92600480840193919291829003018186803b15801561030257600080fd5b6000546001600160a01b031633146106b257604051634755657960e01b815260040160405180910390fd5b6001600160a01b038281166000908152600260205260409020541615610468576040516337a922df60e11b815260040160405180910390fd5b6001600160a01b038082166000908152600260209081526040808320548151635e1ce31160e11b815291519394169263bc39c62292600480840193919291829003018186803b15801561030257600080fd5b6001546000906001600160a01b0316331461076b57604051630db536df60e41b815260040160405180910390fd5b6001600160a01b038481166000818152600260205260409081902054905163cf8318a560e01b815260048101929092526024820186905284831660448301529091169063cf8318a590606401602060405180830381600087803b1580156107d157600080fd5b505af11580156107e5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108099190610a3e565b949350505050565b6001600160a01b0380821660009081526002602090815260408083205481516336dc5de360e01b81529151939416926336dc5de392600480840193919291829003018186803b15801561086357600080fd5b505afa158015610877573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061033a9190610a57565b6001600160a01b03808216600090815260026020908152604080832054815163a02f54d960e01b815291519394169263a02f54d992600480840193919291829003018186803b15801561030257600080fd5b6001600160a01b03808216600090815260026020908152604080832054815163b835f1a760e01b815291519394169263b835f1a792600480840193919291829003018186803b15801561030257600080fd5b6001600160a01b038082166000908152600260209081526040808320548151636c7a3a9160e01b8152915193941692636c7a3a9192600480840193919291829003018186803b15801561030257600080fd5b80356001600160a01b03811681146109a857600080fd5b919050565b6000602082840312156109bf57600080fd5b6109c882610991565b9392505050565b600080604083850312156109e257600080fd5b6109eb83610991565b91506109f960208401610991565b90509250929050565b600080600060608486031215610a1757600080fd5b610a2084610991565b925060208401359150610a3560408501610991565b90509250925092565b600060208284031215610a5057600080fd5b5051919050565b600060208284031215610a6957600080fd5b815160ff811681146109c857600080fdfea2646970667358221220f71c01e947cf16d936b20ca601b035346f4acd848060abb18c3d712e47c3345964736f6c63430008090033

Block Transaction Gas Used Reward
Age Block Fee Address BC Fee Address Voting Power Jailed Incoming
Block Uncle Number Difficulty Gas Used Reward
Loading