consenlabs / tokenlon-contracts

Tokenlon is a decentralized exchange and payment settlement protocol based on blockchain technology. Visit https://tokenlon.im/
MIT License
87 stars 23 forks source link

[WIP] Implement a conditional swap #304

Open alex0207s opened 7 months ago

alex0207s commented 7 months ago
github-actions[bot] commented 7 months ago

Changes to gas cost

Generated at commit: 7ddad3f6ff01fcf3abc0359b3798f7345a4556f9, compared to commit: 2b54a4f7639fbe03fcf808def3fea0c96a82da26

๐Ÿงพ Summary (20% most significant diffs)

Contract Method Avg (+/-) %
AllowanceTarget spendFromUserTo
unpause
-978 โœ…
+10 โŒ
-1.97%
+0.04%

Full diff report ๐Ÿ‘‡
| Contract | Deployment Cost (+/-) | Method | Min (+/-) | % | Avg (+/-) | % | Median (+/-) | % | Max (+/-) | % | # Calls (+/-) | |:-|-:|:-|-:|-:|-:|-:|-:|-:|-:|-:|-:| | **AllowanceTarget** | 556,630 (-115,677) | _pause_
_spendFromUserTo_
_unpause_ | 23,543 (+121)
24,859 (-231)
23,433 (+10) | **+0.52%**
**-0.92%**
**+0.04%** | 26,260 (+6)
48,572 (-978)
23,433 (+10) | **+0.02%**
**-1.97%**
**+0.04%** | 27,619 (-52)
35,287 (-948)
23,433 (+10) | **-0.19%**
**-2.62%**
**+0.04%** | 27,619 (-52)
90,110 (-1,570)
23,433 (+10) | **-0.19%**
**-1.71%**
**+0.04%** | 3 (0)
7 (0)
1 (0) |
github-actions[bot] commented 7 months ago

Changes to gas cost

Generated at commit: 7ddad3f6ff01fcf3abc0359b3798f7345a4556f9, compared to commit: 2b54a4f7639fbe03fcf808def3fea0c96a82da26

๐Ÿงพ Summary (20% most significant diffs)

Contract Method Avg (+/-) %
CoordinatedTaker _EIP712_DOMAINSEPARATOR +323 โŒ +103.53%
LimitOrderSwap feeCollector
isOrderCanceled
+279 โŒ
+250 โŒ
+69.06%
+49.31%
RFQ feeCollector +169 โŒ +39.67%

