BalancerMaxis / bal_tools

1 stars 0 forks source link

Add reverse_map for aura pids #13

Open Tritium-VLK opened 1 month ago

Tritium-VLK commented 1 month ago

In the Aura class, there is a dict called aura_pids_by_address.

1: This is by_deposit_gauge_address 2: I found myself reversing the dict to do a lookup, so a reverse would be nice.

Tritium-VLK commented 1 month ago

Let me know if you have questions..

Tritium-VLK commented 1 month ago

gauge_address = list(aura.aura_pids_by_address.keys())[list(aura.aura_pids_by_address.values()).index(aura_pid) is very ugly

Tritium-VLK commented 1 month ago

Also a bit confusing that the PID table seems to have "int"'s as keys instead of raw ints. Made reverse lookups break/required debugging.