Closed code423n4 closed 2 years ago
JMukesh
State variable that can be decalred as constant to save gas
bytes32 private TXNS_TYPEHASH bytes32 private BUNDLE_TYPEHASH
since these value will not be changed as mentioned in comment , it can be declared as constant
https://github.com/code-423n4/2021-10-ambire/blob/bc01af4df3f70d1629c4e22a72c19e6a814db70d/contracts/wallet/QuickAccManager.sol#L153
https://github.com/code-423n4/2021-10-ambire/blob/bc01af4df3f70d1629c4e22a72c19e6a814db70d/contracts/wallet/QuickAccManager.sol#L154
manual review
fixed in https://github.com/AmbireTech/adex-protocol-eth/commit/687a027d27693f18a5d547fc95f0af358a1de12e
duplicate of #31
Duplicate of #31
Handle
JMukesh
Vulnerability details
Impact
State variable that can be decalred as constant to save gas
bytes32 private TXNS_TYPEHASH bytes32 private BUNDLE_TYPEHASH
since these value will not be changed as mentioned in comment , it can be declared as constant
Proof of Concept
https://github.com/code-423n4/2021-10-ambire/blob/bc01af4df3f70d1629c4e22a72c19e6a814db70d/contracts/wallet/QuickAccManager.sol#L153
https://github.com/code-423n4/2021-10-ambire/blob/bc01af4df3f70d1629c4e22a72c19e6a814db70d/contracts/wallet/QuickAccManager.sol#L154
Tools Used
manual review
Recommended Mitigation Steps