ETH Price: $2,889.75 (-2.20%)

Contract

0x443EA0340cb75a160F31A440722dec7b5bc3C2E9

Overview

ETH Balance

0 ETH

ETH Value

$0.00

More Info

Private Name Tags

Multichain Info

No addresses found
Transaction Hash
Block
From
To

There are no matching entries

Please try again later

View more zero value Internal Transactions in Advanced View mode

Advanced mode:

Cross-Chain Transactions
Loading...
Loading

Similar Match Source Code
This contract matches the deployed Bytecode of the Source Code for Contract 0x0BeDf06D...b73DE0CA4 in Sonic Mainnet
The constructor portion of the code might be different and could alter the actual behaviour of the contract

Contract Name:
CometExtAssetList

Compiler Version
v0.8.15+commit.e14f2714

Optimization Enabled:
Yes with 1 runs

Other Settings:
Default EvmVersion

Contract Source Code (Solidity)

/**
 *Submitted for verification at uniscan.xyz on 2025-03-27
*/

{{
  "language": "Solidity",
  "sources": {
    "contracts/CometConfiguration.sol": {
      "content": "// SPDX-License-Identifier: BUSL-1.1\npragma solidity 0.8.15;\n\n/**\n * @title Compound's Comet Configuration Interface\n * @author Compound\n */\ncontract CometConfiguration {\n    struct ExtConfiguration {\n        bytes32 name32;\n        bytes32 symbol32;\n    }\n\n    struct Configuration {\n        address governor;\n        address pauseGuardian;\n        address baseToken;\n        address baseTokenPriceFeed;\n        address extensionDelegate;\n\n        uint64 supplyKink;\n        uint64 supplyPerYearInterestRateSlopeLow;\n        uint64 supplyPerYearInterestRateSlopeHigh;\n        uint64 supplyPerYearInterestRateBase;\n        uint64 borrowKink;\n        uint64 borrowPerYearInterestRateSlopeLow;\n        uint64 borrowPerYearInterestRateSlopeHigh;\n        uint64 borrowPerYearInterestRateBase;\n        uint64 storeFrontPriceFactor;\n        uint64 trackingIndexScale;\n        uint64 baseTrackingSupplySpeed;\n        uint64 baseTrackingBorrowSpeed;\n        uint104 baseMinForRewards;\n        uint104 baseBorrowMin;\n        uint104 targetReserves;\n\n        AssetConfig[] assetConfigs;\n    }\n\n    struct AssetConfig {\n        address asset;\n        address priceFeed;\n        uint8 decimals;\n        uint64 borrowCollateralFactor;\n        uint64 liquidateCollateralFactor;\n        uint64 liquidationFactor;\n        uint128 supplyCap;\n    }\n}\n"
    },
    "contracts/CometCore.sol": {
      "content": "// SPDX-License-Identifier: BUSL-1.1\npragma solidity 0.8.15;\n\nimport \"./CometConfiguration.sol\";\nimport \"./CometStorage.sol\";\nimport \"./CometMath.sol\";\n\nabstract contract CometCore is CometConfiguration, CometStorage, CometMath {\n    struct AssetInfo {\n        uint8 offset;\n        address asset;\n        address priceFeed;\n        uint64 scale;\n        uint64 borrowCollateralFactor;\n        uint64 liquidateCollateralFactor;\n        uint64 liquidationFactor;\n        uint128 supplyCap;\n    }\n\n    /** Internal constants **/\n\n    /// @dev The max number of assets this contract is hardcoded to support\n    ///  Do not change this variable without updating all the fields throughout the contract,\n    //    including the size of UserBasic.assetsIn and corresponding integer conversions.\n    uint8 internal constant MAX_ASSETS = 15;\n\n    /// @dev The max number of decimals base token can have\n    ///  Note this cannot just be increased arbitrarily.\n    uint8 internal constant MAX_BASE_DECIMALS = 18;\n\n    /// @dev The max value for a collateral factor (1)\n    uint64 internal constant MAX_COLLATERAL_FACTOR = FACTOR_SCALE;\n\n    /// @dev Offsets for specific actions in the pause flag bit array\n    uint8 internal constant PAUSE_SUPPLY_OFFSET = 0;\n    uint8 internal constant PAUSE_TRANSFER_OFFSET = 1;\n    uint8 internal constant PAUSE_WITHDRAW_OFFSET = 2;\n    uint8 internal constant PAUSE_ABSORB_OFFSET = 3;\n    uint8 internal constant PAUSE_BUY_OFFSET = 4;\n\n    /// @dev The decimals required for a price feed\n    uint8 internal constant PRICE_FEED_DECIMALS = 8;\n\n    /// @dev 365 days * 24 hours * 60 minutes * 60 seconds\n    uint64 internal constant SECONDS_PER_YEAR = 31_536_000;\n\n    /// @dev The scale for base tracking accrual\n    uint64 internal constant BASE_ACCRUAL_SCALE = 1e6;\n\n    /// @dev The scale for base index (depends on time/rate scales, not base token)\n    uint64 internal constant BASE_INDEX_SCALE = 1e15;\n\n    /// @dev The scale for prices (in USD)\n    uint64 internal constant PRICE_SCALE = uint64(10 ** PRICE_FEED_DECIMALS);\n\n    /// @dev The scale for factors\n    uint64 internal constant FACTOR_SCALE = 1e18;\n\n    /// @dev The storage slot for reentrancy guard flags\n    bytes32 internal constant REENTRANCY_GUARD_FLAG_SLOT = bytes32(keccak256(\"comet.reentrancy.guard\"));\n\n    /// @dev The reentrancy guard statuses\n    uint256 internal constant REENTRANCY_GUARD_NOT_ENTERED = 0;\n    uint256 internal constant REENTRANCY_GUARD_ENTERED = 1;\n\n    /**\n     * @notice Determine if the manager has permission to act on behalf of the owner\n     * @param owner The owner account\n     * @param manager The manager account\n     * @return Whether or not the manager has permission\n     */\n    function hasPermission(address owner, address manager) public view returns (bool) {\n        return owner == manager || isAllowed[owner][manager];\n    }\n\n    /**\n     * @dev The positive present supply balance if positive or the negative borrow balance if negative\n     */\n    function presentValue(int104 principalValue_) internal view returns (int256) {\n        if (principalValue_ >= 0) {\n            return signed256(presentValueSupply(baseSupplyIndex, uint104(principalValue_)));\n        } else {\n            return -signed256(presentValueBorrow(baseBorrowIndex, uint104(-principalValue_)));\n        }\n    }\n\n    /**\n     * @dev The principal amount projected forward by the supply index\n     */\n    function presentValueSupply(uint64 baseSupplyIndex_, uint104 principalValue_) internal pure returns (uint256) {\n        return uint256(principalValue_) * baseSupplyIndex_ / BASE_INDEX_SCALE;\n    }\n\n    /**\n     * @dev The principal amount projected forward by the borrow index\n     */\n    function presentValueBorrow(uint64 baseBorrowIndex_, uint104 principalValue_) internal pure returns (uint256) {\n        return uint256(principalValue_) * baseBorrowIndex_ / BASE_INDEX_SCALE;\n    }\n\n    /**\n     * @dev The positive principal if positive or the negative principal if negative\n     */\n    function principalValue(int256 presentValue_) internal view returns (int104) {\n        if (presentValue_ >= 0) {\n            return signed104(principalValueSupply(baseSupplyIndex, uint256(presentValue_)));\n        } else {\n            return -signed104(principalValueBorrow(baseBorrowIndex, uint256(-presentValue_)));\n        }\n    }\n\n    /**\n     * @dev The present value projected backward by the supply index (rounded down)\n     *  Note: This will overflow (revert) at 2^104/1e18=~20 trillion principal for assets with 18 decimals.\n     */\n    function principalValueSupply(uint64 baseSupplyIndex_, uint256 presentValue_) internal pure returns (uint104) {\n        return safe104((presentValue_ * BASE_INDEX_SCALE) / baseSupplyIndex_);\n    }\n\n    /**\n     * @dev The present value projected backward by the borrow index (rounded up)\n     *  Note: This will overflow (revert) at 2^104/1e18=~20 trillion principal for assets with 18 decimals.\n     */\n    function principalValueBorrow(uint64 baseBorrowIndex_, uint256 presentValue_) internal pure returns (uint104) {\n        return safe104((presentValue_ * BASE_INDEX_SCALE + baseBorrowIndex_ - 1) / baseBorrowIndex_);\n    }\n}\n"
    },
    "contracts/CometExt.sol": {
      "content": "// SPDX-License-Identifier: BUSL-1.1\npragma solidity 0.8.15;\n\nimport \"./CometExtInterface.sol\";\n\ncontract CometExt is CometExtInterface {\n    /** Public constants **/\n\n    /// @notice The major version of this contract\n    string public override constant version = \"0\";\n\n    /** Internal constants **/\n\n    /// @dev The EIP-712 typehash for the contract's domain\n    bytes32 internal constant DOMAIN_TYPEHASH = keccak256(\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\");\n\n    /// @dev The EIP-712 typehash for allowBySig Authorization\n    bytes32 internal constant AUTHORIZATION_TYPEHASH = keccak256(\"Authorization(address owner,address manager,bool isAllowed,uint256 nonce,uint256 expiry)\");\n\n    /// @dev The highest valid value for s in an ECDSA signature pair (0 < s < secp256k1n ÷ 2 + 1)\n    ///  See https://ethereum.github.io/yellowpaper/paper.pdf #307)\n    uint internal constant MAX_VALID_ECDSA_S = 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0;\n\n    /** Immutable symbol **/\n\n    /// @dev The ERC20 name for wrapped base token\n    bytes32 internal immutable name32;\n\n    /// @dev The ERC20 symbol for wrapped base token\n    bytes32 internal immutable symbol32;\n\n    /**\n     * @notice Construct a new protocol instance\n     * @param config The mapping of initial/constant parameters\n     **/\n    constructor(ExtConfiguration memory config) {\n        name32 = config.name32;\n        symbol32 = config.symbol32;\n    }\n\n    /** External getters for internal constants **/\n\n    function baseAccrualScale() override external pure returns (uint64) { return BASE_ACCRUAL_SCALE; }\n    function baseIndexScale() override external pure returns (uint64) { return BASE_INDEX_SCALE; }\n    function factorScale() override external pure returns (uint64) { return FACTOR_SCALE; }\n    function priceScale() override external pure returns (uint64) { return PRICE_SCALE; }\n    function maxAssets() override virtual external pure returns (uint8) { return MAX_ASSETS; }\n\n    /**\n     * @notice Aggregate variables tracked for the entire market\n     **/\n    function totalsBasic() public override view returns (TotalsBasic memory) {\n        return TotalsBasic({\n            baseSupplyIndex: baseSupplyIndex,\n            baseBorrowIndex: baseBorrowIndex,\n            trackingSupplyIndex: trackingSupplyIndex,\n            trackingBorrowIndex: trackingBorrowIndex,\n            totalSupplyBase: totalSupplyBase,\n            totalBorrowBase: totalBorrowBase,\n            lastAccrualTime: lastAccrualTime,\n            pauseFlags: pauseFlags\n        });\n    }\n\n    /** Additional ERC20 functionality and approval interface **/\n\n    /**\n     * @notice Get the ERC20 name for wrapped base token\n     * @return The name as a string\n     */\n    function name() override public view returns (string memory) {\n        uint8 i;\n        for (i = 0; i < 32; ) {\n            if (name32[i] == 0) {\n                break;\n            }\n            unchecked { i++; }\n        }\n        bytes memory name_ = new bytes(i);\n        for (uint8 j = 0; j < i; ) {\n            name_[j] = name32[j];\n            unchecked { j++; }\n        }\n        return string(name_);\n    }\n\n    /**\n     * @notice Get the ERC20 symbol for wrapped base token\n     * @return The symbol as a string\n     */\n    function symbol() override external view returns (string memory) {\n        uint8 i;\n        for (i = 0; i < 32; ) {\n            if (symbol32[i] == 0) {\n                break;\n            }\n            unchecked { i++; }\n        }\n        bytes memory symbol_ = new bytes(i);\n        for (uint8 j = 0; j < i; ) {\n            symbol_[j] = symbol32[j];\n            unchecked { j++; }\n        }\n        return string(symbol_);\n    }\n\n    /**\n     * @notice Query the current collateral balance of an account\n     * @param account The account whose balance to query\n     * @param asset The collateral asset to check the balance for\n     * @return The collateral balance of the account\n     */\n    function collateralBalanceOf(address account, address asset) override external view returns (uint128) {\n        return userCollateral[account][asset].balance;\n    }\n\n    /**\n     * @notice Query the total accrued base rewards for an account\n     * @param account The account to query\n     * @return The accrued rewards, scaled by `BASE_ACCRUAL_SCALE`\n     */\n    function baseTrackingAccrued(address account) override external view returns (uint64) {\n        return userBasic[account].baseTrackingAccrued;\n    }\n\n    /**\n      * @notice Approve or disallow `spender` to transfer on sender's behalf\n      * @dev Note: this binary approval is unlike most other ERC20 tokens\n      * @dev Note: this grants full approval for spender to manage *all* the owner's assets\n      * @param spender The address of the account which may transfer tokens\n      * @param amount Either uint.max (to allow) or zero (to disallow)\n      * @return Whether or not the approval change succeeded\n      */\n    function approve(address spender, uint256 amount) override external returns (bool) {\n        if (amount == type(uint256).max) {\n            allowInternal(msg.sender, spender, true);\n        } else if (amount == 0) {\n            allowInternal(msg.sender, spender, false);\n        } else {\n            revert BadAmount();\n        }\n        return true;\n    }\n\n    /**\n      * @notice Get the current allowance from `owner` for `spender`\n      * @dev Note: this binary allowance is unlike most other ERC20 tokens\n      * @dev Note: this allowance allows spender to manage *all* the owner's assets\n      * @param owner The address of the account which owns the tokens to be spent\n      * @param spender The address of the account which may transfer tokens\n      * @return Either uint.max (spender is allowed) or zero (spender is disallowed)\n      */\n    function allowance(address owner, address spender) override external view returns (uint256) {\n        return hasPermission(owner, spender) ? type(uint256).max : 0;\n    }\n\n    /**\n     * @notice Allow or disallow another address to withdraw, or transfer from the sender\n     * @param manager The account which will be allowed or disallowed\n     * @param isAllowed_ Whether to allow or disallow\n     */\n    function allow(address manager, bool isAllowed_) override external {\n        allowInternal(msg.sender, manager, isAllowed_);\n    }\n\n    /**\n     * @dev Stores the flag marking whether the manager is allowed to act on behalf of owner\n     */\n    function allowInternal(address owner, address manager, bool isAllowed_) internal {\n        isAllowed[owner][manager] = isAllowed_;\n        emit Approval(owner, manager, isAllowed_ ? type(uint256).max : 0);\n    }\n\n    /**\n     * @notice Sets authorization status for a manager via signature from signatory\n     * @param owner The address that signed the signature\n     * @param manager The address to authorize (or rescind authorization from)\n     * @param isAllowed_ Whether to authorize or rescind authorization from manager\n     * @param nonce The next expected nonce value for the signatory\n     * @param expiry Expiration time for the signature\n     * @param v The recovery byte of the signature\n     * @param r Half of the ECDSA signature pair\n     * @param s Half of the ECDSA signature pair\n     */\n    function allowBySig(\n        address owner,\n        address manager,\n        bool isAllowed_,\n        uint256 nonce,\n        uint256 expiry,\n        uint8 v,\n        bytes32 r,\n        bytes32 s\n    ) override external {\n        if (uint256(s) > MAX_VALID_ECDSA_S) revert InvalidValueS();\n        // v ∈ {27, 28} (source: https://ethereum.github.io/yellowpaper/paper.pdf #308)\n        if (v != 27 && v != 28) revert InvalidValueV();\n        bytes32 domainSeparator = keccak256(abi.encode(DOMAIN_TYPEHASH, keccak256(bytes(name())), keccak256(bytes(version)), block.chainid, address(this)));\n        bytes32 structHash = keccak256(abi.encode(AUTHORIZATION_TYPEHASH, owner, manager, isAllowed_, nonce, expiry));\n        bytes32 digest = keccak256(abi.encodePacked(\"\\x19\\x01\", domainSeparator, structHash));\n        address signatory = ecrecover(digest, v, r, s);\n        if (signatory == address(0)) revert BadSignatory();\n        if (owner != signatory) revert BadSignatory();\n        if (nonce != userNonce[signatory]++) revert BadNonce();\n        if (block.timestamp >= expiry) revert SignatureExpired();\n        allowInternal(signatory, manager, isAllowed_);\n    }\n}"
    },
    "contracts/CometExtAssetList.sol": {
      "content": "// SPDX-License-Identifier: BUSL-1.1\npragma solidity 0.8.15;\n\nimport \"./CometExt.sol\";\n\ncontract CometExtAssetList is CometExt {\n\n    /// @notice The address of the asset list factory\n    address immutable public assetListFactory;\n\n    /**\n     * @notice Construct a new protocol instance\n     * @param config The mapping of initial/constant parameters\n     * @param assetListFactoryAddress The address of the asset list factory\n     **/\n    constructor(ExtConfiguration memory config, address assetListFactoryAddress) CometExt(config) {\n        assetListFactory = assetListFactoryAddress;\n    }\n    \n    uint8 internal constant MAX_ASSETS_FOR_ASSET_LIST = 24;\n\n    function maxAssets() override external pure returns (uint8) { return MAX_ASSETS_FOR_ASSET_LIST; }\n}"
    },
    "contracts/CometExtInterface.sol": {
      "content": "// SPDX-License-Identifier: BUSL-1.1\npragma solidity 0.8.15;\n\nimport \"./CometCore.sol\";\n\n/**\n * @title Compound's Comet Ext Interface\n * @notice An efficient monolithic money market protocol\n * @author Compound\n */\nabstract contract CometExtInterface is CometCore {\n    error BadAmount();\n    error BadNonce();\n    error BadSignatory();\n    error InvalidValueS();\n    error InvalidValueV();\n    error SignatureExpired();\n\n    function allow(address manager, bool isAllowed) virtual external;\n    function allowBySig(address owner, address manager, bool isAllowed, uint256 nonce, uint256 expiry, uint8 v, bytes32 r, bytes32 s) virtual external;\n\n    function collateralBalanceOf(address account, address asset) virtual external view returns (uint128);\n    function baseTrackingAccrued(address account) virtual external view returns (uint64);\n\n    function baseAccrualScale() virtual external view returns (uint64);\n    function baseIndexScale() virtual external view returns (uint64);\n    function factorScale() virtual external view returns (uint64);\n    function priceScale() virtual external view returns (uint64);\n\n    function maxAssets() virtual external view returns (uint8);\n\n    function totalsBasic() virtual external view returns (TotalsBasic memory);\n\n    function version() virtual external view returns (string memory);\n\n    /**\n      * ===== ERC20 interfaces =====\n      * Does not include the following functions/events, which are defined in `CometMainInterface` instead:\n      * - function decimals() virtual external view returns (uint8)\n      * - function totalSupply() virtual external view returns (uint256)\n      * - function transfer(address dst, uint amount) virtual external returns (bool)\n      * - function transferFrom(address src, address dst, uint amount) virtual external returns (bool)\n      * - function balanceOf(address owner) virtual external view returns (uint256)\n      * - event Transfer(address indexed from, address indexed to, uint256 amount)\n      */\n    function name() virtual external view returns (string memory);\n    function symbol() virtual external view returns (string memory);\n\n    /**\n      * @notice Approve `spender` to transfer up to `amount` from `src`\n      * @dev This will overwrite the approval amount for `spender`\n      *  and is subject to issues noted [here](https://eips.ethereum.org/EIPS/eip-20#approve)\n      * @param spender The address of the account which may transfer tokens\n      * @param amount The number of tokens that are approved (-1 means infinite)\n      * @return Whether or not the approval succeeded\n      */\n    function approve(address spender, uint256 amount) virtual external returns (bool);\n\n    /**\n      * @notice Get the current allowance from `owner` for `spender`\n      * @param owner The address of the account which owns the tokens to be spent\n      * @param spender The address of the account which may transfer tokens\n      * @return The number of tokens allowed to be spent (-1 means infinite)\n      */\n    function allowance(address owner, address spender) virtual external view returns (uint256);\n\n    event Approval(address indexed owner, address indexed spender, uint256 amount);\n}"
    },
    "contracts/CometMath.sol": {
      "content": "// SPDX-License-Identifier: BUSL-1.1\npragma solidity 0.8.15;\n\n/**\n * @title Compound's Comet Math Contract\n * @dev Pure math functions\n * @author Compound\n */\ncontract CometMath {\n    /** Custom errors **/\n\n    error InvalidUInt64();\n    error InvalidUInt104();\n    error InvalidUInt128();\n    error InvalidInt104();\n    error InvalidInt256();\n    error NegativeNumber();\n\n    function safe64(uint n) internal pure returns (uint64) {\n        if (n > type(uint64).max) revert InvalidUInt64();\n        return uint64(n);\n    }\n\n    function safe104(uint n) internal pure returns (uint104) {\n        if (n > type(uint104).max) revert InvalidUInt104();\n        return uint104(n);\n    }\n\n    function safe128(uint n) internal pure returns (uint128) {\n        if (n > type(uint128).max) revert InvalidUInt128();\n        return uint128(n);\n    }\n\n    function signed104(uint104 n) internal pure returns (int104) {\n        if (n > uint104(type(int104).max)) revert InvalidInt104();\n        return int104(n);\n    }\n\n    function signed256(uint256 n) internal pure returns (int256) {\n        if (n > uint256(type(int256).max)) revert InvalidInt256();\n        return int256(n);\n    }\n\n    function unsigned104(int104 n) internal pure returns (uint104) {\n        if (n < 0) revert NegativeNumber();\n        return uint104(n);\n    }\n\n    function unsigned256(int256 n) internal pure returns (uint256) {\n        if (n < 0) revert NegativeNumber();\n        return uint256(n);\n    }\n\n    function toUInt8(bool x) internal pure returns (uint8) {\n        return x ? 1 : 0;\n    }\n\n    function toBool(uint8 x) internal pure returns (bool) {\n        return x != 0;\n    }\n}\n"
    },
    "contracts/CometStorage.sol": {
      "content": "// SPDX-License-Identifier: BUSL-1.1\npragma solidity 0.8.15;\n\n/**\n * @title Compound's Comet Storage Interface\n * @dev Versions can enforce append-only storage slots via inheritance.\n * @author Compound\n */\ncontract CometStorage {\n    // 512 bits total = 2 slots\n    struct TotalsBasic {\n        // 1st slot\n        uint64 baseSupplyIndex;\n        uint64 baseBorrowIndex;\n        uint64 trackingSupplyIndex;\n        uint64 trackingBorrowIndex;\n        // 2nd slot\n        uint104 totalSupplyBase;\n        uint104 totalBorrowBase;\n        uint40 lastAccrualTime;\n        uint8 pauseFlags;\n    }\n\n    struct TotalsCollateral {\n        uint128 totalSupplyAsset;\n        uint128 _reserved;\n    }\n\n    struct UserBasic {\n        int104 principal;\n        uint64 baseTrackingIndex;\n        uint64 baseTrackingAccrued;\n        uint16 assetsIn;\n        uint8 _reserved;\n    }\n\n    struct UserCollateral {\n        uint128 balance;\n        uint128 _reserved;\n    }\n\n    struct LiquidatorPoints {\n        uint32 numAbsorbs;\n        uint64 numAbsorbed;\n        uint128 approxSpend;\n        uint32 _reserved;\n    }\n\n    /// @dev Aggregate variables tracked for the entire market\n    uint64 internal baseSupplyIndex;\n    uint64 internal baseBorrowIndex;\n    uint64 internal trackingSupplyIndex;\n    uint64 internal trackingBorrowIndex;\n    uint104 internal totalSupplyBase;\n    uint104 internal totalBorrowBase;\n    uint40 internal lastAccrualTime;\n    uint8 internal pauseFlags;\n\n    /// @notice Aggregate variables tracked for each collateral asset\n    mapping(address => TotalsCollateral) public totalsCollateral;\n\n    /// @notice Mapping of users to accounts which may be permitted to manage the user account\n    mapping(address => mapping(address => bool)) public isAllowed;\n\n    /// @notice The next expected nonce for an address, for validating authorizations via signature\n    mapping(address => uint) public userNonce;\n\n    /// @notice Mapping of users to base principal and other basic data\n    mapping(address => UserBasic) public userBasic;\n\n    /// @notice Mapping of users to collateral data per collateral asset\n    mapping(address => mapping(address => UserCollateral)) public userCollateral;\n\n    /// @notice Mapping of magic liquidator points\n    mapping(address => LiquidatorPoints) public liquidatorPoints;\n}\n"
    }
  },
  "settings": {
    "optimizer": {
      "enabled": true,
      "runs": 1,
      "details": {
        "yulDetails": {
          "optimizerSteps": "dhfoDgvulfnTUtnIf [xa[r]scLM cCTUtTOntnfDIul Lcul Vcul [j] Tpeul xa[rul] xa[r]cL gvif CTUca[r]LsTOtfDnca[r]Iulc] jmul[jul] VcTOcul jmul"
        }
      }
    },
    "outputSelection": {
      "*": {
        "*": [
          "evm.bytecode",
          "evm.deployedBytecode",
          "devdoc",
          "userdoc",
          "metadata",
          "abi"
        ]
      }
    },
    "viaIR": true,
    "libraries": {}
  }
}}

