Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/build memo with ton #368

Merged
merged 24 commits into from
Dec 11, 2024
Merged

Feat/build memo with ton #368

merged 24 commits into from
Dec 11, 2024

Conversation

haunv3
Copy link
Contributor

@haunv3 haunv3 commented Nov 21, 2024

  • add Universal swap TON

Copy link

github-actions bot commented Dec 6, 2024

badge

Code Coverage Summary

Filename                                                                      Stmts    Miss  Cover    Missing
--------------------------------------------------------------------------  -------  ------  -------  ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
docs/assets/main.js                                                              58      58  0.00%    1-58
docs/assets/search.js                                                             1       1  0.00%    1
packages/ibc-routing/hardhat.config.ts                                           59      59  0.00%    1-75
packages/ibc-routing/src/db.ts                                                  158     158  0.00%    1-263
packages/ibc-routing/src/event.ts                                                85      85  0.00%    1-122
packages/ibc-routing/src/index.ts                                                31      31  0.00%    1-56
packages/ibc-routing/src/machine.ts                                              30      30  0.00%    1-34
packages/ibc-routing/test/mock-eth-ws.ts                                         52      52  0.00%    1-55
packages/ibc-routing/test/mock-tendermint-ws.spec.ts                             25      17  32.00%   7-24
packages/oraidex-common/src/alpha-network.ts                                     96       0  100.00%
packages/oraidex-common/src/axios-request.ts                                     11      11  0.00%    1-20
packages/oraidex-common/src/bigdecimal.ts                                       139      50  64.02%   23-24, 30-33, 40-41, 45-54, 63-65, 71-73, 120-124, 127-146, 149-150, 153-154, 180-181, 184-185
packages/oraidex-common/src/celestia-network.ts                                  52       0  100.00%
packages/oraidex-common/src/constant.ts                                         215       0  100.00%
packages/oraidex-common/src/helper.ts                                           491     151  69.24%   142-143, 146-157, 160-170, 268-270, 287-294, 297-310, 320-326, 336-351, 354-361, 364-394, 397-405, 408-410, 413-415, 419-428, 437-451, 457-459, 544-545, 570-573, 621-623, 626-628, 631-633
packages/oraidex-common/src/ibc-info.ts                                         184     184  0.00%    1-218
packages/oraidex-common/src/index.ts                                             14      14  0.00%    1-14
packages/oraidex-common/src/network.ts                                         1153       0  100.00%
packages/oraidex-common/src/pairs.ts                                            160       4  97.50%   157-158, 163-164
packages/oraidex-common/src/token.ts                                             71       0  100.00%
packages/oraidex-common/src/wallet.ts                                           146     146  0.00%    1-236
packages/oraidex-common/src/config/chainInfosWithIcon.ts                        208     208  0.00%    1-222
packages/oraidex-common/src/interface/index.ts                                    1       1  0.00%    1
packages/oraidex-common/src/interface/wallet.ts                                  21      21  0.00%    1-22
packages/oraidex-common/tests/bigdecimal.spec.ts                                220       0  100.00%
packages/oraidex-common/tests/helper.spec.ts                                    561      10  98.21%   97-98, 337-338, 628-629, 644-645, 660-661
packages/oraidex-common/tests/pairs.spec.ts                                      24       0  100.00%
packages/oraiswap-v3/src/const.ts                                                11       0  100.00%
packages/oraiswap-v3/src/error.ts                                                15       6  60.00%   3-4, 9-10, 15-16
packages/oraiswap-v3/src/handler.ts                                             292      28  90.41%   63-64, 100-101, 216-217, 341-355, 358-366
packages/oraiswap-v3/src/helpers.ts                                             467     257  44.96%   122-123, 133-134, 159-160, 188-189, 199-200, 283-287, 290-297, 300-356, 359-364, 367-376, 380-436, 439-447, 450-481, 484-497, 505-545, 548-554, 557-581
packages/oraiswap-v3/src/index.ts                                                 7       0  100.00%
packages/oraiswap-v3/src/main.ts                                                 32      32  0.00%    1-67
packages/oraiswap-v3/src/types.ts                                                 9       0  100.00%
packages/oraiswap-v3/src/zap-consumer.ts                                        394     370  6.09%    80-127, 135-137, 147-174, 184-197, 215-286, 302-522, 534-581
packages/oraiswap-v3/src/wasm/oraiswap_v3_wasm.d.ts                              32      32  0.00%    469-500
packages/oraiswap-v3/src/wasm/oraiswap_v3_wasm.js                              1543     369  76.08%   32-34, 92-94, 100-101, 103-108, 113-120, 136-145, 160-223, 249-250, 278-279, 307-308, 336-337, 365-366, 394-395, 423-424, 463-464, 496-497, 525-526, 543-544, 565-579, 723-724, 748-749, 770-771, 783-786, 801-802, 832-833, 863-864, 884-885, 910-911, 929-953, 958-961, 966-969, 976-979, 984-987, 992-995, 1002-1005, 1010-1013, 1028-1031, 1036-1039, 1044-1047, 1062-1065, 1080-1083, 1088-1091, 1096-1099, 1106-1109, 1114-1117, 1122-1125, 1132-1135, 1149-1150, 1161-1164, 1170-1173, 1188-1191, 1196-1199, 1204-1207, 1214-1217, 1219-1225, 1300-1301, 1329-1330, 1333-1335, 1356-1361, 1364-1365, 1368-1372, 1386-1387, 1390-1391, 1394-1395, 1398-1399, 1402-1403, 1406-1407, 1410-1413, 1416-1417, 1420-1421, 1424-1425, 1428-1431, 1434-1437, 1444, 1447-1448, 1451-1458, 1465-1466, 1469-1470, 1473-1474, 1477, 1480-1481, 1484-1491, 1500-1504, 1507, 1510-1511
packages/oraiswap-v3/tests/handler.spec.ts                                      280       0  100.00%
packages/oraiswap-v3/tests/helpers.spec.ts                                      577       0  100.00%
packages/oraiswap-v3/tests/test-common.ts                                        97       0  100.00%
packages/oraiswap-v3/tests/wasm-bindgen.spec.ts                                 368       3  99.18%   450-452
packages/oraiswap-v3/tests/zap-consumer.spec.ts                                 209       0  100.00%
packages/universal-swap/src/handler.ts                                         1035     661  36.13%   87-88, 107-108, 115-116, 119, 133-135, 141-144, 166-171, 192-214, 294-323, 333-340, 354-431, 435-466, 470-489, 492-509, 513-570, 575-659, 665-754, 757-812, 814-899, 903-909, 952-970, 991-994, 1000, 1058-1082, 1100-1103, 1110-1120, 1125-1145, 1186-1187, 1200-1243, 1306-1307
packages/universal-swap/src/helper.ts                                          1058     442  58.22%   92-94, 233-234, 255-256, 270-271, 285-290, 318-319, 330-331, 334-335, 422-443, 452-454, 456-498, 512-566, 607-609, 634-640, 666-668, 672-674, 681-712, 769-770, 803-811, 818-859, 871-931, 970-971, 986, 1014, 1021-1044, 1046-1047, 1089-1090, 1094-1097, 1107-1149, 1157-1173, 1232-1242, 1253-1258, 1277, 1296-1332, 1404-1448
packages/universal-swap/src/index.ts                                              6       6  0.00%    1-6
packages/universal-swap/src/swap-filter.ts                                       40       0  100.00%
packages/universal-swap/src/types.ts                                             14       0  100.00%
packages/universal-swap/src/wrapper.ts                                           79      79  0.00%    1-117
packages/universal-swap/src/msg/common.ts                                        34      12  64.70%   11-12, 16-17, 20-21, 24-25, 30-31, 33-34
packages/universal-swap/src/msg/index.ts                                          4       0  100.00%
packages/universal-swap/src/msg/msgs.ts                                         134      50  62.68%   25-26, 47-48, 71-78, 93-103, 105-108, 114-115, 129-130, 145-167
packages/universal-swap/src/msg/types.ts                                          6       0  100.00%
packages/universal-swap/src/msg/chains/chain.ts                                  20       4  80.00%   18-19, 22-23
packages/universal-swap/src/msg/chains/cosmos.ts                                111      14  87.38%   22-23, 27-28, 54-55, 59-60, 64-65, 102-103, 127-128
packages/universal-swap/src/msg/chains/index.ts                                   3       0  100.00%
packages/universal-swap/src/msg/chains/oraichain.ts                             518      92  82.23%   44-45, 55-56, 78-101, 129-135, 152, 185-191, 235, 289-315, 354, 511-514, 541-542, 628-645
packages/universal-swap/src/msg/chains/osmosis.ts                               232     117  49.56%   27-28, 38-39, 78-79, 96, 112-117, 133, 147-165, 169-174, 213-305
packages/universal-swap/src/proto/index.ts                                        1       1  0.00%    1
packages/universal-swap/src/proto/universal-swap-memo-proto-handler.ts           66      60  9.09%    21-46, 50-91
packages/universal-swap/src/proto/universal_swap_memo.ts                        918     724  21.13%   106-108, 131-179, 182-189, 192-209, 212-213, 215-228, 231-233, 244-264, 267-272, 275-280, 283-284, 286-289, 292-294, 298-302, 305-325, 328-331, 334-339, 342-343, 345-348, 351-353, 357-364, 367-394, 397-403, 406-414, 417-418, 420-424, 427-429, 446-480, 483-488, 491-502, 505-506, 508-513, 516-518, 529-530, 535-569, 572-581, 584-595, 598-599, 601-612, 615-617, 637-678, 681-689, 692-706, 709-710, 712-730, 733-735, 758-806, 809-816, 819-836, 839-840, 842-849, 852-854, 868-869, 877-925, 928-935, 938-955, 958-959, 961-968, 971-973, 987-1014, 1017-1021, 1024-1032, 1035-1036, 1038-1042, 1045-1047, 1058-1078, 1081-1082, 1085-1090, 1093-1094, 1096-1099, 1119-1127, 1130-1136
packages/universal-swap/src/universal-demos/alpha-ibc-new.ts                     78      78  0.00%    1-90
packages/universal-swap/src/universal-demos/alpha-smart-router.ts                79      79  0.00%    1-88
packages/universal-swap/src/universal-demos/decode-memo.ts                       16      16  0.00%    1-19
packages/universal-swap/src/universal-demos/evm-to-evm.ts                        52      52  0.00%    1-68
packages/universal-swap/src/universal-demos/from-cosmos-to-cosmos.ts             42      42  0.00%    1-54
packages/universal-swap/src/universal-demos/from-cosmos-to-evm.ts                41      41  0.00%    1-53
packages/universal-swap/src/universal-demos/from-oraichain-to-evm.ts             41      41  0.00%    1-60
packages/universal-swap/src/universal-demos/from-oraichain-to-oraichain.ts       54      54  0.00%    1-71
packages/universal-swap/src/universal-demos/from-oraichain-to-ton.ts             95      95  0.00%    1-110
packages/universal-swap/src/universal-demos/from-ton-to-oraichain.ts             92      92  0.00%    1-100
packages/universal-swap/src/universal-demos/handle-simulate-swap.ts              31      31  0.00%    1-35
packages/universal-swap/src/universal-demos/ibc-hooks-demo.ts                    40      40  0.00%    1-55
packages/universal-swap/src/universal-demos/neutaro-ibc-demo.ts                  40      40  0.00%    1-47
packages/universal-swap/src/universal-demos/noble-ibc-demo.ts                    41      41  0.00%    1-45
packages/universal-swap/src/universal-demos/offline-wallet.ts                    19      19  0.00%    1-21
packages/universal-swap/tests/helper.spec.ts                                    714      27  96.21%   344, 355-357, 968-990
packages/universal-swap/tests/index.spec.ts                                    1114      30  97.30%   240-243, 286-287, 292-293, 295-296, 298-299, 1147-1166
packages/universal-swap/tests/smart-router-common.ts                            864       0  100.00%
packages/universal-swap/tests/test-common.ts                                     56       0  100.00%
packages/universal-swap/tests/msg/comos-msg.spec.ts                             208       0  100.00%
packages/universal-swap/tests/msg/msgs.spec.ts                                  580       0  100.00%
packages/universal-swap/tests/msg/oraichain-msg.spec.ts                         840       2  99.76%   124-125
packages/universal-swap/tests/msg/osmosis-msg.spec.ts                           357       0  100.00%
packages/universal-swap/tests/msg/test-data.ts                                    8       8  0.00%    1-9
TOTAL                                                                         18380    5478  70.19%