Full diff report ๐Ÿ‘‡
| Contract | Deployment Cost (+/-) | Method | Min (+/-) | % | Avg (+/-) | % | Median (+/-) | % | Max (+/-) | % | # Calls (+/-) | |:-|-:|:-|-:|-:|-:|-:|-:|-:|-:|-:|-:| | **CoordinatedTaker** | 2,171,184 (-253,387) | _EIP712_DOMAIN_SEPARATOR_
_approveTokens_
_coordinator_
_setCoordinator_
_submitLimitOrderFill_ | 635 (+323)
26,902 (-201)
309 (-86)
23,948 (+205)
32,959 (-161) | **+103.53%**
**-0.74%**
**-21.77%**
**+0.86%**
**-0.49%** | 635 (+323)
171,637 (-2,082)
309 (-86)
26,105 (+195)
127,657 (-837) | **+103.53%**
**-1.20%**
**-21.77%**
**+0.75%**
**-0.65%** | 635 (+323)
195,414 (-2,364)
309 (-86)
24,160 (+218)
70,206 (+162) | **+103.53%**
**-1.20%**
**-21.77%**
**+0.91%**
**+0.23%** | 635 (+323)
195,414 (-2,364)
309 (-86)
30,208 (+162)
254,339 (-2,452) | **+103.53%**
**-1.20%**
**-21.77%**
**+0.54%**
**-0.95%** | 2 (0)
13 (0)
1 (0)
3 (0)
7 (0) | | **LimitOrderSwap** | 2,478,463 (-282,079) | _cancelOrder_
_feeCollector_
_fillLimitOrder_
_fillLimitOrderFullOrKill_
_fillLimitOrderGroup_
_isOrderCanceled_
_orderHashToMakerTokenFilledAmount_
_setFeeCollector_ | 29,542 (+285)
683 (+279)
35,994 (-120)
48,460 (+224)
197,763 (-606)
757 (+250)
409 (-64)
23,954 (+161) | **+0.97%**
**+69.06%**
**-0.33%**
**+0.46%**
**-0.31%**
**+49.31%**
**-13.53%**
**+0.68%** | 41,020 (+350)
683 (+279)
1,425,103 (-1,374)
103,450 (-584)
241,775 (-1,437)
757 (+250)
409 (-64)
26,113 (+149) | **+0.86%**
**+69.06%**
**-0.10%**
**-0.56%**
**-0.59%**
**+49.31%**
**-13.53%**
**+0.57%** | 34,298 (+442)
683 (+279)
167,541 (-1,205)
48,460 (+224)
244,033 (-1,993)
757 (+250)
409 (-64)
24,166 (+168) | **+1.31%**
**+69.06%**
**-0.71%**
**+0.46%**
**-0.81%**
**+49.31%**
**-13.53%**
**+0.70%** | 53,111 (+350)
683 (+279)
29,535,125 (-74)
213,430 (-2,200)
290,253 (-1,950)
757 (+250)
409 (-64)
30,220 (+118) | **+0.66%**
**+69.06%**
**-0.00%**
**-1.02%**
**-0.67%**
**+49.31%**
**-13.53%**
**+0.39%** | 7 (0)
1 (0)
23 (0)
3 (0)
6 (0)
1 (0)
1 (0)
3 (0) | | **RFQ** | 2,288,875 (-226,570) | _cancelRFQOffer_
_feeCollector_
_fillRFQ_
_fillRFQWithSig_
_setFeeCollector_ | 24,057 (+91)
595 (+169)
31,500 (-318)
33,861 (-20)
23,882 (+111) | **+0.38%**
**+39.67%**
**-1.00%**
**-0.06%**
**+0.47%** | 37,968 (+87)
595 (+169)
129,595 (-1,185)
112,784 (-621)
26,045 (+103) | **+0.23%**
**+39.67%**
**-0.91%**
**-0.55%**
**+0.40%** | 38,972 (+99)
595 (+169)
146,767 (-1,192)
77,945 (+322)
24,100 (+124) | **+0.25%**
**+39.67%**
**-0.81%**
**+0.41%**
**+0.52%** | 49,874 (+60)
595 (+169)
237,435 (-1,329)
226,548 (-2,165)
30,154 (+74) | **+0.12%**
**+39.67%**
**-0.56%**
**-0.95%**
**+0.25%** | 4 (0)
1 (0)
22 (0)
3 (0)
3 (0) | | **GenericSwap** | 1,628,217 (-201,686) | _executeSwap_
_executeSwapWithSig_ | 31,972 (-197)
39,540 (+167) | **-0.61%**
**+0.42%** | 115,998 (-1,473)
167,013 (-1,260) | **-1.25%**
**-0.75%** | 113,242 (-1,713)
173,729 (-1,260) | **-1.49%**
**-0.72%** | 249,048 (-2,838)
281,054 (-2,688) | **-1.13%**
**-0.95%** | 12 (0)
4 (0) | | **SmartOrderStrategy** | 1,120,367 (-199,973) | _approveTokens_
_executeStrategy_ | 57,862 (-674)
23,225 (-28) | **-1.15%**
**-0.12%** | 177,429 (-2,198)
125,381 (-1,049) | **-1.22%**
**-0.83%** | 279,916 (-3,505)
83,952 (-269) | **-1.24%**
**-0.32%** | 279,916 (-3,505)
608,822 (-1,623) | **-1.24%**
**-0.27%** | 26 (0)
14 (0) | | **UniAgent** | 1,448,615 (-124,542) | _approveAndSwap_
_approveTokensToRouters_
_swap_ | 36,730 (-457)
100,515 (-624)
116,163 (-780) | **-1.23%**
**-0.62%**
**-0.67%** | 144,976 (-810)
177,613 (-1,604)
188,617 (-817) | **-0.56%**
**-0.90%**
**-0.43%** | 174,801 (-986)
183,121 (-1,674)
190,894 (-912) | **-0.56%**
**-0.91%**
**-0.48%** | 223,399 (-986)
183,121 (-1,674)
249,942 (-858) | **-0.44%**
**-0.91%**
**-0.34%** | 3 (0)
15 (0)
12 (0) |