Skip to content

Conversation

Subarna-Singh
Copy link
Contributor

Closes #OPDATA-3708

https://smartcontract-it.atlassian.net/browse/OPDATA-3708

Description

USDO PoR is being extended to include Solana-based reserves, beginning with TBILL tokens that back USDO on Solana.
The token-balance EA should:

  • Query the TBILL (SOL) token account at 4MmJVdwYN8LwvbGeCowYjSx7KoEi6BJWg8XXnW4fDDp6 to fetch the balance.
  • Retrieve the TBILL price from the on-chain price oracle (Ethereum or Arbitrum).
  • Multiply the balance by the oracle price to calculate the USD value of Solana reserves.
  • Contribute this USD value to the composite USDO PoR output so it reflects Solana reserves alongside existing assets.

Changes

Added new endpoint usdoSolana.

Steps to Test

yarn test packes/source/token-balance/test/unit
yarn test packes/source/token-balance/test/integration

Quality Assurance

  • If a new adapter was made, or an existing one was modified so that its environment variables have changed, update the relevant infra-k8s configuration file.
  • If a new adapter was made, or an existing one was modified so that its environment variables have changed, update the relevant adapter-secrets configuration file or update the soak testing blacklist.
  • If a new adapter was made, or a new endpoint was added, update the test-payload.json file with relevant requests.
  • The branch naming follows git flow (feature/x, chore/x, release/x, hotfix/x, fix/x) or is created from Jira.
  • This is related to a maximum of one Jira story or GitHub issue.
  • Types are safe (avoid TypeScript/TSLint features like any and disable, instead use more specific types).
  • All code changes have 100% unit and integration test coverage. If testing is not applicable or too difficult to justify doing, the reasoning should be documented explicitly in the PR.

Copy link

changeset-bot bot commented Aug 19, 2025

🦋 Changeset detected

Latest commit: 0b3fb3c

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@chainlink/token-balance-adapter Major
@chainlink/proof-of-reserves-adapter Patch
@chainlink/renvm-address-set-adapter Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@Subarna-Singh Subarna-Singh requested a review from dskloetc August 19, 2025 11:44
@Subarna-Singh Subarna-Singh force-pushed the OPDATA-3708-USDO-Add-Solana-Reserves-TOKEN_BALANCE branch from cf5a540 to 696db5b Compare August 20, 2025 09:41
@Subarna-Singh Subarna-Singh requested a review from dskloetc August 20, 2025 11:08
@Subarna-Singh Subarna-Singh requested a review from dskloetc August 21, 2025 11:07
@Subarna-Singh Subarna-Singh requested a review from dskloetc August 22, 2025 05:45
@Subarna-Singh Subarna-Singh requested a review from dskloetc August 24, 2025 07:22
@Subarna-Singh
Copy link
Contributor Author

@dskloetc I have fixed the issues based on your comment.
Including

  1. using getToken [will fix the function in another PR, as you suggested]
  2. Added error handling, if getParsedTokenAccountsByOwner returns no value.

Cases where value will be empty ([]):

  • Wallet never received that token
  • Token account closed
  • Wrong mint PublicKey
  • Wrong wallet PublicKey
  • RPC node lag / data not yet finalized (rare)

@Subarna-Singh Subarna-Singh requested a review from dskloetc August 25, 2025 15:12
@Subarna-Singh Subarna-Singh merged commit ddc377c into main Aug 29, 2025
19 checks passed
@Subarna-Singh Subarna-Singh deleted the OPDATA-3708-USDO-Add-Solana-Reserves-TOKEN_BALANCE branch August 29, 2025 07:47
@github-actions github-actions bot mentioned this pull request Aug 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants