@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
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"contractName": "Storage",
|
|
3
3
|
"abi": [],
|
|
4
|
-
"metadata": "{\"compiler\":{\"version\":\"0.5.16+commit.9c3226ce\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"author\":\"dYdX * Functions for reading, writing, and verifying state in DolomiteMargin\",\"methods\":{},\"title\":\"Storage\"},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"/
|
|
5
|
-
"bytecode": "
|
|
6
|
-
"deployedBytecode": "
|
|
4
|
+
"metadata": "{\"compiler\":{\"version\":\"0.5.16+commit.9c3226ce\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"author\":\"dYdX * Functions for reading, writing, and verifying state in DolomiteMargin\",\"methods\":{},\"title\":\"Storage\"},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"/Users/corey/Leavitt-Innovations/dolomite-v2-protocol/contracts/protocol/lib/Storage.sol\":\"Storage\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":10000},\"remappings\":[]},\"sources\":{\"/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/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}",
|
|
5
|
+
"bytecode": "0x60636023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea365627a7a72315820ccc29f0a73029f859a8ce50ed4f2ac59d049b55ffa94a7f3f5a52fda995e16706c6578706572696d656e74616cf564736f6c63430005100040",
|
|
6
|
+
"deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea365627a7a72315820ccc29f0a73029f859a8ce50ed4f2ac59d049b55ffa94a7f3f5a52fda995e16706c6578706572696d656e74616cf564736f6c63430005100040",
|
|
7
7
|
"sourceMap": "1529:24098:79:-;;132:2:-1;166:7;155:9;146:7;137:37;255:7;249:14;246:1;241:23;235:4;232:33;222:2;;269:9;222:2;293:9;290:1;283:20;323:4;314:7;306:22;347:7;338;331:24",
|
|
8
8
|
"deployedSourceMap": "1529:24098:79:-;;;;;;;;",
|
|
9
9
|
"source": "/*\n\n Copyright 2019 dYdX Trading Inc.\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.7;\npragma experimental ABIEncoderV2;\n\nimport { SafeMath } from \"@openzeppelin/contracts/math/SafeMath.sol\";\nimport { Account } from \"./Account.sol\";\nimport { Bits } from \"./Bits.sol\";\nimport { Cache } from \"./Cache.sol\";\nimport { Decimal } from \"./Decimal.sol\";\nimport { Interest } from \"./Interest.sol\";\nimport { EnumerableSet } from \"./EnumerableSet.sol\";\nimport { Math } from \"./Math.sol\";\nimport { Monetary } from \"./Monetary.sol\";\nimport { Require } from \"./Require.sol\";\nimport { Time } from \"./Time.sol\";\nimport { Token } from \"./Token.sol\";\nimport { Types } from \"./Types.sol\";\nimport { IERC20Detailed } from \"../interfaces/IERC20Detailed.sol\";\nimport { IInterestSetter } from \"../interfaces/IInterestSetter.sol\";\nimport { IPriceOracle } from \"../interfaces/IPriceOracle.sol\";\n\n\n/**\n * @title Storage\n * @author dYdX\n *\n * Functions for reading, writing, and verifying state in DolomiteMargin\n */\nlibrary Storage {\n using Cache for Cache.MarketCache;\n using Storage for Storage.State;\n using Math for uint256;\n using Types for Types.Par;\n using Types for Types.Wei;\n using SafeMath for uint256;\n using EnumerableSet for EnumerableSet.Set;\n\n // ============ Constants ============\n\n bytes32 internal constant FILE = \"Storage\";\n\n // ============ Structs ============\n\n // All information necessary for tracking a market\n struct Market {\n // Contract address of the associated ERC20 token\n address token;\n\n // Whether additional borrows are allowed for this market\n bool isClosing;\n\n // Whether this market can be removed and its ID can be recycled and reused\n bool isRecyclable;\n\n // Total aggregated supply and borrow amount of the entire market\n Types.TotalPar totalPar;\n\n // Interest index of the market\n Interest.Index index;\n\n // Contract address of the price oracle for this market\n IPriceOracle priceOracle;\n\n // Contract address of the interest setter for this market\n IInterestSetter interestSetter;\n\n // Multiplier on the marginRatio for this market, IE 5% (0.05 * 1e18). This number increases the market's\n // required collateralization by: reducing the user's supplied value (in terms of dollars) for this market and\n // increasing its borrowed value. This is done through the following operation:\n // `suppliedWei = suppliedWei + (assetValueForThisMarket / (1 + marginPremium))`\n // This number increases the user's borrowed wei by multiplying it by:\n // `borrowedWei = borrowedWei + (assetValueForThisMarket * (1 + marginPremium))`\n Decimal.D256 marginPremium;\n\n // Multiplier on the liquidationSpread for this market, IE 20% (0.2 * 1e18). This number increases the\n // `liquidationSpread` using the following formula:\n // `liquidationSpread = liquidationSpread * (1 + spreadPremium)`\n // NOTE: This formula is applied up to two times - one for each market whose spreadPremium is greater than 0\n // (when performing a liquidation between two markets)\n Decimal.D256 spreadPremium;\n }\n\n // The global risk parameters that govern the health and security of the system\n struct RiskParams {\n // Required ratio of over-collateralization\n Decimal.D256 marginRatio;\n\n // Percentage penalty incurred by liquidated accounts\n Decimal.D256 liquidationSpread;\n\n // Percentage of the borrower's interest fee that gets passed to the suppliers\n Decimal.D256 earningsRate;\n\n // The minimum absolute borrow value of an account\n // There must be sufficient incentivize to liquidate undercollateralized accounts\n Monetary.Value minBorrowedValue;\n }\n\n // The maximum RiskParam values that can be set\n struct RiskLimits {\n // The highest that the ratio can be for liquidating under-water accounts\n uint64 marginRatioMax;\n // The highest that the liquidation rewards can be when a liquidator liquidates an account\n uint64 liquidationSpreadMax;\n // The highest that the supply APR can be for a market, as a proportion of the borrow rate. Meaning, a rate of\n // 100% (1e18) would give suppliers all of the interest that borrowers are paying. A rate of 90% would give\n // suppliers 90% of the interest that borrowers pay.\n uint64 earningsRateMax;\n // The highest min margin ratio premium that can be applied to a particular market. Meaning, a value of 100%\n // (1e18) would require borrowers to maintain an extra 100% collateral to maintain a healthy margin ratio. This\n // value works by increasing the debt owed and decreasing the supply held for the particular market by this\n // amount, plus 1e18 (since a value of 10% needs to be applied as `decimal.plusOne`)\n uint64 marginPremiumMax;\n // The highest liquidation reward that can be applied to a particular market. This percentage is applied\n // in addition to the liquidation spread in `RiskParams`. Meaning a value of 1e18 is 100%. It is calculated as:\n // `liquidationSpread * Decimal.onePlus(spreadPremium)`\n uint64 spreadPremiumMax;\n uint128 minBorrowedValueMax;\n }\n\n // The entire storage state of DolomiteMargin\n struct State {\n // number of markets\n uint256 numMarkets;\n\n // marketId => Market\n mapping (uint256 => Market) markets;\n mapping (address => uint256) tokenToMarketId;\n mapping(uint256 => uint256) recycledMarketIds;\n\n // owner => account number => Account\n mapping (address => mapping (uint256 => Account.Storage)) accounts;\n\n // Addresses that can control other users accounts\n mapping (address => mapping (address => bool)) operators;\n\n // Addresses that can control all users accounts\n mapping (address => bool) globalOperators;\n\n // Addresses of auto traders that can only be called by global operators. IE for expirations\n mapping (address => bool) specialAutoTraders;\n\n // mutable risk parameters of the system\n RiskParams riskParams;\n\n // immutable risk limits of the system\n RiskLimits riskLimits;\n }\n\n // ============ Functions ============\n\n function getToken(\n Storage.State storage state,\n uint256 marketId\n )\n internal\n view\n returns (address)\n {\n return state.markets[marketId].token;\n }\n\n function getTotalPar(\n Storage.State storage state,\n uint256 marketId\n )\n internal\n view\n returns (Types.TotalPar memory)\n {\n return state.markets[marketId].totalPar;\n }\n\n function getIndex(\n Storage.State storage state,\n uint256 marketId\n )\n internal\n view\n returns (Interest.Index memory)\n {\n return state.markets[marketId].index;\n }\n\n function getNumExcessTokens(\n Storage.State storage state,\n uint256 marketId\n )\n internal\n view\n returns (Types.Wei memory)\n {\n Interest.Index memory index = state.getIndex(marketId);\n Types.TotalPar memory totalPar = state.getTotalPar(marketId);\n\n address token = state.getToken(marketId);\n\n Types.Wei memory balanceWei = Types.Wei({\n sign: true,\n value: IERC20Detailed(token).balanceOf(address(this))\n });\n\n (\n Types.Wei memory supplyWei,\n Types.Wei memory borrowWei\n ) = Interest.totalParToWei(totalPar, index);\n\n // borrowWei is negative, so subtracting it makes the value more positive\n return balanceWei.sub(borrowWei).sub(supplyWei);\n }\n\n function getStatus(\n Storage.State storage state,\n Account.Info memory account\n )\n internal\n view\n returns (Account.Status)\n {\n return state.accounts[account.owner][account.number].status;\n }\n\n function getPar(\n Storage.State storage state,\n Account.Info memory account,\n uint256 marketId\n )\n internal\n view\n returns (Types.Par memory)\n {\n return state.accounts[account.owner][account.number].balances[marketId];\n }\n\n function getWei(\n Storage.State storage state,\n Account.Info memory account,\n uint256 marketId\n )\n internal\n view\n returns (Types.Wei memory)\n {\n Types.Par memory par = state.getPar(account, marketId);\n\n if (par.isZero()) {\n return Types.zeroWei();\n }\n\n Interest.Index memory index = state.getIndex(marketId);\n return Interest.parToWei(par, index);\n }\n\n function getMarketsWithBalancesSet(\n Storage.State storage state,\n Account.Info memory account\n )\n internal\n view\n returns (EnumerableSet.Set storage)\n {\n return state.accounts[account.owner][account.number].marketsWithNonZeroBalanceSet;\n }\n\n function getMarketsWithBalances(\n Storage.State storage state,\n Account.Info memory account\n )\n internal\n view\n returns (uint256[] memory)\n {\n return state.accounts[account.owner][account.number].marketsWithNonZeroBalanceSet.values();\n }\n\n function getNumberOfMarketsWithBorrow(\n Storage.State storage state,\n Account.Info memory account\n )\n internal\n view\n returns (uint256)\n {\n return state.accounts[account.owner][account.number].numberOfMarketsWithBorrow;\n }\n\n function getLiquidationSpreadForPair(\n Storage.State storage state,\n uint256 heldMarketId,\n uint256 owedMarketId\n )\n internal\n view\n returns (Decimal.D256 memory)\n {\n uint256 result = state.riskParams.liquidationSpread.value;\n result = Decimal.mul(result, Decimal.onePlus(state.markets[heldMarketId].spreadPremium));\n result = Decimal.mul(result, Decimal.onePlus(state.markets[owedMarketId].spreadPremium));\n return Decimal.D256({\n value: result\n });\n }\n\n function fetchNewIndex(\n Storage.State storage state,\n uint256 marketId,\n Interest.Index memory index\n )\n internal\n view\n returns (Interest.Index memory)\n {\n Interest.Rate memory rate = state.fetchInterestRate(marketId, index);\n\n return Interest.calculateNewIndex(\n index,\n rate,\n state.getTotalPar(marketId),\n state.riskParams.earningsRate\n );\n }\n\n function fetchInterestRate(\n Storage.State storage state,\n uint256 marketId,\n Interest.Index memory index\n )\n internal\n view\n returns (Interest.Rate memory)\n {\n Types.TotalPar memory totalPar = state.getTotalPar(marketId);\n (\n Types.Wei memory supplyWei,\n Types.Wei memory borrowWei\n ) = Interest.totalParToWei(totalPar, index);\n\n Interest.Rate memory rate = state.markets[marketId].interestSetter.getInterestRate(\n state.getToken(marketId),\n borrowWei.value,\n supplyWei.value\n );\n\n return rate;\n }\n\n function fetchPrice(\n Storage.State storage state,\n uint256 marketId,\n address token\n )\n internal\n view\n returns (Monetary.Price memory)\n {\n IPriceOracle oracle = IPriceOracle(state.markets[marketId].priceOracle);\n Monetary.Price memory price = oracle.getPrice(token);\n Require.that(\n price.value != 0,\n FILE,\n \"Price cannot be zero\",\n marketId\n );\n return price;\n }\n\n function getAccountValues(\n Storage.State storage state,\n Account.Info memory account,\n Cache.MarketCache memory cache,\n bool adjustForLiquidity\n )\n internal\n view\n returns (Monetary.Value memory, Monetary.Value memory)\n {\n Monetary.Value memory supplyValue;\n Monetary.Value memory borrowValue;\n\n uint256 numMarkets = cache.getNumMarkets();\n for (uint256 i = 0; i < numMarkets; i++) {\n Types.Wei memory userWei = state.getWei(account, cache.getAtIndex(i).marketId);\n\n if (userWei.isZero()) {\n continue;\n }\n\n uint256 assetValue = userWei.value.mul(cache.getAtIndex(i).price.value);\n Decimal.D256 memory adjust = Decimal.one();\n if (adjustForLiquidity) {\n adjust = Decimal.onePlus(state.markets[cache.getAtIndex(i).marketId].marginPremium);\n }\n\n if (userWei.sign) {\n supplyValue.value = supplyValue.value.add(Decimal.div(assetValue, adjust));\n } else {\n borrowValue.value = borrowValue.value.add(Decimal.mul(assetValue, adjust));\n }\n }\n\n return (supplyValue, borrowValue);\n }\n\n function isCollateralized(\n Storage.State storage state,\n Account.Info memory account,\n Cache.MarketCache memory cache,\n bool requireMinBorrow\n )\n internal\n view\n returns (bool)\n {\n if (state.getNumberOfMarketsWithBorrow(account) == 0) {\n // The user does not have a balance with a borrow amount, so they must be collateralized\n return true;\n }\n\n // get account values (adjusted for liquidity)\n (\n Monetary.Value memory supplyValue,\n Monetary.Value memory borrowValue\n ) = state.getAccountValues(account, cache, /* adjustForLiquidity = */ true);\n\n if (borrowValue.value == 0) {\n return true;\n }\n\n if (requireMinBorrow) {\n Require.that(\n borrowValue.value >= state.riskParams.minBorrowedValue.value,\n FILE,\n \"Borrow value too low\",\n account.owner,\n account.number\n );\n }\n\n uint256 requiredMargin = Decimal.mul(borrowValue.value, state.riskParams.marginRatio);\n\n return supplyValue.value >= borrowValue.value.add(requiredMargin);\n }\n\n function isGlobalOperator(\n Storage.State storage state,\n address operator\n )\n internal\n view\n returns (bool)\n {\n return state.globalOperators[operator];\n }\n\n function isAutoTraderSpecial(\n Storage.State storage state,\n address autoTrader\n )\n internal\n view\n returns (bool)\n {\n return state.specialAutoTraders[autoTrader];\n }\n\n function isLocalOperator(\n Storage.State storage state,\n address owner,\n address operator\n )\n internal\n view\n returns (bool)\n {\n return state.operators[owner][operator];\n }\n\n function requireIsGlobalOperator(\n Storage.State storage state,\n address operator\n )\n internal\n view\n {\n bool isValidOperator = state.isGlobalOperator(operator);\n\n Require.that(\n isValidOperator,\n FILE,\n \"Unpermissioned global operator\",\n operator\n );\n }\n\n function requireIsOperator(\n Storage.State storage state,\n Account.Info memory account,\n address operator\n )\n internal\n view\n {\n bool isValidOperator =\n operator == account.owner\n || state.isGlobalOperator(operator)\n || state.isLocalOperator(account.owner, operator);\n\n Require.that(\n isValidOperator,\n FILE,\n \"Unpermissioned operator\",\n operator\n );\n }\n\n /**\n * Determine and set an account's balance based on the intended balance change. Return the\n * equivalent amount in wei\n */\n function getNewParAndDeltaWei(\n Storage.State storage state,\n Account.Info memory account,\n uint256 marketId,\n Types.AssetAmount memory amount\n )\n internal\n view\n returns (Types.Par memory, Types.Wei memory)\n {\n Types.Par memory oldPar = state.getPar(account, marketId);\n\n if (amount.value == 0 && amount.ref == Types.AssetReference.Delta) {\n return (oldPar, Types.zeroWei());\n }\n\n Interest.Index memory index = state.getIndex(marketId);\n Types.Wei memory oldWei = Interest.parToWei(oldPar, index);\n Types.Par memory newPar;\n Types.Wei memory deltaWei;\n\n if (amount.denomination == Types.AssetDenomination.Wei) {\n deltaWei = Types.Wei({\n sign: amount.sign,\n value: amount.value\n });\n if (amount.ref == Types.AssetReference.Target) {\n deltaWei = deltaWei.sub(oldWei);\n }\n newPar = Interest.weiToPar(oldWei.add(deltaWei), index);\n } else { // AssetDenomination.Par\n newPar = Types.Par({\n sign: amount.sign,\n value: amount.value.to128()\n });\n if (amount.ref == Types.AssetReference.Delta) {\n newPar = oldPar.add(newPar);\n }\n deltaWei = Interest.parToWei(newPar, index).sub(oldWei);\n }\n\n return (newPar, deltaWei);\n }\n\n function getNewParAndDeltaWeiForLiquidation(\n Storage.State storage state,\n Account.Info memory account,\n uint256 marketId,\n Types.AssetAmount memory amount\n )\n internal\n view\n returns (Types.Par memory, Types.Wei memory)\n {\n Types.Par memory oldPar = state.getPar(account, marketId);\n\n Require.that(\n !oldPar.isPositive(),\n FILE,\n \"Owed balance cannot be positive\",\n account.owner,\n account.number\n );\n\n (\n Types.Par memory newPar,\n Types.Wei memory deltaWei\n ) = state.getNewParAndDeltaWei(\n account,\n marketId,\n amount\n );\n\n // if attempting to over-repay the owed asset, bound it by the maximum\n if (newPar.isPositive()) {\n newPar = Types.zeroPar();\n deltaWei = state.getWei(account, marketId).negative();\n }\n\n Require.that(\n !deltaWei.isNegative() && oldPar.value >= newPar.value,\n FILE,\n \"Owed balance cannot increase\",\n account.owner,\n account.number\n );\n\n // if not paying back enough wei to repay any par, then bound wei to zero\n if (oldPar.equals(newPar)) {\n deltaWei = Types.zeroWei();\n }\n\n return (newPar, deltaWei);\n }\n\n function isVaporizable(\n Storage.State storage state,\n Account.Info memory account,\n Cache.MarketCache memory cache\n )\n internal\n view\n returns (bool)\n {\n bool hasNegative = false;\n uint256 numMarkets = cache.getNumMarkets();\n for (uint256 i = 0; i < numMarkets; i++) {\n Types.Par memory par = state.getPar(account, cache.getAtIndex(i).marketId);\n if (par.isZero()) {\n continue;\n } else if (par.sign) {\n return false;\n } else {\n hasNegative = true;\n }\n }\n return hasNegative;\n }\n\n // =============== Setter Functions ===============\n\n function updateIndex(\n Storage.State storage state,\n uint256 marketId\n )\n internal\n returns (Interest.Index memory)\n {\n Interest.Index memory index = state.getIndex(marketId);\n if (index.lastUpdate == Time.currentTime()) {\n return index;\n }\n return state.markets[marketId].index = state.fetchNewIndex(marketId, index);\n }\n\n function setStatus(\n Storage.State storage state,\n Account.Info memory account,\n Account.Status status\n )\n internal\n {\n state.accounts[account.owner][account.number].status = status;\n }\n\n function setPar(\n Storage.State storage state,\n Account.Info memory account,\n uint256 marketId,\n Types.Par memory newPar\n )\n internal\n {\n Types.Par memory oldPar = state.getPar(account, marketId);\n\n if (Types.equals(oldPar, newPar)) {\n // GUARD statement\n return;\n }\n\n // updateTotalPar\n Types.TotalPar memory totalPar = state.getTotalPar(marketId);\n\n // roll-back oldPar\n if (oldPar.sign) {\n totalPar.supply = uint256(totalPar.supply).sub(oldPar.value).to128();\n } else {\n totalPar.borrow = uint256(totalPar.borrow).sub(oldPar.value).to128();\n }\n\n // roll-forward newPar\n if (newPar.sign) {\n totalPar.supply = uint256(totalPar.supply).add(newPar.value).to128();\n } else {\n totalPar.borrow = uint256(totalPar.borrow).add(newPar.value).to128();\n }\n\n if (oldPar.isLessThanZero() && newPar.isGreaterThanOrEqualToZero()) {\n // user went from borrowing to repaying or positive\n state.accounts[account.owner][account.number].numberOfMarketsWithBorrow -= 1;\n } else if (oldPar.isGreaterThanOrEqualToZero() && newPar.isLessThanZero()) {\n // user went from zero or positive to borrowing\n state.accounts[account.owner][account.number].numberOfMarketsWithBorrow += 1;\n }\n\n if (newPar.isZero() && (!oldPar.isZero())) {\n // User went from a non-zero balance to zero. Remove the market from the set.\n state.accounts[account.owner][account.number].marketsWithNonZeroBalanceSet.remove(marketId);\n } else if ((!newPar.isZero()) && oldPar.isZero()) {\n // User went from zero to non-zero. Add the market to the set.\n state.accounts[account.owner][account.number].marketsWithNonZeroBalanceSet.add(marketId);\n }\n\n state.markets[marketId].totalPar = totalPar;\n state.accounts[account.owner][account.number].balances[marketId] = newPar;\n }\n\n /**\n * Determine and set an account's balance based on a change in wei\n */\n function setParFromDeltaWei(\n Storage.State storage state,\n Account.Info memory account,\n uint256 marketId,\n Types.Wei memory deltaWei\n )\n internal\n {\n if (deltaWei.isZero()) {\n return;\n }\n Interest.Index memory index = state.getIndex(marketId);\n Types.Wei memory oldWei = state.getWei(account, marketId);\n Types.Wei memory newWei = oldWei.add(deltaWei);\n Types.Par memory newPar = Interest.weiToPar(newWei, index);\n state.setPar(\n account,\n marketId,\n newPar\n );\n }\n\n function initializeCache(\n Storage.State storage state,\n Cache.MarketCache memory cache\n ) internal view {\n cache.markets = new Cache.MarketInfo[](cache.marketsLength);\n uint counter = 0;\n\n // Really neat byproduct of iterating through a bitmap using the least significant bit, where each set flag\n // represents the marketId, --> the initialized `cache.markets` array is sorted in O(n)!!!!!!\n // Meaning, this function call is O(n) where `n` is the number of markets in the cache\n for (uint i = 0; i < cache.marketBitmaps.length; i++) {\n uint bitmap = cache.marketBitmaps[i];\n while (bitmap != 0) {\n uint nextSetBit = Bits.getLeastSignificantBit(bitmap);\n uint marketId = Bits.getMarketIdFromBit(i, nextSetBit);\n address token = state.getToken(marketId);\n if (state.markets[marketId].isClosing) {\n cache.markets[counter++] = Cache.MarketInfo({\n marketId: marketId,\n token: token,\n isClosing: true,\n borrowPar: state.getTotalPar(marketId).borrow,\n price: state.fetchPrice(marketId, token)\n });\n } else {\n // don't need the borrowPar if the market is not closing\n cache.markets[counter++] = Cache.MarketInfo({\n marketId: marketId,\n token: token,\n isClosing: false,\n borrowPar: 0,\n price: state.fetchPrice(marketId, token)\n });\n }\n\n // unset the set bit\n bitmap = Bits.unsetBit(bitmap, nextSetBit);\n }\n if (counter == cache.marketsLength) {\n break;\n }\n }\n\n Require.that(\n cache.marketsLength == counter,\n FILE,\n \"cache initialized improperly\",\n cache.marketsLength,\n cache.markets.length\n );\n }\n}\n",
|
|
10
|
-
"sourcePath": "/
|
|
10
|
+
"sourcePath": "/Users/corey/Leavitt-Innovations/dolomite-v2-protocol/contracts/protocol/lib/Storage.sol",
|
|
11
11
|
"ast": {
|
|
12
|
-
"absolutePath": "/
|
|
12
|
+
"absolutePath": "/Users/corey/Leavitt-Innovations/dolomite-v2-protocol/contracts/protocol/lib/Storage.sol",
|
|
13
13
|
"exportedSymbols": {
|
|
14
14
|
"Storage": [
|
|
15
15
|
33379
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"unitAlias": ""
|
|
56
56
|
},
|
|
57
57
|
{
|
|
58
|
-
"absolutePath": "/
|
|
58
|
+
"absolutePath": "/Users/corey/Leavitt-Innovations/dolomite-v2-protocol/contracts/protocol/lib/Account.sol",
|
|
59
59
|
"file": "./Account.sol",
|
|
60
60
|
"id": 31598,
|
|
61
61
|
"nodeType": "ImportDirective",
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
"unitAlias": ""
|
|
72
72
|
},
|
|
73
73
|
{
|
|
74
|
-
"absolutePath": "/
|
|
74
|
+
"absolutePath": "/Users/corey/Leavitt-Innovations/dolomite-v2-protocol/contracts/protocol/lib/Bits.sol",
|
|
75
75
|
"file": "./Bits.sol",
|
|
76
76
|
"id": 31600,
|
|
77
77
|
"nodeType": "ImportDirective",
|
|
@@ -87,7 +87,7 @@
|
|
|
87
87
|
"unitAlias": ""
|
|
88
88
|
},
|
|
89
89
|
{
|
|
90
|
-
"absolutePath": "/
|
|
90
|
+
"absolutePath": "/Users/corey/Leavitt-Innovations/dolomite-v2-protocol/contracts/protocol/lib/Cache.sol",
|
|
91
91
|
"file": "./Cache.sol",
|
|
92
92
|
"id": 31602,
|
|
93
93
|
"nodeType": "ImportDirective",
|
|
@@ -103,7 +103,7 @@
|
|
|
103
103
|
"unitAlias": ""
|
|
104
104
|
},
|
|
105
105
|
{
|
|
106
|
-
"absolutePath": "/
|
|
106
|
+
"absolutePath": "/Users/corey/Leavitt-Innovations/dolomite-v2-protocol/contracts/protocol/lib/Decimal.sol",
|
|
107
107
|
"file": "./Decimal.sol",
|
|
108
108
|
"id": 31604,
|
|
109
109
|
"nodeType": "ImportDirective",
|
|
@@ -119,7 +119,7 @@
|
|
|
119
119
|
"unitAlias": ""
|
|
120
120
|
},
|
|
121
121
|
{
|
|
122
|
-
"absolutePath": "/
|
|
122
|
+
"absolutePath": "/Users/corey/Leavitt-Innovations/dolomite-v2-protocol/contracts/protocol/lib/Interest.sol",
|
|
123
123
|
"file": "./Interest.sol",
|
|
124
124
|
"id": 31606,
|
|
125
125
|
"nodeType": "ImportDirective",
|
|
@@ -135,7 +135,7 @@
|
|
|
135
135
|
"unitAlias": ""
|
|
136
136
|
},
|
|
137
137
|
{
|
|
138
|
-
"absolutePath": "/
|
|
138
|
+
"absolutePath": "/Users/corey/Leavitt-Innovations/dolomite-v2-protocol/contracts/protocol/lib/EnumerableSet.sol",
|
|
139
139
|
"file": "./EnumerableSet.sol",
|
|
140
140
|
"id": 31608,
|
|
141
141
|
"nodeType": "ImportDirective",
|
|
@@ -151,7 +151,7 @@
|
|
|
151
151
|
"unitAlias": ""
|
|
152
152
|
},
|
|
153
153
|
{
|
|
154
|
-
"absolutePath": "/
|
|
154
|
+
"absolutePath": "/Users/corey/Leavitt-Innovations/dolomite-v2-protocol/contracts/protocol/lib/Math.sol",
|
|
155
155
|
"file": "./Math.sol",
|
|
156
156
|
"id": 31610,
|
|
157
157
|
"nodeType": "ImportDirective",
|
|
@@ -167,7 +167,7 @@
|
|
|
167
167
|
"unitAlias": ""
|
|
168
168
|
},
|
|
169
169
|
{
|
|
170
|
-
"absolutePath": "/
|
|
170
|
+
"absolutePath": "/Users/corey/Leavitt-Innovations/dolomite-v2-protocol/contracts/protocol/lib/Monetary.sol",
|
|
171
171
|
"file": "./Monetary.sol",
|
|
172
172
|
"id": 31612,
|
|
173
173
|
"nodeType": "ImportDirective",
|
|
@@ -183,7 +183,7 @@
|
|
|
183
183
|
"unitAlias": ""
|
|
184
184
|
},
|
|
185
185
|
{
|
|
186
|
-
"absolutePath": "/
|
|
186
|
+
"absolutePath": "/Users/corey/Leavitt-Innovations/dolomite-v2-protocol/contracts/protocol/lib/Require.sol",
|
|
187
187
|
"file": "./Require.sol",
|
|
188
188
|
"id": 31614,
|
|
189
189
|
"nodeType": "ImportDirective",
|
|
@@ -199,7 +199,7 @@
|
|
|
199
199
|
"unitAlias": ""
|
|
200
200
|
},
|
|
201
201
|
{
|
|
202
|
-
"absolutePath": "/
|
|
202
|
+
"absolutePath": "/Users/corey/Leavitt-Innovations/dolomite-v2-protocol/contracts/protocol/lib/Time.sol",
|
|
203
203
|
"file": "./Time.sol",
|
|
204
204
|
"id": 31616,
|
|
205
205
|
"nodeType": "ImportDirective",
|
|
@@ -215,7 +215,7 @@
|
|
|
215
215
|
"unitAlias": ""
|
|
216
216
|
},
|
|
217
217
|
{
|
|
218
|
-
"absolutePath": "/
|
|
218
|
+
"absolutePath": "/Users/corey/Leavitt-Innovations/dolomite-v2-protocol/contracts/protocol/lib/Token.sol",
|
|
219
219
|
"file": "./Token.sol",
|
|
220
220
|
"id": 31618,
|
|
221
221
|
"nodeType": "ImportDirective",
|
|
@@ -231,7 +231,7 @@
|
|
|
231
231
|
"unitAlias": ""
|
|
232
232
|
},
|
|
233
233
|
{
|
|
234
|
-
"absolutePath": "/
|
|
234
|
+
"absolutePath": "/Users/corey/Leavitt-Innovations/dolomite-v2-protocol/contracts/protocol/lib/Types.sol",
|
|
235
235
|
"file": "./Types.sol",
|
|
236
236
|
"id": 31620,
|
|
237
237
|
"nodeType": "ImportDirective",
|
|
@@ -247,7 +247,7 @@
|
|
|
247
247
|
"unitAlias": ""
|
|
248
248
|
},
|
|
249
249
|
{
|
|
250
|
-
"absolutePath": "/
|
|
250
|
+
"absolutePath": "/Users/corey/Leavitt-Innovations/dolomite-v2-protocol/contracts/protocol/interfaces/IERC20Detailed.sol",
|
|
251
251
|
"file": "../interfaces/IERC20Detailed.sol",
|
|
252
252
|
"id": 31622,
|
|
253
253
|
"nodeType": "ImportDirective",
|
|
@@ -263,7 +263,7 @@
|
|
|
263
263
|
"unitAlias": ""
|
|
264
264
|
},
|
|
265
265
|
{
|
|
266
|
-
"absolutePath": "/
|
|
266
|
+
"absolutePath": "/Users/corey/Leavitt-Innovations/dolomite-v2-protocol/contracts/protocol/interfaces/IInterestSetter.sol",
|
|
267
267
|
"file": "../interfaces/IInterestSetter.sol",
|
|
268
268
|
"id": 31624,
|
|
269
269
|
"nodeType": "ImportDirective",
|
|
@@ -279,7 +279,7 @@
|
|
|
279
279
|
"unitAlias": ""
|
|
280
280
|
},
|
|
281
281
|
{
|
|
282
|
-
"absolutePath": "/
|
|
282
|
+
"absolutePath": "/Users/corey/Leavitt-Innovations/dolomite-v2-protocol/contracts/protocol/interfaces/IPriceOracle.sol",
|
|
283
283
|
"file": "../interfaces/IPriceOracle.sol",
|
|
284
284
|
"id": 31626,
|
|
285
285
|
"nodeType": "ImportDirective",
|
|
@@ -23147,7 +23147,7 @@
|
|
|
23147
23147
|
"src": "603:25025:79"
|
|
23148
23148
|
},
|
|
23149
23149
|
"legacyAST": {
|
|
23150
|
-
"absolutePath": "/
|
|
23150
|
+
"absolutePath": "/Users/corey/Leavitt-Innovations/dolomite-v2-protocol/contracts/protocol/lib/Storage.sol",
|
|
23151
23151
|
"exportedSymbols": {
|
|
23152
23152
|
"Storage": [
|
|
23153
23153
|
33379
|
|
@@ -23193,7 +23193,7 @@
|
|
|
23193
23193
|
"unitAlias": ""
|
|
23194
23194
|
},
|
|
23195
23195
|
{
|
|
23196
|
-
"absolutePath": "/
|
|
23196
|
+
"absolutePath": "/Users/corey/Leavitt-Innovations/dolomite-v2-protocol/contracts/protocol/lib/Account.sol",
|
|
23197
23197
|
"file": "./Account.sol",
|
|
23198
23198
|
"id": 31598,
|
|
23199
23199
|
"nodeType": "ImportDirective",
|
|
@@ -23209,7 +23209,7 @@
|
|
|
23209
23209
|
"unitAlias": ""
|
|
23210
23210
|
},
|
|
23211
23211
|
{
|
|
23212
|
-
"absolutePath": "/
|
|
23212
|
+
"absolutePath": "/Users/corey/Leavitt-Innovations/dolomite-v2-protocol/contracts/protocol/lib/Bits.sol",
|
|
23213
23213
|
"file": "./Bits.sol",
|
|
23214
23214
|
"id": 31600,
|
|
23215
23215
|
"nodeType": "ImportDirective",
|
|
@@ -23225,7 +23225,7 @@
|
|
|
23225
23225
|
"unitAlias": ""
|
|
23226
23226
|
},
|
|
23227
23227
|
{
|
|
23228
|
-
"absolutePath": "/
|
|
23228
|
+
"absolutePath": "/Users/corey/Leavitt-Innovations/dolomite-v2-protocol/contracts/protocol/lib/Cache.sol",
|
|
23229
23229
|
"file": "./Cache.sol",
|
|
23230
23230
|
"id": 31602,
|
|
23231
23231
|
"nodeType": "ImportDirective",
|
|
@@ -23241,7 +23241,7 @@
|
|
|
23241
23241
|
"unitAlias": ""
|
|
23242
23242
|
},
|
|
23243
23243
|
{
|
|
23244
|
-
"absolutePath": "/
|
|
23244
|
+
"absolutePath": "/Users/corey/Leavitt-Innovations/dolomite-v2-protocol/contracts/protocol/lib/Decimal.sol",
|
|
23245
23245
|
"file": "./Decimal.sol",
|
|
23246
23246
|
"id": 31604,
|
|
23247
23247
|
"nodeType": "ImportDirective",
|
|
@@ -23257,7 +23257,7 @@
|
|
|
23257
23257
|
"unitAlias": ""
|
|
23258
23258
|
},
|
|
23259
23259
|
{
|
|
23260
|
-
"absolutePath": "/
|
|
23260
|
+
"absolutePath": "/Users/corey/Leavitt-Innovations/dolomite-v2-protocol/contracts/protocol/lib/Interest.sol",
|
|
23261
23261
|
"file": "./Interest.sol",
|
|
23262
23262
|
"id": 31606,
|
|
23263
23263
|
"nodeType": "ImportDirective",
|
|
@@ -23273,7 +23273,7 @@
|
|
|
23273
23273
|
"unitAlias": ""
|
|
23274
23274
|
},
|
|
23275
23275
|
{
|
|
23276
|
-
"absolutePath": "/
|
|
23276
|
+
"absolutePath": "/Users/corey/Leavitt-Innovations/dolomite-v2-protocol/contracts/protocol/lib/EnumerableSet.sol",
|
|
23277
23277
|
"file": "./EnumerableSet.sol",
|
|
23278
23278
|
"id": 31608,
|
|
23279
23279
|
"nodeType": "ImportDirective",
|
|
@@ -23289,7 +23289,7 @@
|
|
|
23289
23289
|
"unitAlias": ""
|
|
23290
23290
|
},
|
|
23291
23291
|
{
|
|
23292
|
-
"absolutePath": "/
|
|
23292
|
+
"absolutePath": "/Users/corey/Leavitt-Innovations/dolomite-v2-protocol/contracts/protocol/lib/Math.sol",
|
|
23293
23293
|
"file": "./Math.sol",
|
|
23294
23294
|
"id": 31610,
|
|
23295
23295
|
"nodeType": "ImportDirective",
|
|
@@ -23305,7 +23305,7 @@
|
|
|
23305
23305
|
"unitAlias": ""
|
|
23306
23306
|
},
|
|
23307
23307
|
{
|
|
23308
|
-
"absolutePath": "/
|
|
23308
|
+
"absolutePath": "/Users/corey/Leavitt-Innovations/dolomite-v2-protocol/contracts/protocol/lib/Monetary.sol",
|
|
23309
23309
|
"file": "./Monetary.sol",
|
|
23310
23310
|
"id": 31612,
|
|
23311
23311
|
"nodeType": "ImportDirective",
|
|
@@ -23321,7 +23321,7 @@
|
|
|
23321
23321
|
"unitAlias": ""
|
|
23322
23322
|
},
|
|
23323
23323
|
{
|
|
23324
|
-
"absolutePath": "/
|
|
23324
|
+
"absolutePath": "/Users/corey/Leavitt-Innovations/dolomite-v2-protocol/contracts/protocol/lib/Require.sol",
|
|
23325
23325
|
"file": "./Require.sol",
|
|
23326
23326
|
"id": 31614,
|
|
23327
23327
|
"nodeType": "ImportDirective",
|
|
@@ -23337,7 +23337,7 @@
|
|
|
23337
23337
|
"unitAlias": ""
|
|
23338
23338
|
},
|
|
23339
23339
|
{
|
|
23340
|
-
"absolutePath": "/
|
|
23340
|
+
"absolutePath": "/Users/corey/Leavitt-Innovations/dolomite-v2-protocol/contracts/protocol/lib/Time.sol",
|
|
23341
23341
|
"file": "./Time.sol",
|
|
23342
23342
|
"id": 31616,
|
|
23343
23343
|
"nodeType": "ImportDirective",
|
|
@@ -23353,7 +23353,7 @@
|
|
|
23353
23353
|
"unitAlias": ""
|
|
23354
23354
|
},
|
|
23355
23355
|
{
|
|
23356
|
-
"absolutePath": "/
|
|
23356
|
+
"absolutePath": "/Users/corey/Leavitt-Innovations/dolomite-v2-protocol/contracts/protocol/lib/Token.sol",
|
|
23357
23357
|
"file": "./Token.sol",
|
|
23358
23358
|
"id": 31618,
|
|
23359
23359
|
"nodeType": "ImportDirective",
|
|
@@ -23369,7 +23369,7 @@
|
|
|
23369
23369
|
"unitAlias": ""
|
|
23370
23370
|
},
|
|
23371
23371
|
{
|
|
23372
|
-
"absolutePath": "/
|
|
23372
|
+
"absolutePath": "/Users/corey/Leavitt-Innovations/dolomite-v2-protocol/contracts/protocol/lib/Types.sol",
|
|
23373
23373
|
"file": "./Types.sol",
|
|
23374
23374
|
"id": 31620,
|
|
23375
23375
|
"nodeType": "ImportDirective",
|
|
@@ -23385,7 +23385,7 @@
|
|
|
23385
23385
|
"unitAlias": ""
|
|
23386
23386
|
},
|
|
23387
23387
|
{
|
|
23388
|
-
"absolutePath": "/
|
|
23388
|
+
"absolutePath": "/Users/corey/Leavitt-Innovations/dolomite-v2-protocol/contracts/protocol/interfaces/IERC20Detailed.sol",
|
|
23389
23389
|
"file": "../interfaces/IERC20Detailed.sol",
|
|
23390
23390
|
"id": 31622,
|
|
23391
23391
|
"nodeType": "ImportDirective",
|
|
@@ -23401,7 +23401,7 @@
|
|
|
23401
23401
|
"unitAlias": ""
|
|
23402
23402
|
},
|
|
23403
23403
|
{
|
|
23404
|
-
"absolutePath": "/
|
|
23404
|
+
"absolutePath": "/Users/corey/Leavitt-Innovations/dolomite-v2-protocol/contracts/protocol/interfaces/IInterestSetter.sol",
|
|
23405
23405
|
"file": "../interfaces/IInterestSetter.sol",
|
|
23406
23406
|
"id": 31624,
|
|
23407
23407
|
"nodeType": "ImportDirective",
|
|
@@ -23417,7 +23417,7 @@
|
|
|
23417
23417
|
"unitAlias": ""
|
|
23418
23418
|
},
|
|
23419
23419
|
{
|
|
23420
|
-
"absolutePath": "/
|
|
23420
|
+
"absolutePath": "/Users/corey/Leavitt-Innovations/dolomite-v2-protocol/contracts/protocol/interfaces/IPriceOracle.sol",
|
|
23421
23421
|
"file": "../interfaces/IPriceOracle.sol",
|
|
23422
23422
|
"id": 31626,
|
|
23423
23423
|
"nodeType": "ImportDirective",
|
|
@@ -46290,7 +46290,7 @@
|
|
|
46290
46290
|
},
|
|
46291
46291
|
"networks": {},
|
|
46292
46292
|
"schemaVersion": "3.0.23",
|
|
46293
|
-
"updatedAt": "2022-02-
|
|
46293
|
+
"updatedAt": "2022-02-07T07:18:45.350Z",
|
|
46294
46294
|
"devdoc": {
|
|
46295
46295
|
"author": "dYdX * Functions for reading, writing, and verifying state in DolomiteMargin",
|
|
46296
46296
|
"methods": {},
|