@dolomite-exchange/dolomite-margin 0.2.6 → 0.2.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/contracts/Account.json +11 -11
- package/build/contracts/Actions.json +11 -11
- package/build/contracts/Address.json +1 -1
- package/build/contracts/Admin.json +23 -23
- package/build/contracts/AdminImpl.json +35 -307
- package/build/contracts/AdvancedMath.json +7 -7
- package/build/contracts/AmmRebalancerProxy.json +577 -621
- package/build/contracts/AmmRebalancerProxyV1.json +78 -32
- package/build/contracts/Babylonian.json +1 -1
- package/build/contracts/Bits.json +9 -9
- package/build/contracts/Cache.json +13 -13
- package/build/contracts/ChainlinkPriceOracleV1.json +16 -16
- package/build/contracts/Context.json +1 -1
- package/build/contracts/CustomTestToken.json +9 -9
- package/build/contracts/Decimal.json +9 -9
- package/build/contracts/DelayedMultiSig.json +9 -9
- package/build/contracts/DolomiteAmmERC20.json +11 -11
- package/build/contracts/DolomiteAmmFactory.json +14 -52
- package/build/contracts/DolomiteAmmLibrary.json +24 -24
- package/build/contracts/DolomiteAmmPair.json +27 -27
- package/build/contracts/DolomiteAmmRouterProxy.json +30 -363
- package/build/contracts/DolomiteMargin.json +21 -67
- package/build/contracts/DoubleExponentInterestSetter.json +15 -21
- package/build/contracts/EnumerableSet.json +7 -7
- package/build/contracts/ErroringOmiseToken.json +9 -9
- package/build/contracts/ErroringToken.json +10 -10
- package/build/contracts/Events.json +17 -17
- package/build/contracts/ExcessivelySafeCall.json +35 -35
- package/build/contracts/Exchange.json +15 -15
- package/build/contracts/Expiry.json +36 -36
- package/build/contracts/Getters.json +33 -33
- package/build/contracts/IAutoTrader.json +9 -9
- package/build/contracts/ICallee.json +7 -7
- package/build/contracts/IChainlinkAggregator.json +5 -5
- package/build/contracts/IDolomiteAmmERC20.json +5 -5
- package/build/contracts/IDolomiteAmmFactory.json +9 -9
- package/build/contracts/IDolomiteAmmPair.json +9 -9
- package/build/contracts/IDolomiteMargin.json +23 -23
- package/build/contracts/IERC20.json +1 -1
- package/build/contracts/IERC20Detailed.json +5 -5
- package/build/contracts/IExchangeWrapper.json +5 -5
- package/build/contracts/IExpiry.json +9 -9
- package/build/contracts/IInterestSetter.json +7 -7
- package/build/contracts/ILiquidationCallback.json +7 -7
- package/build/contracts/IMakerOracle.json +5 -5
- package/build/contracts/IOasisDex.json +5 -5
- package/build/contracts/IPriceOracle.json +7 -7
- package/build/contracts/IRecyclable.json +9 -9
- package/build/contracts/ITransferProxy.json +5 -5
- package/build/contracts/IUniswapV2Callee.json +5 -5
- package/build/contracts/IUniswapV2Factory.json +5 -5
- package/build/contracts/IUniswapV2Pair.json +5 -5
- package/build/contracts/IUniswapV2Router.json +5 -5
- package/build/contracts/IWETH.json +5 -5
- package/build/contracts/Interest.json +15 -15
- package/build/contracts/LiquidateOrVaporizeImpl.json +32 -83
- package/build/contracts/LiquidatorProxyHelper.json +23 -23
- package/build/contracts/LiquidatorProxyV1.json +30 -36
- package/build/contracts/LiquidatorProxyV1WithAmm.json +49 -105
- package/build/contracts/Math.json +1 -1
- package/build/contracts/Migrations.json +8 -14
- package/build/contracts/Monetary.json +7 -7
- package/build/contracts/MultiCall.json +8 -14
- package/build/contracts/MultiSig.json +7 -7
- package/build/contracts/OmiseToken.json +8 -8
- package/build/contracts/OnlyDolomiteMargin.json +11 -11
- package/build/contracts/Operation.json +15 -15
- package/build/contracts/OperationImpl.json +39 -47
- package/build/contracts/Ownable.json +1 -1
- package/build/contracts/PartiallyDelayedMultiSig.json +9 -9
- package/build/contracts/PayableProxy.json +17 -23
- package/build/contracts/Permission.json +11 -11
- package/build/contracts/PolynomialInterestSetter.json +13 -13
- package/build/contracts/RecyclableTokenProxy.json +25 -25
- package/build/contracts/ReentrancyGuard.json +1 -1
- package/build/contracts/Require.json +7 -7
- package/build/contracts/SafeERC20.json +1 -1
- package/build/contracts/SafeETH.json +7 -7
- package/build/contracts/SafeLiquidationCallback.json +17 -17
- package/build/contracts/SafeMath.json +1 -1
- package/build/contracts/SignedOperationProxy.json +21 -104
- package/build/contracts/SimpleFeeOwner.json +18 -63
- package/build/contracts/State.json +9 -9
- package/build/contracts/Storage.json +37 -37
- package/build/contracts/TestAmmRebalancerProxy.json +32 -58
- package/build/contracts/TestAutoTrader.json +22 -22
- package/build/contracts/TestBtcUsdChainlinkAggregator.json +10 -10
- package/build/contracts/TestCallee.json +19 -19
- package/build/contracts/TestChainlinkPriceOracleV1.json +10 -94
- package/build/contracts/TestCounter.json +7 -7
- package/build/contracts/TestDaiUsdChainlinkAggregator.json +11 -11
- package/build/contracts/TestDolomiteMargin.json +22 -22
- package/build/contracts/TestDoubleExponentInterestSetter.json +10 -10
- package/build/contracts/TestEthUsdChainlinkAggregator.json +11 -11
- package/build/contracts/TestExchangeWrapper.json +28 -28
- package/build/contracts/TestInterestSetter.json +13 -13
- package/build/contracts/TestLib.json +22 -22
- package/build/contracts/TestLinkUsdChainlinkAggregator.json +11 -11
- package/build/contracts/TestLiquidateCallback.json +719 -719
- package/build/contracts/TestLiquidationCallback.json +13 -13
- package/build/contracts/TestLrcEthChainlinkAggregator.json +11 -11
- package/build/contracts/TestMakerOracle.json +10 -10
- package/build/contracts/TestMaticUsdChainlinkAggregator.json +10 -10
- package/build/contracts/TestOasisDex.json +12 -12
- package/build/contracts/TestOperationImpl.json +14 -14
- package/build/contracts/TestPolynomialInterestSetter.json +10 -10
- package/build/contracts/TestPriceAggregator.json +9 -9
- package/build/contracts/TestPriceOracle.json +13 -13
- package/build/contracts/TestRecyclableToken.json +9 -9
- package/build/contracts/TestSimpleCallee.json +15 -15
- package/build/contracts/TestToken.json +9 -9
- package/build/contracts/TestTrader.json +17 -17
- package/build/contracts/TestUniswapAmmRebalancerProxy.json +16 -16
- package/build/contracts/TestUsdcUsdChainlinkAggregator.json +11 -11
- package/build/contracts/TestWETH.json +9 -9
- package/build/contracts/Time.json +9 -9
- package/build/contracts/Token.json +9 -9
- package/build/contracts/TokenA.json +10 -10
- package/build/contracts/TokenB.json +10 -10
- package/build/contracts/TokenC.json +10 -10
- package/build/contracts/TokenD.json +10 -10
- package/build/contracts/TokenE.json +10 -10
- package/build/contracts/TokenF.json +10 -10
- package/build/contracts/TransferProxy.json +22 -28
- package/build/contracts/TypedSignature.json +9 -9
- package/build/contracts/Types.json +9 -9
- package/build/contracts/UQ112x112.json +7 -7
- package/build/contracts/UniswapV2ERC20.json +7 -7
- package/build/contracts/UniswapV2Factory.json +12 -12
- package/build/contracts/UniswapV2Library.json +20 -20
- package/build/contracts/UniswapV2Pair.json +17 -17
- package/build/contracts/UniswapV2Router02.json +16 -16
- package/build/contracts/WETH9.json +1 -1
- package/contracts/external/amm/DolomiteAmmERC20.sol +135 -0
- package/contracts/external/amm/DolomiteAmmFactory.sol +122 -0
- package/contracts/external/amm/DolomiteAmmPair.sol +573 -0
- package/contracts/external/amm/SimpleFeeOwner.sol +107 -0
- package/contracts/external/helpers/LiquidatorProxyHelper.sol +252 -0
- package/contracts/external/helpers/OnlyDolomiteMargin.sol +63 -0
- package/contracts/external/interestsetters/DoubleExponentInterestSetter.sol +212 -0
- package/contracts/external/interestsetters/PolynomialInterestSetter.sol +205 -0
- package/contracts/external/interfaces/IChainlinkAggregator.sol +33 -0
- package/contracts/external/interfaces/IDolomiteAmmERC20.sol +52 -0
- package/contracts/external/interfaces/IDolomiteAmmFactory.sol +42 -0
- package/contracts/external/interfaces/IDolomiteAmmPair.sol +116 -0
- package/contracts/external/interfaces/IExpiry.sol +70 -0
- package/contracts/external/interfaces/IMakerOracle.sol +52 -0
- package/contracts/external/interfaces/IOasisDex.sol +326 -0
- package/contracts/external/interfaces/ITransferProxy.sol +53 -0
- package/contracts/external/interfaces/IUniswapV2Router.sol +134 -0
- package/contracts/external/lib/AdvancedMath.sol +23 -0
- package/contracts/external/lib/DolomiteAmmLibrary.sol +323 -0
- package/contracts/external/lib/TypedSignature.sol +120 -0
- package/contracts/external/lib/UQ112x112.sol +22 -0
- package/contracts/external/multisig/DelayedMultiSig.sol +206 -0
- package/contracts/external/multisig/MultiSig.sol +571 -0
- package/contracts/external/multisig/PartiallyDelayedMultiSig.sol +174 -0
- package/contracts/external/oracles/ChainlinkPriceOracleV1.sol +197 -0
- package/contracts/external/oracles/TestChainlinkPriceOracleV1.sol +98 -0
- package/contracts/external/proxies/AmmRebalancerProxyV1.sol +465 -0
- package/contracts/external/proxies/DolomiteAmmRouterProxy.sol +877 -0
- package/contracts/external/proxies/LiquidatorProxyV1.sol +507 -0
- package/contracts/external/proxies/LiquidatorProxyV1WithAmm.sol +574 -0
- package/contracts/external/proxies/PayableProxy.sol +146 -0
- package/contracts/external/proxies/RecyclableTokenProxy.sol +463 -0
- package/contracts/external/proxies/SignedOperationProxy.sol +553 -0
- package/contracts/external/proxies/TransferProxy.sol +207 -0
- package/contracts/external/traders/Expiry.sol +532 -0
- package/contracts/external/uniswap-v2/UniswapV2ERC20.sol +118 -0
- package/contracts/external/uniswap-v2/UniswapV2Factory.sol +67 -0
- package/contracts/external/uniswap-v2/UniswapV2Pair.sol +283 -0
- package/contracts/external/uniswap-v2/UniswapV2Router02.sol +566 -0
- package/contracts/external/uniswap-v2/interfaces/IUniswapV2Callee.sol +13 -0
- package/contracts/external/uniswap-v2/interfaces/IUniswapV2Factory.sol +18 -0
- package/contracts/external/uniswap-v2/interfaces/IUniswapV2Pair.sol +67 -0
- package/contracts/external/uniswap-v2/interfaces/IWETH.sol +7 -0
- package/contracts/external/uniswap-v2/libraries/SafeETH.sol +29 -0
- package/contracts/external/uniswap-v2/libraries/UniswapV2Library.sol +117 -0
- package/contracts/external/utils/MultiCall.sol +95 -0
- package/contracts/protocol/impl/artifacts/OperationImpl.json +80 -0
- package/contracts/protocol/impl/artifacts/OperationImpl_metadata.json +193 -0
- package/dist/build/published_contracts/AdminImpl.json +2 -2
- package/dist/build/published_contracts/AmmRebalancerProxyV1.json +5 -0
- package/dist/build/published_contracts/ChainlinkPriceOracleV1.json +1 -1
- package/dist/build/published_contracts/DolomiteAmmFactory.json +1 -1
- package/dist/build/published_contracts/DolomiteAmmRouterProxy.json +1 -1
- package/dist/build/published_contracts/DoubleExponentInterestSetter.json +2 -2
- package/dist/build/published_contracts/Expiry.json +1 -1
- package/dist/build/published_contracts/LiquidatorProxyV1.json +1 -1
- package/dist/build/published_contracts/LiquidatorProxyV1WithAmm.json +1 -1
- package/dist/build/published_contracts/MultiCall.json +1 -1
- package/dist/build/published_contracts/PayableProxy.json +2 -2
- package/dist/build/published_contracts/SignedOperationProxy.json +2 -2
- package/dist/build/published_contracts/SimpleFeeOwner.json +1 -1
- package/dist/build/published_contracts/TestUniswapAmmRebalancerProxy.json +140 -0
- package/dist/build/published_contracts/TransferProxy.json +1 -1
- package/dist/src/lib/Contracts.d.ts +3 -1
- package/dist/src/lib/Contracts.js +7 -3
- package/dist/src/lib/Contracts.js.map +1 -1
- package/package.json +2 -1
|
@@ -1535,15 +1535,15 @@
|
|
|
1535
1535
|
"type": "function"
|
|
1536
1536
|
}
|
|
1537
1537
|
],
|
|
1538
|
-
"metadata": "{\"compiler\":{\"version\":\"0.5.16+commit.9c3226ce\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"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\"}],\"name\":\"getAccountMarketsWithNonZeroBalances\",\"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\"},{\"internalType\":\"uint256\",\"name\":\"marketId\",\"type\":\"uint256\"}],\"name\":\"getAccountParNoMarketCheck\",\"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\":\"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\":\"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\":[{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"}],\"name\":\"getIsGlobalOperator\",\"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\":[{\"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\":[],\"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\":[{\"internalType\":\"uint256\",\"name\":\"marketId\",\"type\":\"uint256\"}],\"name\":\"getMarket\",\"outputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"isClosing\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"isRecyclable\",\"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\":\"uint96\",\"name\":\"borrow\",\"type\":\"uint96\"},{\"internalType\":\"uint96\",\"name\":\"supply\",\"type\":\"uint96\"},{\"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\":\"spreadPremium\",\"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\":\"getMarketCachedIndex\",\"outputs\":[{\"components\":[{\"internalType\":\"uint96\",\"name\":\"borrow\",\"type\":\"uint96\"},{\"internalType\":\"uint96\",\"name\":\"supply\",\"type\":\"uint96\"},{\"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\":\"uint96\",\"name\":\"borrow\",\"type\":\"uint96\"},{\"internalType\":\"uint96\",\"name\":\"supply\",\"type\":\"uint96\"},{\"internalType\":\"uint32\",\"name\":\"lastUpdate\",\"type\":\"uint32\"}],\"internalType\":\"struct Interest.Index\",\"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\":\"getMarketIsRecyclable\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"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\":\"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\":\"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\":\"getMarketWithInfo\",\"outputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"isClosing\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"isRecyclable\",\"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\":\"uint96\",\"name\":\"borrow\",\"type\":\"uint96\"},{\"internalType\":\"uint96\",\"name\":\"supply\",\"type\":\"uint96\"},{\"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\":\"spreadPremium\",\"type\":\"tuple\"}],\"internalType\":\"struct Storage.Market\",\"name\":\"\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint96\",\"name\":\"borrow\",\"type\":\"uint96\"},{\"internalType\":\"uint96\",\"name\":\"supply\",\"type\":\"uint96\"},{\"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\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"number\",\"type\":\"uint256\"}],\"internalType\":\"struct Account.Info\",\"name\":\"account\",\"type\":\"tuple\"}],\"name\":\"getNumberOfMarketsWithBorrow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"n\",\"type\":\"uint256\"}],\"name\":\"getRecyclableMarkets\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"}],\"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\":\"spreadPremiumMax\",\"type\":\"uint64\"},{\"internalType\":\"uint128\",\"name\":\"minBorrowedValueMax\",\"type\":\"uint128\"}],\"internalType\":\"struct Storage.RiskLimits\",\"name\":\"\",\"type\":\"tuple\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"getRiskParams\",\"outputs\":[{\"components\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"internalType\":\"struct Decimal.D256\",\"name\":\"marginRatio\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"internalType\":\"struct Decimal.D256\",\"name\":\"liquidationSpread\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"internalType\":\"struct Decimal.D256\",\"name\":\"earningsRate\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"internalType\":\"struct Monetary.Value\",\"name\":\"minBorrowedValue\",\"type\":\"tuple\"}],\"internalType\":\"struct Storage.RiskParams\",\"name\":\"\",\"type\":\"tuple\"}],\"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\":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\"}],\"devdoc\":{\"methods\":{\"getAccountBalances((address,uint256))\":{\"params\":{\"account\":\"The account to query\"},\"return\":\"The following values: - The market IDs for each market - The ERC20 token address for each market - The account's principal value for each market - The account's (supplied or borrowed) number of tokens for each market\"},\"getAccountMarketsWithNonZeroBalances((address,uint256))\":{\"params\":{\"account\":\"The account to query\"},\"return\":\"The non-sorted marketIds with non-zero balance for the account.\"},\"getAccountPar((address,uint256),uint256)\":{\"params\":{\"account\":\"The account to query\",\"marketId\":\"The market to query\"},\"return\":\"The principal value\"},\"getAccountParNoMarketCheck((address,uint256),uint256)\":{\"params\":{\"account\":\"The account to query\",\"marketId\":\"The market to query\"},\"return\":\"The principal value\"},\"getAccountStatus((address,uint256))\":{\"params\":{\"account\":\"The account to query\"},\"return\":\"The account's status\"},\"getAccountValues((address,uint256))\":{\"params\":{\"account\":\"The account to query\"},\"return\":\"The following values: - The supplied value of the account - The borrowed value of the account\"},\"getAccountWei((address,uint256),uint256)\":{\"params\":{\"account\":\"The account to query\",\"marketId\":\"The market to query\"},\"return\":\"The token amount\"},\"getAdjustedAccountValues((address,uint256))\":{\"params\":{\"account\":\"The account to query\"},\"return\":\"The following values: - The supplied value of the account (adjusted for marginPremium) - The borrowed value of the account (adjusted for marginPremium)\"},\"getEarningsRate()\":{\"return\":\"The global earnings rate\"},\"getIsAutoTraderSpecial(address)\":{\"params\":{\"autoTrader\":\"The trader that should be checked for special call privileges.\"}},\"getIsGlobalOperator(address)\":{\"params\":{\"operator\":\"The address to query\"},\"return\":\"True if operator is a global operator\"},\"getIsLocalOperator(address,address)\":{\"params\":{\"operator\":\"The possible operator\",\"owner\":\"The owner of the accounts\"},\"return\":\"True if operator is approved for owner's accounts\"},\"getLiquidationSpread()\":{\"return\":\"The global liquidation spread\"},\"getLiquidationSpreadForPair(uint256,uint256)\":{\"params\":{\"heldMarketId\":\"The market for which the account has collateral\",\"owedMarketId\":\"The market for which the account has borrowed tokens\"},\"return\":\"The adjusted liquidation spread\"},\"getMarginRatio()\":{\"return\":\"The global margin-ratio\"},\"getMarket(uint256)\":{\"params\":{\"marketId\":\"The market to query\"},\"return\":\"A Storage.Market struct with the current state of the market\"},\"getMarketCachedIndex(uint256)\":{\"params\":{\"marketId\":\"The market to query\"},\"return\":\"The most recent index\"},\"getMarketCurrentIndex(uint256)\":{\"params\":{\"marketId\":\"The market to query\"},\"return\":\"The estimated current index\"},\"getMarketIdByTokenAddress(address)\":{\"params\":{\"token\":\"The token to query\"},\"return\":\"The token's marketId if the token is valid\"},\"getMarketInterestRate(uint256)\":{\"params\":{\"marketId\":\"The market to query\"},\"return\":\"The current interest rate\"},\"getMarketInterestSetter(uint256)\":{\"params\":{\"marketId\":\"The market to query\"},\"return\":\"The interest-setter address\"},\"getMarketIsClosing(uint256)\":{\"params\":{\"marketId\":\"The market to query\"},\"return\":\"True if the market is closing\"},\"getMarketIsRecyclable(uint256)\":{\"params\":{\"marketId\":\"The market to query\"},\"return\":\"True if the market is recyclable\"},\"getMarketMarginPremium(uint256)\":{\"params\":{\"marketId\":\"The market to query\"},\"return\":\"The market's margin premium\"},\"getMarketPrice(uint256)\":{\"params\":{\"marketId\":\"The market to query\"},\"return\":\"The price of each atomic unit of the token\"},\"getMarketPriceOracle(uint256)\":{\"params\":{\"marketId\":\"The market to query\"},\"return\":\"The price oracle address\"},\"getMarketSpreadPremium(uint256)\":{\"params\":{\"marketId\":\"The market to query\"},\"return\":\"The market's spread premium\"},\"getMarketTokenAddress(uint256)\":{\"params\":{\"marketId\":\"The market to query\"},\"return\":\"The token address\"},\"getMarketTotalPar(uint256)\":{\"params\":{\"marketId\":\"The market to query\"},\"return\":\"The total principal amounts\"},\"getMarketWithInfo(uint256)\":{\"params\":{\"marketId\":\"The market to query\"},\"return\":\"A tuple containing the values: - A Storage.Market struct with the current state of the market - The current estimated interest index - The current token price - The current market interest rate\"},\"getMinBorrowedValue()\":{\"return\":\"The global minimum borrow value\"},\"getNumExcessTokens(uint256)\":{\"params\":{\"marketId\":\"The market to query\"},\"return\":\"The number of excess tokens\"},\"getNumMarkets()\":{\"return\":\"The number of markets\"},\"getNumberOfMarketsWithBorrow((address,uint256))\":{\"params\":{\"account\":\"The account to query\"},\"return\":\"The non-sorted marketIds with non-zero balance for the account.\"},\"getRecyclableMarkets(uint256)\":{\"params\":{\"n\":\"The number of markets to get, bounded by the linked list being smaller than `n`\"},\"return\":\"The list of recyclable markets, in the same order held by the linked list\"},\"getRiskLimits()\":{\"return\":\"All global risk parameter limits\"},\"getRiskParams()\":{\"return\":\"All global risk parameters\"},\"operate((address,uint256)[],(uint8,uint256,(bool,uint8,uint8,uint256),uint256,uint256,address,uint256,bytes)[])\":{\"params\":{\"accounts\":\"A list of all accounts that will be used in this operation. Cannot contain duplicates. In each action, the relevant account will be referred-to by its index in the list.\",\"actions\":\"An ordered list of all actions that will be taken in this operation. The actions will be processed in order.\"}},\"setOperators((address,bool)[])\":{\"params\":{\"args\":\"A list of OperatorArgs which have an address and a boolean. The boolean value denotes whether to approve (true) or revoke approval (false) for that address.\"}}}},\"userdoc\":{\"methods\":{\"getAccountBalances((address,uint256))\":{\"notice\":\"Get an account's summary for each market.\"},\"getAccountMarketsWithNonZeroBalances((address,uint256))\":{\"notice\":\"Get a list of markets that have a non-zero balance for an account\"},\"getAccountPar((address,uint256),uint256)\":{\"notice\":\"Get the principal value for a particular account and market.\"},\"getAccountParNoMarketCheck((address,uint256),uint256)\":{\"notice\":\"Get the principal value for a particular account and market, with no check the market is valid. Meaning, markets that don't exist return 0.\"},\"getAccountStatus((address,uint256))\":{\"notice\":\"Get the status of an account (Normal, Liquidating, or Vaporizing).\"},\"getAccountValues((address,uint256))\":{\"notice\":\"Get the total supplied and total borrowed value of an account.\"},\"getAccountWei((address,uint256),uint256)\":{\"notice\":\"Get the token balance for a particular account and market.\"},\"getAdjustedAccountValues((address,uint256))\":{\"notice\":\"Get the total supplied and total borrowed values of an account adjusted by the marginPremium of each market. Supplied values are divided by (1 + marginPremium) for each market and borrowed values are multiplied by (1 + marginPremium) for each market. Comparing these adjusted values gives the margin-ratio of the account which will be compared to the global margin-ratio when determining if the account can be liquidated.\"},\"getEarningsRate()\":{\"notice\":\"Get the global earnings-rate variable that determines what percentage of the interest paid by borrowers gets passed-on to suppliers.\"},\"getIsAutoTraderSpecial(address)\":{\"notice\":\"Checks if the autoTrader can only be called invoked by a global operator\"},\"getIsGlobalOperator(address)\":{\"notice\":\"Return true if a particular address is approved as a global operator. Such an address can act on any account as if it were the operator's own.\"},\"getIsLocalOperator(address,address)\":{\"notice\":\"Return true if a particular address is approved as an operator for an owner's accounts. Approved operators can act on the accounts of the owner as if it were the operator's own.\"},\"getLiquidationSpread()\":{\"notice\":\"Get the global liquidation spread. This is the spread between oracle prices that incentivizes the liquidation of risky positions.\"},\"getLiquidationSpreadForPair(uint256,uint256)\":{\"notice\":\"Get the adjusted liquidation spread for some market pair. This is equal to the global liquidation spread multiplied by (1 + spreadPremium) for each of the two markets.\"},\"getMarginRatio()\":{\"notice\":\"Get the global minimum margin-ratio that every position must maintain to prevent being liquidated.\"},\"getMarket(uint256)\":{\"notice\":\"Get basic information about a particular market.\"},\"getMarketCachedIndex(uint256)\":{\"notice\":\"Get the most recently cached interest index for a market.\"},\"getMarketCurrentIndex(uint256)\":{\"notice\":\"Get the interest index for a market if it were to be updated right now.\"},\"getMarketIdByTokenAddress(address)\":{\"notice\":\"Get the ERC20 token address for a market.\"},\"getMarketInterestRate(uint256)\":{\"notice\":\"Get the current borrower interest rate for a market.\"},\"getMarketInterestSetter(uint256)\":{\"notice\":\"Get the interest-setter address for a market.\"},\"getMarketIsClosing(uint256)\":{\"notice\":\"Return true if a particular market is in closing mode. Additional borrows cannot be taken from a market that is closing.\"},\"getMarketIsRecyclable(uint256)\":{\"notice\":\"Return true if this market can be removed and its ID can be recycled and reused\"},\"getMarketMarginPremium(uint256)\":{\"notice\":\"Get the margin premium for a market. A margin premium makes it so that any positions that include the market require a higher collateralization to avoid being liquidated.\"},\"getMarketPrice(uint256)\":{\"notice\":\"Get the price of the token for a market.\"},\"getMarketPriceOracle(uint256)\":{\"notice\":\"Get the price oracle address for a market.\"},\"getMarketSpreadPremium(uint256)\":{\"notice\":\"Get the spread premium for a market. A spread premium makes it so that any liquidations that include the market have a higher spread than the global default.\"},\"getMarketTokenAddress(uint256)\":{\"notice\":\"Get the ERC20 token address for a market.\"},\"getMarketTotalPar(uint256)\":{\"notice\":\"Get the total principal amounts (borrowed and supplied) for a market.\"},\"getMarketWithInfo(uint256)\":{\"notice\":\"Get comprehensive information about a particular market.\"},\"getMinBorrowedValue()\":{\"notice\":\"Get the global minimum-borrow value which is the minimum value of any new borrow on DolomiteMargin.\"},\"getNumExcessTokens(uint256)\":{\"notice\":\"Get the number of excess tokens for a market. The number of excess tokens is calculated by taking the current number of tokens held in DolomiteMargin, adding the number of tokens owed to DolomiteMargin by borrowers, and subtracting the number of tokens owed to suppliers by DolomiteMargin.\"},\"getNumMarkets()\":{\"notice\":\"Get the total number of markets.\"},\"getNumberOfMarketsWithBorrow((address,uint256))\":{\"notice\":\"Get the number of markets with which an account has a negative balance.\"},\"getRecyclableMarkets(uint256)\":{\"notice\":\"Gets the recyclable markets, up to `n` length. If `n` is greater than the length of the list, 0's are returned for the empty slots.\"},\"getRiskLimits()\":{\"notice\":\"Get all risk parameter limits in a single struct. These are the maximum limits at which the risk parameters can be set by the admin of DolomiteMargin.\"},\"getRiskParams()\":{\"notice\":\"Get all risk parameters in a single struct.\"},\"operate((address,uint256)[],(uint8,uint256,(bool,uint8,uint8,uint256),uint256,uint256,address,uint256,bytes)[])\":{\"notice\":\"The main entry-point to DolomiteMargin that allows users and contracts to manage accounts. Take one or more actions on one or more accounts. The msg.sender must be the owner or operator of all accounts except for those being liquidated, vaporized, or traded with. One call to operate() is considered a singular \\\"operation\\\". Account collateralization is ensured only after the completion of the entire operation.\"},\"setOperators((address,bool)[])\":{\"notice\":\"Approves/disapproves any number of operators. An operator is an external address that has the same permissions to manipulate an account as the owner of the account. Operators are simply addresses and therefore may either be externally-owned Ethereum accounts OR smart contracts. * Operators are also able to act as AutoTrader contracts on behalf of the account owner if the operator is a smart contract and implements the IAutoTrader interface.\"}}}},\"settings\":{\"compilationTarget\":{\"/home/cdc218/projects/dolomite-protocol-v2/contracts/protocol/interfaces/IDolomiteMargin.sol\":\"IDolomiteMargin\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":10000},\"remappings\":[]},\"sources\":{\"/home/cdc218/projects/dolomite-protocol-v2/contracts/protocol/interfaces/IDolomiteMargin.sol\":{\"keccak256\":\"0x1e73364879c267fdd2bfd871e62ee58ee3d65fbef3b71e3cc104fbff499eca6c\",\"urls\":[\"bzz-raw://e3b1327980a5949afd52cff4713f47ee4fdee9a8b376ceaa3402f5c9696b8c1b\",\"dweb:/ipfs/QmbhQzVEdaraPJizT5DTtk6CDzH3guHNipHW5T23uTtFkX\"]},\"/home/cdc218/projects/dolomite-protocol-v2/contracts/protocol/interfaces/IERC20Detailed.sol\":{\"keccak256\":\"0x22a62e2a8155e70300773721902f4b9118e17aa0bb5d9d1b046050a014cfb223\",\"urls\":[\"bzz-raw://03af737a33c552fbe58f6f1fbd5496854fdc28dd57be4365d56663725c083a18\",\"dweb:/ipfs/QmbgLqGAQEd6tXsZB8QaPNCAMiU6nNzP75wNbKdS65BuUF\"]},\"/home/cdc218/projects/dolomite-protocol-v2/contracts/protocol/interfaces/IInterestSetter.sol\":{\"keccak256\":\"0x546825f65490a30e29d0f6446acec49c1e895ce6b33d48ca5c05092725a63a57\",\"urls\":[\"bzz-raw://6ad3013aed985bdf6e6234ae0f7f37e6bba76c3470c33bfa24678cf19b3b412c\",\"dweb:/ipfs/QmfYaSBzxGpgiHoR7ontMJY66S5L26XwkLYoEuzsEjpbQH\"]},\"/home/cdc218/projects/dolomite-protocol-v2/contracts/protocol/interfaces/IPriceOracle.sol\":{\"keccak256\":\"0x3f7c3d1397390ea44c6d5e5730d49476431c3df3b28334fe38218de5edc31138\",\"urls\":[\"bzz-raw://63ebf926fca9ce33aaabaf93805686acc25daded1648d6dab59c8c4d05116918\",\"dweb:/ipfs/QmeGkDp7ycYstpfqCYBiqoCYwy876gabx8r42o5koj3H5A\"]},\"/home/cdc218/projects/dolomite-protocol-v2/contracts/protocol/lib/Account.sol\":{\"keccak256\":\"0x0ab9a3fabc89984dff748af63d4319ee134051de2d7fc560e34ebaac86198396\",\"urls\":[\"bzz-raw://ab67f499a8ef83dc7e7cf7176a0f66eced40fa228eda8dd2d47e066ab985cf42\",\"dweb:/ipfs/QmXRHbsEYxr2Qsfsj5psXGV5LaPZHuzLiEXzSQJ77WSE27\"]},\"/home/cdc218/projects/dolomite-protocol-v2/contracts/protocol/lib/Actions.sol\":{\"keccak256\":\"0x44ec62b766a88a2f65267991e76cab88711e733b826dc9e578cb6ad6b38b2445\",\"urls\":[\"bzz-raw://731a8d44e57c9dcd7fbdefc37a6b5889c0d06defb3bd66b921b2a7db0edf0103\",\"dweb:/ipfs/QmcVbXc9oi5DMxjPtsBF76oJzD6zVjm7RuXgJfP3Goqrrb\"]},\"/home/cdc218/projects/dolomite-protocol-v2/contracts/protocol/lib/Bits.sol\":{\"keccak256\":\"0x425bf5764368faca16cc30a64b79d9bbe01fd8150444b58a464971c32450bd85\",\"urls\":[\"bzz-raw://064baf3155da634c5c80cea70bba0dda7a33af934b34f75f596961b4ab9aeafe\",\"dweb:/ipfs/QmTUHXoi9L6CkERyfhFs1jhxU66u2sbc6XRR5cH4TeHEqL\"]},\"/home/cdc218/projects/dolomite-protocol-v2/contracts/protocol/lib/Cache.sol\":{\"keccak256\":\"0x1e6ff383f285e311d07374edda353e14ac4f29201726b0062a2f046c1a2b482c\",\"urls\":[\"bzz-raw://fd11c5db01039bf2c95f3561b08d271b80b7b1cb9fd7f75da887f7609807c5a7\",\"dweb:/ipfs/QmcY6CugdEHaYUa8ZKSnUDhvtVuoLfpDscZcmC91koAn1t\"]},\"/home/cdc218/projects/dolomite-protocol-v2/contracts/protocol/lib/Decimal.sol\":{\"keccak256\":\"0x66990bbe3c58d0edf57d3f67ab5280e2a53958ce44f75c335c4c50542321bccb\",\"urls\":[\"bzz-raw://724cfdb5c99121aab5262679e46766a2883e344749870d7dbfa92d1617f68bf2\",\"dweb:/ipfs/QmYjAsS45f6UG2u3zuTks2HVfMYtyFCVMgUvD7Gt7XtU3R\"]},\"/home/cdc218/projects/dolomite-protocol-v2/contracts/protocol/lib/EnumerableSet.sol\":{\"keccak256\":\"0x9710b0ab43cc2d964d8722a0aabbedbf7e9d4756dcc0b4ab7c46c1ee68653042\",\"urls\":[\"bzz-raw://2405593d37f0f224bfca556f01634a9755bb0ed626f74dd15293106a8b4dd7d3\",\"dweb:/ipfs/QmTZ16S336jsoDnK5p3vAZRzimBkmdEJibncHVBJxBt469\"]},\"/home/cdc218/projects/dolomite-protocol-v2/contracts/protocol/lib/Interest.sol\":{\"keccak256\":\"0x73e75454568c5dfc3bdcf7dbf2ddce6ab8d3d317618bc1f1957f7667e15d3799\",\"urls\":[\"bzz-raw://7b1c8a9a79c8ffdbb0fa633f713ae3dfeac93b31d2b1639614ac32d473fb8250\",\"dweb:/ipfs/QmfARP93W2mgeVwD9Lkd3yVmbCLF2Mos7o8HJ1x6WYQmxZ\"]},\"/home/cdc218/projects/dolomite-protocol-v2/contracts/protocol/lib/Math.sol\":{\"keccak256\":\"0x0c0c913b6ccdb69063f9ec84879fcad20a1ee6f44402c9f5ec2b4f5b9f2fa16b\",\"urls\":[\"bzz-raw://89b32eefb57e5e63ad8c6e079ae7bf2d2c8622776cd45af0cf304e1cafd6e078\",\"dweb:/ipfs/Qmcj7yRnYuTgKC3ZqZqe8rynHGYVDS3UrFExcVGcqeaDHY\"]},\"/home/cdc218/projects/dolomite-protocol-v2/contracts/protocol/lib/Monetary.sol\":{\"keccak256\":\"0x5257274f2d4d3605f3e97ec45fb902111fe9a22506f0b4cf308ea933bc81bfe2\",\"urls\":[\"bzz-raw://85b8023b78805063a2ec8d376f1f5983994eabd96efd8ceadb0224dbb71c5678\",\"dweb:/ipfs/QmaDhzCzRqsuHuJfhToEC4pATQHwhh7yWWsjwfuRzFT1kG\"]},\"/home/cdc218/projects/dolomite-protocol-v2/contracts/protocol/lib/Require.sol\":{\"keccak256\":\"0xe641662503ea29ca959e84674188c3e9deaaf64c5623fb9560a4301c521ca1d3\",\"urls\":[\"bzz-raw://b10a04c7d014b99eb792c8c774e203c846d070b30cf0b715325fc07838ed6a6d\",\"dweb:/ipfs/QmUqZWnbchfEY9jM647yQamHe4GzspfUeRQF9k2nn1Hixd\"]},\"/home/cdc218/projects/dolomite-protocol-v2/contracts/protocol/lib/Storage.sol\":{\"keccak256\":\"0xf930fbde3ab43ec8f079dbad062453b502542f53b7eec670c8e86c7a2e47dd9a\",\"urls\":[\"bzz-raw://e1c402fc55471e8372be478e99f91c28373f096e31f0ef1d5072dfdb81541c29\",\"dweb:/ipfs/QmTc8WSfFCbxNQqNpq1vptUVFxteKQ8HWEhyXREyPZ2neu\"]},\"/home/cdc218/projects/dolomite-protocol-v2/contracts/protocol/lib/Time.sol\":{\"keccak256\":\"0x233d6ebf965711bf980f4bb2e672fb1a11b4b879fd41c884b3c2b704417d0d0c\",\"urls\":[\"bzz-raw://6478ff81706d531f9438b96274a7b904abbbd9c631540c68c6a89c3accf27abf\",\"dweb:/ipfs/QmWe9vkz3qwVjrcbmcTL8wgkjLPsrEqxcqPJL9ujM8PPbp\"]},\"/home/cdc218/projects/dolomite-protocol-v2/contracts/protocol/lib/Token.sol\":{\"keccak256\":\"0xd7bcae9e3c570544fc946a00cc7695106a64c20bc130d0183612c0410a531d19\",\"urls\":[\"bzz-raw://0ff5ffd6abb9ed223a64128c131afd962bec07fb9867cb62593906b339c76920\",\"dweb:/ipfs/QmbTrJL4bekvBqqaw6wXnBhYzS9uAqULSWF2VzW4cdfsM5\"]},\"/home/cdc218/projects/dolomite-protocol-v2/contracts/protocol/lib/Types.sol\":{\"keccak256\":\"0xab134538648a2e223a7fe61db03c14f687657a5d37147f93c9088f11735aa311\",\"urls\":[\"bzz-raw://79dc7d2b30576d2349b99267642ac8d5fb7939c920b8d8045379d3614238bdc3\",\"dweb:/ipfs/QmaQJYg1nirHoWSC6G38Cjsk9pZBzEaNrGXKqTsvAzbyES\"]},\"@openzeppelin/contracts/math/SafeMath.sol\":{\"keccak256\":\"0x640b6dee7a4b830bdfd52b5031a07fc2b12209f5b2e29e5d364a7d37f69d8076\",\"urls\":[\"bzz-raw://31113152e1ddb78fe7a4197f247591ca894e93f916867beb708d8e747b6cc74f\",\"dweb:/ipfs/QmbZaJyXdpsYGykVhHH9qpVGQg9DGCxE2QufbCUy3daTgq\"]},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0xe5bb0f57cff3e299f360052ba50f1ea0fff046df2be070b6943e0e3c3fdad8a9\",\"urls\":[\"bzz-raw://59fd025151435da35faa8093a5c7a17de02de9d08ad27275c5cdf05050820d91\",\"dweb:/ipfs/QmQMvwEcPhoRXzbXyrdoeRtvLoifUW9Qh7Luho7bmUPRkc\"]}},\"version\":1}",
|
|
1538
|
+
"metadata": "{\"compiler\":{\"version\":\"0.5.16+commit.9c3226ce\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"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\"}],\"name\":\"getAccountMarketsWithNonZeroBalances\",\"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\"},{\"internalType\":\"uint256\",\"name\":\"marketId\",\"type\":\"uint256\"}],\"name\":\"getAccountParNoMarketCheck\",\"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\":\"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\":\"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\":[{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"}],\"name\":\"getIsGlobalOperator\",\"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\":[{\"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\":[],\"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\":[{\"internalType\":\"uint256\",\"name\":\"marketId\",\"type\":\"uint256\"}],\"name\":\"getMarket\",\"outputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"isClosing\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"isRecyclable\",\"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\":\"uint96\",\"name\":\"borrow\",\"type\":\"uint96\"},{\"internalType\":\"uint96\",\"name\":\"supply\",\"type\":\"uint96\"},{\"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\":\"spreadPremium\",\"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\":\"getMarketCachedIndex\",\"outputs\":[{\"components\":[{\"internalType\":\"uint96\",\"name\":\"borrow\",\"type\":\"uint96\"},{\"internalType\":\"uint96\",\"name\":\"supply\",\"type\":\"uint96\"},{\"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\":\"uint96\",\"name\":\"borrow\",\"type\":\"uint96\"},{\"internalType\":\"uint96\",\"name\":\"supply\",\"type\":\"uint96\"},{\"internalType\":\"uint32\",\"name\":\"lastUpdate\",\"type\":\"uint32\"}],\"internalType\":\"struct Interest.Index\",\"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\":\"getMarketIsRecyclable\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"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\":\"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\":\"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\":\"getMarketWithInfo\",\"outputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"isClosing\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"isRecyclable\",\"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\":\"uint96\",\"name\":\"borrow\",\"type\":\"uint96\"},{\"internalType\":\"uint96\",\"name\":\"supply\",\"type\":\"uint96\"},{\"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\":\"spreadPremium\",\"type\":\"tuple\"}],\"internalType\":\"struct Storage.Market\",\"name\":\"\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint96\",\"name\":\"borrow\",\"type\":\"uint96\"},{\"internalType\":\"uint96\",\"name\":\"supply\",\"type\":\"uint96\"},{\"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\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"number\",\"type\":\"uint256\"}],\"internalType\":\"struct Account.Info\",\"name\":\"account\",\"type\":\"tuple\"}],\"name\":\"getNumberOfMarketsWithBorrow\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"n\",\"type\":\"uint256\"}],\"name\":\"getRecyclableMarkets\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"}],\"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\":\"spreadPremiumMax\",\"type\":\"uint64\"},{\"internalType\":\"uint128\",\"name\":\"minBorrowedValueMax\",\"type\":\"uint128\"}],\"internalType\":\"struct Storage.RiskLimits\",\"name\":\"\",\"type\":\"tuple\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"getRiskParams\",\"outputs\":[{\"components\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"internalType\":\"struct Decimal.D256\",\"name\":\"marginRatio\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"internalType\":\"struct Decimal.D256\",\"name\":\"liquidationSpread\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"internalType\":\"struct Decimal.D256\",\"name\":\"earningsRate\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"internalType\":\"struct Monetary.Value\",\"name\":\"minBorrowedValue\",\"type\":\"tuple\"}],\"internalType\":\"struct Storage.RiskParams\",\"name\":\"\",\"type\":\"tuple\"}],\"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\":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\"}],\"devdoc\":{\"methods\":{\"getAccountBalances((address,uint256))\":{\"params\":{\"account\":\"The account to query\"},\"return\":\"The following values: - The market IDs for each market - The ERC20 token address for each market - The account's principal value for each market - The account's (supplied or borrowed) number of tokens for each market\"},\"getAccountMarketsWithNonZeroBalances((address,uint256))\":{\"params\":{\"account\":\"The account to query\"},\"return\":\"The non-sorted marketIds with non-zero balance for the account.\"},\"getAccountPar((address,uint256),uint256)\":{\"params\":{\"account\":\"The account to query\",\"marketId\":\"The market to query\"},\"return\":\"The principal value\"},\"getAccountParNoMarketCheck((address,uint256),uint256)\":{\"params\":{\"account\":\"The account to query\",\"marketId\":\"The market to query\"},\"return\":\"The principal value\"},\"getAccountStatus((address,uint256))\":{\"params\":{\"account\":\"The account to query\"},\"return\":\"The account's status\"},\"getAccountValues((address,uint256))\":{\"params\":{\"account\":\"The account to query\"},\"return\":\"The following values: - The supplied value of the account - The borrowed value of the account\"},\"getAccountWei((address,uint256),uint256)\":{\"params\":{\"account\":\"The account to query\",\"marketId\":\"The market to query\"},\"return\":\"The token amount\"},\"getAdjustedAccountValues((address,uint256))\":{\"params\":{\"account\":\"The account to query\"},\"return\":\"The following values: - The supplied value of the account (adjusted for marginPremium) - The borrowed value of the account (adjusted for marginPremium)\"},\"getEarningsRate()\":{\"return\":\"The global earnings rate\"},\"getIsAutoTraderSpecial(address)\":{\"params\":{\"autoTrader\":\"The trader that should be checked for special call privileges.\"}},\"getIsGlobalOperator(address)\":{\"params\":{\"operator\":\"The address to query\"},\"return\":\"True if operator is a global operator\"},\"getIsLocalOperator(address,address)\":{\"params\":{\"operator\":\"The possible operator\",\"owner\":\"The owner of the accounts\"},\"return\":\"True if operator is approved for owner's accounts\"},\"getLiquidationSpread()\":{\"return\":\"The global liquidation spread\"},\"getLiquidationSpreadForPair(uint256,uint256)\":{\"params\":{\"heldMarketId\":\"The market for which the account has collateral\",\"owedMarketId\":\"The market for which the account has borrowed tokens\"},\"return\":\"The adjusted liquidation spread\"},\"getMarginRatio()\":{\"return\":\"The global margin-ratio\"},\"getMarket(uint256)\":{\"params\":{\"marketId\":\"The market to query\"},\"return\":\"A Storage.Market struct with the current state of the market\"},\"getMarketCachedIndex(uint256)\":{\"params\":{\"marketId\":\"The market to query\"},\"return\":\"The most recent index\"},\"getMarketCurrentIndex(uint256)\":{\"params\":{\"marketId\":\"The market to query\"},\"return\":\"The estimated current index\"},\"getMarketIdByTokenAddress(address)\":{\"params\":{\"token\":\"The token to query\"},\"return\":\"The token's marketId if the token is valid\"},\"getMarketInterestRate(uint256)\":{\"params\":{\"marketId\":\"The market to query\"},\"return\":\"The current interest rate\"},\"getMarketInterestSetter(uint256)\":{\"params\":{\"marketId\":\"The market to query\"},\"return\":\"The interest-setter address\"},\"getMarketIsClosing(uint256)\":{\"params\":{\"marketId\":\"The market to query\"},\"return\":\"True if the market is closing\"},\"getMarketIsRecyclable(uint256)\":{\"params\":{\"marketId\":\"The market to query\"},\"return\":\"True if the market is recyclable\"},\"getMarketMarginPremium(uint256)\":{\"params\":{\"marketId\":\"The market to query\"},\"return\":\"The market's margin premium\"},\"getMarketPrice(uint256)\":{\"params\":{\"marketId\":\"The market to query\"},\"return\":\"The price of each atomic unit of the token\"},\"getMarketPriceOracle(uint256)\":{\"params\":{\"marketId\":\"The market to query\"},\"return\":\"The price oracle address\"},\"getMarketSpreadPremium(uint256)\":{\"params\":{\"marketId\":\"The market to query\"},\"return\":\"The market's spread premium\"},\"getMarketTokenAddress(uint256)\":{\"params\":{\"marketId\":\"The market to query\"},\"return\":\"The token address\"},\"getMarketTotalPar(uint256)\":{\"params\":{\"marketId\":\"The market to query\"},\"return\":\"The total principal amounts\"},\"getMarketWithInfo(uint256)\":{\"params\":{\"marketId\":\"The market to query\"},\"return\":\"A tuple containing the values: - A Storage.Market struct with the current state of the market - The current estimated interest index - The current token price - The current market interest rate\"},\"getMinBorrowedValue()\":{\"return\":\"The global minimum borrow value\"},\"getNumExcessTokens(uint256)\":{\"params\":{\"marketId\":\"The market to query\"},\"return\":\"The number of excess tokens\"},\"getNumMarkets()\":{\"return\":\"The number of markets\"},\"getNumberOfMarketsWithBorrow((address,uint256))\":{\"params\":{\"account\":\"The account to query\"},\"return\":\"The non-sorted marketIds with non-zero balance for the account.\"},\"getRecyclableMarkets(uint256)\":{\"params\":{\"n\":\"The number of markets to get, bounded by the linked list being smaller than `n`\"},\"return\":\"The list of recyclable markets, in the same order held by the linked list\"},\"getRiskLimits()\":{\"return\":\"All global risk parameter limits\"},\"getRiskParams()\":{\"return\":\"All global risk parameters\"},\"operate((address,uint256)[],(uint8,uint256,(bool,uint8,uint8,uint256),uint256,uint256,address,uint256,bytes)[])\":{\"params\":{\"accounts\":\"A list of all accounts that will be used in this operation. Cannot contain duplicates. In each action, the relevant account will be referred-to by its index in the list.\",\"actions\":\"An ordered list of all actions that will be taken in this operation. The actions will be processed in order.\"}},\"setOperators((address,bool)[])\":{\"params\":{\"args\":\"A list of OperatorArgs which have an address and a boolean. The boolean value denotes whether to approve (true) or revoke approval (false) for that address.\"}}}},\"userdoc\":{\"methods\":{\"getAccountBalances((address,uint256))\":{\"notice\":\"Get an account's summary for each market.\"},\"getAccountMarketsWithNonZeroBalances((address,uint256))\":{\"notice\":\"Get a list of markets that have a non-zero balance for an account\"},\"getAccountPar((address,uint256),uint256)\":{\"notice\":\"Get the principal value for a particular account and market.\"},\"getAccountParNoMarketCheck((address,uint256),uint256)\":{\"notice\":\"Get the principal value for a particular account and market, with no check the market is valid. Meaning, markets that don't exist return 0.\"},\"getAccountStatus((address,uint256))\":{\"notice\":\"Get the status of an account (Normal, Liquidating, or Vaporizing).\"},\"getAccountValues((address,uint256))\":{\"notice\":\"Get the total supplied and total borrowed value of an account.\"},\"getAccountWei((address,uint256),uint256)\":{\"notice\":\"Get the token balance for a particular account and market.\"},\"getAdjustedAccountValues((address,uint256))\":{\"notice\":\"Get the total supplied and total borrowed values of an account adjusted by the marginPremium of each market. Supplied values are divided by (1 + marginPremium) for each market and borrowed values are multiplied by (1 + marginPremium) for each market. Comparing these adjusted values gives the margin-ratio of the account which will be compared to the global margin-ratio when determining if the account can be liquidated.\"},\"getEarningsRate()\":{\"notice\":\"Get the global earnings-rate variable that determines what percentage of the interest paid by borrowers gets passed-on to suppliers.\"},\"getIsAutoTraderSpecial(address)\":{\"notice\":\"Checks if the autoTrader can only be called invoked by a global operator\"},\"getIsGlobalOperator(address)\":{\"notice\":\"Return true if a particular address is approved as a global operator. Such an address can act on any account as if it were the operator's own.\"},\"getIsLocalOperator(address,address)\":{\"notice\":\"Return true if a particular address is approved as an operator for an owner's accounts. Approved operators can act on the accounts of the owner as if it were the operator's own.\"},\"getLiquidationSpread()\":{\"notice\":\"Get the global liquidation spread. This is the spread between oracle prices that incentivizes the liquidation of risky positions.\"},\"getLiquidationSpreadForPair(uint256,uint256)\":{\"notice\":\"Get the adjusted liquidation spread for some market pair. This is equal to the global liquidation spread multiplied by (1 + spreadPremium) for each of the two markets.\"},\"getMarginRatio()\":{\"notice\":\"Get the global minimum margin-ratio that every position must maintain to prevent being liquidated.\"},\"getMarket(uint256)\":{\"notice\":\"Get basic information about a particular market.\"},\"getMarketCachedIndex(uint256)\":{\"notice\":\"Get the most recently cached interest index for a market.\"},\"getMarketCurrentIndex(uint256)\":{\"notice\":\"Get the interest index for a market if it were to be updated right now.\"},\"getMarketIdByTokenAddress(address)\":{\"notice\":\"Get the ERC20 token address for a market.\"},\"getMarketInterestRate(uint256)\":{\"notice\":\"Get the current borrower interest rate for a market.\"},\"getMarketInterestSetter(uint256)\":{\"notice\":\"Get the interest-setter address for a market.\"},\"getMarketIsClosing(uint256)\":{\"notice\":\"Return true if a particular market is in closing mode. Additional borrows cannot be taken from a market that is closing.\"},\"getMarketIsRecyclable(uint256)\":{\"notice\":\"Return true if this market can be removed and its ID can be recycled and reused\"},\"getMarketMarginPremium(uint256)\":{\"notice\":\"Get the margin premium for a market. A margin premium makes it so that any positions that include the market require a higher collateralization to avoid being liquidated.\"},\"getMarketPrice(uint256)\":{\"notice\":\"Get the price of the token for a market.\"},\"getMarketPriceOracle(uint256)\":{\"notice\":\"Get the price oracle address for a market.\"},\"getMarketSpreadPremium(uint256)\":{\"notice\":\"Get the spread premium for a market. A spread premium makes it so that any liquidations that include the market have a higher spread than the global default.\"},\"getMarketTokenAddress(uint256)\":{\"notice\":\"Get the ERC20 token address for a market.\"},\"getMarketTotalPar(uint256)\":{\"notice\":\"Get the total principal amounts (borrowed and supplied) for a market.\"},\"getMarketWithInfo(uint256)\":{\"notice\":\"Get comprehensive information about a particular market.\"},\"getMinBorrowedValue()\":{\"notice\":\"Get the global minimum-borrow value which is the minimum value of any new borrow on DolomiteMargin.\"},\"getNumExcessTokens(uint256)\":{\"notice\":\"Get the number of excess tokens for a market. The number of excess tokens is calculated by taking the current number of tokens held in DolomiteMargin, adding the number of tokens owed to DolomiteMargin by borrowers, and subtracting the number of tokens owed to suppliers by DolomiteMargin.\"},\"getNumMarkets()\":{\"notice\":\"Get the total number of markets.\"},\"getNumberOfMarketsWithBorrow((address,uint256))\":{\"notice\":\"Get the number of markets with which an account has a negative balance.\"},\"getRecyclableMarkets(uint256)\":{\"notice\":\"Gets the recyclable markets, up to `n` length. If `n` is greater than the length of the list, 0's are returned for the empty slots.\"},\"getRiskLimits()\":{\"notice\":\"Get all risk parameter limits in a single struct. These are the maximum limits at which the risk parameters can be set by the admin of DolomiteMargin.\"},\"getRiskParams()\":{\"notice\":\"Get all risk parameters in a single struct.\"},\"operate((address,uint256)[],(uint8,uint256,(bool,uint8,uint8,uint256),uint256,uint256,address,uint256,bytes)[])\":{\"notice\":\"The main entry-point to DolomiteMargin that allows users and contracts to manage accounts. Take one or more actions on one or more accounts. The msg.sender must be the owner or operator of all accounts except for those being liquidated, vaporized, or traded with. One call to operate() is considered a singular \\\"operation\\\". Account collateralization is ensured only after the completion of the entire operation.\"},\"setOperators((address,bool)[])\":{\"notice\":\"Approves/disapproves any number of operators. An operator is an external address that has the same permissions to manipulate an account as the owner of the account. Operators are simply addresses and therefore may either be externally-owned Ethereum accounts OR smart contracts. * Operators are also able to act as AutoTrader contracts on behalf of the account owner if the operator is a smart contract and implements the IAutoTrader interface.\"}}}},\"settings\":{\"compilationTarget\":{\"/Users/corey/Leavitt-Innovations/dolomite-v2-protocol/contracts/protocol/interfaces/IDolomiteMargin.sol\":\"IDolomiteMargin\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":10000},\"remappings\":[]},\"sources\":{\"/Users/corey/Leavitt-Innovations/dolomite-v2-protocol/contracts/protocol/interfaces/IDolomiteMargin.sol\":{\"keccak256\":\"0x1e73364879c267fdd2bfd871e62ee58ee3d65fbef3b71e3cc104fbff499eca6c\",\"urls\":[\"bzz-raw://e3b1327980a5949afd52cff4713f47ee4fdee9a8b376ceaa3402f5c9696b8c1b\",\"dweb:/ipfs/QmbhQzVEdaraPJizT5DTtk6CDzH3guHNipHW5T23uTtFkX\"]},\"/Users/corey/Leavitt-Innovations/dolomite-v2-protocol/contracts/protocol/interfaces/IERC20Detailed.sol\":{\"keccak256\":\"0x22a62e2a8155e70300773721902f4b9118e17aa0bb5d9d1b046050a014cfb223\",\"urls\":[\"bzz-raw://03af737a33c552fbe58f6f1fbd5496854fdc28dd57be4365d56663725c083a18\",\"dweb:/ipfs/QmbgLqGAQEd6tXsZB8QaPNCAMiU6nNzP75wNbKdS65BuUF\"]},\"/Users/corey/Leavitt-Innovations/dolomite-v2-protocol/contracts/protocol/interfaces/IInterestSetter.sol\":{\"keccak256\":\"0x546825f65490a30e29d0f6446acec49c1e895ce6b33d48ca5c05092725a63a57\",\"urls\":[\"bzz-raw://6ad3013aed985bdf6e6234ae0f7f37e6bba76c3470c33bfa24678cf19b3b412c\",\"dweb:/ipfs/QmfYaSBzxGpgiHoR7ontMJY66S5L26XwkLYoEuzsEjpbQH\"]},\"/Users/corey/Leavitt-Innovations/dolomite-v2-protocol/contracts/protocol/interfaces/IPriceOracle.sol\":{\"keccak256\":\"0x3f7c3d1397390ea44c6d5e5730d49476431c3df3b28334fe38218de5edc31138\",\"urls\":[\"bzz-raw://63ebf926fca9ce33aaabaf93805686acc25daded1648d6dab59c8c4d05116918\",\"dweb:/ipfs/QmeGkDp7ycYstpfqCYBiqoCYwy876gabx8r42o5koj3H5A\"]},\"/Users/corey/Leavitt-Innovations/dolomite-v2-protocol/contracts/protocol/lib/Account.sol\":{\"keccak256\":\"0x0ab9a3fabc89984dff748af63d4319ee134051de2d7fc560e34ebaac86198396\",\"urls\":[\"bzz-raw://ab67f499a8ef83dc7e7cf7176a0f66eced40fa228eda8dd2d47e066ab985cf42\",\"dweb:/ipfs/QmXRHbsEYxr2Qsfsj5psXGV5LaPZHuzLiEXzSQJ77WSE27\"]},\"/Users/corey/Leavitt-Innovations/dolomite-v2-protocol/contracts/protocol/lib/Actions.sol\":{\"keccak256\":\"0x44ec62b766a88a2f65267991e76cab88711e733b826dc9e578cb6ad6b38b2445\",\"urls\":[\"bzz-raw://731a8d44e57c9dcd7fbdefc37a6b5889c0d06defb3bd66b921b2a7db0edf0103\",\"dweb:/ipfs/QmcVbXc9oi5DMxjPtsBF76oJzD6zVjm7RuXgJfP3Goqrrb\"]},\"/Users/corey/Leavitt-Innovations/dolomite-v2-protocol/contracts/protocol/lib/Bits.sol\":{\"keccak256\":\"0x425bf5764368faca16cc30a64b79d9bbe01fd8150444b58a464971c32450bd85\",\"urls\":[\"bzz-raw://064baf3155da634c5c80cea70bba0dda7a33af934b34f75f596961b4ab9aeafe\",\"dweb:/ipfs/QmTUHXoi9L6CkERyfhFs1jhxU66u2sbc6XRR5cH4TeHEqL\"]},\"/Users/corey/Leavitt-Innovations/dolomite-v2-protocol/contracts/protocol/lib/Cache.sol\":{\"keccak256\":\"0x1e6ff383f285e311d07374edda353e14ac4f29201726b0062a2f046c1a2b482c\",\"urls\":[\"bzz-raw://fd11c5db01039bf2c95f3561b08d271b80b7b1cb9fd7f75da887f7609807c5a7\",\"dweb:/ipfs/QmcY6CugdEHaYUa8ZKSnUDhvtVuoLfpDscZcmC91koAn1t\"]},\"/Users/corey/Leavitt-Innovations/dolomite-v2-protocol/contracts/protocol/lib/Decimal.sol\":{\"keccak256\":\"0x66990bbe3c58d0edf57d3f67ab5280e2a53958ce44f75c335c4c50542321bccb\",\"urls\":[\"bzz-raw://724cfdb5c99121aab5262679e46766a2883e344749870d7dbfa92d1617f68bf2\",\"dweb:/ipfs/QmYjAsS45f6UG2u3zuTks2HVfMYtyFCVMgUvD7Gt7XtU3R\"]},\"/Users/corey/Leavitt-Innovations/dolomite-v2-protocol/contracts/protocol/lib/EnumerableSet.sol\":{\"keccak256\":\"0x9710b0ab43cc2d964d8722a0aabbedbf7e9d4756dcc0b4ab7c46c1ee68653042\",\"urls\":[\"bzz-raw://2405593d37f0f224bfca556f01634a9755bb0ed626f74dd15293106a8b4dd7d3\",\"dweb:/ipfs/QmTZ16S336jsoDnK5p3vAZRzimBkmdEJibncHVBJxBt469\"]},\"/Users/corey/Leavitt-Innovations/dolomite-v2-protocol/contracts/protocol/lib/Interest.sol\":{\"keccak256\":\"0x73e75454568c5dfc3bdcf7dbf2ddce6ab8d3d317618bc1f1957f7667e15d3799\",\"urls\":[\"bzz-raw://7b1c8a9a79c8ffdbb0fa633f713ae3dfeac93b31d2b1639614ac32d473fb8250\",\"dweb:/ipfs/QmfARP93W2mgeVwD9Lkd3yVmbCLF2Mos7o8HJ1x6WYQmxZ\"]},\"/Users/corey/Leavitt-Innovations/dolomite-v2-protocol/contracts/protocol/lib/Math.sol\":{\"keccak256\":\"0x0c0c913b6ccdb69063f9ec84879fcad20a1ee6f44402c9f5ec2b4f5b9f2fa16b\",\"urls\":[\"bzz-raw://89b32eefb57e5e63ad8c6e079ae7bf2d2c8622776cd45af0cf304e1cafd6e078\",\"dweb:/ipfs/Qmcj7yRnYuTgKC3ZqZqe8rynHGYVDS3UrFExcVGcqeaDHY\"]},\"/Users/corey/Leavitt-Innovations/dolomite-v2-protocol/contracts/protocol/lib/Monetary.sol\":{\"keccak256\":\"0x5257274f2d4d3605f3e97ec45fb902111fe9a22506f0b4cf308ea933bc81bfe2\",\"urls\":[\"bzz-raw://85b8023b78805063a2ec8d376f1f5983994eabd96efd8ceadb0224dbb71c5678\",\"dweb:/ipfs/QmaDhzCzRqsuHuJfhToEC4pATQHwhh7yWWsjwfuRzFT1kG\"]},\"/Users/corey/Leavitt-Innovations/dolomite-v2-protocol/contracts/protocol/lib/Require.sol\":{\"keccak256\":\"0xe641662503ea29ca959e84674188c3e9deaaf64c5623fb9560a4301c521ca1d3\",\"urls\":[\"bzz-raw://b10a04c7d014b99eb792c8c774e203c846d070b30cf0b715325fc07838ed6a6d\",\"dweb:/ipfs/QmUqZWnbchfEY9jM647yQamHe4GzspfUeRQF9k2nn1Hixd\"]},\"/Users/corey/Leavitt-Innovations/dolomite-v2-protocol/contracts/protocol/lib/Storage.sol\":{\"keccak256\":\"0xf930fbde3ab43ec8f079dbad062453b502542f53b7eec670c8e86c7a2e47dd9a\",\"urls\":[\"bzz-raw://e1c402fc55471e8372be478e99f91c28373f096e31f0ef1d5072dfdb81541c29\",\"dweb:/ipfs/QmTc8WSfFCbxNQqNpq1vptUVFxteKQ8HWEhyXREyPZ2neu\"]},\"/Users/corey/Leavitt-Innovations/dolomite-v2-protocol/contracts/protocol/lib/Time.sol\":{\"keccak256\":\"0x233d6ebf965711bf980f4bb2e672fb1a11b4b879fd41c884b3c2b704417d0d0c\",\"urls\":[\"bzz-raw://6478ff81706d531f9438b96274a7b904abbbd9c631540c68c6a89c3accf27abf\",\"dweb:/ipfs/QmWe9vkz3qwVjrcbmcTL8wgkjLPsrEqxcqPJL9ujM8PPbp\"]},\"/Users/corey/Leavitt-Innovations/dolomite-v2-protocol/contracts/protocol/lib/Token.sol\":{\"keccak256\":\"0xd7bcae9e3c570544fc946a00cc7695106a64c20bc130d0183612c0410a531d19\",\"urls\":[\"bzz-raw://0ff5ffd6abb9ed223a64128c131afd962bec07fb9867cb62593906b339c76920\",\"dweb:/ipfs/QmbTrJL4bekvBqqaw6wXnBhYzS9uAqULSWF2VzW4cdfsM5\"]},\"/Users/corey/Leavitt-Innovations/dolomite-v2-protocol/contracts/protocol/lib/Types.sol\":{\"keccak256\":\"0xab134538648a2e223a7fe61db03c14f687657a5d37147f93c9088f11735aa311\",\"urls\":[\"bzz-raw://79dc7d2b30576d2349b99267642ac8d5fb7939c920b8d8045379d3614238bdc3\",\"dweb:/ipfs/QmaQJYg1nirHoWSC6G38Cjsk9pZBzEaNrGXKqTsvAzbyES\"]},\"@openzeppelin/contracts/math/SafeMath.sol\":{\"keccak256\":\"0x640b6dee7a4b830bdfd52b5031a07fc2b12209f5b2e29e5d364a7d37f69d8076\",\"urls\":[\"bzz-raw://31113152e1ddb78fe7a4197f247591ca894e93f916867beb708d8e747b6cc74f\",\"dweb:/ipfs/QmbZaJyXdpsYGykVhHH9qpVGQg9DGCxE2QufbCUy3daTgq\"]},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0xe5bb0f57cff3e299f360052ba50f1ea0fff046df2be070b6943e0e3c3fdad8a9\",\"urls\":[\"bzz-raw://59fd025151435da35faa8093a5c7a17de02de9d08ad27275c5cdf05050820d91\",\"dweb:/ipfs/QmQMvwEcPhoRXzbXyrdoeRtvLoifUW9Qh7Luho7bmUPRkc\"]}},\"version\":1}",
|
|
1539
1539
|
"bytecode": "0x",
|
|
1540
1540
|
"deployedBytecode": "0x",
|
|
1541
1541
|
"sourceMap": "",
|
|
1542
1542
|
"deployedSourceMap": "",
|
|
1543
1543
|
"source": "/*\n\n Copyright 2021 Dolomite.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\n\npragma solidity >=0.5.0;\npragma experimental ABIEncoderV2;\n\nimport { IInterestSetter } from \"../interfaces/IInterestSetter.sol\";\nimport { IPriceOracle } from \"../interfaces/IPriceOracle.sol\";\n\nimport { Account } from \"../lib/Account.sol\";\nimport { Actions } from \"../lib/Actions.sol\";\nimport { Decimal } from \"../lib/Decimal.sol\";\nimport { Interest } from \"../lib/Interest.sol\";\nimport { Monetary } from \"../lib/Monetary.sol\";\nimport { Storage } from \"../lib/Storage.sol\";\nimport { Types } from \"../lib/Types.sol\";\n\ninterface IDolomiteMargin {\n\n // ============ Getters for Markets ============\n\n /**\n * Get the ERC20 token address for a market.\n *\n * @param token The token to query\n * @return The token's marketId if the token is valid\n */\n function getMarketIdByTokenAddress(\n address token\n ) external view returns (uint256);\n\n /**\n * Get the ERC20 token address for a market.\n *\n * @param marketId The market to query\n * @return The token address\n */\n function getMarketTokenAddress(\n uint256 marketId\n ) external view returns (address);\n\n /**\n * Return true if a particular market is in closing mode. Additional borrows cannot be taken\n * from a market that is closing.\n *\n * @param marketId The market to query\n * @return True if the market is closing\n */\n function getMarketIsClosing(\n uint256 marketId\n )\n external\n view\n returns (bool);\n\n /**\n * Get the price of the token for a market.\n *\n * @param marketId The market to query\n * @return The price of each atomic unit of the token\n */\n function getMarketPrice(\n uint256 marketId\n ) external view returns (Monetary.Price memory);\n\n /**\n * Get the total number of markets.\n *\n * @return The number of markets\n */\n function getNumMarkets() external view returns (uint256);\n\n /**\n * Get the total principal amounts (borrowed and supplied) for a market.\n *\n * @param marketId The market to query\n * @return The total principal amounts\n */\n function getMarketTotalPar(\n uint256 marketId\n ) external view returns (Types.TotalPar memory);\n\n /**\n * Get the most recently cached interest index for a market.\n *\n * @param marketId The market to query\n * @return The most recent index\n */\n function getMarketCachedIndex(\n uint256 marketId\n ) external view returns (Interest.Index memory);\n\n /**\n * Get the interest index for a market if it were to be updated right now.\n *\n * @param marketId The market to query\n * @return The estimated current index\n */\n function getMarketCurrentIndex(\n uint256 marketId\n ) external view returns (Interest.Index memory);\n\n /**\n * Get the price oracle address for a market.\n *\n * @param marketId The market to query\n * @return The price oracle address\n */\n function getMarketPriceOracle(\n uint256 marketId\n ) external view returns (IPriceOracle);\n\n /**\n * Get the interest-setter address for a market.\n *\n * @param marketId The market to query\n * @return The interest-setter address\n */\n function getMarketInterestSetter(\n uint256 marketId\n ) external view returns (IInterestSetter);\n\n /**\n * Get the margin premium for a market. A margin premium makes it so that any positions that\n * include the market require a higher collateralization to avoid being liquidated.\n *\n * @param marketId The market to query\n * @return The market's margin premium\n */\n function getMarketMarginPremium(\n uint256 marketId\n ) external view returns (Decimal.D256 memory);\n\n /**\n * Get the spread premium for a market. A spread premium makes it so that any liquidations\n * that include the market have a higher spread than the global default.\n *\n * @param marketId The market to query\n * @return The market's spread premium\n */\n function getMarketSpreadPremium(\n uint256 marketId\n ) external view returns (Decimal.D256 memory);\n\n /**\n * Return true if this market can be removed and its ID can be recycled and reused\n *\n * @param marketId The market to query\n * @return True if the market is recyclable\n */\n function getMarketIsRecyclable(\n uint256 marketId\n ) external view returns (bool);\n\n /**\n * Gets the recyclable markets, up to `n` length. If `n` is greater than the length of the list, 0's are returned\n * for the empty slots.\n *\n * @param n The number of markets to get, bounded by the linked list being smaller than `n`\n * @return The list of recyclable markets, in the same order held by the linked list\n */\n function getRecyclableMarkets(\n uint256 n\n ) external view returns (uint[] memory);\n\n /**\n * Get the current borrower interest rate for a market.\n *\n * @param marketId The market to query\n * @return The current interest rate\n */\n function getMarketInterestRate(\n uint256 marketId\n ) external view returns (Interest.Rate memory);\n\n /**\n * Get basic information about a particular market.\n *\n * @param marketId The market to query\n * @return A Storage.Market struct with the current state of the market\n */\n function getMarket(\n uint256 marketId\n ) external view returns (Storage.Market memory);\n\n /**\n * Get comprehensive information about a particular market.\n *\n * @param marketId The market to query\n * @return A tuple containing the values:\n * - A Storage.Market struct with the current state of the market\n * - The current estimated interest index\n * - The current token price\n * - The current market interest rate\n */\n function getMarketWithInfo(\n uint256 marketId\n )\n external\n view\n returns (\n Storage.Market memory,\n Interest.Index memory,\n Monetary.Price memory,\n Interest.Rate memory\n );\n\n /**\n * Get the number of excess tokens for a market. The number of excess tokens is calculated by taking the current\n * number of tokens held in DolomiteMargin, adding the number of tokens owed to DolomiteMargin by borrowers, and\n * subtracting the number of tokens owed to suppliers by DolomiteMargin.\n *\n * @param marketId The market to query\n * @return The number of excess tokens\n */\n function getNumExcessTokens(\n uint256 marketId\n ) external view returns (Types.Wei memory);\n\n // ============ Getters for Accounts ============\n\n /**\n * Get the principal value for a particular account and market.\n *\n * @param account The account to query\n * @param marketId The market to query\n * @return The principal value\n */\n function getAccountPar(\n Account.Info calldata account,\n uint256 marketId\n ) external view returns (Types.Par memory);\n\n /**\n * Get the principal value for a particular account and market, with no check the market is valid. Meaning, markets\n * that don't exist return 0.\n *\n * @param account The account to query\n * @param marketId The market to query\n * @return The principal value\n */\n function getAccountParNoMarketCheck(\n Account.Info calldata account,\n uint256 marketId\n ) external view returns (Types.Par memory);\n\n /**\n * Get the token balance for a particular account and market.\n *\n * @param account The account to query\n * @param marketId The market to query\n * @return The token amount\n */\n function getAccountWei(\n Account.Info calldata account,\n uint256 marketId\n ) external view returns (Types.Wei memory);\n\n /**\n * Get the status of an account (Normal, Liquidating, or Vaporizing).\n *\n * @param account The account to query\n * @return The account's status\n */\n function getAccountStatus(\n Account.Info calldata account\n ) external view returns (Account.Status);\n\n /**\n * Get a list of markets that have a non-zero balance for an account\n *\n * @param account The account to query\n * @return The non-sorted marketIds with non-zero balance for the account.\n */\n function getAccountMarketsWithNonZeroBalances(\n Account.Info calldata account\n ) external view returns (uint256[] memory);\n\n /**\n * Get the number of markets with which an account has a negative balance.\n *\n * @param account The account to query\n * @return The non-sorted marketIds with non-zero balance for the account.\n */\n function getNumberOfMarketsWithBorrow(\n Account.Info calldata account\n ) external view returns (uint256);\n\n /**\n * Get the total supplied and total borrowed value of an account.\n *\n * @param account The account to query\n * @return The following values:\n * - The supplied value of the account\n * - The borrowed value of the account\n */\n function getAccountValues(\n Account.Info calldata account\n ) external view returns (Monetary.Value memory, Monetary.Value memory);\n\n /**\n * Get the total supplied and total borrowed values of an account adjusted by the marginPremium\n * of each market. Supplied values are divided by (1 + marginPremium) for each market and\n * borrowed values are multiplied by (1 + marginPremium) for each market. Comparing these\n * adjusted values gives the margin-ratio of the account which will be compared to the global\n * margin-ratio when determining if the account can be liquidated.\n *\n * @param account The account to query\n * @return The following values:\n * - The supplied value of the account (adjusted for marginPremium)\n * - The borrowed value of the account (adjusted for marginPremium)\n */\n function getAdjustedAccountValues(\n Account.Info calldata account\n ) external view returns (Monetary.Value memory, Monetary.Value memory);\n\n /**\n * Get an account's summary for each market.\n *\n * @param account The account to query\n * @return The following values:\n * - The market IDs for each market\n * - The ERC20 token address for each market\n * - The account's principal value for each market\n * - The account's (supplied or borrowed) number of tokens for each market\n */\n function getAccountBalances(\n Account.Info calldata account\n ) external view returns (uint[] memory, address[] memory, Types.Par[] memory, Types.Wei[] memory);\n\n // ============ Getters for Account Permissions ============\n\n /**\n * Return true if a particular address is approved as an operator for an owner's accounts.\n * Approved operators can act on the accounts of the owner as if it were the operator's own.\n *\n * @param owner The owner of the accounts\n * @param operator The possible operator\n * @return True if operator is approved for owner's accounts\n */\n function getIsLocalOperator(\n address owner,\n address operator\n ) external view returns (bool);\n\n /**\n * Return true if a particular address is approved as a global operator. Such an address can\n * act on any account as if it were the operator's own.\n *\n * @param operator The address to query\n * @return True if operator is a global operator\n */\n function getIsGlobalOperator(\n address operator\n ) external view returns (bool);\n\n /**\n * Checks if the autoTrader can only be called invoked by a global operator\n *\n * @param autoTrader The trader that should be checked for special call privileges.\n */\n function getIsAutoTraderSpecial(address autoTrader) external view returns (bool);\n\n // ============ Getters for Risk Params ============\n\n /**\n * Get the global minimum margin-ratio that every position must maintain to prevent being\n * liquidated.\n *\n * @return The global margin-ratio\n */\n function getMarginRatio() external view returns (Decimal.D256 memory);\n\n /**\n * Get the global liquidation spread. This is the spread between oracle prices that incentivizes\n * the liquidation of risky positions.\n *\n * @return The global liquidation spread\n */\n function getLiquidationSpread() external view returns (Decimal.D256 memory);\n\n /**\n * Get the adjusted liquidation spread for some market pair. This is equal to the global\n * liquidation spread multiplied by (1 + spreadPremium) for each of the two markets.\n *\n * @param heldMarketId The market for which the account has collateral\n * @param owedMarketId The market for which the account has borrowed tokens\n * @return The adjusted liquidation spread\n */\n function getLiquidationSpreadForPair(\n uint256 heldMarketId,\n uint256 owedMarketId\n ) external view returns (Decimal.D256 memory);\n\n /**\n * Get the global earnings-rate variable that determines what percentage of the interest paid\n * by borrowers gets passed-on to suppliers.\n *\n * @return The global earnings rate\n */\n function getEarningsRate() external view returns (Decimal.D256 memory);\n\n /**\n * Get the global minimum-borrow value which is the minimum value of any new borrow on DolomiteMargin.\n *\n * @return The global minimum borrow value\n */\n function getMinBorrowedValue() external view returns (Monetary.Value memory);\n\n /**\n * Get all risk parameters in a single struct.\n *\n * @return All global risk parameters\n */\n function getRiskParams() external view returns (Storage.RiskParams memory);\n\n /**\n * Get all risk parameter limits in a single struct. These are the maximum limits at which the\n * risk parameters can be set by the admin of DolomiteMargin.\n *\n * @return All global risk parameter limits\n */\n function getRiskLimits() external view returns (Storage.RiskLimits memory);\n\n // ============ Write Functions ============\n\n /**\n * The main entry-point to DolomiteMargin that allows users and contracts to manage accounts.\n * Take one or more actions on one or more accounts. The msg.sender must be the owner or\n * operator of all accounts except for those being liquidated, vaporized, or traded with.\n * One call to operate() is considered a singular \"operation\". Account collateralization is\n * ensured only after the completion of the entire operation.\n *\n * @param accounts A list of all accounts that will be used in this operation. Cannot contain\n * duplicates. In each action, the relevant account will be referred-to by its\n * index in the list.\n * @param actions An ordered list of all actions that will be taken in this operation. The\n * actions will be processed in order.\n */\n function operate(\n Account.Info[] calldata accounts,\n Actions.ActionArgs[] calldata actions\n ) external;\n\n /**\n * Approves/disapproves any number of operators. An operator is an external address that has the\n * same permissions to manipulate an account as the owner of the account. Operators are simply\n * addresses and therefore may either be externally-owned Ethereum accounts OR smart contracts.\n *\n * Operators are also able to act as AutoTrader contracts on behalf of the account owner if the\n * operator is a smart contract and implements the IAutoTrader interface.\n *\n * @param args A list of OperatorArgs which have an address and a boolean. The boolean value\n * denotes whether to approve (true) or revoke approval (false) for that address.\n */\n function setOperators(\n Types.OperatorArg[] calldata args\n ) external;\n\n}\n",
|
|
1544
|
-
"sourcePath": "/
|
|
1544
|
+
"sourcePath": "/Users/corey/Leavitt-Innovations/dolomite-v2-protocol/contracts/protocol/interfaces/IDolomiteMargin.sol",
|
|
1545
1545
|
"ast": {
|
|
1546
|
-
"absolutePath": "/
|
|
1546
|
+
"absolutePath": "/Users/corey/Leavitt-Innovations/dolomite-v2-protocol/contracts/protocol/interfaces/IDolomiteMargin.sol",
|
|
1547
1547
|
"exportedSymbols": {
|
|
1548
1548
|
"IDolomiteMargin": [
|
|
1549
1549
|
27683
|
|
@@ -1573,7 +1573,7 @@
|
|
|
1573
1573
|
"src": "620:33:58"
|
|
1574
1574
|
},
|
|
1575
1575
|
{
|
|
1576
|
-
"absolutePath": "/
|
|
1576
|
+
"absolutePath": "/Users/corey/Leavitt-Innovations/dolomite-v2-protocol/contracts/protocol/interfaces/IInterestSetter.sol",
|
|
1577
1577
|
"file": "../interfaces/IInterestSetter.sol",
|
|
1578
1578
|
"id": 27374,
|
|
1579
1579
|
"nodeType": "ImportDirective",
|
|
@@ -1589,7 +1589,7 @@
|
|
|
1589
1589
|
"unitAlias": ""
|
|
1590
1590
|
},
|
|
1591
1591
|
{
|
|
1592
|
-
"absolutePath": "/
|
|
1592
|
+
"absolutePath": "/Users/corey/Leavitt-Innovations/dolomite-v2-protocol/contracts/protocol/interfaces/IPriceOracle.sol",
|
|
1593
1593
|
"file": "../interfaces/IPriceOracle.sol",
|
|
1594
1594
|
"id": 27376,
|
|
1595
1595
|
"nodeType": "ImportDirective",
|
|
@@ -1605,7 +1605,7 @@
|
|
|
1605
1605
|
"unitAlias": ""
|
|
1606
1606
|
},
|
|
1607
1607
|
{
|
|
1608
|
-
"absolutePath": "/
|
|
1608
|
+
"absolutePath": "/Users/corey/Leavitt-Innovations/dolomite-v2-protocol/contracts/protocol/lib/Account.sol",
|
|
1609
1609
|
"file": "../lib/Account.sol",
|
|
1610
1610
|
"id": 27378,
|
|
1611
1611
|
"nodeType": "ImportDirective",
|
|
@@ -1621,7 +1621,7 @@
|
|
|
1621
1621
|
"unitAlias": ""
|
|
1622
1622
|
},
|
|
1623
1623
|
{
|
|
1624
|
-
"absolutePath": "/
|
|
1624
|
+
"absolutePath": "/Users/corey/Leavitt-Innovations/dolomite-v2-protocol/contracts/protocol/lib/Actions.sol",
|
|
1625
1625
|
"file": "../lib/Actions.sol",
|
|
1626
1626
|
"id": 27380,
|
|
1627
1627
|
"nodeType": "ImportDirective",
|
|
@@ -1637,7 +1637,7 @@
|
|
|
1637
1637
|
"unitAlias": ""
|
|
1638
1638
|
},
|
|
1639
1639
|
{
|
|
1640
|
-
"absolutePath": "/
|
|
1640
|
+
"absolutePath": "/Users/corey/Leavitt-Innovations/dolomite-v2-protocol/contracts/protocol/lib/Decimal.sol",
|
|
1641
1641
|
"file": "../lib/Decimal.sol",
|
|
1642
1642
|
"id": 27382,
|
|
1643
1643
|
"nodeType": "ImportDirective",
|
|
@@ -1653,7 +1653,7 @@
|
|
|
1653
1653
|
"unitAlias": ""
|
|
1654
1654
|
},
|
|
1655
1655
|
{
|
|
1656
|
-
"absolutePath": "/
|
|
1656
|
+
"absolutePath": "/Users/corey/Leavitt-Innovations/dolomite-v2-protocol/contracts/protocol/lib/Interest.sol",
|
|
1657
1657
|
"file": "../lib/Interest.sol",
|
|
1658
1658
|
"id": 27384,
|
|
1659
1659
|
"nodeType": "ImportDirective",
|
|
@@ -1669,7 +1669,7 @@
|
|
|
1669
1669
|
"unitAlias": ""
|
|
1670
1670
|
},
|
|
1671
1671
|
{
|
|
1672
|
-
"absolutePath": "/
|
|
1672
|
+
"absolutePath": "/Users/corey/Leavitt-Innovations/dolomite-v2-protocol/contracts/protocol/lib/Monetary.sol",
|
|
1673
1673
|
"file": "../lib/Monetary.sol",
|
|
1674
1674
|
"id": 27386,
|
|
1675
1675
|
"nodeType": "ImportDirective",
|
|
@@ -1685,7 +1685,7 @@
|
|
|
1685
1685
|
"unitAlias": ""
|
|
1686
1686
|
},
|
|
1687
1687
|
{
|
|
1688
|
-
"absolutePath": "/
|
|
1688
|
+
"absolutePath": "/Users/corey/Leavitt-Innovations/dolomite-v2-protocol/contracts/protocol/lib/Storage.sol",
|
|
1689
1689
|
"file": "../lib/Storage.sol",
|
|
1690
1690
|
"id": 27388,
|
|
1691
1691
|
"nodeType": "ImportDirective",
|
|
@@ -1701,7 +1701,7 @@
|
|
|
1701
1701
|
"unitAlias": ""
|
|
1702
1702
|
},
|
|
1703
1703
|
{
|
|
1704
|
-
"absolutePath": "/
|
|
1704
|
+
"absolutePath": "/Users/corey/Leavitt-Innovations/dolomite-v2-protocol/contracts/protocol/lib/Types.sol",
|
|
1705
1705
|
"file": "../lib/Types.sol",
|
|
1706
1706
|
"id": 27390,
|
|
1707
1707
|
"nodeType": "ImportDirective",
|
|
@@ -5202,7 +5202,7 @@
|
|
|
5202
5202
|
"src": "595:16471:58"
|
|
5203
5203
|
},
|
|
5204
5204
|
"legacyAST": {
|
|
5205
|
-
"absolutePath": "/
|
|
5205
|
+
"absolutePath": "/Users/corey/Leavitt-Innovations/dolomite-v2-protocol/contracts/protocol/interfaces/IDolomiteMargin.sol",
|
|
5206
5206
|
"exportedSymbols": {
|
|
5207
5207
|
"IDolomiteMargin": [
|
|
5208
5208
|
27683
|
|
@@ -5232,7 +5232,7 @@
|
|
|
5232
5232
|
"src": "620:33:58"
|
|
5233
5233
|
},
|
|
5234
5234
|
{
|
|
5235
|
-
"absolutePath": "/
|
|
5235
|
+
"absolutePath": "/Users/corey/Leavitt-Innovations/dolomite-v2-protocol/contracts/protocol/interfaces/IInterestSetter.sol",
|
|
5236
5236
|
"file": "../interfaces/IInterestSetter.sol",
|
|
5237
5237
|
"id": 27374,
|
|
5238
5238
|
"nodeType": "ImportDirective",
|
|
@@ -5248,7 +5248,7 @@
|
|
|
5248
5248
|
"unitAlias": ""
|
|
5249
5249
|
},
|
|
5250
5250
|
{
|
|
5251
|
-
"absolutePath": "/
|
|
5251
|
+
"absolutePath": "/Users/corey/Leavitt-Innovations/dolomite-v2-protocol/contracts/protocol/interfaces/IPriceOracle.sol",
|
|
5252
5252
|
"file": "../interfaces/IPriceOracle.sol",
|
|
5253
5253
|
"id": 27376,
|
|
5254
5254
|
"nodeType": "ImportDirective",
|
|
@@ -5264,7 +5264,7 @@
|
|
|
5264
5264
|
"unitAlias": ""
|
|
5265
5265
|
},
|
|
5266
5266
|
{
|
|
5267
|
-
"absolutePath": "/
|
|
5267
|
+
"absolutePath": "/Users/corey/Leavitt-Innovations/dolomite-v2-protocol/contracts/protocol/lib/Account.sol",
|
|
5268
5268
|
"file": "../lib/Account.sol",
|
|
5269
5269
|
"id": 27378,
|
|
5270
5270
|
"nodeType": "ImportDirective",
|
|
@@ -5280,7 +5280,7 @@
|
|
|
5280
5280
|
"unitAlias": ""
|
|
5281
5281
|
},
|
|
5282
5282
|
{
|
|
5283
|
-
"absolutePath": "/
|
|
5283
|
+
"absolutePath": "/Users/corey/Leavitt-Innovations/dolomite-v2-protocol/contracts/protocol/lib/Actions.sol",
|
|
5284
5284
|
"file": "../lib/Actions.sol",
|
|
5285
5285
|
"id": 27380,
|
|
5286
5286
|
"nodeType": "ImportDirective",
|
|
@@ -5296,7 +5296,7 @@
|
|
|
5296
5296
|
"unitAlias": ""
|
|
5297
5297
|
},
|
|
5298
5298
|
{
|
|
5299
|
-
"absolutePath": "/
|
|
5299
|
+
"absolutePath": "/Users/corey/Leavitt-Innovations/dolomite-v2-protocol/contracts/protocol/lib/Decimal.sol",
|
|
5300
5300
|
"file": "../lib/Decimal.sol",
|
|
5301
5301
|
"id": 27382,
|
|
5302
5302
|
"nodeType": "ImportDirective",
|
|
@@ -5312,7 +5312,7 @@
|
|
|
5312
5312
|
"unitAlias": ""
|
|
5313
5313
|
},
|
|
5314
5314
|
{
|
|
5315
|
-
"absolutePath": "/
|
|
5315
|
+
"absolutePath": "/Users/corey/Leavitt-Innovations/dolomite-v2-protocol/contracts/protocol/lib/Interest.sol",
|
|
5316
5316
|
"file": "../lib/Interest.sol",
|
|
5317
5317
|
"id": 27384,
|
|
5318
5318
|
"nodeType": "ImportDirective",
|
|
@@ -5328,7 +5328,7 @@
|
|
|
5328
5328
|
"unitAlias": ""
|
|
5329
5329
|
},
|
|
5330
5330
|
{
|
|
5331
|
-
"absolutePath": "/
|
|
5331
|
+
"absolutePath": "/Users/corey/Leavitt-Innovations/dolomite-v2-protocol/contracts/protocol/lib/Monetary.sol",
|
|
5332
5332
|
"file": "../lib/Monetary.sol",
|
|
5333
5333
|
"id": 27386,
|
|
5334
5334
|
"nodeType": "ImportDirective",
|
|
@@ -5344,7 +5344,7 @@
|
|
|
5344
5344
|
"unitAlias": ""
|
|
5345
5345
|
},
|
|
5346
5346
|
{
|
|
5347
|
-
"absolutePath": "/
|
|
5347
|
+
"absolutePath": "/Users/corey/Leavitt-Innovations/dolomite-v2-protocol/contracts/protocol/lib/Storage.sol",
|
|
5348
5348
|
"file": "../lib/Storage.sol",
|
|
5349
5349
|
"id": 27388,
|
|
5350
5350
|
"nodeType": "ImportDirective",
|
|
@@ -5360,7 +5360,7 @@
|
|
|
5360
5360
|
"unitAlias": ""
|
|
5361
5361
|
},
|
|
5362
5362
|
{
|
|
5363
|
-
"absolutePath": "/
|
|
5363
|
+
"absolutePath": "/Users/corey/Leavitt-Innovations/dolomite-v2-protocol/contracts/protocol/lib/Types.sol",
|
|
5364
5364
|
"file": "../lib/Types.sol",
|
|
5365
5365
|
"id": 27390,
|
|
5366
5366
|
"nodeType": "ImportDirective",
|
|
@@ -8866,7 +8866,7 @@
|
|
|
8866
8866
|
},
|
|
8867
8867
|
"networks": {},
|
|
8868
8868
|
"schemaVersion": "3.0.23",
|
|
8869
|
-
"updatedAt": "2022-02-
|
|
8869
|
+
"updatedAt": "2022-02-07T07:18:45.246Z",
|
|
8870
8870
|
"devdoc": {
|
|
8871
8871
|
"methods": {
|
|
8872
8872
|
"getAccountBalances((address,uint256))": {
|
|
@@ -1876,7 +1876,7 @@
|
|
|
1876
1876
|
},
|
|
1877
1877
|
"networks": {},
|
|
1878
1878
|
"schemaVersion": "3.0.23",
|
|
1879
|
-
"updatedAt": "2022-02-
|
|
1879
|
+
"updatedAt": "2022-02-07T07:18:45.506Z",
|
|
1880
1880
|
"devdoc": {
|
|
1881
1881
|
"details": "Interface of the ERC20 standard as defined in the EIP. Does not include the optional functions; to access them see {ERC20Detailed}.",
|
|
1882
1882
|
"methods": {
|