UniswapV2Library.json 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181
  1. [
  2. {
  3. "inputs": [
  4. {
  5. "internalType": "uint256",
  6. "name": "amountIn",
  7. "type": "uint256"
  8. },
  9. {
  10. "internalType": "uint256",
  11. "name": "reserveIn",
  12. "type": "uint256"
  13. },
  14. {
  15. "internalType": "uint256",
  16. "name": "reserveOut",
  17. "type": "uint256"
  18. }
  19. ],
  20. "name": "getAmountOut",
  21. "outputs": [
  22. {
  23. "internalType": "uint256",
  24. "name": "amountOut",
  25. "type": "uint256"
  26. }
  27. ],
  28. "stateMutability": "pure",
  29. "type": "function"
  30. },
  31. {
  32. "inputs": [
  33. {
  34. "internalType": "address",
  35. "name": "factory",
  36. "type": "address"
  37. },
  38. {
  39. "internalType": "uint256",
  40. "name": "amountOut",
  41. "type": "uint256"
  42. },
  43. {
  44. "internalType": "address[]",
  45. "name": "path",
  46. "type": "address[]"
  47. }
  48. ],
  49. "name": "getAmountsIn",
  50. "outputs": [
  51. {
  52. "internalType": "uint256[]",
  53. "name": "amounts",
  54. "type": "uint256[]"
  55. }
  56. ],
  57. "stateMutability": "view",
  58. "type": "function"
  59. },
  60. {
  61. "inputs": [
  62. {
  63. "internalType": "address",
  64. "name": "factory",
  65. "type": "address"
  66. },
  67. {
  68. "internalType": "uint256",
  69. "name": "amountIn",
  70. "type": "uint256"
  71. },
  72. {
  73. "internalType": "address[]",
  74. "name": "path",
  75. "type": "address[]"
  76. }
  77. ],
  78. "name": "getAmountsOut",
  79. "outputs": [
  80. {
  81. "internalType": "uint256[]",
  82. "name": "amounts",
  83. "type": "uint256[]"
  84. }
  85. ],
  86. "stateMutability": "view",
  87. "type": "function"
  88. },
  89. {
  90. "inputs": [
  91. {
  92. "internalType": "address",
  93. "name": "factory",
  94. "type": "address"
  95. },
  96. {
  97. "internalType": "address",
  98. "name": "tokenA",
  99. "type": "address"
  100. },
  101. {
  102. "internalType": "address",
  103. "name": "tokenB",
  104. "type": "address"
  105. }
  106. ],
  107. "name": "getReserves",
  108. "outputs": [
  109. {
  110. "internalType": "uint256",
  111. "name": "reserveA",
  112. "type": "uint256"
  113. },
  114. {
  115. "internalType": "uint256",
  116. "name": "reserveB",
  117. "type": "uint256"
  118. }
  119. ],
  120. "stateMutability": "view",
  121. "type": "function"
  122. },
  123. {
  124. "inputs": [
  125. {
  126. "internalType": "address",
  127. "name": "factory",
  128. "type": "address"
  129. },
  130. {
  131. "internalType": "address",
  132. "name": "tokenA",
  133. "type": "address"
  134. },
  135. {
  136. "internalType": "address",
  137. "name": "tokenB",
  138. "type": "address"
  139. }
  140. ],
  141. "name": "pairFor",
  142. "outputs": [
  143. {
  144. "internalType": "address",
  145. "name": "pair",
  146. "type": "address"
  147. }
  148. ],
  149. "stateMutability": "pure",
  150. "type": "function"
  151. },
  152. {
  153. "inputs": [
  154. {
  155. "internalType": "uint256",
  156. "name": "amountA",
  157. "type": "uint256"
  158. },
  159. {
  160. "internalType": "uint256",
  161. "name": "reserveA",
  162. "type": "uint256"
  163. },
  164. {
  165. "internalType": "uint256",
  166. "name": "reserveB",
  167. "type": "uint256"
  168. }
  169. ],
  170. "name": "quote",
  171. "outputs": [
  172. {
  173. "internalType": "uint256",
  174. "name": "amountB",
  175. "type": "uint256"
  176. }
  177. ],
  178. "stateMutability": "pure",
  179. "type": "function"
  180. }
  181. ]