{"id":19107547,"url":"https://github.com/smartcontractkit/cairo-starter-kit","last_synced_at":"2025-04-30T18:49:02.122Z","repository":{"id":162209590,"uuid":"616970866","full_name":"smartcontractkit/cairo-starter-kit","owner":"smartcontractkit","description":"The boilerplate code for getting started with the usage of Chainlink services on Starknet","archived":false,"fork":false,"pushed_at":"2023-04-29T23:54:17.000Z","size":235,"stargazers_count":9,"open_issues_count":1,"forks_count":1,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-04-30T18:48:58.337Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://docs.chain.link/data-feeds/starknet","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/smartcontractkit.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2023-03-21T12:58:01.000Z","updated_at":"2024-05-06T09:12:38.000Z","dependencies_parsed_at":null,"dependency_job_id":"a3dec57f-0d7f-4f2b-bb8c-781aa1030bf5","html_url":"https://github.com/smartcontractkit/cairo-starter-kit","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smartcontractkit%2Fcairo-starter-kit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smartcontractkit%2Fcairo-starter-kit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smartcontractkit%2Fcairo-starter-kit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smartcontractkit%2Fcairo-starter-kit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/smartcontractkit","download_url":"https://codeload.github.com/smartcontractkit/cairo-starter-kit/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251765539,"owners_count":21640196,"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","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":[],"created_at":"2024-11-09T04:12:58.774Z","updated_at":"2025-04-30T18:49:02.114Z","avatar_url":"https://github.com/smartcontractkit.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Chainlink Cairo Starter Kit\n\n\u003cbr/\u003e\n\u003cp align=\"center\"\u003e\n\u003ca href=\"https://chain.link\" target=\"_blank\"\u003e\n\u003cimg src=\"./logo.png\" width=\"225\" alt=\"Chainlink Cairo logo\"\u003e\n\u003c/a\u003e\n\u003c/p\u003e\n\u003cbr/\u003e\n\n[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/smartcontractkit/cairo-starter-kit)\n\nThe boilerplate code for getting started with the usage of Chainlink services on Starknet. [Here](https://docs.chain.link/data-feeds/starknet) you can visit the official Chainlink documentation for using Data Feeds on Starknet.\n\n_This repository represents an example of using a Chainlink product or service. It is provided to to help you understand how to interact with Chainlink’s systems so that you can integrate them into your own. This template is provided \"AS IS\" without warranties of any kind, has not been audited, and may be missing key checks or error handling to make the usage of the product more clear. Take everything in this repository as an example and not something to be copy pasted into a production ready service._\n\n## Getting started\n\n### Prerequisites\n\nBe sure to have installed the following\n\n- [Git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git)\n- [Node.js](https://nodejs.org/en/download/) in the `\u003e=14 \u003c=18` version range\n- [Yarn](https://yarnpkg.com/getting-started/install)\n- [Python](https://www.python.org/downloads/) in the `\u003e=3.6 \u003c=3.9` version range\n\n### Clone the repository\n\nTo clone the repository, run the following commands:\n\n```\ngit clone https://github.com/smartcontractkit/cairo-starter-kit.git\ncd cairo-starter-kit\n```\n\n### Setting Up Starknet\n\nTo set up your Starknet development environment, follow the [official quickstart guide](https://docs.starknet.io/documentation/getting_started/setting_up_the_environment/).\n\nHere you can see listed all of the commands from the mentioned quickstart guide.\n\n- `python3.9 -m venv ~/cairo_venv`\n- `source ~/cairo_venv/bin/activate`\n- `pip3 install ecdsa fastecdsa sympy`\n- `brew install gmp`\n- `pip3 install cairo-lang`\n\nVerify that all of the required tools are configured correctly:\n\n- Starknet CLI\n  - Run: `starknet -v`\n  - Expected output: `starknet 0.10.3`\n- Cairo CLI\n  - Run: `cairo-compile -v`\n  - Expected output: `cairo-compile 0.10.3`\n- NodeJS\n  - Run: `node -v`\n  - Expected output: `v18.12.1`\n- Yarn\n  - Run: `yarn --version`\n  - Expected output: `1.22.19`\n\n### Compiling and running your first Cairo program\n\nNot all Cairo programs are valid Starknet smart contracts. To compile your first Cairo program run the following command:\n\n```\ncairo-compile contracts/MyFirstCairoProgram.cairo --output MyFirstCairoProgram_compiled.json\n```\n\nTo debug the execution of your first Cairo program, execute the next command, and then open the http://localhost:8100/\n\n```\ncairo-run --program=MyFirstCairoProgram_compiled.json --print_output --print_info --relocate_prints --tracer\n```\n\n### Usage\n\nThis repo comes with the Hardhat project which was set up for working with Starknet using the `@shardlabs/starknet-hardhat-plugin` plugin.\n\nTo get started run:\n\n```\nnpm install\n\n# or\n\nyarn install\n```\n\nTo compile contracts run the next command:\n\n```\nyarn build\n```\n\nTo deploy the Starknet Data Feeds Consumer contract on the Starknet Goerli Alpha Testnet, run:\n\n```\nyarn deploy\n```\n\nNow you can get the latest price of LINK/USD on Starknet Goerli Alpha Testnet by running:\n\n```\nyarn readLatestRound\n```\n\nOptionally, you can query LINK/USD data feed without deploying the Proxy Consumer contract, completely off-chain. To do that, run the following command:\n\n```\nyarn readLatestRoundOffChain\n```\n\nOr directly from the CLI, without the usage of Hardhat tasks:\n\n```\nstarknet call --address 0x2579940ca3c41e7119283ceb82cd851c906cbb1510908a913d434861fdcb245 --function latest_round_data --abi ./contracts/abis/aggregator_proxy_abi.json\n```\n\nTo see addresses of other available data feeds on Starknet, besides LINK/USD, visit the [official Chainlink documentation](https://docs.chain.link/data-feeds/price-feeds/addresses?network=starknet).\n\n### Creating Starknet Account\n\nAll accounts on Starknet are represented as smart contracts. To set up your Starknet account, follow the [official guide](https://docs.starknet.io/documentation/getting_started/account_setup/).\n\nTo see the details of your default Starknet account on the Starknet Goerli Alpha Testnet, run the following command:\n\n```\nopen ~/.starknet_accounts/starknet_open_zeppelin_accounts.json\n```\n\n### Block Explorer\n\nThe Starknet Goerli Alpha Testnet block explorer is available at https://testnet.starkscan.co/.\n\n## Contributing\n\nContributions are always welcome! Open a PR or an issue! Thank you!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmartcontractkit%2Fcairo-starter-kit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsmartcontractkit%2Fcairo-starter-kit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmartcontractkit%2Fcairo-starter-kit/lists"}