Skip to content
Draft
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/tame-goats-float.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@chainlink/implied-price-adapter': patch
---

Bump Implied Price Adapter to v3
7 changes: 1 addition & 6 deletions .pnp.cjs

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

318 changes: 228 additions & 90 deletions packages/composites/implied-price/README.md

Large diffs are not rendered by default.

9 changes: 2 additions & 7 deletions packages/composites/implied-price/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,18 +30,13 @@
"start": "yarn server:dist"
},
"dependencies": {
"@chainlink/ea-bootstrap": "workspace:*",
"@chainlink/ea-test-helpers": "workspace:*",
"axios": "1.9.0",
"decimal.js": "^10.3.1",
"tslib": "^2.3.1"
"@chainlink/external-adapter-framework": "2.7.0",
"decimal.js": "^10.3.1"
},
"devDependencies": {
"@types/jest": "^29.5.14",
"@types/node": "22.14.1",
"@types/supertest": "2.0.16",
"nock": "13.5.6",
"supertest": "6.2.4",
"typescript": "5.8.3"
}
}
32 changes: 0 additions & 32 deletions packages/composites/implied-price/src/adapter.ts

This file was deleted.

67 changes: 59 additions & 8 deletions packages/composites/implied-price/src/config/index.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,63 @@
import { Requester } from '@chainlink/ea-bootstrap'
import type { Config } from '@chainlink/ea-bootstrap'
import { AdapterConfig } from '@chainlink/external-adapter-framework/config'

export const NAME = 'IMPLIED_PRICE'
export const DEFAULT_ENDPOINT = 'impliedPrice'

export const makeConfig = (prefix?: string): Config => {
return {
...Requester.getDefaultConfig(prefix),
defaultEndpoint: DEFAULT_ENDPOINT,
}
}
export const config = new AdapterConfig(
{
SOURCE_TIMEOUT: {
description: 'The number of milliseconds to wait for source adapter responses',
type: 'number',
default: 10000,
},
MAX_RETRIES: {
description: 'Maximum number of retries for failed source requests',
type: 'number',
default: 3,
},
RETRY_DELAY: {
description: 'Delay between retries in milliseconds',
type: 'number',
default: 1000,
},
SOURCE_CIRCUIT_BREAKER_THRESHOLD: {
description: 'Number of consecutive failures before activating circuit breaker for a source',
type: 'number',
default: 5,
},
SOURCE_CIRCUIT_BREAKER_TIMEOUT: {
description: 'Circuit breaker timeout in milliseconds',
type: 'number',
default: 60000,
},
REQUEST_COALESCING_ENABLED: {
description: 'Enable request coalescing to avoid duplicate requests to same sources',
type: 'boolean',
default: true,
},
REQUEST_COALESCING_INTERVAL: {
description: 'Interval in milliseconds for request coalescing',
type: 'number',
default: 100,
},
WARMUP_ENABLED: {
description: 'Enable warmup requests on startup',
type: 'boolean',
default: false,
},
BACKGROUND_EXECUTE_MS: {
description:
'The amount of time the background execute should sleep before performing the next request',
type: 'number',
default: 10000,
},
},
{
envDefaultOverrides: {
CACHE_MAX_AGE: 60_000,
BACKGROUND_EXECUTE_TIMEOUT: 40_000,
METRICS_ENABLED: true,
API_TIMEOUT: 30000,
},
},
)
Loading
Loading