balancer / balancer-v3-monorepo

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

Vault explorer #760

Closed EndymionJkb closed 3 months ago

EndymionJkb commented 4 months ago

Description

It was noted (see issue #750) that because of our use of the Proxy pattern for the Vault (necessitated by a bytecode far over the limit), Etherscan (and off-chain tools generally) would not be very useful, as nearly all the "interesting" functions on the Vault are either only accessible through unlocking, or are exposed on the Extension or Admin contracts, which must be called through the Vault.

This PR introduces the VaultExplorer (naming suggestions welcome; I didn't want to use "API", as that would be confusable with the off-chain API), which is a wrapper around all externally callable (and non-permissioned) "greater Vault" functions. These are mostly getters and read-only functions, but you can also call registerPool and collectAggregateFees.

We would deploy this after the Vault, and people who wanted to see the whole interface on-chain and be able to interact through Etherscan as they do today with V2, would have an easy way to do it.

This was a long-time coming, mainly because the tests were so tedious! They might be a bit overkill, but I did find things while doing them, so I think it was worth it.

Type of change

Checklist:

Issue Resolution

Closes #750