Diff against main

Filename                                                                      Stmts    Miss  Cover
--------------------------------------------------------------------------  -------  ------  --------
packages/oraidex-common/src/alpha-network.ts                                    +35       0  +100.00%
packages/oraidex-common/src/constant.ts                                         +24       0  +100.00%
packages/oraidex-common/src/helper.ts                                           +25      +9  -0.28%
packages/oraidex-common/src/network.ts                                          +86       0  +100.00%
packages/oraidex-common/src/interface/wallet.ts                                  +2      +2  +100.00%
packages/oraidex-common/tests/helper.spec.ts                                     +1      +2  -0.36%
packages/universal-swap/src/handler.ts                                          +85     +72  -1.87%
packages/universal-swap/src/helper.ts                                           +14      +9  -0.30%
packages/universal-swap/src/msg/chains/oraichain.ts                            +106     +15  +0.92%
packages/universal-swap/src/proto/universal_swap_memo.ts                         +7      -3  +0.94%
packages/universal-swap/src/universal-demos/alpha-ibc-new.ts                    -40     -40  +100.00%
packages/universal-swap/src/universal-demos/alpha-smart-router.ts                +1      +1  +100.00%
packages/universal-swap/src/universal-demos/decode-memo.ts                       +3      +3  +100.00%
packages/universal-swap/src/universal-demos/from-cosmos-to-cosmos.ts            +42     +42  +100.00%
packages/universal-swap/src/universal-demos/from-oraichain-to-evm.ts             -1      -1  +100.00%
packages/universal-swap/src/universal-demos/from-oraichain-to-oraichain.ts       +5      +5  +100.00%
packages/universal-swap/src/universal-demos/from-oraichain-to-ton.ts            +95     +95  +100.00%
packages/universal-swap/src/universal-demos/from-ton-to-oraichain.ts            +92     +92  +100.00%
packages/universal-swap/tests/msg/oraichain-msg.spec.ts                        +151       0  +0.06%
TOTAL                                                                          +733    +303  -0.48%

Results for commit: b7faa0c

Minimum allowed coverage is 0%

♻️ This comment has been updated with latest results

@haunv3 haunv3 merged commit eb14329 into main Dec 11, 2024
4 checks passed
@haunv3 haunv3 deleted the feat/build-memo-with-ton branch December 11, 2024 10:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants