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

Chore/remove unnecessary code #167

Merged
merged 3 commits into from
Sep 18, 2024
Merged

Conversation

livingrockrises
Copy link
Contributor

No description provided.

Copy link

github-actions bot commented Sep 14, 2024

Changes to gas cost

Generated at commit: 0bac8e5d330b3da1e9285db1d168a1d496685e04, compared to commit: 7f8410d6f8037b698b9dd08e6da9008cbd30418a

🧾 Summary (5% most significant diffs)

Contract Method Avg (+/-) %
Nexus isModuleInstalled +68 ❌ +6.06%
MockValidator isOwner +36 ❌ +5.19%
MockNFT ownerOf +24 ❌ +4.35%

Full diff report 👇
Contract Deployment Cost (+/-) Method Min (+/-) % Avg (+/-) % Median (+/-) % Max (+/-) % # Calls (+/-)
Nexus 4,839,712 (-1,324,448) accountId
execute
executeFromExecutor
initializeAccount
installModule
isModuleInstalled
uninstallModule
validateUserOp
612 (+3)
6,426 (+102)
14,878 (+177)
114,400 (+573)
32,738 (+345)
865 (+12)
5,868 (+255)
13,973 (+204)
+0.49%
+1.61%
+1.20%
+0.50%
+1.07%
+1.41%
+4.54%
+1.48%
612 (+3)
49,401 (+278)
20,478 (+313)
134,235 (+573)
38,463 (+335)
1,191 (+68)
10,594 (+277)
15,546 (+205)
+0.49%
+0.57%
+1.55%
+0.43%
+0.88%
+6.06%
+2.68%
+1.34%
612 (+3)
38,126 (+102)
20,406 (+313)
134,300 (+573)
40,099 (+291)
1,168 (+69)
12,435 (+314)
13,973 (+204)
+0.49%
+0.27%
+1.56%
+0.43%
+0.73%
+6.28%
+2.59%
+1.48%
612 (+3)
143,204 (+102)
26,224 (+450)
134,300 (+573)
44,417 (+411)
3,212 (+69)
12,436 (+262)
42,860 (+228)
+0.49%
+0.07%
+1.75%
+0.43%
+0.93%
+2.20%
+2.15%
+0.53%
8 (0)
76 (0)
4 (0)
309 (0)
23 (0)
331 (0)
6 (0)
351 (0)
MockValidator 979,436 (-106,401) isOwner 730 (+36) +5.19% 730 (+36) +5.19% 730 (+36) +5.19% 730 (+36) +5.19% 275 (0)
MockNFT 1,047,839 (-248,530) balanceOf
mint
ownerOf
transferFrom
634 (+36)
68,539 (+99)
576 (+24)
37,741 (+201)
+6.02%
+0.14%
+4.35%
+0.54%
1,634 (+36)
68,683 (+99)
576 (+24)
46,291 (+201)
+2.25%
+0.14%
+4.35%
+0.44%
1,634 (+36)
68,755 (+99)
576 (+24)
46,291 (+201)
+2.25%
+0.14%
+4.35%
+0.44%
2,634 (+36)
68,755 (+99)
576 (+24)
54,841 (+201)
+1.39%
+0.14%
+4.35%
+0.37%
12 (0)
18 (0)
12 (0)
2 (0)
BootstrapLib 328,393 (-49,647) createArrayConfig
createSingleConfig
1,682 (+60)
1,092 (+45)
+3.70%
+4.30%
1,682 (+60)
1,092 (+45)
+3.70%
+4.30%
1,682 (+60)
1,092 (+45)
+3.70%
+4.30%
1,682 (+60)
1,092 (+45)
+3.70%
+4.30%
918 (0)
918 (0)
Bootstrap 1,930,562 (-448,034) getInitNexusScopedCalldata
initNexusScoped
6,181 (+165)
63,412 (+318)
+2.74%
+0.50%
6,181 (+165)
83,247 (+318)
+2.74%
+0.38%
6,181 (+165)
83,312 (+318)
+2.74%
+0.38%
6,181 (+165)
83,312 (+318)
+2.74%
+0.38%
918 (0)
309 (0)
NexusAccountFactory 641,343 (-70,143) computeAccountAddress
createAccount
1,339 (+12)
216,067 (+612)
+0.90%
+0.28%
1,339 (+12)
233,688 (+612)
+0.90%
+0.26%
1,339 (+12)
236,207 (+612)
+0.90%
+0.26%
1,339 (+12)
236,207 (+612)
+0.90%
+0.26%
609 (0)
8 (0)
MockPaymaster 1,093,531 (-106,134) addStake
getHash
60,509 (+48)
2,184 (+21)
+0.08%
+0.97%
60,509 (+48)
2,380 (+21)
+0.08%
+0.89%
60,509 (+48)
2,483 (+21)
+0.08%
+0.85%
60,509 (+48)
2,681 (+21)
+0.08%
+0.79%
15 (0)
17 (0)
BiconomyMetaFactory 567,774 (-87,814) addFactoryToWhitelist 46,212 (+42) +0.09% 46,212 (+42) +0.09% 46,212 (+42) +0.09% 46,212 (+42) +0.09% 86 (0)
MockExecutor 920,542 (-137,921)
MockHandler 404,840 (-26,173)
MockHook 281,633 (-12,984)

Copy link

openzeppelin-code bot commented Sep 14, 2024

Chore/remove unnecessary code

Generated at commit: 648690a0e762bbd66a893befb75e44fab789eee5

🚨 Report Summary

Severity Level Results
Contracts Critical
High
Medium
Low
Note
Total
0
1
0
7
25
33

For more details view the full report in OpenZeppelin Code Inspector

Copy link

codecov bot commented Sep 14, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.94%. Comparing base (fe2d426) to head (648690a).
Report is 6 commits behind head on dev.

Additional details and impacted files
@@            Coverage Diff             @@
##              dev     #167      +/-   ##
==========================================
+ Coverage   93.39%   93.94%   +0.55%     
==========================================
  Files          14       14              
  Lines         727      727              
  Branches      140      165      +25     
==========================================
+ Hits          679      683       +4     
+ Misses         48       44       -4     
Files with missing lines Coverage Δ
contracts/Nexus.sol 94.48% <ø> (ø)

... and 2 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update fe2d426...648690a. Read the comment docs.

Copy link

🤖 Slither Analysis Report 🔎

Slither report

# Slither report

THIS CHECKLIST IS NOT COMPLETE. Use --show-ignored-findings to show all the results.
Summary
🟡 - unused-return (1 results) (Medium)

unused-return

🟡 Impact: Medium
🟡 Confidence: Medium

base/ERC7739Validator.sol#L176-L206

constable-states

Impact: Optimization
🔴 Confidence: High

base/RegistryAdapter.sol#L10

factory/RegistryFactory.sol#L39

_This comment was automatically generated by the GitHub Actions workflow._

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if possible we should not change this

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

codesize exceeds otherwise making contracts useless

@livingrockrises livingrockrises merged commit 16273fd into dev Sep 18, 2024
10 checks passed
@livingrockrises livingrockrises deleted the chore/remove-unnecessary-code branch September 18, 2024 09:31
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