Skip to content

test: restore IndexingMath coverage lost in #55 - #56

Merged
toninorair merged 7 commits into
feat/new-version-of-common-libsfrom
fm/common-pr55-missing-tests
Sep 17, 2026
Merged

toninorair merged 7 commits into
feat/new-version-of-common-libsfrom
fm/common-pr55-missing-tests

Conversation

@PierrickGT

@PierrickGT PierrickGT commented Sep 17, 2026 •

Copy link
Copy Markdown
Member

No description provided.

Adds test/IndexingMath.t.sol pinning rounding, the DivisionByZero
branches, the uint256 scaling limit and the uint112 cap.

Also asserts both libraries share the same EXP_SCALED_ONE.
@CLAassistant

CLAassistant commented Sep 17, 2026 •

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
0 out of 2 committers have signed the CLA.

❌ Copilot
❌ PierrickGT
You have signed the CLA already but the status is still pending? Let us recheck it.

@github-actions

Copy link
Copy Markdown

Changes to gas cost

Generated at commit: 598f258d269fdd3a9cb3b3b076a5ef7c63c835e3, compared to commit: 4c9dc2559aefffd031260f8b292b8c71ec3bc308

🧾 Summary (20% most significant diffs)

Contract Method Avg (+/-) %
ERC20ExtendedHarness mint
transferFrom
+203 ❌
+218 ❌
+0.40%
+0.62%

Full diff report 👇
Contract Deployment Cost (+/-) Method Min (+/-) % Avg (+/-) % Median (+/-) % Max (+/-) % # Calls (+/-)
ERC20ExtendedHandler 766,606 (0) approve
burn
mint
transfer
transferFrom
31,355 (0)
41,828 (0)
381 (0)
477 (0)
488 (0)
0.00%
0.00%
0.00%
0.00%
0.00%
45,674 (-52)
46,264 (+28)
50,785 (+179)
58,550 (+845)
54,555 (+118)
-0.11%
+0.06%
+0.35%
+1.46%
+0.22%
51,303 (0)
44,691 (0)
62,063 (0)
60,908 (+12)
60,925 (0)
0.00%
0.00%
0.00%
+0.02%
0.00%
51,879 (0)
53,627 (0)
96,839 (0)
131,373 (-27)
133,743 (-252)
0.00%
0.00%
0.00%
-0.02%
-0.19%
12,915 (-6)
12,747 (-88)
12,917 (-32)
12,910 (-77)
12,762 (+203)
ERC20ExtendedHarness 1,677,854 (0) approve
burn
mint
permit
receiveWithAuthorization(address,address,uint256,uint256,uint256,bytes32,bytes)
receiveWithAuthorization(address,address,uint256,uint256,uint256,bytes32,bytes32,bytes32)
receiveWithAuthorization(address,address,uint256,uint256,uint256,bytes32,uint8,bytes32,bytes32)
transfer
transferFrom
transferWithAuthorization(address,address,uint256,uint256,uint256,bytes32,bytes)
transferWithAuthorization(address,address,uint256,uint256,uint256,bytes32,bytes32,bytes32)
transferWithAuthorization(address,address,uint256,uint256,uint256,bytes32,uint8,bytes32,bytes32)
26,013 (0)
24,108 (0)
28,461 (0)
23,844 (0)
60,782 (+28)
59,927 (+28)
29,183 (0)
24,109 (0)
24,594 (0)
60,642 (+56)
59,919 (+56)
29,086 (0)
0.00%
0.00%
0.00%
0.00%
+0.05%
+0.05%
0.00%
0.00%
0.00%
+0.09%
+0.09%
0.00%
41,084 (-29)
29,684 (+12)
50,772 (+203)
60,312 (-167)
83,490 (-139)
82,635 (-139)
80,116 (-132)
31,705 (+71)
35,634 (+218)
83,329 (-142)
82,607 (-140)
80,168 (-135)
-0.07%
+0.04%
+0.40%
-0.28%
-0.17%
-0.17%
-0.16%
+0.22%
+0.62%
-0.17%
-0.17%
-0.17%
45,973 (0)
28,711 (0)
51,365 (-24)
74,977 (+16)
83,838 (+12)
82,983 (+12)
83,204 (+20)
28,871 (0)
31,873 (0)
83,678 (+12)
82,955 (+12)
83,058 (+4)
0.00%
0.00%
-0.05%
+0.02%
+0.01%
+0.01%
+0.02%
0.00%
0.00%
+0.01%
+0.01%
+0.00%
46,537 (0)
34,695 (0)
68,873 (0)
75,861 (-20)
84,222 (0)
83,367 (0)
83,588 (0)
51,955 (0)
57,733 (-36)
84,062 (0)
83,339 (0)
83,450 (0)
0.00%
0.00%
0.00%
-0.03%
0.00%
0.00%
0.00%
0.00%
-0.06%
0.00%
0.00%
0.00%
14,769 (+22)
13,262 (-88)
15,219 (-51)
1,548 (0)
258 (0)
258 (0)
272 (0)
12,201 (+75)
11,116 (+150)
258 (0)
258 (0)
271 (0)
ERC20ExtendedUpgradeableHarness 1,964,420 (0) approve
burn
mint
permit
receiveWithAuthorization(address,address,uint256,uint256,uint256,bytes32,bytes)
receiveWithAuthorization(address,address,uint256,uint256,uint256,bytes32,bytes32,bytes32)
receiveWithAuthorization(address,address,uint256,uint256,uint256,bytes32,uint8,bytes32,bytes32)
transferFrom
transferWithAuthorization(address,address,uint256,uint256,uint256,bytes32,bytes)
transferWithAuthorization(address,address,uint256,uint256,uint256,bytes32,bytes32,bytes32)
transferWithAuthorization(address,address,uint256,uint256,uint256,bytes32,uint8,bytes32,bytes32)
4,725 (0)
2,789 (0)
7,154 (0)
862 (0)
41,138 (0)
40,798 (0)
9,766 (0)
2,936 (0)
41,087 (0)
40,770 (0)
9,689 (0)
0.00%
0.00%
0.00%
0.00%
0.00%
0.00%
0.00%
0.00%
0.00%
0.00%
0.00%
24,451 (+77)
7,683 (-43)
46,502 (-88)
40,434 (-192)
63,496 (-175)
63,156 (-175)
60,477 (-166)
15,199 (+8)
63,444 (-176)
63,127 (-176)
60,528 (-168)
+0.32%
-0.56%
-0.19%
-0.47%
-0.27%
-0.28%
-0.27%
+0.05%
-0.28%
-0.28%
-0.28%
24,625 (0)
7,176 (0)
46,954 (0)
55,898 (0)
63,858 (+20)
63,518 (+20)
63,557 (0)
8,262 (0)
63,787 (0)
63,470 (0)
63,419 (0)
0.00%
0.00%
0.00%
0.00%
+0.03%
+0.03%
0.00%
0.00%
0.00%
0.00%
0.00%
24,625 (0)
12,776 (0)
46,954 (0)
56,167 (0)
63,858 (0)
63,518 (0)
63,577 (0)
35,516 (0)
63,807 (0)
63,490 (0)
63,439 (0)
0.00%
0.00%
0.00%
0.00%
0.00%
0.00%
0.00%
0.00%
0.00%
0.00%
0.00%
1,033 (0)
515 (0)
3,612 (0)
1,548 (0)
258 (0)
258 (0)
272 (0)
775 (0)
258 (0)
258 (0)
271 (0)
ContractHelperHarness 221,136 (0) getContractFrom 697 (0) 0.00% 756 (+3) +0.40% 768 (0) 0.00% 781 (0) 0.00% 270 (0)
TransferHelperHarness 472,638 (0) safeApprove
safeTransfer
safeTransferExact
safeTransferExactFrom
safeTransferFrom
25,909 (0)
28,310 (0)
32,918 (0)
36,230 (0)
34,039 (0)
0.00%
0.00%
0.00%
0.00%
0.00%
37,084 (-46)
40,940 (-6)
68,150 (-1)
74,242 (-1)
47,080 (-6)
-0.12%
-0.01%
-0.00%
-0.00%
-0.01%
27,300 (+6)
29,679 (0)
68,274 (0)
74,383 (0)
34,839 (0)
+0.02%
0.00%
0.00%
0.00%
0.00%
48,875 (0)
53,780 (0)
80,919 (0)
87,024 (0)
59,931 (0)
0.00%
0.00%
0.00%
0.00%
0.00%
1,028 (0)
1,028 (0)
514 (0)
514 (0)
1,028 (0)
Proxy 0 (0) fallback 5,070 (0) 0.00% 37,846 (-36) -0.10% 16,681 (0) 0.00% 165,559 (0) 0.00% 19,346 (0)
Bytes32StringHarness 238,480 (0) toString 698 (0) 0.00% 7,883 (-4) -0.05% 9,321 (-330) -3.42% 11,261 (0) 0.00% 293 (0)
SignatureCheckerHarness 618,072 (0) isValidECDSASignature(address,bytes32,bytes32,bytes32) 938 (0) 0.00% 4,447 (+1) +0.02% 4,470 (0) 0.00% 4,486 (0) 0.00% 263 (0)

