balancer / balancer-v3-monorepo

GNU General Public License v3.0
45 stars 17 forks source link

Review unsafe casts #181

Closed jubeira closed 1 month ago

jubeira commented 11 months ago

See comments in Vault regarding casts in events:

// TODO No they aren't anymore (stored as uint112)! Review this.
EndymionJkb commented 1 month ago

Comments are no longer there, and we nearly always use SafeCast now anyway with anything that has user input. There is an "unsafeCast" function we use, but that is working with max uint128 balances going to uint256. I did find one place where we were casting a timestamp without checking. (We do it in tests, but that's fine.)