{"id":18794482,"url":"https://github.com/chainstacklabs/chainlink-feeds-with-foundry","last_synced_at":"2025-07-23T00:34:29.123Z","repository":{"id":113050283,"uuid":"527330099","full_name":"chainstacklabs/chainlink-feeds-with-foundry","owner":"chainstacklabs","description":"A tutorial on using Chainlink data feeds with Foundry","archived":false,"fork":false,"pushed_at":"2023-04-05T06:48:06.000Z","size":21,"stargazers_count":0,"open_issues_count":1,"forks_count":2,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-05-21T16:12:51.618Z","etag":null,"topics":["chainlink","datafeed","foundry","smart-contracts"],"latest_commit_sha":null,"homepage":"https://chainstack.com/using-chainlink-data-feeds-with-foundry/","language":"Solidity","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/chainstacklabs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-08-21T21:24:33.000Z","updated_at":"2023-04-11T00:41:32.000Z","dependencies_parsed_at":"2024-11-07T21:31:57.249Z","dependency_job_id":"e4887ff2-fde2-4be6-a0a6-c1f6ca026837","html_url":"https://github.com/chainstacklabs/chainlink-feeds-with-foundry","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/chainstacklabs/chainlink-feeds-with-foundry","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chainstacklabs%2Fchainlink-feeds-with-foundry","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chainstacklabs%2Fchainlink-feeds-with-foundry/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chainstacklabs%2Fchainlink-feeds-with-foundry/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chainstacklabs%2Fchainlink-feeds-with-foundry/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chainstacklabs","download_url":"https://codeload.github.com/chainstacklabs/chainlink-feeds-with-foundry/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chainstacklabs%2Fchainlink-feeds-with-foundry/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266597033,"owners_count":23953894,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-22T02:00:09.085Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["chainlink","datafeed","foundry","smart-contracts"],"created_at":"2024-11-07T21:29:35.171Z","updated_at":"2025-07-23T00:34:29.088Z","avatar_url":"https://github.com/chainstacklabs.png","language":"Solidity","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cimg width=\"1200\" alt=\"Labs\" src=\"https://user-images.githubusercontent.com/99700157/213291931-5a822628-5b8a-4768-980d-65f324985d32.png\"\u003e\n\n\u003cp\u003e\n \u003ch3 align=\"center\"\u003eChainstack is the leading suite of services connecting developers with Web3 infrastructure\u003c/h3\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca target=\"_blank\" href=\"https://chainstack.com/build-better-with-ethereum/\"\u003e\u003cimg src=\"https://github.com/soos3d/blockchain-badges/blob/main/protocols_badges/Ethereum.svg\" /\u003e\u003c/a\u003e\u0026nbsp;  \n  \u003ca target=\"_blank\" href=\"https://chainstack.com/build-better-with-bnb-smart-chain/\"\u003e\u003cimg src=\"https://github.com/soos3d/blockchain-badges/blob/main/protocols_badges/BNB.svg\" /\u003e\u003c/a\u003e\u0026nbsp;\n  \u003ca target=\"_blank\" href=\"https://chainstack.com/build-better-with-polygon/\"\u003e\u003cimg src=\"https://github.com/soos3d/blockchain-badges/blob/main/protocols_badges/Polygon.svg\" /\u003e\u003c/a\u003e\u0026nbsp;\n  \u003ca target=\"_blank\" href=\"https://chainstack.com/build-better-with-avalanche/\"\u003e\u003cimg src=\"https://github.com/soos3d/blockchain-badges/blob/main/protocols_badges/Avalanche.svg\" /\u003e\u003c/a\u003e\u0026nbsp;\n  \u003ca target=\"_blank\" href=\"https://chainstack.com/build-better-with-solana/\"\u003e\u003cimg src=\"https://github.com/soos3d/blockchain-badges/blob/main/protocols_badges/Solana.svg\" /\u003e\u003c/a\u003e\u0026nbsp;\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca target=\"_blank\" href=\"https://chainstack.com/protocols/\"\u003eSupported protocols\u003c/a\u003e •\n  \u003ca target=\"_blank\" href=\"https://chainstack.com/blog/\"\u003eChainstack blog\u003c/a\u003e •\n  \u003ca target=\"_blank\" href=\"https://docs.chainstack.com/\"\u003eChainstack docs\u003c/a\u003e •\n  \u003ca target=\"_blank\" href=\"https://docs.chainstack.com/api/\"\u003eBlockchain API reference\u003c/a\u003e •\n  \u003ca target=\"_blank\" href=\"https://console.chainstack.com/user/account/create\"\u003eStart for free\u003c/a\u003e\n\u003c/p\u003e\n\n# Using Chainlink data feeds with Foundry\n\nThis project shows how to use Foundry to compile and deploy Smart contracts. \n\nSee the full tutorial on the Chainstack blog:\n* [Using Chainlink data feeds with Foundry](https://chainstack.com/using-chainlink-data-feeds-with-foundry/)\n\n## Project details\n\nFoundry is one of the latest smart contract development tools currently in the market, and it allows users to compile contracts, write tests, deploy contracts, and much more through its command line interface. This project is already set up for you to deploy smart contracts and interact with Chainlink’s data feeds.\n\nLearn more about Foundry: Foundry: [A fast Solidity smart contract development toolkit](https://chainstack.com/foundry-a-fast-solidity-contract-development-toolkit/)\n\n## Quick start\n\nClone this repository.\n\n### Install Foundry\n\n```sh\ncurl -L https://foundry.paradigm.xyz | bash\n```\n\nThen:\n\n```sh\nfoundryup\n```\n\n### Compile smart contracts\n\n```sh\nforge build\n```\n\n### Create a .env file\n\nIn the root directory:\n\n```sh\ntouch .env\n```\n\nThis will create a new `.env` file, paste and edit the following in it:\n\n```env\nGOERLI_RPC_URL=CHAINSTACK_GOERLI_NODE_URL\nPRIVATE_KEY=YOU_PRIVATE_KEY\nETHERSCAN_KEY=ETHERSCAN_API_KEY(to verify the smart contract)\n```\n\n### Deploy the smart contract\n\nRun the following command:\n\n```sh\nforge script script/priceFeedsScript.s.sol:ChainlinkScript --rpc-url $GOERLI_RPC_URL  --private-key $PRIVATE_KEY --broadcast --verify --etherscan-api-key $ETHERSCAN_KEY -vvvv\n```\n\n## Prerequisites\n\n* Linux or MacOS\n* A Goerli Chainstack endpoint\n\nDeploy a Goerli node:\n1. [Sign up with Chainstack](https://console.chainstack.com/user/account/create).  \n1. [Deploy a node](https://docs.chainstack.com/platform/join-a-public-network).  \n1. [View node access and credentials](https://docs.chainstack.com/platform/view-node-access-and-credentials). \n\n## Dependencies\n\n* [Foundry toolkit](https://github.com/foundry-rs/foundry)\n\n## Install\n\nClone this repository.\n\nInstall Foundry\n\n```sh\ncurl -L https://foundry.paradigm.xyz | bash\n```\n\nThen:\n\n```sh\nfoundryup\n```\n\n## Example\n\nHere is a link to a verified smart contract deployed to the Goerli testnet, and then verified using Foundry's command line.\n* [0xda96bbe0b02e64d374bd98355a91405653b081e2](https://goerli.etherscan.io/address/0xda96bbe0b02e64d374bd98355a91405653b081e2)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchainstacklabs%2Fchainlink-feeds-with-foundry","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchainstacklabs%2Fchainlink-feeds-with-foundry","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchainstacklabs%2Fchainlink-feeds-with-foundry/lists"}