impermax-sdk 1.2.110 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (357) hide show
  1. package/lib/abis/ImpermaxABI.d.ts +2 -2
  2. package/lib/abis/ImpermaxABI.js +3 -3
  3. package/lib/abis/contracts/ClaimAggregator.json +2015 -2015
  4. package/lib/abis/contracts/IAllowanceTransfer.json +3772 -0
  5. package/lib/abis/contracts/IBorrowable.json +13207 -13207
  6. package/lib/abis/contracts/IClaimable.json +406 -406
  7. package/lib/abis/contracts/ICollateral.json +9052 -9052
  8. package/lib/abis/contracts/IERC20.json +2376 -2376
  9. package/lib/abis/contracts/IERC721.json +3515 -0
  10. package/lib/abis/contracts/IFactory.json +3660 -3660
  11. package/lib/abis/contracts/IFarmingPool.json +3584 -3584
  12. package/lib/abis/contracts/ILendingVaultV1.json +8358 -8358
  13. package/lib/abis/contracts/IMerkleDistributor.json +1134 -1134
  14. package/lib/abis/contracts/IRouter02.json +7283 -7283
  15. package/lib/abis/contracts/ISimpleUniswapOracle.json +1469 -1469
  16. package/lib/abis/contracts/IStakedLPToken.json +7309 -7309
  17. package/lib/abis/contracts/IStakingRewards.json +1036 -1036
  18. package/lib/abis/contracts/ITokenizedUniswapV2Position.json +4167 -0
  19. package/lib/abis/contracts/ITokenizedUniswapV3Position.json +5539 -0
  20. package/lib/abis/contracts/IUniswapV2Factory.json +1690 -1690
  21. package/lib/abis/contracts/IUniswapV2Pair.json +6761 -6761
  22. package/lib/abis/contracts/IUniswapV3Pool.json +6606 -0
  23. package/lib/abis/contracts/ImpermaxChef.json +20945 -20945
  24. package/lib/abis/contracts/ImpermaxConfigManager.json +31595 -31595
  25. package/lib/abis/contracts/ImpermaxV3Borrowable.json +22131 -0
  26. package/lib/abis/contracts/ImpermaxV3Collateral.json +22988 -0
  27. package/lib/abis/contracts/ImpermaxV3Factory.json +17645 -0
  28. package/lib/abis/contracts/ImpermaxV3UniV2Router01.json +32488 -0
  29. package/lib/abis/contracts/ImpermaxV3UniV3Router01.json +37742 -0
  30. package/lib/abis/contracts/LendingVaultWatcher01.json +4076 -4076
  31. package/lib/abis/contracts/PoolTokenRouter01.json +9058 -0
  32. package/lib/config/amms.d.ts +102 -102
  33. package/lib/config/amms.js +433 -433
  34. package/lib/config/chainId.d.ts +2 -0
  35. package/lib/config/chainId.js +26 -0
  36. package/lib/config/contracts/claim-aggregators.d.ts +2 -2
  37. package/lib/config/contracts/claim-aggregators.js +26 -26
  38. package/lib/config/contracts/impermax-chef.d.ts +2 -2
  39. package/lib/config/contracts/impermax-chef.js +27 -27
  40. package/lib/config/contracts/impermax-config-manager.d.ts +2 -2
  41. package/lib/config/contracts/impermax-config-manager.js +26 -26
  42. package/lib/config/contracts/impermax-factories.d.ts +4 -4
  43. package/lib/config/contracts/impermax-factories.js +87 -87
  44. package/lib/config/contracts/imxes.d.ts +2 -2
  45. package/lib/config/contracts/imxes.js +26 -26
  46. package/lib/config/contracts/lending-vault-watcher.d.ts +2 -2
  47. package/lib/config/contracts/lending-vault-watcher.js +26 -26
  48. package/lib/config/contracts/merkle-distributors.d.ts +4 -4
  49. package/lib/config/contracts/merkle-distributors.js +70 -70
  50. package/lib/config/contracts/routers.d.ts +4 -3
  51. package/lib/config/contracts/routers.js +118 -94
  52. package/lib/config/contracts/simple-uniswap-oracles.d.ts +2 -2
  53. package/lib/config/contracts/simple-uniswap-oracles.js +49 -49
  54. package/lib/config/contracts/weths.d.ts +2 -2
  55. package/lib/config/contracts/weths.js +27 -27
  56. package/lib/config/debank-ids.d.ts +2 -2
  57. package/lib/config/debank-ids.js +26 -26
  58. package/lib/config/endpoints/merkle-distributors.d.ts +4 -4
  59. package/lib/config/endpoints/merkle-distributors.js +70 -70
  60. package/lib/config/eth.d.ts +3 -3
  61. package/lib/config/eth.js +48 -48
  62. package/lib/config/factories.d.ts +7 -7
  63. package/lib/config/factories.js +31 -30
  64. package/lib/config/farms.d.ts +109 -109
  65. package/lib/config/farms.js +207 -207
  66. package/lib/config/general.d.ts +5 -5
  67. package/lib/config/general.js +8 -8
  68. package/lib/config/subgraphs.d.ts +45 -45
  69. package/lib/config/subgraphs.js +187 -187
  70. package/lib/config/types.d.ts +85 -72
  71. package/lib/config/types.js +72 -58
  72. package/lib/index.d.ts +36 -35
  73. package/lib/index.js +159 -152
  74. package/lib/offchain/account/index.d.ts +9 -7
  75. package/lib/offchain/account/index.js +43 -39
  76. package/lib/offchain/account/lendingPool/borrowable.d.ts +14 -0
  77. package/lib/offchain/account/lendingPool/borrowable.js +73 -0
  78. package/lib/offchain/account/lendingPool/collateral.d.ts +12 -0
  79. package/lib/offchain/account/lendingPool/collateral.js +42 -0
  80. package/lib/offchain/account/lendingPool/index.d.ts +6 -5
  81. package/lib/offchain/account/lendingPool/index.js +14 -12
  82. package/lib/offchain/account/lendingPool/offchainAccountBorrowable.d.ts +14 -17
  83. package/lib/offchain/account/lendingPool/offchainAccountBorrowable.js +45 -71
  84. package/lib/offchain/account/lendingPool/offchainAccountCollateral.d.ts +11 -13
  85. package/lib/offchain/account/lendingPool/offchainAccountCollateral.js +31 -43
  86. package/lib/offchain/account/lendingPool/offchainAccountLendingPool.d.ts +28 -21
  87. package/lib/offchain/account/lendingPool/offchainAccountLendingPool.js +69 -68
  88. package/lib/offchain/account/lendingPool/offchainLeveragedPosition.d.ts +25 -0
  89. package/lib/offchain/account/lendingPool/offchainLeveragedPosition.js +116 -0
  90. package/lib/offchain/account/lendingVault.d.ts +11 -0
  91. package/lib/offchain/account/lendingVault.js +38 -0
  92. package/lib/offchain/account/offchainAccount.d.ts +25 -25
  93. package/lib/offchain/account/offchainAccount.js +129 -129
  94. package/lib/offchain/account/offchainAccountLendingVault.d.ts +16 -16
  95. package/lib/offchain/account/offchainAccountLendingVault.js +64 -64
  96. package/lib/offchain/account/offchainAccountPoolToken.d.ts +7 -7
  97. package/lib/offchain/account/offchainAccountPoolToken.js +24 -24
  98. package/lib/offchain/account/offchainMultichainAccount.d.ts +34 -0
  99. package/lib/offchain/account/offchainMultichainAccount.js +66 -0
  100. package/lib/offchain/account/poolToken.d.ts +6 -0
  101. package/lib/offchain/account/poolToken.js +21 -0
  102. package/lib/offchain/account/vault/index.d.ts +3 -0
  103. package/lib/offchain/account/vault/index.js +7 -0
  104. package/lib/offchain/account/vault/offchainAccountVault.d.ts +16 -0
  105. package/lib/offchain/account/vault/offchainAccountVault.js +64 -0
  106. package/lib/offchain/configManager/index.d.ts +5 -5
  107. package/lib/offchain/configManager/index.js +12 -12
  108. package/lib/offchain/configManager/offchainConfigManager.d.ts +25 -25
  109. package/lib/offchain/configManager/offchainConfigManager.js +76 -76
  110. package/lib/offchain/configManager/offchainConfigManagerInitializer.d.ts +6 -6
  111. package/lib/offchain/configManager/offchainConfigManagerInitializer.js +53 -53
  112. package/lib/offchain/configManager/offchainPairConfig.d.ts +40 -40
  113. package/lib/offchain/configManager/offchainPairConfig.js +86 -86
  114. package/lib/offchain/configManager/offchainProposal.d.ts +17 -17
  115. package/lib/offchain/configManager/offchainProposal.js +53 -53
  116. package/lib/offchain/index.d.ts +15 -14
  117. package/lib/offchain/index.js +55 -53
  118. package/lib/offchain/initializer.d.ts +32 -0
  119. package/lib/offchain/initializer.js +627 -0
  120. package/lib/offchain/lendingPool/borrowable.d.ts +55 -0
  121. package/lib/offchain/lendingPool/borrowable.js +351 -0
  122. package/lib/offchain/lendingPool/collateral.d.ts +17 -0
  123. package/lib/offchain/lendingPool/collateral.js +72 -0
  124. package/lib/offchain/lendingPool/index.d.ts +5 -5
  125. package/lib/offchain/lendingPool/index.js +12 -12
  126. package/lib/offchain/lendingPool/offchainBorrowable.d.ts +59 -59
  127. package/lib/offchain/lendingPool/offchainBorrowable.js +366 -366
  128. package/lib/offchain/lendingPool/offchainCollateral.d.ts +20 -19
  129. package/lib/offchain/lendingPool/offchainCollateral.js +81 -75
  130. package/lib/offchain/lendingPool/offchainLendingPool.d.ts +60 -47
  131. package/lib/offchain/lendingPool/offchainLendingPool.js +277 -230
  132. package/lib/offchain/lendingVault.d.ts +22 -0
  133. package/lib/offchain/lendingVault.js +115 -0
  134. package/lib/offchain/offchain.d.ts +106 -113
  135. package/lib/offchain/offchain.js +248 -251
  136. package/lib/offchain/offchainAPRHelper.d.ts +45 -45
  137. package/lib/offchain/offchainAPRHelper.js +239 -239
  138. package/lib/offchain/offchainEndpointManager.d.ts +25 -25
  139. package/lib/offchain/offchainEndpointManager.js +126 -126
  140. package/lib/offchain/offchainInitializer.d.ts +52 -52
  141. package/lib/offchain/offchainInitializer.js +792 -792
  142. package/lib/offchain/offchainLendingVault.d.ts +25 -25
  143. package/lib/offchain/offchainLendingVault.js +114 -114
  144. package/lib/offchain/offchainMultichain.d.ts +50 -0
  145. package/lib/offchain/offchainMultichain.js +75 -0
  146. package/lib/offchain/offchainPoolToken.d.ts +21 -21
  147. package/lib/offchain/offchainPoolToken.js +128 -128
  148. package/lib/offchain/offchainPriceHelper.d.ts +22 -22
  149. package/lib/offchain/offchainPriceHelper.js +364 -364
  150. package/lib/offchain/offchainSolidexHelper.d.ts +16 -16
  151. package/lib/offchain/offchainSolidexHelper.js +58 -58
  152. package/lib/offchain/offchainTypes.d.ts +212 -212
  153. package/lib/offchain/offchainTypes.js +3 -3
  154. package/lib/offchain/poolToken.d.ts +20 -0
  155. package/lib/offchain/poolToken.js +120 -0
  156. package/lib/offchain/priceHelper.d.ts +21 -0
  157. package/lib/offchain/priceHelper.js +195 -0
  158. package/lib/offchain/queries/apis/ponder/index.d.ts +14 -14
  159. package/lib/offchain/queries/apis/ponder/index.js +281 -281
  160. package/lib/offchain/queries/apis/thegraph/index.d.ts +19 -19
  161. package/lib/offchain/queries/apis/thegraph/index.js +355 -355
  162. package/lib/offchain/queries/index.d.ts +20 -20
  163. package/lib/offchain/queries/index.js +51 -51
  164. package/lib/offchain/queries/interfaces/query-builder.d.ts +19 -19
  165. package/lib/offchain/queries/interfaces/query-builder.js +2 -2
  166. package/lib/offchain/queries/interfaces/transformers.js +9 -9
  167. package/lib/offchain/query.d.ts +15 -0
  168. package/lib/offchain/query.js +323 -0
  169. package/lib/offchain/solidexHelper.d.ts +16 -0
  170. package/lib/offchain/solidexHelper.js +58 -0
  171. package/lib/offchain/types.d.ts +150 -0
  172. package/lib/offchain/types.js +3 -0
  173. package/lib/offchain/vault/index.d.ts +6 -0
  174. package/lib/offchain/vault/index.js +14 -0
  175. package/lib/offchain/vault/offchainHedgedVault.d.ts +9 -0
  176. package/lib/offchain/vault/offchainHedgedVault.js +57 -0
  177. package/lib/offchain/vault/offchainLendingVault.d.ts +16 -0
  178. package/lib/offchain/vault/offchainLendingVault.js +73 -0
  179. package/lib/offchain/vault/offchainLeveragedVault.d.ts +9 -0
  180. package/lib/offchain/vault/offchainLeveragedVault.js +57 -0
  181. package/lib/offchain/vault/offchainVault.d.ts +34 -0
  182. package/lib/offchain/vault/offchainVault.js +130 -0
  183. package/lib/onchain/account/index.d.ts +6 -6
  184. package/lib/onchain/account/index.js +38 -38
  185. package/lib/onchain/account/interactions/index.d.ts +28 -0
  186. package/lib/onchain/account/interactions/index.js +158 -0
  187. package/lib/onchain/account/interactions/lendingPool/borrowable.d.ts +16 -0
  188. package/lib/onchain/account/interactions/lendingPool/borrowable.js +49 -0
  189. package/lib/onchain/account/interactions/lendingPool/collateral.d.ts +15 -0
  190. package/lib/onchain/account/interactions/lendingPool/collateral.js +33 -0
  191. package/lib/onchain/account/interactions/lendingPool/index.d.ts +41 -0
  192. package/lib/onchain/account/interactions/lendingPool/index.js +120 -0
  193. package/lib/onchain/account/interactions/lendingVault.d.ts +10 -0
  194. package/lib/onchain/account/interactions/lendingVault.js +12 -0
  195. package/lib/onchain/account/interactions/poolToken.d.ts +33 -0
  196. package/lib/onchain/account/interactions/poolToken.js +180 -0
  197. package/lib/onchain/account/lendingPool/borrowable.d.ts +29 -0
  198. package/lib/onchain/account/lendingPool/borrowable.js +135 -0
  199. package/lib/onchain/account/lendingPool/collateral.d.ts +15 -0
  200. package/lib/onchain/account/lendingPool/collateral.js +66 -0
  201. package/lib/onchain/account/lendingPool/index.d.ts +12 -5
  202. package/lib/onchain/account/lendingPool/index.js +49 -12
  203. package/lib/onchain/account/lendingPool/nftlp/index.d.ts +4 -0
  204. package/lib/onchain/account/lendingPool/nftlp/index.js +11 -0
  205. package/lib/onchain/account/lendingPool/nftlp/onchainAccountNftlp.d.ts +7 -0
  206. package/lib/onchain/account/lendingPool/nftlp/onchainAccountNftlp.js +12 -0
  207. package/lib/onchain/account/lendingPool/nftlp/onchainAccountNftlpUniswapV3.d.ts +4 -0
  208. package/lib/onchain/account/lendingPool/nftlp/onchainAccountNftlpUniswapV3.js +13 -0
  209. package/lib/onchain/account/lendingPool/onchainAccountBorrowable.d.ts +39 -34
  210. package/lib/onchain/account/lendingPool/onchainAccountBorrowable.js +131 -176
  211. package/lib/onchain/account/lendingPool/onchainAccountBorrowableV2.d.ts +10 -0
  212. package/lib/onchain/account/lendingPool/onchainAccountBorrowableV2.js +55 -0
  213. package/lib/onchain/account/lendingPool/onchainAccountBorrowableV3.d.ts +10 -0
  214. package/lib/onchain/account/lendingPool/onchainAccountBorrowableV3.js +28 -0
  215. package/lib/onchain/account/lendingPool/onchainAccountCollateral.d.ts +10 -23
  216. package/lib/onchain/account/lendingPool/onchainAccountCollateral.js +26 -109
  217. package/lib/onchain/account/lendingPool/onchainAccountCollateralV2.d.ts +25 -0
  218. package/lib/onchain/account/lendingPool/onchainAccountCollateralV2.js +99 -0
  219. package/lib/onchain/account/lendingPool/onchainAccountCollateralV3.d.ts +18 -0
  220. package/lib/onchain/account/lendingPool/onchainAccountCollateralV3.js +44 -0
  221. package/lib/onchain/account/lendingPool/onchainAccountLendingPool.d.ts +42 -57
  222. package/lib/onchain/account/lendingPool/onchainAccountLendingPool.js +142 -352
  223. package/lib/onchain/account/lendingPool/onchainAccountLendingPoolV2.d.ts +44 -0
  224. package/lib/onchain/account/lendingPool/onchainAccountLendingPoolV2.js +285 -0
  225. package/lib/onchain/account/lendingPool/onchainAccountLendingPoolV3.d.ts +27 -0
  226. package/lib/onchain/account/lendingPool/onchainAccountLendingPoolV3.js +32 -0
  227. package/lib/onchain/account/lendingVault.d.ts +10 -0
  228. package/lib/onchain/account/lendingVault.js +35 -0
  229. package/lib/onchain/account/onchainAccount.d.ts +32 -32
  230. package/lib/onchain/account/onchainAccount.js +166 -167
  231. package/lib/onchain/account/onchainAccountLendingVault.d.ts +19 -19
  232. package/lib/onchain/account/onchainAccountLendingVault.js +48 -48
  233. package/lib/onchain/account/onchainAccountPoolToken.d.ts +30 -30
  234. package/lib/onchain/account/onchainAccountPoolToken.js +86 -86
  235. package/lib/onchain/account/poolToken.d.ts +24 -0
  236. package/lib/onchain/account/poolToken.js +84 -0
  237. package/lib/onchain/configManager/index.d.ts +5 -5
  238. package/lib/onchain/configManager/index.js +12 -12
  239. package/lib/onchain/configManager/onchainConfigManager.d.ts +12 -12
  240. package/lib/onchain/configManager/onchainConfigManager.js +38 -38
  241. package/lib/onchain/configManager/onchainPairConfig.d.ts +38 -38
  242. package/lib/onchain/configManager/onchainPairConfig.js +85 -85
  243. package/lib/onchain/configManager/onchainProposal.d.ts +17 -17
  244. package/lib/onchain/configManager/onchainProposal.js +55 -55
  245. package/lib/onchain/contractsHelper.d.ts +29 -0
  246. package/lib/onchain/contractsHelper.js +52 -0
  247. package/lib/onchain/impermaxFactory/index.d.ts +7 -5
  248. package/lib/onchain/impermaxFactory/index.js +39 -35
  249. package/lib/onchain/impermaxFactory/lendingPool/borrowable.d.ts +36 -0
  250. package/lib/onchain/impermaxFactory/lendingPool/borrowable.js +153 -0
  251. package/lib/onchain/impermaxFactory/lendingPool/collateral.d.ts +17 -0
  252. package/lib/onchain/impermaxFactory/lendingPool/collateral.js +59 -0
  253. package/lib/onchain/impermaxFactory/lendingPool/index.d.ts +12 -5
  254. package/lib/onchain/impermaxFactory/lendingPool/index.js +50 -12
  255. package/lib/onchain/impermaxFactory/lendingPool/nftlp/index.d.ts +4 -0
  256. package/lib/onchain/impermaxFactory/lendingPool/nftlp/index.js +11 -0
  257. package/lib/onchain/impermaxFactory/lendingPool/nftlp/onchainNftlp.d.ts +22 -0
  258. package/lib/onchain/impermaxFactory/lendingPool/nftlp/onchainNftlp.js +19 -0
  259. package/lib/onchain/impermaxFactory/lendingPool/nftlp/onchainNftlpUniswapV3.d.ts +24 -0
  260. package/lib/onchain/impermaxFactory/lendingPool/nftlp/onchainNftlpUniswapV3.js +90 -0
  261. package/lib/onchain/impermaxFactory/lendingPool/onchainBorrowable.d.ts +38 -34
  262. package/lib/onchain/impermaxFactory/lendingPool/onchainBorrowable.js +137 -156
  263. package/lib/onchain/impermaxFactory/lendingPool/onchainBorrowableV2.d.ts +9 -0
  264. package/lib/onchain/impermaxFactory/lendingPool/onchainBorrowableV2.js +36 -0
  265. package/lib/onchain/impermaxFactory/lendingPool/onchainBorrowableV3.d.ts +7 -0
  266. package/lib/onchain/impermaxFactory/lendingPool/onchainBorrowableV3.js +23 -0
  267. package/lib/onchain/impermaxFactory/lendingPool/onchainCollateral.d.ts +8 -19
  268. package/lib/onchain/impermaxFactory/lendingPool/onchainCollateral.js +24 -61
  269. package/lib/onchain/impermaxFactory/lendingPool/onchainCollateralV2.d.ts +20 -0
  270. package/lib/onchain/impermaxFactory/lendingPool/onchainCollateralV2.js +58 -0
  271. package/lib/onchain/impermaxFactory/lendingPool/onchainCollateralV3.d.ts +13 -0
  272. package/lib/onchain/impermaxFactory/lendingPool/onchainCollateralV3.js +36 -0
  273. package/lib/onchain/impermaxFactory/lendingPool/onchainLendingPool.d.ts +43 -58
  274. package/lib/onchain/impermaxFactory/lendingPool/onchainLendingPool.js +81 -367
  275. package/lib/onchain/impermaxFactory/lendingPool/onchainLendingPoolV2.d.ts +76 -0
  276. package/lib/onchain/impermaxFactory/lendingPool/onchainLendingPoolV2.js +338 -0
  277. package/lib/onchain/impermaxFactory/lendingPool/onchainLendingPoolV3.d.ts +42 -0
  278. package/lib/onchain/impermaxFactory/lendingPool/onchainLendingPoolV3.js +39 -0
  279. package/lib/onchain/impermaxFactory/onchainImpermaxFactory.d.ts +26 -16
  280. package/lib/onchain/impermaxFactory/onchainImpermaxFactory.js +42 -52
  281. package/lib/onchain/impermaxFactory/onchainImpermaxFactoryV2.d.ts +16 -0
  282. package/lib/onchain/impermaxFactory/onchainImpermaxFactoryV2.js +81 -0
  283. package/lib/onchain/impermaxFactory/onchainImpermaxFactoryV3.d.ts +16 -0
  284. package/lib/onchain/impermaxFactory/onchainImpermaxFactoryV3.js +88 -0
  285. package/lib/onchain/index.d.ts +10 -10
  286. package/lib/onchain/index.js +49 -49
  287. package/lib/onchain/interactions/index.d.ts +8 -8
  288. package/lib/onchain/interactions/index.js +41 -41
  289. package/lib/onchain/interactions/lendingPool/borrowable.d.ts +14 -0
  290. package/lib/onchain/interactions/lendingPool/borrowable.js +47 -0
  291. package/lib/onchain/interactions/lendingPool/collateral.d.ts +13 -0
  292. package/lib/onchain/interactions/lendingPool/collateral.js +31 -0
  293. package/lib/onchain/interactions/lendingPool/index.d.ts +12 -5
  294. package/lib/onchain/interactions/lendingPool/index.js +49 -12
  295. package/lib/onchain/interactions/lendingPool/nftlp/index.d.ts +4 -0
  296. package/lib/onchain/interactions/lendingPool/nftlp/index.js +11 -0
  297. package/lib/onchain/interactions/lendingPool/nftlp/onchainInteractionsNftlp.d.ts +7 -0
  298. package/lib/onchain/interactions/lendingPool/nftlp/onchainInteractionsNftlp.js +12 -0
  299. package/lib/onchain/interactions/lendingPool/nftlp/onchainInteractionsNftlpUniswapV3.d.ts +4 -0
  300. package/lib/onchain/interactions/lendingPool/nftlp/onchainInteractionsNftlpUniswapV3.js +13 -0
  301. package/lib/onchain/interactions/lendingPool/onchainInteractionsBorrowable.d.ts +17 -21
  302. package/lib/onchain/interactions/lendingPool/onchainInteractionsBorrowable.js +24 -56
  303. package/lib/onchain/interactions/lendingPool/onchainInteractionsBorrowableV2.d.ts +15 -0
  304. package/lib/onchain/interactions/lendingPool/onchainInteractionsBorrowableV2.js +63 -0
  305. package/lib/onchain/interactions/lendingPool/onchainInteractionsBorrowableV3.d.ts +9 -0
  306. package/lib/onchain/interactions/lendingPool/onchainInteractionsBorrowableV3.js +14 -0
  307. package/lib/onchain/interactions/lendingPool/onchainInteractionsCollateral.d.ts +7 -19
  308. package/lib/onchain/interactions/lendingPool/onchainInteractionsCollateral.js +11 -43
  309. package/lib/onchain/interactions/lendingPool/onchainInteractionsCollateralV2.d.ts +20 -0
  310. package/lib/onchain/interactions/lendingPool/onchainInteractionsCollateralV2.js +48 -0
  311. package/lib/onchain/interactions/lendingPool/onchainInteractionsCollateralV3.d.ts +13 -0
  312. package/lib/onchain/interactions/lendingPool/onchainInteractionsCollateralV3.js +20 -0
  313. package/lib/onchain/interactions/lendingPool/onchainInteractionsLendingPool.d.ts +31 -46
  314. package/lib/onchain/interactions/lendingPool/onchainInteractionsLendingPool.js +53 -135
  315. package/lib/onchain/interactions/lendingPool/onchainInteractionsLendingPoolV2.d.ts +42 -0
  316. package/lib/onchain/interactions/lendingPool/onchainInteractionsLendingPoolV2.js +114 -0
  317. package/lib/onchain/interactions/lendingPool/onchainInteractionsLendingPoolV3.d.ts +27 -0
  318. package/lib/onchain/interactions/lendingPool/onchainInteractionsLendingPoolV3.js +32 -0
  319. package/lib/onchain/interactions/lendingVault.d.ts +8 -0
  320. package/lib/onchain/interactions/lendingVault.js +15 -0
  321. package/lib/onchain/interactions/onchainInteractions.d.ts +31 -31
  322. package/lib/onchain/interactions/onchainInteractions.js +136 -137
  323. package/lib/onchain/interactions/onchainInteractionsConfigManager.d.ts +17 -17
  324. package/lib/onchain/interactions/onchainInteractionsConfigManager.js +44 -44
  325. package/lib/onchain/interactions/onchainInteractionsLendingVault.d.ts +14 -14
  326. package/lib/onchain/interactions/onchainInteractionsLendingVault.js +21 -21
  327. package/lib/onchain/interactions/onchainInteractionsPoolToken.d.ts +35 -35
  328. package/lib/onchain/interactions/onchainInteractionsPoolToken.js +134 -186
  329. package/lib/onchain/interactions/poolToken.d.ts +31 -0
  330. package/lib/onchain/interactions/poolToken.js +181 -0
  331. package/lib/onchain/lendingVault.d.ts +17 -0
  332. package/lib/onchain/lendingVault.js +56 -0
  333. package/lib/onchain/onchain.d.ts +38 -35
  334. package/lib/onchain/onchain.js +78 -70
  335. package/lib/onchain/onchainContractsHelper.d.ts +42 -31
  336. package/lib/onchain/onchainContractsHelper.js +90 -56
  337. package/lib/onchain/onchainLendingVault.d.ts +22 -22
  338. package/lib/onchain/onchainLendingVault.js +69 -69
  339. package/lib/onchain/onchainPermitHelper.d.ts +21 -0
  340. package/lib/onchain/onchainPermitHelper.js +198 -0
  341. package/lib/onchain/onchainPoolToken.d.ts +35 -35
  342. package/lib/onchain/onchainPoolToken.js +129 -129
  343. package/lib/onchain/onchainTypes.d.ts +70 -64
  344. package/lib/onchain/onchainTypes.js +14 -14
  345. package/lib/onchain/poolToken.d.ts +32 -0
  346. package/lib/onchain/poolToken.js +121 -0
  347. package/lib/onchain/types.d.ts +45 -0
  348. package/lib/onchain/types.js +14 -0
  349. package/lib/utils/ether-utils.d.ts +5 -5
  350. package/lib/utils/ether-utils.js +26 -26
  351. package/lib/utils/index.d.ts +3 -3
  352. package/lib/utils/index.js +16 -16
  353. package/lib/utils/lliquidity-math.d.ts +30 -30
  354. package/lib/utils/lliquidity-math.js +139 -139
  355. package/lib/utils/price-from-reserves.d.ts +2 -0
  356. package/lib/utils/price-from-reserves.js +19 -0
  357. package/package.json +36 -36
