code-423n4 / 2021-11-nested-findings

1 stars 1 forks source link

change variable location to memory from storage in getAmountsDue (view function) #230

Closed code423n4 closed 2 years ago

code423n4 commented 2 years ago

Handle

hack3r-0m

Vulnerability details

https://github.com/code-423n4/2021-11-nested/blob/main/contracts/FeeSplitter.sol#L82

TokenRecords storage _tokenRecords is not written and read twice so can be changed to memory location

adrien-supizet commented 2 years ago

This can't be done for the following reason: TypeError: Type struct FeeSplitter.TokenRecords is only valid in storage because it contains a (nested) mapping.

alcueca commented 2 years ago

Dispute accepted.