Skip to content

Conversation

@Subarna-Singh
Copy link
Contributor

Closes #OPDATA-4906

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

Description

Accountable EA

Changes

  • High level
  • changes that
  • you made

Steps to Test

yarn test packages/source/accountable

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.

@changeset-bot
Copy link

changeset-bot bot commented Nov 18, 2025

🦋 Changeset detected

Latest commit: f81d5b9

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

This PR includes changesets to release 1 package
Name Type
@chainlink/accountable-adapter Major

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

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces a new "Accountable" external adapter for fetching Proof of Reserve (PoR) data from multiple clients (Axis and Unitas). The adapter retrieves total reserve information and includes validation for client-specific API keys.

Key Changes:

  • New adapter implementation for Accountable EA with support for multiple clients
  • Reserve endpoint with dynamic API key validation based on client name
  • Comprehensive test coverage including integration tests and fixtures

Reviewed Changes

Copilot reviewed 16 out of 18 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
packages/tsconfig.json Registers the new accountable adapter in the TypeScript project configuration
packages/tsconfig.test.json Adds accountable test configuration to the test compilation setup
packages/sources/accountable/package.json Package configuration for the new adapter
packages/sources/accountable/src/index.ts Main adapter setup with PoR configuration and rate limiting
packages/sources/accountable/src/config/index.ts Configuration for API endpoint requirement
packages/sources/accountable/src/endpoint/index.ts Exports reserve endpoint
packages/sources/accountable/src/endpoint/reserve.ts Reserve endpoint definition with input parameters and validation
packages/sources/accountable/src/transport/reserve.ts HTTP transport implementation for reserve data fetching
packages/sources/accountable/test-payload.json Test payload configuration for the adapter
packages/sources/accountable/test/integration/reserve.test.ts Integration tests for reserve endpoint
packages/sources/accountable/test/integration/fixtures.ts Mock response fixtures for testing
packages/sources/accountable/README.md Documentation for the adapter
packages/sources/accountable/CHANGELOG.md Changelog file for version tracking
packages/sources/accountable/tsconfig.json TypeScript configuration for the adapter
packages/sources/accountable/tsconfig.test.json TypeScript test configuration for the adapter
Files not reviewed (1)
  • .pnp.cjs: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 17 out of 19 changed files in this pull request and generated 2 comments.

Files not reviewed (1)
  • .pnp.cjs: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Subarna-Singh Subarna-Singh marked this pull request as ready for review November 18, 2025 12:14
@mmcallister-cll
Copy link
Contributor

see if generic-api works instead please 🙏

@Subarna-Singh
Copy link
Contributor Author

Subarna-Singh commented Nov 20, 2025

see if generic-api works instead please 🙏

@mmcallister-cll we can use generic-api EA

as long as we maintain the following env for each client.

AXIS_API_URL=https://dvn.accountable.capital/v1/reserves?client=axis
AXIS_AUTH_HEADER=Authorization
AXIS_AUTH_HEADER_VALUE=Bearer api-key

Request

  "data": {
    "apiName": "axis",
    "dataPath": "totalReserve"
  }
}

Response

    "result": "40484963.23",
    "data": {
        "result": "40484963.23"
    },
    "timestamps": {
        "providerDataRequestedUnixMs": 1763646861491,
        "providerDataReceivedUnixMs": 1763646863048
    },
    "statusCode": 200,
    "meta": {
        "adapterName": "GENERIC_API",
        "metrics": {
            "feedId": "{\"apiName\":\"axis\",\"dataPath\":\"totalreserve\",\"ripcordDisabledValue\":\"false\"}"
        }
    }
}

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