Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
from the readme:
Chainlink External Adapter: Basic LINK Price Source
This project documents my hands-on experience developing a basic Chainlink price feed adapter within the
external-adapters-jsmonorepo. The primary goal was to familiarize myself with the monorepo structure, Chainlink's External Adapter framework, and demonstrate my ability to onboard independently without external assistance. By building this adapter from scratch, I aimed to showcase rapid learning, problem-solving, and proficiency in TypeScript based blockchain development skills directly aligned with roles at Chainlink Labs.The adapter fetches LINK prices against USDC and ETH from Uniswap V3 pools on Ethereum and Arbitrum, using direct RPC calls for efficiency and decentralization. This exercise not only deepened my understanding of source adapters but also prepared me to contribute to more complex integrations like composites and targets.
Adapter Generation and Development Notes
yarn new source basic-link-price-sourceto scaffold the basic structure.yo ./.yarn/cache/node_modules/@chainlink/external-adapter-framework/generator-adapter/generators/app/index.js packages/sources && yarn new tsconfigyarn server:dist; TODO: Review how other adapters handle dynamic descriptions.export adapter=basic-link-price-source; yarn test $adapter/test/integration—TODO: Implement integration tests for this adapter.General Thoughts on the Repository
The CONTRIBUTING.md is straightforward and well-organized, providing clear guidelines for setup, PR processes, and best practices. Having access to numerous existing adapters within the monorepo was invaluable, allowing me to reference real world examples for transports, endpoints, and configurations without needing external documentation. This structure facilitated quick iteration and independent problem-solving, highlighting the repo's design for scalability and collaboration.
Building and Running the Server
To build and run the adapter:
packages/sources/basic-link-price-source).yarn buildto compile the TypeScript code.yarn server:dist(runs on localhost:8080 by default; override RPC URLs via environment variables if needed, e.g.,RPC_URL_ETHEREUM=https://ethereum-rpc.publicnode.com yarn server:dist).Calling the Adapter
Call the endpoints locally using cURL (assuming the server is running on localhost:8080). These commands query
link-usdcandlink-ethon Ethereum and Arbitrum, leveraging default base/quote values for simplicity.link-usdc on ethereum:
link-usdc on arbitrum:
link-eth on ethereum:
link-eth on arbitrum:
Proposed Enhancements
To extend this project and demonstrate broader expertise in Chainlink's ecosystem:
This project underscores my technical curious and self-driven approach to as a long time Fan of Chainlink and experienced engineer