UNPKG

@dolomite-exchange/dolomite-margin

Version:

Ethereum Smart Contracts and TypeScript library used for the DolomiteMargin trading protocol

2,106 lines (2,105 loc) 991 kB
{ "contractName": "Getters", "abi": [ { "constant": true, "inputs": [], "name": "isOwner", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": false, "inputs": [ { "components": [ { "internalType": "address", "name": "owner", "type": "address" }, { "internalType": "uint256", "name": "number", "type": "uint256" } ], "internalType": "struct Account.Info[]", "name": "accounts", "type": "tuple[]" }, { "components": [ { "internalType": "enum Actions.ActionType", "name": "actionType", "type": "uint8" }, { "internalType": "uint256", "name": "accountId", "type": "uint256" }, { "components": [ { "internalType": "bool", "name": "sign", "type": "bool" }, { "internalType": "enum Types.AssetDenomination", "name": "denomination", "type": "uint8" }, { "internalType": "enum Types.AssetReference", "name": "ref", "type": "uint8" }, { "internalType": "uint256", "name": "value", "type": "uint256" } ], "internalType": "struct Types.AssetAmount", "name": "amount", "type": "tuple" }, { "internalType": "uint256", "name": "primaryMarketId", "type": "uint256" }, { "internalType": "uint256", "name": "secondaryMarketId", "type": "uint256" }, { "internalType": "address", "name": "otherAddress", "type": "address" }, { "internalType": "uint256", "name": "otherAccountId", "type": "uint256" }, { "internalType": "bytes", "name": "data", "type": "bytes" } ], "internalType": "struct Actions.ActionArgs[]", "name": "actions", "type": "tuple[]" } ], "name": "operate", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": true, "inputs": [], "name": "owner", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": false, "inputs": [ { "internalType": "address", "name": "token", "type": "address" }, { "internalType": "contract IPriceOracle", "name": "priceOracle", "type": "address" }, { "internalType": "contract IInterestSetter", "name": "interestSetter", "type": "address" }, { "components": [ { "internalType": "uint256", "name": "value", "type": "uint256" } ], "internalType": "struct Decimal.D256", "name": "marginPremium", "type": "tuple" }, { "components": [ { "internalType": "uint256", "name": "value", "type": "uint256" } ], "internalType": "struct Decimal.D256", "name": "spreadPremium", "type": "tuple" }, { "internalType": "uint256", "name": "maxSupplyWei", "type": "uint256" }, { "internalType": "uint256", "name": "maxBorrowWei", "type": "uint256" }, { "components": [ { "internalType": "uint256", "name": "value", "type": "uint256" } ], "internalType": "struct Decimal.D256", "name": "earningsRateOverride", "type": "tuple" }, { "internalType": "bool", "name": "isClosing", "type": "bool" } ], "name": "ownerAddMarket", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [ { "internalType": "uint256", "name": "accountMaxNumberOfMarketsWithBalances", "type": "uint256" } ], "name": "ownerSetAccountMaxNumberOfMarketsWithBalances", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [ { "internalType": "address", "name": "accountOwner", "type": "address" }, { "internalType": "contract IAccountRiskOverrideSetter", "name": "accountRiskOverrideSetter", "type": "address" } ], "name": "ownerSetAccountRiskOverride", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [ { "internalType": "address", "name": "autoTrader", "type": "address" }, { "internalType": "bool", "name": "special", "type": "bool" } ], "name": "ownerSetAutoTraderSpecial", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [ { "internalType": "uint256", "name": "callbackGasLimit", "type": "uint256" } ], "name": "ownerSetCallbackGasLimit", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [ { "internalType": "contract IAccountRiskOverrideSetter", "name": "accountRiskOverrideSetter", "type": "address" } ], "name": "ownerSetDefaultAccountRiskOverride", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [ { "components": [ { "internalType": "uint256", "name": "value", "type": "uint256" } ], "internalType": "struct Decimal.D256", "name": "earningsRate", "type": "tuple" } ], "name": "ownerSetEarningsRate", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [ { "internalType": "uint256", "name": "marketId", "type": "uint256" }, { "components": [ { "internalType": "uint256", "name": "value", "type": "uint256" } ], "internalType": "struct Decimal.D256", "name": "earningsRateOverride", "type": "tuple" } ], "name": "ownerSetEarningsRateOverride", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [ { "internalType": "address", "name": "operator", "type": "address" }, { "internalType": "bool", "name": "approved", "type": "bool" } ], "name": "ownerSetGlobalOperator", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [ { "internalType": "uint256", "name": "marketId", "type": "uint256" }, { "internalType": "contract IInterestSetter", "name": "interestSetter", "type": "address" } ], "name": "ownerSetInterestSetter", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [ { "internalType": "uint256", "name": "marketId", "type": "uint256" }, { "internalType": "bool", "name": "isClosing", "type": "bool" } ], "name": "ownerSetIsClosing", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [ { "components": [ { "internalType": "uint256", "name": "value", "type": "uint256" } ], "internalType": "struct Decimal.D256", "name": "spread", "type": "tuple" } ], "name": "ownerSetLiquidationSpread", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [ { "internalType": "uint256", "name": "marketId", "type": "uint256" }, { "components": [ { "internalType": "uint256", "name": "value", "type": "uint256" } ], "internalType": "struct Decimal.D256", "name": "liquidationSpreadPremium", "type": "tuple" } ], "name": "ownerSetLiquidationSpreadPremium", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [ { "internalType": "uint256", "name": "marketId", "type": "uint256" }, { "components": [ { "internalType": "uint256", "name": "value", "type": "uint256" } ], "internalType": "struct Decimal.D256", "name": "marginPremium", "type": "tuple" } ], "name": "ownerSetMarginPremium", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [ { "components": [ { "internalType": "uint256", "name": "value", "type": "uint256" } ], "internalType": "struct Decimal.D256", "name": "ratio", "type": "tuple" } ], "name": "ownerSetMarginRatio", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [ { "internalType": "uint256", "name": "marketId", "type": "uint256" }, { "internalType": "uint256", "name": "maxBorrowWei", "type": "uint256" } ], "name": "ownerSetMaxBorrowWei", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [ { "internalType": "uint256", "name": "marketId", "type": "uint256" }, { "internalType": "uint256", "name": "maxSupplyWei", "type": "uint256" } ], "name": "ownerSetMaxSupplyWei", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [ { "components": [ { "internalType": "uint256", "name": "value", "type": "uint256" } ], "internalType": "struct Monetary.Value", "name": "minBorrowedValue", "type": "tuple" } ], "name": "ownerSetMinBorrowedValue", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [ { "internalType": "contract IOracleSentinel", "name": "oracleSentinel", "type": "address" } ], "name": "ownerSetOracleSentinel", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [ { "internalType": "uint256", "name": "marketId", "type": "uint256" }, { "internalType": "contract IPriceOracle", "name": "priceOracle", "type": "address" } ], "name": "ownerSetPriceOracle", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [ { "internalType": "uint256", "name": "marketId", "type": "uint256" }, { "internalType": "address", "name": "recipient", "type": "address" } ], "name": "ownerWithdrawExcessTokens", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [ { "internalType": "address", "name": "token", "type": "address" }, { "internalType": "address", "name": "recipient", "type": "address" } ], "name": "ownerWithdrawUnsupportedTokens", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [], "name": "renounceOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [ { "components": [ { "internalType": "address", "name": "operator", "type": "address" }, { "internalType": "bool", "name": "trusted", "type": "bool" } ], "internalType": "struct Types.OperatorArg[]", "name": "args", "type": "tuple[]" } ], "name": "setOperators", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [ { "internalType": "address", "name": "newOwner", "type": "address" } ], "name": "transferOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": true, "inputs": [], "name": "getMarginRatio", "outputs": [ { "components": [ { "internalType": "uint256", "name": "value", "type": "uint256" } ], "internalType": "struct Decimal.D256", "name": "", "type": "tuple" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [ { "components": [ { "internalType": "address", "name": "owner", "type": "address" }, { "internalType": "uint256", "name": "number", "type": "uint256" } ], "internalType": "struct Account.Info", "name": "account", "type": "tuple" } ], "name": "getMarginRatioForAccount", "outputs": [ { "components": [ { "internalType": "uint256", "name": "value", "type": "uint256" } ], "internalType": "struct Decimal.D256", "name": "", "type": "tuple" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "getLiquidationSpread", "outputs": [ { "components": [ { "internalType": "uint256", "name": "value", "type": "uint256" } ], "internalType": "struct Decimal.D256", "name": "", "type": "tuple" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [ { "internalType": "uint256", "name": "heldMarketId", "type": "uint256" }, { "internalType": "uint256", "name": "owedMarketId", "type": "uint256" } ], "name": "getLiquidationSpreadForPair", "outputs": [ { "components": [ { "internalType": "uint256", "name": "value", "type": "uint256" } ], "internalType": "struct Decimal.D256", "name": "", "type": "tuple" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [ { "components": [ { "internalType": "address", "name": "owner", "type": "address" }, { "internalType": "uint256", "name": "number", "type": "uint256" } ], "internalType": "struct Account.Info", "name": "account", "type": "tuple" }, { "internalType": "uint256", "name": "heldMarketId", "type": "uint256" }, { "internalType": "uint256", "name": "owedMarketId", "type": "uint256" } ], "name": "getLiquidationSpreadForAccountAndPair", "outputs": [ { "components": [ { "internalType": "uint256", "name": "value", "type": "uint256" } ], "internalType": "struct Decimal.D256", "name": "", "type": "tuple" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "getEarningsRate", "outputs": [ { "components": [ { "internalType": "uint256", "name": "value", "type": "uint256" } ], "internalType": "struct Decimal.D256", "name": "", "type": "tuple" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "getMinBorrowedValue", "outputs": [ { "components": [ { "internalType": "uint256", "name": "value", "type": "uint256" } ], "internalType": "struct Monetary.Value", "name": "", "type": "tuple" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "getAccountMaxNumberOfMarketsWithBalances", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "getOracleSentinel", "outputs": [ { "internalType": "contract IOracleSentinel", "name": "", "type": "address" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "getIsBorrowAllowed", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "getIsLiquidationAllowed", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "getCallbackGasLimit", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "getDefaultAccountRiskOverrideSetter", "outputs": [ { "internalType": "contract IAccountRiskOverrideSetter", "name": "", "type": "address" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [ { "internalType": "address", "name": "accountOwner", "type": "address" } ], "name": "getAccountRiskOverrideSetterByAccountOwner", "outputs": [ { "internalType": "contract IAccountRiskOverrideSetter", "name": "", "type": "address" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [ { "components": [ { "internalType": "address", "name": "owner", "type": "address" }, { "internalType": "uint256", "name": "number", "type": "uint256" } ], "internalType": "struct Account.Info", "name": "account", "type": "tuple" } ], "name": "getAccountRiskOverrideByAccount", "outputs": [ { "components": [ { "internalType": "uint256", "name": "value", "type": "uint256" } ], "internalType": "struct Decimal.D256", "name": "marginRatioOverride", "type": "tuple" }, { "components": [ { "internalType": "uint256", "name": "value", "type": "uint256" } ], "internalType": "struct Decimal.D256", "name": "liquidationSpreadOverride", "type": "tuple" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [ { "components": [ { "internalType": "address", "name": "owner", "type": "address" }, { "internalType": "uint256", "name": "number", "type": "uint256" } ], "internalType": "struct Account.Info", "name": "account", "type": "tuple" } ], "name": "getMarginRatioOverrideByAccount", "outputs": [ { "components": [ { "internalType": "uint256", "name": "value", "type": "uint256" } ], "internalType": "struct Decimal.D256", "name": "", "type": "tuple" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [ { "components": [ { "internalType": "address", "name": "owner", "type": "address" }, { "internalType": "uint256", "name": "number", "type": "uint256" } ], "internalType": "struct Account.Info", "name": "account", "type": "tuple" } ], "name": "getLiquidationSpreadOverrideByAccount", "outputs": [ { "components": [ { "internalType": "uint256", "name": "value", "type": "uint256" } ], "internalType": "struct Decimal.D256", "name": "", "type": "tuple" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "getRiskLimits", "outputs": [ { "components": [ { "internalType": "uint64", "name": "marginRatioMax", "type": "uint64" }, { "internalType": "uint64", "name": "liquidationSpreadMax", "type": "uint64" }, { "internalType": "uint64", "name": "earningsRateMax", "type": "uint64" }, { "internalType": "uint64", "name": "marginPremiumMax", "type": "uint64" }, { "internalType": "uint64", "name": "liquidationSpreadPremiumMax", "type": "uint64" }, { "internalType": "uint96", "name": "interestRateMax", "type": "uint96" }, { "internalType": "uint128", "name": "minBorrowedValueMax", "type": "uint128" } ], "internalType": "struct Storage.RiskLimits", "name": "", "type": "tuple" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "getNumMarkets", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [ { "internalType": "address", "name": "token", "type": "address" } ], "name": "getMarketIdByTokenAddress", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [ { "internalType": "uint256", "name": "marketId", "type": "uint256" } ], "name": "getMarketTokenAddress", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [ { "internalType": "uint256", "name": "marketId", "type": "uint256" } ], "name": "getMarketIsClosing", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [ { "internalType": "uint256", "name": "marketId", "type": "uint256" } ], "name": "getMarketPrice", "outputs": [ { "components": [ { "internalType": "uint256", "name": "value", "type": "uint256" } ], "internalType": "struct Monetary.Price", "name": "", "type": "tuple" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [ { "internalType": "uint256", "name": "marketId", "type": "uint256" } ], "name": "getMarketTotalPar", "outputs": [ { "components": [ { "internalType": "uint128", "name": "borrow", "type": "uint128" }, { "internalType": "uint128", "name": "supply", "type": "uint128" } ], "internalType": "struct Types.TotalPar", "name": "", "type": "tuple" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [ { "internalType": "uint256", "name": "marketId", "type": "uint256" } ], "name": "getMarketTotalWei", "outputs": [ { "components": [ { "internalType": "uint128", "name": "borrow", "type": "uint128" }, { "internalType": "uint128", "name": "supply", "type": "uint128" } ], "internalType": "struct Types.TotalWei", "name": "", "type": "tuple" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [ { "internalType": "uint256", "name": "marketId", "type": "uint256" } ], "name": "getMarketCachedIndex", "outputs": [ { "components": [ { "internalType": "uint112", "name": "borrow", "type": "uint112" }, { "internalType": "uint112", "name": "supply", "type": "uint112" }, { "internalType": "uint32", "name": "lastUpdate", "type": "uint32" } ], "internalType": "struct Interest.Index", "name": "", "type": "tuple" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [ { "internalType": "uint256", "name": "marketId", "type": "uint256" } ], "name": "getMarketCurrentIndex", "outputs": [ { "components": [ { "internalType": "uint112", "name": "borrow", "type": "uint112" }, { "internalType": "uint112", "name": "supply", "type": "uint112" }, { "internalType": "uint32", "name": "lastUpdate", "type": "uint32" } ], "internalType": "struct Interest.Index", "name": "", "type": "tuple" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [ { "internalType": "uint256", "name": "marketId", "type": "uint256" } ], "name": "getMarketPriceOracle", "outputs": [ { "internalType": "contract IPriceOracle", "name": "", "type": "address" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [ { "internalType": "uint256", "name": "marketId", "type": "uint256" } ], "name": "getMarketInterestSetter", "outputs": [ { "internalType": "contract IInterestSetter", "name": "", "type": "address" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [ { "internalType": "uint256", "name": "marketId", "type": "uint256" } ], "name": "getMarketMarginPremium", "outputs": [ { "components": [ { "internalType": "uint256", "name": "value", "type": "uint256" } ], "internalType": "struct Decimal.D256", "name": "", "type": "tuple" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [ { "internalType": "uint256", "name": "marketId", "type": "uint256" } ], "name": "getMarketLiquidationSpreadPremium", "outputs": [ { "components": [ { "internalType": "uint256", "name": "value", "type": "uint256" } ], "internalType": "struct Decimal.D256", "name": "", "type": "tuple" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [ { "internalType": "uint256", "name": "marketId", "type": "uint256" } ], "name": "getMarketSpreadPremium", "outputs": [ { "components": [ { "internalType": "uint256", "name": "value", "type": "uint256" } ], "internalType": "struct Decimal.D256", "name": "", "type": "tuple" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [ { "internalType": "uint256", "name": "marketId", "type": "uint256" } ], "name": "getMarketMaxWei", "outputs": [ { "components": [ { "internalType": "bool", "name": "sign", "type": "bool" }, { "internalType": "uint256", "name": "value", "type": "uint256" } ], "internalType": "struct Types.Wei", "name": "", "type": "tuple" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [ { "internalType": "uint256", "name": "marketId", "type": "uint256" } ], "name": "getMarketMaxSupplyWei", "outputs": [ { "components": [ { "internalType": "bool", "name": "sign", "type": "bool" }, { "internalType": "uint256", "name": "value", "type": "uint256" } ], "internalType": "struct Types.Wei", "name": "", "type": "tuple" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [ { "internalType": "uint256", "name": "marketId", "type": "uint256" } ], "name": "getMarketMaxBorrowWei", "outputs": [ { "components": [ { "internalType": "bool", "name": "sign", "type": "bool" }, { "internalType": "uint256", "name": "value", "type": "uint256" } ], "internalType": "struct Types.Wei", "name": "", "type": "tuple" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [ { "internalType": "uint256", "name": "marketId", "type": "uint256" } ], "name": "getMarketEarningsRateOverride", "outputs": [ { "components": [ { "internalType": "uint256", "name": "value", "type": "uint256" } ], "internalType": "struct Decimal.D256", "name": "", "type": "tuple" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [ { "internalType": "uint256", "name": "marketId", "type": "uint256" } ], "name": "getMarketInterestRate", "outputs": [ { "components": [ { "internalType": "uint256", "name": "value", "type": "uint256" } ], "internalType": "struct Interest.Rate", "name": "", "type": "tuple" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [ { "internalType": "uint256", "name": "marketId", "type": "uint256" } ], "name": "getMarketBorrowInterestRatePerSecond", "outputs": [ { "components": [ { "internalType": "uint256", "name": "value", "type": "uint256" } ], "internalType": "struct Interest.Rate", "name": "", "type": "tuple" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [ { "internalType": "uint256", "name": "marketId", "type": "uint256" } ], "name": "getMarketBorrowInterestRateApr", "outputs": [ { "components": [ { "internalType": "uint256", "name": "value", "type": "uint256" } ], "internalType": "struct Interest.Rate", "name": "", "type": "tuple" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [ { "internalType": "uint256", "name": "marketId", "type": "uint256" } ], "name": "getMarketSupplyInterestRateApr", "outputs": [ { "components": [ { "internalType": "uint256", "name": "value", "type": "uint256" } ], "internalType": "struct Interest.Rate", "name": "", "type": "tuple" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [ { "internalType": "uint256", "name": "marketId", "type": "uint256" } ], "name": "getMarket", "outputs": [ { "components": [ { "internalType": "address", "name": "token", "type": "address" }, { "internalType": "bool", "name": "isClosing", "type": "bool" }, { "components": [ { "internalType": "uint128", "name": "borrow", "type": "uint128" }, { "internalType": "uint128", "name": "supply", "type": "uint128" } ], "internalType": "struct Types.TotalPar", "name": "totalPar", "type": "tuple" }, { "components": [ { "internalType": "uint112", "name": "borrow", "type": "uint112" }, { "internalType": "uint112", "name": "supply", "type": "uint112" }, { "internalType": "uint32", "name": "lastUpdate", "type": "uint32" } ], "internalType": "struct Interest.Index", "name": "index", "type": "tuple" }, { "internalType": "contract IPriceOracle", "name": "priceOracle", "type": "address" }, { "internalType": "contract IInterestSetter", "name": "interestSetter", "type": "address" }, { "components": [ { "internalType": "uint256", "name": "value", "type": "uint256" } ], "internalType": "struct Decimal.D256", "name": "marginPremium", "type": "tuple" }, { "components": [ { "internalType": "uint256", "name": "value", "type": "uint256" } ], "internalType": "struct Decimal.D256", "name": "liquidationSpreadPremium", "type": "tuple" }, { "components": [ { "internalType": "bool", "name": "sign", "type": "bool" }, { "internalType": "uint256", "name": "value", "type": "uint256" } ], "internalType": "struct Types.Wei", "name": "maxSupplyWei", "type": "tuple" }, { "components": [ { "internalType": "bool", "name": "sign", "type": "bool" }, { "internalType": "uint256", "name": "value", "type": "uint256" } ], "internalType": "struct Types.Wei", "name": "maxBorrowWei", "type": "tuple" }, { "components": [ { "internalType": "uint256", "name": "value", "type": "uint256" } ], "internalType": "struct Decimal.D256", "name": "earningsRateOverride", "type": "tuple" } ], "internalType": "struct Storage.Market", "name": "", "type": "tuple" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [ { "internalType": "uint256", "name": "marketId", "type": "uint256" } ], "name": "getMarketWithInfo", "outputs": [ { "components": [ { "internalType": "address", "name": "token", "type": "address" }, { "internalType": "bool", "name": "isClosing", "type": "bool" }, { "components": [ { "internalType": "uint128", "name": "borrow", "type": "uint128" }, { "internalType": "uint128", "name": "supply", "type": "uint128" } ], "internalType": "struct Types.TotalPar", "name": "totalPar", "type": "tuple" }, { "components": [ { "internalType": "uint112", "name": "borrow", "type": "uint112" }, { "internalType": "uint112", "name": "supply", "type": "uint112" }, { "internalType": "uint32", "name": "lastUpdate", "type": "uint32" } ], "internalType": "struct Interest.Index", "name": "index", "type": "tuple" }, { "internalType": "contract IPriceOracle", "name": "priceOracle", "type": "address" }, { "internalType": "contract IInterestSetter", "name": "interestSetter", "type": "address" }, { "components": [ { "internalType": "uint256", "name": "value", "type": "uint256" } ], "internalType": "struct Decimal.D256", "name": "marginPremium", "type": "tuple" }, { "components": [ { "internalType": "uint256", "name": "value", "type": "uint256" } ], "internalType": "struct Decimal.D256", "name": "liquidationSpreadPremium", "type": "tuple" }, { "components": [ { "internalType": "bool", "name": "sign", "type": "bool" }, { "internalType": "uint256", "name": "value", "type": "uint256" } ], "internalType": "struct Types.Wei", "name": "maxSupplyWei", "type": "tuple" }, { "components": [ { "internalType": "bool", "name": "sign", "type": "bool" }, { "internalType": "uint256", "name": "value", "type": "uint256" } ], "internalType": "struct Types.Wei", "name": "maxBorrowWei", "type": "tuple" }, { "components": [ { "internalType": "uint256", "name": "value", "type": "uint256" }