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
[ ] Bug fix
[X] New feature
[ ] Breaking change
[ ] Dependency changes
[ ] Code refactor / cleanup
[ ] Optimization: [ ] gas / [ ] bytecode
[ ] Documentation or wording changes
[ ] Other
Checklist:
[X] The diff is legible and has no extraneous changes
[ ] Complex code has been commented, including external interfaces
[ ] Tests have 100% code coverage
[X] The base branch is either main, or there's a description of how to merge
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 callregisterPool
andcollectAggregateFees
.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:
main
, or there's a description of how to mergeIssue Resolution
Closes #750