Skip to content

Latest commit

 

History

History
65 lines (43 loc) · 2.4 KB

File metadata and controls

65 lines (43 loc) · 2.4 KB

Chainlink Composite Adapters

This section contains packages that represent composite adapters that use data from multiple other Chainlink external adapters.

They are published to NPM under the @chainlink organization.

List

APY Finance Bitcoin JSON RPC Crypto Volatility Index DeFi Pulse DNS Record Check Market Closure Outlier Detection Proof of Reserves Reference Transform Synth Index Token Allocation

Service Discovery

Composite adapters rely on other external adapters to retrieve their own provider specific data. In setting up a composite adapter the locations of these underlying external adapters will need to be set as environment variables using [name]_ADAPTER_URL. See the specific composite adapter's documentation for further details.

Running

Local

Ensure that the project's dependencies are installed and that the code is compiled by running the following command from the external-adapters respository root:

yarn && yarn build

Run the underlying external adapters and set their locations as environment variables. For example, using the proof-of-reserves composite adapter with the WBTC and blockchain.com adapters.

export WBTC_ADAPTER_URL=localhost:3000 BLOCKCHAIN_COM_ADAPTER_URL=localhost:3001

Change directories into proof-of-reserves and start the server:

cd composites/proof-of-reserves && yarn start

Docker

To build a Docker container for a specific $(adapter), run the following command from repository root:

make docker adapter=composite/proof-of-reserves name=proof-of-reserves

The naming convention for Docker containers will be $(name)-adapter.

Run the underlying external adapters and set their locations as environment variables (it is convenient to do this in a file that is fed into the run command).

(Note: Docker environment file string values do not use " or ' quote marks)

Then run it with:

docker run -p 8080:8080 --env-file="~/PATH_TO_ENV" -it proof-of-reserves-adapter:latest