UNPKG

@dolomite-exchange/dolomite-margin

Version:

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

2,115 lines (2,114 loc) 594 kB
{ "contractName": "Admin", "abi": [ { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "previousOwner", "type": "address" }, { "indexed": true, "internalType": "address", "name": "newOwner", "type": "address" } ], "name": "OwnershipTransferred", "type": "event" }, { "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": "getAccountBalances", "outputs": [ { "internalType": "uint256[]", "name": "", "type": "uint256[]" }, { "internalType": "address[]", "name": "", "type": "address[]" }, { "components": [ { "internalType": "bool", "name": "sign", "type": "bool" }, { "internalType": "uint128", "name": "value", "type": "uint128" } ], "internalType": "struct Types.Par[]", "name": "", "type": "tuple[]" }, { "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": [ { "components": [ { "internalType": "address", "name": "owner", "type": "address" }, { "internalType": "uint256", "name": "number", "type": "uint256" } ], "internalType": "struct Account.Info", "name": "account", "type": "tuple" }, { "internalType": "uint256", "name": "index", "type": "uint256" } ], "name": "getAccountMarketWithBalanceAtIndex", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "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": "getAccountMarketsWithBalances", "outputs": [ { "internalType": "uint256[]", "name": "", "type": "uint256[]" } ], "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": [ { "components": [ { "internalType": "address", "name": "owner", "type": "address" }, { "internalType": "uint256", "name": "number", "type": "uint256" } ], "internalType": "struct Account.Info", "name": "account", "type": "tuple" } ], "name": "getAccountNumberOfMarketsWithBalances", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "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": "getAccountNumberOfMarketsWithDebt", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "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": "marketId", "type": "uint256" } ], "name": "getAccountPar", "outputs": [ { "components": [ { "internalType": "bool", "name": "sign", "type": "bool" }, { "internalType": "uint128", "name": "value", "type": "uint128" } ], "internalType": "struct Types.Par", "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": "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": [ { "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": "getAccountStatus", "outputs": [ { "internalType": "enum Account.Status", "name": "", "type": "uint8" } ], "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": "getAccountValues", "outputs": [ { "components": [ { "internalType": "uint256", "name": "value", "type": "uint256" } ], "internalType": "struct Monetary.Value", "name": "", "type": "tuple" }, { "components": [ { "internalType": "uint256", "name": "value", "type": "uint256" } ], "internalType": "struct Monetary.Value", "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": "marketId", "type": "uint256" } ], "name": "getAccountWei", "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": [ { "components": [ { "internalType": "address", "name": "owner", "type": "address" }, { "internalType": "uint256", "name": "number", "type": "uint256" } ], "internalType": "struct Account.Info", "name": "account", "type": "tuple" } ], "name": "getAdjustedAccountValues", "outputs": [ { "components": [ { "internalType": "uint256", "name": "value", "type": "uint256" } ], "internalType": "struct Monetary.Value", "name": "", "type": "tuple" }, { "components": [ { "internalType": "uint256", "name": "value", "type": "uint256" } ], "internalType": "struct Monetary.Value", "name": "", "type": "tuple" } ], "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": [], "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": [ { "internalType": "address", "name": "autoTrader", "type": "address" } ], "name": "getIsAutoTraderSpecial", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "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": [ { "internalType": "address", "name": "operator", "type": "address" } ], "name": "getIsGlobalOperator", "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": [ { "internalType": "address", "name": "owner", "type": "address" }, { "internalType": "address", "name": "operator", "type": "address" } ], "name": "getIsLocalOperator", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "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": [ { "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": [ { "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" } ], "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": "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": [ { "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": [ { "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": "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": "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": "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": "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": "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": "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": "getMarketInterestSetter", "outputs": [ { "internalType": "contract IInterestSetter", "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": "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": "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": "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": "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": "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": "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": "getMarketPriceOracle", "outputs": [ { "internalType": "contract IPriceOracle", "name": "", "type": "address" } ], "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": "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": "getMarketTokenAddress", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "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": "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" } ], "internalType": "struct Decimal.D256", "name": "earningsRateOverride", "type": "tuple" } ], "internalType": "struct Storage.Market", "name": "", "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": "", "type": "tuple" }, { "components": [ { "internalType": "uint256", "name": "value", "type": "uint256" } ], "internalType": "struct Monetary.Price", "name": "", "type": "tuple" }, { "components": [ { "internalType": "uint256", "name": "value", "type": "uint256" } ], "internalType": "struct Interest.Rate", "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": [ { "internalType": "uint256", "name": "marketId", "type": "uint256" } ], "name": "getNumExcessTokens", "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": [], "name": "getNumMarkets", "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": "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": "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",