{
  "contractName": "BorrowPositionProxyV1",
  "abi": [
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "dolomiteMargin",
          "type": "address"
        }
      ],
      "payable": false,
      "stateMutability": "nonpayable",
      "type": "constructor"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": true,
          "internalType": "address",
          "name": "_borrower",
          "type": "address"
        },
        {
          "indexed": true,
          "internalType": "uint256",
          "name": "_borrowAccountNumber",
          "type": "uint256"
        }
      ],
      "name": "BorrowPositionOpen",
      "type": "event"
    },
    {
      "constant": true,
      "inputs": [],
      "name": "DOLOMITE_MARGIN",
      "outputs": [
        {
          "internalType": "contract IDolomiteMargin",
          "name": "",
          "type": "address"
        }
      ],
      "payable": false,
      "stateMutability": "view",
      "type": "function"
    },
    {
      "constant": false,
      "inputs": [
        {
          "internalType": "uint256",
          "name": "_fromAccountNumber",
          "type": "uint256"
        },
        {
          "internalType": "uint256",
          "name": "_toAccountNumber",
          "type": "uint256"
        },
        {
          "internalType": "uint256",
          "name": "_marketId",
          "type": "uint256"
        },
        {
          "internalType": "uint256",
          "name": "_amountWei",
          "type": "uint256"
        },
        {
          "internalType": "enum AccountBalanceLib.BalanceCheckFlag",
          "name": "_balanceCheckFlag",
          "type": "uint8"
        }
      ],
      "name": "openBorrowPosition",
      "outputs": [],
      "payable": false,
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "constant": false,
      "inputs": [
        {
          "internalType": "uint256",
          "name": "_borrowAccountNumber",
          "type": "uint256"
        },
        {
          "internalType": "uint256",
          "name": "_toAccountNumber",
          "type": "uint256"
        },
        {
          "internalType": "uint256[]",
          "name": "_collateralMarketIds",
          "type": "uint256[]"
        }
      ],
      "name": "closeBorrowPosition",
      "outputs": [],
      "payable": false,
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "constant": false,
      "inputs": [
        {
          "internalType": "uint256",
          "name": "_fromAccountNumber",
          "type": "uint256"
        },
        {
          "internalType": "uint256",
          "name": "_toAccountNumber",
          "type": "uint256"
        },
        {
          "internalType": "uint256",
          "name": "_marketId",
          "type": "uint256"
        },
        {
          "internalType": "uint256",
          "name": "_amountWei",
          "type": "uint256"
        },
        {
          "internalType": "enum AccountBalanceLib.BalanceCheckFlag",
          "name": "_balanceCheckFlag",
          "type": "uint8"
        }
      ],
      "name": "transferBetweenAccounts",
      "outputs": [],
      "payable": false,
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "constant": false,
      "inputs": [
        {
          "internalType": "uint256",
          "name": "_fromAccountNumber",
          "type": "uint256"
        },
        {
          "internalType": "uint256",
          "name": "_borrowAccountNumber",
          "type": "uint256"
        },
        {
          "internalType": "uint256",
          "name": "_marketId",
          "type": "uint256"
        },
        {
          "internalType": "enum AccountBalanceLib.BalanceCheckFlag",
          "name": "_balanceCheckFlag",
          "type": "uint8"
        }
      ],
      "name": "repayAllForBorrowPosition",
      "outputs": [],
      "payable": false,
      "stateMutability": "nonpayable",
      "type": "function"
    }
  ],
  "metadata": "{\"compiler\":{\"version\":\"0.5.16+commit.9c3226ce\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"dolomiteMargin\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_borrower\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_borrowAccountNumber\",\"type\":\"uint256\"}],\"name\":\"BorrowPositionOpen\",\"type\":\"event\"},{\"constant\":true,\"inputs\":[],\"name\":\"DOLOMITE_MARGIN\",\"outputs\":[{\"internalType\":\"contract IDolomiteMargin\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_borrowAccountNumber\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_toAccountNumber\",\"type\":\"uint256\"},{\"internalType\":\"uint256[]\",\"name\":\"_collateralMarketIds\",\"type\":\"uint256[]\"}],\"name\":\"closeBorrowPosition\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_fromAccountNumber\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_toAccountNumber\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_marketId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_amountWei\",\"type\":\"uint256\"},{\"internalType\":\"enum AccountBalanceLib.BalanceCheckFlag\",\"name\":\"_balanceCheckFlag\",\"type\":\"uint8\"}],\"name\":\"openBorrowPosition\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_fromAccountNumber\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_borrowAccountNumber\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_marketId\",\"type\":\"uint256\"},{\"internalType\":\"enum AccountBalanceLib.BalanceCheckFlag\",\"name\":\"_balanceCheckFlag\",\"type\":\"uint8\"}],\"name\":\"repayAllForBorrowPosition\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_fromAccountNumber\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_toAccountNumber\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_marketId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_amountWei\",\"type\":\"uint256\"},{\"internalType\":\"enum AccountBalanceLib.BalanceCheckFlag\",\"name\":\"_balanceCheckFlag\",\"type\":\"uint8\"}],\"name\":\"transferBetweenAccounts\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Dolomite\",\"details\":\"Proxy contract for opening borrow positions. This makes indexing easier and lowers gas costs on Arbitrum by     minimizing call data\",\"methods\":{},\"title\":\"BorrowPositionProxyV1\"},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"/home/cdc218/projects/dolomite-protocol-v2/contracts/external/proxies/BorrowPositionProxyV1.sol\":\"BorrowPositionProxyV1\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":10000},\"remappings\":[]},\"sources\":{\"/home/cdc218/projects/dolomite-protocol-v2/contracts/external/helpers/OnlyDolomiteMargin.sol\":{\"keccak256\":\"0xe40babc0a6dd2a767d76f3e0f0a22de124c4c480f2b2227a7b924b44e57526ea\",\"urls\":[\"bzz-raw://458f7f1f16eacd4faae597090503dc1e58446e9d371640c77b2e01e3e3113f17\",\"dweb:/ipfs/QmXqTG4sWJeDh5XA286KarbqHT4qJ7m3dphS16enpqtQiX\"]},\"/home/cdc218/projects/dolomite-protocol-v2/contracts/external/interfaces/IBorrowPositionProxyV1.sol\":{\"keccak256\":\"0x10ff4ee867126adf828ef826ceb76cd6f7c4421a1920972f8977563eb56cbbf2\",\"urls\":[\"bzz-raw://a9ead491560e582901ca7e4a9e5901d4809a5f4e2214ee345a35b67f7283c1f9\",\"dweb:/ipfs/QmRFcWG4GdTLwFCdan2qhyWwHLEHXrMphQEbU7qDdHz77q\"]},\"/home/cdc218/projects/dolomite-protocol-v2/contracts/external/interfaces/IExpiry.sol\":{\"keccak256\":\"0xa7b197139e570e823cab42c3b8500c9c5edc8a40110970a7d6fe60f05864ba10\",\"urls\":[\"bzz-raw://4f469be063d8f694c5277650bc53ac2c0d164f62e36c6a9ab7dad126479990a9\",\"dweb:/ipfs/Qme4sTbGi4T2QhsJSweqGzqm5rxQkypy27g1vLy8ipVijV\"]},\"/home/cdc218/projects/dolomite-protocol-v2/contracts/external/lib/AccountActionLib.sol\":{\"keccak256\":\"0x5488dd7eae5ce96e479445f19301d9dd44d292a2d6739b9da1fe948eeb41edc4\",\"urls\":[\"bzz-raw://06977e07aea4d893db696173f3ee01a84008770c4e0d81fb5eb82af3a597ceaa\",\"dweb:/ipfs/QmYiH8CsXEbHypJ2gN31LnZv2tfzd2RBuSKoRgx2EbBw26\"]},\"/home/cdc218/projects/dolomite-protocol-v2/contracts/external/lib/AccountBalanceLib.sol\":{\"keccak256\":\"0x76fd16d615fe7cfceaf775b4e6524fd0462606c802b082498c768a7a4ca01a20\",\"urls\":[\"bzz-raw://56068145e300cde1c77c22e38cb753378abf2f0d4613dcb203e33ff101f169e2\",\"dweb:/ipfs/QmXvMzr9n7vzMHdUPgnc58KX4mrbQAqkq4kDETaj5Y55ZY\"]},\"/home/cdc218/projects/dolomite-protocol-v2/contracts/external/proxies/BorrowPositionProxyV1.sol\":{\"keccak256\":\"0xf9b1ac2a1d35ca50e9c1cef4e5562d0f7f8beb484eca37a06337673fcc09e7ae\",\"urls\":[\"bzz-raw://0b9b3711b80aa310f66d10a1db3ad529083438f3aa4cb13acd984bd3f42a5beb\",\"dweb:/ipfs/QmZQ3JjxQcR3nvmnwc9f3iWq8kXDkFewHWYkfjM3TurJ6W\"]},\"/home/cdc218/projects/dolomite-protocol-v2/contracts/protocol/interfaces/IAccountRiskOverrideSetter.sol\":{\"keccak256\":\"0x5b9fde139ddfdaae7b650b3c3f6699e0e44605f0d9d3daadc1622eb06ad4c3f8\",\"urls\":[\"bzz-raw://2dfd5af24b6de63f94519c99fd8777a264d7cd11266fa2d525c7d72d96a9c7cf\",\"dweb:/ipfs/QmPg9fjhbnmBayZMh6yTG79xsK1PWSoAHA5pfwSXfnKKjF\"]},\"/home/cdc218/projects/dolomite-protocol-v2/contracts/protocol/interfaces/IDolomiteMargin.sol\":{\"keccak256\":\"0x7e86ed1ed04dc205245db9f4e7cf7cca60c3bfc46c57ade8129a463780647967\",\"urls\":[\"bzz-raw://f8fbd85afd334c12bdccbb6523ebea9172b27b7b4b132c4a48b4b4dd03ceeb2b\",\"dweb:/ipfs/QmU1srfSqBTz3kw7oz1KEzfTUJvphZiE4K8MRZcy9uJjv1\"]},\"/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/IOracleSentinel.sol\":{\"keccak256\":\"0xa94499fda55ef112640daed2cb1d06062e72c51c7b925c323b4e0ffa9b456ce5\",\"urls\":[\"bzz-raw://18b4a16acac577590a57f34f7ec6583e3cb35f575c948abb928b308d29cac1ab\",\"dweb:/ipfs/QmR1jLkzj6w7SjrdZ7GVW4V2vofSdMJwzjTqKpeUKABvxu\"]},\"/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\":\"0x2059276ea5e478bd5ac7f2712e7b1b6c85d291c647a54b264909044844828e67\",\"urls\":[\"bzz-raw://f153777051d12131b13a57e5c3af10a2670927cfc7d22c9519ab20c9b4b9bc89\",\"dweb:/ipfs/QmQMP3qS5xDAVGYKDfNkbkSqBKozQGQsGqX4e8VyjRtxPS\"]},\"/home/cdc218/projects/dolomite-protocol-v2/contracts/protocol/lib/Actions.sol\":{\"keccak256\":\"0x7b2fcf441c034952dd042b6c8b20b148359db771e7c9ac07d06369560a9f0301\",\"urls\":[\"bzz-raw://84665ee4a780360fe6160d197ba98f0bf0ab0d7c6ad87bfed6226bf2f88d8d30\",\"dweb:/ipfs/QmRDfRdAd8hSXeu4SAeeYKkKoXBhStu7n4uReYBce2JD5Z\"]},\"/home/cdc218/projects/dolomite-protocol-v2/contracts/protocol/lib/Bits.sol\":{\"keccak256\":\"0x6d9a641163b2dd25e648c65f5d9e4949a57938e29ddc4c9dddefd74a9964aeef\",\"urls\":[\"bzz-raw://67e5a04ed4055faafbc100d6ccca9c54448ed378a1a8c71171562edda7bcbf7c\",\"dweb:/ipfs/QmYRikK3Xbgiq3UBJkgoo2zNUSSrShVabpRHmQj6iQHhrc\"]},\"/home/cdc218/projects/dolomite-protocol-v2/contracts/protocol/lib/Cache.sol\":{\"keccak256\":\"0xe57c80a7621a77fcb2acb9f883fb5248e71a6dce03bc2db56df0db3fee332950\",\"urls\":[\"bzz-raw://28e221c04629674490b9a0041d4f9a5f15e669dc0cc192a5df6e2c701c36369f\",\"dweb:/ipfs/QmaL3oh8c7v9cx91pB175pyCEuzxnhNTab4UxmBMsDYfUx\"]},\"/home/cdc218/projects/dolomite-protocol-v2/contracts/protocol/lib/Decimal.sol\":{\"keccak256\":\"0xd9a348c2b1eec076609ba12bbec6b9c2e4ea135790a7ef4f5411feb050af2144\",\"urls\":[\"bzz-raw://d5bcff29e47d5cd02d7a9966e9f44c46ccbb4f0e4adfc4b0b86646880677db39\",\"dweb:/ipfs/QmRKfJD4FFM1AvTynSFNx1NcDg94o9SAcjz7dvMaJCfecp\"]},\"/home/cdc218/projects/dolomite-protocol-v2/contracts/protocol/lib/DolomiteMarginMath.sol\":{\"keccak256\":\"0x53f205f6a779d579be29faa9412c806a892b3e605fff092dfd9d14d936fa019f\",\"urls\":[\"bzz-raw://0ff936f89602a63b8e6a4eb4ce8f87673c0f45b7ce29694920905a3f0b5a6a69\",\"dweb:/ipfs/QmbYME9BeEvPC1ndV8EaUDX5fDMghLc3rocNUxFtgHmg8m\"]},\"/home/cdc218/projects/dolomite-protocol-v2/contracts/protocol/lib/EnumerableSet.sol\":{\"keccak256\":\"0x41a3460e34b7b8635d936e35e6568ceb5354b638f53b884530e0d4875fa0f151\",\"urls\":[\"bzz-raw://d1a5ba866ee95d455afe5075dadd91fc71c2806371f2c1b358a1f67c632bb0df\",\"dweb:/ipfs/QmW4qCjmsG8J3UJv97GwDLDM7wt1K4yLDKAwzWMY7TFYi5\"]},\"/home/cdc218/projects/dolomite-protocol-v2/contracts/protocol/lib/Interest.sol\":{\"keccak256\":\"0x141a0ecb4a746f0e5767df4b99dbe33c6362df507ae9d5c02da1c1c17bc26df3\",\"urls\":[\"bzz-raw://9ff03e64a8ce5231acde07788624bf8c7a8ff55d90b157fa32f62fa887a0eff0\",\"dweb:/ipfs/QmUVxxWeE954RDXbmHJAYnHsXcit6rSXGqZUigu8t9oH2z\"]},\"/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\":\"0x05a2a90b41b6a5f42f0a72da63d015fb0b406a9ba2172823352e522e8bf3a606\",\"urls\":[\"bzz-raw://19883f0c6d33266f756ec5c3d17539524aa24b993c46c33f8400801d09373a6c\",\"dweb:/ipfs/QmYX2fwK3vQQDSZLMrc5wMfeb8RWrcC9CGX8XECLty8QDk\"]},\"/home/cdc218/projects/dolomite-protocol-v2/contracts/protocol/lib/Storage.sol\":{\"keccak256\":\"0x9c27f3cd52af28c9b6bca18097b1793f114d08284d78417467d0d05f67e9e2a9\",\"urls\":[\"bzz-raw://d1ed0e7a7f76d59f30572996d4e164ab8fb5b2ec4bfca127983f9e936b904813\",\"dweb:/ipfs/QmePVYbgrY8Yw3Vf76pmEvE9pX916Jaa9we4kjM8tGM4J1\"]},\"/home/cdc218/projects/dolomite-protocol-v2/contracts/protocol/lib/Time.sol\":{\"keccak256\":\"0x87ee8d3c1d6e315a116426d8c8fc6f083e220fd14dda27fad4e8d7cab3dc7305\",\"urls\":[\"bzz-raw://7c20f2c52da682c3b5917fb6a19e81f43699b1d13c62b569ed723f34da72e766\",\"dweb:/ipfs/QmbXWYXi67nHBVNDKYUpo2E9ZaEVcHLvmXQkpYLMm1d5Vm\"]},\"/home/cdc218/projects/dolomite-protocol-v2/contracts/protocol/lib/Token.sol\":{\"keccak256\":\"0x095b5f8eb3665f6e246200311efc8a654fa3e90f9a1a522e27a4d089e8ab3917\",\"urls\":[\"bzz-raw://5db812b752a03d601d424e6e21be38153477082af0acf51b5c98eefa5553ed18\",\"dweb:/ipfs/QmbE549QUXYTurpx8hSMLBJvuBpfYqyNE6FBCgHJDY8PLf\"]},\"/home/cdc218/projects/dolomite-protocol-v2/contracts/protocol/lib/Types.sol\":{\"keccak256\":\"0xe1bab8c8799d83e86c7a49aaf815d8e3bc8d09562d46d44d921500db5e98de0e\",\"urls\":[\"bzz-raw://8ea3d0cc4fdab6dd9bba545a792170f939b342d8d1a7051c1c6365009af72658\",\"dweb:/ipfs/QmaLJgbavu88eEit6JPqfWnw6NmGBDZfveMXxumgWywBFG\"]},\"@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\"]},\"@openzeppelin/contracts/utils/Address.sol\":{\"keccak256\":\"0x1a8e5072509c5ea7365eb1d48030b9be865140c8fb779968da0a459a0e174a11\",\"urls\":[\"bzz-raw://03335b7b07c7c8c8d613cfdd8ec39a0b5ec133ee510bf2fe6cc5a496767bef4b\",\"dweb:/ipfs/Qmebp4nzPja645c9yXSdJkGq96oU3am3LUnG2K3R7XxyKf\"]}},\"version\":1}",
  "bytecode": "0x60806040523480156200001157600080fd5b506040516200175e3803806200175e83398101604081905262000034916200006d565b600080546001600160a01b0319166001600160a01b0392909216919091179055620000c2565b80516200006781620000a8565b92915050565b6000602082840312156200008057600080fd5b60006200008e84846200005a565b949350505050565b60006001600160a01b03821662000067565b620000b38162000096565b8114620000bf57600080fd5b50565b61168c80620000d26000396000f3fe608060405234801561001057600080fd5b50600436106100675760003560e01c80638fb8b6c7116100505780638fb8b6c71461009f578063b0463d5c146100b2578063bb0a6fa5146100c557610067565b806315c14a4a1461006c57806358e8cf031461008a575b600080fd5b6100746100d8565b6040516100819190611477565b60405180910390f35b61009d61009836600461105f565b6100f4565b005b61009d6100ad366004610f96565b610108565b61009d6100c0366004610ffe565b610306565b61009d6100d336600461105f565b6103a2565b60005473ffffffffffffffffffffffffffffffffffffffff1681565b61010185858585856103d8565b5050505050565b6040805160028082526060828101909352816020015b610126610e0f565b81526020019060019003908161011e57905050905060405180604001604052803373ffffffffffffffffffffffffffffffffffffffff168152602001868152508160008151811061017357fe5b602002602001018190525060405180604001604052803373ffffffffffffffffffffffffffffffffffffffff16815260200185815250816001815181106101b657fe5b6020026020010181905250600083839050905060608160405190808252806020026020018201604052801561020557816020015b6101f2610e26565b8152602001906001900390816101ea5790505b50905060005b82811015610272576102536000600188888581811061022657fe5b905060200201357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff610438565b82828151811061025f57fe5b602090810291909101015260010161020b565b506000546040517fa67a6a4500000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9091169063a67a6a45906102cb9086908590600401611452565b600060405180830381600087803b1580156102e557600080fd5b505af11580156102f9573d6000803e3d6000fd5b5050505050505050505050565b600281600381111561031457fe5b14156103225750600161033a565b600181600381111561033057fe5b141561033a575060025b61039c6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff16338533888760405180608001604052806000151581526020016000600181111561038557fe5b815260200160018152602001600081525088610532565b50505050565b604051849033907ffd9156bd20ce24a786c761efe71a3931de038c1f2620c1bb4720609bc742b58e90600090a361010185858585855b6101016000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff16338733888860405180608001604052806000151581526020016000600181111561042357fe5b8152602001600081526020018a905288610532565b610440610e26565b610448610e85565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff83141561049d57604080516080810190915260018152602081016000815260200160018152602001600081525090506104c4565b60408051608081019091526000808252602082019081526020016000815260200184905290505b604080516101008101909152806002815260200187815260200182815260200185815260200160008152602001600073ffffffffffffffffffffffffffffffffffffffff16815260200186815260200160405180602001604052806000815250815250915050949350505050565b6040805160028082526060828101909352816020015b610550610e0f565b81526020019060019003908161054857905050905060405180604001604052808973ffffffffffffffffffffffffffffffffffffffff168152602001888152508160008151811061059d57fe5b602002602001018190525060405180604001604052808773ffffffffffffffffffffffffffffffffffffffff16815260200186815250816001815181106105e057fe5b6020908102919091010152604080516001808252818301909252606091816020015b61060a610e26565b81526020019060019003908161060257505060408051610100810190915290915080600281526020016000815260200185815260200186815260200160008152602001600073ffffffffffffffffffffffffffffffffffffffff16815260200160018152602001604051806020016040528060008152508152508160008151811061069157fe5b60209081029190910101526040517fa67a6a4500000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8b169063a67a6a45906106f09085908590600401611452565b600060405180830381600087803b15801561070a57600080fd5b505af115801561071e573d6000803e3d6000fd5b506000925061072b915050565b83600381111561073757fe5b148061074e5750600183600381111561074c57fe5b145b1561075f5761075f8a8a8a886107a1565b600083600381111561076d57fe5b14806107845750600283600381111561078257fe5b145b15610795576107958a8888886107a1565b50505050505050505050565b6107a9610e0f565b60405180604001604052808573ffffffffffffffffffffffffffffffffffffffff1681526020018481525090506107de610e0f565b6040517f47d1b53c00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8716906347d1b53c906108329085908790600401611496565b604080518083038186803b15801561084957600080fd5b505afa15801561085d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506108819190810190610f70565b90506108e861088f826108f0565b8061089e575061089e8261091e565b7f4163636f756e7442616c616e63654c69620000000000000000000000000000007f6163636f756e742063616e6e6f7420676f206e65676174697665000000000000888888610938565b505050505050565b80516000908015610916575060208201516fffffffffffffffffffffffffffffffff1615155b90505b919050565b602001516fffffffffffffffffffffffffffffffff161590565b856108e85761094685610a8f565b7f3a2000000000000000000000000000000000000000000000000000000000000061097086610a8f565b7f203c00000000000000000000000000000000000000000000000000000000000061099a87610b67565b7f2c200000000000000000000000000000000000000000000000000000000000006109c488610cde565b7f2c200000000000000000000000000000000000000000000000000000000000006109ee89610cde565b604051610a28999897969594939291907f3e00000000000000000000000000000000000000000000000000000000000000906020016113b8565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152908290527f08c379a0000000000000000000000000000000000000000000000000000000008252610a8691600401611485565b60405180910390fd5b60608082604051602001610aa391906113a3565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152919052905060205b8015610b4c5781517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff90910190829082908110610b0f57fe5b01602001517fff000000000000000000000000000000000000000000000000000000000000001615610b475760010181529050610919565b610ad6565b5060408051600080825260208201909252905b509392505050565b60408051602a808252606082810190935273ffffffffffffffffffffffffffffffffffffffff8416918391602082018180388339019050509050603060f81b81600081518110610bb357fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350607860f81b81600181518110610bf457fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535060005b6014811015610b5f5760028102610c3f600f8516610ded565b838260290381518110610c4e57fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600484901c9350610c90600f8516610ded565b838260280381518110610c9f57fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053505060049290921c91600101610c26565b606081610d1f575060408051808201909152600181527f30000000000000000000000000000000000000000000000000000000000000006020820152610919565b8160005b8115610d3757600101600a82049150610d23565b6060816040519080825280601f01601f191660200182016040528015610d64576020820181803883390190505b508593509050815b8015610de4577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01600a840660300160f81b828281518110610daa57fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600a84049350610d6c565b50949350505050565b6000600a821015610e0557506030810160f81b610919565b5060570160f81b90565b604080518082019091526000808252602082015290565b604080516101008101825260008082526020820152908101610e46610e85565b81526020016000815260200160008152602001600073ffffffffffffffffffffffffffffffffffffffff16815260200160008152602001606081525090565b604080516080810190915260008082526020820190815260200160008152602001600081525090565b60008083601f840112610ec057600080fd5b50813567ffffffffffffffff811115610ed857600080fd5b602083019150836020820283011115610ef057600080fd5b9250929050565b8051610f0281611616565b92915050565b8035610f028161162a565b600060408284031215610f2557600080fd5b610f2f60406114b1565b90506000610f3d8484610ef7565b8252506020610f4e84848301610f5a565b60208301525092915050565b8051610f0281611637565b8035610f0281611640565b600060408284031215610f8257600080fd5b6000610f8e8484610f13565b949350505050565b60008060008060608587031215610fac57600080fd5b6000610fb88787610f65565b9450506020610fc987828801610f65565b935050604085013567ffffffffffffffff811115610fe657600080fd5b610ff287828801610eae565b95989497509550505050565b6000806000806080858703121561101457600080fd5b60006110208787610f65565b945050602061103187828801610f65565b935050604061104287828801610f65565b925050606061105387828801610f08565b91505092959194509250565b600080600080600060a0868803121561107757600080fd5b60006110838888610f65565b955050602061109488828901610f65565b94505060406110a588828901610f65565b93505060606110b688828901610f65565b92505060806110c788828901610f08565b9150509295509295909350565b60006110e08383611285565b9392505050565b60006110f3838361137a565b505060400190565b611104816114eb565b82525050565b6000611115826114de565b61111f81856114e2565b935083602082028501611131856114d8565b8060005b8581101561116b578484038952815161114e85826110d4565b9450611159836114d8565b60209a909a0199925050600101611135565b5091979650505050505050565b6000611183826114de565b61118d81856114e2565b9350611198836114d8565b8060005b838110156111c65781516111b088826110e7565b97506111bb836114d8565b92505060010161119c565b509495945050505050565b611104816114f6565b6111046111e6826114fb565b611545565b6111046111e682611520565b6111046111e682611545565b600061120e826114de565b6112188185610919565b93506112288185602086016115ab565b9290920192915050565b600061123d826114de565b61124781856114e2565b93506112578185602086016115ab565b611260816115d7565b9093019392505050565b6111048161158a565b61110481611595565b611104816115a0565b805160009061016084019061129a8582611273565b5060208301516112ad602086018261139a565b5060408301516112c06040860182611330565b5060608301516112d360c086018261139a565b5060808301516112e660e086018261139a565b5060a08301516112fa6101008601826110fb565b5060c083015161130e61012086018261139a565b5060e08301518482036101408601526113278282611232565b95945050505050565b8051608083019061134184826111d1565b506020820151611354602085018261127c565b506040820151611367604085018261127c565b50606082015161039c606085018261139a565b8051604083019061138b84826110fb565b50602082015161039c60208501825b61110481611545565b60006113af82846111f7565b50602001919050565b60006113c4828d611203565b91506113d0828c6111eb565b6002820191506113e0828b611203565b91506113ec828a6111eb565b6002820191506113fc8289611203565b915061140882886111eb565b6002820191506114188287611203565b915061142482866111eb565b6002820191506114348285611203565b915061144082846111da565b506001019a9950505050505050505050565b604080825281016114638185611178565b90508181036020830152610f8e818461110a565b60208101610f02828461126a565b602080825281016110e08184611232565b606081016114a4828561137a565b6110e0604083018461139a565b60405181810167ffffffffffffffff811182821017156114d057600080fd5b604052919050565b60200190565b5190565b90815260200190565b600061091682611571565b151590565b7fff000000000000000000000000000000000000000000000000000000000000001690565b7fffff0000000000000000000000000000000000000000000000000000000000001690565b90565b80610919816115ff565b806109198161160c565b6fffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff1690565b6000610916826114eb565b600061091682611548565b600061091682611552565b60005b838110156115c65781810151838201526020016115ae565b8381111561039c5750506000910152565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01690565b6009811061160957fe5b50565b6002811061160957fe5b61161f816114f6565b811461160957600080fd5b6004811061160957600080fd5b61161f8161155c565b61161f8161154556fea365627a7a723158201b5723bbc7fa6bed9b242dcf41c2c1687c1f2df091abfc4ace2258ebfc7f91236c6578706572696d656e74616cf564736f6c63430005100040",
  "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100675760003560e01c80638fb8b6c7116100505780638fb8b6c71461009f578063b0463d5c146100b2578063bb0a6fa5146100c557610067565b806315c14a4a1461006c57806358e8cf031461008a575b600080fd5b6100746100d8565b6040516100819190611477565b60405180910390f35b61009d61009836600461105f565b6100f4565b005b61009d6100ad366004610f96565b610108565b61009d6100c0366004610ffe565b610306565b61009d6100d336600461105f565b6103a2565b60005473ffffffffffffffffffffffffffffffffffffffff1681565b61010185858585856103d8565b5050505050565b6040805160028082526060828101909352816020015b610126610e0f565b81526020019060019003908161011e57905050905060405180604001604052803373ffffffffffffffffffffffffffffffffffffffff168152602001868152508160008151811061017357fe5b602002602001018190525060405180604001604052803373ffffffffffffffffffffffffffffffffffffffff16815260200185815250816001815181106101b657fe5b6020026020010181905250600083839050905060608160405190808252806020026020018201604052801561020557816020015b6101f2610e26565b8152602001906001900390816101ea5790505b50905060005b82811015610272576102536000600188888581811061022657fe5b905060200201357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff610438565b82828151811061025f57fe5b602090810291909101015260010161020b565b506000546040517fa67a6a4500000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9091169063a67a6a45906102cb9086908590600401611452565b600060405180830381600087803b1580156102e557600080fd5b505af11580156102f9573d6000803e3d6000fd5b5050505050505050505050565b600281600381111561031457fe5b14156103225750600161033a565b600181600381111561033057fe5b141561033a575060025b61039c6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff16338533888760405180608001604052806000151581526020016000600181111561038557fe5b815260200160018152602001600081525088610532565b50505050565b604051849033907ffd9156bd20ce24a786c761efe71a3931de038c1f2620c1bb4720609bc742b58e90600090a361010185858585855b6101016000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff16338733888860405180608001604052806000151581526020016000600181111561042357fe5b8152602001600081526020018a905288610532565b610440610e26565b610448610e85565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff83141561049d57604080516080810190915260018152602081016000815260200160018152602001600081525090506104c4565b60408051608081019091526000808252602082019081526020016000815260200184905290505b604080516101008101909152806002815260200187815260200182815260200185815260200160008152602001600073ffffffffffffffffffffffffffffffffffffffff16815260200186815260200160405180602001604052806000815250815250915050949350505050565b6040805160028082526060828101909352816020015b610550610e0f565b81526020019060019003908161054857905050905060405180604001604052808973ffffffffffffffffffffffffffffffffffffffff168152602001888152508160008151811061059d57fe5b602002602001018190525060405180604001604052808773ffffffffffffffffffffffffffffffffffffffff16815260200186815250816001815181106105e057fe5b6020908102919091010152604080516001808252818301909252606091816020015b61060a610e26565b81526020019060019003908161060257505060408051610100810190915290915080600281526020016000815260200185815260200186815260200160008152602001600073ffffffffffffffffffffffffffffffffffffffff16815260200160018152602001604051806020016040528060008152508152508160008151811061069157fe5b60209081029190910101526040517fa67a6a4500000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8b169063a67a6a45906106f09085908590600401611452565b600060405180830381600087803b15801561070a57600080fd5b505af115801561071e573d6000803e3d6000fd5b506000925061072b915050565b83600381111561073757fe5b148061074e5750600183600381111561074c57fe5b145b1561075f5761075f8a8a8a886107a1565b600083600381111561076d57fe5b14806107845750600283600381111561078257fe5b145b15610795576107958a8888886107a1565b50505050505050505050565b6107a9610e0f565b60405180604001604052808573ffffffffffffffffffffffffffffffffffffffff1681526020018481525090506107de610e0f565b6040517f47d1b53c00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8716906347d1b53c906108329085908790600401611496565b604080518083038186803b15801561084957600080fd5b505afa15801561085d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506108819190810190610f70565b90506108e861088f826108f0565b8061089e575061089e8261091e565b7f4163636f756e7442616c616e63654c69620000000000000000000000000000007f6163636f756e742063616e6e6f7420676f206e65676174697665000000000000888888610938565b505050505050565b80516000908015610916575060208201516fffffffffffffffffffffffffffffffff1615155b90505b919050565b602001516fffffffffffffffffffffffffffffffff161590565b856108e85761094685610a8f565b7f3a2000000000000000000000000000000000000000000000000000000000000061097086610a8f565b7f203c00000000000000000000000000000000000000000000000000000000000061099a87610b67565b7f2c200000000000000000000000000000000000000000000000000000000000006109c488610cde565b7f2c200000000000000000000000000000000000000000000000000000000000006109ee89610cde565b604051610a28999897969594939291907f3e00000000000000000000000000000000000000000000000000000000000000906020016113b8565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152908290527f08c379a0000000000000000000000000000000000000000000000000000000008252610a8691600401611485565b60405180910390fd5b60608082604051602001610aa391906113a3565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152919052905060205b8015610b4c5781517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff90910190829082908110610b0f57fe5b01602001517fff000000000000000000000000000000000000000000000000000000000000001615610b475760010181529050610919565b610ad6565b5060408051600080825260208201909252905b509392505050565b60408051602a808252606082810190935273ffffffffffffffffffffffffffffffffffffffff8416918391602082018180388339019050509050603060f81b81600081518110610bb357fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350607860f81b81600181518110610bf457fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535060005b6014811015610b5f5760028102610c3f600f8516610ded565b838260290381518110610c4e57fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600484901c9350610c90600f8516610ded565b838260280381518110610c9f57fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053505060049290921c91600101610c26565b606081610d1f575060408051808201909152600181527f30000000000000000000000000000000000000000000000000000000000000006020820152610919565b8160005b8115610d3757600101600a82049150610d23565b6060816040519080825280601f01601f191660200182016040528015610d64576020820181803883390190505b508593509050815b8015610de4577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01600a840660300160f81b828281518110610daa57fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600a84049350610d6c565b50949350505050565b6000600a821015610e0557506030810160f81b610919565b5060570160f81b90565b604080518082019091526000808252602082015290565b604080516101008101825260008082526020820152908101610e46610e85565b81526020016000815260200160008152602001600073ffffffffffffffffffffffffffffffffffffffff16815260200160008152602001606081525090565b604080516080810190915260008082526020820190815260200160008152602001600081525090565b60008083601f840112610ec057600080fd5b50813567ffffffffffffffff811115610ed857600080fd5b602083019150836020820283011115610ef057600080fd5b9250929050565b8051610f0281611616565b92915050565b8035610f028161162a565b600060408284031215610f2557600080fd5b610f2f60406114b1565b90506000610f3d8484610ef7565b8252506020610f4e84848301610f5a565b60208301525092915050565b8051610f0281611637565b8035610f0281611640565b600060408284031215610f8257600080fd5b6000610f8e8484610f13565b949350505050565b60008060008060608587031215610fac57600080fd5b6000610fb88787610f65565b9450506020610fc987828801610f65565b935050604085013567ffffffffffffffff811115610fe657600080fd5b610ff287828801610eae565b95989497509550505050565b6000806000806080858703121561101457600080fd5b60006110208787610f65565b945050602061103187828801610f65565b935050604061104287828801610f65565b925050606061105387828801610f08565b91505092959194509250565b600080600080600060a0868803121561107757600080fd5b60006110838888610f65565b955050602061109488828901610f65565b94505060406110a588828901610f65565b93505060606110b688828901610f65565b92505060806110c788828901610f08565b9150509295509295909350565b60006110e08383611285565b9392505050565b60006110f3838361137a565b505060400190565b611104816114eb565b82525050565b6000611115826114de565b61111f81856114e2565b935083602082028501611131856114d8565b8060005b8581101561116b578484038952815161114e85826110d4565b9450611159836114d8565b60209a909a0199925050600101611135565b5091979650505050505050565b6000611183826114de565b61118d81856114e2565b9350611198836114d8565b8060005b838110156111c65781516111b088826110e7565b97506111bb836114d8565b92505060010161119c565b509495945050505050565b611104816114f6565b6111046111e6826114fb565b611545565b6111046111e682611520565b6111046111e682611545565b600061120e826114de565b6112188185610919565b93506112288185602086016115ab565b9290920192915050565b600061123d826114de565b61124781856114e2565b93506112578185602086016115ab565b611260816115d7565b9093019392505050565b6111048161158a565b61110481611595565b611104816115a0565b805160009061016084019061129a8582611273565b5060208301516112ad602086018261139a565b5060408301516112c06040860182611330565b5060608301516112d360c086018261139a565b5060808301516112e660e086018261139a565b5060a08301516112fa6101008601826110fb565b5060c083015161130e61012086018261139a565b5060e08301518482036101408601526113278282611232565b95945050505050565b8051608083019061134184826111d1565b506020820151611354602085018261127c565b506040820151611367604085018261127c565b50606082015161039c606085018261139a565b8051604083019061138b84826110fb565b50602082015161039c60208501825b61110481611545565b60006113af82846111f7565b50602001919050565b60006113c4828d611203565b91506113d0828c6111eb565b6002820191506113e0828b611203565b91506113ec828a6111eb565b6002820191506113fc8289611203565b915061140882886111eb565b6002820191506114188287611203565b915061142482866111eb565b6002820191506114348285611203565b915061144082846111da565b506001019a9950505050505050505050565b604080825281016114638185611178565b90508181036020830152610f8e818461110a565b60208101610f02828461126a565b602080825281016110e08184611232565b606081016114a4828561137a565b6110e0604083018461139a565b60405181810167ffffffffffffffff811182821017156114d057600080fd5b604052919050565b60200190565b5190565b90815260200190565b600061091682611571565b151590565b7fff000000000000000000000000000000000000000000000000000000000000001690565b7fffff0000000000000000000000000000000000000000000000000000000000001690565b90565b80610919816115ff565b806109198161160c565b6fffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff1690565b6000610916826114eb565b600061091682611548565b600061091682611552565b60005b838110156115c65781810151838201526020016115ae565b8381111561039c5750506000910152565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01690565b6009811061160957fe5b50565b6002811061160957fe5b61161f816114f6565b811461160957600080fd5b6004811061160957600080fd5b61161f8161155c565b61161f8161154556fea365627a7a723158201b5723bbc7fa6bed9b242dcf41c2c1687c1f2df091abfc4ace2258ebfc7f91236c6578706572696d656e74616cf564736f6c63430005100040",
  "sourceMap": "1525:4464:46:-;;;1640:107;8:9:-1;5:2;;;30:1;27;20:12;5:2;1640:107:46;;;;;;;;;;;;;;;;;;;;;1302:15:6;:50;;-1:-1:-1;;;;;;1302:50:6;-1:-1:-1;;;;;1302:50:6;;;;;;;;;;1525:4464:46;;5:134:-1;83:13;;101:33;83:13;101:33;;;68:71;;;;;146:263;;261:2;249:9;240:7;236:23;232:32;229:2;;;277:1;274;267:12;229:2;312:1;329:64;385:7;365:9;329:64;;;319:74;223:186;-1:-1;;;;223:186;416:91;;-1:-1;;;;;576:54;;478:24;559:76;642:117;711:24;729:5;711:24;;;704:5;701:35;691:2;;750:1;747;740:12;691:2;685:74;;;1525:4464:46;;;;;;",
  "deployedSourceMap": "1525:4464:46:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1525:4464:46;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1130:38:6;;;:::i;:::-;;;;;;;;;;;;;;;;3277:426:46;;;;;;;;;:::i;:::-;;2357:914;;;;;;;;;:::i;3767:1349::-;;;;;;;;;:::i;1753:598::-;;;;;;;;;:::i;1130:38:6:-;;;;;;:::o;3277:426:46:-;3522:174;3560:18;3592:16;3622:9;3645:10;3669:17;3522:24;:174::i;:::-;3277:426;;;;;:::o;2357:914::-;2565:21;;;2584:1;2565:21;;;2532:30;2565:21;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;2532:54;;2610:46;;;;;;;;2623:10;2610:46;;;;;;2635:20;2610:46;;;2596:8;2605:1;2596:11;;;;;;;;;;;;;:60;;;;2680:42;;;;;;;;2693:10;2680:42;;;;;;2705:16;2680:42;;;2666:8;2675:1;2666:11;;;;;;;;;;;;;:56;;;;2733:23;2759:20;;:27;;2733:53;;2796:35;2859:15;2834:41;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;2796:79;;2890:9;2885:327;2905:15;2901:1;:19;2885:327;;;2954:247;3032:1;3095;3137:20;;3158:1;3137:23;;;;;;;;;;;;;3183:3;2954:37;:247::i;:::-;2941:7;2949:1;2941:10;;;;;;;;;;;;;;;;;:260;2922:3;;2885:327;;;-1:-1:-1;3222:15:46;;:42;;;;;:15;;;;;:23;;:42;;3246:8;;3256:7;;3222:42;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3222:42:46;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;3222:42:46;;;;2357:914;;;;;;;:::o;3767:1349::-;4281:37;4260:17;:58;;;;;;;;;4256:302;;;-1:-1:-1;4354:39:46;4256:302;;;4435:39;4414:17;:60;;;;;;;;;4410:148;;;-1:-1:-1;4510:37:46;4410:148;4568:541;4607:15;;;;;;;;;;;4664:10;4711:20;4769:10;4816:18;4848:9;4871:197;;;;;;;;4913:5;4871:197;;;;;;4950:27;4871:197;;;;;;;;;;;;5000:27;4871:197;;;;5052:1;4871:197;;;5082:17;4568:25;:541::i;:::-;3767:1349;;;;:::o;1753:598::-;2111:48;;2142:16;;2130:10;;2111:48;;;;;2170:174;2208:18;2240:16;2270:9;2293:10;2317:17;5191:796;5437:543;5476:15;;;;;;;;;;;5531:10;5578:18;5634:10;5681:16;5711:9;5734:205;;;;;;;;5776:5;5734:205;;;;;;5813:27;5734:205;;;;;;;;;;;;5863:26;5734:205;;;;;;;5953:17;5437:25;:543::i;12562:1142:34:-;12738:25;;:::i;:::-;12775:36;;:::i;:::-;12844:3;12825:10;:23;12821:514;;;12878:196;;;;;;;;;12920:4;12878:196;;;;;-1:-1:-1;12878:196:34;;;;13006:27;12878:196;;;;13058:1;12878:196;;;12864:210;;12821:514;;;13119:205;;;;;;;;;-1:-1:-1;13119:205:34;;;;;;;;;;;13248:26;13119:205;;;;;;;13105:219;-1:-1:-1;12821:514:34;13351:346;;;;;;;;;;13397:27;13351:346;;;;13450:14;13351:346;;;;13487:11;13351:346;;;;13530:9;13351:346;;;;13573:1;13351:346;;;;13611:1;13351:346;;;;;;13644:12;13351:346;;;;13677:9;;;;;;;;;;;;13351:346;;;13344:353;;;12562:1142;;;;;;:::o;3704:1894::-;4090:21;;;4109:1;4090:21;;;4057:30;4090:21;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;4057:54;;4135:102;;;;;;;;4169:17;4135:102;;;;;;4208:18;4135:102;;;4121:8;4130:1;4121:11;;;;;;;;;;;;;:116;;;;4261:98;;;;;;;;4295:15;4261:98;;;;;;4332:16;4261:98;;;4247:8;4256:1;4247:11;;;;;;;;;;;;;;;;;:112;4408:27;;;4433:1;4408:27;;;;;;;;;4370:35;;4408:27;;;;;;:::i;:::-;;;;;;;;;;;;;-1:-1:-1;;4458:310:34;;;;;;;;;4370:65;;-1:-1:-1;4458:310:34;4503:27;4458:310;;;;4555:1;4458:310;;;;4578:7;4458:310;;;;4616:9;4458:310;;;;4658:1;4458:310;;;;4695:1;4458:310;;;;;;4727:1;4458:310;;;;4748:9;;;;;;;;;;;;4458:310;;;4445:7;4453:1;4445:10;;;;;;;;;;;;;;;;;:323;4779:42;;;;;:23;;;;;;:42;;4803:8;;4813:7;;4779:42;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;4779:42:34;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;-1:-1;4870:39:34;;-1:-1:-1;4849:60:34;;-1:-1:-1;;4849:60:34;;:17;:60;;;;;;;;;:136;;;-1:-1:-1;4946:39:34;4925:17;:60;;;;;;;;;4849:136;4832:378;;;5010:189;5072:15;5105:17;5140:18;5176:9;5010:44;:189::i;:::-;5258:39;5237:17;:60;;;;;;;;;:134;;;-1:-1:-1;5334:37:34;5313:17;:58;;;;;;;;;5237:134;5220:372;;;5396:185;5458:15;5491;5524:16;5558:9;5396:44;:185::i;:::-;3704:1894;;;;;;;;;;:::o;1578:549:35:-;1766:27;;:::i;:::-;1796:35;;;;;;;;1809:6;1796:35;;;;;;1817:13;1796:35;;;1766:65;;1841:20;;:::i;:::-;1864:48;;;;;:28;;;;;;:48;;1893:7;;1902:9;;1864:48;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1864:48:35;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;1864:48:35;;;;;;;101:4:-1;97:9;90:4;84;80:15;76:31;69:5;65:43;126:6;120:4;113:20;0:138;1864:48:35;;;;;;;;;1841:71;;1922:198;1948:16;:3;:14;:16::i;:::-;:32;;;;1968:12;:3;:10;:12::i;:::-;1994:4;1922:198;2054:6;2074:13;2101:9;1922:12;:198::i;:::-;1578:549;;;;;;:::o;3609:151:104:-;3731:6;;3704:4;;3731:22;;;;-1:-1:-1;3741:7:104;;;;:12;;;;3731:22;3724:29;;3609:151;;;;:::o;3766:137::-;3884:7;;;:12;;;;3766:137::o;4198:765:99:-;4410:4;4405:552;;4524:24;4543:4;4524:18;:24::i;:::-;4574:5;4605:26;4624:6;4605:18;:26::i;:::-;4657:6;4689:19;4699:8;4689:9;:19::i;:::-;4734:5;4765:19;4775:8;4765:9;:19::i;:::-;4810:5;4841:19;4851:8;4841:9;:19::i;:::-;4482:432;;;;;;;;;;;;;4886:6;;4482:432;;;;;;;;22:32:-1;26:21;;;22:32;6:49;;4482:432:99;;;;4430:516;;;;;;;;;;;;;;;;;6359:968;6463:12;6538:19;6577:5;6560:23;;;;;;;;;;;;;22:32:-1;26:21;;;22:32;6:49;;6560:23:99;;;;-1:-1:-1;49:4;6689:572:99;6710:6;;6689:572;;6962:9;;6864:3;;;;;6962:6;;6864:3;;6962:9;;;;;;;;;;;;:14;6958:293;;7017:1;7013:5;7143:22;;7150:6;-1:-1:-1;7223:13:99;;6958:293;6689:572;;;-1:-1:-1;7308:12:99;;;7318:1;7308:12;;;;;;;;;;;-1:-1:-1;7301:19:99;6359:968;-1:-1:-1;;;6359:968:99:o;8252:958::-;8524:13;;;8534:2;8524:13;;;8346:12;8524:13;;;;;;8386:14;;;;8346:12;;8524:13;;;21:6:-1;;104:10;8524:13:99;87:34:-1;135:17;;-1:-1;8524:13:99;8502:35;;902:2;8601:23;;8589:6;8596:1;8589:9;;;;;;;;;;;:35;;;;;;;;;;;1010:3;8646:27;;8634:6;8641:1;8634:9;;;;;;;;;;;:39;;;;;;;;;;;8787:9;8782:398;8802:2;8798:1;:6;8782:398;;;8891:1;8887:5;;8984:23;1232:3;8989:17;;8984:4;:23::i;:::-;8963:6;8975:5;8970:2;:10;8963:18;;;;;;;;;;;:44;;;;;;;;;;;9030:1;9025;:6;;9021:10;;9122:23;1232:3;9127:1;:17;9122:4;:23::i;:::-;9101:6;9113:5;9108:2;:10;9101:18;;;;;;;;;;;:44;;;;;;;;;;-1:-1:-1;;9168:1:99;9163:6;;;;;8806:3;;8782:398;;7333:913;7427:12;7459:10;7455:51;;-1:-1:-1;7485:10:99;;;;;;;;;;;;;;;;;;;7455:51;7567:5;7555:9;7606:69;7613:6;;7606:69;;7635:8;;7662:2;7657:7;;;;7606:69;;;7716:17;7746:6;7736:17;;;;;;;;;;;;;;;;;;;;;;;;;21:6:-1;;104:10;7736:17:99;87:34:-1;135:17;;-1:-1;7736:17:99;-1:-1:-1;7845:5:99;;-1:-1:-1;7716:37:99;-1:-1:-1;7877:6:99;7860:358;7885:6;;7860:358;;8039:3;;8135:2;8131:1;:6;902:2;8117:21;8106:34;;8096:4;8101:1;8096:7;;;;;;;;;;;:44;;;;;;;;;;-1:-1:-1;8205:2:99;8200:7;;;;7860:358;;;-1:-1:-1;8235:4:99;7333:913;-1:-1:-1;;;;7333:913:99:o;10178:325::-;10267:4;10335:2;10327:5;:10;10323:79;;;-1:-1:-1;902:2:99;10371:18;;10360:31;;10353:38;;10323:79;-1:-1:-1;956:2:99;10467:27;10456:40;;;10178:325::o;1525:4464:46:-;;;;;;;;;;-1:-1:-1;1525:4464:46;;;;;;;;:::o;:::-;;;;;;;;;-1:-1:-1;1525:4464:46;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;-1:-1:-1;1525:4464:46;;;;;;;;;;;;;;;;;;;;;:::o;23:352:-1:-;;;153:3;146:4;138:6;134:17;130:27;120:2;;171:1;168;161:12;120:2;-1:-1;191:20;;231:18;220:30;;217:2;;;263:1;260;253:12;217:2;297:4;289:6;285:17;273:29;;348:3;340:4;332:6;328:17;318:8;314:32;311:41;308:2;;;365:1;362;355:12;308:2;113:262;;;;;;383:128;458:13;;476:30;458:13;476:30;;;443:68;;;;;518:172;606:20;;631:54;606:20;631:54;;720:495;;842:4;830:9;825:3;821:19;817:30;814:2;;;860:1;857;850:12;814:2;878:20;893:4;878:20;;;869:29;-1:-1;948:1;980:57;1033:3;1013:9;980:57;;;955:83;;-1:-1;1100:2;1133:60;1189:3;1165:22;;;1133:60;;;1126:4;1119:5;1115:16;1108:86;1059:146;808:407;;;;;1222:134;1300:13;;1318:33;1300:13;1318:33;;1363:130;1430:20;;1455:33;1430:20;1455:33;;1500:307;;1637:2;1625:9;1616:7;1612:23;1608:32;1605:2;;;1653:1;1650;1643:12;1605:2;1688:1;1705:86;1783:7;1763:9;1705:86;;;1695:96;1599:208;-1:-1;;;;1599:208;1814:647;;;;;1987:2;1975:9;1966:7;1962:23;1958:32;1955:2;;;2003:1;2000;1993:12;1955:2;2038:1;2055:53;2100:7;2080:9;2055:53;;;2045:63;;2017:97;2145:2;2163:53;2208:7;2199:6;2188:9;2184:22;2163:53;;;2153:63;;2124:98;2281:2;2270:9;2266:18;2253:32;2305:18;2297:6;2294:30;2291:2;;;2337:1;2334;2327:12;2291:2;2365:80;2437:7;2428:6;2417:9;2413:22;2365:80;;;1949:512;;;;-1:-1;2355:90;-1:-1;;;;1949:512;2468:659;;;;;2644:3;2632:9;2623:7;2619:23;2615:33;2612:2;;;2661:1;2658;2651:12;2612:2;2696:1;2713:53;2758:7;2738:9;2713:53;;;2703:63;;2675:97;2803:2;2821:53;2866:7;2857:6;2846:9;2842:22;2821:53;;;2811:63;;2782:98;2911:2;2929:53;2974:7;2965:6;2954:9;2950:22;2929:53;;;2919:63;;2890:98;3019:2;3037:74;3103:7;3094:6;3083:9;3079:22;3037:74;;;3027:84;;2998:119;2606:521;;;;;;;;3134:785;;;;;;3327:3;3315:9;3306:7;3302:23;3298:33;3295:2;;;3344:1;3341;3334:12;3295:2;3379:1;3396:53;3441:7;3421:9;3396:53;;;3386:63;;3358:97;3486:2;3504:53;3549:7;3540:6;3529:9;3525:22;3504:53;;;3494:63;;3465:98;3594:2;3612:53;3657:7;3648:6;3637:9;3633:22;3612:53;;;3602:63;;3573:98;3702:2;3720:53;3765:7;3756:6;3745:9;3741:22;3720:53;;;3710:63;;3681:98;3810:3;3829:74;3895:7;3886:6;3875:9;3871:22;3829:74;;;3819:84;;3789:120;3289:630;;;;;;;;;3927:257;;4078:100;4174:3;4166:6;4078:100;;;4064:114;4057:127;-1:-1;;;4057:127;4193:253;;4318:88;4402:3;4394:6;4318:88;;;-1:-1;;4435:4;4426:14;;4311:135;4454:103;4527:24;4545:5;4527:24;;;4522:3;4515:37;4509:48;;;4631:1048;;4826:79;4899:5;4826:79;;;4918:111;5022:6;5017:3;4918:111;;;4911:118;;5052:3;5094:4;5086:6;5082:17;5077:3;5073:27;5121:81;5196:5;5121:81;;;5222:7;5250:1;5235:405;5260:6;5257:1;5254:13;5235:405;;;5322:9;5316:4;5312:20;5307:3;5300:33;5367:6;5361:13;5389:114;5498:4;5483:13;5389:114;;;5381:122;;5520:85;5598:6;5520:85;;;5628:4;5619:14;;;;;5510:95;-1:-1;;5282:1;5275:9;5235:405;;;-1:-1;5653:4;;4805:874;-1:-1;;;;;;;4805:874;5742:842;;5925:73;5992:5;5925:73;;;6011:105;6109:6;6104:3;6011:105;;;6004:112;;6137:75;6206:5;6137:75;;;6232:7;6260:1;6245:317;6270:6;6267:1;6264:13;6245:317;;;6337:6;6331:13;6358:101;6455:3;6440:13;6358:101;;;6351:108;;6476:79;6548:6;6476:79;;;6466:89;-1:-1;;6292:1;6285:9;6245:317;;;-1:-1;6575:3;;5904:680;-1:-1;;;;;5904:680;6592:94;6659:21;6674:5;6659:21;;6693:148;6792:43;6811:23;6828:5;6811:23;;;6792:43;;6848:148;6947:43;6966:23;6983:5;6966:23;;7003:152;7104:45;7124:24;7142:5;7124:24;;7162:356;;7290:38;7322:5;7290:38;;;7340:88;7421:6;7416:3;7340:88;;;7333:95;;7433:52;7478:6;7473:3;7466:4;7459:5;7455:16;7433:52;;;7497:16;;;;;7270:248;-1:-1;;7270:248;7525:315;;7621:34;7649:5;7621:34;;;7667:60;7720:6;7715:3;7667:60;;;7660:67;;7732:52;7777:6;7772:3;7765:4;7758:5;7754:16;7732:52;;;7805:29;7827:6;7805:29;;;7796:39;;;;7601:239;-1:-1;;;7601:239;7847:176;7955:62;8011:5;7955:62;;8030:144;8117:51;8162:5;8117:51;;8181:158;8275:58;8327:5;8275:58;;8920:1616;9139:23;;8920:1616;;9065:6;9056:16;;;9168:77;9060:3;9139:23;9168:77;;;9087:164;9329:4;9322:5;9318:16;9312:23;9341:63;9398:4;9393:3;9389:14;9375:12;9341:63;;;9261:149;9485:4;9478:5;9474:16;9468:23;9497:119;9610:4;9605:3;9601:14;9587:12;9497:119;;;9420:202;9706:4;9699:5;9695:16;9689:23;9718:63;9775:4;9770:3;9766:14;9752:12;9718:63;;;9632:155;9873:4;9866:5;9862:16;9856:23;9885:63;9942:4;9937:3;9933:14;9919:12;9885:63;;;9797:157;10035:4;10028:5;10024:16;10018:23;10047:65;10104:6;10099:3;10095:16;10081:12;10047:65;;;9964:154;10201:4;10194:5;10190:16;10184:23;10213:65;10270:6;10265:3;10261:16;10247:12;10213:65;;;10128:156;10357:4;10350:5;10346:16;10340:23;10411:3;10405:4;10401:14;10392:6;10387:3;10383:16;10376:40;10431:67;10493:4;10479:12;10431:67;;;10423:75;9038:1498;-1:-1;;;;;9038:1498;10602:821;10807:23;;10741:4;10732:14;;;10836:57;10736:3;10807:23;10836:57;;;10761:138;10980:4;10973:5;10969:16;10963:23;10992:84;11070:4;11065:3;11061:14;11047:12;10992:84;;;10909:173;11154:4;11147:5;11143:16;11137:23;11166:81;11241:4;11236:3;11232:14;11218:12;11166:81;;;11092:161;11327:4;11320:5;11316:16;11310:23;11339:63;11396:4;11391:3;11387:14;11373:12;11339:63;;11479:475;11685:23;;11618:4;11609:14;;;11714:63;11613:3;11685:23;11714:63;;;11638:145;11858:4;11851:5;11847:16;11841:23;11870:63;11927:4;11922:3;11918:14;11904:12;12478:103;12551:24;12569:5;12551:24;;12708:244;;12827:75;12898:3;12889:6;12827:75;;;-1:-1;12924:2;12915:12;;12815:137;-1:-1;12815:137;12959:1560;;13417:93;13506:3;13497:6;13417:93;;;13410:100;;13521:73;13590:3;13581:6;13521:73;;;13616:1;13611:3;13607:11;13600:18;;13636:93;13725:3;13716:6;13636:93;;;13629:100;;13740:73;13809:3;13800:6;13740:73;;;13835:1;13830:3;13826:11;13819:18;;13855:93;13944:3;13935:6;13855:93;;;13848:100;;13959:73;14028:3;14019:6;13959:73;;;14054:1;14049:3;14045:11;14038:18;;14074:93;14163:3;14154:6;14074:93;;;14067:100;;14178:73;14247:3;14238:6;14178:73;;;14273:1;14268:3;14264:11;14257:18;;14293:93;14382:3;14373:6;14293:93;;;14286:100;;14397:73;14466:3;14457:6;14397:73;;;-1:-1;14492:1;14483:11;;13398:1121;-1:-1;;;;;;;;;;13398:1121;14526:796;14860:2;14874:47;;;14845:18;;14935:146;14845:18;15067:6;14935:146;;;14927:154;;15129:9;15123:4;15119:20;15114:2;15103:9;15099:18;15092:48;15154:158;15307:4;15298:6;15154:158;;15329:263;15472:2;15457:18;;15486:96;15461:9;15555:6;15486:96;;15599:301;15737:2;15751:47;;;15722:18;;15812:78;15722:18;15876:6;15812:78;;15907:416;16099:2;16084:18;;16113:117;16088:9;16203:6;16113:117;;;16241:72;16309:2;16298:9;16294:18;16285:6;16241:72;;16330:256;16392:2;16386:9;16418:17;;;16493:18;16478:34;;16514:22;;;16475:62;16472:2;;;16550:1;16547;16540:12;16472:2;16566;16559:22;16370:216;;-1:-1;16370:216;16593:176;16742:4;16733:14;;16690:79;16953:162;17081:12;;17052:63;17941:203;18084:19;;;18133:4;18124:14;;18077:67;18844:91;;18906:24;18924:5;18906:24;;18942:85;19008:13;19001:21;;18984:43;19034:144;19106:66;19095:78;;19078:100;19185:144;19257:66;19246:78;;19229:100;19336:72;19398:5;19381:27;19415:138;19493:5;19499:49;19493:5;19499:49;;19560:152;19645:5;19651:56;19645:5;19651:56;;19872:113;19945:34;19934:46;;19917:68;19992:121;20065:42;20054:54;;20037:76;20199:171;;20303:62;20359:5;20303:62;;20517:138;;20610:40;20644:5;20610:40;;20662:152;;20762:47;20803:5;20762:47;;20975:268;21040:1;21047:101;21061:6;21058:1;21055:13;21047:101;;;21128:11;;;21122:18;21109:11;;;21102:39;21083:2;21076:10;21047:101;;;21163:6;21160:1;21157:13;21154:2;;;-1:-1;;21228:1;21210:16;;21203:27;21024:219;21492:97;21580:2;21560:14;21576:7;21556:28;;21540:49;21597:107;21682:1;21675:5;21672:12;21662:2;;21688:9;21662:2;21656:48;;21711:114;21803:1;21796:5;21793:12;21783:2;;21809:9;21950:111;22016:21;22031:5;22016:21;;;22009:5;22006:32;21996:2;;22052:1;22049;22042:12;22068:115;22158:1;22151:5;22148:12;22138:2;;22174:1;22171;22164:12;22190:117;22259:24;22277:5;22259:24;;22314:117;22383:24;22401:5;22383:24;",
  "source": "/*\n\n    Copyright 2022 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.7;\npragma experimental ABIEncoderV2;\n\nimport { Address } from \"@openzeppelin/contracts/utils/Address.sol\";\nimport { IERC20 } from \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\n\nimport { Account } from \"../../protocol/lib/Account.sol\";\nimport { Actions } from \"../../protocol/lib/Actions.sol\";\nimport { Require } from \"../../protocol/lib/Require.sol\";\nimport { Types } from \"../../protocol/lib/Types.sol\";\n\nimport { OnlyDolomiteMargin } from \"../helpers/OnlyDolomiteMargin.sol\";\nimport { IBorrowPositionProxyV1 } from \"../interfaces/IBorrowPositionProxyV1.sol\";\nimport { AccountActionLib } from \"../lib/AccountActionLib.sol\";\nimport { AccountBalanceLib } from \"../lib/AccountBalanceLib.sol\";\n\n\n\n/**\n * @title   BorrowPositionProxyV1\n * @author  Dolomite\n *\n * @dev Proxy contract for opening borrow positions. This makes indexing easier and lowers gas costs on Arbitrum by\n *      minimizing call data\n */\ncontract BorrowPositionProxyV1 is IBorrowPositionProxyV1, OnlyDolomiteMargin {\n    using Types for Types.Par;\n\n    constructor (\n        address dolomiteMargin\n    )\n    public\n    OnlyDolomiteMargin(dolomiteMargin)\n    {}\n\n    function openBorrowPosition(\n        uint256 _fromAccountNumber,\n        uint256 _toAccountNumber,\n        uint256 _marketId,\n        uint256 _amountWei,\n        AccountBalanceLib.BalanceCheckFlag _balanceCheckFlag\n    ) external {\n        // Emit this before the call to DolomiteMargin so indexers get it before the Transfer events are emitted\n        emit BorrowPositionOpen(msg.sender, _toAccountNumber);\n\n        _transferBetweenAccounts(\n            _fromAccountNumber,\n            _toAccountNumber,\n            _marketId,\n            _amountWei,\n            _balanceCheckFlag\n        );\n    }\n\n    function closeBorrowPosition(\n        uint256 _borrowAccountNumber,\n        uint256 _toAccountNumber,\n        uint256[] calldata _collateralMarketIds\n    ) external {\n        Account.Info[] memory accounts = new Account.Info[](2);\n        accounts[0] = Account.Info(msg.sender, _borrowAccountNumber);\n        accounts[1] = Account.Info(msg.sender, _toAccountNumber);\n\n        uint256 marketIdsLength = _collateralMarketIds.length;\n        Actions.ActionArgs[] memory actions = new Actions.ActionArgs[](marketIdsLength);\n        for (uint256 i; i < marketIdsLength; ++i) {\n            actions[i] = AccountActionLib.encodeTransferAction(\n                /* _fromAccountId = */ 0, // solium-disable-line\n                /* _toAccountId = */ 1, // solium-disable-line\n                _collateralMarketIds[i],\n                uint(- 1)\n            );\n        }\n\n        DOLOMITE_MARGIN.operate(accounts, actions);\n    }\n\n    function transferBetweenAccounts(\n        uint256 _fromAccountNumber,\n        uint256 _toAccountNumber,\n        uint256 _marketId,\n        uint256 _amountWei,\n        AccountBalanceLib.BalanceCheckFlag _balanceCheckFlag\n    ) external {\n        _transferBetweenAccounts(\n            _fromAccountNumber,\n            _toAccountNumber,\n            _marketId,\n            _amountWei,\n            _balanceCheckFlag\n        );\n    }\n\n    // solium-disable-next-line security/no-assign-params\n    function repayAllForBorrowPosition(\n        uint256 _fromAccountNumber,\n        uint256 _borrowAccountNumber,\n        uint256 _marketId,\n        AccountBalanceLib.BalanceCheckFlag _balanceCheckFlag\n    ) external {\n        // reverse the ordering of the `_borrowAccountNumber` and `_fromAccountNumber`, so using `Target = 0` calculates\n        // on `_borrowAccountNumber`. We then need to reverse the `AccountBalanceLib.BalanceCheckFlag` if it's set to\n        // `from` or `to`.\n        if (_balanceCheckFlag == AccountBalanceLib.BalanceCheckFlag.To) {\n            _balanceCheckFlag = AccountBalanceLib.BalanceCheckFlag.From;\n        } else if (_balanceCheckFlag == AccountBalanceLib.BalanceCheckFlag.From) {\n            _balanceCheckFlag = AccountBalanceLib.BalanceCheckFlag.To;\n        }\n\n        AccountActionLib.transfer(\n            DOLOMITE_MARGIN,\n            /* _borrowAccountOwner = */ msg.sender, // solium-disable-line\n            _borrowAccountNumber,\n            /* _toAccountOwner = */ msg.sender, // solium-disable-line\n            _fromAccountNumber,\n            _marketId,\n            Types.AssetAmount({\n                sign: false,\n                denomination: Types.AssetDenomination.Wei,\n                ref: Types.AssetReference.Target,\n                value: 0\n            }),\n            _balanceCheckFlag\n        );\n    }\n\n    // ==================== Internal Functions ====================\n\n    function _transferBetweenAccounts(\n        uint256 _fromAccountNumber,\n        uint256 _toAccountNumber,\n        uint256 _marketId,\n        uint256 _amountWei,\n        AccountBalanceLib.BalanceCheckFlag _balanceCheckFlag\n    ) internal {\n        AccountActionLib.transfer(\n            DOLOMITE_MARGIN,\n            /* _fromAccountOwner = */ msg.sender, // solium-disable-line\n            _fromAccountNumber,\n            /* _toAccountOwner = */ msg.sender, // solium-disable-line\n            _toAccountNumber,\n            _marketId,\n            Types.AssetAmount({\n                sign: false,\n                denomination: Types.AssetDenomination.Wei,\n                ref: Types.AssetReference.Delta,\n                value: _amountWei\n            }),\n            _balanceCheckFlag\n        );\n    }\n}\n",
  "sourcePath": "/home/cdc218/projects/dolomite-protocol-v2/contracts/external/proxies/BorrowPositionProxyV1.sol",
  "ast": {
    "absolutePath": "/home/cdc218/projects/dolomite-protocol-v2/contracts/external/proxies/BorrowPositionProxyV1.sol",
    "exportedSymbols": {
      "BorrowPositionProxyV1": [
        8839
      ]
    },
    "id": 8840,
    "nodeType": "SourceUnit",
    "nodes": [
      {
        "id": 8554,
        "literals": [
          "solidity",
          "^",
          "0.5",
          ".7"
        ],
        "nodeType": "PragmaDirective",
        "src": "595:23:46"
      },
      {
        "id": 8555,
        "literals": [
          "experimental",
          "ABIEncoderV2"
        ],
        "nodeType": "PragmaDirective",
        "src": "619:33:46"
      },
      {
        "absolutePath": "@openzeppelin/contracts/utils/Address.sol",
        "file": "@openzeppelin/contracts/utils/Address.sol",
        "id": 8557,
        "nodeType": "ImportDirective",
        "scope": 8840,
        "sourceUnit": 37848,
        "src": "654:68:46",
        "symbolAliases": [
          {
            "foreign": 8556,
            "local": null
          }
        ],
        "unitAlias": ""
      },
      {
        "absolutePath": "@openzeppelin/contracts/token/ERC20/IERC20.sol",
        "file": "@openzeppelin/contracts/token/ERC20/IERC20.sol",
        "id": 8559,
        "nodeType": "ImportDirective",
        "scope": 8840,
        "sourceUnit": 37553,
        "src": "723:72:46",
        "symbolAliases": [
          {
            "foreign": 8558,
            "local": null
          }
        ],
        "unitAlias": ""
      },
      {
        "absolutePath": "/home/cdc218/projects/dolomite-protocol-v2/contracts/protocol/lib/Account.sol",
        "file": "../../protocol/lib/Account.sol",
        "id": 8561,
        "nodeType": "ImportDirective",
        "scope": 8840,
        "sourceUnit": 24886,
        "src": "797:57:46",
        "symbolAliases": [
          {
            "foreign": 8560,
            "local": null
          }
        ],
        "unitAlias": ""
      },
      {
        "absolutePath": "/home/cdc218/projects/dolomite-protocol-v2/contracts/protocol/lib/Actions.sol",
        "file": "../../protocol/lib/Actions.sol",
        "id": 8563,
        "nodeType": "ImportDirective",
        "scope": 8840,
        "sourceUnit": 25370,
        "src": "855:57:46",
        "symbolAliases": [
          {
            "foreign": 8562,
            "local": null
          }
        ],
        "unitAlias": ""
      },
      {
        "absolutePath": "/home/cdc218/projects/dolomite-protocol-v2/contracts/protocol/lib/Require.sol",
        "file": "../../protocol/lib/Require.sol",
        "id": 8565,
        "nodeType": "ImportDirective",
        "scope": 8840,
        "sourceUnit": 28453,
        "src": "913:57:46",
        "symbolAliases": [
          {
            "foreign": 8564,
            "local": null
          }
        ],
        "unitAlias": ""
      },
      {
        "absolutePath": "/home/cdc218/projects/dolomite-protocol-v2/contracts/protocol/lib/Types.sol",
        "file": "../../protocol/lib/Types.sol",
        "id": 8567,
        "nodeType": "ImportDirective",
        "scope": 8840,
        "sourceUnit": 31362,
        "src": "971:53:46",
        "symbolAliases": [
          {
            "foreign": 8566,
            "local": null
          }
        ],
        "unitAlias": ""
      },
      {
        "absolutePath": "/home/cdc218/projects/dolomite-protocol-v2/contracts/external/helpers/OnlyDolomiteMargin.sol",
        "file": "../helpers/OnlyDolomiteMargin.sol",
        "id": 8569,
        "nodeType": "ImportDirective",
        "scope": 8840,
        "sourceUnit": 3067,
        "src": "1026:71:46",
        "symbolAliases": [
          {
            "foreign": 8568,
            "local": null
          }
        ],
        "unitAlias": ""
      },
      {
        "absolutePath": "/home/cdc218/projects/dolomite-protocol-v2/contracts/external/interfaces/IBorrowPositionProxyV1.sol",
        "file": "../interfaces/IBorrowPositionProxyV1.sol",
        "id": 8571,
        "nodeType": "ImportDirective",
        "scope": 8840,
        "sourceUnit": 4058,
        "src": "1098:82:46",
        "symbolAliases": [
          {
            "foreign": 8570,
            "local": null
          }
        ],
        "unitAlias": ""
      },
      {
        "absolutePath": "/home/cdc218/projects/dolomite-protocol-v2/contracts/external/lib/AccountActionLib.sol",
        "file": "../lib/AccountActionLib.sol",
        "id": 8573,
        "nodeType": "ImportDirective",
        "scope": 8840,
        "sourceUnit": 5820,
        "src": "1181:63:46",
        "symbolAliases": [
          {
            "foreign": 8572,
            "local": null
          }
        ],
        "unitAlias": ""
      },
      {
        "absolutePath": "/home/cdc218/projects/dolomite-protocol-v2/contracts/external/lib/AccountBalanceLib.sol",
        "file": "../lib/AccountBalanceLib.sol",
        "id": 8575,
        "nodeType": "ImportDirective",
        "scope": 8840,
        "sourceUnit": 5892,
        "src": "1245:65:46",
        "symbolAliases": [
          {
            "foreign": 8574,
            "local": null
          }
        ],
        "unitAlias": ""
      },
      {
        "baseContracts": [
          {
            "arguments": null,
            "baseName": {
              "contractScope": null,
              "id": 8576,
              "name": "IBorrowPositionProxyV1",
              "nodeType": "UserDefinedTypeName",
              "referencedDeclaration": 4057,
              "src": "1559:22:46",
              "typeDescriptions": {
                "typeIdentifier": "t_contract$_IBorrowPositionProxyV1_$4057",
                "typeString": "contract IBorrowPositionProxyV1"
              }
            },
            "id": 8577,
            "nodeType": "InheritanceSpecifier",
            "src": "1559:22:46"
          },
          {
            "arguments": null,
            "baseName": {
              "contractScope": null,
              "id": 8578,
              "name": "OnlyDolomiteMargin",
              "nodeType": "UserDefinedTypeName",
              "referencedDeclaration": 3066,
              "src": "1583:18:46",
              "typeDescriptions": {
                "typeIdentifier": "t_contract$_OnlyDolomiteMargin_$3066",
                "typeString": "contract OnlyDolomiteMargin"
              }
            },
            "id": 8579,
            "nodeType": "InheritanceSpecifier",
            "src": "1583:18:46"
          }
        ],
        "contractDependencies": [
          3066,
          4057
        ],
        "contractKind": "contract",
        "documentation": "@title   BorrowPositionProxyV1\n@author  Dolomite\n * @dev Proxy contract for opening borrow positions. This makes indexing easier and lowers gas costs on Arbitrum by\n     minimizing call data",
        "fullyImplemented": true,
        "id": 8839,
        "linearizedBaseContracts": [
          8839,
          3066,
          4057
        ],
        "name": "BorrowPositionProxyV1",
        "nodeType": "ContractDefinition",
        "nodes": [
          {
            "id": 8582,
            "libraryName": {
              "contractScope": null,
              "id": 8580,
              "name": "Types",
              "nodeType": "UserDefinedTypeName",
              "referencedDeclaration": 31361,
              "src": "1614:5:46",
              "typeDescriptions": {
                "typeIdentifier": "t_contract$_Types_$31361",
                "typeString": "library Types"
              }
            },
            "nodeType": "UsingForDirective",
            "src": "1608:26:46",
            "typeName": {
              "contractScope": null,
              "id": 8581,
              "name": "Types.Par",
              "nodeType": "UserDefinedTypeName",
              "referencedDeclaration": 30890,
              "src": "1624:9:46",
              "typeDescriptions": {
                "typeIdentifier": "t_struct$_Par_$30890_storage_ptr",
                "typeString": "struct Types.Par"
              }
            }
          },
          {
            "body": {
              "id": 8590,
              "nodeType": "Block",
              "src": "1745:2:46",
              "statements": []
            },
            "documentation": null,
            "id": 8591,
            "implemented": true,
            "kind": "constructor",
            "modifiers": [
              {
                "arguments": [
                  {
                    "argumentTypes": null,
                    "id": 8587,
                    "name": "dolomiteMargin",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 8584,
                    "src": "1725:14:46",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  }
                ],
                "id": 8588,
                "modifierName": {
                  "argumentTypes": null,
                  "id": 8586,
                  "name": "OnlyDolomiteMargin",
                  "nodeType": "Identifier",
                  "overloadedDeclarations": [],
                  "referencedDeclaration": 3066,
                  "src": "1706:18:46",
                  "typeDescriptions": {
                    "typeIdentifier": "t_type$_t_contract$_OnlyDolomiteMargin_$3066_$",
                    "typeString": "type(contract OnlyDolomiteMargin)"
                  }
                },
                "nodeType": "ModifierInvocation",
                "src": "1706:34:46"
              }
            ],
            "name": "",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 8585,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 8584,
                  "name": "dolomiteMargin",
                  "nodeType": "VariableDeclaration",
                  "scope": 8591,
                  "src": "1662:22:46",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 8583,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "1662:7:46",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "1652:38:46"
            },
            "returnParameters": {
              "id": 8589,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "1745:0:46"
            },
            "scope": 8839,
            "src": "1640:107:46",
            "stateMutability": "nonpayable",
            "superFunction": null,
            "visibility": "public"
          },
          {
            "body": {
              "id": 8618,
              "nodeType": "Block",
              "src": "1983:368:46",
              "statements": [
                {
                  "eventCall": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "expression": {
                          "argumentTypes": null,
                          "id": 8605,
                          "name": "msg",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 38107,
                          "src": "2130:3:46",
                          "typeDescriptions": {
                            "typeIdentifier": "t_magic_message",
                            "typeString": "msg"
                          }
                        },
                        "id": 8606,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "sender",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": null,
                        "src": "2130:10:46",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address_payable",
                          "typeString": "address payable"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 8607,
                        "name": "_toAccountNumber",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 8595,
                        "src": "2142:16:46",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_address_payable",
                          "typeString": "address payable"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      ],
                      "id": 8604,
                      "name": "BorrowPositionOpen",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 4009,
                      "src": "2111:18:46",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$",
                        "typeString": "function (address,uint256)"
                      }
                    },
                    "id": 8608,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "2111:48:46",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 8609,
                  "nodeType": "EmitStatement",
                  "src": "2106:53:46"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 8611,
                        "name": "_fromAccountNumber",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 8593,
                        "src": "2208:18:46",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 8612,
                        "name": "_toAccountNumber",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 8595,
                        "src": "2240:16:46",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 8613,
                        "name": "_marketId",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 8597,
                        "src": "2270:9:46",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 8614,
                        "name": "_amountWei",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 8599,
                        "src": "2293:10:46",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 8615,
                        "name": "_balanceCheckFlag",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 8601,
                        "src": "2317:17:46",
                        "typeDescriptions": {
                          "typeIdentifier": "t_enum$_BalanceCheckFlag_$5841",
                          "typeString": "enum AccountBalanceLib.BalanceCheckFlag"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        {
                          "typeIdentifier": "t_enum$_BalanceCheckFlag_$5841",
                          "typeString": "enum AccountBalanceLib.BalanceCheckFlag"
                        }
                      ],
                      "id": 8610,
                      "name": "_transferBetweenAccounts",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 8838,
                      "src": "2170:24:46",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$_t_enum$_BalanceCheckFlag_$5841_$returns$__$",
                        "typeString": "function (uint256,uint256,uint256,uint256,enum AccountBalanceLib.BalanceCheckFlag)"
                      }
                    },
                    "id": 8616,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "2170:174:46",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 8617,
                  "nodeType": "ExpressionStatement",
                  "src": "2170:174:46"
                }
              ]
            },
            "documentation": null,
            "id": 8619,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "openBorrowPosition",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 8602,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 8593,
                  "name": "_fromAccountNumber",
                  "nodeType": "VariableDeclaration",
                  "scope": 8619,
                  "src": "1790:26:46",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 8592,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "1790:7:46",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 8595,
                  "name": "_toAccountNumber",
                  "nodeType": "VariableDeclaration",
                  "scope": 8619,
                  "src": "1826:24:46",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 8594,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "1826:7:46",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 8597,
                  "name": "_marketId",
                  "nodeType": "VariableDeclaration",
                  "scope": 8619,
                  "src": "1860:17:46",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 8596,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "1860:7:46",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 8599,
                  "name": "_amountWei",
                  "nodeType": "VariableDeclaration",
                  "scope": 8619,
                  "src": "1887:18:46",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 8598,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "1887:7:46",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 8601,
                  "name": "_balanceCheckFlag",
                  "nodeType": "VariableDeclaration",
                  "scope": 8619,
                  "src": "1915:52:46",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_enum$_BalanceCheckFlag_$5841",
                    "typeString": "enum AccountBalanceLib.BalanceCheckFlag"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 8600,
                    "name": "AccountBalanceLib.BalanceCheckFlag",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 5841,
                    "src": "1915:34:46",
                    "typeDescriptions": {
                      "typeIdentifier": "t_enum$_BalanceCheckFlag_$5841",
                      "typeString": "enum AccountBalanceLib.BalanceCheckFlag"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "1780:193:46"
            },
            "returnParameters": {
              "id": 8603,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "1983:0:46"
            },
            "scope": 8839,
            "src": "1753:598:46",
            "stateMutability": "nonpayable",
            "superFunction": 4022,
            "visibility": "external"
          },
          {
            "body": {
              "id": 8713,
              "nodeType": "Block",
              "src": "2522:749:46",
              "statements": [
                {
                  "assignments": [
                    8633
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 8633,
                      "name": "accounts",
                      "nodeType": "VariableDeclaration",
                      "scope": 8713,
                      "src": "2532:30:46",
                      "stateVariable": false,
                      "storageLocation": "memory",
                      "typeDescriptions": {
                        "typeIdentifier": "t_array$_t_struct$_Info_$24851_memory_$dyn_memory_ptr",
                        "typeString": "struct Account.Info[]"
                      },
                      "typeName": {
                        "baseType": {
                          "contractScope": null,
                          "id": 8631,
                          "name": "Account.Info",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 24851,
                          "src": "2532:12:46",
                          "typeDescriptions": {
                            "typeIdentifier": "t_struct$_Info_$24851_storage_ptr",
                            "typeString": "struct Account.Info"
                          }
                        },
                        "id": 8632,
                        "length": null,
                        "nodeType": "ArrayTypeName",
                        "src": "2532:14:46",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_struct$_Info_$24851_storage_$dyn_storage_ptr",
                          "typeString": "struct Account.Info[]"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 8639,
                  "initialValue": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "hexValue": "32",
                        "id": 8637,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "number",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "2584:1:46",
                        "subdenomination": null,
                        "typeDescriptions": {
                          "typeIdentifier": "t_rational_2_by_1",
                          "typeString": "int_const 2"
                        },
                        "value": "2"
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_rational_2_by_1",
                          "typeString": "int_const 2"
                        }
                      ],
                      "id": 8636,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "lValueRequested": false,
                      "nodeType": "NewExpression",
                      "src": "2565:18:46",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_struct$_Info_$24851_memory_$dyn_memory_$",
                        "typeString": "function (uint256) pure returns (struct Account.Info memory[] memory)"
                      },
                      "typeName": {
                        "baseType": {
                          "contractScope": null,
                          "id": 8634,
                          "name": "Account.Info",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 24851,
                          "src": "2569:12:46",
                          "typeDescriptions": {
                            "typeIdentifier": "t_struct$_Info_$24851_storage_ptr",
                            "typeString": "struct Account.Info"
                          }
                        },
                        "id": 8635,
                        "length": null,
                        "nodeType": "ArrayTypeName",
                        "src": "2569:14:46",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_struct$_Info_$24851_storage_$dyn_storage_ptr",
                          "typeString": "struct Account.Info[]"
                        }
                      }
                    },
                    "id": 8638,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "2565:21:46",
                    "typeDescriptions": {
                      "typeIdentifier": "t_array$_t_struct$_Info_$24851_memory_$dyn_memory",
                      "typeString": "struct Account.Info memory[] memory"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "2532:54:46"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 8649,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "baseExpression": {
                        "argumentTypes": null,
                        "id": 8640,
                        "name": "accounts",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 8633,
                        "src": "2596:8:46",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_struct$_Info_$24851_memory_$dyn_memory_ptr",
                          "typeString": "struct Account.Info memory[] memory"
                        }
                      },
                      "id": 8642,
                      "indexExpression": {
                        "argumentTypes": null,
                        "hexValue": "30",
                        "id": 8641,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "number",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "2605:1:46",
                        "subdenomination": null,
                        "typeDescriptions": {
                          "typeIdentifier": "t_rational_0_by_1",
                          "typeString": "int_const 0"
                        },
                        "value": "0"
                      },
                      "isConstant": false,
                      "isLValue": true,
                      "isPure": false,
                      "lValueRequested": true,
                      "nodeType": "IndexAccess",
                      "src": "2596:11:46",
                      "typeDescriptions": {
                        "typeIdentifier": "t_struct$_Info_$24851_memory",
                        "typeString": "struct Account.Info memory"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "arguments": [
                        {
                          "argumentTypes": null,
                          "expression": {
                            "argumentTypes": null,
                            "id": 8645,
                            "name": "msg",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 38107,
                            "src": "2623:3:46",
                            "typeDescriptions": {
                              "typeIdentifier": "t_magic_message",
                              "typeString": "msg"
                            }
                          },
                          "id": 8646,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "sender",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": null,
                          "src": "2623:10:46",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address_payable",
                            "typeString": "address payable"
                          }
                        },
                        {
                          "argumentTypes": null,
                          "id": 8647,
                          "name": "_borrowAccountNumber",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 8621,
                          "src": "2635:20:46",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        }
                      ],
                      "expression": {
                        "argumentTypes": [
                          {
                            "typeIdentifier": "t_address_payable",
                            "typeString": "address payable"
                          },
                          {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        ],
                        "expression": {
                          "argumentTypes": null,
                          "id": 8643,
                          "name": "Account",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 24885,
                          "src": "2610:7:46",
                          "typeDescriptions": {
                            "typeIdentifier": "t_type$_t_contract$_Account_$24885_$",
                            "typeString": "type(library Account)"
                          }
                        },
                        "id": 8644,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "Info",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": 24851,
                        "src": "2610:12:46",
                        "typeDescriptions": {
                          "typeIdentifier": "t_type$_t_struct$_Info_$24851_storage_ptr_$",
                          "typeString": "type(struct Account.Info storage pointer)"
                        }
                      },
                      "id": 8648,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "kind": "structConstructorCall",
                      "lValueRequested": false,
                      "names": [],
                      "nodeType": "FunctionCall",
                      "src": "2610:46:46",
                      "typeDescriptions": {
                        "typeIdentifier": "t_struct$_Info_$24851_memory",
                        "typeString": "struct Account.Info memory"
                      }
                    },
                    "src": "2596:60:46",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_Info_$24851_memory",
                      "typeString": "struct Account.Info memory"
                    }
                  },
                  "id": 8650,
                  "nodeType": "ExpressionStatement",
                  "src": "2596:60:46"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 8660,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "baseExpression": {
                        "argumentTypes": null,
                        "id": 8651,
                        "name": "accounts",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 8633,
                        "src": "2666:8:46",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_struct$_Info_$24851_memory_$dyn_memory_ptr",
                          "typeString": "struct Account.Info memory[] memory"
                        }
                      },
                      "id": 8653,
                      "indexExpression": {
                        "argumentTypes": null,
                        "hexValue": "31",
                        "id": 8652,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "number",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "2675:1:46",
                        "subdenomination": null,
                        "typeDescriptions": {
                          "typeIdentifier": "t_rational_1_by_1",
                          "typeString": "int_const 1"
                        },
                        "value": "1"
                      },
                      "isConstant": false,
                      "isLValue": true,
                      "isPure": false,
                      "lValueRequested": true,
                      "nodeType": "IndexAccess",
                      "src": "2666:11:46",
                      "typeDescriptions": {
                        "typeIdentifier": "t_struct$_Info_$24851_memory",
                        "typeString": "struct Account.Info memory"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "arguments": [
                        {
                          "argumentTypes": null,
                          "expression": {
                            "argumentTypes": null,
                            "id": 8656,
                            "name": "msg",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 38107,
                            "src": "2693:3:46",
                            "typeDescriptions": {
                              "typeIdentifier": "t_magic_message",
                              "typeString": "msg"
                            }
                          },
                          "id": 8657,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "sender",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": null,
                          "src": "2693:10:46",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address_payable",
                            "typeString": "address payable"
                          }
                        },
                        {
                          "argumentTypes": null,
                          "id": 8658,
                          "name": "_toAccountNumber",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 8623,
                          "src": "2705:16:46",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        }
                      ],
                      "expression": {
                        "argumentTypes": [
                          {
                            "typeIdentifier": "t_address_payable",
                            "typeString": "address payable"
                          },
                          {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        ],
                        "expression": {
                          "argumentTypes": null,
                          "id": 8654,
                          "name": "Account",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 24885,
                          "src": "2680:7:46",
                          "typeDescriptions": {
                            "typeIdentifier": "t_type$_t_contract$_Account_$24885_$",
                            "typeString": "type(library Account)"
                          }
                        },
                        "id": 8655,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "Info",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": 24851,
                        "src": "2680:12:46",
                        "typeDescriptions": {
                          "typeIdentifier": "t_type$_t_struct$_Info_$24851_storage_ptr_$",
                          "typeString": "type(struct Account.Info storage pointer)"
                        }
                      },
                      "id": 8659,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "kind": "structConstructorCall",
                      "lValueRequested": false,
                      "names": [],
                      "nodeType": "FunctionCall",
                      "src": "2680:42:46",
                      "typeDescriptions": {
                        "typeIdentifier": "t_struct$_Info_$24851_memory",
                        "typeString": "struct Account.Info memory"
                      }
                    },
                    "src": "2666:56:46",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_Info_$24851_memory",
                      "typeString": "struct Account.Info memory"
                    }
                  },
                  "id": 8661,
                  "nodeType": "ExpressionStatement",
                  "src": "2666:56:46"
                },
                {
                  "assignments": [
                    8663
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 8663,
                      "name": "marketIdsLength",
                      "nodeType": "VariableDeclaration",
                      "scope": 8713,
                      "src": "2733:23:46",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 8662,
                        "name": "uint256",
                        "nodeType": "ElementaryTypeName",
                        "src": "2733:7:46",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 8666,
                  "initialValue": {
                    "argumentTypes": null,
                    "expression": {
                      "argumentTypes": null,
                      "id": 8664,
                      "name": "_collateralMarketIds",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 8626,
                      "src": "2759:20:46",
                      "typeDescriptions": {
                        "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr",
                        "typeString": "uint256[] calldata"
                      }
                    },
                    "id": 8665,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "memberName": "length",
                    "nodeType": "MemberAccess",
                    "referencedDeclaration": null,
                    "src": "2759:27:46",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "2733:53:46"
                },
                {
                  "assignments": [
                    8671
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 8671,
                      "name": "actions",
                      "nodeType": "VariableDeclaration",
                      "scope": 8713,
                      "src": "2796:35:46",
                      "stateVariable": false,
                      "storageLocation": "memory",
                      "typeDescriptions": {
                        "typeIdentifier": "t_array$_t_struct$_ActionArgs_$24930_memory_$dyn_memory_ptr",
                        "typeString": "struct Actions.ActionArgs[]"
                      },
                      "typeName": {
                        "baseType": {
                          "contractScope": null,
                          "id": 8669,
                          "name": "Actions.ActionArgs",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 24930,
                          "src": "2796:18:46",
                          "typeDescriptions": {
                            "typeIdentifier": "t_struct$_ActionArgs_$24930_storage_ptr",
                            "typeString": "struct Actions.ActionArgs"
                          }
                        },
                        "id": 8670,
                        "length": null,
                        "nodeType": "ArrayTypeName",
                        "src": "2796:20:46",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_struct$_ActionArgs_$24930_storage_$dyn_storage_ptr",
                          "typeString": "struct Actions.ActionArgs[]"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 8677,
                  "initialValue": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 8675,
                        "name": "marketIdsLength",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 8663,
                        "src": "2859:15:46",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      ],
                      "id": 8674,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "lValueRequested": false,
                      "nodeType": "NewExpression",
                      "src": "2834:24:46",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_struct$_ActionArgs_$24930_memory_$dyn_memory_$",
                        "typeString": "function (uint256) pure returns (struct Actions.ActionArgs memory[] memory)"
                      },
                      "typeName": {
                        "baseType": {
                          "contractScope": null,
                          "id": 8672,
                          "name": "Actions.ActionArgs",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 24930,
                          "src": "2838:18:46",
                          "typeDescriptions": {
                            "typeIdentifier": "t_struct$_ActionArgs_$24930_storage_ptr",
                            "typeString": "struct Actions.ActionArgs"
                          }
                        },
                        "id": 8673,
                        "length": null,
                        "nodeType": "ArrayTypeName",
                        "src": "2838:20:46",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_struct$_ActionArgs_$24930_storage_$dyn_storage_ptr",
                          "typeString": "struct Actions.ActionArgs[]"
                        }
                      }
                    },
                    "id": 8676,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "2834:41:46",
                    "typeDescriptions": {
                      "typeIdentifier": "t_array$_t_struct$_ActionArgs_$24930_memory_$dyn_memory",
                      "typeString": "struct Actions.ActionArgs memory[] memory"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "2796:79:46"
                },
                {
                  "body": {
                    "id": 8704,
                    "nodeType": "Block",
                    "src": "2927:285:46",
                    "statements": [
                      {
                        "expression": {
                          "argumentTypes": null,
                          "id": 8702,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "argumentTypes": null,
                            "baseExpression": {
                              "argumentTypes": null,
                              "id": 8687,
                              "name": "actions",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 8671,
                              "src": "2941:7:46",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_struct$_ActionArgs_$24930_memory_$dyn_memory_ptr",
                                "typeString": "struct Actions.ActionArgs memory[] memory"
                              }
                            },
                            "id": 8689,
                            "indexExpression": {
                              "argumentTypes": null,
                              "id": 8688,
                              "name": "i",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 8679,
                              "src": "2949:1:46",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "isConstant": false,
                            "isLValue": true,
                            "isPure": false,
                            "lValueRequested": true,
                            "nodeType": "IndexAccess",
                            "src": "2941:10:46",
                            "typeDescriptions": {
                              "typeIdentifier": "t_struct$_ActionArgs_$24930_memory",
                              "typeString": "struct Actions.ActionArgs memory"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "argumentTypes": null,
                            "arguments": [
                              {
                                "argumentTypes": null,
                                "hexValue": "30",
                                "id": 8692,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "number",
                                "lValueRequested": false,
                                "nodeType": "Literal",
                                "src": "3032:1:46",
                                "subdenomination": null,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_rational_0_by_1",
                                  "typeString": "int_const 0"
                                },
                                "value": "0"
                              },
                              {
                                "argumentTypes": null,
                                "hexValue": "31",
                                "id": 8693,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "number",
                                "lValueRequested": false,
                                "nodeType": "Literal",
                                "src": "3095:1:46",
                                "subdenomination": null,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_rational_1_by_1",
                                  "typeString": "int_const 1"
                                },
                                "value": "1"
                              },
                              {
                                "argumentTypes": null,
                                "baseExpression": {
                                  "argumentTypes": null,
                                  "id": 8694,
                                  "name": "_collateralMarketIds",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 8626,
                                  "src": "3137:20:46",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr",
                                    "typeString": "uint256[] calldata"
                                  }
                                },
                                "id": 8696,
                                "indexExpression": {
                                  "argumentTypes": null,
                                  "id": 8695,
                                  "name": "i",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 8679,
                                  "src": "3158:1:46",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "nodeType": "IndexAccess",
                                "src": "3137:23:46",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              {
                                "argumentTypes": null,
                                "arguments": [
                                  {
                                    "argumentTypes": null,
                                    "id": 8699,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": true,
                                    "lValueRequested": false,
                                    "nodeType": "UnaryOperation",
                                    "operator": "-",
                                    "prefix": true,
                                    "src": "3183:3:46",
                                    "subExpression": {
                                      "argumentTypes": null,
                                      "hexValue": "31",
                                      "id": 8698,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": true,
                                      "kind": "number",
                                      "lValueRequested": false,
                                      "nodeType": "Literal",
                                      "src": "3185:1:46",
                                      "subdenomination": null,
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_rational_1_by_1",
                                        "typeString": "int_const 1"
                                      },
                                      "value": "1"
                                    },
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_rational_minus_1_by_1",
                                      "typeString": "int_const -1"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_rational_minus_1_by_1",
                                      "typeString": "int_const -1"
                                    }
                                  ],
                                  "id": 8697,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "lValueRequested": false,
                                  "nodeType": "ElementaryTypeNameExpression",
                                  "src": "3178:4:46",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_type$_t_uint256_$",
                                    "typeString": "type(uint256)"
                                  },
                                  "typeName": "uint"
                                },
                                "id": 8700,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "typeConversion",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "3178:9:46",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_rational_0_by_1",
                                  "typeString": "int_const 0"
                                },
                                {
                                  "typeIdentifier": "t_rational_1_by_1",
                                  "typeString": "int_const 1"
                                },
                                {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                },
                                {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              ],
                              "expression": {
                                "argumentTypes": null,
                                "id": 8690,
                                "name": "AccountActionLib",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 5819,
                                "src": "2954:16:46",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_contract$_AccountActionLib_$5819_$",
                                  "typeString": "type(library AccountActionLib)"
                                }
                              },
                              "id": 8691,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "encodeTransferAction",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 5744,
                              "src": "2954:37:46",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_struct$_ActionArgs_$24930_memory_ptr_$",
                                "typeString": "function (uint256,uint256,uint256,uint256) pure returns (struct Actions.ActionArgs memory)"
                              }
                            },
                            "id": 8701,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "2954:247:46",
                            "typeDescriptions": {
                              "typeIdentifier": "t_struct$_ActionArgs_$24930_memory_ptr",
                              "typeString": "struct Actions.ActionArgs memory"
                            }
                          },
                          "src": "2941:260:46",
                          "typeDescriptions": {
                            "typeIdentifier": "t_struct$_ActionArgs_$24930_memory",
                            "typeString": "struct Actions.ActionArgs memory"
                          }
                        },
                        "id": 8703,
                        "nodeType": "ExpressionStatement",
                        "src": "2941:260:46"
                      }
                    ]
                  },
                  "condition": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 8683,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "id": 8681,
                      "name": "i",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 8679,
                      "src": "2901:1:46",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "<",
                    "rightExpression": {
                      "argumentTypes": null,
                      "id": 8682,
                      "name": "marketIdsLength",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 8663,
                      "src": "2905:15:46",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "2901:19:46",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "id": 8705,
                  "initializationExpression": {
                    "assignments": [
                      8679
                    ],
                    "declarations": [
                      {
                        "constant": false,
                        "id": 8679,
                        "name": "i",
                        "nodeType": "VariableDeclaration",
                        "scope": 8705,
                        "src": "2890:9:46",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 8678,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "2890:7:46",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "value": null,
                        "visibility": "internal"
                      }
                    ],
                    "id": 8680,
                    "initialValue": null,
                    "nodeType": "VariableDeclarationStatement",
                    "src": "2890:9:46"
                  },
                  "loopExpression": {
                    "expression": {
                      "argumentTypes": null,
                      "id": 8685,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "nodeType": "UnaryOperation",
                      "operator": "++",
                      "prefix": true,
                      "src": "2922:3:46",
                      "subExpression": {
                        "argumentTypes": null,
                        "id": 8684,
                        "name": "i",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 8679,
                        "src": "2924:1:46",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "id": 8686,
                    "nodeType": "ExpressionStatement",
                    "src": "2922:3:46"
                  },
                  "nodeType": "ForStatement",
                  "src": "2885:327:46"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 8709,
                        "name": "accounts",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 8633,
                        "src": "3246:8:46",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_struct$_Info_$24851_memory_$dyn_memory_ptr",
                          "typeString": "struct Account.Info memory[] memory"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 8710,
                        "name": "actions",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 8671,
                        "src": "3256:7:46",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_struct$_ActionArgs_$24930_memory_$dyn_memory_ptr",
                          "typeString": "struct Actions.ActionArgs memory[] memory"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_array$_t_struct$_Info_$24851_memory_$dyn_memory_ptr",
                          "typeString": "struct Account.Info memory[] memory"
                        },
                        {
                          "typeIdentifier": "t_array$_t_struct$_ActionArgs_$24930_memory_$dyn_memory_ptr",
                          "typeString": "struct Actions.ActionArgs memory[] memory"
                        }
                      ],
                      "expression": {
                        "argumentTypes": null,
                        "id": 8706,
                        "name": "DOLOMITE_MARGIN",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2997,
                        "src": "3222:15:46",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_IDolomiteMargin_$24693",
                          "typeString": "contract IDolomiteMargin"
                        }
                      },
                      "id": 8708,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "operate",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 24512,
                      "src": "3222:23:46",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_external_nonpayable$_t_array$_t_struct$_Info_$24851_memory_$dyn_memory_ptr_$_t_array$_t_struct$_ActionArgs_$24930_memory_$dyn_memory_ptr_$returns$__$",
                        "typeString": "function (struct Account.Info memory[] memory,struct Actions.ActionArgs memory[] memory) external"
                      }
                    },
                    "id": 8711,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "3222:42:46",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 8712,
                  "nodeType": "ExpressionStatement",
                  "src": "3222:42:46"
                }
              ]
            },
            "documentation": null,
            "id": 8714,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "closeBorrowPosition",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 8627,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 8621,
                  "name": "_borrowAccountNumber",
                  "nodeType": "VariableDeclaration",
                  "scope": 8714,
                  "src": "2395:28:46",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 8620,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "2395:7:46",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 8623,
                  "name": "_toAccountNumber",
                  "nodeType": "VariableDeclaration",
                  "scope": 8714,
                  "src": "2433:24:46",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 8622,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "2433:7:46",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 8626,
                  "name": "_collateralMarketIds",
                  "nodeType": "VariableDeclaration",
                  "scope": 8714,
                  "src": "2467:39:46",
                  "stateVariable": false,
                  "storageLocation": "calldata",
                  "typeDescriptions": {
                    "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr",
                    "typeString": "uint256[]"
                  },
                  "typeName": {
                    "baseType": {
                      "id": 8624,
                      "name": "uint256",
                      "nodeType": "ElementaryTypeName",
                      "src": "2467:7:46",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "id": 8625,
                    "length": null,
                    "nodeType": "ArrayTypeName",
                    "src": "2467:9:46",
                    "typeDescriptions": {
                      "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                      "typeString": "uint256[]"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "2385:127:46"
            },
            "returnParameters": {
              "id": 8628,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "2522:0:46"
            },
            "scope": 8839,
            "src": "2357:914:46",
            "stateMutability": "nonpayable",
            "superFunction": 4032,
            "visibility": "external"
          },
          {
            "body": {
              "id": 8735,
              "nodeType": "Block",
              "src": "3512:191:46",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 8728,
                        "name": "_fromAccountNumber",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 8716,
                        "src": "3560:18:46",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 8729,
                        "name": "_toAccountNumber",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 8718,
                        "src": "3592:16:46",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 8730,
                        "name": "_marketId",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 8720,
                        "src": "3622:9:46",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 8731,
                        "name": "_amountWei",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 8722,
                        "src": "3645:10:46",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 8732,
                        "name": "_balanceCheckFlag",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 8724,
                        "src": "3669:17:46",
                        "typeDescriptions": {
                          "typeIdentifier": "t_enum$_BalanceCheckFlag_$5841",
                          "typeString": "enum AccountBalanceLib.BalanceCheckFlag"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        {
                          "typeIdentifier": "t_enum$_BalanceCheckFlag_$5841",
                          "typeString": "enum AccountBalanceLib.BalanceCheckFlag"
                        }
                      ],
                      "id": 8727,
                      "name": "_transferBetweenAccounts",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 8838,
                      "src": "3522:24:46",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$_t_enum$_BalanceCheckFlag_$5841_$returns$__$",
                        "typeString": "function (uint256,uint256,uint256,uint256,enum AccountBalanceLib.BalanceCheckFlag)"
                      }
                    },
                    "id": 8733,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "3522:174:46",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 8734,
                  "nodeType": "ExpressionStatement",
                  "src": "3522:174:46"
                }
              ]
            },
            "documentation": null,
            "id": 8736,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "transferBetweenAccounts",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 8725,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 8716,
                  "name": "_fromAccountNumber",
                  "nodeType": "VariableDeclaration",
                  "scope": 8736,
                  "src": "3319:26:46",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 8715,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "3319:7:46",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 8718,
                  "name": "_toAccountNumber",
                  "nodeType": "VariableDeclaration",
                  "scope": 8736,
                  "src": "3355:24:46",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 8717,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "3355:7:46",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 8720,
                  "name": "_marketId",
                  "nodeType": "VariableDeclaration",
                  "scope": 8736,
                  "src": "3389:17:46",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 8719,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "3389:7:46",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 8722,
                  "name": "_amountWei",
                  "nodeType": "VariableDeclaration",
                  "scope": 8736,
                  "src": "3416:18:46",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 8721,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "3416:7:46",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 8724,
                  "name": "_balanceCheckFlag",
                  "nodeType": "VariableDeclaration",
                  "scope": 8736,
                  "src": "3444:52:46",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_enum$_BalanceCheckFlag_$5841",
                    "typeString": "enum AccountBalanceLib.BalanceCheckFlag"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 8723,
                    "name": "AccountBalanceLib.BalanceCheckFlag",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 5841,
                    "src": "3444:34:46",
                    "typeDescriptions": {
                      "typeIdentifier": "t_enum$_BalanceCheckFlag_$5841",
                      "typeString": "enum AccountBalanceLib.BalanceCheckFlag"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "3309:193:46"
            },
            "returnParameters": {
              "id": 8726,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "3512:0:46"
            },
            "scope": 8839,
            "src": "3277:426:46",
            "stateMutability": "nonpayable",
            "superFunction": 4045,
            "visibility": "external"
          },
          {
            "body": {
              "id": 8798,
              "nodeType": "Block",
              "src": "3980:1136:46",
              "statements": [
                {
                  "condition": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_enum$_BalanceCheckFlag_$5841",
                      "typeString": "enum AccountBalanceLib.BalanceCheckFlag"
                    },
                    "id": 8751,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "id": 8747,
                      "name": "_balanceCheckFlag",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 8744,
                      "src": "4260:17:46",
                      "typeDescriptions": {
                        "typeIdentifier": "t_enum$_BalanceCheckFlag_$5841",
                        "typeString": "enum AccountBalanceLib.BalanceCheckFlag"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "==",
                    "rightExpression": {
                      "argumentTypes": null,
                      "expression": {
                        "argumentTypes": null,
                        "expression": {
                          "argumentTypes": null,
                          "id": 8748,
                          "name": "AccountBalanceLib",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 5891,
                          "src": "4281:17:46",
                          "typeDescriptions": {
                            "typeIdentifier": "t_type$_t_contract$_AccountBalanceLib_$5891_$",
                            "typeString": "type(library AccountBalanceLib)"
                          }
                        },
                        "id": 8749,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "BalanceCheckFlag",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": 5841,
                        "src": "4281:34:46",
                        "typeDescriptions": {
                          "typeIdentifier": "t_type$_t_enum$_BalanceCheckFlag_$5841_$",
                          "typeString": "type(enum AccountBalanceLib.BalanceCheckFlag)"
                        }
                      },
                      "id": 8750,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "lValueRequested": false,
                      "memberName": "To",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": null,
                      "src": "4281:37:46",
                      "typeDescriptions": {
                        "typeIdentifier": "t_enum$_BalanceCheckFlag_$5841",
                        "typeString": "enum AccountBalanceLib.BalanceCheckFlag"
                      }
                    },
                    "src": "4260:58:46",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "falseBody": {
                    "condition": {
                      "argumentTypes": null,
                      "commonType": {
                        "typeIdentifier": "t_enum$_BalanceCheckFlag_$5841",
                        "typeString": "enum AccountBalanceLib.BalanceCheckFlag"
                      },
                      "id": 8763,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "leftExpression": {
                        "argumentTypes": null,
                        "id": 8759,
                        "name": "_balanceCheckFlag",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 8744,
                        "src": "4414:17:46",
                        "typeDescriptions": {
                          "typeIdentifier": "t_enum$_BalanceCheckFlag_$5841",
                          "typeString": "enum AccountBalanceLib.BalanceCheckFlag"
                        }
                      },
                      "nodeType": "BinaryOperation",
                      "operator": "==",
                      "rightExpression": {
                        "argumentTypes": null,
                        "expression": {
                          "argumentTypes": null,
                          "expression": {
                            "argumentTypes": null,
                            "id": 8760,
                            "name": "AccountBalanceLib",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 5891,
                            "src": "4435:17:46",
                            "typeDescriptions": {
                              "typeIdentifier": "t_type$_t_contract$_AccountBalanceLib_$5891_$",
                              "typeString": "type(library AccountBalanceLib)"
                            }
                          },
                          "id": 8761,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "BalanceCheckFlag",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": 5841,
                          "src": "4435:34:46",
                          "typeDescriptions": {
                            "typeIdentifier": "t_type$_t_enum$_BalanceCheckFlag_$5841_$",
                            "typeString": "type(enum AccountBalanceLib.BalanceCheckFlag)"
                          }
                        },
                        "id": 8762,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "lValueRequested": false,
                        "memberName": "From",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": null,
                        "src": "4435:39:46",
                        "typeDescriptions": {
                          "typeIdentifier": "t_enum$_BalanceCheckFlag_$5841",
                          "typeString": "enum AccountBalanceLib.BalanceCheckFlag"
                        }
                      },
                      "src": "4414:60:46",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bool",
                        "typeString": "bool"
                      }
                    },
                    "falseBody": null,
                    "id": 8771,
                    "nodeType": "IfStatement",
                    "src": "4410:148:46",
                    "trueBody": {
                      "id": 8770,
                      "nodeType": "Block",
                      "src": "4476:82:46",
                      "statements": [
                        {
                          "expression": {
                            "argumentTypes": null,
                            "id": 8768,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "leftHandSide": {
                              "argumentTypes": null,
                              "id": 8764,
                              "name": "_balanceCheckFlag",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 8744,
                              "src": "4490:17:46",
                              "typeDescriptions": {
                                "typeIdentifier": "t_enum$_BalanceCheckFlag_$5841",
                                "typeString": "enum AccountBalanceLib.BalanceCheckFlag"
                              }
                            },
                            "nodeType": "Assignment",
                            "operator": "=",
                            "rightHandSide": {
                              "argumentTypes": null,
                              "expression": {
                                "argumentTypes": null,
                                "expression": {
                                  "argumentTypes": null,
                                  "id": 8765,
                                  "name": "AccountBalanceLib",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 5891,
                                  "src": "4510:17:46",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_type$_t_contract$_AccountBalanceLib_$5891_$",
                                    "typeString": "type(library AccountBalanceLib)"
                                  }
                                },
                                "id": 8766,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "BalanceCheckFlag",
                                "nodeType": "MemberAccess",
                                "referencedDeclaration": 5841,
                                "src": "4510:34:46",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_enum$_BalanceCheckFlag_$5841_$",
                                  "typeString": "type(enum AccountBalanceLib.BalanceCheckFlag)"
                                }
                              },
                              "id": 8767,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "memberName": "To",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": null,
                              "src": "4510:37:46",
                              "typeDescriptions": {
                                "typeIdentifier": "t_enum$_BalanceCheckFlag_$5841",
                                "typeString": "enum AccountBalanceLib.BalanceCheckFlag"
                              }
                            },
                            "src": "4490:57:46",
                            "typeDescriptions": {
                              "typeIdentifier": "t_enum$_BalanceCheckFlag_$5841",
                              "typeString": "enum AccountBalanceLib.BalanceCheckFlag"
                            }
                          },
                          "id": 8769,
                          "nodeType": "ExpressionStatement",
                          "src": "4490:57:46"
                        }
                      ]
                    }
                  },
                  "id": 8772,
                  "nodeType": "IfStatement",
                  "src": "4256:302:46",
                  "trueBody": {
                    "id": 8758,
                    "nodeType": "Block",
                    "src": "4320:84:46",
                    "statements": [
                      {
                        "expression": {
                          "argumentTypes": null,
                          "id": 8756,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "argumentTypes": null,
                            "id": 8752,
                            "name": "_balanceCheckFlag",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 8744,
                            "src": "4334:17:46",
                            "typeDescriptions": {
                              "typeIdentifier": "t_enum$_BalanceCheckFlag_$5841",
                              "typeString": "enum AccountBalanceLib.BalanceCheckFlag"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "argumentTypes": null,
                            "expression": {
                              "argumentTypes": null,
                              "expression": {
                                "argumentTypes": null,
                                "id": 8753,
                                "name": "AccountBalanceLib",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 5891,
                                "src": "4354:17:46",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_contract$_AccountBalanceLib_$5891_$",
                                  "typeString": "type(library AccountBalanceLib)"
                                }
                              },
                              "id": 8754,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "BalanceCheckFlag",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 5841,
                              "src": "4354:34:46",
                              "typeDescriptions": {
                                "typeIdentifier": "t_type$_t_enum$_BalanceCheckFlag_$5841_$",
                                "typeString": "type(enum AccountBalanceLib.BalanceCheckFlag)"
                              }
                            },
                            "id": 8755,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "lValueRequested": false,
                            "memberName": "From",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": null,
                            "src": "4354:39:46",
                            "typeDescriptions": {
                              "typeIdentifier": "t_enum$_BalanceCheckFlag_$5841",
                              "typeString": "enum AccountBalanceLib.BalanceCheckFlag"
                            }
                          },
                          "src": "4334:59:46",
                          "typeDescriptions": {
                            "typeIdentifier": "t_enum$_BalanceCheckFlag_$5841",
                            "typeString": "enum AccountBalanceLib.BalanceCheckFlag"
                          }
                        },
                        "id": 8757,
                        "nodeType": "ExpressionStatement",
                        "src": "4334:59:46"
                      }
                    ]
                  }
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 8776,
                        "name": "DOLOMITE_MARGIN",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2997,
                        "src": "4607:15:46",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_IDolomiteMargin_$24693",
                          "typeString": "contract IDolomiteMargin"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "expression": {
                          "argumentTypes": null,
                          "id": 8777,
                          "name": "msg",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 38107,
                          "src": "4664:3:46",
                          "typeDescriptions": {
                            "typeIdentifier": "t_magic_message",
                            "typeString": "msg"
                          }
                        },
                        "id": 8778,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "sender",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": null,
                        "src": "4664:10:46",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address_payable",
                          "typeString": "address payable"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 8779,
                        "name": "_borrowAccountNumber",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 8740,
                        "src": "4711:20:46",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "expression": {
                          "argumentTypes": null,
                          "id": 8780,
                          "name": "msg",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 38107,
                          "src": "4769:3:46",
                          "typeDescriptions": {
                            "typeIdentifier": "t_magic_message",
                            "typeString": "msg"
                          }
                        },
                        "id": 8781,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "sender",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": null,
                        "src": "4769:10:46",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address_payable",
                          "typeString": "address payable"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 8782,
                        "name": "_fromAccountNumber",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 8738,
                        "src": "4816:18:46",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 8783,
                        "name": "_marketId",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 8742,
                        "src": "4848:9:46",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "arguments": [
                          {
                            "argumentTypes": null,
                            "hexValue": "66616c7365",
                            "id": 8786,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "bool",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "4913:5:46",
                            "subdenomination": null,
                            "typeDescriptions": {
                              "typeIdentifier": "t_bool",
                              "typeString": "bool"
                            },
                            "value": "false"
                          },
                          {
                            "argumentTypes": null,
                            "expression": {
                              "argumentTypes": null,
                              "expression": {
                                "argumentTypes": null,
                                "id": 8787,
                                "name": "Types",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 31361,
                                "src": "4950:5:46",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_contract$_Types_$31361_$",
                                  "typeString": "type(library Types)"
                                }
                              },
                              "id": 8788,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "AssetDenomination",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 30868,
                              "src": "4950:23:46",
                              "typeDescriptions": {
                                "typeIdentifier": "t_type$_t_enum$_AssetDenomination_$30868_$",
                                "typeString": "type(enum Types.AssetDenomination)"
                              }
                            },
                            "id": 8789,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "lValueRequested": false,
                            "memberName": "Wei",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": null,
                            "src": "4950:27:46",
                            "typeDescriptions": {
                              "typeIdentifier": "t_enum$_AssetDenomination_$30868",
                              "typeString": "enum Types.AssetDenomination"
                            }
                          },
                          {
                            "argumentTypes": null,
                            "expression": {
                              "argumentTypes": null,
                              "expression": {
                                "argumentTypes": null,
                                "id": 8790,
                                "name": "Types",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 31361,
                                "src": "5000:5:46",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_contract$_Types_$31361_$",
                                  "typeString": "type(library Types)"
                                }
                              },
                              "id": 8791,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "AssetReference",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 30871,
                              "src": "5000:20:46",
                              "typeDescriptions": {
                                "typeIdentifier": "t_type$_t_enum$_AssetReference_$30871_$",
                                "typeString": "type(enum Types.AssetReference)"
                              }
                            },
                            "id": 8792,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "lValueRequested": false,
                            "memberName": "Target",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": null,
                            "src": "5000:27:46",
                            "typeDescriptions": {
                              "typeIdentifier": "t_enum$_AssetReference_$30871",
                              "typeString": "enum Types.AssetReference"
                            }
                          },
                          {
                            "argumentTypes": null,
                            "hexValue": "30",
                            "id": 8793,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "5052:1:46",
                            "subdenomination": null,
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_0_by_1",
                              "typeString": "int_const 0"
                            },
                            "value": "0"
                          }
                        ],
                        "expression": {
                          "argumentTypes": [
                            {
                              "typeIdentifier": "t_bool",
                              "typeString": "bool"
                            },
                            {
                              "typeIdentifier": "t_enum$_AssetDenomination_$30868",
                              "typeString": "enum Types.AssetDenomination"
                            },
                            {
                              "typeIdentifier": "t_enum$_AssetReference_$30871",
                              "typeString": "enum Types.AssetReference"
                            },
                            {
                              "typeIdentifier": "t_rational_0_by_1",
                              "typeString": "int_const 0"
                            }
                          ],
                          "expression": {
                            "argumentTypes": null,
                            "id": 8784,
                            "name": "Types",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 31361,
                            "src": "4871:5:46",
                            "typeDescriptions": {
                              "typeIdentifier": "t_type$_t_contract$_Types_$31361_$",
                              "typeString": "type(library Types)"
                            }
                          },
                          "id": 8785,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "AssetAmount",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": 30880,
                          "src": "4871:17:46",
                          "typeDescriptions": {
                            "typeIdentifier": "t_type$_t_struct$_AssetAmount_$30880_storage_ptr_$",
                            "typeString": "type(struct Types.AssetAmount storage pointer)"
                          }
                        },
                        "id": 8794,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "structConstructorCall",
                        "lValueRequested": false,
                        "names": [
                          "sign",
                          "denomination",
                          "ref",
                          "value"
                        ],
                        "nodeType": "FunctionCall",
                        "src": "4871:197:46",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_AssetAmount_$30880_memory",
                          "typeString": "struct Types.AssetAmount memory"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 8795,
                        "name": "_balanceCheckFlag",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 8744,
                        "src": "5082:17:46",
                        "typeDescriptions": {
                          "typeIdentifier": "t_enum$_BalanceCheckFlag_$5841",
                          "typeString": "enum AccountBalanceLib.BalanceCheckFlag"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_contract$_IDolomiteMargin_$24693",
                          "typeString": "contract IDolomiteMargin"
                        },
                        {
                          "typeIdentifier": "t_address_payable",
                          "typeString": "address payable"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        {
                          "typeIdentifier": "t_address_payable",
                          "typeString": "address payable"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        {
                          "typeIdentifier": "t_struct$_AssetAmount_$30880_memory",
                          "typeString": "struct Types.AssetAmount memory"
                        },
                        {
                          "typeIdentifier": "t_enum$_BalanceCheckFlag_$5841",
                          "typeString": "enum AccountBalanceLib.BalanceCheckFlag"
                        }
                      ],
                      "expression": {
                        "argumentTypes": null,
                        "id": 8773,
                        "name": "AccountActionLib",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 5819,
                        "src": "4568:16:46",
                        "typeDescriptions": {
                          "typeIdentifier": "t_type$_t_contract$_AccountActionLib_$5819_$",
                          "typeString": "type(library AccountActionLib)"
                        }
                      },
                      "id": 8775,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "transfer",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 5292,
                      "src": "4568:25:46",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IDolomiteMargin_$24693_$_t_address_$_t_uint256_$_t_address_$_t_uint256_$_t_uint256_$_t_struct$_AssetAmount_$30880_memory_ptr_$_t_enum$_BalanceCheckFlag_$5841_$returns$__$",
                        "typeString": "function (contract IDolomiteMargin,address,uint256,address,uint256,uint256,struct Types.AssetAmount memory,enum AccountBalanceLib.BalanceCheckFlag)"
                      }
                    },
                    "id": 8796,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "4568:541:46",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 8797,
                  "nodeType": "ExpressionStatement",
                  "src": "4568:541:46"
                }
              ]
            },
            "documentation": null,
            "id": 8799,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "repayAllForBorrowPosition",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 8745,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 8738,
                  "name": "_fromAccountNumber",
                  "nodeType": "VariableDeclaration",
                  "scope": 8799,
                  "src": "3811:26:46",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 8737,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "3811:7:46",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 8740,
                  "name": "_borrowAccountNumber",
                  "nodeType": "VariableDeclaration",
                  "scope": 8799,
                  "src": "3847:28:46",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 8739,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "3847:7:46",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 8742,
                  "name": "_marketId",
                  "nodeType": "VariableDeclaration",
                  "scope": 8799,
                  "src": "3885:17:46",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 8741,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "3885:7:46",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 8744,
                  "name": "_balanceCheckFlag",
                  "nodeType": "VariableDeclaration",
                  "scope": 8799,
                  "src": "3912:52:46",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_enum$_BalanceCheckFlag_$5841",
                    "typeString": "enum AccountBalanceLib.BalanceCheckFlag"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 8743,
                    "name": "AccountBalanceLib.BalanceCheckFlag",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 5841,
                    "src": "3912:34:46",
                    "typeDescriptions": {
                      "typeIdentifier": "t_enum$_BalanceCheckFlag_$5841",
                      "typeString": "enum AccountBalanceLib.BalanceCheckFlag"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "3801:169:46"
            },
            "returnParameters": {
              "id": 8746,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "3980:0:46"
            },
            "scope": 8839,
            "src": "3767:1349:46",
            "stateMutability": "nonpayable",
            "superFunction": 4056,
            "visibility": "external"
          },
          {
            "body": {
              "id": 8837,
              "nodeType": "Block",
              "src": "5427:560:46",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 8815,
                        "name": "DOLOMITE_MARGIN",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2997,
                        "src": "5476:15:46",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_IDolomiteMargin_$24693",
                          "typeString": "contract IDolomiteMargin"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "expression": {
                          "argumentTypes": null,
                          "id": 8816,
                          "name": "msg",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 38107,
                          "src": "5531:3:46",
                          "typeDescriptions": {
                            "typeIdentifier": "t_magic_message",
                            "typeString": "msg"
                          }
                        },
                        "id": 8817,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "sender",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": null,
                        "src": "5531:10:46",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address_payable",
                          "typeString": "address payable"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 8818,
                        "name": "_fromAccountNumber",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 8801,
                        "src": "5578:18:46",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "expression": {
                          "argumentTypes": null,
                          "id": 8819,
                          "name": "msg",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 38107,
                          "src": "5634:3:46",
                          "typeDescriptions": {
                            "typeIdentifier": "t_magic_message",
                            "typeString": "msg"
                          }
                        },
                        "id": 8820,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "sender",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": null,
                        "src": "5634:10:46",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address_payable",
                          "typeString": "address payable"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 8821,
                        "name": "_toAccountNumber",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 8803,
                        "src": "5681:16:46",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 8822,
                        "name": "_marketId",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 8805,
                        "src": "5711:9:46",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "arguments": [
                          {
                            "argumentTypes": null,
                            "hexValue": "66616c7365",
                            "id": 8825,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "bool",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "5776:5:46",
                            "subdenomination": null,
                            "typeDescriptions": {
                              "typeIdentifier": "t_bool",
                              "typeString": "bool"
                            },
                            "value": "false"
                          },
                          {
                            "argumentTypes": null,
                            "expression": {
                              "argumentTypes": null,
                              "expression": {
                                "argumentTypes": null,
                                "id": 8826,
                                "name": "Types",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 31361,
                                "src": "5813:5:46",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_contract$_Types_$31361_$",
                                  "typeString": "type(library Types)"
                                }
                              },
                              "id": 8827,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "AssetDenomination",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 30868,
                              "src": "5813:23:46",
                              "typeDescriptions": {
                                "typeIdentifier": "t_type$_t_enum$_AssetDenomination_$30868_$",
                                "typeString": "type(enum Types.AssetDenomination)"
                              }
                            },
                            "id": 8828,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "lValueRequested": false,
                            "memberName": "Wei",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": null,
                            "src": "5813:27:46",
                            "typeDescriptions": {
                              "typeIdentifier": "t_enum$_AssetDenomination_$30868",
                              "typeString": "enum Types.AssetDenomination"
                            }
                          },
                          {
                            "argumentTypes": null,
                            "expression": {
                              "argumentTypes": null,
                              "expression": {
                                "argumentTypes": null,
                                "id": 8829,
                                "name": "Types",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 31361,
                                "src": "5863:5:46",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_contract$_Types_$31361_$",
                                  "typeString": "type(library Types)"
                                }
                              },
                              "id": 8830,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "AssetReference",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 30871,
                              "src": "5863:20:46",
                              "typeDescriptions": {
                                "typeIdentifier": "t_type$_t_enum$_AssetReference_$30871_$",
                                "typeString": "type(enum Types.AssetReference)"
                              }
                            },
                            "id": 8831,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "lValueRequested": false,
                            "memberName": "Delta",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": null,
                            "src": "5863:26:46",
                            "typeDescriptions": {
                              "typeIdentifier": "t_enum$_AssetReference_$30871",
                              "typeString": "enum Types.AssetReference"
                            }
                          },
                          {
                            "argumentTypes": null,
                            "id": 8832,
                            "name": "_amountWei",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 8807,
                            "src": "5914:10:46",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          }
                        ],
                        "expression": {
                          "argumentTypes": [
                            {
                              "typeIdentifier": "t_bool",
                              "typeString": "bool"
                            },
                            {
                              "typeIdentifier": "t_enum$_AssetDenomination_$30868",
                              "typeString": "enum Types.AssetDenomination"
                            },
                            {
                              "typeIdentifier": "t_enum$_AssetReference_$30871",
                              "typeString": "enum Types.AssetReference"
                            },
                            {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          ],
                          "expression": {
                            "argumentTypes": null,
                            "id": 8823,
                            "name": "Types",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 31361,
                            "src": "5734:5:46",
                            "typeDescriptions": {
                              "typeIdentifier": "t_type$_t_contract$_Types_$31361_$",
                              "typeString": "type(library Types)"
                            }
                          },
                          "id": 8824,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "AssetAmount",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": 30880,
                          "src": "5734:17:46",
                          "typeDescriptions": {
                            "typeIdentifier": "t_type$_t_struct$_AssetAmount_$30880_storage_ptr_$",
                            "typeString": "type(struct Types.AssetAmount storage pointer)"
                          }
                        },
                        "id": 8833,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "kind": "structConstructorCall",
                        "lValueRequested": false,
                        "names": [
                          "sign",
                          "denomination",
                          "ref",
                          "value"
                        ],
                        "nodeType": "FunctionCall",
                        "src": "5734:205:46",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_AssetAmount_$30880_memory",
                          "typeString": "struct Types.AssetAmount memory"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 8834,
                        "name": "_balanceCheckFlag",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 8809,
                        "src": "5953:17:46",
                        "typeDescriptions": {
                          "typeIdentifier": "t_enum$_BalanceCheckFlag_$5841",
                          "typeString": "enum AccountBalanceLib.BalanceCheckFlag"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_contract$_IDolomiteMargin_$24693",
                          "typeString": "contract IDolomiteMargin"
                        },
                        {
                          "typeIdentifier": "t_address_payable",
                          "typeString": "address payable"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        {
                          "typeIdentifier": "t_address_payable",
                          "typeString": "address payable"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        {
                          "typeIdentifier": "t_struct$_AssetAmount_$30880_memory",
                          "typeString": "struct Types.AssetAmount memory"
                        },
                        {
                          "typeIdentifier": "t_enum$_BalanceCheckFlag_$5841",
                          "typeString": "enum AccountBalanceLib.BalanceCheckFlag"
                        }
                      ],
                      "expression": {
                        "argumentTypes": null,
                        "id": 8812,
                        "name": "AccountActionLib",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 5819,
                        "src": "5437:16:46",
                        "typeDescriptions": {
                          "typeIdentifier": "t_type$_t_contract$_AccountActionLib_$5819_$",
                          "typeString": "type(library AccountActionLib)"
                        }
                      },
                      "id": 8814,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "transfer",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 5292,
                      "src": "5437:25:46",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IDolomiteMargin_$24693_$_t_address_$_t_uint256_$_t_address_$_t_uint256_$_t_uint256_$_t_struct$_AssetAmount_$30880_memory_ptr_$_t_enum$_BalanceCheckFlag_$5841_$returns$__$",
                        "typeString": "function (contract IDolomiteMargin,address,uint256,address,uint256,uint256,struct Types.AssetAmount memory,enum AccountBalanceLib.BalanceCheckFlag)"
                      }
                    },
                    "id": 8835,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "5437:543:46",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 8836,
                  "nodeType": "ExpressionStatement",
                  "src": "5437:543:46"
                }
              ]
            },
            "documentation": null,
            "id": 8838,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "_transferBetweenAccounts",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 8810,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 8801,
                  "name": "_fromAccountNumber",
                  "nodeType": "VariableDeclaration",
                  "scope": 8838,
                  "src": "5234:26:46",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 8800,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "5234:7:46",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 8803,
                  "name": "_toAccountNumber",
                  "nodeType": "VariableDeclaration",
                  "scope": 8838,
                  "src": "5270:24:46",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 8802,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "5270:7:46",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 8805,
                  "name": "_marketId",
                  "nodeType": "VariableDeclaration",
                  "scope": 8838,
                  "src": "5304:17:46",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 8804,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "5304:7:46",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 8807,
                  "name": "_amountWei",
                  "nodeType": "VariableDeclaration",
                  "scope": 8838,
                  "src": "5331:18:46",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 8806,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "5331:7:46",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 8809,
                  "name": "_balanceCheckFlag",
                  "nodeType": "VariableDeclaration",
                  "scope": 8838,
                  "src": "5359:52:46",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_enum$_BalanceCheckFlag_$5841",
                    "typeString": "enum AccountBalanceLib.BalanceCheckFlag"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 8808,
                    "name": "AccountBalanceLib.BalanceCheckFlag",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 5841,
                    "src": "5359:34:46",
                    "typeDescriptions": {
                      "typeIdentifier": "t_enum$_BalanceCheckFlag_$5841",
                      "typeString": "enum AccountBalanceLib.BalanceCheckFlag"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "5224:193:46"
            },
            "returnParameters": {
              "id": 8811,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "5427:0:46"
            },
            "scope": 8839,
            "src": "5191:796:46",
            "stateMutability": "nonpayable",
            "superFunction": null,
            "visibility": "internal"
          }
        ],
        "scope": 8840,
        "src": "1525:4464:46"
      }
    ],
    "src": "595:5395:46"
  },
  "legacyAST": {
    "absolutePath": "/home/cdc218/projects/dolomite-protocol-v2/contracts/external/proxies/BorrowPositionProxyV1.sol",
    "exportedSymbols": {
      "BorrowPositionProxyV1": [
        8839
      ]
    },
    "id": 8840,
    "nodeType": "SourceUnit",
    "nodes": [
      {
        "id": 8554,
        "literals": [
          "solidity",
          "^",
          "0.5",
          ".7"
        ],
        "nodeType": "PragmaDirective",
        "src": "595:23:46"
      },
      {
        "id": 8555,
        "literals": [
          "experimental",
          "ABIEncoderV2"
        ],
        "nodeType": "PragmaDirective",
        "src": "619:33:46"
      },
      {
        "absolutePath": "@openzeppelin/contracts/utils/Address.sol",
        "file": "@openzeppelin/contracts/utils/Address.sol",
        "id": 8557,
        "nodeType": "ImportDirective",
        "scope": 8840,
        "sourceUnit": 37848,
        "src": "654:68:46",
        "symbolAliases": [
          {
            "foreign": 8556,
            "local": null
          }
        ],
        "unitAlias": ""
      },
      {
        "absolutePath": "@openzeppelin/contracts/token/ERC20/IERC20.sol",
        "file": "@openzeppelin/contracts/token/ERC20/IERC20.sol",
        "id": 8559,
        "nodeType": "ImportDirective",
        "scope": 8840,
        "sourceUnit": 37553,
        "src": "723:72:46",
        "symbolAliases": [
          {
            "foreign": 8558,
            "local": null
          }
        ],
        "unitAlias": ""
      },
      {
        "absolutePath": "/home/cdc218/projects/dolomite-protocol-v2/contracts/protocol/lib/Account.sol",
        "file": "../../protocol/lib/Account.sol",
        "id": 8561,
        "nodeType": "ImportDirective",
        "scope": 8840,
        "sourceUnit": 24886,
        "src": "797:57:46",
        "symbolAliases": [
          {
            "foreign": 8560,
            "local": null
          }
        ],
        "unitAlias": ""
      },
      {
        "absolutePath": "/home/cdc218/projects/dolomite-protocol-v2/contracts/protocol/lib/Actions.sol",
        "file": "../../protocol/lib/Actions.sol",
        "id": 8563,
        "nodeType": "ImportDirective",
        "scope": 8840,
        "sourceUnit": 25370,
        "src": "855:57:46",
        "symbolAliases": [
          {
            "foreign": 8562,
            "local": null
          }
        ],
        "unitAlias": ""
      },
      {
        "absolutePath": "/home/cdc218/projects/dolomite-protocol-v2/contracts/protocol/lib/Require.sol",
        "file": "../../protocol/lib/Require.sol",
        "id": 8565,
        "nodeType": "ImportDirective",
        "scope": 8840,
        "sourceUnit": 28453,
        "src": "913:57:46",
        "symbolAliases": [
          {
            "foreign": 8564,
            "local": null
          }
        ],
        "unitAlias": ""
      },
      {
        "absolutePath": "/home/cdc218/projects/dolomite-protocol-v2/contracts/protocol/lib/Types.sol",
        "file": "../../protocol/lib/Types.sol",
        "id": 8567,
        "nodeType": "ImportDirective",
        "scope": 8840,
        "sourceUnit": 31362,
        "src": "971:53:46",
        "symbolAliases": [
          {
            "foreign": 8566,
            "local": null
          }
        ],
        "unitAlias": ""
      },
      {
        "absolutePath": "/home/cdc218/projects/dolomite-protocol-v2/contracts/external/helpers/OnlyDolomiteMargin.sol",
        "file": "../helpers/OnlyDolomiteMargin.sol",
        "id": 8569,
        "nodeType": "ImportDirective",
        "scope": 8840,
        "sourceUnit": 3067,
        "src": "1026:71:46",
        "symbolAliases": [
          {
            "foreign": 8568,
            "local": null
          }
        ],
        "unitAlias": ""
      },
      {
        "absolutePath": "/home/cdc218/projects/dolomite-protocol-v2/contracts/external/interfaces/IBorrowPositionProxyV1.sol",
        "file": "../interfaces/IBorrowPositionProxyV1.sol",
        "id": 8571,
        "nodeType": "ImportDirective",
        "scope": 8840,
        "sourceUnit": 4058,
        "src": "1098:82:46",
        "symbolAliases": [
          {
            "foreign": 8570,
            "local": null
          }
        ],
        "unitAlias": ""
      },
      {
        "absolutePath": "/home/cdc218/projects/dolomite-protocol-v2/contracts/external/lib/AccountActionLib.sol",
        "file": "../lib/AccountActionLib.sol",
        "id": 8573,
        "nodeType": "ImportDirective",
        "scope": 8840,
        "sourceUnit": 5820,
        "src": "1181:63:46",
        "symbolAliases": [
          {
            "foreign": 8572,
            "local": null
          }
        ],
        "unitAlias": ""
      },
      {
        "absolutePath": "/home/cdc218/projects/dolomite-protocol-v2/contracts/external/lib/AccountBalanceLib.sol",
        "file": "../lib/AccountBalanceLib.sol",
        "id": 8575,
        "nodeType": "ImportDirective",
        "scope": 8840,
        "sourceUnit": 5892,
        "src": "1245:65:46",
        "symbolAliases": [
          {
            "foreign": 8574,
            "local": null
          }
        ],
        "unitAlias": ""
      },
      {
        "baseContracts": [
          {
            "arguments": null,
            "baseName": {
              "contractScope": null,
              "id": 8576,
              "name": "IBorrowPositionProxyV1",
              "nodeType": "UserDefinedTypeName",
              "referencedDeclaration": 4057,
              "src": "1559:22:46",
              "typeDescriptions": {
                "typeIdentifier": "t_contract$_IBorrowPositionProxyV1_$4057",
                "typeString": "contract IBorrowPositionProxyV1"
              }
            },
            "id": 8577,
            "nodeType": "InheritanceSpecifier",
            "src": "1559:22:46"
          },
          {
            "arguments": null,
            "baseName": {
              "contractScope": null,
              "id": 8578,
              "name": "OnlyDolomiteMargin",
              "nodeType": "UserDefinedTypeName",
              "referencedDeclaration": 3066,
              "src": "1583:18:46",
              "typeDescriptions": {
                "typeIdentifier": "t_contract$_OnlyDolomiteMargin_$3066",
                "typeString": "contract OnlyDolomiteMargin"
              }
            },
            "id": 8579,
            "nodeType": "InheritanceSpecifier",
            "src": "1583:18:46"
          }
        ],
        "contractDependencies": [
          3066,
          4057
        ],
        "contractKind": "contract",
        "documentation": "@title   BorrowPositionProxyV1\n@author  Dolomite\n * @dev Proxy contract for opening borrow positions. This makes indexing easier and lowers gas costs on Arbitrum by\n     minimizing call data",
        "fullyImplemented": true,
        "id": 8839,
        "linearizedBaseContracts": [
          8839,
          3066,
          4057
        ],
        "name": "BorrowPositionProxyV1",
        "nodeType": "ContractDefinition",
        "nodes": [
          {
            "id": 8582,
            "libraryName": {
              "contractScope": null,
              "id": 8580,
              "name": "Types",
              "nodeType": "UserDefinedTypeName",
              "referencedDeclaration": 31361,
              "src": "1614:5:46",
              "typeDescriptions": {
                "typeIdentifier": "t_contract$_Types_$31361",
                "typeString": "library Types"
              }
            },
            "nodeType": "UsingForDirective",
            "src": "1608:26:46",
            "typeName": {
              "contractScope": null,
              "id": 8581,
              "name": "Types.Par",
              "nodeType": "UserDefinedTypeName",
              "referencedDeclaration": 30890,
              "src": "1624:9:46",
              "typeDescriptions": {
                "typeIdentifier": "t_struct$_Par_$30890_storage_ptr",
                "typeString": "struct Types.Par"
              }
            }
          },
          {
            "body": {
              "id": 8590,
              "nodeType": "Block",
              "src": "1745:2:46",
              "statements": []
            },
            "documentation": null,
            "id": 8591,
            "implemented": true,
            "kind": "constructor",
            "modifiers": [
              {
                "arguments": [
                  {
                    "argumentTypes": null,
                    "id": 8587,
                    "name": "dolomiteMargin",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 8584,
                    "src": "1725:14:46",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  }
                ],
                "id": 8588,
                "modifierName": {
                  "argumentTypes": null,
                  "id": 8586,
                  "name": "OnlyDolomiteMargin",
                  "nodeType": "Identifier",
                  "overloadedDeclarations": [],
                  "referencedDeclaration": 3066,
                  "src": "1706:18:46",
                  "typeDescriptions": {
                    "typeIdentifier": "t_type$_t_contract$_OnlyDolomiteMargin_$3066_$",
                    "typeString": "type(contract OnlyDolomiteMargin)"
                  }
                },
                "nodeType": "ModifierInvocation",
                "src": "1706:34:46"
              }
            ],
            "name": "",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 8585,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 8584,
                  "name": "dolomiteMargin",
                  "nodeType": "VariableDeclaration",
                  "scope": 8591,
                  "src": "1662:22:46",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 8583,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "1662:7:46",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "1652:38:46"
            },
            "returnParameters": {
              "id": 8589,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "1745:0:46"
            },
            "scope": 8839,
            "src": "1640:107:46",
            "stateMutability": "nonpayable",
            "superFunction": null,
            "visibility": "public"
          },
          {
            "body": {
              "id": 8618,
              "nodeType": "Block",
              "src": "1983:368:46",
              "statements": [
                {
                  "eventCall": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "expression": {
                          "argumentTypes": null,
                          "id": 8605,
                          "name": "msg",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 38107,
                          "src": "2130:3:46",
                          "typeDescriptions": {
                            "typeIdentifier": "t_magic_message",
                            "typeString": "msg"
                          }
                        },
                        "id": 8606,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "sender",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": null,
                        "src": "2130:10:46",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address_payable",
                          "typeString": "address payable"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 8607,
                        "name": "_toAccountNumber",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 8595,
                        "src": "2142:16:46",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_address_payable",
                          "typeString": "address payable"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      ],
                      "id": 8604,
                      "name": "BorrowPositionOpen",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 4009,
                      "src": "2111:18:46",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$",
                        "typeString": "function (address,uint256)"
                      }
                    },
                    "id": 8608,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "2111:48:46",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 8609,
                  "nodeType": "EmitStatement",
                  "src": "2106:53:46"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 8611,
                        "name": "_fromAccountNumber",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 8593,
                        "src": "2208:18:46",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 8612,
                        "name": "_toAccountNumber",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 8595,
                        "src": "2240:16:46",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 8613,
                        "name": "_marketId",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 8597,
                        "src": "2270:9:46",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 8614,
                        "name": "_amountWei",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 8599,
                        "src": "2293:10:46",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 8615,
                        "name": "_balanceCheckFlag",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 8601,
                        "src": "2317:17:46",
                        "typeDescriptions": {
                          "typeIdentifier": "t_enum$_BalanceCheckFlag_$5841",
                          "typeString": "enum AccountBalanceLib.BalanceCheckFlag"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        {
                          "typeIdentifier": "t_enum$_BalanceCheckFlag_$5841",
                          "typeString": "enum AccountBalanceLib.BalanceCheckFlag"
                        }
                      ],
                      "id": 8610,
                      "name": "_transferBetweenAccounts",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 8838,
                      "src": "2170:24:46",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$_t_enum$_BalanceCheckFlag_$5841_$returns$__$",
                        "typeString": "function (uint256,uint256,uint256,uint256,enum AccountBalanceLib.BalanceCheckFlag)"
                      }
                    },
                    "id": 8616,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "2170:174:46",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 8617,
                  "nodeType": "ExpressionStatement",
                  "src": "2170:174:46"
                }
              ]
            },
            "documentation": null,
            "id": 8619,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "openBorrowPosition",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 8602,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 8593,
                  "name": "_fromAccountNumber",
                  "nodeType": "VariableDeclaration",
                  "scope": 8619,
                  "src": "1790:26:46",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 8592,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "1790:7:46",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 8595,
                  "name": "_toAccountNumber",
                  "nodeType": "VariableDeclaration",
                  "scope": 8619,
                  "src": "1826:24:46",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 8594,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "1826:7:46",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 8597,
                  "name": "_marketId",
                  "nodeType": "VariableDeclaration",
                  "scope": 8619,
                  "src": "1860:17:46",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 8596,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "1860:7:46",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 8599,
                  "name": "_amountWei",
                  "nodeType": "VariableDeclaration",
                  "scope": 8619,
                  "src": "1887:18:46",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 8598,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "1887:7:46",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 8601,
                  "name": "_balanceCheckFlag",
                  "nodeType": "VariableDeclaration",
                  "scope": 8619,
                  "src": "1915:52:46",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_enum$_BalanceCheckFlag_$5841",
                    "typeString": "enum AccountBalanceLib.BalanceCheckFlag"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 8600,
                    "name": "AccountBalanceLib.BalanceCheckFlag",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 5841,
                    "src": "1915:34:46",
                    "typeDescriptions": {
                      "typeIdentifier": "t_enum$_BalanceCheckFlag_$5841",
                      "typeString": "enum AccountBalanceLib.BalanceCheckFlag"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "1780:193:46"
            },
            "returnParameters": {
              "id": 8603,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "1983:0:46"
            },
            "scope": 8839,
            "src": "1753:598:46",
            "stateMutability": "nonpayable",
            "superFunction": 4022,
            "visibility": "external"
          },
          {
            "body": {
              "id": 8713,
              "nodeType": "Block",
              "src": "2522:749:46",
              "statements": [
                {
                  "assignments": [
                    8633
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 8633,
                      "name": "accounts",
                      "nodeType": "VariableDeclaration",
                      "scope": 8713,
                      "src": "2532:30:46",
                      "stateVariable": false,
                      "storageLocation": "memory",
                      "typeDescriptions": {
                        "typeIdentifier": "t_array$_t_struct$_Info_$24851_memory_$dyn_memory_ptr",
                        "typeString": "struct Account.Info[]"
                      },
                      "typeName": {
                        "baseType": {
                          "contractScope": null,
                          "id": 8631,
                          "name": "Account.Info",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 24851,
                          "src": "2532:12:46",
                          "typeDescriptions": {
                            "typeIdentifier": "t_struct$_Info_$24851_storage_ptr",
                            "typeString": "struct Account.Info"
                          }
                        },
                        "id": 8632,
                        "length": null,
                        "nodeType": "ArrayTypeName",
                        "src": "2532:14:46",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_struct$_Info_$24851_storage_$dyn_storage_ptr",
                          "typeString": "struct Account.Info[]"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 8639,
                  "initialValue": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "hexValue": "32",
                        "id": 8637,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "number",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "2584:1:46",
                        "subdenomination": null,
                        "typeDescriptions": {
                          "typeIdentifier": "t_rational_2_by_1",
                          "typeString": "int_const 2"
                        },
                        "value": "2"
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_rational_2_by_1",
                          "typeString": "int_const 2"
                        }
                      ],
                      "id": 8636,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "lValueRequested": false,
                      "nodeType": "NewExpression",
                      "src": "2565:18:46",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_struct$_Info_$24851_memory_$dyn_memory_$",
                        "typeString": "function (uint256) pure returns (struct Account.Info memory[] memory)"
                      },
                      "typeName": {
                        "baseType": {
                          "contractScope": null,
                          "id": 8634,
                          "name": "Account.Info",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 24851,
                          "src": "2569:12:46",
                          "typeDescriptions": {
                            "typeIdentifier": "t_struct$_Info_$24851_storage_ptr",
                            "typeString": "struct Account.Info"
                          }
                        },
                        "id": 8635,
                        "length": null,
                        "nodeType": "ArrayTypeName",
                        "src": "2569:14:46",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_struct$_Info_$24851_storage_$dyn_storage_ptr",
                          "typeString": "struct Account.Info[]"
                        }
                      }
                    },
                    "id": 8638,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "2565:21:46",
                    "typeDescriptions": {
                      "typeIdentifier": "t_array$_t_struct$_Info_$24851_memory_$dyn_memory",
                      "typeString": "struct Account.Info memory[] memory"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "2532:54:46"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 8649,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "baseExpression": {
                        "argumentTypes": null,
                        "id": 8640,
                        "name": "accounts",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 8633,
                        "src": "2596:8:46",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_struct$_Info_$24851_memory_$dyn_memory_ptr",
                          "typeString": "struct Account.Info memory[] memory"
                        }
                      },
                      "id": 8642,
                      "indexExpression": {
                        "argumentTypes": null,
                        "hexValue": "30",
                        "id": 8641,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "number",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "2605:1:46",
                        "subdenomination": null,
                        "typeDescriptions": {
                          "typeIdentifier": "t_rational_0_by_1",
                          "typeString": "int_const 0"
                        },
                        "value": "0"
                      },
                      "isConstant": false,
                      "isLValue": true,
                      "isPure": false,
                      "lValueRequested": true,
                      "nodeType": "IndexAccess",
                      "src": "2596:11:46",
                      "typeDescriptions": {
                        "typeIdentifier": "t_struct$_Info_$24851_memory",
                        "typeString": "struct Account.Info memory"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "arguments": [
                        {
                          "argumentTypes": null,
                          "expression": {
                            "argumentTypes": null,
                            "id": 8645,
                            "name": "msg",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 38107,
                            "src": "2623:3:46",
                            "typeDescriptions": {
                              "typeIdentifier": "t_magic_message",
                              "typeString": "msg"
                            }
                          },
                          "id": 8646,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "sender",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": null,
                          "src": "2623:10:46",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address_payable",
                            "typeString": "address payable"
                          }
                        },
                        {
                          "argumentTypes": null,
                          "id": 8647,
                          "name": "_borrowAccountNumber",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 8621,
                          "src": "2635:20:46",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        }
                      ],
                      "expression": {
                        "argumentTypes": [
                          {
                            "typeIdentifier": "t_address_payable",
                            "typeString": "address payable"
                          },
                          {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        ],
                        "expression": {
                          "argumentTypes": null,
                          "id": 8643,
                          "name": "Account",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 24885,
                          "src": "2610:7:46",
                          "typeDescriptions": {
                            "typeIdentifier": "t_type$_t_contract$_Account_$24885_$",
                            "typeString": "type(library Account)"
                          }
                        },
                        "id": 8644,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "Info",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": 24851,
                        "src": "2610:12:46",
                        "typeDescriptions": {
                          "typeIdentifier": "t_type$_t_struct$_Info_$24851_storage_ptr_$",
                          "typeString": "type(struct Account.Info storage pointer)"
                        }
                      },
                      "id": 8648,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "kind": "structConstructorCall",
                      "lValueRequested": false,
                      "names": [],
                      "nodeType": "FunctionCall",
                      "src": "2610:46:46",
                      "typeDescriptions": {
                        "typeIdentifier": "t_struct$_Info_$24851_memory",
                        "typeString": "struct Account.Info memory"
                      }
                    },
                    "src": "2596:60:46",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_Info_$24851_memory",
                      "typeString": "struct Account.Info memory"
                    }
                  },
                  "id": 8650,
                  "nodeType": "ExpressionStatement",
                  "src": "2596:60:46"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 8660,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "baseExpression": {
                        "argumentTypes": null,
                        "id": 8651,
                        "name": "accounts",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 8633,
                        "src": "2666:8:46",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_struct$_Info_$24851_memory_$dyn_memory_ptr",
                          "typeString": "struct Account.Info memory[] memory"
                        }
                      },
                      "id": 8653,
                      "indexExpression": {
                        "argumentTypes": null,
                        "hexValue": "31",
                        "id": 8652,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "number",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "2675:1:46",
                        "subdenomination": null,
                        "typeDescriptions": {
                          "typeIdentifier": "t_rational_1_by_1",
                          "typeString": "int_const 1"
                        },
                        "value": "1"
                      },
                      "isConstant": false,
                      "isLValue": true,
                      "isPure": false,
                      "lValueRequested": true,
                      "nodeType": "IndexAccess",
                      "src": "2666:11:46",
                      "typeDescriptions": {
                        "typeIdentifier": "t_struct$_Info_$24851_memory",
                        "typeString": "struct Account.Info memory"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "arguments": [
                        {
                          "argumentTypes": null,
                          "expression": {
                            "argumentTypes": null,
                            "id": 8656,
                            "name": "msg",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 38107,
                            "src": "2693:3:46",
                            "typeDescriptions": {
                              "typeIdentifier": "t_magic_message",
                              "typeString": "msg"
                            }
                          },
                          "id": 8657,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "sender",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": null,
                          "src": "2693:10:46",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address_payable",
                            "typeString": "address payable"
                          }
                        },
                        {
                          "argumentTypes": null,
                          "id": 8658,
                          "name": "_toAccountNumber",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 8623,
                          "src": "2705:16:46",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        }
                      ],
                      "expression": {
                        "argumentTypes": [
                          {
                            "typeIdentifier": "t_address_payable",
                            "typeString": "address payable"
                          },
                          {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        ],
                        "expression": {
                          "argumentTypes": null,
                          "id": 8654,
                          "name": "Account",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 24885,
                          "src": "2680:7:46",
                          "typeDescriptions": {
                            "typeIdentifier": "t_type$_t_contract$_Account_$24885_$",
                            "typeString": "type(library Account)"
                          }
                        },
                        "id": 8655,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "Info",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": 24851,
                        "src": "2680:12:46",
                        "typeDescriptions": {
                          "typeIdentifier": "t_type$_t_struct$_Info_$24851_storage_ptr_$",
                          "typeString": "type(struct Account.Info storage pointer)"
                        }
                      },
                      "id": 8659,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "kind": "structConstructorCall",
                      "lValueRequested": false,
                      "names": [],
                      "nodeType": "FunctionCall",
                      "src": "2680:42:46",
                      "typeDescriptions": {
                        "typeIdentifier": "t_struct$_Info_$24851_memory",
                        "typeString": "struct Account.Info memory"
                      }
                    },
                    "src": "2666:56:46",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_Info_$24851_memory",
                      "typeString": "struct Account.Info memory"
                    }
                  },
                  "id": 8661,
                  "nodeType": "ExpressionStatement",
                  "src": "2666:56:46"
                },
                {
                  "assignments": [
                    8663
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 8663,
                      "name": "marketIdsLength",
                      "nodeType": "VariableDeclaration",
                      "scope": 8713,
                      "src": "2733:23:46",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 8662,
                        "name": "uint256",
                        "nodeType": "ElementaryTypeName",
                        "src": "2733:7:46",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 8666,
                  "initialValue": {
                    "argumentTypes": null,
                    "expression": {
                      "argumentTypes": null,
                      "id": 8664,
                      "name": "_collateralMarketIds",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 8626,
                      "src": "2759:20:46",
                      "typeDescriptions": {
                        "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr",
                        "typeString": "uint256[] calldata"
                      }
                    },
                    "id": 8665,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "memberName": "length",
                    "nodeType": "MemberAccess",
                    "referencedDeclaration": null,
                    "src": "2759:27:46",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "2733:53:46"
                },
                {
                  "assignments": [
                    8671
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 8671,
                      "name": "actions",
                      "nodeType": "VariableDeclaration",
                      "scope": 8713,
                      "src": "2796:35:46",
                      "stateVariable": false,
                      "storageLocation": "memory",
                      "typeDescriptions": {
                        "typeIdentifier": "t_array$_t_struct$_ActionArgs_$24930_memory_$dyn_memory_ptr",
                        "typeString": "struct Actions.ActionArgs[]"
                      },
                      "typeName": {
                        "baseType": {
                          "contractScope": null,
                          "id": 8669,
                          "name": "Actions.ActionArgs",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 24930,
                          "src": "2796:18:46",
                          "typeDescriptions": {
                            "typeIdentifier": "t_struct$_ActionArgs_$24930_storage_ptr",
                            "typeString": "struct Actions.ActionArgs"
                          }
                        },
                        "id": 8670,
                        "length": null,
                        "nodeType": "ArrayTypeName",
                        "src": "2796:20:46",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_struct$_ActionArgs_$24930_storage_$dyn_storage_ptr",
                          "typeString": "struct Actions.ActionArgs[]"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 8677,
                  "initialValue": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 8675,
                        "name": "marketIdsLength",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 8663,
                        "src": "2859:15:46",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      ],
                      "id": 8674,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "lValueRequested": false,
                      "nodeType": "NewExpression",
                      "src": "2834:24:46",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_struct$_ActionArgs_$24930_memory_$dyn_memory_$",
                        "typeString": "function (uint256) pure returns (struct Actions.ActionArgs memory[] memory)"
                      },
                      "typeName": {
                        "baseType": {
                          "contractScope": null,
                          "id": 8672,
                          "name": "Actions.ActionArgs",
                          "nodeType": "UserDefinedTypeName",
                          "referencedDeclaration": 24930,
                          "src": "2838:18:46",
                          "typeDescriptions": {
                            "typeIdentifier": "t_struct$_ActionArgs_$24930_storage_ptr",
                            "typeString": "struct Actions.ActionArgs"
                          }
                        },
                        "id": 8673,
                        "length": null,
                        "nodeType": "ArrayTypeName",
                        "src": "2838:20:46",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_struct$_ActionArgs_$24930_storage_$dyn_storage_ptr",
                          "typeString": "struct Actions.ActionArgs[]"
                        }
                      }
                    },
                    "id": 8676,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "2834:41:46",
                    "typeDescriptions": {
                      "typeIdentifier": "t_array$_t_struct$_ActionArgs_$24930_memory_$dyn_memory",
                      "typeString": "struct Actions.ActionArgs memory[] memory"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "2796:79:46"
                },
                {
                  "body": {
                    "id": 8704,
                    "nodeType": "Block",
                    "src": "2927:285:46",
                    "statements": [
                      {
                        "expression": {
                          "argumentTypes": null,
                          "id": 8702,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "argumentTypes": null,
                            "baseExpression": {
                              "argumentTypes": null,
                              "id": 8687,
                              "name": "actions",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 8671,
                              "src": "2941:7:46",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_struct$_ActionArgs_$24930_memory_$dyn_memory_ptr",
                                "typeString": "struct Actions.ActionArgs memory[] memory"
                              }
                            },
                            "id": 8689,
                            "indexExpression": {
                              "argumentTypes": null,
                              "id": 8688,
                              "name": "i",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 8679,
                              "src": "2949:1:46",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "isConstant": false,
                            "isLValue": true,
                            "isPure": false,
                            "lValueRequested": true,
                            "nodeType": "IndexAccess",
                            "src": "2941:10:46",
                            "typeDescriptions": {
                              "typeIdentifier": "t_struct$_ActionArgs_$24930_memory",
                              "typeString": "struct Actions.ActionArgs memory"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "argumentTypes": null,
                            "arguments": [
                              {
                                "argumentTypes": null,
                                "hexValue": "30",
                                "id": 8692,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "number",
                                "lValueRequested": false,
                                "nodeType": "Literal",
                                "src": "3032:1:46",
                                "subdenomination": null,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_rational_0_by_1",
                                  "typeString": "int_const 0"
                                },
                                "value": "0"
                              },
                              {
                                "argumentTypes": null,
                                "hexValue": "31",
                                "id": 8693,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "number",
                                "lValueRequested": false,
                                "nodeType": "Literal",
                                "src": "3095:1:46",
                                "subdenomination": null,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_rational_1_by_1",
                                  "typeString": "int_const 1"
                                },
                                "value": "1"
                              },
                              {
                                "argumentTypes": null,
                                "baseExpression": {
                                  "argumentTypes": null,
                                  "id": 8694,
                                  "name": "_collateralMarketIds",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 8626,
                                  "src": "3137:20:46",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr",
                                    "typeString": "uint256[] calldata"
                                  }
                                },
                                "id": 8696,
                                "indexExpression": {
                                  "argumentTypes": null,
                                  "id": 8695,
                                  "name": "i",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 8679,
                                  "src": "3158:1:46",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "nodeType": "IndexAccess",
                                "src": "3137:23:46",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              {
                                "argumentTypes": null,
                                "arguments": [
                                  {
                                    "argumentTypes": null,
                                    "id": 8699,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": true,
                                    "lValueRequested": false,
                                    "nodeType": "UnaryOperation",
                                    "operator": "-",
                                    "prefix": true,
                                    "src": "3183:3:46",
                                    "subExpression": {
                                      "argumentTypes": null,
                                      "hexValue": "31",
                                      "id": 8698,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": true,
                                      "kind": "number",
                                      "lValueRequested": false,
                                      "nodeType": "Literal",
                                      "src": "3185:1:46",
                                      "subdenomination": null,
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_rational_1_by_1",
                                        "typeString": "int_const 1"
                                      },
                                      "value": "1"
                                    },
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_rational_minus_1_by_1",
                                      "typeString": "int_const -1"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_rational_minus_1_by_1",
                                      "typeString": "int_const -1"
                                    }
                                  ],
                                  "id": 8697,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "lValueRequested": false,
                                  "nodeType": "ElementaryTypeNameExpression",
                                  "src": "3178:4:46",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_type$_t_uint256_$",
                                    "typeString": "type(uint256)"
                                  },
                                  "typeName": "uint"
                                },
                                "id": 8700,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "typeConversion",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "3178:9:46",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_rational_0_by_1",
                                  "typeString": "int_const 0"
                                },
                                {
                                  "typeIdentifier": "t_rational_1_by_1",
                                  "typeString": "int_const 1"
                                },
                                {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                },
                                {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              ],
                              "expression": {
                                "argumentTypes": null,
                                "id": 8690,
                                "name": "AccountActionLib",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 5819,
                                "src": "2954:16:46",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_contract$_AccountActionLib_$5819_$",
                                  "typeString": "type(library AccountActionLib)"
                                }
                              },
                              "id": 8691,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "encodeTransferAction",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 5744,
                              "src": "2954:37:46",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_struct$_ActionArgs_$24930_memory_ptr_$",
                                "typeString": "function (uint256,uint256,uint256,uint256) pure returns (struct Actions.ActionArgs memory)"
                              }
                            },
                            "id": 8701,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "2954:247:46",
                            "typeDescriptions": {
                              "typeIdentifier": "t_struct$_ActionArgs_$24930_memory_ptr",
                              "typeString": "struct Actions.ActionArgs memory"
                            }
                          },
                          "src": "2941:260:46",
                          "typeDescriptions": {
                            "typeIdentifier": "t_struct$_ActionArgs_$24930_memory",
                            "typeString": "struct Actions.ActionArgs memory"
                          }
                        },
                        "id": 8703,
                        "nodeType": "ExpressionStatement",
                        "src": "2941:260:46"
                      }
                    ]
                  },
                  "condition": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 8683,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "id": 8681,
                      "name": "i",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 8679,
                      "src": "2901:1:46",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "<",
                    "rightExpression": {
                      "argumentTypes": null,
                      "id": 8682,
                      "name": "marketIdsLength",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 8663,
                      "src": "2905:15:46",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "2901:19:46",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "id": 8705,
                  "initializationExpression": {
                    "assignments": [
                      8679
                    ],
                    "declarations": [
                      {
                        "constant": false,
                        "id": 8679,
                        "name": "i",
                        "nodeType": "VariableDeclaration",
                        "scope": 8705,
                        "src": "2890:9:46",
                        "stateVariable": false,
                        "storageLocation": "default",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "typeName": {
                          "id": 8678,
                          "name": "uint256",
                          "nodeType": "ElementaryTypeName",
                          "src": "2890:7:46",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "value": null,
                        "visibility": "internal"
                      }
                    ],
                    "id": 8680,
                    "initialValue": null,
                    "nodeType": "VariableDeclarationStatement",
                    "src": "2890:9:46"
                  },
                  "loopExpression": {
                    "expression": {
                      "argumentTypes": null,
                      "id": 8685,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "nodeType": "UnaryOperation",
                      "operator": "++",
                      "prefix": true,
                      "src": "2922:3:46",
                      "subExpression": {
                        "argumentTypes": null,
                        "id": 8684,
                        "name": "i",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 8679,
                        "src": "2924:1:46",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "id": 8686,
                    "nodeType": "ExpressionStatement",
                    "src": "2922:3:46"
                  },
                  "nodeType": "ForStatement",
                  "src": "2885:327:46"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 8709,
                        "name": "accounts",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 8633,
                        "src": "3246:8:46",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_struct$_Info_$24851_memory_$dyn_memory_ptr",
                          "typeString": "struct Account.Info memory[] memory"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 8710,
                        "name": "actions",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 8671,
                        "src": "3256:7:46",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_struct$_ActionArgs_$24930_memory_$dyn_memory_ptr",
                          "typeString": "struct Actions.ActionArgs memory[] memory"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_array$_t_struct$_Info_$24851_memory_$dyn_memory_ptr",
                          "typeString": "struct Account.Info memory[] memory"
                        },
                        {
                          "typeIdentifier": "t_array$_t_struct$_ActionArgs_$24930_memory_$dyn_memory_ptr",
                          "typeString": "struct Actions.ActionArgs memory[] memory"
                        }
                      ],
                      "expression": {
                        "argumentTypes": null,
                        "id": 8706,
                        "name": "DOLOMITE_MARGIN",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2997,
                        "src": "3222:15:46",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_IDolomiteMargin_$24693",
                          "typeString": "contract IDolomiteMargin"
                        }
                      },
                      "id": 8708,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "operate",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 24512,
                      "src": "3222:23:46",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_external_nonpayable$_t_array$_t_struct$_Info_$24851_memory_$dyn_memory_ptr_$_t_array$_t_struct$_ActionArgs_$24930_memory_$dyn_memory_ptr_$returns$__$",
                        "typeString": "function (struct Account.Info memory[] memory,struct Actions.ActionArgs memory[] memory) external"
                      }
                    },
                    "id": 8711,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "3222:42:46",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 8712,
                  "nodeType": "ExpressionStatement",
                  "src": "3222:42:46"
                }
              ]
            },
            "documentation": null,
            "id": 8714,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "closeBorrowPosition",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 8627,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 8621,
                  "name": "_borrowAccountNumber",
                  "nodeType": "VariableDeclaration",
                  "scope": 8714,
                  "src": "2395:28:46",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 8620,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "2395:7:46",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 8623,
                  "name": "_toAccountNumber",
                  "nodeType": "VariableDeclaration",
                  "scope": 8714,
                  "src": "2433:24:46",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 8622,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "2433:7:46",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 8626,
                  "name": "_collateralMarketIds",
                  "nodeType": "VariableDeclaration",
                  "scope": 8714,
                  "src": "2467:39:46",
                  "stateVariable": false,
                  "storageLocation": "calldata",
                  "typeDescriptions": {
                    "typeIdentifier": "t_array$_t_uint256_$dyn_calldata_ptr",
                    "typeString": "uint256[]"
                  },
                  "typeName": {
                    "baseType": {
                      "id": 8624,
                      "name": "uint256",
                      "nodeType": "ElementaryTypeName",
                      "src": "2467:7:46",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "id": 8625,
                    "length": null,
                    "nodeType": "ArrayTypeName",
                    "src": "2467:9:46",
                    "typeDescriptions": {
                      "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr",
                      "typeString": "uint256[]"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "2385:127:46"
            },
            "returnParameters": {
              "id": 8628,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "2522:0:46"
            },
            "scope": 8839,
            "src": "2357:914:46",
            "stateMutability": "nonpayable",
            "superFunction": 4032,
            "visibility": "external"
          },
          {
            "body": {
              "id": 8735,
              "nodeType": "Block",
              "src": "3512:191:46",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 8728,
                        "name": "_fromAccountNumber",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 8716,
                        "src": "3560:18:46",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 8729,
                        "name": "_toAccountNumber",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 8718,
                        "src": "3592:16:46",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 8730,
                        "name": "_marketId",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 8720,
                        "src": "3622:9:46",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 8731,
                        "name": "_amountWei",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 8722,
                        "src": "3645:10:46",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 8732,
                        "name": "_balanceCheckFlag",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 8724,
                        "src": "3669:17:46",
                        "typeDescriptions": {
                          "typeIdentifier": "t_enum$_BalanceCheckFlag_$5841",
                          "typeString": "enum AccountBalanceLib.BalanceCheckFlag"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        {
                          "typeIdentifier": "t_enum$_BalanceCheckFlag_$5841",
                          "typeString": "enum AccountBalanceLib.BalanceCheckFlag"
                        }
                      ],
                      "id": 8727,
                      "name": "_transferBetweenAccounts",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 8838,
                      "src": "3522:24:46",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_nonpayable$_t_uint256_$_t_uint256_$_t_uint256_$_t_uint256_$_t_enum$_BalanceCheckFlag_$5841_$returns$__$",
                        "typeString": "function (uint256,uint256,uint256,uint256,enum AccountBalanceLib.BalanceCheckFlag)"
                      }
                    },
                    "id": 8733,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "3522:174:46",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 8734,
                  "nodeType": "ExpressionStatement",
                  "src": "3522:174:46"
                }
              ]
            },
            "documentation": null,
            "id": 8736,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "transferBetweenAccounts",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 8725,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 8716,
                  "name": "_fromAccountNumber",
                  "nodeType": "VariableDeclaration",
                  "scope": 8736,
                  "src": "3319:26:46",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 8715,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "3319:7:46",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 8718,
                  "name": "_toAccountNumber",
                  "nodeType": "VariableDeclaration",
                  "scope": 8736,
                  "src": "3355:24:46",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 8717,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "3355:7:46",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 8720,
                  "name": "_marketId",
                  "nodeType": "VariableDeclaration",
                  "scope": 8736,
                  "src": "3389:17:46",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 8719,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "3389:7:46",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 8722,
                  "name": "_amountWei",
                  "nodeType": "VariableDeclaration",
                  "scope": 8736,
                  "src": "3416:18:46",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 8721,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "3416:7:46",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 8724,
                  "name": "_balanceCheckFlag",
                  "nodeType": "VariableDeclaration",
                  "scope": 8736,
                  "src": "3444:52:46",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_enum$_BalanceCheckFlag_$5841",
                    "typeString": "enum AccountBalanceLib.BalanceCheckFlag"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 8723,
                    "name": "AccountBalanceLib.BalanceCheckFlag",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 5841,
                    "src": "3444:34:46",
                    "typeDescriptions": {
                      "typeIdentifier": "t_enum$_BalanceCheckFlag_$5841",
                      "typeString": "enum AccountBalanceLib.BalanceCheckFlag"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "3309:193:46"
            },
            "returnParameters": {
              "id": 8726,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "3512:0:46"
            },
            "scope": 8839,
            "src": "3277:426:46",
            "stateMutability": "nonpayable",
            "superFunction": 4045,
            "visibility": "external"
          },
          {
            "body": {
              "id": 8798,
              "nodeType": "Block",
              "src": "3980:1136:46",
              "statements": [
                {
                  "condition": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_enum$_BalanceCheckFlag_$5841",
                      "typeString": "enum AccountBalanceLib.BalanceCheckFlag"
                    },
                    "id": 8751,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "id": 8747,
                      "name": "_balanceCheckFlag",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 8744,
                      "src": "4260:17:46",
                      "typeDescriptions": {
                        "typeIdentifier": "t_enum$_BalanceCheckFlag_$5841",
                        "typeString": "enum AccountBalanceLib.BalanceCheckFlag"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "==",
                    "rightExpression": {
                      "argumentTypes": null,
                      "expression": {
                        "argumentTypes": null,
                        "expression": {
                          "argumentTypes": null,
                          "id": 8748,
                          "name": "AccountBalanceLib",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 5891,
                          "src": "4281:17:46",
                          "typeDescriptions": {
                            "typeIdentifier": "t_type$_t_contract$_AccountBalanceLib_$5891_$",
                            "typeString": "type(library AccountBalanceLib)"
                          }
                        },
                        "id": 8749,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "BalanceCheckFlag",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": 5841,
                        "src": "4281:34:46",
                        "typeDescriptions": {
                          "typeIdentifier": "t_type$_t_enum$_BalanceCheckFlag_$5841_$",
                          "typeString": "type(enum AccountBalanceLib.BalanceCheckFlag)"
                        }
                      },
                      "id": 8750,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "lValueRequested": false,
                      "memberName": "To",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": null,
                      "src": "4281:37:46",
                      "typeDescriptions": {
                        "typeIdentifier": "t_enum$_BalanceCheckFlag_$5841",
                        "typeString": "enum AccountBalanceLib.BalanceCheckFlag"
                      }
                    },
                    "src": "4260:58:46",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "falseBody": {
                    "condition": {
                      "argumentTypes": null,
                      "commonType": {
                        "typeIdentifier": "t_enum$_BalanceCheckFlag_$5841",
                        "typeString": "enum AccountBalanceLib.BalanceCheckFlag"
                      },
                      "id": 8763,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "leftExpression": {
                        "argumentTypes": null,
                        "id": 8759,
                        "name": "_balanceCheckFlag",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 8744,
                        "src": "4414:17:46",
                        "typeDescriptions": {
                          "typeIdentifier": "t_enum$_BalanceCheckFlag_$5841",
                          "typeString": "enum AccountBalanceLib.BalanceCheckFlag"
                        }
                      },
                      "nodeType": "BinaryOperation",
                      "operator": "==",
                      "rightExpression": {
                        "argumentTypes": null,
                        "expression": {
                          "argumentTypes": null,
                          "expression": {
                            "argumentTypes": null,
                            "id": 8760,
                            "name": "AccountBalanceLib",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 5891,
                            "src": "4435:17:46",
                            "typeDescriptions": {
                              "typeIdentifier": "t_type$_t_contract$_AccountBalanceLib_$5891_$",
                              "typeString": "type(library AccountBalanceLib)"
                            }
                          },
                          "id": 8761,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "BalanceCheckFlag",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": 5841,
                          "src": "4435:34:46",
                          "typeDescriptions": {
                            "typeIdentifier": "t_type$_t_enum$_BalanceCheckFlag_$5841_$",
                            "typeString": "type(enum AccountBalanceLib.BalanceCheckFlag)"
                          }
                        },
                        "id": 8762,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "lValueRequested": false,
                        "memberName": "From",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": null,
                        "src": "4435:39:46",
                        "typeDescriptions": {
                          "typeIdentifier": "t_enum$_BalanceCheckFlag_$5841",
                          "typeString": "enum AccountBalanceLib.BalanceCheckFlag"
                        }
                      },
                      "src": "4414:60:46",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bool",
                        "typeString": "bool"
                      }
                    },
                    "falseBody": null,
                    "id": 8771,
                    "nodeType": "IfStatement",
                    "src": "4410:148:46",
                    "trueBody": {
                      "id": 8770,
                      "nodeType": "Block",
                      "src": "4476:82:46",
                      "statements": [
                        {
                          "expression": {
                            "argumentTypes": null,
                            "id": 8768,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "leftHandSide": {
                              "argumentTypes": null,
                              "id": 8764,
                              "name": "_balanceCheckFlag",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 8744,
                              "src": "4490:17:46",
                              "typeDescriptions": {
                                "typeIdentifier": "t_enum$_BalanceCheckFlag_$5841",
                                "typeString": "enum AccountBalanceLib.BalanceCheckFlag"
                              }
                            },
                            "nodeType": "Assignment",
                            "operator": "=",
                            "rightHandSide": {
                              "argumentTypes": null,
                              "expression": {
                                "argumentTypes": null,
                                "expression": {
                                  "argumentTypes": null,
                                  "id": 8765,
                                  "name": "AccountBalanceLib",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 5891,
                                  "src": "4510:17:46",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_type$_t_contract$_AccountBalanceLib_$5891_$",
                                    "typeString": "type(library AccountBalanceLib)"
                                  }
                                },
                                "id": 8766,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "BalanceCheckFlag",
                                "nodeType": "MemberAccess",
                                "referencedDeclaration": 5841,
                                "src": "4510:34:46",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_enum$_BalanceCheckFlag_$5841_$",
                                  "typeString": "type(enum AccountBalanceLib.BalanceCheckFlag)"
                                }
                              },
                              "id": 8767,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "memberName": "To",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": null,
                              "src": "4510:37:46",
                              "typeDescriptions": {
                                "typeIdentifier": "t_enum$_BalanceCheckFlag_$5841",
                                "typeString": "enum AccountBalanceLib.BalanceCheckFlag"
                              }
                            },
                            "src": "4490:57:46",
                            "typeDescriptions": {
                              "typeIdentifier": "t_enum$_BalanceCheckFlag_$5841",
                              "typeString": "enum AccountBalanceLib.BalanceCheckFlag"
                            }
                          },
                          "id": 8769,
                          "nodeType": "ExpressionStatement",
                          "src": "4490:57:46"
                        }
                      ]
                    }
                  },
                  "id": 8772,
                  "nodeType": "IfStatement",
                  "src": "4256:302:46",
                  "trueBody": {
                    "id": 8758,
                    "nodeType": "Block",
                    "src": "4320:84:46",
                    "statements": [
                      {
                        "expression": {
                          "argumentTypes": null,
                          "id": 8756,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "argumentTypes": null,
                            "id": 8752,
                            "name": "_balanceCheckFlag",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 8744,
                            "src": "4334:17:46",
                            "typeDescriptions": {
                              "typeIdentifier": "t_enum$_BalanceCheckFlag_$5841",
                              "typeString": "enum AccountBalanceLib.BalanceCheckFlag"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "argumentTypes": null,
                            "expression": {
                              "argumentTypes": null,
                              "expression": {
                                "argumentTypes": null,
                                "id": 8753,
                                "name": "AccountBalanceLib",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 5891,
                                "src": "4354:17:46",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_contract$_AccountBalanceLib_$5891_$",
                                  "typeString": "type(library AccountBalanceLib)"
                                }
                              },
                              "id": 8754,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "BalanceCheckFlag",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 5841,
                              "src": "4354:34:46",
                              "typeDescriptions": {
                                "typeIdentifier": "t_type$_t_enum$_BalanceCheckFlag_$5841_$",
                                "typeString": "type(enum AccountBalanceLib.BalanceCheckFlag)"
                              }
                            },
                            "id": 8755,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "lValueRequested": false,
                            "memberName": "From",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": null,
                            "src": "4354:39:46",
                            "typeDescriptions": {
                              "typeIdentifier": "t_enum$_BalanceCheckFlag_$5841",
                              "typeString": "enum AccountBalanceLib.BalanceCheckFlag"
                            }
                          },
                          "src": "4334:59:46",
                          "typeDescriptions": {
                            "typeIdentifier": "t_enum$_BalanceCheckFlag_$5841",
                            "typeString": "enum AccountBalanceLib.BalanceCheckFlag"
                          }
                        },
                        "id": 8757,
                        "nodeType": "ExpressionStatement",
                        "src": "4334:59:46"
                      }
                    ]
                  }
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 8776,
                        "name": "DOLOMITE_MARGIN",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2997,
                        "src": "4607:15:46",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_IDolomiteMargin_$24693",
                          "typeString": "contract IDolomiteMargin"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "expression": {
                          "argumentTypes": null,
                          "id": 8777,
                          "name": "msg",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 38107,
                          "src": "4664:3:46",
                          "typeDescriptions": {
                            "typeIdentifier": "t_magic_message",
                            "typeString": "msg"
                          }
                        },
                        "id": 8778,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "sender",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": null,
                        "src": "4664:10:46",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address_payable",
                          "typeString": "address payable"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 8779,
                        "name": "_borrowAccountNumber",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 8740,
                        "src": "4711:20:46",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "expression": {
                          "argumentTypes": null,
                          "id": 8780,
                          "name": "msg",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 38107,
                          "src": "4769:3:46",
                          "typeDescriptions": {
                            "typeIdentifier": "t_magic_message",
                            "typeString": "msg"
                          }
                        },
                        "id": 8781,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "sender",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": null,
                        "src": "4769:10:46",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address_payable",
                          "typeString": "address payable"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 8782,
                        "name": "_fromAccountNumber",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 8738,
                        "src": "4816:18:46",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 8783,
                        "name": "_marketId",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 8742,
                        "src": "4848:9:46",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "arguments": [
                          {
                            "argumentTypes": null,
                            "hexValue": "66616c7365",
                            "id": 8786,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "bool",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "4913:5:46",
                            "subdenomination": null,
                            "typeDescriptions": {
                              "typeIdentifier": "t_bool",
                              "typeString": "bool"
                            },
                            "value": "false"
                          },
                          {
                            "argumentTypes": null,
                            "expression": {
                              "argumentTypes": null,
                              "expression": {
                                "argumentTypes": null,
                                "id": 8787,
                                "name": "Types",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 31361,
                                "src": "4950:5:46",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_contract$_Types_$31361_$",
                                  "typeString": "type(library Types)"
                                }
                              },
                              "id": 8788,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "AssetDenomination",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 30868,
                              "src": "4950:23:46",
                              "typeDescriptions": {
                                "typeIdentifier": "t_type$_t_enum$_AssetDenomination_$30868_$",
                                "typeString": "type(enum Types.AssetDenomination)"
                              }
                            },
                            "id": 8789,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "lValueRequested": false,
                            "memberName": "Wei",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": null,
                            "src": "4950:27:46",
                            "typeDescriptions": {
                              "typeIdentifier": "t_enum$_AssetDenomination_$30868",
                              "typeString": "enum Types.AssetDenomination"
                            }
                          },
                          {
                            "argumentTypes": null,
                            "expression": {
                              "argumentTypes": null,
                              "expression": {
                                "argumentTypes": null,
                                "id": 8790,
                                "name": "Types",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 31361,
                                "src": "5000:5:46",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_contract$_Types_$31361_$",
                                  "typeString": "type(library Types)"
                                }
                              },
                              "id": 8791,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "AssetReference",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 30871,
                              "src": "5000:20:46",
                              "typeDescriptions": {
                                "typeIdentifier": "t_type$_t_enum$_AssetReference_$30871_$",
                                "typeString": "type(enum Types.AssetReference)"
                              }
                            },
                            "id": 8792,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "lValueRequested": false,
                            "memberName": "Target",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": null,
                            "src": "5000:27:46",
                            "typeDescriptions": {
                              "typeIdentifier": "t_enum$_AssetReference_$30871",
                              "typeString": "enum Types.AssetReference"
                            }
                          },
                          {
                            "argumentTypes": null,
                            "hexValue": "30",
                            "id": 8793,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "5052:1:46",
                            "subdenomination": null,
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_0_by_1",
                              "typeString": "int_const 0"
                            },
                            "value": "0"
                          }
                        ],
                        "expression": {
                          "argumentTypes": [
                            {
                              "typeIdentifier": "t_bool",
                              "typeString": "bool"
                            },
                            {
                              "typeIdentifier": "t_enum$_AssetDenomination_$30868",
                              "typeString": "enum Types.AssetDenomination"
                            },
                            {
                              "typeIdentifier": "t_enum$_AssetReference_$30871",
                              "typeString": "enum Types.AssetReference"
                            },
                            {
                              "typeIdentifier": "t_rational_0_by_1",
                              "typeString": "int_const 0"
                            }
                          ],
                          "expression": {
                            "argumentTypes": null,
                            "id": 8784,
                            "name": "Types",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 31361,
                            "src": "4871:5:46",
                            "typeDescriptions": {
                              "typeIdentifier": "t_type$_t_contract$_Types_$31361_$",
                              "typeString": "type(library Types)"
                            }
                          },
                          "id": 8785,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "AssetAmount",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": 30880,
                          "src": "4871:17:46",
                          "typeDescriptions": {
                            "typeIdentifier": "t_type$_t_struct$_AssetAmount_$30880_storage_ptr_$",
                            "typeString": "type(struct Types.AssetAmount storage pointer)"
                          }
                        },
                        "id": 8794,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "structConstructorCall",
                        "lValueRequested": false,
                        "names": [
                          "sign",
                          "denomination",
                          "ref",
                          "value"
                        ],
                        "nodeType": "FunctionCall",
                        "src": "4871:197:46",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_AssetAmount_$30880_memory",
                          "typeString": "struct Types.AssetAmount memory"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 8795,
                        "name": "_balanceCheckFlag",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 8744,
                        "src": "5082:17:46",
                        "typeDescriptions": {
                          "typeIdentifier": "t_enum$_BalanceCheckFlag_$5841",
                          "typeString": "enum AccountBalanceLib.BalanceCheckFlag"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_contract$_IDolomiteMargin_$24693",
                          "typeString": "contract IDolomiteMargin"
                        },
                        {
                          "typeIdentifier": "t_address_payable",
                          "typeString": "address payable"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        {
                          "typeIdentifier": "t_address_payable",
                          "typeString": "address payable"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        {
                          "typeIdentifier": "t_struct$_AssetAmount_$30880_memory",
                          "typeString": "struct Types.AssetAmount memory"
                        },
                        {
                          "typeIdentifier": "t_enum$_BalanceCheckFlag_$5841",
                          "typeString": "enum AccountBalanceLib.BalanceCheckFlag"
                        }
                      ],
                      "expression": {
                        "argumentTypes": null,
                        "id": 8773,
                        "name": "AccountActionLib",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 5819,
                        "src": "4568:16:46",
                        "typeDescriptions": {
                          "typeIdentifier": "t_type$_t_contract$_AccountActionLib_$5819_$",
                          "typeString": "type(library AccountActionLib)"
                        }
                      },
                      "id": 8775,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "transfer",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 5292,
                      "src": "4568:25:46",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IDolomiteMargin_$24693_$_t_address_$_t_uint256_$_t_address_$_t_uint256_$_t_uint256_$_t_struct$_AssetAmount_$30880_memory_ptr_$_t_enum$_BalanceCheckFlag_$5841_$returns$__$",
                        "typeString": "function (contract IDolomiteMargin,address,uint256,address,uint256,uint256,struct Types.AssetAmount memory,enum AccountBalanceLib.BalanceCheckFlag)"
                      }
                    },
                    "id": 8796,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "4568:541:46",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 8797,
                  "nodeType": "ExpressionStatement",
                  "src": "4568:541:46"
                }
              ]
            },
            "documentation": null,
            "id": 8799,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "repayAllForBorrowPosition",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 8745,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 8738,
                  "name": "_fromAccountNumber",
                  "nodeType": "VariableDeclaration",
                  "scope": 8799,
                  "src": "3811:26:46",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 8737,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "3811:7:46",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 8740,
                  "name": "_borrowAccountNumber",
                  "nodeType": "VariableDeclaration",
                  "scope": 8799,
                  "src": "3847:28:46",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 8739,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "3847:7:46",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 8742,
                  "name": "_marketId",
                  "nodeType": "VariableDeclaration",
                  "scope": 8799,
                  "src": "3885:17:46",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 8741,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "3885:7:46",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 8744,
                  "name": "_balanceCheckFlag",
                  "nodeType": "VariableDeclaration",
                  "scope": 8799,
                  "src": "3912:52:46",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_enum$_BalanceCheckFlag_$5841",
                    "typeString": "enum AccountBalanceLib.BalanceCheckFlag"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 8743,
                    "name": "AccountBalanceLib.BalanceCheckFlag",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 5841,
                    "src": "3912:34:46",
                    "typeDescriptions": {
                      "typeIdentifier": "t_enum$_BalanceCheckFlag_$5841",
                      "typeString": "enum AccountBalanceLib.BalanceCheckFlag"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "3801:169:46"
            },
            "returnParameters": {
              "id": 8746,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "3980:0:46"
            },
            "scope": 8839,
            "src": "3767:1349:46",
            "stateMutability": "nonpayable",
            "superFunction": 4056,
            "visibility": "external"
          },
          {
            "body": {
              "id": 8837,
              "nodeType": "Block",
              "src": "5427:560:46",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 8815,
                        "name": "DOLOMITE_MARGIN",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 2997,
                        "src": "5476:15:46",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_IDolomiteMargin_$24693",
                          "typeString": "contract IDolomiteMargin"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "expression": {
                          "argumentTypes": null,
                          "id": 8816,
                          "name": "msg",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 38107,
                          "src": "5531:3:46",
                          "typeDescriptions": {
                            "typeIdentifier": "t_magic_message",
                            "typeString": "msg"
                          }
                        },
                        "id": 8817,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "sender",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": null,
                        "src": "5531:10:46",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address_payable",
                          "typeString": "address payable"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 8818,
                        "name": "_fromAccountNumber",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 8801,
                        "src": "5578:18:46",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "expression": {
                          "argumentTypes": null,
                          "id": 8819,
                          "name": "msg",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 38107,
                          "src": "5634:3:46",
                          "typeDescriptions": {
                            "typeIdentifier": "t_magic_message",
                            "typeString": "msg"
                          }
                        },
                        "id": 8820,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "sender",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": null,
                        "src": "5634:10:46",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address_payable",
                          "typeString": "address payable"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 8821,
                        "name": "_toAccountNumber",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 8803,
                        "src": "5681:16:46",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 8822,
                        "name": "_marketId",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 8805,
                        "src": "5711:9:46",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "arguments": [
                          {
                            "argumentTypes": null,
                            "hexValue": "66616c7365",
                            "id": 8825,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "bool",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "5776:5:46",
                            "subdenomination": null,
                            "typeDescriptions": {
                              "typeIdentifier": "t_bool",
                              "typeString": "bool"
                            },
                            "value": "false"
                          },
                          {
                            "argumentTypes": null,
                            "expression": {
                              "argumentTypes": null,
                              "expression": {
                                "argumentTypes": null,
                                "id": 8826,
                                "name": "Types",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 31361,
                                "src": "5813:5:46",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_contract$_Types_$31361_$",
                                  "typeString": "type(library Types)"
                                }
                              },
                              "id": 8827,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "AssetDenomination",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 30868,
                              "src": "5813:23:46",
                              "typeDescriptions": {
                                "typeIdentifier": "t_type$_t_enum$_AssetDenomination_$30868_$",
                                "typeString": "type(enum Types.AssetDenomination)"
                              }
                            },
                            "id": 8828,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "lValueRequested": false,
                            "memberName": "Wei",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": null,
                            "src": "5813:27:46",
                            "typeDescriptions": {
                              "typeIdentifier": "t_enum$_AssetDenomination_$30868",
                              "typeString": "enum Types.AssetDenomination"
                            }
                          },
                          {
                            "argumentTypes": null,
                            "expression": {
                              "argumentTypes": null,
                              "expression": {
                                "argumentTypes": null,
                                "id": 8829,
                                "name": "Types",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 31361,
                                "src": "5863:5:46",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_contract$_Types_$31361_$",
                                  "typeString": "type(library Types)"
                                }
                              },
                              "id": 8830,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "AssetReference",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 30871,
                              "src": "5863:20:46",
                              "typeDescriptions": {
                                "typeIdentifier": "t_type$_t_enum$_AssetReference_$30871_$",
                                "typeString": "type(enum Types.AssetReference)"
                              }
                            },
                            "id": 8831,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "lValueRequested": false,
                            "memberName": "Delta",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": null,
                            "src": "5863:26:46",
                            "typeDescriptions": {
                              "typeIdentifier": "t_enum$_AssetReference_$30871",
                              "typeString": "enum Types.AssetReference"
                            }
                          },
                          {
                            "argumentTypes": null,
                            "id": 8832,
                            "name": "_amountWei",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 8807,
                            "src": "5914:10:46",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          }
                        ],
                        "expression": {
                          "argumentTypes": [
                            {
                              "typeIdentifier": "t_bool",
                              "typeString": "bool"
                            },
                            {
                              "typeIdentifier": "t_enum$_AssetDenomination_$30868",
                              "typeString": "enum Types.AssetDenomination"
                            },
                            {
                              "typeIdentifier": "t_enum$_AssetReference_$30871",
                              "typeString": "enum Types.AssetReference"
                            },
                            {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          ],
                          "expression": {
                            "argumentTypes": null,
                            "id": 8823,
                            "name": "Types",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 31361,
                            "src": "5734:5:46",
                            "typeDescriptions": {
                              "typeIdentifier": "t_type$_t_contract$_Types_$31361_$",
                              "typeString": "type(library Types)"
                            }
                          },
                          "id": 8824,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "AssetAmount",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": 30880,
                          "src": "5734:17:46",
                          "typeDescriptions": {
                            "typeIdentifier": "t_type$_t_struct$_AssetAmount_$30880_storage_ptr_$",
                            "typeString": "type(struct Types.AssetAmount storage pointer)"
                          }
                        },
                        "id": 8833,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "kind": "structConstructorCall",
                        "lValueRequested": false,
                        "names": [
                          "sign",
                          "denomination",
                          "ref",
                          "value"
                        ],
                        "nodeType": "FunctionCall",
                        "src": "5734:205:46",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_AssetAmount_$30880_memory",
                          "typeString": "struct Types.AssetAmount memory"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 8834,
                        "name": "_balanceCheckFlag",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 8809,
                        "src": "5953:17:46",
                        "typeDescriptions": {
                          "typeIdentifier": "t_enum$_BalanceCheckFlag_$5841",
                          "typeString": "enum AccountBalanceLib.BalanceCheckFlag"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_contract$_IDolomiteMargin_$24693",
                          "typeString": "contract IDolomiteMargin"
                        },
                        {
                          "typeIdentifier": "t_address_payable",
                          "typeString": "address payable"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        {
                          "typeIdentifier": "t_address_payable",
                          "typeString": "address payable"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        {
                          "typeIdentifier": "t_struct$_AssetAmount_$30880_memory",
                          "typeString": "struct Types.AssetAmount memory"
                        },
                        {
                          "typeIdentifier": "t_enum$_BalanceCheckFlag_$5841",
                          "typeString": "enum AccountBalanceLib.BalanceCheckFlag"
                        }
                      ],
                      "expression": {
                        "argumentTypes": null,
                        "id": 8812,
                        "name": "AccountActionLib",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 5819,
                        "src": "5437:16:46",
                        "typeDescriptions": {
                          "typeIdentifier": "t_type$_t_contract$_AccountActionLib_$5819_$",
                          "typeString": "type(library AccountActionLib)"
                        }
                      },
                      "id": 8814,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "transfer",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 5292,
                      "src": "5437:25:46",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_nonpayable$_t_contract$_IDolomiteMargin_$24693_$_t_address_$_t_uint256_$_t_address_$_t_uint256_$_t_uint256_$_t_struct$_AssetAmount_$30880_memory_ptr_$_t_enum$_BalanceCheckFlag_$5841_$returns$__$",
                        "typeString": "function (contract IDolomiteMargin,address,uint256,address,uint256,uint256,struct Types.AssetAmount memory,enum AccountBalanceLib.BalanceCheckFlag)"
                      }
                    },
                    "id": 8835,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "5437:543:46",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 8836,
                  "nodeType": "ExpressionStatement",
                  "src": "5437:543:46"
                }
              ]
            },
            "documentation": null,
            "id": 8838,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "_transferBetweenAccounts",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 8810,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 8801,
                  "name": "_fromAccountNumber",
                  "nodeType": "VariableDeclaration",
                  "scope": 8838,
                  "src": "5234:26:46",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 8800,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "5234:7:46",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 8803,
                  "name": "_toAccountNumber",
                  "nodeType": "VariableDeclaration",
                  "scope": 8838,
                  "src": "5270:24:46",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 8802,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "5270:7:46",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 8805,
                  "name": "_marketId",
                  "nodeType": "VariableDeclaration",
                  "scope": 8838,
                  "src": "5304:17:46",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 8804,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "5304:7:46",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 8807,
                  "name": "_amountWei",
                  "nodeType": "VariableDeclaration",
                  "scope": 8838,
                  "src": "5331:18:46",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 8806,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "5331:7:46",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 8809,
                  "name": "_balanceCheckFlag",
                  "nodeType": "VariableDeclaration",
                  "scope": 8838,
                  "src": "5359:52:46",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_enum$_BalanceCheckFlag_$5841",
                    "typeString": "enum AccountBalanceLib.BalanceCheckFlag"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 8808,
                    "name": "AccountBalanceLib.BalanceCheckFlag",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 5841,
                    "src": "5359:34:46",
                    "typeDescriptions": {
                      "typeIdentifier": "t_enum$_BalanceCheckFlag_$5841",
                      "typeString": "enum AccountBalanceLib.BalanceCheckFlag"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "5224:193:46"
            },
            "returnParameters": {
              "id": 8811,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "5427:0:46"
            },
            "scope": 8839,
            "src": "5191:796:46",
            "stateMutability": "nonpayable",
            "superFunction": null,
            "visibility": "internal"
          }
        ],
        "scope": 8840,
        "src": "1525:4464:46"
      }
    ],
    "src": "595:5395:46"
  },
  "compiler": {
    "name": "solc",
    "version": "0.5.16+commit.9c3226ce.Emscripten.clang"
  },
  "networks": {},
  "schemaVersion": "3.0.23",
  "updatedAt": "2025-06-22T04:01:53.612Z",
  "devdoc": {
    "author": "Dolomite",
    "details": "Proxy contract for opening borrow positions. This makes indexing easier and lowers gas costs on Arbitrum by     minimizing call data",
    "methods": {},
    "title": "BorrowPositionProxyV1"
  },
  "userdoc": {
    "methods": {}
  }
}