@@ -1,2015 +1,2015 @@
1
- {
2
- "contractName": "ClaimAggregator",
3
- "abi": [
4
- {
5
- "inputs": [],
6
- "stateMutability": "nonpayable",
7
- "type": "constructor"
8
- },
9
- {
10
- "inputs": [
11
- {
12
- "internalType": "address",
13
- "name": "account",
14
- "type": "address"
15
- },
16
- {
17
- "internalType": "address[]",
18
- "name": "borrowables",
19
- "type": "address[]"
20
- }
21
- ],
22
- "name": "trackBorrows",
23
- "outputs": [],
24
- "stateMutability": "nonpayable",
25
- "type": "function"
26
- },
27
- {
28
- "inputs": [
29
- {
30
- "internalType": "address",
31
- "name": "account",
32
- "type": "address"
33
- },
34
- {
35
- "internalType": "address[]",
36
- "name": "farmingPools",
37
- "type": "address[]"
38
- }
39
- ],
40
- "name": "claims",
41
- "outputs": [
42
- {
43
- "internalType": "uint256",
44
- "name": "amount",
45
- "type": "uint256"
46
- }
47
- ],
48
- "stateMutability": "nonpayable",
49
- "type": "function"
50
- }
51
- ],
52
- "metadata": "{\"compiler\":{\"version\":\"0.6.6+commit.6c089d02\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"farmingPools\",\"type\":\"address[]\"}],\"name\":\"claims\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"borrowables\",\"type\":\"address[]\"}],\"name\":\"trackBorrows\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"methods\":{}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"/C/Users/simor/Desktop/imx/contracts/ClaimAggregator.sol\":\"ClaimAggregator\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":999999},\"remappings\":[]},\"sources\":{\"/C/Users/simor/Desktop/imx/contracts/ClaimAggregator.sol\":{\"keccak256\":\"0xa499d139997ca608b2707679aad627fcc9c37cbabcacfc26b7f4c7d499620e95\",\"urls\":[\"bzz-raw://132332ed55dff6d63c5784d6a9a8edb94d4624aae8238a47c1c5dfa516c499c7\",\"dweb:/ipfs/QmPnthgmpcVenCiaXKv1EsvPtRvBDwjxP1sv8Wf5kWcmNK\"]},\"/C/Users/simor/Desktop/imx/contracts/interfaces/IBorrowable.sol\":{\"keccak256\":\"0x16a157ab22e3d76a6cf0dd89f55d6426abd8b15ac641ce318e3fa22e7dd1284b\",\"urls\":[\"bzz-raw://368476ee8b1e9d5287cbac49ceaae1e230e4ab95426a00141fbd43b6477d2928\",\"dweb:/ipfs/QmPN3cm2TJUJG3tXa6zCeCWrcitjPP6SofwHpygaiQJ9CV\"]},\"/C/Users/simor/Desktop/imx/contracts/interfaces/IFarmingPool.sol\":{\"keccak256\":\"0x506b7b788206491f43cea8fdff90fa1c03902ef669eb6b2d533246132040827e\",\"urls\":[\"bzz-raw://b71a3391e4b11b6e83d29413072b9788afc79ea3181485f94b83deebad465278\",\"dweb:/ipfs/QmPoitr9fEoBAaZsndWPsMRdZPPRppKfRSrhQyFQevBu1U\"]}},\"version\":1}",
53
- "bytecode": "0x608060405234801561001057600080fd5b5061036f806100206000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c806368188a4e1461003b5780639a3715ff14610050575b600080fd5b61004e6100493660046101fc565b610079565b005b61006361005e3660046101fc565b610114565b60405161007091906102e9565b60405180910390f35b60005b815181101561010f5781818151811061009157fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1663b7f1118a846040518263ffffffff1660e01b81526004016100d191906102c8565b600060405180830381600087803b1580156100eb57600080fd5b505af11580156100ff573d6000803e3d6000fd5b50506001909201915061007c9050565b505050565b6000805b82518110156101cb5782818151811061012d57fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff16637429d95a856040518263ffffffff1660e01b815260040161016d91906102c8565b602060405180830381600087803b15801561018757600080fd5b505af115801561019b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101bf91906102b0565b90910190600101610118565b5092915050565b803573ffffffffffffffffffffffffffffffffffffffff811681146101f657600080fd5b92915050565b6000806040838503121561020e578182fd5b61021884846101d2565b915060208084013567ffffffffffffffff811115610234578283fd5b80850186601f820112610245578384fd5b8035915061025a61025583610319565b6102f2565b82815283810190828501858502840186018a1015610276578687fd5b8693505b848410156102a05761028c8a826101d2565b83526001939093019291850191850161027a565b5080955050505050509250929050565b6000602082840312156102c1578081fd5b5051919050565b73ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b90815260200190565b60405181810167ffffffffffffffff8111828210171561031157600080fd5b604052919050565b600067ffffffffffffffff82111561032f578081fd5b506020908102019056fea26469706673582212208a0ad998f55c08b3981b11f30eb24c40855c616d1b3d42442ae8e7fad0fd13e464736f6c63430006060033",
54
- "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100365760003560e01c806368188a4e1461003b5780639a3715ff14610050575b600080fd5b61004e6100493660046101fc565b610079565b005b61006361005e3660046101fc565b610114565b60405161007091906102e9565b60405180910390f35b60005b815181101561010f5781818151811061009157fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1663b7f1118a846040518263ffffffff1660e01b81526004016100d191906102c8565b600060405180830381600087803b1580156100eb57600080fd5b505af11580156100ff573d6000803e3d6000fd5b50506001909201915061007c9050565b505050565b6000805b82518110156101cb5782818151811061012d57fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff16637429d95a856040518263ffffffff1660e01b815260040161016d91906102c8565b602060405180830381600087803b15801561018757600080fd5b505af115801561019b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101bf91906102b0565b90910190600101610118565b5092915050565b803573ffffffffffffffffffffffffffffffffffffffff811681146101f657600080fd5b92915050565b6000806040838503121561020e578182fd5b61021884846101d2565b915060208084013567ffffffffffffffff811115610234578283fd5b80850186601f820112610245578384fd5b8035915061025a61025583610319565b6102f2565b82815283810190828501858502840186018a1015610276578687fd5b8693505b848410156102a05761028c8a826101d2565b83526001939093019291850191850161027a565b5080955050505050509250929050565b6000602082840312156102c1578081fd5b5051919050565b73ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b90815260200190565b60405181810167ffffffffffffffff8111828210171561031157600080fd5b604052919050565b600067ffffffffffffffff82111561032f578081fd5b506020908102019056fea26469706673582212208a0ad998f55c08b3981b11f30eb24c40855c616d1b3d42442ae8e7fad0fd13e464736f6c63430006060033",
55
- "immutableReferences": {},
56
- "sourceMap": "145:485:0:-:0;;;176:24;5:9:-1;2:2;;;27:1;24;17:12;2:2;176:24:0;145:485;;;;;;",
57
- "deployedSourceMap": "145:485:0:-:0;;;;5:9:-1;2:2;;;27:1;24;17:12;2:2;145:485:0;;;;;;;;;;;;;;;;;;;;;12:1:-1;9;2:12;206:191:0;;;;;;;;;:::i;:::-;;403:222;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;206:191;292:6;287:106;308:11;:18;304:1;:22;287:106;;;351:11;363:1;351:14;;;;;;;;;;;;;;339:39;;;379:7;339:48;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5:9:-1;2:2;;;27:1;24;17:12;2:2;339:48:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;-1:-1;;328:3:0;;;;;-1:-1:-1;287:106:0;;-1:-1:-1;287:106:0;;;206:191;;:::o;403:222::-;483:11;;501:120;522:12;:19;518:1;:23;501:120;;;577:12;590:1;577:15;;;;;;;;;;;;;;564:42;;;607:7;564:51;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5:9:-1;2:2;;;27:1;24;17:12;2:2;564:51:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;564:51:0;;;;;;;101:4:-1;97:9;90:4;84;80:15;76:31;69:5;65:43;126:6;120:4;113:20;0:138;564:51:0;;;;;;;;;554:61;;;;543:3;;501:120;;;;403:222;;;;:::o;5:130:-1:-;72:20;;3220:42;3209:54;;3413:35;;3403:2;;3462:1;;3452:12;3403:2;57:78;;;;;1016:502;;;1162:2;1150:9;1141:7;1137:23;1133:32;1130:2;;;-1:-1;;1168:12;1130:2;1230:53;1275:7;1251:22;1230:53;;;1220:63;;1348:2;;1337:9;1333:18;1320:32;1372:18;1364:6;1361:30;1358:2;;;-1:-1;;1394:12;1358:2;1485:6;1474:9;1470:22;277:3;270:4;262:6;258:17;254:27;244:2;;-1:-1;;285:12;244:2;332:6;319:20;305:34;;354:80;369:64;426:6;369:64;;;354:80;;;462:21;;;519:14;;;;494:17;;;608;;;599:27;;;;596:36;-1:-1;593:2;;;-1:-1;;635:12;593:2;-1:-1;661:10;;655:206;680:6;677:1;674:13;655:206;;;760:37;793:3;781:10;760:37;;;748:50;;702:1;695:9;;;;;812:14;;;;840;;655:206;;;659:14;1414:88;;;;;;;;1124:394;;;;;;1525:263;;1640:2;1628:9;1619:7;1615:23;1611:32;1608:2;;;-1:-1;;1646:12;1608:2;-1:-1;953:13;;1602:186;-1:-1;1602:186;2035:213;3220:42;3209:54;;;;1866:37;;2153:2;2138:18;;2124:124;2255:213;1986:37;;;2373:2;2358:18;;2344:124;2475:256;2537:2;2531:9;2563:17;;;2638:18;2623:34;;2659:22;;;2620:62;2617:2;;;2695:1;;2685:12;2617:2;2537;2704:22;2515:216;;-1:-1;2515:216;2738:304;;2897:18;2889:6;2886:30;2883:2;;;-1:-1;;2919:12;2883:2;-1:-1;2964:4;2952:17;;;3017:15;;2820:222",
58
- "source": "pragma solidity =0.6.6;\r\npragma experimental ABIEncoderV2;\r\n\r\nimport \"./interfaces/IBorrowable.sol\";\r\nimport \"./interfaces/IFarmingPool.sol\";\r\n\r\ncontract ClaimAggregator {\r\n\r\n\tconstructor () public {}\r\n\t\r\n\tfunction trackBorrows(address account, address[] memory borrowables) public {\r\n\t\tfor (uint i = 0; i < borrowables.length; i++) {\r\n\t\t\tIBorrowable(borrowables[i]).trackBorrow(account);\r\n\t\t}\r\n\t}\r\n\t\r\n\tfunction claims(address account, address[] memory farmingPools) public returns (uint amount) {\r\n\t\tfor (uint i = 0; i < farmingPools.length; i++) {\r\n\t\t\tamount += IFarmingPool(farmingPools[i]).claimAccount(account);\r\n\t\t}\r\n\t}\r\n\r\n}",
59
- "sourcePath": "C:/Users/simor/Desktop/imx/contracts/ClaimAggregator.sol",
60
- "ast": {
61
- "absolutePath": "/C/Users/simor/Desktop/imx/contracts/ClaimAggregator.sol",
62
- "exportedSymbols": {
63
- "ClaimAggregator": [
64
- 75
65
- ]
66
- },
67
- "id": 76,
68
- "nodeType": "SourceUnit",
69
- "nodes": [
70
- {
71
- "id": 1,
72
- "literals": [
73
- "solidity",
74
- "=",
75
- "0.6",
76
- ".6"
77
- ],
78
- "nodeType": "PragmaDirective",
79
- "src": "0:23:0"
80
- },
81
- {
82
- "id": 2,
83
- "literals": [
84
- "experimental",
85
- "ABIEncoderV2"
86
- ],
87
- "nodeType": "PragmaDirective",
88
- "src": "25:33:0"
89
- },
90
- {
91
- "absolutePath": "/C/Users/simor/Desktop/imx/contracts/interfaces/IBorrowable.sol",
92
- "file": "./interfaces/IBorrowable.sol",
93
- "id": 3,
94
- "nodeType": "ImportDirective",
95
- "scope": 76,
96
- "sourceUnit": 3048,
97
- "src": "62:38:0",
98
- "symbolAliases": [],
99
- "unitAlias": ""
100
- },
101
- {
102
- "absolutePath": "/C/Users/simor/Desktop/imx/contracts/interfaces/IFarmingPool.sol",
103
- "file": "./interfaces/IFarmingPool.sol",
104
- "id": 4,
105
- "nodeType": "ImportDirective",
106
- "scope": 76,
107
- "sourceUnit": 3124,
108
- "src": "102:39:0",
109
- "symbolAliases": [],
110
- "unitAlias": ""
111
- },
112
- {
113
- "abstract": false,
114
- "baseContracts": [],
115
- "contractDependencies": [],
116
- "contractKind": "contract",
117
- "documentation": null,
118
- "fullyImplemented": true,
119
- "id": 75,
120
- "linearizedBaseContracts": [
121
- 75
122
- ],
123
- "name": "ClaimAggregator",
124
- "nodeType": "ContractDefinition",
125
- "nodes": [
126
- {
127
- "body": {
128
- "id": 7,
129
- "nodeType": "Block",
130
- "src": "198:2:0",
131
- "statements": []
132
- },
133
- "documentation": null,
134
- "id": 8,
135
- "implemented": true,
136
- "kind": "constructor",
137
- "modifiers": [],
138
- "name": "",
139
- "nodeType": "FunctionDefinition",
140
- "overrides": null,
141
- "parameters": {
142
- "id": 5,
143
- "nodeType": "ParameterList",
144
- "parameters": [],
145
- "src": "188:2:0"
146
- },
147
- "returnParameters": {
148
- "id": 6,
149
- "nodeType": "ParameterList",
150
- "parameters": [],
151
- "src": "198:0:0"
152
- },
153
- "scope": 75,
154
- "src": "176:24:0",
155
- "stateMutability": "nonpayable",
156
- "virtual": false,
157
- "visibility": "public"
158
- },
159
- {
160
- "body": {
161
- "id": 38,
162
- "nodeType": "Block",
163
- "src": "282:115:0",
164
- "statements": [
165
- {
166
- "body": {
167
- "id": 36,
168
- "nodeType": "Block",
169
- "src": "333:60:0",
170
- "statements": [
171
- {
172
- "expression": {
173
- "argumentTypes": null,
174
- "arguments": [
175
- {
176
- "argumentTypes": null,
177
- "id": 33,
178
- "name": "account",
179
- "nodeType": "Identifier",
180
- "overloadedDeclarations": [],
181
- "referencedDeclaration": 10,
182
- "src": "379:7:0",
183
- "typeDescriptions": {
184
- "typeIdentifier": "t_address",
185
- "typeString": "address"
186
- }
187
- }
188
- ],
189
- "expression": {
190
- "argumentTypes": [
191
- {
192
- "typeIdentifier": "t_address",
193
- "typeString": "address"
194
- }
195
- ],
196
- "expression": {
197
- "argumentTypes": null,
198
- "arguments": [
199
- {
200
- "argumentTypes": null,
201
- "baseExpression": {
202
- "argumentTypes": null,
203
- "id": 28,
204
- "name": "borrowables",
205
- "nodeType": "Identifier",
206
- "overloadedDeclarations": [],
207
- "referencedDeclaration": 13,
208
- "src": "351:11:0",
209
- "typeDescriptions": {
210
- "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
211
- "typeString": "address[] memory"
212
- }
213
- },
214
- "id": 30,
215
- "indexExpression": {
216
- "argumentTypes": null,
217
- "id": 29,
218
- "name": "i",
219
- "nodeType": "Identifier",
220
- "overloadedDeclarations": [],
221
- "referencedDeclaration": 17,
222
- "src": "363:1:0",
223
- "typeDescriptions": {
224
- "typeIdentifier": "t_uint256",
225
- "typeString": "uint256"
226
- }
227
- },
228
- "isConstant": false,
229
- "isLValue": true,
230
- "isPure": false,
231
- "lValueRequested": false,
232
- "nodeType": "IndexAccess",
233
- "src": "351:14:0",
234
- "typeDescriptions": {
235
- "typeIdentifier": "t_address",
236
- "typeString": "address"
237
- }
238
- }
239
- ],
240
- "expression": {
241
- "argumentTypes": [
242
- {
243
- "typeIdentifier": "t_address",
244
- "typeString": "address"
245
- }
246
- ],
247
- "id": 27,
248
- "name": "IBorrowable",
249
- "nodeType": "Identifier",
250
- "overloadedDeclarations": [],
251
- "referencedDeclaration": 3047,
252
- "src": "339:11:0",
253
- "typeDescriptions": {
254
- "typeIdentifier": "t_type$_t_contract$_IBorrowable_$3047_$",
255
- "typeString": "type(contract IBorrowable)"
256
- }
257
- },
258
- "id": 31,
259
- "isConstant": false,
260
- "isLValue": false,
261
- "isPure": false,
262
- "kind": "typeConversion",
263
- "lValueRequested": false,
264
- "names": [],
265
- "nodeType": "FunctionCall",
266
- "src": "339:27:0",
267
- "tryCall": false,
268
- "typeDescriptions": {
269
- "typeIdentifier": "t_contract$_IBorrowable_$3047",
270
- "typeString": "contract IBorrowable"
271
- }
272
- },
273
- "id": 32,
274
- "isConstant": false,
275
- "isLValue": false,
276
- "isPure": false,
277
- "lValueRequested": false,
278
- "memberName": "trackBorrow",
279
- "nodeType": "MemberAccess",
280
- "referencedDeclaration": 2908,
281
- "src": "339:39:0",
282
- "typeDescriptions": {
283
- "typeIdentifier": "t_function_external_nonpayable$_t_address_$returns$__$",
284
- "typeString": "function (address) external"
285
- }
286
- },
287
- "id": 34,
288
- "isConstant": false,
289
- "isLValue": false,
290
- "isPure": false,
291
- "kind": "functionCall",
292
- "lValueRequested": false,
293
- "names": [],
294
- "nodeType": "FunctionCall",
295
- "src": "339:48:0",
296
- "tryCall": false,
297
- "typeDescriptions": {
298
- "typeIdentifier": "t_tuple$__$",
299
- "typeString": "tuple()"
300
- }
301
- },
302
- "id": 35,
303
- "nodeType": "ExpressionStatement",
304
- "src": "339:48:0"
305
- }
306
- ]
307
- },
308
- "condition": {
309
- "argumentTypes": null,
310
- "commonType": {
311
- "typeIdentifier": "t_uint256",
312
- "typeString": "uint256"
313
- },
314
- "id": 23,
315
- "isConstant": false,
316
- "isLValue": false,
317
- "isPure": false,
318
- "lValueRequested": false,
319
- "leftExpression": {
320
- "argumentTypes": null,
321
- "id": 20,
322
- "name": "i",
323
- "nodeType": "Identifier",
324
- "overloadedDeclarations": [],
325
- "referencedDeclaration": 17,
326
- "src": "304:1:0",
327
- "typeDescriptions": {
328
- "typeIdentifier": "t_uint256",
329
- "typeString": "uint256"
330
- }
331
- },
332
- "nodeType": "BinaryOperation",
333
- "operator": "<",
334
- "rightExpression": {
335
- "argumentTypes": null,
336
- "expression": {
337
- "argumentTypes": null,
338
- "id": 21,
339
- "name": "borrowables",
340
- "nodeType": "Identifier",
341
- "overloadedDeclarations": [],
342
- "referencedDeclaration": 13,
343
- "src": "308:11:0",
344
- "typeDescriptions": {
345
- "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
346
- "typeString": "address[] memory"
347
- }
348
- },
349
- "id": 22,
350
- "isConstant": false,
351
- "isLValue": false,
352
- "isPure": false,
353
- "lValueRequested": false,
354
- "memberName": "length",
355
- "nodeType": "MemberAccess",
356
- "referencedDeclaration": null,
357
- "src": "308:18:0",
358
- "typeDescriptions": {
359
- "typeIdentifier": "t_uint256",
360
- "typeString": "uint256"
361
- }
362
- },
363
- "src": "304:22:0",
364
- "typeDescriptions": {
365
- "typeIdentifier": "t_bool",
366
- "typeString": "bool"
367
- }
368
- },
369
- "id": 37,
370
- "initializationExpression": {
371
- "assignments": [
372
- 17
373
- ],
374
- "declarations": [
375
- {
376
- "constant": false,
377
- "id": 17,
378
- "mutability": "mutable",
379
- "name": "i",
380
- "nodeType": "VariableDeclaration",
381
- "overrides": null,
382
- "scope": 37,
383
- "src": "292:6:0",
384
- "stateVariable": false,
385
- "storageLocation": "default",
386
- "typeDescriptions": {
387
- "typeIdentifier": "t_uint256",
388
- "typeString": "uint256"
389
- },
390
- "typeName": {
391
- "id": 16,
392
- "name": "uint",
393
- "nodeType": "ElementaryTypeName",
394
- "src": "292:4:0",
395
- "typeDescriptions": {
396
- "typeIdentifier": "t_uint256",
397
- "typeString": "uint256"
398
- }
399
- },
400
- "value": null,
401
- "visibility": "internal"
402
- }
403
- ],
404
- "id": 19,
405
- "initialValue": {
406
- "argumentTypes": null,
407
- "hexValue": "30",
408
- "id": 18,
409
- "isConstant": false,
410
- "isLValue": false,
411
- "isPure": true,
412
- "kind": "number",
413
- "lValueRequested": false,
414
- "nodeType": "Literal",
415
- "src": "301:1:0",
416
- "subdenomination": null,
417
- "typeDescriptions": {
418
- "typeIdentifier": "t_rational_0_by_1",
419
- "typeString": "int_const 0"
420
- },
421
- "value": "0"
422
- },
423
- "nodeType": "VariableDeclarationStatement",
424
- "src": "292:10:0"
425
- },
426
- "loopExpression": {
427
- "expression": {
428
- "argumentTypes": null,
429
- "id": 25,
430
- "isConstant": false,
431
- "isLValue": false,
432
- "isPure": false,
433
- "lValueRequested": false,
434
- "nodeType": "UnaryOperation",
435
- "operator": "++",
436
- "prefix": false,
437
- "src": "328:3:0",
438
- "subExpression": {
439
- "argumentTypes": null,
440
- "id": 24,
441
- "name": "i",
442
- "nodeType": "Identifier",
443
- "overloadedDeclarations": [],
444
- "referencedDeclaration": 17,
445
- "src": "328:1:0",
446
- "typeDescriptions": {
447
- "typeIdentifier": "t_uint256",
448
- "typeString": "uint256"
449
- }
450
- },
451
- "typeDescriptions": {
452
- "typeIdentifier": "t_uint256",
453
- "typeString": "uint256"
454
- }
455
- },
456
- "id": 26,
457
- "nodeType": "ExpressionStatement",
458
- "src": "328:3:0"
459
- },
460
- "nodeType": "ForStatement",
461
- "src": "287:106:0"
462
- }
463
- ]
464
- },
465
- "documentation": null,
466
- "functionSelector": "68188a4e",
467
- "id": 39,
468
- "implemented": true,
469
- "kind": "function",
470
- "modifiers": [],
471
- "name": "trackBorrows",
472
- "nodeType": "FunctionDefinition",
473
- "overrides": null,
474
- "parameters": {
475
- "id": 14,
476
- "nodeType": "ParameterList",
477
- "parameters": [
478
- {
479
- "constant": false,
480
- "id": 10,
481
- "mutability": "mutable",
482
- "name": "account",
483
- "nodeType": "VariableDeclaration",
484
- "overrides": null,
485
- "scope": 39,
486
- "src": "228:15:0",
487
- "stateVariable": false,
488
- "storageLocation": "default",
489
- "typeDescriptions": {
490
- "typeIdentifier": "t_address",
491
- "typeString": "address"
492
- },
493
- "typeName": {
494
- "id": 9,
495
- "name": "address",
496
- "nodeType": "ElementaryTypeName",
497
- "src": "228:7:0",
498
- "stateMutability": "nonpayable",
499
- "typeDescriptions": {
500
- "typeIdentifier": "t_address",
501
- "typeString": "address"
502
- }
503
- },
504
- "value": null,
505
- "visibility": "internal"
506
- },
507
- {
508
- "constant": false,
509
- "id": 13,
510
- "mutability": "mutable",
511
- "name": "borrowables",
512
- "nodeType": "VariableDeclaration",
513
- "overrides": null,
514
- "scope": 39,
515
- "src": "245:28:0",
516
- "stateVariable": false,
517
- "storageLocation": "memory",
518
- "typeDescriptions": {
519
- "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
520
- "typeString": "address[]"
521
- },
522
- "typeName": {
523
- "baseType": {
524
- "id": 11,
525
- "name": "address",
526
- "nodeType": "ElementaryTypeName",
527
- "src": "245:7:0",
528
- "stateMutability": "nonpayable",
529
- "typeDescriptions": {
530
- "typeIdentifier": "t_address",
531
- "typeString": "address"
532
- }
533
- },
534
- "id": 12,
535
- "length": null,
536
- "nodeType": "ArrayTypeName",
537
- "src": "245:9:0",
538
- "typeDescriptions": {
539
- "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr",
540
- "typeString": "address[]"
541
- }
542
- },
543
- "value": null,
544
- "visibility": "internal"
545
- }
546
- ],
547
- "src": "227:47:0"
548
- },
549
- "returnParameters": {
550
- "id": 15,
551
- "nodeType": "ParameterList",
552
- "parameters": [],
553
- "src": "282:0:0"
554
- },
555
- "scope": 75,
556
- "src": "206:191:0",
557
- "stateMutability": "nonpayable",
558
- "virtual": false,
559
- "visibility": "public"
560
- },
561
- {
562
- "body": {
563
- "id": 73,
564
- "nodeType": "Block",
565
- "src": "496:129:0",
566
- "statements": [
567
- {
568
- "body": {
569
- "id": 71,
570
- "nodeType": "Block",
571
- "src": "548:73:0",
572
- "statements": [
573
- {
574
- "expression": {
575
- "argumentTypes": null,
576
- "id": 69,
577
- "isConstant": false,
578
- "isLValue": false,
579
- "isPure": false,
580
- "lValueRequested": false,
581
- "leftHandSide": {
582
- "argumentTypes": null,
583
- "id": 60,
584
- "name": "amount",
585
- "nodeType": "Identifier",
586
- "overloadedDeclarations": [],
587
- "referencedDeclaration": 47,
588
- "src": "554:6:0",
589
- "typeDescriptions": {
590
- "typeIdentifier": "t_uint256",
591
- "typeString": "uint256"
592
- }
593
- },
594
- "nodeType": "Assignment",
595
- "operator": "+=",
596
- "rightHandSide": {
597
- "argumentTypes": null,
598
- "arguments": [
599
- {
600
- "argumentTypes": null,
601
- "id": 67,
602
- "name": "account",
603
- "nodeType": "Identifier",
604
- "overloadedDeclarations": [],
605
- "referencedDeclaration": 41,
606
- "src": "607:7:0",
607
- "typeDescriptions": {
608
- "typeIdentifier": "t_address",
609
- "typeString": "address"
610
- }
611
- }
612
- ],
613
- "expression": {
614
- "argumentTypes": [
615
- {
616
- "typeIdentifier": "t_address",
617
- "typeString": "address"
618
- }
619
- ],
620
- "expression": {
621
- "argumentTypes": null,
622
- "arguments": [
623
- {
624
- "argumentTypes": null,
625
- "baseExpression": {
626
- "argumentTypes": null,
627
- "id": 62,
628
- "name": "farmingPools",
629
- "nodeType": "Identifier",
630
- "overloadedDeclarations": [],
631
- "referencedDeclaration": 44,
632
- "src": "577:12:0",
633
- "typeDescriptions": {
634
- "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
635
- "typeString": "address[] memory"
636
- }
637
- },
638
- "id": 64,
639
- "indexExpression": {
640
- "argumentTypes": null,
641
- "id": 63,
642
- "name": "i",
643
- "nodeType": "Identifier",
644
- "overloadedDeclarations": [],
645
- "referencedDeclaration": 50,
646
- "src": "590:1:0",
647
- "typeDescriptions": {
648
- "typeIdentifier": "t_uint256",
649
- "typeString": "uint256"
650
- }
651
- },
652
- "isConstant": false,
653
- "isLValue": true,
654
- "isPure": false,
655
- "lValueRequested": false,
656
- "nodeType": "IndexAccess",
657
- "src": "577:15:0",
658
- "typeDescriptions": {
659
- "typeIdentifier": "t_address",
660
- "typeString": "address"
661
- }
662
- }
663
- ],
664
- "expression": {
665
- "argumentTypes": [
666
- {
667
- "typeIdentifier": "t_address",
668
- "typeString": "address"
669
- }
670
- ],
671
- "id": 61,
672
- "name": "IFarmingPool",
673
- "nodeType": "Identifier",
674
- "overloadedDeclarations": [],
675
- "referencedDeclaration": 3123,
676
- "src": "564:12:0",
677
- "typeDescriptions": {
678
- "typeIdentifier": "t_type$_t_contract$_IFarmingPool_$3123_$",
679
- "typeString": "type(contract IFarmingPool)"
680
- }
681
- },
682
- "id": 65,
683
- "isConstant": false,
684
- "isLValue": false,
685
- "isPure": false,
686
- "kind": "typeConversion",
687
- "lValueRequested": false,
688
- "names": [],
689
- "nodeType": "FunctionCall",
690
- "src": "564:29:0",
691
- "tryCall": false,
692
- "typeDescriptions": {
693
- "typeIdentifier": "t_contract$_IFarmingPool_$3123",
694
- "typeString": "contract IFarmingPool"
695
- }
696
- },
697
- "id": 66,
698
- "isConstant": false,
699
- "isLValue": false,
700
- "isPure": false,
701
- "lValueRequested": false,
702
- "memberName": "claimAccount",
703
- "nodeType": "MemberAccess",
704
- "referencedDeclaration": 3113,
705
- "src": "564:42:0",
706
- "typeDescriptions": {
707
- "typeIdentifier": "t_function_external_nonpayable$_t_address_$returns$_t_uint256_$",
708
- "typeString": "function (address) external returns (uint256)"
709
- }
710
- },
711
- "id": 68,
712
- "isConstant": false,
713
- "isLValue": false,
714
- "isPure": false,
715
- "kind": "functionCall",
716
- "lValueRequested": false,
717
- "names": [],
718
- "nodeType": "FunctionCall",
719
- "src": "564:51:0",
720
- "tryCall": false,
721
- "typeDescriptions": {
722
- "typeIdentifier": "t_uint256",
723
- "typeString": "uint256"
724
- }
725
- },
726
- "src": "554:61:0",
727
- "typeDescriptions": {
728
- "typeIdentifier": "t_uint256",
729
- "typeString": "uint256"
730
- }
731
- },
732
- "id": 70,
733
- "nodeType": "ExpressionStatement",
734
- "src": "554:61:0"
735
- }
736
- ]
737
- },
738
- "condition": {
739
- "argumentTypes": null,
740
- "commonType": {
741
- "typeIdentifier": "t_uint256",
742
- "typeString": "uint256"
743
- },
744
- "id": 56,
745
- "isConstant": false,
746
- "isLValue": false,
747
- "isPure": false,
748
- "lValueRequested": false,
749
- "leftExpression": {
750
- "argumentTypes": null,
751
- "id": 53,
752
- "name": "i",
753
- "nodeType": "Identifier",
754
- "overloadedDeclarations": [],
755
- "referencedDeclaration": 50,
756
- "src": "518:1:0",
757
- "typeDescriptions": {
758
- "typeIdentifier": "t_uint256",
759
- "typeString": "uint256"
760
- }
761
- },
762
- "nodeType": "BinaryOperation",
763
- "operator": "<",
764
- "rightExpression": {
765
- "argumentTypes": null,
766
- "expression": {
767
- "argumentTypes": null,
768
- "id": 54,
769
- "name": "farmingPools",
770
- "nodeType": "Identifier",
771
- "overloadedDeclarations": [],
772
- "referencedDeclaration": 44,
773
- "src": "522:12:0",
774
- "typeDescriptions": {
775
- "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
776
- "typeString": "address[] memory"
777
- }
778
- },
779
- "id": 55,
780
- "isConstant": false,
781
- "isLValue": false,
782
- "isPure": false,
783
- "lValueRequested": false,
784
- "memberName": "length",
785
- "nodeType": "MemberAccess",
786
- "referencedDeclaration": null,
787
- "src": "522:19:0",
788
- "typeDescriptions": {
789
- "typeIdentifier": "t_uint256",
790
- "typeString": "uint256"
791
- }
792
- },
793
- "src": "518:23:0",
794
- "typeDescriptions": {
795
- "typeIdentifier": "t_bool",
796
- "typeString": "bool"
797
- }
798
- },
799
- "id": 72,
800
- "initializationExpression": {
801
- "assignments": [
802
- 50
803
- ],
804
- "declarations": [
805
- {
806
- "constant": false,
807
- "id": 50,
808
- "mutability": "mutable",
809
- "name": "i",
810
- "nodeType": "VariableDeclaration",
811
- "overrides": null,
812
- "scope": 72,
813
- "src": "506:6:0",
814
- "stateVariable": false,
815
- "storageLocation": "default",
816
- "typeDescriptions": {
817
- "typeIdentifier": "t_uint256",
818
- "typeString": "uint256"
819
- },
820
- "typeName": {
821
- "id": 49,
822
- "name": "uint",
823
- "nodeType": "ElementaryTypeName",
824
- "src": "506:4:0",
825
- "typeDescriptions": {
826
- "typeIdentifier": "t_uint256",
827
- "typeString": "uint256"
828
- }
829
- },
830
- "value": null,
831
- "visibility": "internal"
832
- }
833
- ],
834
- "id": 52,
835
- "initialValue": {
836
- "argumentTypes": null,
837
- "hexValue": "30",
838
- "id": 51,
839
- "isConstant": false,
840
- "isLValue": false,
841
- "isPure": true,
842
- "kind": "number",
843
- "lValueRequested": false,
844
- "nodeType": "Literal",
845
- "src": "515:1:0",
846
- "subdenomination": null,
847
- "typeDescriptions": {
848
- "typeIdentifier": "t_rational_0_by_1",
849
- "typeString": "int_const 0"
850
- },
851
- "value": "0"
852
- },
853
- "nodeType": "VariableDeclarationStatement",
854
- "src": "506:10:0"
855
- },
856
- "loopExpression": {
857
- "expression": {
858
- "argumentTypes": null,
859
- "id": 58,
860
- "isConstant": false,
861
- "isLValue": false,
862
- "isPure": false,
863
- "lValueRequested": false,
864
- "nodeType": "UnaryOperation",
865
- "operator": "++",
866
- "prefix": false,
867
- "src": "543:3:0",
868
- "subExpression": {
869
- "argumentTypes": null,
870
- "id": 57,
871
- "name": "i",
872
- "nodeType": "Identifier",
873
- "overloadedDeclarations": [],
874
- "referencedDeclaration": 50,
875
- "src": "543:1:0",
876
- "typeDescriptions": {
877
- "typeIdentifier": "t_uint256",
878
- "typeString": "uint256"
879
- }
880
- },
881
- "typeDescriptions": {
882
- "typeIdentifier": "t_uint256",
883
- "typeString": "uint256"
884
- }
885
- },
886
- "id": 59,
887
- "nodeType": "ExpressionStatement",
888
- "src": "543:3:0"
889
- },
890
- "nodeType": "ForStatement",
891
- "src": "501:120:0"
892
- }
893
- ]
894
- },
895
- "documentation": null,
896
- "functionSelector": "9a3715ff",
897
- "id": 74,
898
- "implemented": true,
899
- "kind": "function",
900
- "modifiers": [],
901
- "name": "claims",
902
- "nodeType": "FunctionDefinition",
903
- "overrides": null,
904
- "parameters": {
905
- "id": 45,
906
- "nodeType": "ParameterList",
907
- "parameters": [
908
- {
909
- "constant": false,
910
- "id": 41,
911
- "mutability": "mutable",
912
- "name": "account",
913
- "nodeType": "VariableDeclaration",
914
- "overrides": null,
915
- "scope": 74,
916
- "src": "419:15:0",
917
- "stateVariable": false,
918
- "storageLocation": "default",
919
- "typeDescriptions": {
920
- "typeIdentifier": "t_address",
921
- "typeString": "address"
922
- },
923
- "typeName": {
924
- "id": 40,
925
- "name": "address",
926
- "nodeType": "ElementaryTypeName",
927
- "src": "419:7:0",
928
- "stateMutability": "nonpayable",
929
- "typeDescriptions": {
930
- "typeIdentifier": "t_address",
931
- "typeString": "address"
932
- }
933
- },
934
- "value": null,
935
- "visibility": "internal"
936
- },
937
- {
938
- "constant": false,
939
- "id": 44,
940
- "mutability": "mutable",
941
- "name": "farmingPools",
942
- "nodeType": "VariableDeclaration",
943
- "overrides": null,
944
- "scope": 74,
945
- "src": "436:29:0",
946
- "stateVariable": false,
947
- "storageLocation": "memory",
948
- "typeDescriptions": {
949
- "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
950
- "typeString": "address[]"
951
- },
952
- "typeName": {
953
- "baseType": {
954
- "id": 42,
955
- "name": "address",
956
- "nodeType": "ElementaryTypeName",
957
- "src": "436:7:0",
958
- "stateMutability": "nonpayable",
959
- "typeDescriptions": {
960
- "typeIdentifier": "t_address",
961
- "typeString": "address"
962
- }
963
- },
964
- "id": 43,
965
- "length": null,
966
- "nodeType": "ArrayTypeName",
967
- "src": "436:9:0",
968
- "typeDescriptions": {
969
- "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr",
970
- "typeString": "address[]"
971
- }
972
- },
973
- "value": null,
974
- "visibility": "internal"
975
- }
976
- ],
977
- "src": "418:48:0"
978
- },
979
- "returnParameters": {
980
- "id": 48,
981
- "nodeType": "ParameterList",
982
- "parameters": [
983
- {
984
- "constant": false,
985
- "id": 47,
986
- "mutability": "mutable",
987
- "name": "amount",
988
- "nodeType": "VariableDeclaration",
989
- "overrides": null,
990
- "scope": 74,
991
- "src": "483:11:0",
992
- "stateVariable": false,
993
- "storageLocation": "default",
994
- "typeDescriptions": {
995
- "typeIdentifier": "t_uint256",
996
- "typeString": "uint256"
997
- },
998
- "typeName": {
999
- "id": 46,
1000
- "name": "uint",
1001
- "nodeType": "ElementaryTypeName",
1002
- "src": "483:4:0",
1003
- "typeDescriptions": {
1004
- "typeIdentifier": "t_uint256",
1005
- "typeString": "uint256"
1006
- }
1007
- },
1008
- "value": null,
1009
- "visibility": "internal"
1010
- }
1011
- ],
1012
- "src": "482:13:0"
1013
- },
1014
- "scope": 75,
1015
- "src": "403:222:0",
1016
- "stateMutability": "nonpayable",
1017
- "virtual": false,
1018
- "visibility": "public"
1019
- }
1020
- ],
1021
- "scope": 76,
1022
- "src": "145:485:0"
1023
- }
1024
- ],
1025
- "src": "0:630:0"
1026
- },
1027
- "legacyAST": {
1028
- "absolutePath": "/C/Users/simor/Desktop/imx/contracts/ClaimAggregator.sol",
1029
- "exportedSymbols": {
1030
- "ClaimAggregator": [
1031
- 75
1032
- ]
1033
- },
1034
- "id": 76,
1035
- "nodeType": "SourceUnit",
1036
- "nodes": [
1037
- {
1038
- "id": 1,
1039
- "literals": [
1040
- "solidity",
1041
- "=",
1042
- "0.6",
1043
- ".6"
1044
- ],
1045
- "nodeType": "PragmaDirective",
1046
- "src": "0:23:0"
1047
- },
1048
- {
1049
- "id": 2,
1050
- "literals": [
1051
- "experimental",
1052
- "ABIEncoderV2"
1053
- ],
1054
- "nodeType": "PragmaDirective",
1055
- "src": "25:33:0"
1056
- },
1057
- {
1058
- "absolutePath": "/C/Users/simor/Desktop/imx/contracts/interfaces/IBorrowable.sol",
1059
- "file": "./interfaces/IBorrowable.sol",
1060
- "id": 3,
1061
- "nodeType": "ImportDirective",
1062
- "scope": 76,
1063
- "sourceUnit": 3048,
1064
- "src": "62:38:0",
1065
- "symbolAliases": [],
1066
- "unitAlias": ""
1067
- },
1068
- {
1069
- "absolutePath": "/C/Users/simor/Desktop/imx/contracts/interfaces/IFarmingPool.sol",
1070
- "file": "./interfaces/IFarmingPool.sol",
1071
- "id": 4,
1072
- "nodeType": "ImportDirective",
1073
- "scope": 76,
1074
- "sourceUnit": 3124,
1075
- "src": "102:39:0",
1076
- "symbolAliases": [],
1077
- "unitAlias": ""
1078
- },
1079
- {
1080
- "abstract": false,
1081
- "baseContracts": [],
1082
- "contractDependencies": [],
1083
- "contractKind": "contract",
1084
- "documentation": null,
1085
- "fullyImplemented": true,
1086
- "id": 75,
1087
- "linearizedBaseContracts": [
1088
- 75
1089
- ],
1090
- "name": "ClaimAggregator",
1091
- "nodeType": "ContractDefinition",
1092
- "nodes": [
1093
- {
1094
- "body": {
1095
- "id": 7,
1096
- "nodeType": "Block",
1097
- "src": "198:2:0",
1098
- "statements": []
1099
- },
1100
- "documentation": null,
1101
- "id": 8,
1102
- "implemented": true,
1103
- "kind": "constructor",
1104
- "modifiers": [],
1105
- "name": "",
1106
- "nodeType": "FunctionDefinition",
1107
- "overrides": null,
1108
- "parameters": {
1109
- "id": 5,
1110
- "nodeType": "ParameterList",
1111
- "parameters": [],
1112
- "src": "188:2:0"
1113
- },
1114
- "returnParameters": {
1115
- "id": 6,
1116
- "nodeType": "ParameterList",
1117
- "parameters": [],
1118
- "src": "198:0:0"
1119
- },
1120
- "scope": 75,
1121
- "src": "176:24:0",
1122
- "stateMutability": "nonpayable",
1123
- "virtual": false,
1124
- "visibility": "public"
1125
- },
1126
- {
1127
- "body": {
1128
- "id": 38,
1129
- "nodeType": "Block",
1130
- "src": "282:115:0",
1131
- "statements": [
1132
- {
1133
- "body": {
1134
- "id": 36,
1135
- "nodeType": "Block",
1136
- "src": "333:60:0",
1137
- "statements": [
1138
- {
1139
- "expression": {
1140
- "argumentTypes": null,
1141
- "arguments": [
1142
- {
1143
- "argumentTypes": null,
1144
- "id": 33,
1145
- "name": "account",
1146
- "nodeType": "Identifier",
1147
- "overloadedDeclarations": [],
1148
- "referencedDeclaration": 10,
1149
- "src": "379:7:0",
1150
- "typeDescriptions": {
1151
- "typeIdentifier": "t_address",
1152
- "typeString": "address"
1153
- }
1154
- }
1155
- ],
1156
- "expression": {
1157
- "argumentTypes": [
1158
- {
1159
- "typeIdentifier": "t_address",
1160
- "typeString": "address"
1161
- }
1162
- ],
1163
- "expression": {
1164
- "argumentTypes": null,
1165
- "arguments": [
1166
- {
1167
- "argumentTypes": null,
1168
- "baseExpression": {
1169
- "argumentTypes": null,
1170
- "id": 28,
1171
- "name": "borrowables",
1172
- "nodeType": "Identifier",
1173
- "overloadedDeclarations": [],
1174
- "referencedDeclaration": 13,
1175
- "src": "351:11:0",
1176
- "typeDescriptions": {
1177
- "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
1178
- "typeString": "address[] memory"
1179
- }
1180
- },
1181
- "id": 30,
1182
- "indexExpression": {
1183
- "argumentTypes": null,
1184
- "id": 29,
1185
- "name": "i",
1186
- "nodeType": "Identifier",
1187
- "overloadedDeclarations": [],
1188
- "referencedDeclaration": 17,
1189
- "src": "363:1:0",
1190
- "typeDescriptions": {
1191
- "typeIdentifier": "t_uint256",
1192
- "typeString": "uint256"
1193
- }
1194
- },
1195
- "isConstant": false,
1196
- "isLValue": true,
1197
- "isPure": false,
1198
- "lValueRequested": false,
1199
- "nodeType": "IndexAccess",
1200
- "src": "351:14:0",
1201
- "typeDescriptions": {
1202
- "typeIdentifier": "t_address",
1203
- "typeString": "address"
1204
- }
1205
- }
1206
- ],
1207
- "expression": {
1208
- "argumentTypes": [
1209
- {
1210
- "typeIdentifier": "t_address",
1211
- "typeString": "address"
1212
- }
1213
- ],
1214
- "id": 27,
1215
- "name": "IBorrowable",
1216
- "nodeType": "Identifier",
1217
- "overloadedDeclarations": [],
1218
- "referencedDeclaration": 3047,
1219
- "src": "339:11:0",
1220
- "typeDescriptions": {
1221
- "typeIdentifier": "t_type$_t_contract$_IBorrowable_$3047_$",
1222
- "typeString": "type(contract IBorrowable)"
1223
- }
1224
- },
1225
- "id": 31,
1226
- "isConstant": false,
1227
- "isLValue": false,
1228
- "isPure": false,
1229
- "kind": "typeConversion",
1230
- "lValueRequested": false,
1231
- "names": [],
1232
- "nodeType": "FunctionCall",
1233
- "src": "339:27:0",
1234
- "tryCall": false,
1235
- "typeDescriptions": {
1236
- "typeIdentifier": "t_contract$_IBorrowable_$3047",
1237
- "typeString": "contract IBorrowable"
1238
- }
1239
- },
1240
- "id": 32,
1241
- "isConstant": false,
1242
- "isLValue": false,
1243
- "isPure": false,
1244
- "lValueRequested": false,
1245
- "memberName": "trackBorrow",
1246
- "nodeType": "MemberAccess",
1247
- "referencedDeclaration": 2908,
1248
- "src": "339:39:0",
1249
- "typeDescriptions": {
1250
- "typeIdentifier": "t_function_external_nonpayable$_t_address_$returns$__$",
1251
- "typeString": "function (address) external"
1252
- }
1253
- },
1254
- "id": 34,
1255
- "isConstant": false,
1256
- "isLValue": false,
1257
- "isPure": false,
1258
- "kind": "functionCall",
1259
- "lValueRequested": false,
1260
- "names": [],
1261
- "nodeType": "FunctionCall",
1262
- "src": "339:48:0",
1263
- "tryCall": false,
1264
- "typeDescriptions": {
1265
- "typeIdentifier": "t_tuple$__$",
1266
- "typeString": "tuple()"
1267
- }
1268
- },
1269
- "id": 35,
1270
- "nodeType": "ExpressionStatement",
1271
- "src": "339:48:0"
1272
- }
1273
- ]
1274
- },
1275
- "condition": {
1276
- "argumentTypes": null,
1277
- "commonType": {
1278
- "typeIdentifier": "t_uint256",
1279
- "typeString": "uint256"
1280
- },
1281
- "id": 23,
1282
- "isConstant": false,
1283
- "isLValue": false,
1284
- "isPure": false,
1285
- "lValueRequested": false,
1286
- "leftExpression": {
1287
- "argumentTypes": null,
1288
- "id": 20,
1289
- "name": "i",
1290
- "nodeType": "Identifier",
1291
- "overloadedDeclarations": [],
1292
- "referencedDeclaration": 17,
1293
- "src": "304:1:0",
1294
- "typeDescriptions": {
1295
- "typeIdentifier": "t_uint256",
1296
- "typeString": "uint256"
1297
- }
1298
- },
1299
- "nodeType": "BinaryOperation",
1300
- "operator": "<",
1301
- "rightExpression": {
1302
- "argumentTypes": null,
1303
- "expression": {
1304
- "argumentTypes": null,
1305
- "id": 21,
1306
- "name": "borrowables",
1307
- "nodeType": "Identifier",
1308
- "overloadedDeclarations": [],
1309
- "referencedDeclaration": 13,
1310
- "src": "308:11:0",
1311
- "typeDescriptions": {
1312
- "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
1313
- "typeString": "address[] memory"
1314
- }
1315
- },
1316
- "id": 22,
1317
- "isConstant": false,
1318
- "isLValue": false,
1319
- "isPure": false,
1320
- "lValueRequested": false,
1321
- "memberName": "length",
1322
- "nodeType": "MemberAccess",
1323
- "referencedDeclaration": null,
1324
- "src": "308:18:0",
1325
- "typeDescriptions": {
1326
- "typeIdentifier": "t_uint256",
1327
- "typeString": "uint256"
1328
- }
1329
- },
1330
- "src": "304:22:0",
1331
- "typeDescriptions": {
1332
- "typeIdentifier": "t_bool",
1333
- "typeString": "bool"
1334
- }
1335
- },
1336
- "id": 37,
1337
- "initializationExpression": {
1338
- "assignments": [
1339
- 17
1340
- ],
1341
- "declarations": [
1342
- {
1343
- "constant": false,
1344
- "id": 17,
1345
- "mutability": "mutable",
1346
- "name": "i",
1347
- "nodeType": "VariableDeclaration",
1348
- "overrides": null,
1349
- "scope": 37,
1350
- "src": "292:6:0",
1351
- "stateVariable": false,
1352
- "storageLocation": "default",
1353
- "typeDescriptions": {
1354
- "typeIdentifier": "t_uint256",
1355
- "typeString": "uint256"
1356
- },
1357
- "typeName": {
1358
- "id": 16,
1359
- "name": "uint",
1360
- "nodeType": "ElementaryTypeName",
1361
- "src": "292:4:0",
1362
- "typeDescriptions": {
1363
- "typeIdentifier": "t_uint256",
1364
- "typeString": "uint256"
1365
- }
1366
- },
1367
- "value": null,
1368
- "visibility": "internal"
1369
- }
1370
- ],
1371
- "id": 19,
1372
- "initialValue": {
1373
- "argumentTypes": null,
1374
- "hexValue": "30",
1375
- "id": 18,
1376
- "isConstant": false,
1377
- "isLValue": false,
1378
- "isPure": true,
1379
- "kind": "number",
1380
- "lValueRequested": false,
1381
- "nodeType": "Literal",
1382
- "src": "301:1:0",
1383
- "subdenomination": null,
1384
- "typeDescriptions": {
1385
- "typeIdentifier": "t_rational_0_by_1",
1386
- "typeString": "int_const 0"
1387
- },
1388
- "value": "0"
1389
- },
1390
- "nodeType": "VariableDeclarationStatement",
1391
- "src": "292:10:0"
1392
- },
1393
- "loopExpression": {
1394
- "expression": {
1395
- "argumentTypes": null,
1396
- "id": 25,
1397
- "isConstant": false,
1398
- "isLValue": false,
1399
- "isPure": false,
1400
- "lValueRequested": false,
1401
- "nodeType": "UnaryOperation",
1402
- "operator": "++",
1403
- "prefix": false,
1404
- "src": "328:3:0",
1405
- "subExpression": {
1406
- "argumentTypes": null,
1407
- "id": 24,
1408
- "name": "i",
1409
- "nodeType": "Identifier",
1410
- "overloadedDeclarations": [],
1411
- "referencedDeclaration": 17,
1412
- "src": "328:1:0",
1413
- "typeDescriptions": {
1414
- "typeIdentifier": "t_uint256",
1415
- "typeString": "uint256"
1416
- }
1417
- },
1418
- "typeDescriptions": {
1419
- "typeIdentifier": "t_uint256",
1420
- "typeString": "uint256"
1421
- }
1422
- },
1423
- "id": 26,
1424
- "nodeType": "ExpressionStatement",
1425
- "src": "328:3:0"
1426
- },
1427
- "nodeType": "ForStatement",
1428
- "src": "287:106:0"
1429
- }
1430
- ]
1431
- },
1432
- "documentation": null,
1433
- "functionSelector": "68188a4e",
1434
- "id": 39,
1435
- "implemented": true,
1436
- "kind": "function",
1437
- "modifiers": [],
1438
- "name": "trackBorrows",
1439
- "nodeType": "FunctionDefinition",
1440
- "overrides": null,
1441
- "parameters": {
1442
- "id": 14,
1443
- "nodeType": "ParameterList",
1444
- "parameters": [
1445
- {
1446
- "constant": false,
1447
- "id": 10,
1448
- "mutability": "mutable",
1449
- "name": "account",
1450
- "nodeType": "VariableDeclaration",
1451
- "overrides": null,
1452
- "scope": 39,
1453
- "src": "228:15:0",
1454
- "stateVariable": false,
1455
- "storageLocation": "default",
1456
- "typeDescriptions": {
1457
- "typeIdentifier": "t_address",
1458
- "typeString": "address"
1459
- },
1460
- "typeName": {
1461
- "id": 9,
1462
- "name": "address",
1463
- "nodeType": "ElementaryTypeName",
1464
- "src": "228:7:0",
1465
- "stateMutability": "nonpayable",
1466
- "typeDescriptions": {
1467
- "typeIdentifier": "t_address",
1468
- "typeString": "address"
1469
- }
1470
- },
1471
- "value": null,
1472
- "visibility": "internal"
1473
- },
1474
- {
1475
- "constant": false,
1476
- "id": 13,
1477
- "mutability": "mutable",
1478
- "name": "borrowables",
1479
- "nodeType": "VariableDeclaration",
1480
- "overrides": null,
1481
- "scope": 39,
1482
- "src": "245:28:0",
1483
- "stateVariable": false,
1484
- "storageLocation": "memory",
1485
- "typeDescriptions": {
1486
- "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
1487
- "typeString": "address[]"
1488
- },
1489
- "typeName": {
1490
- "baseType": {
1491
- "id": 11,
1492
- "name": "address",
1493
- "nodeType": "ElementaryTypeName",
1494
- "src": "245:7:0",
1495
- "stateMutability": "nonpayable",
1496
- "typeDescriptions": {
1497
- "typeIdentifier": "t_address",
1498
- "typeString": "address"
1499
- }
1500
- },
1501
- "id": 12,
1502
- "length": null,
1503
- "nodeType": "ArrayTypeName",
1504
- "src": "245:9:0",
1505
- "typeDescriptions": {
1506
- "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr",
1507
- "typeString": "address[]"
1508
- }
1509
- },
1510
- "value": null,
1511
- "visibility": "internal"
1512
- }
1513
- ],
1514
- "src": "227:47:0"
1515
- },
1516
- "returnParameters": {
1517
- "id": 15,
1518
- "nodeType": "ParameterList",
1519
- "parameters": [],
1520
- "src": "282:0:0"
1521
- },
1522
- "scope": 75,
1523
- "src": "206:191:0",
1524
- "stateMutability": "nonpayable",
1525
- "virtual": false,
1526
- "visibility": "public"
1527
- },
1528
- {
1529
- "body": {
1530
- "id": 73,
1531
- "nodeType": "Block",
1532
- "src": "496:129:0",
1533
- "statements": [
1534
- {
1535
- "body": {
1536
- "id": 71,
1537
- "nodeType": "Block",
1538
- "src": "548:73:0",
1539
- "statements": [
1540
- {
1541
- "expression": {
1542
- "argumentTypes": null,
1543
- "id": 69,
1544
- "isConstant": false,
1545
- "isLValue": false,
1546
- "isPure": false,
1547
- "lValueRequested": false,
1548
- "leftHandSide": {
1549
- "argumentTypes": null,
1550
- "id": 60,
1551
- "name": "amount",
1552
- "nodeType": "Identifier",
1553
- "overloadedDeclarations": [],
1554
- "referencedDeclaration": 47,
1555
- "src": "554:6:0",
1556
- "typeDescriptions": {
1557
- "typeIdentifier": "t_uint256",
1558
- "typeString": "uint256"
1559
- }
1560
- },
1561
- "nodeType": "Assignment",
1562
- "operator": "+=",
1563
- "rightHandSide": {
1564
- "argumentTypes": null,
1565
- "arguments": [
1566
- {
1567
- "argumentTypes": null,
1568
- "id": 67,
1569
- "name": "account",
1570
- "nodeType": "Identifier",
1571
- "overloadedDeclarations": [],
1572
- "referencedDeclaration": 41,
1573
- "src": "607:7:0",
1574
- "typeDescriptions": {
1575
- "typeIdentifier": "t_address",
1576
- "typeString": "address"
1577
- }
1578
- }
1579
- ],
1580
- "expression": {
1581
- "argumentTypes": [
1582
- {
1583
- "typeIdentifier": "t_address",
1584
- "typeString": "address"
1585
- }
1586
- ],
1587
- "expression": {
1588
- "argumentTypes": null,
1589
- "arguments": [
1590
- {
1591
- "argumentTypes": null,
1592
- "baseExpression": {
1593
- "argumentTypes": null,
1594
- "id": 62,
1595
- "name": "farmingPools",
1596
- "nodeType": "Identifier",
1597
- "overloadedDeclarations": [],
1598
- "referencedDeclaration": 44,
1599
- "src": "577:12:0",
1600
- "typeDescriptions": {
1601
- "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
1602
- "typeString": "address[] memory"
1603
- }
1604
- },
1605
- "id": 64,
1606
- "indexExpression": {
1607
- "argumentTypes": null,
1608
- "id": 63,
1609
- "name": "i",
1610
- "nodeType": "Identifier",
1611
- "overloadedDeclarations": [],
1612
- "referencedDeclaration": 50,
1613
- "src": "590:1:0",
1614
- "typeDescriptions": {
1615
- "typeIdentifier": "t_uint256",
1616
- "typeString": "uint256"
1617
- }
1618
- },
1619
- "isConstant": false,
1620
- "isLValue": true,
1621
- "isPure": false,
1622
- "lValueRequested": false,
1623
- "nodeType": "IndexAccess",
1624
- "src": "577:15:0",
1625
- "typeDescriptions": {
1626
- "typeIdentifier": "t_address",
1627
- "typeString": "address"
1628
- }
1629
- }
1630
- ],
1631
- "expression": {
1632
- "argumentTypes": [
1633
- {
1634
- "typeIdentifier": "t_address",
1635
- "typeString": "address"
1636
- }
1637
- ],
1638
- "id": 61,
1639
- "name": "IFarmingPool",
1640
- "nodeType": "Identifier",
1641
- "overloadedDeclarations": [],
1642
- "referencedDeclaration": 3123,
1643
- "src": "564:12:0",
1644
- "typeDescriptions": {
1645
- "typeIdentifier": "t_type$_t_contract$_IFarmingPool_$3123_$",
1646
- "typeString": "type(contract IFarmingPool)"
1647
- }
1648
- },
1649
- "id": 65,
1650
- "isConstant": false,
1651
- "isLValue": false,
1652
- "isPure": false,
1653
- "kind": "typeConversion",
1654
- "lValueRequested": false,
1655
- "names": [],
1656
- "nodeType": "FunctionCall",
1657
- "src": "564:29:0",
1658
- "tryCall": false,
1659
- "typeDescriptions": {
1660
- "typeIdentifier": "t_contract$_IFarmingPool_$3123",
1661
- "typeString": "contract IFarmingPool"
1662
- }
1663
- },
1664
- "id": 66,
1665
- "isConstant": false,
1666
- "isLValue": false,
1667
- "isPure": false,
1668
- "lValueRequested": false,
1669
- "memberName": "claimAccount",
1670
- "nodeType": "MemberAccess",
1671
- "referencedDeclaration": 3113,
1672
- "src": "564:42:0",
1673
- "typeDescriptions": {
1674
- "typeIdentifier": "t_function_external_nonpayable$_t_address_$returns$_t_uint256_$",
1675
- "typeString": "function (address) external returns (uint256)"
1676
- }
1677
- },
1678
- "id": 68,
1679
- "isConstant": false,
1680
- "isLValue": false,
1681
- "isPure": false,
1682
- "kind": "functionCall",
1683
- "lValueRequested": false,
1684
- "names": [],
1685
- "nodeType": "FunctionCall",
1686
- "src": "564:51:0",
1687
- "tryCall": false,
1688
- "typeDescriptions": {
1689
- "typeIdentifier": "t_uint256",
1690
- "typeString": "uint256"
1691
- }
1692
- },
1693
- "src": "554:61:0",
1694
- "typeDescriptions": {
1695
- "typeIdentifier": "t_uint256",
1696
- "typeString": "uint256"
1697
- }
1698
- },
1699
- "id": 70,
1700
- "nodeType": "ExpressionStatement",
1701
- "src": "554:61:0"
1702
- }
1703
- ]
1704
- },
1705
- "condition": {
1706
- "argumentTypes": null,
1707
- "commonType": {
1708
- "typeIdentifier": "t_uint256",
1709
- "typeString": "uint256"
1710
- },
1711
- "id": 56,
1712
- "isConstant": false,
1713
- "isLValue": false,
1714
- "isPure": false,
1715
- "lValueRequested": false,
1716
- "leftExpression": {
1717
- "argumentTypes": null,
1718
- "id": 53,
1719
- "name": "i",
1720
- "nodeType": "Identifier",
1721
- "overloadedDeclarations": [],
1722
- "referencedDeclaration": 50,
1723
- "src": "518:1:0",
1724
- "typeDescriptions": {
1725
- "typeIdentifier": "t_uint256",
1726
- "typeString": "uint256"
1727
- }
1728
- },
1729
- "nodeType": "BinaryOperation",
1730
- "operator": "<",
1731
- "rightExpression": {
1732
- "argumentTypes": null,
1733
- "expression": {
1734
- "argumentTypes": null,
1735
- "id": 54,
1736
- "name": "farmingPools",
1737
- "nodeType": "Identifier",
1738
- "overloadedDeclarations": [],
1739
- "referencedDeclaration": 44,
1740
- "src": "522:12:0",
1741
- "typeDescriptions": {
1742
- "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
1743
- "typeString": "address[] memory"
1744
- }
1745
- },
1746
- "id": 55,
1747
- "isConstant": false,
1748
- "isLValue": false,
1749
- "isPure": false,
1750
- "lValueRequested": false,
1751
- "memberName": "length",
1752
- "nodeType": "MemberAccess",
1753
- "referencedDeclaration": null,
1754
- "src": "522:19:0",
1755
- "typeDescriptions": {
1756
- "typeIdentifier": "t_uint256",
1757
- "typeString": "uint256"
1758
- }
1759
- },
1760
- "src": "518:23:0",
1761
- "typeDescriptions": {
1762
- "typeIdentifier": "t_bool",
1763
- "typeString": "bool"
1764
- }
1765
- },
1766
- "id": 72,
1767
- "initializationExpression": {
1768
- "assignments": [
1769
- 50
1770
- ],
1771
- "declarations": [
1772
- {
1773
- "constant": false,
1774
- "id": 50,
1775
- "mutability": "mutable",
1776
- "name": "i",
1777
- "nodeType": "VariableDeclaration",
1778
- "overrides": null,
1779
- "scope": 72,
1780
- "src": "506:6:0",
1781
- "stateVariable": false,
1782
- "storageLocation": "default",
1783
- "typeDescriptions": {
1784
- "typeIdentifier": "t_uint256",
1785
- "typeString": "uint256"
1786
- },
1787
- "typeName": {
1788
- "id": 49,
1789
- "name": "uint",
1790
- "nodeType": "ElementaryTypeName",
1791
- "src": "506:4:0",
1792
- "typeDescriptions": {
1793
- "typeIdentifier": "t_uint256",
1794
- "typeString": "uint256"
1795
- }
1796
- },
1797
- "value": null,
1798
- "visibility": "internal"
1799
- }
1800
- ],
1801
- "id": 52,
1802
- "initialValue": {
1803
- "argumentTypes": null,
1804
- "hexValue": "30",
1805
- "id": 51,
1806
- "isConstant": false,
1807
- "isLValue": false,
1808
- "isPure": true,
1809
- "kind": "number",
1810
- "lValueRequested": false,
1811
- "nodeType": "Literal",
1812
- "src": "515:1:0",
1813
- "subdenomination": null,
1814
- "typeDescriptions": {
1815
- "typeIdentifier": "t_rational_0_by_1",
1816
- "typeString": "int_const 0"
1817
- },
1818
- "value": "0"
1819
- },
1820
- "nodeType": "VariableDeclarationStatement",
1821
- "src": "506:10:0"
1822
- },
1823
- "loopExpression": {
1824
- "expression": {
1825
- "argumentTypes": null,
1826
- "id": 58,
1827
- "isConstant": false,
1828
- "isLValue": false,
1829
- "isPure": false,
1830
- "lValueRequested": false,
1831
- "nodeType": "UnaryOperation",
1832
- "operator": "++",
1833
- "prefix": false,
1834
- "src": "543:3:0",
1835
- "subExpression": {
1836
- "argumentTypes": null,
1837
- "id": 57,
1838
- "name": "i",
1839
- "nodeType": "Identifier",
1840
- "overloadedDeclarations": [],
1841
- "referencedDeclaration": 50,
1842
- "src": "543:1:0",
1843
- "typeDescriptions": {
1844
- "typeIdentifier": "t_uint256",
1845
- "typeString": "uint256"
1846
- }
1847
- },
1848
- "typeDescriptions": {
1849
- "typeIdentifier": "t_uint256",
1850
- "typeString": "uint256"
1851
- }
1852
- },
1853
- "id": 59,
1854
- "nodeType": "ExpressionStatement",
1855
- "src": "543:3:0"
1856
- },
1857
- "nodeType": "ForStatement",
1858
- "src": "501:120:0"
1859
- }
1860
- ]
1861
- },
1862
- "documentation": null,
1863
- "functionSelector": "9a3715ff",
1864
- "id": 74,
1865
- "implemented": true,
1866
- "kind": "function",
1867
- "modifiers": [],
1868
- "name": "claims",
1869
- "nodeType": "FunctionDefinition",
1870
- "overrides": null,
1871
- "parameters": {
1872
- "id": 45,
1873
- "nodeType": "ParameterList",
1874
- "parameters": [
1875
- {
1876
- "constant": false,
1877
- "id": 41,
1878
- "mutability": "mutable",
1879
- "name": "account",
1880
- "nodeType": "VariableDeclaration",
1881
- "overrides": null,
1882
- "scope": 74,
1883
- "src": "419:15:0",
1884
- "stateVariable": false,
1885
- "storageLocation": "default",
1886
- "typeDescriptions": {
1887
- "typeIdentifier": "t_address",
1888
- "typeString": "address"
1889
- },
1890
- "typeName": {
1891
- "id": 40,
1892
- "name": "address",
1893
- "nodeType": "ElementaryTypeName",
1894
- "src": "419:7:0",
1895
- "stateMutability": "nonpayable",
1896
- "typeDescriptions": {
1897
- "typeIdentifier": "t_address",
1898
- "typeString": "address"
1899
- }
1900
- },
1901
- "value": null,
1902
- "visibility": "internal"
1903
- },
1904
- {
1905
- "constant": false,
1906
- "id": 44,
1907
- "mutability": "mutable",
1908
- "name": "farmingPools",
1909
- "nodeType": "VariableDeclaration",
1910
- "overrides": null,
1911
- "scope": 74,
1912
- "src": "436:29:0",
1913
- "stateVariable": false,
1914
- "storageLocation": "memory",
1915
- "typeDescriptions": {
1916
- "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
1917
- "typeString": "address[]"
1918
- },
1919
- "typeName": {
1920
- "baseType": {
1921
- "id": 42,
1922
- "name": "address",
1923
- "nodeType": "ElementaryTypeName",
1924
- "src": "436:7:0",
1925
- "stateMutability": "nonpayable",
1926
- "typeDescriptions": {
1927
- "typeIdentifier": "t_address",
1928
- "typeString": "address"
1929
- }
1930
- },
1931
- "id": 43,
1932
- "length": null,
1933
- "nodeType": "ArrayTypeName",
1934
- "src": "436:9:0",
1935
- "typeDescriptions": {
1936
- "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr",
1937
- "typeString": "address[]"
1938
- }
1939
- },
1940
- "value": null,
1941
- "visibility": "internal"
1942
- }
1943
- ],
1944
- "src": "418:48:0"
1945
- },
1946
- "returnParameters": {
1947
- "id": 48,
1948
- "nodeType": "ParameterList",
1949
- "parameters": [
1950
- {
1951
- "constant": false,
1952
- "id": 47,
1953
- "mutability": "mutable",
1954
- "name": "amount",
1955
- "nodeType": "VariableDeclaration",
1956
- "overrides": null,
1957
- "scope": 74,
1958
- "src": "483:11:0",
1959
- "stateVariable": false,
1960
- "storageLocation": "default",
1961
- "typeDescriptions": {
1962
- "typeIdentifier": "t_uint256",
1963
- "typeString": "uint256"
1964
- },
1965
- "typeName": {
1966
- "id": 46,
1967
- "name": "uint",
1968
- "nodeType": "ElementaryTypeName",
1969
- "src": "483:4:0",
1970
- "typeDescriptions": {
1971
- "typeIdentifier": "t_uint256",
1972
- "typeString": "uint256"
1973
- }
1974
- },
1975
- "value": null,
1976
- "visibility": "internal"
1977
- }
1978
- ],
1979
- "src": "482:13:0"
1980
- },
1981
- "scope": 75,
1982
- "src": "403:222:0",
1983
- "stateMutability": "nonpayable",
1984
- "virtual": false,
1985
- "visibility": "public"
1986
- }
1987
- ],
1988
- "scope": 76,
1989
- "src": "145:485:0"
1990
- }
1991
- ],
1992
- "src": "0:630:0"
1993
- },
1994
- "compiler": {
1995
- "name": "solc",
1996
- "version": "0.6.6+commit.6c089d02.Emscripten.clang"
1997
- },
1998
- "networks": {
1999
- "3": {
2000
- "events": {},
2001
- "links": {},
2002
- "address": "0x8DFF9cEA94a03Ad4b84b7CA3aEECEF295b05Eeb5",
2003
- "transactionHash": "0xaa960be95087231849ab274a37f3d488ad5a21655bb5139b3e640169834fd94c"
2004
- }
2005
- },
2006
- "schemaVersion": "3.3.2",
2007
- "updatedAt": "2021-03-18T17:37:40.004Z",
2008
- "networkType": "ethereum",
2009
- "devdoc": {
2010
- "methods": {}
2011
- },
2012
- "userdoc": {
2013
- "methods": {}
2014
- }
2015
- }
1
+ {
2
+ "contractName": "ClaimAggregator",
3
+ "abi": [
4
+ {
5
+ "inputs": [],
6
+ "stateMutability": "nonpayable",
7
+ "type": "constructor"
8
+ },
9
+ {
10
+ "inputs": [
11
+ {
12
+ "internalType": "address",
13
+ "name": "account",
14
+ "type": "address"
15
+ },
16
+ {
17
+ "internalType": "address[]",
18
+ "name": "borrowables",
19
+ "type": "address[]"
20
+ }
21
+ ],
22
+ "name": "trackBorrows",
23
+ "outputs": [],
24
+ "stateMutability": "nonpayable",
25
+ "type": "function"
26
+ },
27
+ {
28
+ "inputs": [
29
+ {
30
+ "internalType": "address",
31
+ "name": "account",
32
+ "type": "address"
33
+ },
34
+ {
35
+ "internalType": "address[]",
36
+ "name": "farmingPools",
37
+ "type": "address[]"
38
+ }
39
+ ],
40
+ "name": "claims",
41
+ "outputs": [
42
+ {
43
+ "internalType": "uint256",
44
+ "name": "amount",
45
+ "type": "uint256"
46
+ }
47
+ ],
48
+ "stateMutability": "nonpayable",
49
+ "type": "function"
50
+ }
51
+ ],
52
+ "metadata": "{\"compiler\":{\"version\":\"0.6.6+commit.6c089d02\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"farmingPools\",\"type\":\"address[]\"}],\"name\":\"claims\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"borrowables\",\"type\":\"address[]\"}],\"name\":\"trackBorrows\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"methods\":{}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"/C/Users/simor/Desktop/imx/contracts/ClaimAggregator.sol\":\"ClaimAggregator\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":999999},\"remappings\":[]},\"sources\":{\"/C/Users/simor/Desktop/imx/contracts/ClaimAggregator.sol\":{\"keccak256\":\"0xa499d139997ca608b2707679aad627fcc9c37cbabcacfc26b7f4c7d499620e95\",\"urls\":[\"bzz-raw://132332ed55dff6d63c5784d6a9a8edb94d4624aae8238a47c1c5dfa516c499c7\",\"dweb:/ipfs/QmPnthgmpcVenCiaXKv1EsvPtRvBDwjxP1sv8Wf5kWcmNK\"]},\"/C/Users/simor/Desktop/imx/contracts/interfaces/IBorrowable.sol\":{\"keccak256\":\"0x16a157ab22e3d76a6cf0dd89f55d6426abd8b15ac641ce318e3fa22e7dd1284b\",\"urls\":[\"bzz-raw://368476ee8b1e9d5287cbac49ceaae1e230e4ab95426a00141fbd43b6477d2928\",\"dweb:/ipfs/QmPN3cm2TJUJG3tXa6zCeCWrcitjPP6SofwHpygaiQJ9CV\"]},\"/C/Users/simor/Desktop/imx/contracts/interfaces/IFarmingPool.sol\":{\"keccak256\":\"0x506b7b788206491f43cea8fdff90fa1c03902ef669eb6b2d533246132040827e\",\"urls\":[\"bzz-raw://b71a3391e4b11b6e83d29413072b9788afc79ea3181485f94b83deebad465278\",\"dweb:/ipfs/QmPoitr9fEoBAaZsndWPsMRdZPPRppKfRSrhQyFQevBu1U\"]}},\"version\":1}",
53
+ "bytecode": "0x608060405234801561001057600080fd5b5061036f806100206000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c806368188a4e1461003b5780639a3715ff14610050575b600080fd5b61004e6100493660046101fc565b610079565b005b61006361005e3660046101fc565b610114565b60405161007091906102e9565b60405180910390f35b60005b815181101561010f5781818151811061009157fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1663b7f1118a846040518263ffffffff1660e01b81526004016100d191906102c8565b600060405180830381600087803b1580156100eb57600080fd5b505af11580156100ff573d6000803e3d6000fd5b50506001909201915061007c9050565b505050565b6000805b82518110156101cb5782818151811061012d57fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff16637429d95a856040518263ffffffff1660e01b815260040161016d91906102c8565b602060405180830381600087803b15801561018757600080fd5b505af115801561019b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101bf91906102b0565b90910190600101610118565b5092915050565b803573ffffffffffffffffffffffffffffffffffffffff811681146101f657600080fd5b92915050565b6000806040838503121561020e578182fd5b61021884846101d2565b915060208084013567ffffffffffffffff811115610234578283fd5b80850186601f820112610245578384fd5b8035915061025a61025583610319565b6102f2565b82815283810190828501858502840186018a1015610276578687fd5b8693505b848410156102a05761028c8a826101d2565b83526001939093019291850191850161027a565b5080955050505050509250929050565b6000602082840312156102c1578081fd5b5051919050565b73ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b90815260200190565b60405181810167ffffffffffffffff8111828210171561031157600080fd5b604052919050565b600067ffffffffffffffff82111561032f578081fd5b506020908102019056fea26469706673582212208a0ad998f55c08b3981b11f30eb24c40855c616d1b3d42442ae8e7fad0fd13e464736f6c63430006060033",
54
+ "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100365760003560e01c806368188a4e1461003b5780639a3715ff14610050575b600080fd5b61004e6100493660046101fc565b610079565b005b61006361005e3660046101fc565b610114565b60405161007091906102e9565b60405180910390f35b60005b815181101561010f5781818151811061009157fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1663b7f1118a846040518263ffffffff1660e01b81526004016100d191906102c8565b600060405180830381600087803b1580156100eb57600080fd5b505af11580156100ff573d6000803e3d6000fd5b50506001909201915061007c9050565b505050565b6000805b82518110156101cb5782818151811061012d57fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff16637429d95a856040518263ffffffff1660e01b815260040161016d91906102c8565b602060405180830381600087803b15801561018757600080fd5b505af115801561019b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101bf91906102b0565b90910190600101610118565b5092915050565b803573ffffffffffffffffffffffffffffffffffffffff811681146101f657600080fd5b92915050565b6000806040838503121561020e578182fd5b61021884846101d2565b915060208084013567ffffffffffffffff811115610234578283fd5b80850186601f820112610245578384fd5b8035915061025a61025583610319565b6102f2565b82815283810190828501858502840186018a1015610276578687fd5b8693505b848410156102a05761028c8a826101d2565b83526001939093019291850191850161027a565b5080955050505050509250929050565b6000602082840312156102c1578081fd5b5051919050565b73ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b90815260200190565b60405181810167ffffffffffffffff8111828210171561031157600080fd5b604052919050565b600067ffffffffffffffff82111561032f578081fd5b506020908102019056fea26469706673582212208a0ad998f55c08b3981b11f30eb24c40855c616d1b3d42442ae8e7fad0fd13e464736f6c63430006060033",
55
+ "immutableReferences": {},
56
+ "sourceMap": "145:485:0:-:0;;;176:24;5:9:-1;2:2;;;27:1;24;17:12;2:2;176:24:0;145:485;;;;;;",
57
+ "deployedSourceMap": "145:485:0:-:0;;;;5:9:-1;2:2;;;27:1;24;17:12;2:2;145:485:0;;;;;;;;;;;;;;;;;;;;;12:1:-1;9;2:12;206:191:0;;;;;;;;;:::i;:::-;;403:222;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;206:191;292:6;287:106;308:11;:18;304:1;:22;287:106;;;351:11;363:1;351:14;;;;;;;;;;;;;;339:39;;;379:7;339:48;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5:9:-1;2:2;;;27:1;24;17:12;2:2;339:48:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;-1:-1;;328:3:0;;;;;-1:-1:-1;287:106:0;;-1:-1:-1;287:106:0;;;206:191;;:::o;403:222::-;483:11;;501:120;522:12;:19;518:1;:23;501:120;;;577:12;590:1;577:15;;;;;;;;;;;;;;564:42;;;607:7;564:51;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5:9:-1;2:2;;;27:1;24;17:12;2:2;564:51:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;564:51:0;;;;;;;101:4:-1;97:9;90:4;84;80:15;76:31;69:5;65:43;126:6;120:4;113:20;0:138;564:51:0;;;;;;;;;554:61;;;;543:3;;501:120;;;;403:222;;;;:::o;5:130:-1:-;72:20;;3220:42;3209:54;;3413:35;;3403:2;;3462:1;;3452:12;3403:2;57:78;;;;;1016:502;;;1162:2;1150:9;1141:7;1137:23;1133:32;1130:2;;;-1:-1;;1168:12;1130:2;1230:53;1275:7;1251:22;1230:53;;;1220:63;;1348:2;;1337:9;1333:18;1320:32;1372:18;1364:6;1361:30;1358:2;;;-1:-1;;1394:12;1358:2;1485:6;1474:9;1470:22;277:3;270:4;262:6;258:17;254:27;244:2;;-1:-1;;285:12;244:2;332:6;319:20;305:34;;354:80;369:64;426:6;369:64;;;354:80;;;462:21;;;519:14;;;;494:17;;;608;;;599:27;;;;596:36;-1:-1;593:2;;;-1:-1;;635:12;593:2;-1:-1;661:10;;655:206;680:6;677:1;674:13;655:206;;;760:37;793:3;781:10;760:37;;;748:50;;702:1;695:9;;;;;812:14;;;;840;;655:206;;;659:14;1414:88;;;;;;;;1124:394;;;;;;1525:263;;1640:2;1628:9;1619:7;1615:23;1611:32;1608:2;;;-1:-1;;1646:12;1608:2;-1:-1;953:13;;1602:186;-1:-1;1602:186;2035:213;3220:42;3209:54;;;;1866:37;;2153:2;2138:18;;2124:124;2255:213;1986:37;;;2373:2;2358:18;;2344:124;2475:256;2537:2;2531:9;2563:17;;;2638:18;2623:34;;2659:22;;;2620:62;2617:2;;;2695:1;;2685:12;2617:2;2537;2704:22;2515:216;;-1:-1;2515:216;2738:304;;2897:18;2889:6;2886:30;2883:2;;;-1:-1;;2919:12;2883:2;-1:-1;2964:4;2952:17;;;3017:15;;2820:222",
58
+ "source": "pragma solidity =0.6.6;\r\npragma experimental ABIEncoderV2;\r\n\r\nimport \"./interfaces/IBorrowable.sol\";\r\nimport \"./interfaces/IFarmingPool.sol\";\r\n\r\ncontract ClaimAggregator {\r\n\r\n\tconstructor () public {}\r\n\t\r\n\tfunction trackBorrows(address account, address[] memory borrowables) public {\r\n\t\tfor (uint i = 0; i < borrowables.length; i++) {\r\n\t\t\tIBorrowable(borrowables[i]).trackBorrow(account);\r\n\t\t}\r\n\t}\r\n\t\r\n\tfunction claims(address account, address[] memory farmingPools) public returns (uint amount) {\r\n\t\tfor (uint i = 0; i < farmingPools.length; i++) {\r\n\t\t\tamount += IFarmingPool(farmingPools[i]).claimAccount(account);\r\n\t\t}\r\n\t}\r\n\r\n}",
59
+ "sourcePath": "C:/Users/simor/Desktop/imx/contracts/ClaimAggregator.sol",
60
+ "ast": {
61
+ "absolutePath": "/C/Users/simor/Desktop/imx/contracts/ClaimAggregator.sol",
62
+ "exportedSymbols": {
63
+ "ClaimAggregator": [
64
+ 75
65
+ ]
66
+ },
67
+ "id": 76,
68
+ "nodeType": "SourceUnit",
69
+ "nodes": [
70
+ {
71
+ "id": 1,
72
+ "literals": [
73
+ "solidity",
74
+ "=",
75
+ "0.6",
76
+ ".6"
77
+ ],
78
+ "nodeType": "PragmaDirective",
79
+ "src": "0:23:0"
80
+ },
81
+ {
82
+ "id": 2,
83
+ "literals": [
84
+ "experimental",
85
+ "ABIEncoderV2"
86
+ ],
87
+ "nodeType": "PragmaDirective",
88
+ "src": "25:33:0"
89
+ },
90
+ {
91
+ "absolutePath": "/C/Users/simor/Desktop/imx/contracts/interfaces/IBorrowable.sol",
92
+ "file": "./interfaces/IBorrowable.sol",
93
+ "id": 3,
94
+ "nodeType": "ImportDirective",
95
+ "scope": 76,
96
+ "sourceUnit": 3048,
97
+ "src": "62:38:0",
98
+ "symbolAliases": [],
99
+ "unitAlias": ""
100
+ },
101
+ {
102
+ "absolutePath": "/C/Users/simor/Desktop/imx/contracts/interfaces/IFarmingPool.sol",
103
+ "file": "./interfaces/IFarmingPool.sol",
104
+ "id": 4,
105
+ "nodeType": "ImportDirective",
106
+ "scope": 76,
107
+ "sourceUnit": 3124,
108
+ "src": "102:39:0",
109
+ "symbolAliases": [],
110
+ "unitAlias": ""
111
+ },
112
+ {
113
+ "abstract": false,
114
+ "baseContracts": [],
115
+ "contractDependencies": [],
116
+ "contractKind": "contract",
117
+ "documentation": null,
118
+ "fullyImplemented": true,
119
+ "id": 75,
120
+ "linearizedBaseContracts": [
121
+ 75
122
+ ],
123
+ "name": "ClaimAggregator",
124
+ "nodeType": "ContractDefinition",
125
+ "nodes": [
126
+ {
127
+ "body": {
128
+ "id": 7,
129
+ "nodeType": "Block",
130
+ "src": "198:2:0",
131
+ "statements": []
132
+ },
133
+ "documentation": null,
134
+ "id": 8,
135
+ "implemented": true,
136
+ "kind": "constructor",
137
+ "modifiers": [],
138
+ "name": "",
139
+ "nodeType": "FunctionDefinition",
140
+ "overrides": null,
141
+ "parameters": {
142
+ "id": 5,
143
+ "nodeType": "ParameterList",
144
+ "parameters": [],
145
+ "src": "188:2:0"
146
+ },
147
+ "returnParameters": {
148
+ "id": 6,
149
+ "nodeType": "ParameterList",
150
+ "parameters": [],
151
+ "src": "198:0:0"
152
+ },
153
+ "scope": 75,
154
+ "src": "176:24:0",
155
+ "stateMutability": "nonpayable",
156
+ "virtual": false,
157
+ "visibility": "public"
158
+ },
159
+ {
160
+ "body": {
161
+ "id": 38,
162
+ "nodeType": "Block",
163
+ "src": "282:115:0",
164
+ "statements": [
165
+ {
166
+ "body": {
167
+ "id": 36,
168
+ "nodeType": "Block",
169
+ "src": "333:60:0",
170
+ "statements": [
171
+ {
172
+ "expression": {
173
+ "argumentTypes": null,
174
+ "arguments": [
175
+ {
176
+ "argumentTypes": null,
177
+ "id": 33,
178
+ "name": "account",
179
+ "nodeType": "Identifier",
180
+ "overloadedDeclarations": [],
181
+ "referencedDeclaration": 10,
182
+ "src": "379:7:0",
183
+ "typeDescriptions": {
184
+ "typeIdentifier": "t_address",
185
+ "typeString": "address"
186
+ }
187
+ }
188
+ ],
189
+ "expression": {
190
+ "argumentTypes": [
191
+ {
192
+ "typeIdentifier": "t_address",
193
+ "typeString": "address"
194
+ }
195
+ ],
196
+ "expression": {
197
+ "argumentTypes": null,
198
+ "arguments": [
199
+ {
200
+ "argumentTypes": null,
201
+ "baseExpression": {
202
+ "argumentTypes": null,
203
+ "id": 28,
204
+ "name": "borrowables",
205
+ "nodeType": "Identifier",
206
+ "overloadedDeclarations": [],
207
+ "referencedDeclaration": 13,
208
+ "src": "351:11:0",
209
+ "typeDescriptions": {
210
+ "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
211
+ "typeString": "address[] memory"
212
+ }
213
+ },
214
+ "id": 30,
215
+ "indexExpression": {
216
+ "argumentTypes": null,
217
+ "id": 29,
218
+ "name": "i",
219
+ "nodeType": "Identifier",
220
+ "overloadedDeclarations": [],
221
+ "referencedDeclaration": 17,
222
+ "src": "363:1:0",
223
+ "typeDescriptions": {
224
+ "typeIdentifier": "t_uint256",
225
+ "typeString": "uint256"
226
+ }
227
+ },
228
+ "isConstant": false,
229
+ "isLValue": true,
230
+ "isPure": false,
231
+ "lValueRequested": false,
232
+ "nodeType": "IndexAccess",
233
+ "src": "351:14:0",
234
+ "typeDescriptions": {
235
+ "typeIdentifier": "t_address",
236
+ "typeString": "address"
237
+ }
238
+ }
239
+ ],
240
+ "expression": {
241
+ "argumentTypes": [
242
+ {
243
+ "typeIdentifier": "t_address",
244
+ "typeString": "address"
245
+ }
246
+ ],
247
+ "id": 27,
248
+ "name": "IBorrowable",
249
+ "nodeType": "Identifier",
250
+ "overloadedDeclarations": [],
251
+ "referencedDeclaration": 3047,
252
+ "src": "339:11:0",
253
+ "typeDescriptions": {
254
+ "typeIdentifier": "t_type$_t_contract$_IBorrowable_$3047_$",
255
+ "typeString": "type(contract IBorrowable)"
256
+ }
257
+ },
258
+ "id": 31,
259
+ "isConstant": false,
260
+ "isLValue": false,
261
+ "isPure": false,
262
+ "kind": "typeConversion",
263
+ "lValueRequested": false,
264
+ "names": [],
265
+ "nodeType": "FunctionCall",
266
+ "src": "339:27:0",
267
+ "tryCall": false,
268
+ "typeDescriptions": {
269
+ "typeIdentifier": "t_contract$_IBorrowable_$3047",
270
+ "typeString": "contract IBorrowable"
271
+ }
272
+ },
273
+ "id": 32,
274
+ "isConstant": false,
275
+ "isLValue": false,
276
+ "isPure": false,
277
+ "lValueRequested": false,
278
+ "memberName": "trackBorrow",
279
+ "nodeType": "MemberAccess",
280
+ "referencedDeclaration": 2908,
281
+ "src": "339:39:0",
282
+ "typeDescriptions": {
283
+ "typeIdentifier": "t_function_external_nonpayable$_t_address_$returns$__$",
284
+ "typeString": "function (address) external"
285
+ }
286
+ },
287
+ "id": 34,
288
+ "isConstant": false,
289
+ "isLValue": false,
290
+ "isPure": false,
291
+ "kind": "functionCall",
292
+ "lValueRequested": false,
293
+ "names": [],
294
+ "nodeType": "FunctionCall",
295
+ "src": "339:48:0",
296
+ "tryCall": false,
297
+ "typeDescriptions": {
298
+ "typeIdentifier": "t_tuple$__$",
299
+ "typeString": "tuple()"
300
+ }
301
+ },
302
+ "id": 35,
303
+ "nodeType": "ExpressionStatement",
304
+ "src": "339:48:0"
305
+ }
306
+ ]
307
+ },
308
+ "condition": {
309
+ "argumentTypes": null,
310
+ "commonType": {
311
+ "typeIdentifier": "t_uint256",
312
+ "typeString": "uint256"
313
+ },
314
+ "id": 23,
315
+ "isConstant": false,
316
+ "isLValue": false,
317
+ "isPure": false,
318
+ "lValueRequested": false,
319
+ "leftExpression": {
320
+ "argumentTypes": null,
321
+ "id": 20,
322
+ "name": "i",
323
+ "nodeType": "Identifier",
324
+ "overloadedDeclarations": [],
325
+ "referencedDeclaration": 17,
326
+ "src": "304:1:0",
327
+ "typeDescriptions": {
328
+ "typeIdentifier": "t_uint256",
329
+ "typeString": "uint256"
330
+ }
331
+ },
332
+ "nodeType": "BinaryOperation",
333
+ "operator": "<",
334
+ "rightExpression": {
335
+ "argumentTypes": null,
336
+ "expression": {
337
+ "argumentTypes": null,
338
+ "id": 21,
339
+ "name": "borrowables",
340
+ "nodeType": "Identifier",
341
+ "overloadedDeclarations": [],
342
+ "referencedDeclaration": 13,
343
+ "src": "308:11:0",
344
+ "typeDescriptions": {
345
+ "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
346
+ "typeString": "address[] memory"
347
+ }
348
+ },
349
+ "id": 22,
350
+ "isConstant": false,
351
+ "isLValue": false,
352
+ "isPure": false,
353
+ "lValueRequested": false,
354
+ "memberName": "length",
355
+ "nodeType": "MemberAccess",
356
+ "referencedDeclaration": null,
357
+ "src": "308:18:0",
358
+ "typeDescriptions": {
359
+ "typeIdentifier": "t_uint256",
360
+ "typeString": "uint256"
361
+ }
362
+ },
363
+ "src": "304:22:0",
364
+ "typeDescriptions": {
365
+ "typeIdentifier": "t_bool",
366
+ "typeString": "bool"
367
+ }
368
+ },
369
+ "id": 37,
370
+ "initializationExpression": {
371
+ "assignments": [
372
+ 17
373
+ ],
374
+ "declarations": [
375
+ {
376
+ "constant": false,
377
+ "id": 17,
378
+ "mutability": "mutable",
379
+ "name": "i",
380
+ "nodeType": "VariableDeclaration",
381
+ "overrides": null,
382
+ "scope": 37,
383
+ "src": "292:6:0",
384
+ "stateVariable": false,
385
+ "storageLocation": "default",
386
+ "typeDescriptions": {
387
+ "typeIdentifier": "t_uint256",
388
+ "typeString": "uint256"
389
+ },
390
+ "typeName": {
391
+ "id": 16,
392
+ "name": "uint",
393
+ "nodeType": "ElementaryTypeName",
394
+ "src": "292:4:0",
395
+ "typeDescriptions": {
396
+ "typeIdentifier": "t_uint256",
397
+ "typeString": "uint256"
398
+ }
399
+ },
400
+ "value": null,
401
+ "visibility": "internal"
402
+ }
403
+ ],
404
+ "id": 19,
405
+ "initialValue": {
406
+ "argumentTypes": null,
407
+ "hexValue": "30",
408
+ "id": 18,
409
+ "isConstant": false,
410
+ "isLValue": false,
411
+ "isPure": true,
412
+ "kind": "number",
413
+ "lValueRequested": false,
414
+ "nodeType": "Literal",
415
+ "src": "301:1:0",
416
+ "subdenomination": null,
417
+ "typeDescriptions": {
418
+ "typeIdentifier": "t_rational_0_by_1",
419
+ "typeString": "int_const 0"
420
+ },
421
+ "value": "0"
422
+ },
423
+ "nodeType": "VariableDeclarationStatement",
424
+ "src": "292:10:0"
425
+ },
426
+ "loopExpression": {
427
+ "expression": {
428
+ "argumentTypes": null,
429
+ "id": 25,
430
+ "isConstant": false,
431
+ "isLValue": false,
432
+ "isPure": false,
433
+ "lValueRequested": false,
434
+ "nodeType": "UnaryOperation",
435
+ "operator": "++",
436
+ "prefix": false,
437
+ "src": "328:3:0",
438
+ "subExpression": {
439
+ "argumentTypes": null,
440
+ "id": 24,
441
+ "name": "i",
442
+ "nodeType": "Identifier",
443
+ "overloadedDeclarations": [],
444
+ "referencedDeclaration": 17,
445
+ "src": "328:1:0",
446
+ "typeDescriptions": {
447
+ "typeIdentifier": "t_uint256",
448
+ "typeString": "uint256"
449
+ }
450
+ },
451
+ "typeDescriptions": {
452
+ "typeIdentifier": "t_uint256",
453
+ "typeString": "uint256"
454
+ }
455
+ },
456
+ "id": 26,
457
+ "nodeType": "ExpressionStatement",
458
+ "src": "328:3:0"
459
+ },
460
+ "nodeType": "ForStatement",
461
+ "src": "287:106:0"
462
+ }
463
+ ]
464
+ },
465
+ "documentation": null,
466
+ "functionSelector": "68188a4e",
467
+ "id": 39,
468
+ "implemented": true,
469
+ "kind": "function",
470
+ "modifiers": [],
471
+ "name": "trackBorrows",
472
+ "nodeType": "FunctionDefinition",
473
+ "overrides": null,
474
+ "parameters": {
475
+ "id": 14,
476
+ "nodeType": "ParameterList",
477
+ "parameters": [
478
+ {
479
+ "constant": false,
480
+ "id": 10,
481
+ "mutability": "mutable",
482
+ "name": "account",
483
+ "nodeType": "VariableDeclaration",
484
+ "overrides": null,
485
+ "scope": 39,
486
+ "src": "228:15:0",
487
+ "stateVariable": false,
488
+ "storageLocation": "default",
489
+ "typeDescriptions": {
490
+ "typeIdentifier": "t_address",
491
+ "typeString": "address"
492
+ },
493
+ "typeName": {
494
+ "id": 9,
495
+ "name": "address",
496
+ "nodeType": "ElementaryTypeName",
497
+ "src": "228:7:0",
498
+ "stateMutability": "nonpayable",
499
+ "typeDescriptions": {
500
+ "typeIdentifier": "t_address",
501
+ "typeString": "address"
502
+ }
503
+ },
504
+ "value": null,
505
+ "visibility": "internal"
506
+ },
507
+ {
508
+ "constant": false,
509
+ "id": 13,
510
+ "mutability": "mutable",
511
+ "name": "borrowables",
512
+ "nodeType": "VariableDeclaration",
513
+ "overrides": null,
514
+ "scope": 39,
515
+ "src": "245:28:0",
516
+ "stateVariable": false,
517
+ "storageLocation": "memory",
518
+ "typeDescriptions": {
519
+ "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
520
+ "typeString": "address[]"
521
+ },
522
+ "typeName": {
523
+ "baseType": {
524
+ "id": 11,
525
+ "name": "address",
526
+ "nodeType": "ElementaryTypeName",
527
+ "src": "245:7:0",
528
+ "stateMutability": "nonpayable",
529
+ "typeDescriptions": {
530
+ "typeIdentifier": "t_address",
531
+ "typeString": "address"
532
+ }
533
+ },
534
+ "id": 12,
535
+ "length": null,
536
+ "nodeType": "ArrayTypeName",
537
+ "src": "245:9:0",
538
+ "typeDescriptions": {
539
+ "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr",
540
+ "typeString": "address[]"
541
+ }
542
+ },
543
+ "value": null,
544
+ "visibility": "internal"
545
+ }
546
+ ],
547
+ "src": "227:47:0"
548
+ },
549
+ "returnParameters": {
550
+ "id": 15,
551
+ "nodeType": "ParameterList",
552
+ "parameters": [],
553
+ "src": "282:0:0"
554
+ },
555
+ "scope": 75,
556
+ "src": "206:191:0",
557
+ "stateMutability": "nonpayable",
558
+ "virtual": false,
559
+ "visibility": "public"
560
+ },
561
+ {
562
+ "body": {
563
+ "id": 73,
564
+ "nodeType": "Block",
565
+ "src": "496:129:0",
566
+ "statements": [
567
+ {
568
+ "body": {
569
+ "id": 71,
570
+ "nodeType": "Block",
571
+ "src": "548:73:0",
572
+ "statements": [
573
+ {
574
+ "expression": {
575
+ "argumentTypes": null,
576
+ "id": 69,
577
+ "isConstant": false,
578
+ "isLValue": false,
579
+ "isPure": false,
580
+ "lValueRequested": false,
581
+ "leftHandSide": {
582
+ "argumentTypes": null,
583
+ "id": 60,
584
+ "name": "amount",
585
+ "nodeType": "Identifier",
586
+ "overloadedDeclarations": [],
587
+ "referencedDeclaration": 47,
588
+ "src": "554:6:0",
589
+ "typeDescriptions": {
590
+ "typeIdentifier": "t_uint256",
591
+ "typeString": "uint256"
592
+ }
593
+ },
594
+ "nodeType": "Assignment",
595
+ "operator": "+=",
596
+ "rightHandSide": {
597
+ "argumentTypes": null,
598
+ "arguments": [
599
+ {
600
+ "argumentTypes": null,
601
+ "id": 67,
602
+ "name": "account",
603
+ "nodeType": "Identifier",
604
+ "overloadedDeclarations": [],
605
+ "referencedDeclaration": 41,
606
+ "src": "607:7:0",
607
+ "typeDescriptions": {
608
+ "typeIdentifier": "t_address",
609
+ "typeString": "address"
610
+ }
611
+ }
612
+ ],
613
+ "expression": {
614
+ "argumentTypes": [
615
+ {
616
+ "typeIdentifier": "t_address",
617
+ "typeString": "address"
618
+ }
619
+ ],
620
+ "expression": {
621
+ "argumentTypes": null,
622
+ "arguments": [
623
+ {
624
+ "argumentTypes": null,
625
+ "baseExpression": {
626
+ "argumentTypes": null,
627
+ "id": 62,
628
+ "name": "farmingPools",
629
+ "nodeType": "Identifier",
630
+ "overloadedDeclarations": [],
631
+ "referencedDeclaration": 44,
632
+ "src": "577:12:0",
633
+ "typeDescriptions": {
634
+ "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
635
+ "typeString": "address[] memory"
636
+ }
637
+ },
638
+ "id": 64,
639
+ "indexExpression": {
640
+ "argumentTypes": null,
641
+ "id": 63,
642
+ "name": "i",
643
+ "nodeType": "Identifier",
644
+ "overloadedDeclarations": [],
645
+ "referencedDeclaration": 50,
646
+ "src": "590:1:0",
647
+ "typeDescriptions": {
648
+ "typeIdentifier": "t_uint256",
649
+ "typeString": "uint256"
650
+ }
651
+ },
652
+ "isConstant": false,
653
+ "isLValue": true,
654
+ "isPure": false,
655
+ "lValueRequested": false,
656
+ "nodeType": "IndexAccess",
657
+ "src": "577:15:0",
658
+ "typeDescriptions": {
659
+ "typeIdentifier": "t_address",
660
+ "typeString": "address"
661
+ }
662
+ }
663
+ ],
664
+ "expression": {
665
+ "argumentTypes": [
666
+ {
667
+ "typeIdentifier": "t_address",
668
+ "typeString": "address"
669
+ }
670
+ ],
671
+ "id": 61,
672
+ "name": "IFarmingPool",
673
+ "nodeType": "Identifier",
674
+ "overloadedDeclarations": [],
675
+ "referencedDeclaration": 3123,
676
+ "src": "564:12:0",
677
+ "typeDescriptions": {
678
+ "typeIdentifier": "t_type$_t_contract$_IFarmingPool_$3123_$",
679
+ "typeString": "type(contract IFarmingPool)"
680
+ }
681
+ },
682
+ "id": 65,
683
+ "isConstant": false,
684
+ "isLValue": false,
685
+ "isPure": false,
686
+ "kind": "typeConversion",
687
+ "lValueRequested": false,
688
+ "names": [],
689
+ "nodeType": "FunctionCall",
690
+ "src": "564:29:0",
691
+ "tryCall": false,
692
+ "typeDescriptions": {
693
+ "typeIdentifier": "t_contract$_IFarmingPool_$3123",
694
+ "typeString": "contract IFarmingPool"
695
+ }
696
+ },
697
+ "id": 66,
698
+ "isConstant": false,
699
+ "isLValue": false,
700
+ "isPure": false,
701
+ "lValueRequested": false,
702
+ "memberName": "claimAccount",
703
+ "nodeType": "MemberAccess",
704
+ "referencedDeclaration": 3113,
705
+ "src": "564:42:0",
706
+ "typeDescriptions": {
707
+ "typeIdentifier": "t_function_external_nonpayable$_t_address_$returns$_t_uint256_$",
708
+ "typeString": "function (address) external returns (uint256)"
709
+ }
710
+ },
711
+ "id": 68,
712
+ "isConstant": false,
713
+ "isLValue": false,
714
+ "isPure": false,
715
+ "kind": "functionCall",
716
+ "lValueRequested": false,
717
+ "names": [],
718
+ "nodeType": "FunctionCall",
719
+ "src": "564:51:0",
720
+ "tryCall": false,
721
+ "typeDescriptions": {
722
+ "typeIdentifier": "t_uint256",
723
+ "typeString": "uint256"
724
+ }
725
+ },
726
+ "src": "554:61:0",
727
+ "typeDescriptions": {
728
+ "typeIdentifier": "t_uint256",
729
+ "typeString": "uint256"
730
+ }
731
+ },
732
+ "id": 70,
733
+ "nodeType": "ExpressionStatement",
734
+ "src": "554:61:0"
735
+ }
736
+ ]
737
+ },
738
+ "condition": {
739
+ "argumentTypes": null,
740
+ "commonType": {
741
+ "typeIdentifier": "t_uint256",
742
+ "typeString": "uint256"
743
+ },
744
+ "id": 56,
745
+ "isConstant": false,
746
+ "isLValue": false,
747
+ "isPure": false,
748
+ "lValueRequested": false,
749
+ "leftExpression": {
750
+ "argumentTypes": null,
751
+ "id": 53,
752
+ "name": "i",
753
+ "nodeType": "Identifier",
754
+ "overloadedDeclarations": [],
755
+ "referencedDeclaration": 50,
756
+ "src": "518:1:0",
757
+ "typeDescriptions": {
758
+ "typeIdentifier": "t_uint256",
759
+ "typeString": "uint256"
760
+ }
761
+ },
762
+ "nodeType": "BinaryOperation",
763
+ "operator": "<",
764
+ "rightExpression": {
765
+ "argumentTypes": null,
766
+ "expression": {
767
+ "argumentTypes": null,
768
+ "id": 54,
769
+ "name": "farmingPools",
770
+ "nodeType": "Identifier",
771
+ "overloadedDeclarations": [],
772
+ "referencedDeclaration": 44,
773
+ "src": "522:12:0",
774
+ "typeDescriptions": {
775
+ "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
776
+ "typeString": "address[] memory"
777
+ }
778
+ },
779
+ "id": 55,
780
+ "isConstant": false,
781
+ "isLValue": false,
782
+ "isPure": false,
783
+ "lValueRequested": false,
784
+ "memberName": "length",
785
+ "nodeType": "MemberAccess",
786
+ "referencedDeclaration": null,
787
+ "src": "522:19:0",
788
+ "typeDescriptions": {
789
+ "typeIdentifier": "t_uint256",
790
+ "typeString": "uint256"
791
+ }
792
+ },
793
+ "src": "518:23:0",
794
+ "typeDescriptions": {
795
+ "typeIdentifier": "t_bool",
796
+ "typeString": "bool"
797
+ }
798
+ },
799
+ "id": 72,
800
+ "initializationExpression": {
801
+ "assignments": [
802
+ 50
803
+ ],
804
+ "declarations": [
805
+ {
806
+ "constant": false,
807
+ "id": 50,
808
+ "mutability": "mutable",
809
+ "name": "i",
810
+ "nodeType": "VariableDeclaration",
811
+ "overrides": null,
812
+ "scope": 72,
813
+ "src": "506:6:0",
814
+ "stateVariable": false,
815
+ "storageLocation": "default",
816
+ "typeDescriptions": {
817
+ "typeIdentifier": "t_uint256",
818
+ "typeString": "uint256"
819
+ },
820
+ "typeName": {
821
+ "id": 49,
822
+ "name": "uint",
823
+ "nodeType": "ElementaryTypeName",
824
+ "src": "506:4:0",
825
+ "typeDescriptions": {
826
+ "typeIdentifier": "t_uint256",
827
+ "typeString": "uint256"
828
+ }
829
+ },
830
+ "value": null,
831
+ "visibility": "internal"
832
+ }
833
+ ],
834
+ "id": 52,
835
+ "initialValue": {
836
+ "argumentTypes": null,
837
+ "hexValue": "30",
838
+ "id": 51,
839
+ "isConstant": false,
840
+ "isLValue": false,
841
+ "isPure": true,
842
+ "kind": "number",
843
+ "lValueRequested": false,
844
+ "nodeType": "Literal",
845
+ "src": "515:1:0",
846
+ "subdenomination": null,
847
+ "typeDescriptions": {
848
+ "typeIdentifier": "t_rational_0_by_1",
849
+ "typeString": "int_const 0"
850
+ },
851
+ "value": "0"
852
+ },
853
+ "nodeType": "VariableDeclarationStatement",
854
+ "src": "506:10:0"
855
+ },
856
+ "loopExpression": {
857
+ "expression": {
858
+ "argumentTypes": null,
859
+ "id": 58,
860
+ "isConstant": false,
861
+ "isLValue": false,
862
+ "isPure": false,
863
+ "lValueRequested": false,
864
+ "nodeType": "UnaryOperation",
865
+ "operator": "++",
866
+ "prefix": false,
867
+ "src": "543:3:0",
868
+ "subExpression": {
869
+ "argumentTypes": null,
870
+ "id": 57,
871
+ "name": "i",
872
+ "nodeType": "Identifier",
873
+ "overloadedDeclarations": [],
874
+ "referencedDeclaration": 50,
875
+ "src": "543:1:0",
876
+ "typeDescriptions": {
877
+ "typeIdentifier": "t_uint256",
878
+ "typeString": "uint256"
879
+ }
880
+ },
881
+ "typeDescriptions": {
882
+ "typeIdentifier": "t_uint256",
883
+ "typeString": "uint256"
884
+ }
885
+ },
886
+ "id": 59,
887
+ "nodeType": "ExpressionStatement",
888
+ "src": "543:3:0"
889
+ },
890
+ "nodeType": "ForStatement",
891
+ "src": "501:120:0"
892
+ }
893
+ ]
894
+ },
895
+ "documentation": null,
896
+ "functionSelector": "9a3715ff",
897
+ "id": 74,
898
+ "implemented": true,
899
+ "kind": "function",
900
+ "modifiers": [],
901
+ "name": "claims",
902
+ "nodeType": "FunctionDefinition",
903
+ "overrides": null,
904
+ "parameters": {
905
+ "id": 45,
906
+ "nodeType": "ParameterList",
907
+ "parameters": [
908
+ {
909
+ "constant": false,
910
+ "id": 41,
911
+ "mutability": "mutable",
912
+ "name": "account",
913
+ "nodeType": "VariableDeclaration",
914
+ "overrides": null,
915
+ "scope": 74,
916
+ "src": "419:15:0",
917
+ "stateVariable": false,
918
+ "storageLocation": "default",
919
+ "typeDescriptions": {
920
+ "typeIdentifier": "t_address",
921
+ "typeString": "address"
922
+ },
923
+ "typeName": {
924
+ "id": 40,
925
+ "name": "address",
926
+ "nodeType": "ElementaryTypeName",
927
+ "src": "419:7:0",
928
+ "stateMutability": "nonpayable",
929
+ "typeDescriptions": {
930
+ "typeIdentifier": "t_address",
931
+ "typeString": "address"
932
+ }
933
+ },
934
+ "value": null,
935
+ "visibility": "internal"
936
+ },
937
+ {
938
+ "constant": false,
939
+ "id": 44,
940
+ "mutability": "mutable",
941
+ "name": "farmingPools",
942
+ "nodeType": "VariableDeclaration",
943
+ "overrides": null,
944
+ "scope": 74,
945
+ "src": "436:29:0",
946
+ "stateVariable": false,
947
+ "storageLocation": "memory",
948
+ "typeDescriptions": {
949
+ "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
950
+ "typeString": "address[]"
951
+ },
952
+ "typeName": {
953
+ "baseType": {
954
+ "id": 42,
955
+ "name": "address",
956
+ "nodeType": "ElementaryTypeName",
957
+ "src": "436:7:0",
958
+ "stateMutability": "nonpayable",
959
+ "typeDescriptions": {
960
+ "typeIdentifier": "t_address",
961
+ "typeString": "address"
962
+ }
963
+ },
964
+ "id": 43,
965
+ "length": null,
966
+ "nodeType": "ArrayTypeName",
967
+ "src": "436:9:0",
968
+ "typeDescriptions": {
969
+ "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr",
970
+ "typeString": "address[]"
971
+ }
972
+ },
973
+ "value": null,
974
+ "visibility": "internal"
975
+ }
976
+ ],
977
+ "src": "418:48:0"
978
+ },
979
+ "returnParameters": {
980
+ "id": 48,
981
+ "nodeType": "ParameterList",
982
+ "parameters": [
983
+ {
984
+ "constant": false,
985
+ "id": 47,
986
+ "mutability": "mutable",
987
+ "name": "amount",
988
+ "nodeType": "VariableDeclaration",
989
+ "overrides": null,
990
+ "scope": 74,
991
+ "src": "483:11:0",
992
+ "stateVariable": false,
993
+ "storageLocation": "default",
994
+ "typeDescriptions": {
995
+ "typeIdentifier": "t_uint256",
996
+ "typeString": "uint256"
997
+ },
998
+ "typeName": {
999
+ "id": 46,
1000
+ "name": "uint",
1001
+ "nodeType": "ElementaryTypeName",
1002
+ "src": "483:4:0",
1003
+ "typeDescriptions": {
1004
+ "typeIdentifier": "t_uint256",
1005
+ "typeString": "uint256"
1006
+ }
1007
+ },
1008
+ "value": null,
1009
+ "visibility": "internal"
1010
+ }
1011
+ ],
1012
+ "src": "482:13:0"
1013
+ },
1014
+ "scope": 75,
1015
+ "src": "403:222:0",
1016
+ "stateMutability": "nonpayable",
1017
+ "virtual": false,
1018
+ "visibility": "public"
1019
+ }
1020
+ ],
1021
+ "scope": 76,
1022
+ "src": "145:485:0"
1023
+ }
1024
+ ],
1025
+ "src": "0:630:0"
1026
+ },
1027
+ "legacyAST": {
1028
+ "absolutePath": "/C/Users/simor/Desktop/imx/contracts/ClaimAggregator.sol",
1029
+ "exportedSymbols": {
1030
+ "ClaimAggregator": [
1031
+ 75
1032
+ ]
1033
+ },
1034
+ "id": 76,
1035
+ "nodeType": "SourceUnit",
1036
+ "nodes": [
1037
+ {
1038
+ "id": 1,
1039
+ "literals": [
1040
+ "solidity",
1041
+ "=",
1042
+ "0.6",
1043
+ ".6"
1044
+ ],
1045
+ "nodeType": "PragmaDirective",
1046
+ "src": "0:23:0"
1047
+ },
1048
+ {
1049
+ "id": 2,
1050
+ "literals": [
1051
+ "experimental",
1052
+ "ABIEncoderV2"
1053
+ ],
1054
+ "nodeType": "PragmaDirective",
1055
+ "src": "25:33:0"
1056
+ },
1057
+ {
1058
+ "absolutePath": "/C/Users/simor/Desktop/imx/contracts/interfaces/IBorrowable.sol",
1059
+ "file": "./interfaces/IBorrowable.sol",
1060
+ "id": 3,
1061
+ "nodeType": "ImportDirective",
1062
+ "scope": 76,
1063
+ "sourceUnit": 3048,
1064
+ "src": "62:38:0",
1065
+ "symbolAliases": [],
1066
+ "unitAlias": ""
1067
+ },
1068
+ {
1069
+ "absolutePath": "/C/Users/simor/Desktop/imx/contracts/interfaces/IFarmingPool.sol",
1070
+ "file": "./interfaces/IFarmingPool.sol",
1071
+ "id": 4,
1072
+ "nodeType": "ImportDirective",
1073
+ "scope": 76,
1074
+ "sourceUnit": 3124,
1075
+ "src": "102:39:0",
1076
+ "symbolAliases": [],
1077
+ "unitAlias": ""
1078
+ },
1079
+ {
1080
+ "abstract": false,
1081
+ "baseContracts": [],
1082
+ "contractDependencies": [],
1083
+ "contractKind": "contract",
1084
+ "documentation": null,
1085
+ "fullyImplemented": true,
1086
+ "id": 75,
1087
+ "linearizedBaseContracts": [
1088
+ 75
1089
+ ],
1090
+ "name": "ClaimAggregator",
1091
+ "nodeType": "ContractDefinition",
1092
+ "nodes": [
1093
+ {
1094
+ "body": {
1095
+ "id": 7,
1096
+ "nodeType": "Block",
1097
+ "src": "198:2:0",
1098
+ "statements": []
1099
+ },
1100
+ "documentation": null,
1101
+ "id": 8,
1102
+ "implemented": true,
1103
+ "kind": "constructor",
1104
+ "modifiers": [],
1105
+ "name": "",
1106
+ "nodeType": "FunctionDefinition",
1107
+ "overrides": null,
1108
+ "parameters": {
1109
+ "id": 5,
1110
+ "nodeType": "ParameterList",
1111
+ "parameters": [],
1112
+ "src": "188:2:0"
1113
+ },
1114
+ "returnParameters": {
1115
+ "id": 6,
1116
+ "nodeType": "ParameterList",
1117
+ "parameters": [],
1118
+ "src": "198:0:0"
1119
+ },
1120
+ "scope": 75,
1121
+ "src": "176:24:0",
1122
+ "stateMutability": "nonpayable",
1123
+ "virtual": false,
1124
+ "visibility": "public"
1125
+ },
1126
+ {
1127
+ "body": {
1128
+ "id": 38,
1129
+ "nodeType": "Block",
1130
+ "src": "282:115:0",
1131
+ "statements": [
1132
+ {
1133
+ "body": {
1134
+ "id": 36,
1135
+ "nodeType": "Block",
1136
+ "src": "333:60:0",
1137
+ "statements": [
1138
+ {
1139
+ "expression": {
1140
+ "argumentTypes": null,
1141
+ "arguments": [
1142
+ {
1143
+ "argumentTypes": null,
1144
+ "id": 33,
1145
+ "name": "account",
1146
+ "nodeType": "Identifier",
1147
+ "overloadedDeclarations": [],
1148
+ "referencedDeclaration": 10,
1149
+ "src": "379:7:0",
1150
+ "typeDescriptions": {
1151
+ "typeIdentifier": "t_address",
1152
+ "typeString": "address"
1153
+ }
1154
+ }
1155
+ ],
1156
+ "expression": {
1157
+ "argumentTypes": [
1158
+ {
1159
+ "typeIdentifier": "t_address",
1160
+ "typeString": "address"
1161
+ }
1162
+ ],
1163
+ "expression": {
1164
+ "argumentTypes": null,
1165
+ "arguments": [
1166
+ {
1167
+ "argumentTypes": null,
1168
+ "baseExpression": {
1169
+ "argumentTypes": null,
1170
+ "id": 28,
1171
+ "name": "borrowables",
1172
+ "nodeType": "Identifier",
1173
+ "overloadedDeclarations": [],
1174
+ "referencedDeclaration": 13,
1175
+ "src": "351:11:0",
1176
+ "typeDescriptions": {
1177
+ "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
1178
+ "typeString": "address[] memory"
1179
+ }
1180
+ },
1181
+ "id": 30,
1182
+ "indexExpression": {
1183
+ "argumentTypes": null,
1184
+ "id": 29,
1185
+ "name": "i",
1186
+ "nodeType": "Identifier",
1187
+ "overloadedDeclarations": [],
1188
+ "referencedDeclaration": 17,
1189
+ "src": "363:1:0",
1190
+ "typeDescriptions": {
1191
+ "typeIdentifier": "t_uint256",
1192
+ "typeString": "uint256"
1193
+ }
1194
+ },
1195
+ "isConstant": false,
1196
+ "isLValue": true,
1197
+ "isPure": false,
1198
+ "lValueRequested": false,
1199
+ "nodeType": "IndexAccess",
1200
+ "src": "351:14:0",
1201
+ "typeDescriptions": {
1202
+ "typeIdentifier": "t_address",
1203
+ "typeString": "address"
1204
+ }
1205
+ }
1206
+ ],
1207
+ "expression": {
1208
+ "argumentTypes": [
1209
+ {
1210
+ "typeIdentifier": "t_address",
1211
+ "typeString": "address"
1212
+ }
1213
+ ],
1214
+ "id": 27,
1215
+ "name": "IBorrowable",
1216
+ "nodeType": "Identifier",
1217
+ "overloadedDeclarations": [],
1218
+ "referencedDeclaration": 3047,
1219
+ "src": "339:11:0",
1220
+ "typeDescriptions": {
1221
+ "typeIdentifier": "t_type$_t_contract$_IBorrowable_$3047_$",
1222
+ "typeString": "type(contract IBorrowable)"
1223
+ }
1224
+ },
1225
+ "id": 31,
1226
+ "isConstant": false,
1227
+ "isLValue": false,
1228
+ "isPure": false,
1229
+ "kind": "typeConversion",
1230
+ "lValueRequested": false,
1231
+ "names": [],
1232
+ "nodeType": "FunctionCall",
1233
+ "src": "339:27:0",
1234
+ "tryCall": false,
1235
+ "typeDescriptions": {
1236
+ "typeIdentifier": "t_contract$_IBorrowable_$3047",
1237
+ "typeString": "contract IBorrowable"
1238
+ }
1239
+ },
1240
+ "id": 32,
1241
+ "isConstant": false,
1242
+ "isLValue": false,
1243
+ "isPure": false,
1244
+ "lValueRequested": false,
1245
+ "memberName": "trackBorrow",
1246
+ "nodeType": "MemberAccess",
1247
+ "referencedDeclaration": 2908,
1248
+ "src": "339:39:0",
1249
+ "typeDescriptions": {
1250
+ "typeIdentifier": "t_function_external_nonpayable$_t_address_$returns$__$",
1251
+ "typeString": "function (address) external"
1252
+ }
1253
+ },
1254
+ "id": 34,
1255
+ "isConstant": false,
1256
+ "isLValue": false,
1257
+ "isPure": false,
1258
+ "kind": "functionCall",
1259
+ "lValueRequested": false,
1260
+ "names": [],
1261
+ "nodeType": "FunctionCall",
1262
+ "src": "339:48:0",
1263
+ "tryCall": false,
1264
+ "typeDescriptions": {
1265
+ "typeIdentifier": "t_tuple$__$",
1266
+ "typeString": "tuple()"
1267
+ }
1268
+ },
1269
+ "id": 35,
1270
+ "nodeType": "ExpressionStatement",
1271
+ "src": "339:48:0"
1272
+ }
1273
+ ]
1274
+ },
1275
+ "condition": {
1276
+ "argumentTypes": null,
1277
+ "commonType": {
1278
+ "typeIdentifier": "t_uint256",
1279
+ "typeString": "uint256"
1280
+ },
1281
+ "id": 23,
1282
+ "isConstant": false,
1283
+ "isLValue": false,
1284
+ "isPure": false,
1285
+ "lValueRequested": false,
1286
+ "leftExpression": {
1287
+ "argumentTypes": null,
1288
+ "id": 20,
1289
+ "name": "i",
1290
+ "nodeType": "Identifier",
1291
+ "overloadedDeclarations": [],
1292
+ "referencedDeclaration": 17,
1293
+ "src": "304:1:0",
1294
+ "typeDescriptions": {
1295
+ "typeIdentifier": "t_uint256",
1296
+ "typeString": "uint256"
1297
+ }
1298
+ },
1299
+ "nodeType": "BinaryOperation",
1300
+ "operator": "<",
1301
+ "rightExpression": {
1302
+ "argumentTypes": null,
1303
+ "expression": {
1304
+ "argumentTypes": null,
1305
+ "id": 21,
1306
+ "name": "borrowables",
1307
+ "nodeType": "Identifier",
1308
+ "overloadedDeclarations": [],
1309
+ "referencedDeclaration": 13,
1310
+ "src": "308:11:0",
1311
+ "typeDescriptions": {
1312
+ "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
1313
+ "typeString": "address[] memory"
1314
+ }
1315
+ },
1316
+ "id": 22,
1317
+ "isConstant": false,
1318
+ "isLValue": false,
1319
+ "isPure": false,
1320
+ "lValueRequested": false,
1321
+ "memberName": "length",
1322
+ "nodeType": "MemberAccess",
1323
+ "referencedDeclaration": null,
1324
+ "src": "308:18:0",
1325
+ "typeDescriptions": {
1326
+ "typeIdentifier": "t_uint256",
1327
+ "typeString": "uint256"
1328
+ }
1329
+ },
1330
+ "src": "304:22:0",
1331
+ "typeDescriptions": {
1332
+ "typeIdentifier": "t_bool",
1333
+ "typeString": "bool"
1334
+ }
1335
+ },
1336
+ "id": 37,
1337
+ "initializationExpression": {
1338
+ "assignments": [
1339
+ 17
1340
+ ],
1341
+ "declarations": [
1342
+ {
1343
+ "constant": false,
1344
+ "id": 17,
1345
+ "mutability": "mutable",
1346
+ "name": "i",
1347
+ "nodeType": "VariableDeclaration",
1348
+ "overrides": null,
1349
+ "scope": 37,
1350
+ "src": "292:6:0",
1351
+ "stateVariable": false,
1352
+ "storageLocation": "default",
1353
+ "typeDescriptions": {
1354
+ "typeIdentifier": "t_uint256",
1355
+ "typeString": "uint256"
1356
+ },
1357
+ "typeName": {
1358
+ "id": 16,
1359
+ "name": "uint",
1360
+ "nodeType": "ElementaryTypeName",
1361
+ "src": "292:4:0",
1362
+ "typeDescriptions": {
1363
+ "typeIdentifier": "t_uint256",
1364
+ "typeString": "uint256"
1365
+ }
1366
+ },
1367
+ "value": null,
1368
+ "visibility": "internal"
1369
+ }
1370
+ ],
1371
+ "id": 19,
1372
+ "initialValue": {
1373
+ "argumentTypes": null,
1374
+ "hexValue": "30",
1375
+ "id": 18,
1376
+ "isConstant": false,
1377
+ "isLValue": false,
1378
+ "isPure": true,
1379
+ "kind": "number",
1380
+ "lValueRequested": false,
1381
+ "nodeType": "Literal",
1382
+ "src": "301:1:0",
1383
+ "subdenomination": null,
1384
+ "typeDescriptions": {
1385
+ "typeIdentifier": "t_rational_0_by_1",
1386
+ "typeString": "int_const 0"
1387
+ },
1388
+ "value": "0"
1389
+ },
1390
+ "nodeType": "VariableDeclarationStatement",
1391
+ "src": "292:10:0"
1392
+ },
1393
+ "loopExpression": {
1394
+ "expression": {
1395
+ "argumentTypes": null,
1396
+ "id": 25,
1397
+ "isConstant": false,
1398
+ "isLValue": false,
1399
+ "isPure": false,
1400
+ "lValueRequested": false,
1401
+ "nodeType": "UnaryOperation",
1402
+ "operator": "++",
1403
+ "prefix": false,
1404
+ "src": "328:3:0",
1405
+ "subExpression": {
1406
+ "argumentTypes": null,
1407
+ "id": 24,
1408
+ "name": "i",
1409
+ "nodeType": "Identifier",
1410
+ "overloadedDeclarations": [],
1411
+ "referencedDeclaration": 17,
1412
+ "src": "328:1:0",
1413
+ "typeDescriptions": {
1414
+ "typeIdentifier": "t_uint256",
1415
+ "typeString": "uint256"
1416
+ }
1417
+ },
1418
+ "typeDescriptions": {
1419
+ "typeIdentifier": "t_uint256",
1420
+ "typeString": "uint256"
1421
+ }
1422
+ },
1423
+ "id": 26,
1424
+ "nodeType": "ExpressionStatement",
1425
+ "src": "328:3:0"
1426
+ },
1427
+ "nodeType": "ForStatement",
1428
+ "src": "287:106:0"
1429
+ }
1430
+ ]
1431
+ },
1432
+ "documentation": null,
1433
+ "functionSelector": "68188a4e",
1434
+ "id": 39,
1435
+ "implemented": true,
1436
+ "kind": "function",
1437
+ "modifiers": [],
1438
+ "name": "trackBorrows",
1439
+ "nodeType": "FunctionDefinition",
1440
+ "overrides": null,
1441
+ "parameters": {
1442
+ "id": 14,
1443
+ "nodeType": "ParameterList",
1444
+ "parameters": [
1445
+ {
1446
+ "constant": false,
1447
+ "id": 10,
1448
+ "mutability": "mutable",
1449
+ "name": "account",
1450
+ "nodeType": "VariableDeclaration",
1451
+ "overrides": null,
1452
+ "scope": 39,
1453
+ "src": "228:15:0",
1454
+ "stateVariable": false,
1455
+ "storageLocation": "default",
1456
+ "typeDescriptions": {
1457
+ "typeIdentifier": "t_address",
1458
+ "typeString": "address"
1459
+ },
1460
+ "typeName": {
1461
+ "id": 9,
1462
+ "name": "address",
1463
+ "nodeType": "ElementaryTypeName",
1464
+ "src": "228:7:0",
1465
+ "stateMutability": "nonpayable",
1466
+ "typeDescriptions": {
1467
+ "typeIdentifier": "t_address",
1468
+ "typeString": "address"
1469
+ }
1470
+ },
1471
+ "value": null,
1472
+ "visibility": "internal"
1473
+ },
1474
+ {
1475
+ "constant": false,
1476
+ "id": 13,
1477
+ "mutability": "mutable",
1478
+ "name": "borrowables",
1479
+ "nodeType": "VariableDeclaration",
1480
+ "overrides": null,
1481
+ "scope": 39,
1482
+ "src": "245:28:0",
1483
+ "stateVariable": false,
1484
+ "storageLocation": "memory",
1485
+ "typeDescriptions": {
1486
+ "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
1487
+ "typeString": "address[]"
1488
+ },
1489
+ "typeName": {
1490
+ "baseType": {
1491
+ "id": 11,
1492
+ "name": "address",
1493
+ "nodeType": "ElementaryTypeName",
1494
+ "src": "245:7:0",
1495
+ "stateMutability": "nonpayable",
1496
+ "typeDescriptions": {
1497
+ "typeIdentifier": "t_address",
1498
+ "typeString": "address"
1499
+ }
1500
+ },
1501
+ "id": 12,
1502
+ "length": null,
1503
+ "nodeType": "ArrayTypeName",
1504
+ "src": "245:9:0",
1505
+ "typeDescriptions": {
1506
+ "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr",
1507
+ "typeString": "address[]"
1508
+ }
1509
+ },
1510
+ "value": null,
1511
+ "visibility": "internal"
1512
+ }
1513
+ ],
1514
+ "src": "227:47:0"
1515
+ },
1516
+ "returnParameters": {
1517
+ "id": 15,
1518
+ "nodeType": "ParameterList",
1519
+ "parameters": [],
1520
+ "src": "282:0:0"
1521
+ },
1522
+ "scope": 75,
1523
+ "src": "206:191:0",
1524
+ "stateMutability": "nonpayable",
1525
+ "virtual": false,
1526
+ "visibility": "public"
1527
+ },
1528
+ {
1529
+ "body": {
1530
+ "id": 73,
1531
+ "nodeType": "Block",
1532
+ "src": "496:129:0",
1533
+ "statements": [
1534
+ {
1535
+ "body": {
1536
+ "id": 71,
1537
+ "nodeType": "Block",
1538
+ "src": "548:73:0",
1539
+ "statements": [
1540
+ {
1541
+ "expression": {
1542
+ "argumentTypes": null,
1543
+ "id": 69,
1544
+ "isConstant": false,
1545
+ "isLValue": false,
1546
+ "isPure": false,
1547
+ "lValueRequested": false,
1548
+ "leftHandSide": {
1549
+ "argumentTypes": null,
1550
+ "id": 60,
1551
+ "name": "amount",
1552
+ "nodeType": "Identifier",
1553
+ "overloadedDeclarations": [],
1554
+ "referencedDeclaration": 47,
1555
+ "src": "554:6:0",
1556
+ "typeDescriptions": {
1557
+ "typeIdentifier": "t_uint256",
1558
+ "typeString": "uint256"
1559
+ }
1560
+ },
1561
+ "nodeType": "Assignment",
1562
+ "operator": "+=",
1563
+ "rightHandSide": {
1564
+ "argumentTypes": null,
1565
+ "arguments": [
1566
+ {
1567
+ "argumentTypes": null,
1568
+ "id": 67,
1569
+ "name": "account",
1570
+ "nodeType": "Identifier",
1571
+ "overloadedDeclarations": [],
1572
+ "referencedDeclaration": 41,
1573
+ "src": "607:7:0",
1574
+ "typeDescriptions": {
1575
+ "typeIdentifier": "t_address",
1576
+ "typeString": "address"
1577
+ }
1578
+ }
1579
+ ],
1580
+ "expression": {
1581
+ "argumentTypes": [
1582
+ {
1583
+ "typeIdentifier": "t_address",
1584
+ "typeString": "address"
1585
+ }
1586
+ ],
1587
+ "expression": {
1588
+ "argumentTypes": null,
1589
+ "arguments": [
1590
+ {
1591
+ "argumentTypes": null,
1592
+ "baseExpression": {
1593
+ "argumentTypes": null,
1594
+ "id": 62,
1595
+ "name": "farmingPools",
1596
+ "nodeType": "Identifier",
1597
+ "overloadedDeclarations": [],
1598
+ "referencedDeclaration": 44,
1599
+ "src": "577:12:0",
1600
+ "typeDescriptions": {
1601
+ "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
1602
+ "typeString": "address[] memory"
1603
+ }
1604
+ },
1605
+ "id": 64,
1606
+ "indexExpression": {
1607
+ "argumentTypes": null,
1608
+ "id": 63,
1609
+ "name": "i",
1610
+ "nodeType": "Identifier",
1611
+ "overloadedDeclarations": [],
1612
+ "referencedDeclaration": 50,
1613
+ "src": "590:1:0",
1614
+ "typeDescriptions": {
1615
+ "typeIdentifier": "t_uint256",
1616
+ "typeString": "uint256"
1617
+ }
1618
+ },
1619
+ "isConstant": false,
1620
+ "isLValue": true,
1621
+ "isPure": false,
1622
+ "lValueRequested": false,
1623
+ "nodeType": "IndexAccess",
1624
+ "src": "577:15:0",
1625
+ "typeDescriptions": {
1626
+ "typeIdentifier": "t_address",
1627
+ "typeString": "address"
1628
+ }
1629
+ }
1630
+ ],
1631
+ "expression": {
1632
+ "argumentTypes": [
1633
+ {
1634
+ "typeIdentifier": "t_address",
1635
+ "typeString": "address"
1636
+ }
1637
+ ],
1638
+ "id": 61,
1639
+ "name": "IFarmingPool",
1640
+ "nodeType": "Identifier",
1641
+ "overloadedDeclarations": [],
1642
+ "referencedDeclaration": 3123,
1643
+ "src": "564:12:0",
1644
+ "typeDescriptions": {
1645
+ "typeIdentifier": "t_type$_t_contract$_IFarmingPool_$3123_$",
1646
+ "typeString": "type(contract IFarmingPool)"
1647
+ }
1648
+ },
1649
+ "id": 65,
1650
+ "isConstant": false,
1651
+ "isLValue": false,
1652
+ "isPure": false,
1653
+ "kind": "typeConversion",
1654
+ "lValueRequested": false,
1655
+ "names": [],
1656
+ "nodeType": "FunctionCall",
1657
+ "src": "564:29:0",
1658
+ "tryCall": false,
1659
+ "typeDescriptions": {
1660
+ "typeIdentifier": "t_contract$_IFarmingPool_$3123",
1661
+ "typeString": "contract IFarmingPool"
1662
+ }
1663
+ },
1664
+ "id": 66,
1665
+ "isConstant": false,
1666
+ "isLValue": false,
1667
+ "isPure": false,
1668
+ "lValueRequested": false,
1669
+ "memberName": "claimAccount",
1670
+ "nodeType": "MemberAccess",
1671
+ "referencedDeclaration": 3113,
1672
+ "src": "564:42:0",
1673
+ "typeDescriptions": {
1674
+ "typeIdentifier": "t_function_external_nonpayable$_t_address_$returns$_t_uint256_$",
1675
+ "typeString": "function (address) external returns (uint256)"
1676
+ }
1677
+ },
1678
+ "id": 68,
1679
+ "isConstant": false,
1680
+ "isLValue": false,
1681
+ "isPure": false,
1682
+ "kind": "functionCall",
1683
+ "lValueRequested": false,
1684
+ "names": [],
1685
+ "nodeType": "FunctionCall",
1686
+ "src": "564:51:0",
1687
+ "tryCall": false,
1688
+ "typeDescriptions": {
1689
+ "typeIdentifier": "t_uint256",
1690
+ "typeString": "uint256"
1691
+ }
1692
+ },
1693
+ "src": "554:61:0",
1694
+ "typeDescriptions": {
1695
+ "typeIdentifier": "t_uint256",
1696
+ "typeString": "uint256"
1697
+ }
1698
+ },
1699
+ "id": 70,
1700
+ "nodeType": "ExpressionStatement",
1701
+ "src": "554:61:0"
1702
+ }
1703
+ ]
1704
+ },
1705
+ "condition": {
1706
+ "argumentTypes": null,
1707
+ "commonType": {
1708
+ "typeIdentifier": "t_uint256",
1709
+ "typeString": "uint256"
1710
+ },
1711
+ "id": 56,
1712
+ "isConstant": false,
1713
+ "isLValue": false,
1714
+ "isPure": false,
1715
+ "lValueRequested": false,
1716
+ "leftExpression": {
1717
+ "argumentTypes": null,
1718
+ "id": 53,
1719
+ "name": "i",
1720
+ "nodeType": "Identifier",
1721
+ "overloadedDeclarations": [],
1722
+ "referencedDeclaration": 50,
1723
+ "src": "518:1:0",
1724
+ "typeDescriptions": {
1725
+ "typeIdentifier": "t_uint256",
1726
+ "typeString": "uint256"
1727
+ }
1728
+ },
1729
+ "nodeType": "BinaryOperation",
1730
+ "operator": "<",
1731
+ "rightExpression": {
1732
+ "argumentTypes": null,
1733
+ "expression": {
1734
+ "argumentTypes": null,
1735
+ "id": 54,
1736
+ "name": "farmingPools",
1737
+ "nodeType": "Identifier",
1738
+ "overloadedDeclarations": [],
1739
+ "referencedDeclaration": 44,
1740
+ "src": "522:12:0",
1741
+ "typeDescriptions": {
1742
+ "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
1743
+ "typeString": "address[] memory"
1744
+ }
1745
+ },
1746
+ "id": 55,
1747
+ "isConstant": false,
1748
+ "isLValue": false,
1749
+ "isPure": false,
1750
+ "lValueRequested": false,
1751
+ "memberName": "length",
1752
+ "nodeType": "MemberAccess",
1753
+ "referencedDeclaration": null,
1754
+ "src": "522:19:0",
1755
+ "typeDescriptions": {
1756
+ "typeIdentifier": "t_uint256",
1757
+ "typeString": "uint256"
1758
+ }
1759
+ },
1760
+ "src": "518:23:0",
1761
+ "typeDescriptions": {
1762
+ "typeIdentifier": "t_bool",
1763
+ "typeString": "bool"
1764
+ }
1765
+ },
1766
+ "id": 72,
1767
+ "initializationExpression": {
1768
+ "assignments": [
1769
+ 50
1770
+ ],
1771
+ "declarations": [
1772
+ {
1773
+ "constant": false,
1774
+ "id": 50,
1775
+ "mutability": "mutable",
1776
+ "name": "i",
1777
+ "nodeType": "VariableDeclaration",
1778
+ "overrides": null,
1779
+ "scope": 72,
1780
+ "src": "506:6:0",
1781
+ "stateVariable": false,
1782
+ "storageLocation": "default",
1783
+ "typeDescriptions": {
1784
+ "typeIdentifier": "t_uint256",
1785
+ "typeString": "uint256"
1786
+ },
1787
+ "typeName": {
1788
+ "id": 49,
1789
+ "name": "uint",
1790
+ "nodeType": "ElementaryTypeName",
1791
+ "src": "506:4:0",
1792
+ "typeDescriptions": {
1793
+ "typeIdentifier": "t_uint256",
1794
+ "typeString": "uint256"
1795
+ }
1796
+ },
1797
+ "value": null,
1798
+ "visibility": "internal"
1799
+ }
1800
+ ],
1801
+ "id": 52,
1802
+ "initialValue": {
1803
+ "argumentTypes": null,
1804
+ "hexValue": "30",
1805
+ "id": 51,
1806
+ "isConstant": false,
1807
+ "isLValue": false,
1808
+ "isPure": true,
1809
+ "kind": "number",
1810
+ "lValueRequested": false,
1811
+ "nodeType": "Literal",
1812
+ "src": "515:1:0",
1813
+ "subdenomination": null,
1814
+ "typeDescriptions": {
1815
+ "typeIdentifier": "t_rational_0_by_1",
1816
+ "typeString": "int_const 0"
1817
+ },
1818
+ "value": "0"
1819
+ },
1820
+ "nodeType": "VariableDeclarationStatement",
1821
+ "src": "506:10:0"
1822
+ },
1823
+ "loopExpression": {
1824
+ "expression": {
1825
+ "argumentTypes": null,
1826
+ "id": 58,
1827
+ "isConstant": false,
1828
+ "isLValue": false,
1829
+ "isPure": false,
1830
+ "lValueRequested": false,
1831
+ "nodeType": "UnaryOperation",
1832
+ "operator": "++",
1833
+ "prefix": false,
1834
+ "src": "543:3:0",
1835
+ "subExpression": {
1836
+ "argumentTypes": null,
1837
+ "id": 57,
1838
+ "name": "i",
1839
+ "nodeType": "Identifier",
1840
+ "overloadedDeclarations": [],
1841
+ "referencedDeclaration": 50,
1842
+ "src": "543:1:0",
1843
+ "typeDescriptions": {
1844
+ "typeIdentifier": "t_uint256",
1845
+ "typeString": "uint256"
1846
+ }
1847
+ },
1848
+ "typeDescriptions": {
1849
+ "typeIdentifier": "t_uint256",
1850
+ "typeString": "uint256"
1851
+ }
1852
+ },
1853
+ "id": 59,
1854
+ "nodeType": "ExpressionStatement",
1855
+ "src": "543:3:0"
1856
+ },
1857
+ "nodeType": "ForStatement",
1858
+ "src": "501:120:0"
1859
+ }
1860
+ ]
1861
+ },
1862
+ "documentation": null,
1863
+ "functionSelector": "9a3715ff",
1864
+ "id": 74,
1865
+ "implemented": true,
1866
+ "kind": "function",
1867
+ "modifiers": [],
1868
+ "name": "claims",
1869
+ "nodeType": "FunctionDefinition",
1870
+ "overrides": null,
1871
+ "parameters": {
1872
+ "id": 45,
1873
+ "nodeType": "ParameterList",
1874
+ "parameters": [
1875
+ {
1876
+ "constant": false,
1877
+ "id": 41,
1878
+ "mutability": "mutable",
1879
+ "name": "account",
1880
+ "nodeType": "VariableDeclaration",
1881
+ "overrides": null,
1882
+ "scope": 74,
1883
+ "src": "419:15:0",
1884
+ "stateVariable": false,
1885
+ "storageLocation": "default",
1886
+ "typeDescriptions": {
1887
+ "typeIdentifier": "t_address",
1888
+ "typeString": "address"
1889
+ },
1890
+ "typeName": {
1891
+ "id": 40,
1892
+ "name": "address",
1893
+ "nodeType": "ElementaryTypeName",
1894
+ "src": "419:7:0",
1895
+ "stateMutability": "nonpayable",
1896
+ "typeDescriptions": {
1897
+ "typeIdentifier": "t_address",
1898
+ "typeString": "address"
1899
+ }
1900
+ },
1901
+ "value": null,
1902
+ "visibility": "internal"
1903
+ },
1904
+ {
1905
+ "constant": false,
1906
+ "id": 44,
1907
+ "mutability": "mutable",
1908
+ "name": "farmingPools",
1909
+ "nodeType": "VariableDeclaration",
1910
+ "overrides": null,
1911
+ "scope": 74,
1912
+ "src": "436:29:0",
1913
+ "stateVariable": false,
1914
+ "storageLocation": "memory",
1915
+ "typeDescriptions": {
1916
+ "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
1917
+ "typeString": "address[]"
1918
+ },
1919
+ "typeName": {
1920
+ "baseType": {
1921
+ "id": 42,
1922
+ "name": "address",
1923
+ "nodeType": "ElementaryTypeName",
1924
+ "src": "436:7:0",
1925
+ "stateMutability": "nonpayable",
1926
+ "typeDescriptions": {
1927
+ "typeIdentifier": "t_address",
1928
+ "typeString": "address"
1929
+ }
1930
+ },
1931
+ "id": 43,
1932
+ "length": null,
1933
+ "nodeType": "ArrayTypeName",
1934
+ "src": "436:9:0",
1935
+ "typeDescriptions": {
1936
+ "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr",
1937
+ "typeString": "address[]"
1938
+ }
1939
+ },
1940
+ "value": null,
1941
+ "visibility": "internal"
1942
+ }
1943
+ ],
1944
+ "src": "418:48:0"
1945
+ },
1946
+ "returnParameters": {
1947
+ "id": 48,
1948
+ "nodeType": "ParameterList",
1949
+ "parameters": [
1950
+ {
1951
+ "constant": false,
1952
+ "id": 47,
1953
+ "mutability": "mutable",
1954
+ "name": "amount",
1955
+ "nodeType": "VariableDeclaration",
1956
+ "overrides": null,
1957
+ "scope": 74,
1958
+ "src": "483:11:0",
1959
+ "stateVariable": false,
1960
+ "storageLocation": "default",
1961
+ "typeDescriptions": {
1962
+ "typeIdentifier": "t_uint256",
1963
+ "typeString": "uint256"
1964
+ },
1965
+ "typeName": {
1966
+ "id": 46,
1967
+ "name": "uint",
1968
+ "nodeType": "ElementaryTypeName",
1969
+ "src": "483:4:0",
1970
+ "typeDescriptions": {
1971
+ "typeIdentifier": "t_uint256",
1972
+ "typeString": "uint256"
1973
+ }
1974
+ },
1975
+ "value": null,
1976
+ "visibility": "internal"
1977
+ }
1978
+ ],
1979
+ "src": "482:13:0"
1980
+ },
1981
+ "scope": 75,
1982
+ "src": "403:222:0",
1983
+ "stateMutability": "nonpayable",
1984
+ "virtual": false,
1985
+ "visibility": "public"
1986
+ }
1987
+ ],
1988
+ "scope": 76,
1989
+ "src": "145:485:0"
1990
+ }
1991
+ ],
1992
+ "src": "0:630:0"
1993
+ },
1994
+ "compiler": {
1995
+ "name": "solc",
1996
+ "version": "0.6.6+commit.6c089d02.Emscripten.clang"
1997
+ },
1998
+ "networks": {
1999
+ "3": {
2000
+ "events": {},
2001
+ "links": {},
2002
+ "address": "0x8DFF9cEA94a03Ad4b84b7CA3aEECEF295b05Eeb5",
2003
+ "transactionHash": "0xaa960be95087231849ab274a37f3d488ad5a21655bb5139b3e640169834fd94c"
2004
+ }
2005
+ },
2006
+ "schemaVersion": "3.3.2",
2007
+ "updatedAt": "2021-03-18T17:37:40.004Z",
2008
+ "networkType": "ethereum",
2009
+ "devdoc": {
2010
+ "methods": {}
2011
+ },
2012
+ "userdoc": {
2013
+ "methods": {}
2014
+ }
2015
+ }