impermax-sdk 1.0.1 → 1.0.2

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 (209) hide show
  1. package/lib/esm/abis/ImpermaxABI.d.ts +2 -0
  2. package/lib/esm/abis/ImpermaxABI.js +3 -0
  3. package/lib/esm/abis/contracts/ClaimAggregator.json +2015 -0
  4. package/lib/esm/abis/contracts/IBorrowable.json +13207 -0
  5. package/lib/esm/abis/contracts/IClaimable.json +406 -0
  6. package/lib/esm/abis/contracts/ICollateral.json +8952 -0
  7. package/lib/esm/abis/contracts/IERC20.json +2376 -0
  8. package/lib/esm/abis/contracts/IFactory.json +3660 -0
  9. package/lib/esm/abis/contracts/IFarmingPool.json +3584 -0
  10. package/lib/esm/abis/contracts/IMerkleDistributor.json +1134 -0
  11. package/lib/esm/abis/contracts/IRouter02.json +7283 -0
  12. package/lib/esm/abis/contracts/ISimpleUniswapOracle.json +1469 -0
  13. package/lib/esm/abis/contracts/IStakedLPToken.json +7309 -0
  14. package/lib/esm/abis/contracts/IStakingRewards.json +1036 -0
  15. package/lib/esm/abis/contracts/IUniswapV2Factory.json +1690 -0
  16. package/lib/esm/abis/contracts/IUniswapV2Pair.json +6761 -0
  17. package/lib/esm/abis/contracts/ImpermaxChef.json +20945 -0
  18. package/lib/esm/config/amms.d.ts +25 -0
  19. package/lib/esm/config/amms.js +196 -0
  20. package/lib/esm/config/contracts/claim-aggregators.d.ts +2 -0
  21. package/lib/esm/config/contracts/claim-aggregators.js +18 -0
  22. package/lib/esm/config/contracts/impermax-chef.d.ts +2 -0
  23. package/lib/esm/config/contracts/impermax-chef.js +18 -0
  24. package/lib/esm/config/contracts/imxes.d.ts +2 -0
  25. package/lib/esm/config/contracts/imxes.js +18 -0
  26. package/lib/esm/config/contracts/merkle-distributors.d.ts +4 -0
  27. package/lib/esm/config/contracts/merkle-distributors.js +13 -0
  28. package/lib/esm/config/contracts/routers.d.ts +2 -0
  29. package/lib/esm/config/contracts/routers.js +38 -0
  30. package/lib/esm/config/contracts/simple-uniswap-oracles.d.ts +2 -0
  31. package/lib/esm/config/contracts/simple-uniswap-oracles.js +35 -0
  32. package/lib/esm/config/contracts/weths.d.ts +2 -0
  33. package/lib/esm/config/contracts/weths.js +19 -0
  34. package/lib/esm/config/debank-ids.d.ts +2 -0
  35. package/lib/esm/config/debank-ids.js +17 -0
  36. package/lib/esm/config/endpoints/merkle-distributors.d.ts +4 -0
  37. package/lib/esm/config/endpoints/merkle-distributors.js +13 -0
  38. package/lib/esm/config/eth.d.ts +3 -0
  39. package/lib/esm/config/eth.js +32 -0
  40. package/lib/esm/config/factories.d.ts +6 -0
  41. package/lib/esm/config/factories.js +24 -0
  42. package/lib/esm/config/farms.d.ts +59 -0
  43. package/lib/esm/config/farms.js +114 -0
  44. package/lib/esm/config/general.d.ts +3 -0
  45. package/lib/esm/config/general.js +8 -0
  46. package/lib/esm/config/subgraphs.d.ts +5 -0
  47. package/lib/esm/config/subgraphs.js +68 -0
  48. package/lib/esm/config/types.d.ts +67 -0
  49. package/lib/esm/config/types.js +54 -0
  50. package/lib/esm/impermax-router/Account.d.ts +31 -0
  51. package/lib/esm/impermax-router/Account.js +154 -0
  52. package/lib/esm/impermax-router/AccountBorrowable.d.ts +22 -0
  53. package/lib/esm/impermax-router/AccountBorrowable.js +141 -0
  54. package/lib/esm/impermax-router/AccountCollateral.d.ts +11 -0
  55. package/lib/esm/impermax-router/AccountCollateral.js +63 -0
  56. package/lib/esm/impermax-router/AccountLendingPool.d.ts +57 -0
  57. package/lib/esm/impermax-router/AccountLendingPool.js +266 -0
  58. package/lib/esm/impermax-router/AccountPoolToken.d.ts +29 -0
  59. package/lib/esm/impermax-router/AccountPoolToken.js +89 -0
  60. package/lib/esm/impermax-router/Borrowable.d.ts +27 -0
  61. package/lib/esm/impermax-router/Borrowable.js +128 -0
  62. package/lib/esm/impermax-router/Collateral.d.ts +9 -0
  63. package/lib/esm/impermax-router/Collateral.js +45 -0
  64. package/lib/esm/impermax-router/ContractsHelper.d.ts +28 -0
  65. package/lib/esm/impermax-router/ContractsHelper.js +50 -0
  66. package/lib/esm/impermax-router/ImpermaxFactory.d.ts +15 -0
  67. package/lib/esm/impermax-router/ImpermaxFactory.js +42 -0
  68. package/lib/esm/impermax-router/Interactions.d.ts +16 -0
  69. package/lib/esm/impermax-router/Interactions.js +105 -0
  70. package/lib/esm/impermax-router/InteractionsLendingPool.d.ts +43 -0
  71. package/lib/esm/impermax-router/InteractionsLendingPool.js +124 -0
  72. package/lib/esm/impermax-router/InteractionsPoolToken.d.ts +23 -0
  73. package/lib/esm/impermax-router/InteractionsPoolToken.js +194 -0
  74. package/lib/esm/impermax-router/LendingPool.d.ts +69 -0
  75. package/lib/esm/impermax-router/LendingPool.js +291 -0
  76. package/lib/esm/impermax-router/PoolToken.d.ts +36 -0
  77. package/lib/esm/impermax-router/PoolToken.js +140 -0
  78. package/lib/esm/impermax-router/index.d.ts +20 -0
  79. package/lib/esm/impermax-router/index.js +34 -0
  80. package/lib/esm/impermax-router/interfaces.d.ts +218 -0
  81. package/lib/esm/impermax-router/interfaces.js +15 -0
  82. package/{index.ts → lib/esm/index.d.ts} +1 -3
  83. package/lib/esm/index.js +10 -0
  84. package/lib/esm/subgraph/Account.d.ts +18 -0
  85. package/lib/esm/subgraph/Account.js +111 -0
  86. package/lib/esm/subgraph/AccountLendingPool.d.ts +19 -0
  87. package/lib/esm/subgraph/AccountLendingPool.js +71 -0
  88. package/lib/esm/subgraph/AccountPoolToken.d.ts +14 -0
  89. package/lib/esm/subgraph/AccountPoolToken.js +75 -0
  90. package/lib/esm/subgraph/LendingPool.d.ts +38 -0
  91. package/lib/esm/subgraph/LendingPool.js +204 -0
  92. package/lib/esm/subgraph/PoolToken.d.ts +64 -0
  93. package/lib/esm/subgraph/PoolToken.js +462 -0
  94. package/lib/esm/subgraph/PriceHelper.d.ts +21 -0
  95. package/lib/esm/subgraph/PriceHelper.js +166 -0
  96. package/lib/esm/subgraph/SolidexHelper.d.ts +16 -0
  97. package/lib/esm/subgraph/SolidexHelper.js +58 -0
  98. package/lib/esm/subgraph/index.d.ts +73 -0
  99. package/lib/esm/subgraph/index.js +185 -0
  100. package/lib/esm/subgraph/initializer.d.ts +34 -0
  101. package/lib/esm/subgraph/initializer.js +517 -0
  102. package/lib/esm/subgraph/query.d.ts +10 -0
  103. package/lib/esm/subgraph/query.js +229 -0
  104. package/lib/esm/utils/ether-utils.d.ts +5 -0
  105. package/lib/esm/utils/ether-utils.js +26 -0
  106. package/lib/esm/utils/index.d.ts +3 -0
  107. package/lib/esm/utils/index.js +16 -0
  108. package/package.json +9 -3
  109. package/.idea/impermax-sdk.iml +0 -12
  110. package/.idea/misc.xml +0 -6
  111. package/.idea/modules.xml +0 -8
  112. package/.idea/workspace.xml +0 -642
  113. package/abis/ImpermaxABI.ts +0 -3
  114. package/abis/contracts/BAllowance.json +0 -4735
  115. package/abis/contracts/BDeployer.json +0 -1195
  116. package/abis/contracts/BInterestRateModel.json +0 -10796
  117. package/abis/contracts/BSetter.json +0 -6219
  118. package/abis/contracts/BStorage.json +0 -2613
  119. package/abis/contracts/Borrowable.json +0 -19937
  120. package/abis/contracts/CDeployer.json +0 -1104
  121. package/abis/contracts/CSetter.json +0 -5094
  122. package/abis/contracts/CStorage.json +0 -516
  123. package/abis/contracts/ClaimAggregator.json +0 -2015
  124. package/abis/contracts/Collateral.json +0 -21615
  125. package/abis/contracts/ERC20.json +0 -819
  126. package/abis/contracts/Factory.json +0 -21986
  127. package/abis/contracts/FarmingPool.json +0 -8601
  128. package/abis/contracts/IBDeployer.json +0 -351
  129. package/abis/contracts/IBorrowTracker.json +0 -346
  130. package/abis/contracts/IBorrowable.json +0 -13207
  131. package/abis/contracts/ICDeployer.json +0 -294
  132. package/abis/contracts/IClaimable.json +0 -406
  133. package/abis/contracts/ICollateral.json +0 -8952
  134. package/abis/contracts/IERC20.json +0 -2376
  135. package/abis/contracts/IFactory.json +0 -3660
  136. package/abis/contracts/IFarmingPool.json +0 -3584
  137. package/abis/contracts/IImpermaxCallee.json +0 -679
  138. package/abis/contracts/IMerkleDistributor.json +0 -1134
  139. package/abis/contracts/IPoolToken.json +0 -5343
  140. package/abis/contracts/IRouter01.json +0 -6891
  141. package/abis/contracts/IRouter02.json +0 -7283
  142. package/abis/contracts/ISimpleUniswapOracle.json +0 -1469
  143. package/abis/contracts/IStakedLPToken.json +0 -7309
  144. package/abis/contracts/IStakingRewards.json +0 -1036
  145. package/abis/contracts/IUniswapV2Callee.json +0 -403
  146. package/abis/contracts/IUniswapV2ERC20.json +0 -3155
  147. package/abis/contracts/IUniswapV2Factory.json +0 -1690
  148. package/abis/contracts/IUniswapV2Pair.json +0 -6761
  149. package/abis/contracts/IWETH.json +0 -561
  150. package/abis/contracts/ImpermaxChef.json +0 -20945
  151. package/abis/contracts/ImpermaxERC20.json +0 -12095
  152. package/abis/contracts/Math.json +0 -1966
  153. package/abis/contracts/MockERC20.json +0 -8884
  154. package/abis/contracts/PoolToken.json +0 -10784
  155. package/abis/contracts/Router01.json +0 -43963
  156. package/abis/contracts/SafeMath.json +0 -6828
  157. package/abis/contracts/SimpleUniswapOracle.json +0 -9640
  158. package/abis/contracts/TransferHelper.json +0 -4875
  159. package/abis/contracts/UQ112x112.json +0 -1201
  160. package/abis/contracts/UniswapV2ERC20.json +0 -10969
  161. package/abis/contracts/UniswapV2Factory.json +0 -5521
  162. package/abis/contracts/UniswapV2Library.json +0 -13789
  163. package/abis/contracts/UniswapV2Pair.json +0 -30782
  164. package/abis/contracts/WETH9.json +0 -6613
  165. package/config/amms.ts +0 -199
  166. package/config/contracts/claim-aggregators.ts +0 -16
  167. package/config/contracts/impermax-chef.ts +0 -16
  168. package/config/contracts/imxes.ts +0 -16
  169. package/config/contracts/merkle-distributors.ts +0 -13
  170. package/config/contracts/routers.ts +0 -36
  171. package/config/contracts/simple-uniswap-oracles.ts +0 -33
  172. package/config/contracts/weths.ts +0 -18
  173. package/config/debank-ids.ts +0 -15
  174. package/config/endpoints/merkle-distributors.ts +0 -13
  175. package/config/eth.ts +0 -32
  176. package/config/factories.ts +0 -26
  177. package/config/farms.ts +0 -119
  178. package/config/general.ts +0 -8
  179. package/config/subgraphs.ts +0 -69
  180. package/config/types.ts +0 -81
  181. package/impermax-router/Account.ts +0 -123
  182. package/impermax-router/AccountBorrowable.ts +0 -110
  183. package/impermax-router/AccountCollateral.ts +0 -40
  184. package/impermax-router/AccountLendingPool.ts +0 -231
  185. package/impermax-router/AccountPoolToken.ts +0 -76
  186. package/impermax-router/Borrowable.ts +0 -86
  187. package/impermax-router/Collateral.ts +0 -26
  188. package/impermax-router/ContractsHelper.ts +0 -64
  189. package/impermax-router/ImpermaxFactory.ts +0 -47
  190. package/impermax-router/Interactions.ts +0 -94
  191. package/impermax-router/InteractionsLendingPool.ts +0 -129
  192. package/impermax-router/InteractionsPoolToken.ts +0 -187
  193. package/impermax-router/LendingPool.ts +0 -256
  194. package/impermax-router/PoolToken.ts +0 -112
  195. package/impermax-router/index.ts +0 -49
  196. package/impermax-router/interfaces.ts +0 -233
  197. package/subgraph/Account.ts +0 -93
  198. package/subgraph/AccountLendingPool.ts +0 -60
  199. package/subgraph/AccountPoolToken.ts +0 -60
  200. package/subgraph/LendingPool.ts +0 -179
  201. package/subgraph/PoolToken.ts +0 -381
  202. package/subgraph/PriceHelper.ts +0 -150
  203. package/subgraph/SolidexHelper.ts +0 -54
  204. package/subgraph/index.ts +0 -166
  205. package/subgraph/initializer.ts +0 -509
  206. package/subgraph/query.ts +0 -224
  207. package/tsconfig.json +0 -16
  208. package/utils/ether-utils.ts +0 -22
  209. package/utils/index.ts +0 -12
@@ -1,1469 +0,0 @@
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
- }