Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/mighty-panthers-carry.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@chainlink/copper-adapter': major
---

Copper EA
24 changes: 24 additions & 0 deletions .pnp.cjs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Empty file.
78 changes: 78 additions & 0 deletions packages/sources/copper/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
# COPPER

![0.0.0](https://img.shields.io/github/package-json/v/smartcontractkit/external-adapters-js?filename=packages/sources/copper/package.json) ![v3](https://img.shields.io/badge/framework%20version-v3-blueviolet)

This document was generated automatically. Please see [README Generator](../../scripts#readme-generator) for more info.

## Environment Variables

| Required? | Name | Description | Type | Options | Default |
| :-------: | :-------------------: | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :----: | :-----: | :---------------------: |
| ✅ | API_KEY | An API key for Data Provider - Copper | string | | |
| ✅ | API_SECRET | An API secret for Data Provider - Copper | string | | |
| | API_ENDPOINT | An API endpoint for Data Provider - Copper | string | | `https://api.copper.co` |
| | ETHEREUM_RPC_URL | RPC url of Ethereum node | string | | `` |
| | ETHEREUM_RPC_CHAIN_ID | Ethereum chain id | number | | `1` |
| | ARBITRUM_RPC_URL | RPC url of Arbitrum node | string | | `` |
| | ARBITRUM_RPC_CHAIN_ID | Arbitrum chain id | number | | `42161` |
| | BACKGROUND_EXECUTE_MS | Background execute time in milliseconds | number | | `1000` |
| | GROUP_SIZE | Number of requests to execute asynchronously before the adapter waits to execute the next group of requests. Setting this lower than the default may result in lower performance from the adapter. | number | | `25` |

---

## Data Provider Rate Limits

There are no rate limits for this adapter.

---

## Input Parameters

| Required? | Name | Description | Type | Options | Default |
| :-------: | :------: | :-----------------: | :----: | :--------------------------: | :-----: |
| | endpoint | The endpoint to use | string | [wallets](#wallets-endpoint) | |

## Wallets Endpoint

`wallets` is the only supported name for this endpoint.

### Input Params

| Required? | Name | Aliases | Description | Type | Options | Default | Depends On | Not Valid With |
| :-------: | :--------------------------: | :-----: | :----------------------------------------------------------------------------------: | :------: | :-----: | :-----: | :--------: | :------------: |
| ✅ | priceOracles | | Configuration of the on-chain price oracle that provides real-time token valuations. | object[] | | | | |
| ✅ | priceOracles.token | | Symbol of the token to fetch price data for (e.g., ETH, SOL). | string | | | | |
| ✅ | priceOracles.contractAddress | | Contract address of the price oracle used to fetch token price data. | string | | | | |
| ✅ | priceOracles.chainId | | Blockchain network Id of the price oracle contract (e.g., ETHEREUM, ARBITRUM). | string | | | | |
| | portfolioId | | The portfolio ID to query. | string | | | | |
| | currencies | | The list of currency symbols to query. | string[] | | | | |

### Example

Request:

```json
{
"data": {
"endpoint": "wallets",
"priceOracles": [
{
"token": "ETH",
"contractAddress": "0x5f4eC3Df9cbd43714FE2740f5E3616155c5b8419",
"chainId": "1"
},
{
"token": "SOL",
"contractAddress": "0x639Fe6ab55C921f74e7fac1ee960C0B6293ba612",
"chainId": "42161"
}
],
"portfolioId": "cme14144g001y3b6k5x9gljwp",
"currencies": ["ETH", "SOL", "USDC", "USDT", "USTB", "ETH", "SOL"]
}
}
```

---

MIT License
44 changes: 44 additions & 0 deletions packages/sources/copper/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{
"name": "@chainlink/copper-adapter",
"version": "0.0.0",
"description": "Chainlink copper adapter.",
"keywords": [
"Chainlink",
"LINK",
"blockchain",
"oracle",
"copper"
],
"main": "dist/index.js",
"types": "dist/index.d.ts",
"files": [
"dist"
],
"repository": {
"url": "https://github.com/smartcontractkit/external-adapters-js",
"type": "git"
},
"license": "MIT",
"scripts": {
"clean": "rm -rf dist && rm -f tsconfig.tsbuildinfo",
"prepack": "yarn build",
"build": "tsc -b",
"server": "node -e 'require(\"./index.js\").server()'",
"server:dist": "node -e 'require(\"./dist/index.js\").server()'",
"start": "yarn server:dist"
},
"devDependencies": {
"@types/jest": "^29.5.14",
"@types/node": "22.14.1",
"nock": "13.5.6",
"typescript": "5.8.3"
},
"dependencies": {
"@chainlink/external-adapter-framework": "2.7.0",
"@types/crypto-js": "4.2.2",
"crypto-js": "4.2.0",
"decimal.js": "^10.3.1",
"ethers": "5.4.7",
"tslib": "2.4.1"
}
}
Loading
Loading