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

Chore/increase test coverage and add natspec #317

Closed alex0207s closed 2 months ago

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

Changes to gas cost

Generated at commit: 58248155279e942d9175e334d673e4d9e9bff123, compared to commit: 019650b2eaf9c86d0e3fce3c04acfe001f5f4cd9

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

Contract Method Avg (+/-) %
AllowanceTarget spendFromUserTo
unpause
+1,756 โŒ
+2,113 โŒ
+3.55%
+9.02%

Full diff report ๐Ÿ‘‡
| Contract | Deployment Cost (+/-) | Method | Min (+/-) | % | Avg (+/-) | % | Median (+/-) | % | Max (+/-) | % | # Calls (+/-) | |:-|-:|:-|-:|-:|-:|-:|-:|-:|-:|-:|-:| | **AllowanceTarget** | 613,454 (0) | _pause_
_spendFromUserTo_
_unpause_ | 23,422 (0)
25,029 (0)
23,423 (0) | **0.00%**
**0.00%**
**0.00%** | 26,608 (+354)
51,264 (+1,756)
25,536 (+2,113) | **+1.35%**
**+3.55%**
**+9.02%** | 27,671 (0)
49,849 (+13,708)
25,536 (+2,113) | **0.00%**
**+37.93%**
**+9.02%** | 27,671 (0)
91,606 (0)
27,649 (+4,226) | **0.00%**
**0.00%**
**+18.04%** | 4 (+1)
8 (+1)
2 (+1) |
github-actions[bot] commented 2 months ago

Changes to gas cost

Generated at commit: 58248155279e942d9175e334d673e4d9e9bff123, compared to commit: 019650b2eaf9c86d0e3fce3c04acfe001f5f4cd9

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

Contract Method Avg (+/-) %
LimitOrderSwap fillLimitOrder
fillLimitOrderGroup
-246,932 โœ…
-68,112 โœ…
-17.31%
-28.05%

Full diff report ๐Ÿ‘‡
| Contract | Deployment Cost (+/-) | Method | Min (+/-) | % | Avg (+/-) | % | Median (+/-) | % | Max (+/-) | % | # Calls (+/-) | |:-|-:|:-|-:|-:|-:|-:|-:|-:|-:|-:|-:| | **LimitOrderSwap** | 2,730,640 (+36,206) | _fillLimitOrder_
_fillLimitOrderFullOrKill_
_fillLimitOrderGroup_ | 36,094 (0)
48,304 (+42)
31,168 (-166,968) | **0.00%**
**+0.09%**
**-84.27%** | 1,179,473 (-246,932)
104,056 (+34)
174,739 (-68,112) | **-17.31%**
**+0.03%**
**-28.05%** | 161,770 (-6,889)
48,304 (+42)
198,266 (-47,337) | **-4.08%**
**+0.09%**
**-19.27%** | 29,534,880 (+1)
215,562 (+19)
291,975 (+195) | **+0.00%**
**+0.01%**
**+0.07%** | 28 (+5)
3 (0)
9 (+3) | | **RFQ** | 2,465,421 (+21,622) | _cancelRFQOffer_
_feeCollector_
_fillRFQ_
_setFeeCollector_ | 23,996 (+22)
382 (-44)
31,822 (0)
23,793 (+22) | **+0.09%**
**-10.33%**
**0.00%**
**+0.09%** | 37,923 (+22)
382 (-44)
131,171 (+1,527)
25,964 (+22) | **+0.06%**
**-10.33%**
**+1.18%**
**+0.08%** | 38,918 (+22)
382 (-44)
147,976 (0)
23,998 (+22) | **+0.06%**
**-10.33%**
**0.00%**
**+0.09%** | 49,859 (+22)
382 (-44)
238,908 (+15,387)
30,102 (+22) | **+0.04%**
**-10.33%**
**+6.88%**
**+0.07%** | 4 (0)
2 (+1)
24 (+2)
3 (0) | | **SmartOrderStrategy** | 1,226,691 (0) | _approveTokens_
_executeStrategy_ | 56,282 (0)
23,234 (0) | **0.00%**
**0.00%** | 185,084 (+10,734)
123,683 (+3,118) | **+6.16%**
**+2.59%** | 268,806 (0)
90,796 (+51,578) | **0.00%**
**+131.52%** | 268,806 (0)
610,220 (0) | **0.00%**
**0.00%** | 33 (+6)
18 (+3) | | **CoordinatedTaker** | 2,367,349 (+1,248) | _approveTokens_
_submitLimitOrderFill_ | 27,095 (0)
33,103 (0) | **0.00%**
**0.00%** | 169,261 (+3,043)
128,473 (+9) | **+1.83%**
**+0.01%** | 189,038 (0)
70,073 (0) | **0.00%**
**0.00%** | 189,038 (0)
256,667 (+19) | **0.00%**
**+0.01%** | 15 (+2)
7 (0) | | **GenericSwap** | 1,756,522 (+22,941) | _executeSwap_
_executeSwapWithSig_ | 32,322 (+45)
39,528 (+44) | **+0.14%**
**+0.11%** | 117,670 (+45)
168,429 (+44) | **+0.04%**
**+0.03%** | 115,374 (+45)
175,155 (+44) | **+0.04%**
**+0.03%** | 252,012 (+45)
283,880 (+44) | **+0.02%**
**+0.02%** | 12 (0)
4 (0) |