bcnmy / nexus

Nexus by Biconomy: ERC-7579 Modular Smart Account for Enhanced Account Abstraction
https://github.com/bcnmy/nexus/wiki
MIT License
27 stars 5 forks source link

fix: remove unnecessary code #176

Closed livingrockrises closed 1 month ago

livingrockrises commented 1 month ago

Two new modifiers have been introduced to ModuleManager contract : onlyValidatorModule() and onlyAuthorized().

These are not used in the current codebase and the team clarified that there was no intention to use them in near future.

github-actions[bot] commented 1 month ago

Changes to gas cost

Generated at commit: 9c53178666566e9672b914ab8e50a20bbe039395, compared to commit: 16273fdb3baa26e03c8b536ca3a9156197c8410a

🧾 Summary (5% most significant diffs)

Contract Method Avg (+/-) %

Full diff report 👇
| Contract | Deployment Cost (+/-) | Method | Min (+/-) | % | Avg (+/-) | % | Median (+/-) | % | Max (+/-) | % | # Calls (+/-) | |:-|-:|:-|-:|-:|-:|-:|-:|-:|-:|-:|-:| | **Nexus** | 4,839,712 (0) | _execute_
_initializeAccount_
_isModuleInstalled_
_validateUserOp_ | 6,426 (0)
114,400 (0)
865 (0)
13,973 (0) | **0.00%**
**0.00%**
**0.00%**
**0.00%** | 46,634 (-2,767)
134,234 (-1)
1,192 (+1)
15,545 (-1) | **-5.60%**
**-0.00%**
**+0.08%**
**-0.01%** | 38,126 (0)
134,300 (0)
1,168 (0)
13,973 (0) | **0.00%**
**0.00%**
**0.00%**
**0.00%** | 143,204 (0)
134,300 (0)
3,212 (0)
42,860 (0) | **0.00%**
**0.00%**
**0.00%**
**0.00%** | 73 (-3)
306 (-3)
328 (-3)
347 (-4) | | **MockPaymaster** | 1,093,531 (0) | _getHash_ | 2,184 (0) | **0.00%** | 2,388 (+8) | **+0.34%** | 2,483 (0) | **0.00%** | 2,681 (0) | **0.00%** | 16 (-1) | | **Bootstrap** | 1,930,562 (0) | _initNexusScoped_ | 63,412 (0) | **0.00%** | 83,246 (-1) | **-0.00%** | 83,312 (0) | **0.00%** | 83,312 (0) | **0.00%** | 306 (-3) |
github-actions[bot] commented 1 month ago

:robot: Slither Analysis Report :mag_right:

Slither report

# Slither report **THIS CHECKLIST IS NOT COMPLETE**. Use `--show-ignored-findings` to show all the results. Summary :yellow_circle: - [unused-return](#unused-return) (1 results) (Medium) - [constable-states](#constable-states) (2 results) (Optimization) ## unused-return :yellow_circle: Impact: Medium :yellow_circle: Confidence: Medium - [ ] ID-0 [ERC7739Validator._hashTypedDataForAccount(address,bytes32)]([base/ERC7739Validator.sol#L176-L206](https://github.com/bcnmy/nexus/blob/9c53178666566e9672b914ab8e50a20bbe039395/contracts/contracts/base/ERC7739Validator.sol#L176-L206)) ignores return value by [(name,version,chainId,verifyingContract) = EIP712(account).eip712Domain()]([base/ERC7739Validator.sol#L177-L185](https://github.com/bcnmy/nexus/blob/9c53178666566e9672b914ab8e50a20bbe039395/contracts/contracts/base/ERC7739Validator.sol#L177-L185)) [base/ERC7739Validator.sol#L176-L206](https://github.com/bcnmy/nexus/blob/9c53178666566e9672b914ab8e50a20bbe039395/contracts/contracts/base/ERC7739Validator.sol#L176-L206) ## constable-states Impact: Optimization :red_circle: Confidence: High - [ ] ID-1 [RegistryAdapter.registry]([base/RegistryAdapter.sol#L10](https://github.com/bcnmy/nexus/blob/9c53178666566e9672b914ab8e50a20bbe039395/contracts/contracts/base/RegistryAdapter.sol#L10)) should be constant [base/RegistryAdapter.sol#L10](https://github.com/bcnmy/nexus/blob/9c53178666566e9672b914ab8e50a20bbe039395/contracts/contracts/base/RegistryAdapter.sol#L10) - [ ] ID-2 [RegistryFactory.threshold]([factory/RegistryFactory.sol#L39](https://github.com/bcnmy/nexus/blob/9c53178666566e9672b914ab8e50a20bbe039395/contracts/contracts/factory/RegistryFactory.sol#L39)) should be constant [factory/RegistryFactory.sol#L39](https://github.com/bcnmy/nexus/blob/9c53178666566e9672b914ab8e50a20bbe039395/contracts/contracts/factory/RegistryFactory.sol#L39)

This comment was automatically generated by the GitHub Actions workflow.

openzeppelin-code[bot] commented 1 month ago

fix: remove unnecessary code

Generated at commit: dfac92e03e747c44c50d504f668ba55982c6d006

🚨 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

codecov[bot] commented 1 month ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Please upload report for BASE (dev@16273fd). Learn more about missing BASE report. Report is 2 commits behind head on dev.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## dev #176 +/- ## ====================================== Coverage ? 94.58% ====================================== Files ? 14 Lines ? 720 Branches ? 163 ====================================== Hits ? 681 Misses ? 39 Partials ? 0 ``` | [Files with missing lines](https://app.codecov.io/gh/bcnmy/nexus/pull/176?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=bcnmy) | Coverage Δ | | |---|---|---| | [contracts/base/ModuleManager.sol](https://app.codecov.io/gh/bcnmy/nexus/pull/176?src=pr&el=tree&filepath=contracts%2Fbase%2FModuleManager.sol&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=bcnmy#diff-Y29udHJhY3RzL2Jhc2UvTW9kdWxlTWFuYWdlci5zb2w=) | `93.95% <ø> (ø)` | | ------ [Continue to review full report in Codecov by Sentry](https://app.codecov.io/gh/bcnmy/nexus/pull/176?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=bcnmy). > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=bcnmy) > `Δ = absolute (impact)`, `ø = not affected`, `? = missing data` > Powered by [Codecov](https://app.codecov.io/gh/bcnmy/nexus/pull/176?dropdown=coverage&src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=bcnmy). Last update [16273fd...dfac92e](https://app.codecov.io/gh/bcnmy/nexus/pull/176?dropdown=coverage&src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=bcnmy). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=bcnmy).