code-423n4 / 2021-10-ambire-findings

0 stars 0 forks source link

`QuickAccManager.sol` Constants should be marked as `constant` #31

Open code423n4 opened 2 years ago

code423n4 commented 2 years ago

Handle

WatchPug

Vulnerability details

https://github.com/code-423n4/2021-10-ambire/blob/bc01af4df3f70d1629c4e22a72c19e6a814db70d/contracts/wallet/QuickAccManager.sol#L128-L128

The variables TRANSFER_TYPEHASH, TXNS_TYPEHASH, BUNDLE_TYPEHASH are named in all caps, which implies that they are constants. However, they are not being marked as constant. Mark them as constant can also help save some gas.

Ivshti commented 2 years ago

resolved in https://github.com/AmbireTech/adex-protocol-eth/commit/687a027d27693f18a5d547fc95f0af358a1de12e

GalloDaSballo commented 2 years ago

Agreed, the sponsor has applied the improvement in a subsequent PR