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

refactor: Rename methods #17

Merged
merged 2 commits into from
Jul 2, 2024
Merged

Conversation

toninorair
Copy link
Contributor

@toninorair toninorair commented Jun 25, 2024

Simplify names and order them by logic - wrap, unwrap, _burn, _mint

Copy link

github-actions bot commented Jun 25, 2024

Changes to gas cost

Generated at commit: 9ffebcf1b390aae09ca441c69bf83e013537b4de, compared to commit: d2c1aa4f5143cbbdf49f1f17ca3290c7fe37689e

🧾 Summary (20% most significant diffs)

Contract Method Avg (+/-) %
WrappedMTokenHarness isEarning
setIndexOf
+148 ❌
+463 ❌
+19.05%
+7.82%
WrappedMToken accruedYieldOf
balanceOf
+163 ❌
-53 ✅
+11.07%
-5.58%

Full diff report 👇
Contract Deployment Cost (+/-) Method Min (+/-) % Avg (+/-) % Median (+/-) % Max (+/-) % # Calls (+/-)
WrappedMTokenHarness 3,037,437 (+54,445) balanceOf
implementation
indexOfTotalEarningSupply
internalBalanceOf
isEarning
principalOfTotalEarningSupply
setIndexOf
setIndexOfTotalEarningSupply
setTotalNonEarningSupply
startEarningFor
stopEarningFor
totalEarningSupply
totalSupply
transfer
824 (-6)
381 (-22)
438 (+44)
874 (+11)
814 (+48)
423 (+23)
6,381 (+463)
5,401 (+23)
5,367 (-44)
8,987 (+45)
8,925 (-22)
743 (+23)
982 (-22)
5,984 (-44)
-0.72%
-5.46%
+11.17%
+1.27%
+6.27%
+5.75%
+7.82%
+0.43%
-0.81%
+0.50%
-0.25%
+3.19%
-2.19%
-0.73%
972 (+7)
381 (-22)
438 (+44)
878 (+15)
925 (+148)
2,392 (+23)
6,381 (+463)
5,401 (+23)
22,275 (-44)
25,611 (+66)
29,615 (-307)
743 (+23)
1,782 (-22)
26,725 (+650)
+0.73%
-5.46%
+11.17%
+1.74%
+19.05%
+0.97%
+7.82%
+0.43%
-0.20%
+0.26%
-1.03%
+3.19%
-1.22%
+2.49%
1,047 (-8)
381 (-22)
438 (+44)
874 (+11)
925 (+148)
2,423 (+23)
6,381 (+463)
5,401 (+23)
22,467 (-44)
18,108 (+83)
29,615 (-307)
743 (+23)
982 (-22)
25,884 (-8)
-0.76%
-5.46%
+11.17%
+1.27%
+19.05%
+0.96%
+7.82%
+0.43%
-0.20%
+0.46%
-1.03%
+3.19%
-2.19%
-0.03%
1,047 (-8)
381 (-22)
438 (+44)
1,097 (+211)
1,037 (+248)
2,423 (+23)
6,381 (+463)
5,401 (+23)
22,467 (-44)
49,738 (+68)
50,305 (-593)
743 (+23)
2,982 (-22)
42,984 (-8)
-0.76%
-5.46%
+11.17%
+23.81%
+31.43%
+0.96%
+7.82%
+0.43%
-0.20%
+0.14%
-1.17%
+3.19%
-0.73%
-0.02%
6 (+1)
1 (0)
260 (0)
532 (0)
2 (0)
263 (0)
1 (-7)
8 (0)
268 (0)
3 (0)
2 (0)
12 (0)
5 (0)
264 (0)
WrappedMToken 2,838,513 (+4,140) accruedYieldOf
balanceOf
claimExcess
claimFor
excess
startEarningFor
stopEarningFor
transfer
930 (+6)
779 (-51)
16,363 (-104)
27,672 (+918)
3,864 (-104)
32,552 (+23)
42,237 (+544)
44,572 (+1,336)
+0.65%
-6.14%
-0.63%
+3.43%
-2.62%
+0.07%
+1.30%
+3.09%
1,635 (+163)
897 (-53)
16,363 (-104)
27,672 (+918)
3,876 (-104)
40,062 (+23)
42,237 (+544)
44,575 (+1,325)
+11.07%
-5.58%
-0.63%
+3.43%
-2.61%
+0.06%
+1.30%
+3.06%
2,294 (+416)
1,002 (-53)
16,363 (-104)
27,672 (+918)
3,880 (-104)
43,817 (+23)
42,237 (+544)
44,575 (+1,325)
+22.15%
-5.02%
-0.63%
+3.43%
-2.61%
+0.05%
+1.30%
+3.06%
2,294 (+187)
1,002 (-53)
16,363 (-104)
27,672 (+918)
3,880 (-104)
43,817 (+23)
42,237 (+544)
44,578 (+1,314)
+8.88%
-5.02%
-0.63%
+3.43%
-2.61%
+0.05%
+1.30%
+3.04%
29 (0)
30 (0)
1 (0)
1 (0)
18 (0)
3 (0)
1 (0)
2 (0)

