-
Notifications
You must be signed in to change notification settings - Fork 61
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
address audit feedback #120
address audit feedback #120
Conversation
08a3542
to
48aa44f
Compare
b01ce39
to
165b4be
Compare
New and removed dependencies detected. Learn more about Socket for GitHub ↗︎
🚮 Removed packages: npm/@ethersproject/[email protected], npm/@ethersproject/[email protected], npm/@ethersproject/[email protected], npm/@ethersproject/[email protected], npm/@openzeppelin/[email protected], npm/[email protected] |
@@ -71,12 +71,12 @@ contract Batcher { | |||
// Revert everything if any transfer fails | |||
for (uint8 i = 0; i < recipients.length; i++) { | |||
require(recipients[i] != address(0), 'Invalid recipient address'); | |||
emit BatchTransfer(msg.sender, recipients[i], values[i]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure if we even store a state in this function
* Gets called when a transaction is received with data that does not match any other method | ||
*/ | ||
fallback() external payable {} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this will impact erc20 or any other token transfers however I feel its a good safety net
2f46262
to
1779f56
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great Work !!!, Only one comment I saw
contracts/WalletSimple.sol
Outdated
for (uint256 i = 0; i < recipients.length; i++) { | ||
require(recipients[i] != address(0), 'Invalid recipient address'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need this check added here, address zero might help you in confirming that your contract is handling uninitialised data correctly, But in this case since we are already checking recipients.length and only passing in if the value is there, this check seems redundant
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed the zero address validations
1779f56
to
12af091
Compare
12af091
to
705c17d
Compare
705c17d
to
848a4cd
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, Nice work
Commit 1: fix BGB-03
Commit 2: fix RSC-02
Commit 3: fix BGB-02
Commit 4: fix GLOBAL-01 In this commit ERC1155Receiver contract was removed because it got depreciated in openzeppelin/contracts version 5.0.0. Instead ERC1155Holder contract is used for the same purpose. The visibility of onERC1155Received and onERC1155BatchReceived method is changed to public because ERC1155Holder contract has these methods with public visibility
Commit 5: fix WSG-03
Commit 6: fix BGB-01
Commit 7: fix WSG-02
Commit 8: fix WSG-01
Commit 9: fix BAT-02. This change reverts the transaction if the sent out amount is not equal to the received eth amount. Some tests which are not relevant anymore are removed
Commit 10: fix BAC-01. This change removes test to transfer ownership to address(0) as it is not relevant, because in the current flow ownership needs to be accepted by the new owner.
Commit 11: fix WSG-06. This change doesn't change abi.encodePacked in the sendMultiSigToken as it has not been highlighted as an issue.
Commit 12: update optimizer runs Update optimizer runs in hardhat config
WIN-1733