{"id":17142261,"url":"https://github.com/ctrlc03/cairo1-random-code","last_synced_at":"2025-03-24T09:11:47.947Z","repository":{"id":122740500,"uuid":"604821068","full_name":"ctrlc03/Cairo1-random-code","owner":"ctrlc03","description":null,"archived":false,"fork":false,"pushed_at":"2023-02-21T21:28:09.000Z","size":4,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-29T14:32:44.310Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","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/ctrlc03.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-02-21T21:28:06.000Z","updated_at":"2023-02-21T21:28:14.000Z","dependencies_parsed_at":null,"dependency_job_id":"b6763691-acf2-4b6b-8115-f9cdc401a6ef","html_url":"https://github.com/ctrlc03/Cairo1-random-code","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":"auditless/cairo-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ctrlc03%2FCairo1-random-code","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ctrlc03%2FCairo1-random-code/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ctrlc03%2FCairo1-random-code/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ctrlc03%2FCairo1-random-code/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ctrlc03","download_url":"https://codeload.github.com/ctrlc03/Cairo1-random-code/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245240925,"owners_count":20583102,"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-10-14T20:30:14.756Z","updated_at":"2025-03-24T09:11:47.915Z","avatar_url":"https://github.com/ctrlc03.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Minimal Cairo 1.0 Template  ![PRs Welcome](https://img.shields.io/badge/PRs-welcome-green.svg)\n\n[Built with **`auditless/cairo-template`**](https://github.com/auditless/cairo-template)\n\nA minimal template for building smart contracts with Cairo 1.0\nusing the [Quaireaux](https://github.com/keep-starknet-strange/quaireaux) project defaults.\n\n## How it works\n\n- No submodules, forks or other heavy machinery\n- Uses the [`cairo-test-runner`](https://github.com/starkware-libs/cairo/blob/main/crates/cairo-lang-test-runner/README.md) binary for running tests\n- Built as a [Scarb](https://github.com/software-mansion/scarb) package for reusability\n- Has reproducible builds using GitHub Actions\n- Includes a standard Makefile for commonly used commands\n\n## Installing dependencies\n\n### Step 1: Install Cairo 1.0 (guide by [Abdel](https://github.com/abdelhamidbakhta))\n\nIf you are on an x86 Linux system and able to use the release binary,\nyou can download Cairo here https://github.com/starkware-libs/cairo/releases.\n\nFor everyone, else, we recommend compiling Cairo from source like so:\n\n```bash\n# Install stable Rust\n$ rustup override set stable \u0026\u0026 rustup update\n\n# Clone the Cairo compiler in $HOME/Bin\n$ cd ~/Bin \u0026\u0026 git clone git@github.com:starkware-libs/cairo.git\n\n# Generate release binaries\n$ cargo build —all —release\n```\n\n**NOTE: Keeping Cairo up to date**\n\nNow that your Cairo compiler is in a cloned repository, all you will need to do\nis pull the latest changes and rebuild as follows:\n\n```bash\n$ cd ~/Bin \u0026\u0026 git fetch \u0026\u0026 git pull \u0026\u0026 cargo build --all --release\n```\n\n### Step 2: Add Cairo 1.0 executables to your path\n\n```bash\nexport PATH=\"$HOME/Bin/cairo/target/release:$PATH”\n```\n\n**NOTE: If installing from a Linux binary, adapt the destination path accordingly.**\n\nThis will make available several binaries. The one we use is called `cairo-test`.\n\n### Step 3: Install the Cairo package manager Scarb\n\nFollow the installation guide in [Scarb's Repository](https://github.com/software-mansion/scarb).\n\n## How to use this template\n\nFirst you will need to clone the repository or click the `Use this template` button\nat the top of the page to create a new repository based on the template.\n\nNext, you will want to update the configuration files with the name of your project:\n\n```\n├── .cairo_project.toml\n└── .Scarb.toml\n```\n\n## Working with your project\n\nThe Cairo template currently supports building and testing contracts.\n\n### Build\n\nBuild the contracts.\n\n```bash\n$ make build\n```\n\n### Test\n\nRun the tests in `src/test`:\n\n```bash\n$ make test\n```\n\n### Format\n\nFormat the Cairo source code (using Scarb):\n\n```bash\n$ make fmt\n```\n\n## Thanks to\n\n- The [Quaireaux](https://github.com/keep-starknet-strange/quaireaux) team for coming up with\nthis configuration and especially [Abdel](https://github.com/abdelhamidbakhta) for helping me with Cairo 1.0 installation\n- [Paul Berg](https://github.com/PaulRBerg) and the [foundry-template](https://github.com/paulrberg/foundry-template) project which served as inspiration\n- Last but not least, the StarkWare team for building the first smart contract language that is a joy to use\n\n## Other templates\n\n- [ArgentX template](https://github.com/argentlabs/starknet-build/tree/main/cairo1.0) is built as a fork of the compiler\n- [Eni's cairo1-template](https://github.com/msaug/cairo1-template) uses git submodules for installation\n- [Shramee's Starklings](https://github.com/shramee/starklings-cairo1) use the cairo1 crates as libraries and builds its own framework\n\n## License\n\n[MIT](https://github.com/auditless/cairo-template/blob/main/LICENSE) © [Auditless Limited](https://www.auditless.com)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fctrlc03%2Fcairo1-random-code","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fctrlc03%2Fcairo1-random-code","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fctrlc03%2Fcairo1-random-code/lists"}