Copy link

github-actions bot commented Jun 25, 2024

LCOV of commit cbfd935 during Forge Coverage #89

Summary coverage rate:
  lines......: 95.1% (135 of 142 lines)
  functions..: 93.6% (44 of 47 functions)
  branches...: no data found

Files changed coverage rate:
                           |Lines       |Functions  |Branches    
  Filename                 |Rate     Num|Rate    Num|Rate     Num
  ===============================================================
  src/WrappedMToken.sol    |98.3%    118|97.1%    35|    -      0

src/WrappedM.sol Outdated Show resolved Hide resolved
src/WrappedM.sol Outdated Show resolved Hide resolved
src/WrappedM.sol Outdated Show resolved Hide resolved
src/interfaces/IWrappedM.sol Outdated Show resolved Hide resolved
@toninorair toninorair force-pushed the feat/fixes-suggestions branch from a01eef1 to e091fd4 Compare June 25, 2024 18:28
@toninorair toninorair changed the title Suggestions Rename methods Jun 25, 2024
@toninorair toninorair requested a review from deluca-mike June 25, 2024 18:30
@deluca-mike deluca-mike force-pushed the feat/fixes-suggestions branch from e091fd4 to d742261 Compare June 27, 2024 14:04
@deluca-mike deluca-mike changed the base branch from main to feat/test-cleanup June 27, 2024 14:04
@deluca-mike deluca-mike changed the title Rename methods refactor: Rename methods Jun 27, 2024
@deluca-mike deluca-mike force-pushed the feat/fixes-suggestions branch 3 times, most recently from f5f3f4c to 1ad5b73 Compare June 27, 2024 14:36
src/WrappedMToken.sol Outdated Show resolved Hide resolved
src/WrappedMToken.sol Outdated Show resolved Hide resolved
src/WrappedMToken.sol Show resolved Hide resolved
src/WrappedMToken.sol Outdated Show resolved Hide resolved
src/WrappedMToken.sol Outdated Show resolved Hide resolved
@toninorair toninorair marked this pull request as draft July 1, 2024 14:30
@toninorair toninorair marked this pull request as ready for review July 2, 2024 16:04
@deluca-mike deluca-mike force-pushed the feat/fixes-suggestions branch from 1ad5b73 to 72ceab3 Compare July 2, 2024 16:21
* refactor: Auto `_setBalanceInfo`
@deluca-mike deluca-mike merged commit 02e3e44 into feat/test-cleanup Jul 2, 2024
2 checks passed
@deluca-mike deluca-mike deleted the feat/fixes-suggestions branch July 2, 2024 16:54
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.

3 participants