@github-actions

Copy link
Copy Markdown

LCOV of commit 52f3afd during Forge Coverage #173

Summary coverage rate:
  lines......: 95.4% (476 of 499 lines)
  functions..: 95.6% (153 of 160 functions)
  branches...: no data found

Files changed coverage rate: n/a

@toninorair

Copy link
Copy Markdown
Contributor

@copilot resolve the merge conflicts in this pull request

Copilot AI and others added 5 commits September 17, 2026 21:09
… into fm/common-pr55-missing-tests

# Conflicts:
#	test/IndexingMath.t.sol

Co-authored-by: toninorair <1220854+toninorair@users.noreply.github.com>
Co-authored-by: toninorair <1220854+toninorair@users.noreply.github.com>
Co-authored-by: toninorair <1220854+toninorair@users.noreply.github.com>
Co-authored-by: toninorair <1220854+toninorair@users.noreply.github.com>
Co-authored-by: toninorair <1220854+toninorair@users.noreply.github.com>

Copilot AI commented Sep 17, 2026

Copy link
Copy Markdown

@copilot resolve the merge conflicts in this pull request

Resolved in 3008784; the base branch has been merged into this PR and the conflict is fixed. Follow-up validation fixes are included on top, latest 9dee651.

Copilot AI requested a review from toninorair September 17, 2026 21:12
@PierrickGT
PierrickGT force-pushed the feat/new-version-of-common-libs branch from b1eb243 to 4c9dc25 Compare September 17, 2026 21:14
@toninorair
toninorair merged commit d21c0ef into feat/new-version-of-common-libs Sep 17, 2026
1 check was pending
@toninorair
toninorair deleted the fm/common-pr55-missing-tests branch September 17, 2026 21:15
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