balancer / balancer-v3-monorepo

GNU General Public License v3.0
37 stars 10 forks source link

Missing token indices #818

Closed EndymionJkb closed 1 month ago

EndymionJkb commented 1 month ago

Description

There are still some tests that work accidentally, without specifying token order. Sometimes it's ok - there are tests that set parallel token arrays for tokens and rate providers, where 0 = dai and 1 = usdc, but those arrays are then passed into functions that sort them.

There are also plenty of cases that are going to revert anyway, so using numeric indices is ok. Or both entries have the same value (or token type, etc.), so it likewise doesn't matter what order they're in. Those are fine and unchanged.

Even where it's not strictly necessary, it's good documentation to use indices. (And often it is necessary.)

Type of change

Checklist:

Issue Resolution