Skip to content

Conversation

Subarna-Singh
Copy link
Contributor

@Subarna-Singh Subarna-Singh commented Oct 15, 2025

Closes #OPDATA 3775 - Step 2

Description

Add functionality to process decimals from view-function-multi-chain

Steps to Test

yarn test packages/composite/proof-of-reserves/test

Input

{
  "data": {
    "endpoint": "multiReserves",
    "input":[
        {
            "addresses": [
            ""
            ],
            "disableDuplicateAddressFiltering": true,
            "indexer": "view_function_multi_chain",
            "indexerEndpoint": "function",
            "indexerParams": {
            "address": "0xa69b964a597435A2F938cc55FaAbe34F2A9AF278",
            "network": "BASE",
            "signature": "function getPending() public view returns (uint256)",
            "data": {
                "decimals": {
                    "signature": "function decimals() view returns (uint8)"
                    }
                }
            },
            "protocol": "list"
        }
    ]
  }
}

Output

{
    "result": "5400000000000000000000000",
    "maxAge": 30000,
    "statusCode": 200,
    "data": {
        "result": "5400000000000000000000000",
        "details": "{\"result\":\"5400000000000000000000000\",\"statusCode\":200,\"decimals\":18}",
        "statusCode": 200,
        "decimals": 18,
        "timestamps": {
            "providerDataRequestedUnixMs": 1760548348898,
            "providerDataReceivedUnixMs": 1760548356440
        }
    },
    "meta": {
        "adapterName": "PROOF_OF_RESERVES"
    },
    "metricsMeta": {
        "feedId": "573c61f3f25b16350242326d87a24e4a"
    }
}

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 Oct 15, 2025

🦋 Changeset detected

Latest commit: 1a278d6

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

This PR includes changesets to release 3 packages
Name Type
@chainlink/view-function-multi-chain-adapter Minor
@chainlink/proof-of-reserves-adapter Minor
@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

….com:smartcontractkit/external-adapters-js into OPDATA-3775-update-por-to-process-decimal-value

merge view-function-multi-chain changes
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.

1 participant