Contract Security Audit

Contract ABI

API
[{"inputs":[{"components":[{"internalType":"bytes32","name":"name32","type":"bytes32"},{"internalType":"bytes32","name":"symbol32","type":"bytes32"}],"internalType":"struct CometConfiguration.ExtConfiguration","name":"config","type":"tuple"},{"internalType":"address","name":"assetListFactoryAddress","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"BadAmount","type":"error"},{"inputs":[],"name":"BadNonce","type":"error"},{"inputs":[],"name":"BadSignatory","type":"error"},{"inputs":[],"name":"InvalidInt104","type":"error"},{"inputs":[],"name":"InvalidInt256","type":"error"},{"inputs":[],"name":"InvalidUInt104","type":"error"},{"inputs":[],"name":"InvalidUInt128","type":"error"},{"inputs":[],"name":"InvalidUInt64","type":"error"},{"inputs":[],"name":"InvalidValueS","type":"error"},{"inputs":[],"name":"InvalidValueV","type":"error"},{"inputs":[],"name":"NegativeNumber","type":"error"},{"inputs":[],"name":"SignatureExpired","type":"error"},{"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"},{"inputs":[{"internalType":"address","name":"manager","type":"address"},{"internalType":"bool","name":"isAllowed_","type":"bool"}],"name":"allow","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"manager","type":"address"},{"internalType":"bool","name":"isAllowed_","type":"bool"},{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"uint256","name":"expiry","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"allowBySig","outputs":[],"stateMutability":"nonpayable","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":[],"name":"assetListFactory","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"baseAccrualScale","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"baseIndexScale","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"baseTrackingAccrued","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"address","name":"asset","type":"address"}],"name":"collateralBalanceOf","outputs":[{"internalType":"uint128","name":"","type":"uint128"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"factorScale","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"manager","type":"address"}],"name":"hasPermission","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"isAllowed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"liquidatorPoints","outputs":[{"internalType":"uint32","name":"numAbsorbs","type":"uint32"},{"internalType":"uint64","name":"numAbsorbed","type":"uint64"},{"internalType":"uint128","name":"approxSpend","type":"uint128"},{"internalType":"uint32","name":"_reserved","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxAssets","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"priceScale","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalsBasic","outputs":[{"components":[{"internalType":"uint64","name":"baseSupplyIndex","type":"uint64"},{"internalType":"uint64","name":"baseBorrowIndex","type":"uint64"},{"internalType":"uint64","name":"trackingSupplyIndex","type":"uint64"},{"internalType":"uint64","name":"trackingBorrowIndex","type":"uint64"},{"internalType":"uint104","name":"totalSupplyBase","type":"uint104"},{"internalType":"uint104","name":"totalBorrowBase","type":"uint104"},{"internalType":"uint40","name":"lastAccrualTime","type":"uint40"},{"internalType":"uint8","name":"pauseFlags","type":"uint8"}],"internalType":"struct CometStorage.TotalsBasic","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"totalsCollateral","outputs":[{"internalType":"uint128","name":"totalSupplyAsset","type":"uint128"},{"internalType":"uint128","name":"_reserved","type":"uint128"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"userBasic","outputs":[{"internalType":"int104","name":"principal","type":"int104"},{"internalType":"uint64","name":"baseTrackingIndex","type":"uint64"},{"internalType":"uint64","name":"baseTrackingAccrued","type":"uint64"},{"internalType":"uint16","name":"assetsIn","type":"uint16"},{"internalType":"uint8","name":"_reserved","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"userCollateral","outputs":[{"internalType":"uint128","name":"balance","type":"uint128"},{"internalType":"uint128","name":"_reserved","type":"uint128"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"userNonce","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"version","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"}]

0x60e06040523461009657610e90803803908161001a8161009b565b928392833981010360608112610096576040136100965761003b604061009b565b81518082526020808401519201918252604090920151916001600160a01b0383168303610096576080525160a05260c052604051610db990816100d7823960805181610c46015260a05181610745015260c0518161083b0152f35b600080fd5b6040519190601f01601f191682016001600160401b038111838210176100c057604052565b634e487b7160e01b600052604160045260246000fdfe6040608081526004908136101561001557600080fd5b600091823560e01c806306fdde0314610aa1578063095ea7b314610a335780630f21d96b14610a10578063110496e5146109d85780632b92a07d146109725780632e04b8e71461093957806354fd4d501461091057806359e017bd146108c15780635c2549ee1461086a5780637042e2d81461082657806394b2294b1461080a57806395d89b411461073057806396e7a9c11461070e578063a0fbddaf146106ef578063a16543791461069a578063a20ed5961461067c578063ab9ba7f414610634578063b9f0baf71461051f578063bb24d9941461029b578063c5fa15cf14610232578063cde68041146101e7578063dc4abafd146101795763dd62ed3e1461011e57600080fd5b346101755781600319360112610175576001600160a01b0390358181168103610171576024359182168203610171576020939161015a91610bac565b1561016b5750600019905b51908152f35b90610165565b8380fd5b8280fd5b503461017557602036600319011261017557356001600160a01b038116908190036101755782829160a094526005602052205481519181600c0b835260018060401b03808360681c1660208501528260a81c169083015261ffff8160e81c16606083015260f81c6080820152f35b50346101755781600319360112610175576001600160a01b0392903590838216820361022f57602435938416840361022f575060209261022691610bac565b90519015158152f35b80fd5b503461017557602036600319011261017557356001600160a01b0381169081900361017557828291608094526007602052205481519163ffffffff8216835260018060401b038260201c166020840152600180851b038260601c169083015260e01c6060820152f35b5034610175576101003660031901126101755780356001600160a01b03818116929183900361051b576024359181831680840361051757604435948515159182870361051357606435916084359360a43560ff811680910361050f5760e435906fa2a8918ca85bafe22016d0b997e4df60600160ff1b0382116104ff57601b811415806104f4575b6104e4578b8d92608092610335610c44565b958651986020998a80990120610349610b84565b8981519101208651908a8201927f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f845288830152606082015246888201523060a082015260a0815261039c60c082610b30565b51902091855190898201927fab8e80cad03d9def1f2f6f14831e15fd29eb88f59ac40032be3f8047b5ee33ed84528b888401526060830152878201528b60a08201528c60c082015260c081526103f360e082610b30565b5190208451908882019261190160f01b8452602283015260428201526042815261041e606282610b30565b51902092519283528583015260c4358e830152606082015282805260015afa156104da5789519586169081156104ca5781036104ba5789528390528688208054919060001983146104a757600183019055036104985742101561048a5750906104879291610ced565b51f35b8451630819bdcd60e01b8152fd5b5084516312f55d3b60e21b8152fd5b634e487b7160e01b8a526011855260248afd5b88516310188bcb60e21b81528590fd5b89516310188bcb60e21b81528690fd5b88513d8b823e3d90fd5b8b51639c5b7fcf60e01b81528890fd5b50601c811415610323565b8b5163ed9a019560e01b81528890fd5b8b80fd5b8880fd5b8680fd5b8480fd5b50503461063057816003193601126106305780519180610100936105438582610b30565b81815281602082015281848201528160608201528160808201528160a08201528160c082015260e0015254600160401b60019003908181169060015492839285519261058f8885610b30565b81845260208401968382821c1688528381860192818160801c168452606087019060c01c81526080870192600160681b60019003968795868b16865260a08a0197878c60681c16895260c08b019a64ffffffffff809d60d01c168c5260e0019c60f81c8d528284519e8f928352511690602001525116908b01525116606089015251166080870152511660a0850152511660c08301525160ff1660e0820152f35b5080fd5b503461017557602036600319011261017557356001600160a01b03811690819003610175578252600560209081529181902054905160a89190911c6001600160401b03168152f35b50503461063057816003193601126106305760209051620f42408152f35b50346101755781600319360112610175576001600160a01b0390358181169081900361017157602435918216809203610171578360ff9284926020965260038652828220908252855220541690519015158152f35b505034610630578160031936011261063057602090516305f5e1008152f35b5050346106305781600319360112610630576020905166038d7ea4c680008152f35b503461017557826003193601126101755782917f0000000000000000000000000000000000000000000000000000000000000000935b60ff9081811660208110156107fe5786901a60f81b6001600160f81b031916156107935760010116610766565b9391929490505b60ff809416906107a982610beb565b92805b868116848110156107ed5760208110156107da578791816107d2866001941a9189610c1d565b5301166107ac565b634e487b7160e01b835260328952602483fd5b8651806107fa8882610abf565b0390f35b5093919294905061079a565b5050346106305781600319360112610630576020905160188152f35b505034610630578160031936011261063057517f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168152602090f35b5034610175578160031936011261017557356001600160a01b038181169391849003610630576024359081168091036106305760209382526006845282822090825283528160018060801b03912054169051908152f35b503461017557602036600319011261017557356001600160a01b038116908190036101755782526002602052908190205490519081906107fa90608081901c906001600160801b031683610b16565b5050346106305781600319360112610630576107fa9061092e610b84565b905191829182610abf565b50346101755760203660031901126101755780356001600160a01b03811690819003610171579282916020948252845220549051908152f35b50346101755781600319360112610175576001600160a01b03903581811690819003610171576024359182168092036101715783526006602090815282842091845252908190205490519081906107fa90608081901c906001600160801b031683610b16565b5034610175578160031936011261017557356001600160a01b0381168103610175576024358015158103610171576104879133610ced565b50503461063057816003193601126106305760209051670de0b6b3a76400008152f35b50346101755781600319360112610175578035906001600160a01b0382168203610171576024356000198103610a7c575050602092506001610a759133610ced565b5160018152f35b610a935750602092610a8e9133610ced565b610a75565b825163749b593960e01b8152fd5b5050346106305781600319360112610630576107fa9061092e610c44565b919091602080825283519081818401526000945b828610610b00575050806040939411610af3575b601f01601f1916010190565b6000838284010152610ae7565b8581018201518487016040015294810194610ad3565b6001600160801b0391821681529116602082015260400190565b601f909101601f19168101906001600160401b03821190821017610b5357604052565b634e487b7160e01b600052604160045260246000fd5b6001600160401b038111610b5357601f01601f191660200190565b610b8e6001610b69565b90610b9c6040519283610b30565b60018252600360fc1b6020830152565b6001600160a01b039081169116818114918215610bc857505090565b909150600052600360205260406000209060005260205260ff6040600020541690565b90610bf582610b69565b610c026040519182610b30565b8281528092610c13601f1991610b69565b0190602036910137565b908151811015610c2e570160200190565b634e487b7160e01b600052603260045260246000fd5b7f000000000000000000000000000000000000000000000000000000000000000060005b60ff908181166020811015610ce45783901a60f81b6001600160f81b03191615610c955760010116610c68565b9290505b60ff80931691610ca883610beb565b9060005b85811685811015610cda576020811015610c2e57869181610cd2856001941a9187610c1d565b530116610cac565b5050509150915090565b50929050610c99565b91909160018060a01b03809116916000918383526003602052604083209416938483526020526040822060ff1981541660ff83151516179055600014610d4c5750600080516020610d6483398151915260206000195b604051908152a3565b6020600080516020610d6483398151915291610d4356fe8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925a26469706673582212202150e061ff0ec0767acdf061949744a6cfa62ec1dbf1a55f8e044d735b2d99ff64736f6c634300080f0033436f6d706f756e6420574554480000000000000000000000000000000000000063574554487633000000000000000000000000000000000000000000000000000000000000000000000000004cfce7795bf75dc3795369a953d9a9b8c2679ae4

Deployed Bytecode

0x6040608081526004908136101561001557600080fd5b600091823560e01c806306fdde0314610aa1578063095ea7b314610a335780630f21d96b14610a10578063110496e5146109d85780632b92a07d146109725780632e04b8e71461093957806354fd4d501461091057806359e017bd146108c15780635c2549ee1461086a5780637042e2d81461082657806394b2294b1461080a57806395d89b411461073057806396e7a9c11461070e578063a0fbddaf146106ef578063a16543791461069a578063a20ed5961461067c578063ab9ba7f414610634578063b9f0baf71461051f578063bb24d9941461029b578063c5fa15cf14610232578063cde68041146101e7578063dc4abafd146101795763dd62ed3e1461011e57600080fd5b346101755781600319360112610175576001600160a01b0390358181168103610171576024359182168203610171576020939161015a91610bac565b1561016b5750600019905b51908152f35b90610165565b8380fd5b8280fd5b503461017557602036600319011261017557356001600160a01b038116908190036101755782829160a094526005602052205481519181600c0b835260018060401b03808360681c1660208501528260a81c169083015261ffff8160e81c16606083015260f81c6080820152f35b50346101755781600319360112610175576001600160a01b0392903590838216820361022f57602435938416840361022f575060209261022691610bac565b90519015158152f35b80fd5b503461017557602036600319011261017557356001600160a01b0381169081900361017557828291608094526007602052205481519163ffffffff8216835260018060401b038260201c166020840152600180851b038260601c169083015260e01c6060820152f35b5034610175576101003660031901126101755780356001600160a01b03818116929183900361051b576024359181831680840361051757604435948515159182870361051357606435916084359360a43560ff811680910361050f5760e435906fa2a8918ca85bafe22016d0b997e4df60600160ff1b0382116104ff57601b811415806104f4575b6104e4578b8d92608092610335610c44565b958651986020998a80990120610349610b84565b8981519101208651908a8201927f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f845288830152606082015246888201523060a082015260a0815261039c60c082610b30565b51902091855190898201927fab8e80cad03d9def1f2f6f14831e15fd29eb88f59ac40032be3f8047b5ee33ed84528b888401526060830152878201528b60a08201528c60c082015260c081526103f360e082610b30565b5190208451908882019261190160f01b8452602283015260428201526042815261041e606282610b30565b51902092519283528583015260c4358e830152606082015282805260015afa156104da5789519586169081156104ca5781036104ba5789528390528688208054919060001983146104a757600183019055036104985742101561048a5750906104879291610ced565b51f35b8451630819bdcd60e01b8152fd5b5084516312f55d3b60e21b8152fd5b634e487b7160e01b8a526011855260248afd5b88516310188bcb60e21b81528590fd5b89516310188bcb60e21b81528690fd5b88513d8b823e3d90fd5b8b51639c5b7fcf60e01b81528890fd5b50601c811415610323565b8b5163ed9a019560e01b81528890fd5b8b80fd5b8880fd5b8680fd5b8480fd5b50503461063057816003193601126106305780519180610100936105438582610b30565b81815281602082015281848201528160608201528160808201528160a08201528160c082015260e0015254600160401b60019003908181169060015492839285519261058f8885610b30565b81845260208401968382821c1688528381860192818160801c168452606087019060c01c81526080870192600160681b60019003968795868b16865260a08a0197878c60681c16895260c08b019a64ffffffffff809d60d01c168c5260e0019c60f81c8d528284519e8f928352511690602001525116908b01525116606089015251166080870152511660a0850152511660c08301525160ff1660e0820152f35b5080fd5b503461017557602036600319011261017557356001600160a01b03811690819003610175578252600560209081529181902054905160a89190911c6001600160401b03168152f35b50503461063057816003193601126106305760209051620f42408152f35b50346101755781600319360112610175576001600160a01b0390358181169081900361017157602435918216809203610171578360ff9284926020965260038652828220908252855220541690519015158152f35b505034610630578160031936011261063057602090516305f5e1008152f35b5050346106305781600319360112610630576020905166038d7ea4c680008152f35b503461017557826003193601126101755782917f6357455448763300000000000000000000000000000000000000000000000000935b60ff9081811660208110156107fe5786901a60f81b6001600160f81b031916156107935760010116610766565b9391929490505b60ff809416906107a982610beb565b92805b868116848110156107ed5760208110156107da578791816107d2866001941a9189610c1d565b5301166107ac565b634e487b7160e01b835260328952602483fd5b8651806107fa8882610abf565b0390f35b5093919294905061079a565b5050346106305781600319360112610630576020905160188152f35b505034610630578160031936011261063057517f0000000000000000000000004cfce7795bf75dc3795369a953d9a9b8c2679ae46001600160a01b03168152602090f35b5034610175578160031936011261017557356001600160a01b038181169391849003610630576024359081168091036106305760209382526006845282822090825283528160018060801b03912054169051908152f35b503461017557602036600319011261017557356001600160a01b038116908190036101755782526002602052908190205490519081906107fa90608081901c906001600160801b031683610b16565b5050346106305781600319360112610630576107fa9061092e610b84565b905191829182610abf565b50346101755760203660031901126101755780356001600160a01b03811690819003610171579282916020948252845220549051908152f35b50346101755781600319360112610175576001600160a01b03903581811690819003610171576024359182168092036101715783526006602090815282842091845252908190205490519081906107fa90608081901c906001600160801b031683610b16565b5034610175578160031936011261017557356001600160a01b0381168103610175576024358015158103610171576104879133610ced565b50503461063057816003193601126106305760209051670de0b6b3a76400008152f35b50346101755781600319360112610175578035906001600160a01b0382168203610171576024356000198103610a7c575050602092506001610a759133610ced565b5160018152f35b610a935750602092610a8e9133610ced565b610a75565b825163749b593960e01b8152fd5b5050346106305781600319360112610630576107fa9061092e610c44565b919091602080825283519081818401526000945b828610610b00575050806040939411610af3575b601f01601f1916010190565b6000838284010152610ae7565b8581018201518487016040015294810194610ad3565b6001600160801b0391821681529116602082015260400190565b601f909101601f19168101906001600160401b03821190821017610b5357604052565b634e487b7160e01b600052604160045260246000fd5b6001600160401b038111610b5357601f01601f191660200190565b610b8e6001610b69565b90610b9c6040519283610b30565b60018252600360fc1b6020830152565b6001600160a01b039081169116818114918215610bc857505090565b909150600052600360205260406000209060005260205260ff6040600020541690565b90610bf582610b69565b610c026040519182610b30565b8281528092610c13601f1991610b69565b0190602036910137565b908151811015610c2e570160200190565b634e487b7160e01b600052603260045260246000fd5b7f436f6d706f756e6420574554480000000000000000000000000000000000000060005b60ff908181166020811015610ce45783901a60f81b6001600160f81b03191615610c955760010116610c68565b9290505b60ff80931691610ca883610beb565b9060005b85811685811015610cda576020811015610c2e57869181610cd2856001941a9187610c1d565b530116610cac565b5050509150915090565b50929050610c99565b91909160018060a01b03809116916000918383526003602052604083209416938483526020526040822060ff1981541660ff83151516179055600014610d4c5750600080516020610d6483398151915260206000195b604051908152a3565b6020600080516020610d6483398151915291610d4356fe8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925a26469706673582212202150e061ff0ec0767acdf061949744a6cfa62ec1dbf1a55f8e044d735b2d99ff64736f6c634300080f0033

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.