impermax-sdk 1.2.112 → 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 -104
  33. package/lib/config/amms.js +433 -436
  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 -111
  65. package/lib/config/farms.js +207 -210
  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,1469 +1,1469 @@
1
- {
2
- "contractName": "ISimpleUniswapOracle",
3
- "abi": [
4
- {
5
- "anonymous": false,
6
- "inputs": [
7
- {
8
- "indexed": true,
9
- "internalType": "address",
10
- "name": "pair",
11
- "type": "address"
12
- },
13
- {
14
- "indexed": false,
15
- "internalType": "uint256",
16
- "name": "priceCumulative",
17
- "type": "uint256"
18
- },
19
- {
20
- "indexed": false,
21
- "internalType": "uint32",
22
- "name": "blockTimestamp",
23
- "type": "uint32"
24
- },
25
- {
26
- "indexed": false,
27
- "internalType": "bool",
28
- "name": "lastIsA",
29
- "type": "bool"
30
- }
31
- ],
32
- "name": "PriceUpdate",
33
- "type": "event"
34
- },
35
- {
36
- "constant": true,
37
- "inputs": [],
38
- "name": "MIN_T",
39
- "outputs": [
40
- {
41
- "internalType": "uint32",
42
- "name": "",
43
- "type": "uint32"
44
- }
45
- ],
46
- "payable": false,
47
- "stateMutability": "pure",
48
- "type": "function"
49
- },
50
- {
51
- "constant": true,
52
- "inputs": [],
53
- "name": "getBlockTimestamp",
54
- "outputs": [
55
- {
56
- "internalType": "uint32",
57
- "name": "",
58
- "type": "uint32"
59
- }
60
- ],
61
- "payable": false,
62
- "stateMutability": "view",
63
- "type": "function"
64
- },
65
- {
66
- "constant": true,
67
- "inputs": [
68
- {
69
- "internalType": "address",
70
- "name": "uniswapV2Pair",
71
- "type": "address"
72
- }
73
- ],
74
- "name": "getPair",
75
- "outputs": [
76
- {
77
- "internalType": "uint256",
78
- "name": "priceCumulativeA",
79
- "type": "uint256"
80
- },
81
- {
82
- "internalType": "uint256",
83
- "name": "priceCumulativeB",
84
- "type": "uint256"
85
- },
86
- {
87
- "internalType": "uint32",
88
- "name": "updateA",
89
- "type": "uint32"
90
- },
91
- {
92
- "internalType": "uint32",
93
- "name": "updateB",
94
- "type": "uint32"
95
- },
96
- {
97
- "internalType": "bool",
98
- "name": "lastIsA",
99
- "type": "bool"
100
- },
101
- {
102
- "internalType": "bool",
103
- "name": "initialized",
104
- "type": "bool"
105
- }
106
- ],
107
- "payable": false,
108
- "stateMutability": "view",
109
- "type": "function"
110
- },
111
- {
112
- "constant": false,
113
- "inputs": [
114
- {
115
- "internalType": "address",
116
- "name": "uniswapV2Pair",
117
- "type": "address"
118
- }
119
- ],
120
- "name": "initialize",
121
- "outputs": [],
122
- "payable": false,
123
- "stateMutability": "nonpayable",
124
- "type": "function"
125
- },
126
- {
127
- "constant": false,
128
- "inputs": [
129
- {
130
- "internalType": "address",
131
- "name": "uniswapV2Pair",
132
- "type": "address"
133
- }
134
- ],
135
- "name": "getResult",
136
- "outputs": [
137
- {
138
- "internalType": "uint224",
139
- "name": "price",
140
- "type": "uint224"
141
- },
142
- {
143
- "internalType": "uint32",
144
- "name": "T",
145
- "type": "uint32"
146
- }
147
- ],
148
- "payable": false,
149
- "stateMutability": "nonpayable",
150
- "type": "function"
151
- }
152
- ],
153
- "metadata": "{\"compiler\":{\"version\":\"0.5.16+commit.9c3226ce\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"pair\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"priceCumulative\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"blockTimestamp\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"lastIsA\",\"type\":\"bool\"}],\"name\":\"PriceUpdate\",\"type\":\"event\"},{\"constant\":true,\"inputs\":[],\"name\":\"MIN_T\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"getBlockTimestamp\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"uniswapV2Pair\",\"type\":\"address\"}],\"name\":\"getPair\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"priceCumulativeA\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"priceCumulativeB\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"updateA\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"updateB\",\"type\":\"uint32\"},{\"internalType\":\"bool\",\"name\":\"lastIsA\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"initialized\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"uniswapV2Pair\",\"type\":\"address\"}],\"name\":\"getResult\",\"outputs\":[{\"internalType\":\"uint224\",\"name\":\"price\",\"type\":\"uint224\"},{\"internalType\":\"uint32\",\"name\":\"T\",\"type\":\"uint32\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"uniswapV2Pair\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"methods\":{}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"/C/Users/simor/Desktop/impermax-x-uniswapv2-periphery/test/Contracts/simple-uniswap-oracle/interfaces/ISimpleUniswapOracle.sol\":\"ISimpleUniswapOracle\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"/C/Users/simor/Desktop/impermax-x-uniswapv2-periphery/test/Contracts/simple-uniswap-oracle/interfaces/ISimpleUniswapOracle.sol\":{\"keccak256\":\"0x1a8af485a21bd316cb483235a58e17c0b6e54399162a97327e4a2c5d151fd634\",\"urls\":[\"bzz-raw://f3456d9576cb0959a844d2d42837a54bb7f022cceba928305267f85745e89e44\",\"dweb:/ipfs/QmVmuDNdAMUXwgaA94ukRwwXNHJWf43zLXqBXBVepfZTLx\"]}},\"version\":1}",
154
- "bytecode": "0x",
155
- "deployedBytecode": "0x",
156
- "sourceMap": "",
157
- "deployedSourceMap": "",
158
- "source": "pragma solidity =0.5.16;\r\n\r\ninterface ISimpleUniswapOracle {\r\n\tevent PriceUpdate(address indexed pair, uint256 priceCumulative, uint32 blockTimestamp, bool lastIsA);\r\n\tfunction MIN_T() external pure returns (uint32);\r\n\tfunction getBlockTimestamp() external view returns (uint32);\r\n\tfunction getPair(address uniswapV2Pair) external view returns (\r\n\t\tuint256 priceCumulativeA,\r\n\t\tuint256 priceCumulativeB,\r\n\t\tuint32 updateA,\r\n\t\tuint32 updateB,\r\n\t\tbool lastIsA,\r\n\t\tbool initialized\r\n\t);\r\n\tfunction initialize(address uniswapV2Pair) external;\r\n\tfunction getResult(address uniswapV2Pair) external returns (uint224 price, uint32 T);\r\n}",
159
- "sourcePath": "C:\\Users\\simor\\Desktop\\impermax-x-uniswapv2-periphery\\test\\Contracts\\simple-uniswap-oracle\\interfaces\\ISimpleUniswapOracle.sol",
160
- "ast": {
161
- "absolutePath": "/C/Users/simor/Desktop/impermax-x-uniswapv2-periphery/test/Contracts/simple-uniswap-oracle/interfaces/ISimpleUniswapOracle.sol",
162
- "exportedSymbols": {
163
- "ISimpleUniswapOracle": [
164
- 7295
165
- ]
166
- },
167
- "id": 7296,
168
- "nodeType": "SourceUnit",
169
- "nodes": [
170
- {
171
- "id": 7243,
172
- "literals": [
173
- "solidity",
174
- "=",
175
- "0.5",
176
- ".16"
177
- ],
178
- "nodeType": "PragmaDirective",
179
- "src": "0:24:34"
180
- },
181
- {
182
- "baseContracts": [],
183
- "contractDependencies": [],
184
- "contractKind": "interface",
185
- "documentation": null,
186
- "fullyImplemented": false,
187
- "id": 7295,
188
- "linearizedBaseContracts": [
189
- 7295
190
- ],
191
- "name": "ISimpleUniswapOracle",
192
- "nodeType": "ContractDefinition",
193
- "nodes": [
194
- {
195
- "anonymous": false,
196
- "documentation": null,
197
- "id": 7253,
198
- "name": "PriceUpdate",
199
- "nodeType": "EventDefinition",
200
- "parameters": {
201
- "id": 7252,
202
- "nodeType": "ParameterList",
203
- "parameters": [
204
- {
205
- "constant": false,
206
- "id": 7245,
207
- "indexed": true,
208
- "name": "pair",
209
- "nodeType": "VariableDeclaration",
210
- "scope": 7253,
211
- "src": "81:20:34",
212
- "stateVariable": false,
213
- "storageLocation": "default",
214
- "typeDescriptions": {
215
- "typeIdentifier": "t_address",
216
- "typeString": "address"
217
- },
218
- "typeName": {
219
- "id": 7244,
220
- "name": "address",
221
- "nodeType": "ElementaryTypeName",
222
- "src": "81:7:34",
223
- "stateMutability": "nonpayable",
224
- "typeDescriptions": {
225
- "typeIdentifier": "t_address",
226
- "typeString": "address"
227
- }
228
- },
229
- "value": null,
230
- "visibility": "internal"
231
- },
232
- {
233
- "constant": false,
234
- "id": 7247,
235
- "indexed": false,
236
- "name": "priceCumulative",
237
- "nodeType": "VariableDeclaration",
238
- "scope": 7253,
239
- "src": "103:23:34",
240
- "stateVariable": false,
241
- "storageLocation": "default",
242
- "typeDescriptions": {
243
- "typeIdentifier": "t_uint256",
244
- "typeString": "uint256"
245
- },
246
- "typeName": {
247
- "id": 7246,
248
- "name": "uint256",
249
- "nodeType": "ElementaryTypeName",
250
- "src": "103:7:34",
251
- "typeDescriptions": {
252
- "typeIdentifier": "t_uint256",
253
- "typeString": "uint256"
254
- }
255
- },
256
- "value": null,
257
- "visibility": "internal"
258
- },
259
- {
260
- "constant": false,
261
- "id": 7249,
262
- "indexed": false,
263
- "name": "blockTimestamp",
264
- "nodeType": "VariableDeclaration",
265
- "scope": 7253,
266
- "src": "128:21:34",
267
- "stateVariable": false,
268
- "storageLocation": "default",
269
- "typeDescriptions": {
270
- "typeIdentifier": "t_uint32",
271
- "typeString": "uint32"
272
- },
273
- "typeName": {
274
- "id": 7248,
275
- "name": "uint32",
276
- "nodeType": "ElementaryTypeName",
277
- "src": "128:6:34",
278
- "typeDescriptions": {
279
- "typeIdentifier": "t_uint32",
280
- "typeString": "uint32"
281
- }
282
- },
283
- "value": null,
284
- "visibility": "internal"
285
- },
286
- {
287
- "constant": false,
288
- "id": 7251,
289
- "indexed": false,
290
- "name": "lastIsA",
291
- "nodeType": "VariableDeclaration",
292
- "scope": 7253,
293
- "src": "151:12:34",
294
- "stateVariable": false,
295
- "storageLocation": "default",
296
- "typeDescriptions": {
297
- "typeIdentifier": "t_bool",
298
- "typeString": "bool"
299
- },
300
- "typeName": {
301
- "id": 7250,
302
- "name": "bool",
303
- "nodeType": "ElementaryTypeName",
304
- "src": "151:4:34",
305
- "typeDescriptions": {
306
- "typeIdentifier": "t_bool",
307
- "typeString": "bool"
308
- }
309
- },
310
- "value": null,
311
- "visibility": "internal"
312
- }
313
- ],
314
- "src": "80:84:34"
315
- },
316
- "src": "63:102:34"
317
- },
318
- {
319
- "body": null,
320
- "documentation": null,
321
- "id": 7258,
322
- "implemented": false,
323
- "kind": "function",
324
- "modifiers": [],
325
- "name": "MIN_T",
326
- "nodeType": "FunctionDefinition",
327
- "parameters": {
328
- "id": 7254,
329
- "nodeType": "ParameterList",
330
- "parameters": [],
331
- "src": "182:2:34"
332
- },
333
- "returnParameters": {
334
- "id": 7257,
335
- "nodeType": "ParameterList",
336
- "parameters": [
337
- {
338
- "constant": false,
339
- "id": 7256,
340
- "name": "",
341
- "nodeType": "VariableDeclaration",
342
- "scope": 7258,
343
- "src": "208:6:34",
344
- "stateVariable": false,
345
- "storageLocation": "default",
346
- "typeDescriptions": {
347
- "typeIdentifier": "t_uint32",
348
- "typeString": "uint32"
349
- },
350
- "typeName": {
351
- "id": 7255,
352
- "name": "uint32",
353
- "nodeType": "ElementaryTypeName",
354
- "src": "208:6:34",
355
- "typeDescriptions": {
356
- "typeIdentifier": "t_uint32",
357
- "typeString": "uint32"
358
- }
359
- },
360
- "value": null,
361
- "visibility": "internal"
362
- }
363
- ],
364
- "src": "207:8:34"
365
- },
366
- "scope": 7295,
367
- "src": "168:48:34",
368
- "stateMutability": "pure",
369
- "superFunction": null,
370
- "visibility": "external"
371
- },
372
- {
373
- "body": null,
374
- "documentation": null,
375
- "id": 7263,
376
- "implemented": false,
377
- "kind": "function",
378
- "modifiers": [],
379
- "name": "getBlockTimestamp",
380
- "nodeType": "FunctionDefinition",
381
- "parameters": {
382
- "id": 7259,
383
- "nodeType": "ParameterList",
384
- "parameters": [],
385
- "src": "245:2:34"
386
- },
387
- "returnParameters": {
388
- "id": 7262,
389
- "nodeType": "ParameterList",
390
- "parameters": [
391
- {
392
- "constant": false,
393
- "id": 7261,
394
- "name": "",
395
- "nodeType": "VariableDeclaration",
396
- "scope": 7263,
397
- "src": "271:6:34",
398
- "stateVariable": false,
399
- "storageLocation": "default",
400
- "typeDescriptions": {
401
- "typeIdentifier": "t_uint32",
402
- "typeString": "uint32"
403
- },
404
- "typeName": {
405
- "id": 7260,
406
- "name": "uint32",
407
- "nodeType": "ElementaryTypeName",
408
- "src": "271:6:34",
409
- "typeDescriptions": {
410
- "typeIdentifier": "t_uint32",
411
- "typeString": "uint32"
412
- }
413
- },
414
- "value": null,
415
- "visibility": "internal"
416
- }
417
- ],
418
- "src": "270:8:34"
419
- },
420
- "scope": 7295,
421
- "src": "219:60:34",
422
- "stateMutability": "view",
423
- "superFunction": null,
424
- "visibility": "external"
425
- },
426
- {
427
- "body": null,
428
- "documentation": null,
429
- "id": 7280,
430
- "implemented": false,
431
- "kind": "function",
432
- "modifiers": [],
433
- "name": "getPair",
434
- "nodeType": "FunctionDefinition",
435
- "parameters": {
436
- "id": 7266,
437
- "nodeType": "ParameterList",
438
- "parameters": [
439
- {
440
- "constant": false,
441
- "id": 7265,
442
- "name": "uniswapV2Pair",
443
- "nodeType": "VariableDeclaration",
444
- "scope": 7280,
445
- "src": "299:21:34",
446
- "stateVariable": false,
447
- "storageLocation": "default",
448
- "typeDescriptions": {
449
- "typeIdentifier": "t_address",
450
- "typeString": "address"
451
- },
452
- "typeName": {
453
- "id": 7264,
454
- "name": "address",
455
- "nodeType": "ElementaryTypeName",
456
- "src": "299:7:34",
457
- "stateMutability": "nonpayable",
458
- "typeDescriptions": {
459
- "typeIdentifier": "t_address",
460
- "typeString": "address"
461
- }
462
- },
463
- "value": null,
464
- "visibility": "internal"
465
- }
466
- ],
467
- "src": "298:23:34"
468
- },
469
- "returnParameters": {
470
- "id": 7279,
471
- "nodeType": "ParameterList",
472
- "parameters": [
473
- {
474
- "constant": false,
475
- "id": 7268,
476
- "name": "priceCumulativeA",
477
- "nodeType": "VariableDeclaration",
478
- "scope": 7280,
479
- "src": "349:24:34",
480
- "stateVariable": false,
481
- "storageLocation": "default",
482
- "typeDescriptions": {
483
- "typeIdentifier": "t_uint256",
484
- "typeString": "uint256"
485
- },
486
- "typeName": {
487
- "id": 7267,
488
- "name": "uint256",
489
- "nodeType": "ElementaryTypeName",
490
- "src": "349:7:34",
491
- "typeDescriptions": {
492
- "typeIdentifier": "t_uint256",
493
- "typeString": "uint256"
494
- }
495
- },
496
- "value": null,
497
- "visibility": "internal"
498
- },
499
- {
500
- "constant": false,
501
- "id": 7270,
502
- "name": "priceCumulativeB",
503
- "nodeType": "VariableDeclaration",
504
- "scope": 7280,
505
- "src": "378:24:34",
506
- "stateVariable": false,
507
- "storageLocation": "default",
508
- "typeDescriptions": {
509
- "typeIdentifier": "t_uint256",
510
- "typeString": "uint256"
511
- },
512
- "typeName": {
513
- "id": 7269,
514
- "name": "uint256",
515
- "nodeType": "ElementaryTypeName",
516
- "src": "378:7:34",
517
- "typeDescriptions": {
518
- "typeIdentifier": "t_uint256",
519
- "typeString": "uint256"
520
- }
521
- },
522
- "value": null,
523
- "visibility": "internal"
524
- },
525
- {
526
- "constant": false,
527
- "id": 7272,
528
- "name": "updateA",
529
- "nodeType": "VariableDeclaration",
530
- "scope": 7280,
531
- "src": "407:14:34",
532
- "stateVariable": false,
533
- "storageLocation": "default",
534
- "typeDescriptions": {
535
- "typeIdentifier": "t_uint32",
536
- "typeString": "uint32"
537
- },
538
- "typeName": {
539
- "id": 7271,
540
- "name": "uint32",
541
- "nodeType": "ElementaryTypeName",
542
- "src": "407:6:34",
543
- "typeDescriptions": {
544
- "typeIdentifier": "t_uint32",
545
- "typeString": "uint32"
546
- }
547
- },
548
- "value": null,
549
- "visibility": "internal"
550
- },
551
- {
552
- "constant": false,
553
- "id": 7274,
554
- "name": "updateB",
555
- "nodeType": "VariableDeclaration",
556
- "scope": 7280,
557
- "src": "426:14:34",
558
- "stateVariable": false,
559
- "storageLocation": "default",
560
- "typeDescriptions": {
561
- "typeIdentifier": "t_uint32",
562
- "typeString": "uint32"
563
- },
564
- "typeName": {
565
- "id": 7273,
566
- "name": "uint32",
567
- "nodeType": "ElementaryTypeName",
568
- "src": "426:6:34",
569
- "typeDescriptions": {
570
- "typeIdentifier": "t_uint32",
571
- "typeString": "uint32"
572
- }
573
- },
574
- "value": null,
575
- "visibility": "internal"
576
- },
577
- {
578
- "constant": false,
579
- "id": 7276,
580
- "name": "lastIsA",
581
- "nodeType": "VariableDeclaration",
582
- "scope": 7280,
583
- "src": "445:12:34",
584
- "stateVariable": false,
585
- "storageLocation": "default",
586
- "typeDescriptions": {
587
- "typeIdentifier": "t_bool",
588
- "typeString": "bool"
589
- },
590
- "typeName": {
591
- "id": 7275,
592
- "name": "bool",
593
- "nodeType": "ElementaryTypeName",
594
- "src": "445:4:34",
595
- "typeDescriptions": {
596
- "typeIdentifier": "t_bool",
597
- "typeString": "bool"
598
- }
599
- },
600
- "value": null,
601
- "visibility": "internal"
602
- },
603
- {
604
- "constant": false,
605
- "id": 7278,
606
- "name": "initialized",
607
- "nodeType": "VariableDeclaration",
608
- "scope": 7280,
609
- "src": "462:16:34",
610
- "stateVariable": false,
611
- "storageLocation": "default",
612
- "typeDescriptions": {
613
- "typeIdentifier": "t_bool",
614
- "typeString": "bool"
615
- },
616
- "typeName": {
617
- "id": 7277,
618
- "name": "bool",
619
- "nodeType": "ElementaryTypeName",
620
- "src": "462:4:34",
621
- "typeDescriptions": {
622
- "typeIdentifier": "t_bool",
623
- "typeString": "bool"
624
- }
625
- },
626
- "value": null,
627
- "visibility": "internal"
628
- }
629
- ],
630
- "src": "344:138:34"
631
- },
632
- "scope": 7295,
633
- "src": "282:201:34",
634
- "stateMutability": "view",
635
- "superFunction": null,
636
- "visibility": "external"
637
- },
638
- {
639
- "body": null,
640
- "documentation": null,
641
- "id": 7285,
642
- "implemented": false,
643
- "kind": "function",
644
- "modifiers": [],
645
- "name": "initialize",
646
- "nodeType": "FunctionDefinition",
647
- "parameters": {
648
- "id": 7283,
649
- "nodeType": "ParameterList",
650
- "parameters": [
651
- {
652
- "constant": false,
653
- "id": 7282,
654
- "name": "uniswapV2Pair",
655
- "nodeType": "VariableDeclaration",
656
- "scope": 7285,
657
- "src": "506:21:34",
658
- "stateVariable": false,
659
- "storageLocation": "default",
660
- "typeDescriptions": {
661
- "typeIdentifier": "t_address",
662
- "typeString": "address"
663
- },
664
- "typeName": {
665
- "id": 7281,
666
- "name": "address",
667
- "nodeType": "ElementaryTypeName",
668
- "src": "506:7:34",
669
- "stateMutability": "nonpayable",
670
- "typeDescriptions": {
671
- "typeIdentifier": "t_address",
672
- "typeString": "address"
673
- }
674
- },
675
- "value": null,
676
- "visibility": "internal"
677
- }
678
- ],
679
- "src": "505:23:34"
680
- },
681
- "returnParameters": {
682
- "id": 7284,
683
- "nodeType": "ParameterList",
684
- "parameters": [],
685
- "src": "537:0:34"
686
- },
687
- "scope": 7295,
688
- "src": "486:52:34",
689
- "stateMutability": "nonpayable",
690
- "superFunction": null,
691
- "visibility": "external"
692
- },
693
- {
694
- "body": null,
695
- "documentation": null,
696
- "id": 7294,
697
- "implemented": false,
698
- "kind": "function",
699
- "modifiers": [],
700
- "name": "getResult",
701
- "nodeType": "FunctionDefinition",
702
- "parameters": {
703
- "id": 7288,
704
- "nodeType": "ParameterList",
705
- "parameters": [
706
- {
707
- "constant": false,
708
- "id": 7287,
709
- "name": "uniswapV2Pair",
710
- "nodeType": "VariableDeclaration",
711
- "scope": 7294,
712
- "src": "560:21:34",
713
- "stateVariable": false,
714
- "storageLocation": "default",
715
- "typeDescriptions": {
716
- "typeIdentifier": "t_address",
717
- "typeString": "address"
718
- },
719
- "typeName": {
720
- "id": 7286,
721
- "name": "address",
722
- "nodeType": "ElementaryTypeName",
723
- "src": "560:7:34",
724
- "stateMutability": "nonpayable",
725
- "typeDescriptions": {
726
- "typeIdentifier": "t_address",
727
- "typeString": "address"
728
- }
729
- },
730
- "value": null,
731
- "visibility": "internal"
732
- }
733
- ],
734
- "src": "559:23:34"
735
- },
736
- "returnParameters": {
737
- "id": 7293,
738
- "nodeType": "ParameterList",
739
- "parameters": [
740
- {
741
- "constant": false,
742
- "id": 7290,
743
- "name": "price",
744
- "nodeType": "VariableDeclaration",
745
- "scope": 7294,
746
- "src": "601:13:34",
747
- "stateVariable": false,
748
- "storageLocation": "default",
749
- "typeDescriptions": {
750
- "typeIdentifier": "t_uint224",
751
- "typeString": "uint224"
752
- },
753
- "typeName": {
754
- "id": 7289,
755
- "name": "uint224",
756
- "nodeType": "ElementaryTypeName",
757
- "src": "601:7:34",
758
- "typeDescriptions": {
759
- "typeIdentifier": "t_uint224",
760
- "typeString": "uint224"
761
- }
762
- },
763
- "value": null,
764
- "visibility": "internal"
765
- },
766
- {
767
- "constant": false,
768
- "id": 7292,
769
- "name": "T",
770
- "nodeType": "VariableDeclaration",
771
- "scope": 7294,
772
- "src": "616:8:34",
773
- "stateVariable": false,
774
- "storageLocation": "default",
775
- "typeDescriptions": {
776
- "typeIdentifier": "t_uint32",
777
- "typeString": "uint32"
778
- },
779
- "typeName": {
780
- "id": 7291,
781
- "name": "uint32",
782
- "nodeType": "ElementaryTypeName",
783
- "src": "616:6:34",
784
- "typeDescriptions": {
785
- "typeIdentifier": "t_uint32",
786
- "typeString": "uint32"
787
- }
788
- },
789
- "value": null,
790
- "visibility": "internal"
791
- }
792
- ],
793
- "src": "600:25:34"
794
- },
795
- "scope": 7295,
796
- "src": "541:85:34",
797
- "stateMutability": "nonpayable",
798
- "superFunction": null,
799
- "visibility": "external"
800
- }
801
- ],
802
- "scope": 7296,
803
- "src": "28:601:34"
804
- }
805
- ],
806
- "src": "0:629:34"
807
- },
808
- "legacyAST": {
809
- "absolutePath": "/C/Users/simor/Desktop/impermax-x-uniswapv2-periphery/test/Contracts/simple-uniswap-oracle/interfaces/ISimpleUniswapOracle.sol",
810
- "exportedSymbols": {
811
- "ISimpleUniswapOracle": [
812
- 7295
813
- ]
814
- },
815
- "id": 7296,
816
- "nodeType": "SourceUnit",
817
- "nodes": [
818
- {
819
- "id": 7243,
820
- "literals": [
821
- "solidity",
822
- "=",
823
- "0.5",
824
- ".16"
825
- ],
826
- "nodeType": "PragmaDirective",
827
- "src": "0:24:34"
828
- },
829
- {
830
- "baseContracts": [],
831
- "contractDependencies": [],
832
- "contractKind": "interface",
833
- "documentation": null,
834
- "fullyImplemented": false,
835
- "id": 7295,
836
- "linearizedBaseContracts": [
837
- 7295
838
- ],
839
- "name": "ISimpleUniswapOracle",
840
- "nodeType": "ContractDefinition",
841
- "nodes": [
842
- {
843
- "anonymous": false,
844
- "documentation": null,
845
- "id": 7253,
846
- "name": "PriceUpdate",
847
- "nodeType": "EventDefinition",
848
- "parameters": {
849
- "id": 7252,
850
- "nodeType": "ParameterList",
851
- "parameters": [
852
- {
853
- "constant": false,
854
- "id": 7245,
855
- "indexed": true,
856
- "name": "pair",
857
- "nodeType": "VariableDeclaration",
858
- "scope": 7253,
859
- "src": "81:20:34",
860
- "stateVariable": false,
861
- "storageLocation": "default",
862
- "typeDescriptions": {
863
- "typeIdentifier": "t_address",
864
- "typeString": "address"
865
- },
866
- "typeName": {
867
- "id": 7244,
868
- "name": "address",
869
- "nodeType": "ElementaryTypeName",
870
- "src": "81:7:34",
871
- "stateMutability": "nonpayable",
872
- "typeDescriptions": {
873
- "typeIdentifier": "t_address",
874
- "typeString": "address"
875
- }
876
- },
877
- "value": null,
878
- "visibility": "internal"
879
- },
880
- {
881
- "constant": false,
882
- "id": 7247,
883
- "indexed": false,
884
- "name": "priceCumulative",
885
- "nodeType": "VariableDeclaration",
886
- "scope": 7253,
887
- "src": "103:23:34",
888
- "stateVariable": false,
889
- "storageLocation": "default",
890
- "typeDescriptions": {
891
- "typeIdentifier": "t_uint256",
892
- "typeString": "uint256"
893
- },
894
- "typeName": {
895
- "id": 7246,
896
- "name": "uint256",
897
- "nodeType": "ElementaryTypeName",
898
- "src": "103:7:34",
899
- "typeDescriptions": {
900
- "typeIdentifier": "t_uint256",
901
- "typeString": "uint256"
902
- }
903
- },
904
- "value": null,
905
- "visibility": "internal"
906
- },
907
- {
908
- "constant": false,
909
- "id": 7249,
910
- "indexed": false,
911
- "name": "blockTimestamp",
912
- "nodeType": "VariableDeclaration",
913
- "scope": 7253,
914
- "src": "128:21:34",
915
- "stateVariable": false,
916
- "storageLocation": "default",
917
- "typeDescriptions": {
918
- "typeIdentifier": "t_uint32",
919
- "typeString": "uint32"
920
- },
921
- "typeName": {
922
- "id": 7248,
923
- "name": "uint32",
924
- "nodeType": "ElementaryTypeName",
925
- "src": "128:6:34",
926
- "typeDescriptions": {
927
- "typeIdentifier": "t_uint32",
928
- "typeString": "uint32"
929
- }
930
- },
931
- "value": null,
932
- "visibility": "internal"
933
- },
934
- {
935
- "constant": false,
936
- "id": 7251,
937
- "indexed": false,
938
- "name": "lastIsA",
939
- "nodeType": "VariableDeclaration",
940
- "scope": 7253,
941
- "src": "151:12:34",
942
- "stateVariable": false,
943
- "storageLocation": "default",
944
- "typeDescriptions": {
945
- "typeIdentifier": "t_bool",
946
- "typeString": "bool"
947
- },
948
- "typeName": {
949
- "id": 7250,
950
- "name": "bool",
951
- "nodeType": "ElementaryTypeName",
952
- "src": "151:4:34",
953
- "typeDescriptions": {
954
- "typeIdentifier": "t_bool",
955
- "typeString": "bool"
956
- }
957
- },
958
- "value": null,
959
- "visibility": "internal"
960
- }
961
- ],
962
- "src": "80:84:34"
963
- },
964
- "src": "63:102:34"
965
- },
966
- {
967
- "body": null,
968
- "documentation": null,
969
- "id": 7258,
970
- "implemented": false,
971
- "kind": "function",
972
- "modifiers": [],
973
- "name": "MIN_T",
974
- "nodeType": "FunctionDefinition",
975
- "parameters": {
976
- "id": 7254,
977
- "nodeType": "ParameterList",
978
- "parameters": [],
979
- "src": "182:2:34"
980
- },
981
- "returnParameters": {
982
- "id": 7257,
983
- "nodeType": "ParameterList",
984
- "parameters": [
985
- {
986
- "constant": false,
987
- "id": 7256,
988
- "name": "",
989
- "nodeType": "VariableDeclaration",
990
- "scope": 7258,
991
- "src": "208:6:34",
992
- "stateVariable": false,
993
- "storageLocation": "default",
994
- "typeDescriptions": {
995
- "typeIdentifier": "t_uint32",
996
- "typeString": "uint32"
997
- },
998
- "typeName": {
999
- "id": 7255,
1000
- "name": "uint32",
1001
- "nodeType": "ElementaryTypeName",
1002
- "src": "208:6:34",
1003
- "typeDescriptions": {
1004
- "typeIdentifier": "t_uint32",
1005
- "typeString": "uint32"
1006
- }
1007
- },
1008
- "value": null,
1009
- "visibility": "internal"
1010
- }
1011
- ],
1012
- "src": "207:8:34"
1013
- },
1014
- "scope": 7295,
1015
- "src": "168:48:34",
1016
- "stateMutability": "pure",
1017
- "superFunction": null,
1018
- "visibility": "external"
1019
- },
1020
- {
1021
- "body": null,
1022
- "documentation": null,
1023
- "id": 7263,
1024
- "implemented": false,
1025
- "kind": "function",
1026
- "modifiers": [],
1027
- "name": "getBlockTimestamp",
1028
- "nodeType": "FunctionDefinition",
1029
- "parameters": {
1030
- "id": 7259,
1031
- "nodeType": "ParameterList",
1032
- "parameters": [],
1033
- "src": "245:2:34"
1034
- },
1035
- "returnParameters": {
1036
- "id": 7262,
1037
- "nodeType": "ParameterList",
1038
- "parameters": [
1039
- {
1040
- "constant": false,
1041
- "id": 7261,
1042
- "name": "",
1043
- "nodeType": "VariableDeclaration",
1044
- "scope": 7263,
1045
- "src": "271:6:34",
1046
- "stateVariable": false,
1047
- "storageLocation": "default",
1048
- "typeDescriptions": {
1049
- "typeIdentifier": "t_uint32",
1050
- "typeString": "uint32"
1051
- },
1052
- "typeName": {
1053
- "id": 7260,
1054
- "name": "uint32",
1055
- "nodeType": "ElementaryTypeName",
1056
- "src": "271:6:34",
1057
- "typeDescriptions": {
1058
- "typeIdentifier": "t_uint32",
1059
- "typeString": "uint32"
1060
- }
1061
- },
1062
- "value": null,
1063
- "visibility": "internal"
1064
- }
1065
- ],
1066
- "src": "270:8:34"
1067
- },
1068
- "scope": 7295,
1069
- "src": "219:60:34",
1070
- "stateMutability": "view",
1071
- "superFunction": null,
1072
- "visibility": "external"
1073
- },
1074
- {
1075
- "body": null,
1076
- "documentation": null,
1077
- "id": 7280,
1078
- "implemented": false,
1079
- "kind": "function",
1080
- "modifiers": [],
1081
- "name": "getPair",
1082
- "nodeType": "FunctionDefinition",
1083
- "parameters": {
1084
- "id": 7266,
1085
- "nodeType": "ParameterList",
1086
- "parameters": [
1087
- {
1088
- "constant": false,
1089
- "id": 7265,
1090
- "name": "uniswapV2Pair",
1091
- "nodeType": "VariableDeclaration",
1092
- "scope": 7280,
1093
- "src": "299:21:34",
1094
- "stateVariable": false,
1095
- "storageLocation": "default",
1096
- "typeDescriptions": {
1097
- "typeIdentifier": "t_address",
1098
- "typeString": "address"
1099
- },
1100
- "typeName": {
1101
- "id": 7264,
1102
- "name": "address",
1103
- "nodeType": "ElementaryTypeName",
1104
- "src": "299:7:34",
1105
- "stateMutability": "nonpayable",
1106
- "typeDescriptions": {
1107
- "typeIdentifier": "t_address",
1108
- "typeString": "address"
1109
- }
1110
- },
1111
- "value": null,
1112
- "visibility": "internal"
1113
- }
1114
- ],
1115
- "src": "298:23:34"
1116
- },
1117
- "returnParameters": {
1118
- "id": 7279,
1119
- "nodeType": "ParameterList",
1120
- "parameters": [
1121
- {
1122
- "constant": false,
1123
- "id": 7268,
1124
- "name": "priceCumulativeA",
1125
- "nodeType": "VariableDeclaration",
1126
- "scope": 7280,
1127
- "src": "349:24:34",
1128
- "stateVariable": false,
1129
- "storageLocation": "default",
1130
- "typeDescriptions": {
1131
- "typeIdentifier": "t_uint256",
1132
- "typeString": "uint256"
1133
- },
1134
- "typeName": {
1135
- "id": 7267,
1136
- "name": "uint256",
1137
- "nodeType": "ElementaryTypeName",
1138
- "src": "349:7:34",
1139
- "typeDescriptions": {
1140
- "typeIdentifier": "t_uint256",
1141
- "typeString": "uint256"
1142
- }
1143
- },
1144
- "value": null,
1145
- "visibility": "internal"
1146
- },
1147
- {
1148
- "constant": false,
1149
- "id": 7270,
1150
- "name": "priceCumulativeB",
1151
- "nodeType": "VariableDeclaration",
1152
- "scope": 7280,
1153
- "src": "378:24:34",
1154
- "stateVariable": false,
1155
- "storageLocation": "default",
1156
- "typeDescriptions": {
1157
- "typeIdentifier": "t_uint256",
1158
- "typeString": "uint256"
1159
- },
1160
- "typeName": {
1161
- "id": 7269,
1162
- "name": "uint256",
1163
- "nodeType": "ElementaryTypeName",
1164
- "src": "378:7:34",
1165
- "typeDescriptions": {
1166
- "typeIdentifier": "t_uint256",
1167
- "typeString": "uint256"
1168
- }
1169
- },
1170
- "value": null,
1171
- "visibility": "internal"
1172
- },
1173
- {
1174
- "constant": false,
1175
- "id": 7272,
1176
- "name": "updateA",
1177
- "nodeType": "VariableDeclaration",
1178
- "scope": 7280,
1179
- "src": "407:14:34",
1180
- "stateVariable": false,
1181
- "storageLocation": "default",
1182
- "typeDescriptions": {
1183
- "typeIdentifier": "t_uint32",
1184
- "typeString": "uint32"
1185
- },
1186
- "typeName": {
1187
- "id": 7271,
1188
- "name": "uint32",
1189
- "nodeType": "ElementaryTypeName",
1190
- "src": "407:6:34",
1191
- "typeDescriptions": {
1192
- "typeIdentifier": "t_uint32",
1193
- "typeString": "uint32"
1194
- }
1195
- },
1196
- "value": null,
1197
- "visibility": "internal"
1198
- },
1199
- {
1200
- "constant": false,
1201
- "id": 7274,
1202
- "name": "updateB",
1203
- "nodeType": "VariableDeclaration",
1204
- "scope": 7280,
1205
- "src": "426:14:34",
1206
- "stateVariable": false,
1207
- "storageLocation": "default",
1208
- "typeDescriptions": {
1209
- "typeIdentifier": "t_uint32",
1210
- "typeString": "uint32"
1211
- },
1212
- "typeName": {
1213
- "id": 7273,
1214
- "name": "uint32",
1215
- "nodeType": "ElementaryTypeName",
1216
- "src": "426:6:34",
1217
- "typeDescriptions": {
1218
- "typeIdentifier": "t_uint32",
1219
- "typeString": "uint32"
1220
- }
1221
- },
1222
- "value": null,
1223
- "visibility": "internal"
1224
- },
1225
- {
1226
- "constant": false,
1227
- "id": 7276,
1228
- "name": "lastIsA",
1229
- "nodeType": "VariableDeclaration",
1230
- "scope": 7280,
1231
- "src": "445:12:34",
1232
- "stateVariable": false,
1233
- "storageLocation": "default",
1234
- "typeDescriptions": {
1235
- "typeIdentifier": "t_bool",
1236
- "typeString": "bool"
1237
- },
1238
- "typeName": {
1239
- "id": 7275,
1240
- "name": "bool",
1241
- "nodeType": "ElementaryTypeName",
1242
- "src": "445:4:34",
1243
- "typeDescriptions": {
1244
- "typeIdentifier": "t_bool",
1245
- "typeString": "bool"
1246
- }
1247
- },
1248
- "value": null,
1249
- "visibility": "internal"
1250
- },
1251
- {
1252
- "constant": false,
1253
- "id": 7278,
1254
- "name": "initialized",
1255
- "nodeType": "VariableDeclaration",
1256
- "scope": 7280,
1257
- "src": "462:16:34",
1258
- "stateVariable": false,
1259
- "storageLocation": "default",
1260
- "typeDescriptions": {
1261
- "typeIdentifier": "t_bool",
1262
- "typeString": "bool"
1263
- },
1264
- "typeName": {
1265
- "id": 7277,
1266
- "name": "bool",
1267
- "nodeType": "ElementaryTypeName",
1268
- "src": "462:4:34",
1269
- "typeDescriptions": {
1270
- "typeIdentifier": "t_bool",
1271
- "typeString": "bool"
1272
- }
1273
- },
1274
- "value": null,
1275
- "visibility": "internal"
1276
- }
1277
- ],
1278
- "src": "344:138:34"
1279
- },
1280
- "scope": 7295,
1281
- "src": "282:201:34",
1282
- "stateMutability": "view",
1283
- "superFunction": null,
1284
- "visibility": "external"
1285
- },
1286
- {
1287
- "body": null,
1288
- "documentation": null,
1289
- "id": 7285,
1290
- "implemented": false,
1291
- "kind": "function",
1292
- "modifiers": [],
1293
- "name": "initialize",
1294
- "nodeType": "FunctionDefinition",
1295
- "parameters": {
1296
- "id": 7283,
1297
- "nodeType": "ParameterList",
1298
- "parameters": [
1299
- {
1300
- "constant": false,
1301
- "id": 7282,
1302
- "name": "uniswapV2Pair",
1303
- "nodeType": "VariableDeclaration",
1304
- "scope": 7285,
1305
- "src": "506:21:34",
1306
- "stateVariable": false,
1307
- "storageLocation": "default",
1308
- "typeDescriptions": {
1309
- "typeIdentifier": "t_address",
1310
- "typeString": "address"
1311
- },
1312
- "typeName": {
1313
- "id": 7281,
1314
- "name": "address",
1315
- "nodeType": "ElementaryTypeName",
1316
- "src": "506:7:34",
1317
- "stateMutability": "nonpayable",
1318
- "typeDescriptions": {
1319
- "typeIdentifier": "t_address",
1320
- "typeString": "address"
1321
- }
1322
- },
1323
- "value": null,
1324
- "visibility": "internal"
1325
- }
1326
- ],
1327
- "src": "505:23:34"
1328
- },
1329
- "returnParameters": {
1330
- "id": 7284,
1331
- "nodeType": "ParameterList",
1332
- "parameters": [],
1333
- "src": "537:0:34"
1334
- },
1335
- "scope": 7295,
1336
- "src": "486:52:34",
1337
- "stateMutability": "nonpayable",
1338
- "superFunction": null,
1339
- "visibility": "external"
1340
- },
1341
- {
1342
- "body": null,
1343
- "documentation": null,
1344
- "id": 7294,
1345
- "implemented": false,
1346
- "kind": "function",
1347
- "modifiers": [],
1348
- "name": "getResult",
1349
- "nodeType": "FunctionDefinition",
1350
- "parameters": {
1351
- "id": 7288,
1352
- "nodeType": "ParameterList",
1353
- "parameters": [
1354
- {
1355
- "constant": false,
1356
- "id": 7287,
1357
- "name": "uniswapV2Pair",
1358
- "nodeType": "VariableDeclaration",
1359
- "scope": 7294,
1360
- "src": "560:21:34",
1361
- "stateVariable": false,
1362
- "storageLocation": "default",
1363
- "typeDescriptions": {
1364
- "typeIdentifier": "t_address",
1365
- "typeString": "address"
1366
- },
1367
- "typeName": {
1368
- "id": 7286,
1369
- "name": "address",
1370
- "nodeType": "ElementaryTypeName",
1371
- "src": "560:7:34",
1372
- "stateMutability": "nonpayable",
1373
- "typeDescriptions": {
1374
- "typeIdentifier": "t_address",
1375
- "typeString": "address"
1376
- }
1377
- },
1378
- "value": null,
1379
- "visibility": "internal"
1380
- }
1381
- ],
1382
- "src": "559:23:34"
1383
- },
1384
- "returnParameters": {
1385
- "id": 7293,
1386
- "nodeType": "ParameterList",
1387
- "parameters": [
1388
- {
1389
- "constant": false,
1390
- "id": 7290,
1391
- "name": "price",
1392
- "nodeType": "VariableDeclaration",
1393
- "scope": 7294,
1394
- "src": "601:13:34",
1395
- "stateVariable": false,
1396
- "storageLocation": "default",
1397
- "typeDescriptions": {
1398
- "typeIdentifier": "t_uint224",
1399
- "typeString": "uint224"
1400
- },
1401
- "typeName": {
1402
- "id": 7289,
1403
- "name": "uint224",
1404
- "nodeType": "ElementaryTypeName",
1405
- "src": "601:7:34",
1406
- "typeDescriptions": {
1407
- "typeIdentifier": "t_uint224",
1408
- "typeString": "uint224"
1409
- }
1410
- },
1411
- "value": null,
1412
- "visibility": "internal"
1413
- },
1414
- {
1415
- "constant": false,
1416
- "id": 7292,
1417
- "name": "T",
1418
- "nodeType": "VariableDeclaration",
1419
- "scope": 7294,
1420
- "src": "616:8:34",
1421
- "stateVariable": false,
1422
- "storageLocation": "default",
1423
- "typeDescriptions": {
1424
- "typeIdentifier": "t_uint32",
1425
- "typeString": "uint32"
1426
- },
1427
- "typeName": {
1428
- "id": 7291,
1429
- "name": "uint32",
1430
- "nodeType": "ElementaryTypeName",
1431
- "src": "616:6:34",
1432
- "typeDescriptions": {
1433
- "typeIdentifier": "t_uint32",
1434
- "typeString": "uint32"
1435
- }
1436
- },
1437
- "value": null,
1438
- "visibility": "internal"
1439
- }
1440
- ],
1441
- "src": "600:25:34"
1442
- },
1443
- "scope": 7295,
1444
- "src": "541:85:34",
1445
- "stateMutability": "nonpayable",
1446
- "superFunction": null,
1447
- "visibility": "external"
1448
- }
1449
- ],
1450
- "scope": 7296,
1451
- "src": "28:601:34"
1452
- }
1453
- ],
1454
- "src": "0:629:34"
1455
- },
1456
- "compiler": {
1457
- "name": "solc",
1458
- "version": "0.5.16+commit.9c3226ce.Emscripten.clang"
1459
- },
1460
- "networks": {},
1461
- "schemaVersion": "3.3.2",
1462
- "updatedAt": "2021-01-07T23:07:24.833Z",
1463
- "devdoc": {
1464
- "methods": {}
1465
- },
1466
- "userdoc": {
1467
- "methods": {}
1468
- }
1469
- }
1
+ {
2
+ "contractName": "ISimpleUniswapOracle",
3
+ "abi": [
4
+ {
5
+ "anonymous": false,
6
+ "inputs": [
7
+ {
8
+ "indexed": true,
9
+ "internalType": "address",
10
+ "name": "pair",
11
+ "type": "address"
12
+ },
13
+ {
14
+ "indexed": false,
15
+ "internalType": "uint256",
16
+ "name": "priceCumulative",
17
+ "type": "uint256"
18
+ },
19
+ {
20
+ "indexed": false,
21
+ "internalType": "uint32",
22
+ "name": "blockTimestamp",
23
+ "type": "uint32"
24
+ },
25
+ {
26
+ "indexed": false,
27
+ "internalType": "bool",
28
+ "name": "lastIsA",
29
+ "type": "bool"
30
+ }
31
+ ],
32
+ "name": "PriceUpdate",
33
+ "type": "event"
34
+ },
35
+ {
36
+ "constant": true,
37
+ "inputs": [],
38
+ "name": "MIN_T",
39
+ "outputs": [
40
+ {
41
+ "internalType": "uint32",
42
+ "name": "",
43
+ "type": "uint32"
44
+ }
45
+ ],
46
+ "payable": false,
47
+ "stateMutability": "pure",
48
+ "type": "function"
49
+ },
50
+ {
51
+ "constant": true,
52
+ "inputs": [],
53
+ "name": "getBlockTimestamp",
54
+ "outputs": [
55
+ {
56
+ "internalType": "uint32",
57
+ "name": "",
58
+ "type": "uint32"
59
+ }
60
+ ],
61
+ "payable": false,
62
+ "stateMutability": "view",
63
+ "type": "function"
64
+ },
65
+ {
66
+ "constant": true,
67
+ "inputs": [
68
+ {
69
+ "internalType": "address",
70
+ "name": "uniswapV2Pair",
71
+ "type": "address"
72
+ }
73
+ ],
74
+ "name": "getPair",
75
+ "outputs": [
76
+ {
77
+ "internalType": "uint256",
78
+ "name": "priceCumulativeA",
79
+ "type": "uint256"
80
+ },
81
+ {
82
+ "internalType": "uint256",
83
+ "name": "priceCumulativeB",
84
+ "type": "uint256"
85
+ },
86
+ {
87
+ "internalType": "uint32",
88
+ "name": "updateA",
89
+ "type": "uint32"
90
+ },
91
+ {
92
+ "internalType": "uint32",
93
+ "name": "updateB",
94
+ "type": "uint32"
95
+ },
96
+ {
97
+ "internalType": "bool",
98
+ "name": "lastIsA",
99
+ "type": "bool"
100
+ },
101
+ {
102
+ "internalType": "bool",
103
+ "name": "initialized",
104
+ "type": "bool"
105
+ }
106
+ ],
107
+ "payable": false,
108
+ "stateMutability": "view",
109
+ "type": "function"
110
+ },
111
+ {
112
+ "constant": false,
113
+ "inputs": [
114
+ {
115
+ "internalType": "address",
116
+ "name": "uniswapV2Pair",
117
+ "type": "address"
118
+ }
119
+ ],
120
+ "name": "initialize",
121
+ "outputs": [],
122
+ "payable": false,
123
+ "stateMutability": "nonpayable",
124
+ "type": "function"
125
+ },
126
+ {
127
+ "constant": false,
128
+ "inputs": [
129
+ {
130
+ "internalType": "address",
131
+ "name": "uniswapV2Pair",
132
+ "type": "address"
133
+ }
134
+ ],
135
+ "name": "getResult",
136
+ "outputs": [
137
+ {
138
+ "internalType": "uint224",
139
+ "name": "price",
140
+ "type": "uint224"
141
+ },
142
+ {
143
+ "internalType": "uint32",
144
+ "name": "T",
145
+ "type": "uint32"
146
+ }
147
+ ],
148
+ "payable": false,
149
+ "stateMutability": "nonpayable",
150
+ "type": "function"
151
+ }
152
+ ],
153
+ "metadata": "{\"compiler\":{\"version\":\"0.5.16+commit.9c3226ce\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"pair\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"priceCumulative\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"blockTimestamp\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"lastIsA\",\"type\":\"bool\"}],\"name\":\"PriceUpdate\",\"type\":\"event\"},{\"constant\":true,\"inputs\":[],\"name\":\"MIN_T\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"payable\":false,\"stateMutability\":\"pure\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"getBlockTimestamp\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"uniswapV2Pair\",\"type\":\"address\"}],\"name\":\"getPair\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"priceCumulativeA\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"priceCumulativeB\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"updateA\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"updateB\",\"type\":\"uint32\"},{\"internalType\":\"bool\",\"name\":\"lastIsA\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"initialized\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"uniswapV2Pair\",\"type\":\"address\"}],\"name\":\"getResult\",\"outputs\":[{\"internalType\":\"uint224\",\"name\":\"price\",\"type\":\"uint224\"},{\"internalType\":\"uint32\",\"name\":\"T\",\"type\":\"uint32\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"uniswapV2Pair\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"methods\":{}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"/C/Users/simor/Desktop/impermax-x-uniswapv2-periphery/test/Contracts/simple-uniswap-oracle/interfaces/ISimpleUniswapOracle.sol\":\"ISimpleUniswapOracle\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"/C/Users/simor/Desktop/impermax-x-uniswapv2-periphery/test/Contracts/simple-uniswap-oracle/interfaces/ISimpleUniswapOracle.sol\":{\"keccak256\":\"0x1a8af485a21bd316cb483235a58e17c0b6e54399162a97327e4a2c5d151fd634\",\"urls\":[\"bzz-raw://f3456d9576cb0959a844d2d42837a54bb7f022cceba928305267f85745e89e44\",\"dweb:/ipfs/QmVmuDNdAMUXwgaA94ukRwwXNHJWf43zLXqBXBVepfZTLx\"]}},\"version\":1}",
154
+ "bytecode": "0x",
155
+ "deployedBytecode": "0x",
156
+ "sourceMap": "",
157
+ "deployedSourceMap": "",
158
+ "source": "pragma solidity =0.5.16;\r\n\r\ninterface ISimpleUniswapOracle {\r\n\tevent PriceUpdate(address indexed pair, uint256 priceCumulative, uint32 blockTimestamp, bool lastIsA);\r\n\tfunction MIN_T() external pure returns (uint32);\r\n\tfunction getBlockTimestamp() external view returns (uint32);\r\n\tfunction getPair(address uniswapV2Pair) external view returns (\r\n\t\tuint256 priceCumulativeA,\r\n\t\tuint256 priceCumulativeB,\r\n\t\tuint32 updateA,\r\n\t\tuint32 updateB,\r\n\t\tbool lastIsA,\r\n\t\tbool initialized\r\n\t);\r\n\tfunction initialize(address uniswapV2Pair) external;\r\n\tfunction getResult(address uniswapV2Pair) external returns (uint224 price, uint32 T);\r\n}",
159
+ "sourcePath": "C:\\Users\\simor\\Desktop\\impermax-x-uniswapv2-periphery\\test\\Contracts\\simple-uniswap-oracle\\interfaces\\ISimpleUniswapOracle.sol",
160
+ "ast": {
161
+ "absolutePath": "/C/Users/simor/Desktop/impermax-x-uniswapv2-periphery/test/Contracts/simple-uniswap-oracle/interfaces/ISimpleUniswapOracle.sol",
162
+ "exportedSymbols": {
163
+ "ISimpleUniswapOracle": [
164
+ 7295
165
+ ]
166
+ },
167
+ "id": 7296,
168
+ "nodeType": "SourceUnit",
169
+ "nodes": [
170
+ {
171
+ "id": 7243,
172
+ "literals": [
173
+ "solidity",
174
+ "=",
175
+ "0.5",
176
+ ".16"
177
+ ],
178
+ "nodeType": "PragmaDirective",
179
+ "src": "0:24:34"
180
+ },
181
+ {
182
+ "baseContracts": [],
183
+ "contractDependencies": [],
184
+ "contractKind": "interface",
185
+ "documentation": null,
186
+ "fullyImplemented": false,
187
+ "id": 7295,
188
+ "linearizedBaseContracts": [
189
+ 7295
190
+ ],
191
+ "name": "ISimpleUniswapOracle",
192
+ "nodeType": "ContractDefinition",
193
+ "nodes": [
194
+ {
195
+ "anonymous": false,
196
+ "documentation": null,
197
+ "id": 7253,
198
+ "name": "PriceUpdate",
199
+ "nodeType": "EventDefinition",
200
+ "parameters": {
201
+ "id": 7252,
202
+ "nodeType": "ParameterList",
203
+ "parameters": [
204
+ {
205
+ "constant": false,
206
+ "id": 7245,
207
+ "indexed": true,
208
+ "name": "pair",
209
+ "nodeType": "VariableDeclaration",
210
+ "scope": 7253,
211
+ "src": "81:20:34",
212
+ "stateVariable": false,
213
+ "storageLocation": "default",
214
+ "typeDescriptions": {
215
+ "typeIdentifier": "t_address",
216
+ "typeString": "address"
217
+ },
218
+ "typeName": {
219
+ "id": 7244,
220
+ "name": "address",
221
+ "nodeType": "ElementaryTypeName",
222
+ "src": "81:7:34",
223
+ "stateMutability": "nonpayable",
224
+ "typeDescriptions": {
225
+ "typeIdentifier": "t_address",
226
+ "typeString": "address"
227
+ }
228
+ },
229
+ "value": null,
230
+ "visibility": "internal"
231
+ },
232
+ {
233
+ "constant": false,
234
+ "id": 7247,
235
+ "indexed": false,
236
+ "name": "priceCumulative",
237
+ "nodeType": "VariableDeclaration",
238
+ "scope": 7253,
239
+ "src": "103:23:34",
240
+ "stateVariable": false,
241
+ "storageLocation": "default",
242
+ "typeDescriptions": {
243
+ "typeIdentifier": "t_uint256",
244
+ "typeString": "uint256"
245
+ },
246
+ "typeName": {
247
+ "id": 7246,
248
+ "name": "uint256",
249
+ "nodeType": "ElementaryTypeName",
250
+ "src": "103:7:34",
251
+ "typeDescriptions": {
252
+ "typeIdentifier": "t_uint256",
253
+ "typeString": "uint256"
254
+ }
255
+ },
256
+ "value": null,
257
+ "visibility": "internal"
258
+ },
259
+ {
260
+ "constant": false,
261
+ "id": 7249,
262
+ "indexed": false,
263
+ "name": "blockTimestamp",
264
+ "nodeType": "VariableDeclaration",
265
+ "scope": 7253,
266
+ "src": "128:21:34",
267
+ "stateVariable": false,
268
+ "storageLocation": "default",
269
+ "typeDescriptions": {
270
+ "typeIdentifier": "t_uint32",
271
+ "typeString": "uint32"
272
+ },
273
+ "typeName": {
274
+ "id": 7248,
275
+ "name": "uint32",
276
+ "nodeType": "ElementaryTypeName",
277
+ "src": "128:6:34",
278
+ "typeDescriptions": {
279
+ "typeIdentifier": "t_uint32",
280
+ "typeString": "uint32"
281
+ }
282
+ },
283
+ "value": null,
284
+ "visibility": "internal"
285
+ },
286
+ {
287
+ "constant": false,
288
+ "id": 7251,
289
+ "indexed": false,
290
+ "name": "lastIsA",
291
+ "nodeType": "VariableDeclaration",
292
+ "scope": 7253,
293
+ "src": "151:12:34",
294
+ "stateVariable": false,
295
+ "storageLocation": "default",
296
+ "typeDescriptions": {
297
+ "typeIdentifier": "t_bool",
298
+ "typeString": "bool"
299
+ },
300
+ "typeName": {
301
+ "id": 7250,
302
+ "name": "bool",
303
+ "nodeType": "ElementaryTypeName",
304
+ "src": "151:4:34",
305
+ "typeDescriptions": {
306
+ "typeIdentifier": "t_bool",
307
+ "typeString": "bool"
308
+ }
309
+ },
310
+ "value": null,
311
+ "visibility": "internal"
312
+ }
313
+ ],
314
+ "src": "80:84:34"
315
+ },
316
+ "src": "63:102:34"
317
+ },
318
+ {
319
+ "body": null,
320
+ "documentation": null,
321
+ "id": 7258,
322
+ "implemented": false,
323
+ "kind": "function",
324
+ "modifiers": [],
325
+ "name": "MIN_T",
326
+ "nodeType": "FunctionDefinition",
327
+ "parameters": {
328
+ "id": 7254,
329
+ "nodeType": "ParameterList",
330
+ "parameters": [],
331
+ "src": "182:2:34"
332
+ },
333
+ "returnParameters": {
334
+ "id": 7257,
335
+ "nodeType": "ParameterList",
336
+ "parameters": [
337
+ {
338
+ "constant": false,
339
+ "id": 7256,
340
+ "name": "",
341
+ "nodeType": "VariableDeclaration",
342
+ "scope": 7258,
343
+ "src": "208:6:34",
344
+ "stateVariable": false,
345
+ "storageLocation": "default",
346
+ "typeDescriptions": {
347
+ "typeIdentifier": "t_uint32",
348
+ "typeString": "uint32"
349
+ },
350
+ "typeName": {
351
+ "id": 7255,
352
+ "name": "uint32",
353
+ "nodeType": "ElementaryTypeName",
354
+ "src": "208:6:34",
355
+ "typeDescriptions": {
356
+ "typeIdentifier": "t_uint32",
357
+ "typeString": "uint32"
358
+ }
359
+ },
360
+ "value": null,
361
+ "visibility": "internal"
362
+ }
363
+ ],
364
+ "src": "207:8:34"
365
+ },
366
+ "scope": 7295,
367
+ "src": "168:48:34",
368
+ "stateMutability": "pure",
369
+ "superFunction": null,
370
+ "visibility": "external"
371
+ },
372
+ {
373
+ "body": null,
374
+ "documentation": null,
375
+ "id": 7263,
376
+ "implemented": false,
377
+ "kind": "function",
378
+ "modifiers": [],
379
+ "name": "getBlockTimestamp",
380
+ "nodeType": "FunctionDefinition",
381
+ "parameters": {
382
+ "id": 7259,
383
+ "nodeType": "ParameterList",
384
+ "parameters": [],
385
+ "src": "245:2:34"
386
+ },
387
+ "returnParameters": {
388
+ "id": 7262,
389
+ "nodeType": "ParameterList",
390
+ "parameters": [
391
+ {
392
+ "constant": false,
393
+ "id": 7261,
394
+ "name": "",
395
+ "nodeType": "VariableDeclaration",
396
+ "scope": 7263,
397
+ "src": "271:6:34",
398
+ "stateVariable": false,
399
+ "storageLocation": "default",
400
+ "typeDescriptions": {
401
+ "typeIdentifier": "t_uint32",
402
+ "typeString": "uint32"
403
+ },
404
+ "typeName": {
405
+ "id": 7260,
406
+ "name": "uint32",
407
+ "nodeType": "ElementaryTypeName",
408
+ "src": "271:6:34",
409
+ "typeDescriptions": {
410
+ "typeIdentifier": "t_uint32",
411
+ "typeString": "uint32"
412
+ }
413
+ },
414
+ "value": null,
415
+ "visibility": "internal"
416
+ }
417
+ ],
418
+ "src": "270:8:34"
419
+ },
420
+ "scope": 7295,
421
+ "src": "219:60:34",
422
+ "stateMutability": "view",
423
+ "superFunction": null,
424
+ "visibility": "external"
425
+ },
426
+ {
427
+ "body": null,
428
+ "documentation": null,
429
+ "id": 7280,
430
+ "implemented": false,
431
+ "kind": "function",
432
+ "modifiers": [],
433
+ "name": "getPair",
434
+ "nodeType": "FunctionDefinition",
435
+ "parameters": {
436
+ "id": 7266,
437
+ "nodeType": "ParameterList",
438
+ "parameters": [
439
+ {
440
+ "constant": false,
441
+ "id": 7265,
442
+ "name": "uniswapV2Pair",
443
+ "nodeType": "VariableDeclaration",
444
+ "scope": 7280,
445
+ "src": "299:21:34",
446
+ "stateVariable": false,
447
+ "storageLocation": "default",
448
+ "typeDescriptions": {
449
+ "typeIdentifier": "t_address",
450
+ "typeString": "address"
451
+ },
452
+ "typeName": {
453
+ "id": 7264,
454
+ "name": "address",
455
+ "nodeType": "ElementaryTypeName",
456
+ "src": "299:7:34",
457
+ "stateMutability": "nonpayable",
458
+ "typeDescriptions": {
459
+ "typeIdentifier": "t_address",
460
+ "typeString": "address"
461
+ }
462
+ },
463
+ "value": null,
464
+ "visibility": "internal"
465
+ }
466
+ ],
467
+ "src": "298:23:34"
468
+ },
469
+ "returnParameters": {
470
+ "id": 7279,
471
+ "nodeType": "ParameterList",
472
+ "parameters": [
473
+ {
474
+ "constant": false,
475
+ "id": 7268,
476
+ "name": "priceCumulativeA",
477
+ "nodeType": "VariableDeclaration",
478
+ "scope": 7280,
479
+ "src": "349:24:34",
480
+ "stateVariable": false,
481
+ "storageLocation": "default",
482
+ "typeDescriptions": {
483
+ "typeIdentifier": "t_uint256",
484
+ "typeString": "uint256"
485
+ },
486
+ "typeName": {
487
+ "id": 7267,
488
+ "name": "uint256",
489
+ "nodeType": "ElementaryTypeName",
490
+ "src": "349:7:34",
491
+ "typeDescriptions": {
492
+ "typeIdentifier": "t_uint256",
493
+ "typeString": "uint256"
494
+ }
495
+ },
496
+ "value": null,
497
+ "visibility": "internal"
498
+ },
499
+ {
500
+ "constant": false,
501
+ "id": 7270,
502
+ "name": "priceCumulativeB",
503
+ "nodeType": "VariableDeclaration",
504
+ "scope": 7280,
505
+ "src": "378:24:34",
506
+ "stateVariable": false,
507
+ "storageLocation": "default",
508
+ "typeDescriptions": {
509
+ "typeIdentifier": "t_uint256",
510
+ "typeString": "uint256"
511
+ },
512
+ "typeName": {
513
+ "id": 7269,
514
+ "name": "uint256",
515
+ "nodeType": "ElementaryTypeName",
516
+ "src": "378:7:34",
517
+ "typeDescriptions": {
518
+ "typeIdentifier": "t_uint256",
519
+ "typeString": "uint256"
520
+ }
521
+ },
522
+ "value": null,
523
+ "visibility": "internal"
524
+ },
525
+ {
526
+ "constant": false,
527
+ "id": 7272,
528
+ "name": "updateA",
529
+ "nodeType": "VariableDeclaration",
530
+ "scope": 7280,
531
+ "src": "407:14:34",
532
+ "stateVariable": false,
533
+ "storageLocation": "default",
534
+ "typeDescriptions": {
535
+ "typeIdentifier": "t_uint32",
536
+ "typeString": "uint32"
537
+ },
538
+ "typeName": {
539
+ "id": 7271,
540
+ "name": "uint32",
541
+ "nodeType": "ElementaryTypeName",
542
+ "src": "407:6:34",
543
+ "typeDescriptions": {
544
+ "typeIdentifier": "t_uint32",
545
+ "typeString": "uint32"
546
+ }
547
+ },
548
+ "value": null,
549
+ "visibility": "internal"
550
+ },
551
+ {
552
+ "constant": false,
553
+ "id": 7274,
554
+ "name": "updateB",
555
+ "nodeType": "VariableDeclaration",
556
+ "scope": 7280,
557
+ "src": "426:14:34",
558
+ "stateVariable": false,
559
+ "storageLocation": "default",
560
+ "typeDescriptions": {
561
+ "typeIdentifier": "t_uint32",
562
+ "typeString": "uint32"
563
+ },
564
+ "typeName": {
565
+ "id": 7273,
566
+ "name": "uint32",
567
+ "nodeType": "ElementaryTypeName",
568
+ "src": "426:6:34",
569
+ "typeDescriptions": {
570
+ "typeIdentifier": "t_uint32",
571
+ "typeString": "uint32"
572
+ }
573
+ },
574
+ "value": null,
575
+ "visibility": "internal"
576
+ },
577
+ {
578
+ "constant": false,
579
+ "id": 7276,
580
+ "name": "lastIsA",
581
+ "nodeType": "VariableDeclaration",
582
+ "scope": 7280,
583
+ "src": "445:12:34",
584
+ "stateVariable": false,
585
+ "storageLocation": "default",
586
+ "typeDescriptions": {
587
+ "typeIdentifier": "t_bool",
588
+ "typeString": "bool"
589
+ },
590
+ "typeName": {
591
+ "id": 7275,
592
+ "name": "bool",
593
+ "nodeType": "ElementaryTypeName",
594
+ "src": "445:4:34",
595
+ "typeDescriptions": {
596
+ "typeIdentifier": "t_bool",
597
+ "typeString": "bool"
598
+ }
599
+ },
600
+ "value": null,
601
+ "visibility": "internal"
602
+ },
603
+ {
604
+ "constant": false,
605
+ "id": 7278,
606
+ "name": "initialized",
607
+ "nodeType": "VariableDeclaration",
608
+ "scope": 7280,
609
+ "src": "462:16:34",
610
+ "stateVariable": false,
611
+ "storageLocation": "default",
612
+ "typeDescriptions": {
613
+ "typeIdentifier": "t_bool",
614
+ "typeString": "bool"
615
+ },
616
+ "typeName": {
617
+ "id": 7277,
618
+ "name": "bool",
619
+ "nodeType": "ElementaryTypeName",
620
+ "src": "462:4:34",
621
+ "typeDescriptions": {
622
+ "typeIdentifier": "t_bool",
623
+ "typeString": "bool"
624
+ }
625
+ },
626
+ "value": null,
627
+ "visibility": "internal"
628
+ }
629
+ ],
630
+ "src": "344:138:34"
631
+ },
632
+ "scope": 7295,
633
+ "src": "282:201:34",
634
+ "stateMutability": "view",
635
+ "superFunction": null,
636
+ "visibility": "external"
637
+ },
638
+ {
639
+ "body": null,
640
+ "documentation": null,
641
+ "id": 7285,
642
+ "implemented": false,
643
+ "kind": "function",
644
+ "modifiers": [],
645
+ "name": "initialize",
646
+ "nodeType": "FunctionDefinition",
647
+ "parameters": {
648
+ "id": 7283,
649
+ "nodeType": "ParameterList",
650
+ "parameters": [
651
+ {
652
+ "constant": false,
653
+ "id": 7282,
654
+ "name": "uniswapV2Pair",
655
+ "nodeType": "VariableDeclaration",
656
+ "scope": 7285,
657
+ "src": "506:21:34",
658
+ "stateVariable": false,
659
+ "storageLocation": "default",
660
+ "typeDescriptions": {
661
+ "typeIdentifier": "t_address",
662
+ "typeString": "address"
663
+ },
664
+ "typeName": {
665
+ "id": 7281,
666
+ "name": "address",
667
+ "nodeType": "ElementaryTypeName",
668
+ "src": "506:7:34",
669
+ "stateMutability": "nonpayable",
670
+ "typeDescriptions": {
671
+ "typeIdentifier": "t_address",
672
+ "typeString": "address"
673
+ }
674
+ },
675
+ "value": null,
676
+ "visibility": "internal"
677
+ }
678
+ ],
679
+ "src": "505:23:34"
680
+ },
681
+ "returnParameters": {
682
+ "id": 7284,
683
+ "nodeType": "ParameterList",
684
+ "parameters": [],
685
+ "src": "537:0:34"
686
+ },
687
+ "scope": 7295,
688
+ "src": "486:52:34",
689
+ "stateMutability": "nonpayable",
690
+ "superFunction": null,
691
+ "visibility": "external"
692
+ },
693
+ {
694
+ "body": null,
695
+ "documentation": null,
696
+ "id": 7294,
697
+ "implemented": false,
698
+ "kind": "function",
699
+ "modifiers": [],
700
+ "name": "getResult",
701
+ "nodeType": "FunctionDefinition",
702
+ "parameters": {
703
+ "id": 7288,
704
+ "nodeType": "ParameterList",
705
+ "parameters": [
706
+ {
707
+ "constant": false,
708
+ "id": 7287,
709
+ "name": "uniswapV2Pair",
710
+ "nodeType": "VariableDeclaration",
711
+ "scope": 7294,
712
+ "src": "560:21:34",
713
+ "stateVariable": false,
714
+ "storageLocation": "default",
715
+ "typeDescriptions": {
716
+ "typeIdentifier": "t_address",
717
+ "typeString": "address"
718
+ },
719
+ "typeName": {
720
+ "id": 7286,
721
+ "name": "address",
722
+ "nodeType": "ElementaryTypeName",
723
+ "src": "560:7:34",
724
+ "stateMutability": "nonpayable",
725
+ "typeDescriptions": {
726
+ "typeIdentifier": "t_address",
727
+ "typeString": "address"
728
+ }
729
+ },
730
+ "value": null,
731
+ "visibility": "internal"
732
+ }
733
+ ],
734
+ "src": "559:23:34"
735
+ },
736
+ "returnParameters": {
737
+ "id": 7293,
738
+ "nodeType": "ParameterList",
739
+ "parameters": [
740
+ {
741
+ "constant": false,
742
+ "id": 7290,
743
+ "name": "price",
744
+ "nodeType": "VariableDeclaration",
745
+ "scope": 7294,
746
+ "src": "601:13:34",
747
+ "stateVariable": false,
748
+ "storageLocation": "default",
749
+ "typeDescriptions": {
750
+ "typeIdentifier": "t_uint224",
751
+ "typeString": "uint224"
752
+ },
753
+ "typeName": {
754
+ "id": 7289,
755
+ "name": "uint224",
756
+ "nodeType": "ElementaryTypeName",
757
+ "src": "601:7:34",
758
+ "typeDescriptions": {
759
+ "typeIdentifier": "t_uint224",
760
+ "typeString": "uint224"
761
+ }
762
+ },
763
+ "value": null,
764
+ "visibility": "internal"
765
+ },
766
+ {
767
+ "constant": false,
768
+ "id": 7292,
769
+ "name": "T",
770
+ "nodeType": "VariableDeclaration",
771
+ "scope": 7294,
772
+ "src": "616:8:34",
773
+ "stateVariable": false,
774
+ "storageLocation": "default",
775
+ "typeDescriptions": {
776
+ "typeIdentifier": "t_uint32",
777
+ "typeString": "uint32"
778
+ },
779
+ "typeName": {
780
+ "id": 7291,
781
+ "name": "uint32",
782
+ "nodeType": "ElementaryTypeName",
783
+ "src": "616:6:34",
784
+ "typeDescriptions": {
785
+ "typeIdentifier": "t_uint32",
786
+ "typeString": "uint32"
787
+ }
788
+ },
789
+ "value": null,
790
+ "visibility": "internal"
791
+ }
792
+ ],
793
+ "src": "600:25:34"
794
+ },
795
+ "scope": 7295,
796
+ "src": "541:85:34",
797
+ "stateMutability": "nonpayable",
798
+ "superFunction": null,
799
+ "visibility": "external"
800
+ }
801
+ ],
802
+ "scope": 7296,
803
+ "src": "28:601:34"
804
+ }
805
+ ],
806
+ "src": "0:629:34"
807
+ },
808
+ "legacyAST": {
809
+ "absolutePath": "/C/Users/simor/Desktop/impermax-x-uniswapv2-periphery/test/Contracts/simple-uniswap-oracle/interfaces/ISimpleUniswapOracle.sol",
810
+ "exportedSymbols": {
811
+ "ISimpleUniswapOracle": [
812
+ 7295
813
+ ]
814
+ },
815
+ "id": 7296,
816
+ "nodeType": "SourceUnit",
817
+ "nodes": [
818
+ {
819
+ "id": 7243,
820
+ "literals": [
821
+ "solidity",
822
+ "=",
823
+ "0.5",
824
+ ".16"
825
+ ],
826
+ "nodeType": "PragmaDirective",
827
+ "src": "0:24:34"
828
+ },
829
+ {
830
+ "baseContracts": [],
831
+ "contractDependencies": [],
832
+ "contractKind": "interface",
833
+ "documentation": null,
834
+ "fullyImplemented": false,
835
+ "id": 7295,
836
+ "linearizedBaseContracts": [
837
+ 7295
838
+ ],
839
+ "name": "ISimpleUniswapOracle",
840
+ "nodeType": "ContractDefinition",
841
+ "nodes": [
842
+ {
843
+ "anonymous": false,
844
+ "documentation": null,
845
+ "id": 7253,
846
+ "name": "PriceUpdate",
847
+ "nodeType": "EventDefinition",
848
+ "parameters": {
849
+ "id": 7252,
850
+ "nodeType": "ParameterList",
851
+ "parameters": [
852
+ {
853
+ "constant": false,
854
+ "id": 7245,
855
+ "indexed": true,
856
+ "name": "pair",
857
+ "nodeType": "VariableDeclaration",
858
+ "scope": 7253,
859
+ "src": "81:20:34",
860
+ "stateVariable": false,
861
+ "storageLocation": "default",
862
+ "typeDescriptions": {
863
+ "typeIdentifier": "t_address",
864
+ "typeString": "address"
865
+ },
866
+ "typeName": {
867
+ "id": 7244,
868
+ "name": "address",
869
+ "nodeType": "ElementaryTypeName",
870
+ "src": "81:7:34",
871
+ "stateMutability": "nonpayable",
872
+ "typeDescriptions": {
873
+ "typeIdentifier": "t_address",
874
+ "typeString": "address"
875
+ }
876
+ },
877
+ "value": null,
878
+ "visibility": "internal"
879
+ },
880
+ {
881
+ "constant": false,
882
+ "id": 7247,
883
+ "indexed": false,
884
+ "name": "priceCumulative",
885
+ "nodeType": "VariableDeclaration",
886
+ "scope": 7253,
887
+ "src": "103:23:34",
888
+ "stateVariable": false,
889
+ "storageLocation": "default",
890
+ "typeDescriptions": {
891
+ "typeIdentifier": "t_uint256",
892
+ "typeString": "uint256"
893
+ },
894
+ "typeName": {
895
+ "id": 7246,
896
+ "name": "uint256",
897
+ "nodeType": "ElementaryTypeName",
898
+ "src": "103:7:34",
899
+ "typeDescriptions": {
900
+ "typeIdentifier": "t_uint256",
901
+ "typeString": "uint256"
902
+ }
903
+ },
904
+ "value": null,
905
+ "visibility": "internal"
906
+ },
907
+ {
908
+ "constant": false,
909
+ "id": 7249,
910
+ "indexed": false,
911
+ "name": "blockTimestamp",
912
+ "nodeType": "VariableDeclaration",
913
+ "scope": 7253,
914
+ "src": "128:21:34",
915
+ "stateVariable": false,
916
+ "storageLocation": "default",
917
+ "typeDescriptions": {
918
+ "typeIdentifier": "t_uint32",
919
+ "typeString": "uint32"
920
+ },
921
+ "typeName": {
922
+ "id": 7248,
923
+ "name": "uint32",
924
+ "nodeType": "ElementaryTypeName",
925
+ "src": "128:6:34",
926
+ "typeDescriptions": {
927
+ "typeIdentifier": "t_uint32",
928
+ "typeString": "uint32"
929
+ }
930
+ },
931
+ "value": null,
932
+ "visibility": "internal"
933
+ },
934
+ {
935
+ "constant": false,
936
+ "id": 7251,
937
+ "indexed": false,
938
+ "name": "lastIsA",
939
+ "nodeType": "VariableDeclaration",
940
+ "scope": 7253,
941
+ "src": "151:12:34",
942
+ "stateVariable": false,
943
+ "storageLocation": "default",
944
+ "typeDescriptions": {
945
+ "typeIdentifier": "t_bool",
946
+ "typeString": "bool"
947
+ },
948
+ "typeName": {
949
+ "id": 7250,
950
+ "name": "bool",
951
+ "nodeType": "ElementaryTypeName",
952
+ "src": "151:4:34",
953
+ "typeDescriptions": {
954
+ "typeIdentifier": "t_bool",
955
+ "typeString": "bool"
956
+ }
957
+ },
958
+ "value": null,
959
+ "visibility": "internal"
960
+ }
961
+ ],
962
+ "src": "80:84:34"
963
+ },
964
+ "src": "63:102:34"
965
+ },
966
+ {
967
+ "body": null,
968
+ "documentation": null,
969
+ "id": 7258,
970
+ "implemented": false,
971
+ "kind": "function",
972
+ "modifiers": [],
973
+ "name": "MIN_T",
974
+ "nodeType": "FunctionDefinition",
975
+ "parameters": {
976
+ "id": 7254,
977
+ "nodeType": "ParameterList",
978
+ "parameters": [],
979
+ "src": "182:2:34"
980
+ },
981
+ "returnParameters": {
982
+ "id": 7257,
983
+ "nodeType": "ParameterList",
984
+ "parameters": [
985
+ {
986
+ "constant": false,
987
+ "id": 7256,
988
+ "name": "",
989
+ "nodeType": "VariableDeclaration",
990
+ "scope": 7258,
991
+ "src": "208:6:34",
992
+ "stateVariable": false,
993
+ "storageLocation": "default",
994
+ "typeDescriptions": {
995
+ "typeIdentifier": "t_uint32",
996
+ "typeString": "uint32"
997
+ },
998
+ "typeName": {
999
+ "id": 7255,
1000
+ "name": "uint32",
1001
+ "nodeType": "ElementaryTypeName",
1002
+ "src": "208:6:34",
1003
+ "typeDescriptions": {
1004
+ "typeIdentifier": "t_uint32",
1005
+ "typeString": "uint32"
1006
+ }
1007
+ },
1008
+ "value": null,
1009
+ "visibility": "internal"
1010
+ }
1011
+ ],
1012
+ "src": "207:8:34"
1013
+ },
1014
+ "scope": 7295,
1015
+ "src": "168:48:34",
1016
+ "stateMutability": "pure",
1017
+ "superFunction": null,
1018
+ "visibility": "external"
1019
+ },
1020
+ {
1021
+ "body": null,
1022
+ "documentation": null,
1023
+ "id": 7263,
1024
+ "implemented": false,
1025
+ "kind": "function",
1026
+ "modifiers": [],
1027
+ "name": "getBlockTimestamp",
1028
+ "nodeType": "FunctionDefinition",
1029
+ "parameters": {
1030
+ "id": 7259,
1031
+ "nodeType": "ParameterList",
1032
+ "parameters": [],
1033
+ "src": "245:2:34"
1034
+ },
1035
+ "returnParameters": {
1036
+ "id": 7262,
1037
+ "nodeType": "ParameterList",
1038
+ "parameters": [
1039
+ {
1040
+ "constant": false,
1041
+ "id": 7261,
1042
+ "name": "",
1043
+ "nodeType": "VariableDeclaration",
1044
+ "scope": 7263,
1045
+ "src": "271:6:34",
1046
+ "stateVariable": false,
1047
+ "storageLocation": "default",
1048
+ "typeDescriptions": {
1049
+ "typeIdentifier": "t_uint32",
1050
+ "typeString": "uint32"
1051
+ },
1052
+ "typeName": {
1053
+ "id": 7260,
1054
+ "name": "uint32",
1055
+ "nodeType": "ElementaryTypeName",
1056
+ "src": "271:6:34",
1057
+ "typeDescriptions": {
1058
+ "typeIdentifier": "t_uint32",
1059
+ "typeString": "uint32"
1060
+ }
1061
+ },
1062
+ "value": null,
1063
+ "visibility": "internal"
1064
+ }
1065
+ ],
1066
+ "src": "270:8:34"
1067
+ },
1068
+ "scope": 7295,
1069
+ "src": "219:60:34",
1070
+ "stateMutability": "view",
1071
+ "superFunction": null,
1072
+ "visibility": "external"
1073
+ },
1074
+ {
1075
+ "body": null,
1076
+ "documentation": null,
1077
+ "id": 7280,
1078
+ "implemented": false,
1079
+ "kind": "function",
1080
+ "modifiers": [],
1081
+ "name": "getPair",
1082
+ "nodeType": "FunctionDefinition",
1083
+ "parameters": {
1084
+ "id": 7266,
1085
+ "nodeType": "ParameterList",
1086
+ "parameters": [
1087
+ {
1088
+ "constant": false,
1089
+ "id": 7265,
1090
+ "name": "uniswapV2Pair",
1091
+ "nodeType": "VariableDeclaration",
1092
+ "scope": 7280,
1093
+ "src": "299:21:34",
1094
+ "stateVariable": false,
1095
+ "storageLocation": "default",
1096
+ "typeDescriptions": {
1097
+ "typeIdentifier": "t_address",
1098
+ "typeString": "address"
1099
+ },
1100
+ "typeName": {
1101
+ "id": 7264,
1102
+ "name": "address",
1103
+ "nodeType": "ElementaryTypeName",
1104
+ "src": "299:7:34",
1105
+ "stateMutability": "nonpayable",
1106
+ "typeDescriptions": {
1107
+ "typeIdentifier": "t_address",
1108
+ "typeString": "address"
1109
+ }
1110
+ },
1111
+ "value": null,
1112
+ "visibility": "internal"
1113
+ }
1114
+ ],
1115
+ "src": "298:23:34"
1116
+ },
1117
+ "returnParameters": {
1118
+ "id": 7279,
1119
+ "nodeType": "ParameterList",
1120
+ "parameters": [
1121
+ {
1122
+ "constant": false,
1123
+ "id": 7268,
1124
+ "name": "priceCumulativeA",
1125
+ "nodeType": "VariableDeclaration",
1126
+ "scope": 7280,
1127
+ "src": "349:24:34",
1128
+ "stateVariable": false,
1129
+ "storageLocation": "default",
1130
+ "typeDescriptions": {
1131
+ "typeIdentifier": "t_uint256",
1132
+ "typeString": "uint256"
1133
+ },
1134
+ "typeName": {
1135
+ "id": 7267,
1136
+ "name": "uint256",
1137
+ "nodeType": "ElementaryTypeName",
1138
+ "src": "349:7:34",
1139
+ "typeDescriptions": {
1140
+ "typeIdentifier": "t_uint256",
1141
+ "typeString": "uint256"
1142
+ }
1143
+ },
1144
+ "value": null,
1145
+ "visibility": "internal"
1146
+ },
1147
+ {
1148
+ "constant": false,
1149
+ "id": 7270,
1150
+ "name": "priceCumulativeB",
1151
+ "nodeType": "VariableDeclaration",
1152
+ "scope": 7280,
1153
+ "src": "378:24:34",
1154
+ "stateVariable": false,
1155
+ "storageLocation": "default",
1156
+ "typeDescriptions": {
1157
+ "typeIdentifier": "t_uint256",
1158
+ "typeString": "uint256"
1159
+ },
1160
+ "typeName": {
1161
+ "id": 7269,
1162
+ "name": "uint256",
1163
+ "nodeType": "ElementaryTypeName",
1164
+ "src": "378:7:34",
1165
+ "typeDescriptions": {
1166
+ "typeIdentifier": "t_uint256",
1167
+ "typeString": "uint256"
1168
+ }
1169
+ },
1170
+ "value": null,
1171
+ "visibility": "internal"
1172
+ },
1173
+ {
1174
+ "constant": false,
1175
+ "id": 7272,
1176
+ "name": "updateA",
1177
+ "nodeType": "VariableDeclaration",
1178
+ "scope": 7280,
1179
+ "src": "407:14:34",
1180
+ "stateVariable": false,
1181
+ "storageLocation": "default",
1182
+ "typeDescriptions": {
1183
+ "typeIdentifier": "t_uint32",
1184
+ "typeString": "uint32"
1185
+ },
1186
+ "typeName": {
1187
+ "id": 7271,
1188
+ "name": "uint32",
1189
+ "nodeType": "ElementaryTypeName",
1190
+ "src": "407:6:34",
1191
+ "typeDescriptions": {
1192
+ "typeIdentifier": "t_uint32",
1193
+ "typeString": "uint32"
1194
+ }
1195
+ },
1196
+ "value": null,
1197
+ "visibility": "internal"
1198
+ },
1199
+ {
1200
+ "constant": false,
1201
+ "id": 7274,
1202
+ "name": "updateB",
1203
+ "nodeType": "VariableDeclaration",
1204
+ "scope": 7280,
1205
+ "src": "426:14:34",
1206
+ "stateVariable": false,
1207
+ "storageLocation": "default",
1208
+ "typeDescriptions": {
1209
+ "typeIdentifier": "t_uint32",
1210
+ "typeString": "uint32"
1211
+ },
1212
+ "typeName": {
1213
+ "id": 7273,
1214
+ "name": "uint32",
1215
+ "nodeType": "ElementaryTypeName",
1216
+ "src": "426:6:34",
1217
+ "typeDescriptions": {
1218
+ "typeIdentifier": "t_uint32",
1219
+ "typeString": "uint32"
1220
+ }
1221
+ },
1222
+ "value": null,
1223
+ "visibility": "internal"
1224
+ },
1225
+ {
1226
+ "constant": false,
1227
+ "id": 7276,
1228
+ "name": "lastIsA",
1229
+ "nodeType": "VariableDeclaration",
1230
+ "scope": 7280,
1231
+ "src": "445:12:34",
1232
+ "stateVariable": false,
1233
+ "storageLocation": "default",
1234
+ "typeDescriptions": {
1235
+ "typeIdentifier": "t_bool",
1236
+ "typeString": "bool"
1237
+ },
1238
+ "typeName": {
1239
+ "id": 7275,
1240
+ "name": "bool",
1241
+ "nodeType": "ElementaryTypeName",
1242
+ "src": "445:4:34",
1243
+ "typeDescriptions": {
1244
+ "typeIdentifier": "t_bool",
1245
+ "typeString": "bool"
1246
+ }
1247
+ },
1248
+ "value": null,
1249
+ "visibility": "internal"
1250
+ },
1251
+ {
1252
+ "constant": false,
1253
+ "id": 7278,
1254
+ "name": "initialized",
1255
+ "nodeType": "VariableDeclaration",
1256
+ "scope": 7280,
1257
+ "src": "462:16:34",
1258
+ "stateVariable": false,
1259
+ "storageLocation": "default",
1260
+ "typeDescriptions": {
1261
+ "typeIdentifier": "t_bool",
1262
+ "typeString": "bool"
1263
+ },
1264
+ "typeName": {
1265
+ "id": 7277,
1266
+ "name": "bool",
1267
+ "nodeType": "ElementaryTypeName",
1268
+ "src": "462:4:34",
1269
+ "typeDescriptions": {
1270
+ "typeIdentifier": "t_bool",
1271
+ "typeString": "bool"
1272
+ }
1273
+ },
1274
+ "value": null,
1275
+ "visibility": "internal"
1276
+ }
1277
+ ],
1278
+ "src": "344:138:34"
1279
+ },
1280
+ "scope": 7295,
1281
+ "src": "282:201:34",
1282
+ "stateMutability": "view",
1283
+ "superFunction": null,
1284
+ "visibility": "external"
1285
+ },
1286
+ {
1287
+ "body": null,
1288
+ "documentation": null,
1289
+ "id": 7285,
1290
+ "implemented": false,
1291
+ "kind": "function",
1292
+ "modifiers": [],
1293
+ "name": "initialize",
1294
+ "nodeType": "FunctionDefinition",
1295
+ "parameters": {
1296
+ "id": 7283,
1297
+ "nodeType": "ParameterList",
1298
+ "parameters": [
1299
+ {
1300
+ "constant": false,
1301
+ "id": 7282,
1302
+ "name": "uniswapV2Pair",
1303
+ "nodeType": "VariableDeclaration",
1304
+ "scope": 7285,
1305
+ "src": "506:21:34",
1306
+ "stateVariable": false,
1307
+ "storageLocation": "default",
1308
+ "typeDescriptions": {
1309
+ "typeIdentifier": "t_address",
1310
+ "typeString": "address"
1311
+ },
1312
+ "typeName": {
1313
+ "id": 7281,
1314
+ "name": "address",
1315
+ "nodeType": "ElementaryTypeName",
1316
+ "src": "506:7:34",
1317
+ "stateMutability": "nonpayable",
1318
+ "typeDescriptions": {
1319
+ "typeIdentifier": "t_address",
1320
+ "typeString": "address"
1321
+ }
1322
+ },
1323
+ "value": null,
1324
+ "visibility": "internal"
1325
+ }
1326
+ ],
1327
+ "src": "505:23:34"
1328
+ },
1329
+ "returnParameters": {
1330
+ "id": 7284,
1331
+ "nodeType": "ParameterList",
1332
+ "parameters": [],
1333
+ "src": "537:0:34"
1334
+ },
1335
+ "scope": 7295,
1336
+ "src": "486:52:34",
1337
+ "stateMutability": "nonpayable",
1338
+ "superFunction": null,
1339
+ "visibility": "external"
1340
+ },
1341
+ {
1342
+ "body": null,
1343
+ "documentation": null,
1344
+ "id": 7294,
1345
+ "implemented": false,
1346
+ "kind": "function",
1347
+ "modifiers": [],
1348
+ "name": "getResult",
1349
+ "nodeType": "FunctionDefinition",
1350
+ "parameters": {
1351
+ "id": 7288,
1352
+ "nodeType": "ParameterList",
1353
+ "parameters": [
1354
+ {
1355
+ "constant": false,
1356
+ "id": 7287,
1357
+ "name": "uniswapV2Pair",
1358
+ "nodeType": "VariableDeclaration",
1359
+ "scope": 7294,
1360
+ "src": "560:21:34",
1361
+ "stateVariable": false,
1362
+ "storageLocation": "default",
1363
+ "typeDescriptions": {
1364
+ "typeIdentifier": "t_address",
1365
+ "typeString": "address"
1366
+ },
1367
+ "typeName": {
1368
+ "id": 7286,
1369
+ "name": "address",
1370
+ "nodeType": "ElementaryTypeName",
1371
+ "src": "560:7:34",
1372
+ "stateMutability": "nonpayable",
1373
+ "typeDescriptions": {
1374
+ "typeIdentifier": "t_address",
1375
+ "typeString": "address"
1376
+ }
1377
+ },
1378
+ "value": null,
1379
+ "visibility": "internal"
1380
+ }
1381
+ ],
1382
+ "src": "559:23:34"
1383
+ },
1384
+ "returnParameters": {
1385
+ "id": 7293,
1386
+ "nodeType": "ParameterList",
1387
+ "parameters": [
1388
+ {
1389
+ "constant": false,
1390
+ "id": 7290,
1391
+ "name": "price",
1392
+ "nodeType": "VariableDeclaration",
1393
+ "scope": 7294,
1394
+ "src": "601:13:34",
1395
+ "stateVariable": false,
1396
+ "storageLocation": "default",
1397
+ "typeDescriptions": {
1398
+ "typeIdentifier": "t_uint224",
1399
+ "typeString": "uint224"
1400
+ },
1401
+ "typeName": {
1402
+ "id": 7289,
1403
+ "name": "uint224",
1404
+ "nodeType": "ElementaryTypeName",
1405
+ "src": "601:7:34",
1406
+ "typeDescriptions": {
1407
+ "typeIdentifier": "t_uint224",
1408
+ "typeString": "uint224"
1409
+ }
1410
+ },
1411
+ "value": null,
1412
+ "visibility": "internal"
1413
+ },
1414
+ {
1415
+ "constant": false,
1416
+ "id": 7292,
1417
+ "name": "T",
1418
+ "nodeType": "VariableDeclaration",
1419
+ "scope": 7294,
1420
+ "src": "616:8:34",
1421
+ "stateVariable": false,
1422
+ "storageLocation": "default",
1423
+ "typeDescriptions": {
1424
+ "typeIdentifier": "t_uint32",
1425
+ "typeString": "uint32"
1426
+ },
1427
+ "typeName": {
1428
+ "id": 7291,
1429
+ "name": "uint32",
1430
+ "nodeType": "ElementaryTypeName",
1431
+ "src": "616:6:34",
1432
+ "typeDescriptions": {
1433
+ "typeIdentifier": "t_uint32",
1434
+ "typeString": "uint32"
1435
+ }
1436
+ },
1437
+ "value": null,
1438
+ "visibility": "internal"
1439
+ }
1440
+ ],
1441
+ "src": "600:25:34"
1442
+ },
1443
+ "scope": 7295,
1444
+ "src": "541:85:34",
1445
+ "stateMutability": "nonpayable",
1446
+ "superFunction": null,
1447
+ "visibility": "external"
1448
+ }
1449
+ ],
1450
+ "scope": 7296,
1451
+ "src": "28:601:34"
1452
+ }
1453
+ ],
1454
+ "src": "0:629:34"
1455
+ },
1456
+ "compiler": {
1457
+ "name": "solc",
1458
+ "version": "0.5.16+commit.9c3226ce.Emscripten.clang"
1459
+ },
1460
+ "networks": {},
1461
+ "schemaVersion": "3.3.2",
1462
+ "updatedAt": "2021-01-07T23:07:24.833Z",
1463
+ "devdoc": {
1464
+ "methods": {}
1465
+ },
1466
+ "userdoc": {
1467
+ "methods": {}
1468
+ }
1469
+ }