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

Gas Optimizations #156

Open
code423n4 opened this issue Aug 6, 2022 · 0 comments
Open

Gas Optimizations #156

code423n4 opened this issue Aug 6, 2022 · 0 comments
Labels

Comments

@code423n4
Copy link
Contributor

HomeFi Contract

The mintNFT() returns a uint value with the projectCount, but this is not used here.
Remove unnecessary return value or use it in createProject() as projectCount replacement for saving gas with local variable.

Disputes Contract

Based in the context, there's no reason why the assertMember() L#172 should be
decleared as public, as it is not used externally anywhere and it's only used
internally in the Disputes contract. It's better to declare it as internal for gas optimizations.

Community Contract

Use of _communityProject.apr instead of _communities[_communityID].projectDetails[_project].apr
in L#692 as stated for gas optimization.

Consider adding a local variable for _msgSender() as follows:
address _sender = _msgSender() in L#503 as done in Project.sol

@code423n4 code423n4 added bug Something isn't working G (Gas Optimization) labels Aug 6, 2022
code423n4 added a commit that referenced this issue Aug 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants