audius-protocol icon indicating copy to clipboard operation
audius-protocol copied to clipboard

3.5 - Inconsistent Usage of SafeMath

Open hareeshnagaraj opened this issue 2 years ago • 2 comments

Description

Remove base arithmetic operations in favor of SafeMath where relevant

Tests

Existing tests pass

Monitoring - How will this change be monitored? Are there sufficient logs / alerts?

hareeshnagaraj avatar Nov 15 '22 21:11 hareeshnagaraj

there are a few more places like these that might be good to update too

https://github.com/hareeshnagaraj/audius-protocol/blob/970dfb22038108222b33faf1b94026ca757181bf/eth-contracts/contracts/DelegateManager.sol#L1143

https://github.com/hareeshnagaraj/audius-protocol/blob/970dfb22038108222b33faf1b94026ca757181bf/eth-contracts/contracts/DelegateManager.sol#L618

https://github.com/hareeshnagaraj/audius-protocol/blob/970dfb22038108222b33faf1b94026ca757181bf/eth-contracts/contracts/erc20/AudiusToken.sol#L97

isaacsolo avatar Nov 16 '22 00:11 isaacsolo

Let's do a quick check for all of the other contracts and confirm no arithmetic

hareeshnagaraj avatar Nov 16 '22 17:11 hareeshnagaraj