Skip to content

Commit

Permalink
Matin data for issue #124
Browse files Browse the repository at this point in the history
  • Loading branch information
code423n4 committed Sep 17, 2022
1 parent 5076846 commit bbf3817
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions data/Matin-G.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
1- Setting uint256 to its default value which is zero is redundant (for example):
https://github.com/PartyDAO/party-contracts-c4/blob/main/contracts/party/PartyGovernance.sol#L306
https://github.com/PartyDAO/party-contracts-c4/blob/main/contracts/distribution/TokenDistributor.sol#L230
https://github.com/PartyDAO/party-contracts-c4/blob/main/contracts/distribution/TokenDistributor.sol#L239
https://github.com/PartyDAO/party-contracts-c4/blob/main/contracts/crowdfund/Crowdfund.sol#L180


2- Caching length in for loops. It's better to save the length outside the loop to save gas (for example):
https://github.com/PartyDAO/party-contracts-c4/blob/main/contracts/crowdfund/Crowdfund.sol#L180
https://github.com/PartyDAO/party-contracts-c4/blob/main/contracts/crowdfund/Crowdfund.sol#L300
https://github.com/PartyDAO/party-contracts-c4/blob/main/contracts/distribution/TokenDistributor.sol#L230

0 comments on commit bbf3817

Please sign in to comment.