OPDATA-3674: Add totalBalance endpoint to avalanche-platform EA #4038
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
https://smartcontract-it.atlassian.net/browse/OPDATA-3674
Description
We need total balance for a list of Avalanche addresses for a proof-of-reserves feed.
Some of these addresses are P-chain addresses.
The
avalanche-platform
EA already interacts with Avalanche P-chain, although it currently doesn't appear to be used by anything.Unfortunately its existing
balance
endpoint only returns the stake of the requested addresses.This PR adds a new
totalBalance
endpoint which returns the sum of locked and unlocked balances and stake.Balances are for a specific asset, which defaults to the asset ID of the native AVA token, but can be set to something else as well.
Changes
totalBalance
.Steps to Test
proof-of-reserves
in another branch with other necessary changes inpor-address-list
.Quality Assurance
infra-k8s
configuration file.adapter-secrets
configuration file or update the soak testing blacklist.test-payload.json
file with relevant requests.feature/x
,chore/x
,release/x
,hotfix/x
,fix/x
) or is created from Jira.