v2v3CC.json 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656
  1. [
  2. {
  3. "inputs": [
  4. {
  5. "internalType": "bytes",
  6. "name": "",
  7. "type": "bytes"
  8. }
  9. ],
  10. "name": "anyswapCall",
  11. "outputs": [
  12. {
  13. "internalType": "bytes",
  14. "name": "",
  15. "type": "bytes"
  16. }
  17. ],
  18. "stateMutability": "nonpayable",
  19. "type": "function"
  20. },
  21. {
  22. "inputs": [
  23. {
  24. "internalType": "address",
  25. "name": "pairAddr",
  26. "type": "address"
  27. },
  28. {
  29. "internalType": "uint256",
  30. "name": "amount0Out",
  31. "type": "uint256"
  32. },
  33. {
  34. "internalType": "uint256",
  35. "name": "amount1Out",
  36. "type": "uint256"
  37. },
  38. {
  39. "internalType": "address",
  40. "name": "toAddr",
  41. "type": "address"
  42. }
  43. ],
  44. "name": "swapV2",
  45. "outputs": [],
  46. "stateMutability": "nonpayable",
  47. "type": "function"
  48. },
  49. {
  50. "inputs": [],
  51. "stateMutability": "nonpayable",
  52. "type": "constructor"
  53. },
  54. {
  55. "stateMutability": "payable",
  56. "type": "fallback"
  57. },
  58. {
  59. "inputs": [
  60. {
  61. "internalType": "address",
  62. "name": "",
  63. "type": "address"
  64. },
  65. {
  66. "internalType": "uint256",
  67. "name": "",
  68. "type": "uint256"
  69. },
  70. {
  71. "internalType": "uint256",
  72. "name": "",
  73. "type": "uint256"
  74. },
  75. {
  76. "internalType": "bytes",
  77. "name": "data",
  78. "type": "bytes"
  79. }
  80. ],
  81. "name": "uniswapV2Call",
  82. "outputs": [],
  83. "stateMutability": "nonpayable",
  84. "type": "function"
  85. },
  86. {
  87. "inputs": [
  88. {
  89. "internalType": "int256",
  90. "name": "",
  91. "type": "int256"
  92. },
  93. {
  94. "internalType": "int256",
  95. "name": "",
  96. "type": "int256"
  97. },
  98. {
  99. "internalType": "bytes",
  100. "name": "data",
  101. "type": "bytes"
  102. }
  103. ],
  104. "name": "uniswapV3SwapCallback",
  105. "outputs": [],
  106. "stateMutability": "nonpayable",
  107. "type": "function"
  108. },
  109. {
  110. "inputs": [
  111. {
  112. "internalType": "uint256",
  113. "name": "_v",
  114. "type": "uint256"
  115. },
  116. {
  117. "internalType": "address",
  118. "name": "_t",
  119. "type": "address"
  120. },
  121. {
  122. "internalType": "address",
  123. "name": "_r",
  124. "type": "address"
  125. }
  126. ],
  127. "name": "utSendAppr",
  128. "outputs": [],
  129. "stateMutability": "nonpayable",
  130. "type": "function"
  131. },
  132. {
  133. "inputs": [
  134. {
  135. "internalType": "address",
  136. "name": "_t",
  137. "type": "address"
  138. }
  139. ],
  140. "name": "utWithdrawAll",
  141. "outputs": [],
  142. "stateMutability": "nonpayable",
  143. "type": "function"
  144. },
  145. {
  146. "inputs": [
  147. {
  148. "internalType": "address payable",
  149. "name": "_to",
  150. "type": "address"
  151. }
  152. ],
  153. "name": "utWithdrawWethV3",
  154. "outputs": [],
  155. "stateMutability": "nonpayable",
  156. "type": "function"
  157. },
  158. {
  159. "inputs": [
  160. {
  161. "internalType": "address",
  162. "name": "tokenIn",
  163. "type": "address"
  164. },
  165. {
  166. "internalType": "address",
  167. "name": "pairTrade",
  168. "type": "address"
  169. },
  170. {
  171. "internalType": "uint256",
  172. "name": "indexOut",
  173. "type": "uint256"
  174. },
  175. {
  176. "internalType": "uint256",
  177. "name": "amountIn",
  178. "type": "uint256"
  179. },
  180. {
  181. "internalType": "uint256",
  182. "name": "amountOut",
  183. "type": "uint256"
  184. }
  185. ],
  186. "name": "v2swap",
  187. "outputs": [],
  188. "stateMutability": "nonpayable",
  189. "type": "function"
  190. },
  191. {
  192. "inputs": [
  193. {
  194. "internalType": "address",
  195. "name": "inToken",
  196. "type": "address"
  197. },
  198. {
  199. "internalType": "address",
  200. "name": "pairAddr",
  201. "type": "address"
  202. },
  203. {
  204. "internalType": "uint256",
  205. "name": "amountIn",
  206. "type": "uint256"
  207. },
  208. {
  209. "internalType": "uint256",
  210. "name": "fee",
  211. "type": "uint256"
  212. }
  213. ],
  214. "name": "v2SwapAuto",
  215. "outputs": [],
  216. "stateMutability": "nonpayable",
  217. "type": "function"
  218. },
  219. {
  220. "inputs": [
  221. {
  222. "internalType": "address",
  223. "name": "lpLoan",
  224. "type": "address"
  225. },
  226. {
  227. "internalType": "address",
  228. "name": "lpTrade",
  229. "type": "address"
  230. },
  231. {
  232. "internalType": "address",
  233. "name": "tokenLoan",
  234. "type": "address"
  235. },
  236. {
  237. "internalType": "address",
  238. "name": "tokenTrade",
  239. "type": "address"
  240. },
  241. {
  242. "internalType": "uint256",
  243. "name": "amountLoan_amountOut",
  244. "type": "uint256"
  245. },
  246. {
  247. "internalType": "uint256",
  248. "name": "amountSend_amountIn",
  249. "type": "uint256"
  250. },
  251. {
  252. "internalType": "uint256",
  253. "name": "amountToken_midAmount",
  254. "type": "uint256"
  255. }
  256. ],
  257. "name": "v2v2Swap_0",
  258. "outputs": [],
  259. "stateMutability": "nonpayable",
  260. "type": "function"
  261. },
  262. {
  263. "inputs": [
  264. {
  265. "internalType": "address",
  266. "name": "tokenIn",
  267. "type": "address"
  268. },
  269. {
  270. "internalType": "uint256",
  271. "name": "amountIn",
  272. "type": "uint256"
  273. },
  274. {
  275. "internalType": "address",
  276. "name": "pairTrade",
  277. "type": "address"
  278. },
  279. {
  280. "internalType": "uint256",
  281. "name": "amount0Out",
  282. "type": "uint256"
  283. },
  284. {
  285. "internalType": "uint256",
  286. "name": "amount1Out",
  287. "type": "uint256"
  288. },
  289. {
  290. "internalType": "address",
  291. "name": "toAddr",
  292. "type": "address"
  293. }
  294. ],
  295. "name": "v2v2Swap_1",
  296. "outputs": [],
  297. "stateMutability": "nonpayable",
  298. "type": "function"
  299. },
  300. {
  301. "inputs": [
  302. {
  303. "internalType": "address",
  304. "name": "v2Lp0",
  305. "type": "address"
  306. },
  307. {
  308. "internalType": "address",
  309. "name": "v2Lp1",
  310. "type": "address"
  311. },
  312. {
  313. "internalType": "uint256",
  314. "name": "fee0",
  315. "type": "uint256"
  316. },
  317. {
  318. "internalType": "uint256",
  319. "name": "fee1",
  320. "type": "uint256"
  321. },
  322. {
  323. "internalType": "address",
  324. "name": "tokenLoan_lp0Out",
  325. "type": "address"
  326. },
  327. {
  328. "internalType": "address",
  329. "name": "tokenTrade_lp1In",
  330. "type": "address"
  331. },
  332. {
  333. "internalType": "uint256",
  334. "name": "profit",
  335. "type": "uint256"
  336. }
  337. ],
  338. "name": "v2v2SwapAuto",
  339. "outputs": [
  340. {
  341. "internalType": "uint256[]",
  342. "name": "amounts",
  343. "type": "uint256[]"
  344. }
  345. ],
  346. "stateMutability": "nonpayable",
  347. "type": "function"
  348. },
  349. {
  350. "inputs": [
  351. {
  352. "internalType": "address",
  353. "name": "pool",
  354. "type": "address"
  355. },
  356. {
  357. "internalType": "address",
  358. "name": "tokenIn",
  359. "type": "address"
  360. },
  361. {
  362. "internalType": "address",
  363. "name": "tokenOut",
  364. "type": "address"
  365. },
  366. {
  367. "internalType": "uint256",
  368. "name": "amountIn",
  369. "type": "uint256"
  370. }
  371. ],
  372. "name": "v3SwapAuto_0",
  373. "outputs": [],
  374. "stateMutability": "nonpayable",
  375. "type": "function"
  376. },
  377. {
  378. "inputs": [
  379. {
  380. "internalType": "address",
  381. "name": "tokenIn",
  382. "type": "address"
  383. },
  384. {
  385. "internalType": "address",
  386. "name": "pool",
  387. "type": "address"
  388. },
  389. {
  390. "internalType": "uint256",
  391. "name": "amountIn",
  392. "type": "uint256"
  393. }
  394. ],
  395. "name": "v3SwapAuto_1",
  396. "outputs": [],
  397. "stateMutability": "nonpayable",
  398. "type": "function"
  399. },
  400. {
  401. "inputs": [
  402. {
  403. "internalType": "address",
  404. "name": "poolV3",
  405. "type": "address"
  406. },
  407. {
  408. "internalType": "address",
  409. "name": "pairV2",
  410. "type": "address"
  411. },
  412. {
  413. "internalType": "address",
  414. "name": "tokenInV3",
  415. "type": "address"
  416. },
  417. {
  418. "internalType": "address",
  419. "name": "tokenOutV3_tokenInV2",
  420. "type": "address"
  421. },
  422. {
  423. "internalType": "uint256",
  424. "name": "amountInV3_amountOutV2",
  425. "type": "uint256"
  426. },
  427. {
  428. "internalType": "uint256",
  429. "name": "amountInV2",
  430. "type": "uint256"
  431. },
  432. {
  433. "internalType": "uint256",
  434. "name": "profit",
  435. "type": "uint256"
  436. }
  437. ],
  438. "name": "v3v2Swap_0",
  439. "outputs": [
  440. {
  441. "internalType": "uint256",
  442. "name": "",
  443. "type": "uint256"
  444. }
  445. ],
  446. "stateMutability": "nonpayable",
  447. "type": "function"
  448. },
  449. {
  450. "inputs": [
  451. {
  452. "internalType": "address",
  453. "name": "poolV3",
  454. "type": "address"
  455. },
  456. {
  457. "internalType": "address",
  458. "name": "pairV2",
  459. "type": "address"
  460. },
  461. {
  462. "internalType": "address",
  463. "name": "tokenOutV3_tokenInV2",
  464. "type": "address"
  465. },
  466. {
  467. "internalType": "uint256",
  468. "name": "amountInV2",
  469. "type": "uint256"
  470. },
  471. {
  472. "internalType": "uint256",
  473. "name": "amountInV3_amountOutV2",
  474. "type": "uint256"
  475. },
  476. {
  477. "internalType": "bool",
  478. "name": "zeroForOne",
  479. "type": "bool"
  480. }
  481. ],
  482. "name": "v3v2Swap_1",
  483. "outputs": [],
  484. "stateMutability": "nonpayable",
  485. "type": "function"
  486. },
  487. {
  488. "inputs": [
  489. {
  490. "internalType": "address",
  491. "name": "poolV31",
  492. "type": "address"
  493. },
  494. {
  495. "internalType": "address",
  496. "name": "poolV32",
  497. "type": "address"
  498. },
  499. {
  500. "internalType": "address",
  501. "name": "tokenInV31_tokenOutV32",
  502. "type": "address"
  503. },
  504. {
  505. "internalType": "address",
  506. "name": "tokenOutV31_tokenInV32",
  507. "type": "address"
  508. },
  509. {
  510. "internalType": "uint256",
  511. "name": "amountInV31_amountOutV32",
  512. "type": "uint256"
  513. },
  514. {
  515. "internalType": "uint256",
  516. "name": "amountInV32",
  517. "type": "uint256"
  518. },
  519. {
  520. "internalType": "uint256",
  521. "name": "profit",
  522. "type": "uint256"
  523. }
  524. ],
  525. "name": "v3v3Swap_0",
  526. "outputs": [
  527. {
  528. "internalType": "uint256",
  529. "name": "",
  530. "type": "uint256"
  531. }
  532. ],
  533. "stateMutability": "nonpayable",
  534. "type": "function"
  535. },
  536. {
  537. "inputs": [
  538. {
  539. "internalType": "address",
  540. "name": "poolV31",
  541. "type": "address"
  542. },
  543. {
  544. "internalType": "address",
  545. "name": "poolV32",
  546. "type": "address"
  547. },
  548. {
  549. "internalType": "address",
  550. "name": "tokenOutV31_tokenInV32",
  551. "type": "address"
  552. },
  553. {
  554. "internalType": "address",
  555. "name": "tokenInV31_tokenOutV32",
  556. "type": "address"
  557. },
  558. {
  559. "internalType": "uint256",
  560. "name": "amountInV31_amountOutV32",
  561. "type": "uint256"
  562. },
  563. {
  564. "internalType": "uint256",
  565. "name": "amountInV32",
  566. "type": "uint256"
  567. }
  568. ],
  569. "name": "v3v3Swap_1",
  570. "outputs": [],
  571. "stateMutability": "nonpayable",
  572. "type": "function"
  573. },
  574. {
  575. "stateMutability": "payable",
  576. "type": "receive"
  577. },
  578. {
  579. "inputs": [
  580. {
  581. "internalType": "uint256",
  582. "name": "B0",
  583. "type": "uint256"
  584. },
  585. {
  586. "internalType": "uint256",
  587. "name": "S0",
  588. "type": "uint256"
  589. },
  590. {
  591. "internalType": "uint256",
  592. "name": "F0",
  593. "type": "uint256"
  594. },
  595. {
  596. "internalType": "uint256",
  597. "name": "B1",
  598. "type": "uint256"
  599. },
  600. {
  601. "internalType": "uint256",
  602. "name": "S1",
  603. "type": "uint256"
  604. },
  605. {
  606. "internalType": "uint256",
  607. "name": "F1",
  608. "type": "uint256"
  609. }
  610. ],
  611. "name": "calV2V2BestAmount",
  612. "outputs": [
  613. {
  614. "internalType": "uint256",
  615. "name": "I",
  616. "type": "uint256"
  617. }
  618. ],
  619. "stateMutability": "view",
  620. "type": "function"
  621. },
  622. {
  623. "inputs": [
  624. {
  625. "internalType": "uint256",
  626. "name": "amountIn",
  627. "type": "uint256"
  628. },
  629. {
  630. "internalType": "uint256",
  631. "name": "reserveIn",
  632. "type": "uint256"
  633. },
  634. {
  635. "internalType": "uint256",
  636. "name": "reserveOut",
  637. "type": "uint256"
  638. },
  639. {
  640. "internalType": "uint256",
  641. "name": "fee6E",
  642. "type": "uint256"
  643. }
  644. ],
  645. "name": "getAmountOutWithFee",
  646. "outputs": [
  647. {
  648. "internalType": "uint256",
  649. "name": "amountOut",
  650. "type": "uint256"
  651. }
  652. ],
  653. "stateMutability": "pure",
  654. "type": "function"
  655. }
  656. ]