{"id":17105199,"url":"https://github.com/amanusk/cairo-paradigm-ctf","last_synced_at":"2026-01-04T19:36:14.783Z","repository":{"id":57878267,"uuid":"528769918","full_name":"amanusk/cairo-paradigm-ctf","owner":"amanusk","description":"Solutions and scripts for Cairo Challenges of Paradigm CTF 2022 ","archived":false,"fork":false,"pushed_at":"2022-08-25T12:46:31.000Z","size":320,"stargazers_count":11,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-29T04:16:00.212Z","etag":null,"topics":["cairo","cairo-lang","ctf-solutions","ctf-writeups","starknet"],"latest_commit_sha":null,"homepage":"","language":"Cairo","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/amanusk.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}},"created_at":"2022-08-25T08:56:54.000Z","updated_at":"2024-12-17T23:57:11.000Z","dependencies_parsed_at":"2023-01-16T18:45:55.960Z","dependency_job_id":null,"html_url":"https://github.com/amanusk/cairo-paradigm-ctf","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/amanusk%2Fcairo-paradigm-ctf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amanusk%2Fcairo-paradigm-ctf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amanusk%2Fcairo-paradigm-ctf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amanusk%2Fcairo-paradigm-ctf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/amanusk","download_url":"https://codeload.github.com/amanusk/cairo-paradigm-ctf/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245164336,"owners_count":20571107,"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":["cairo","cairo-lang","ctf-solutions","ctf-writeups","starknet"],"created_at":"2024-10-14T15:41:14.064Z","updated_at":"2026-01-04T19:36:14.751Z","avatar_url":"https://github.com/amanusk.png","language":"Cairo","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Running Cairo paradigm CTF solutions locally\n\nThis repository contains solutions for the Cairo challenges of the 2022 Paradigm-CTF\n\n## Creating env instructions\n\n- create virtual environment\n\n```\npython3 -m venv ./venv\nsource ./venv/bin/activate\n```\n\n- Install requirements\n\n```\npip install -requirements ./requirements.txt\n```\n\n- Run the server for deploying local environments\n\n```\ncd ./paradigm-ctf-infrastructure/images/cairo-challenge-base\npython -m cairo_sandbox.server\n```\n\n## Compiling the contracts\n\nThe compiled contrats have already been place in the correct direcotry.\n\n### Compiling the contrats from source:\n\nContracts can be compiled by running `nile compile`. This generates both the compiled contract files and abis in the `artifacts` dir\n\nAlthough the generated files have a `.json` extension, the individual challenge scripts expect the file to be named `.cairo`\n\n- Rename files to fit format: (for example)\n\n`mv artifacts/almost_erc20.json compiled/almost_erc20.cairo`\n\nCopy the files to the infrastructure directory: (for example)\n\n`cp ./artifacts/almost_erc20.json paradigm-ctf-infrastructure/images/cairo-challenge-base/compiled/almost_erc20.cairo`\n\n## Running individual challanges\n\n- Run the challenge script. The sever script should already be running in another terminal.\n\n```\ncd ./paradigm-ctf-infrastructure/images/cairo-challenge-base\npython -m cairo_sandbox.proxy-chal.py\n```\n\n- Choose option 1 to create new environment\n- Input any number (e.g. 1) as ticket\n\n- Wait for the contracts to be deployed\n- Copy the `rpc endpoint`, `private key` and `contract` to their respecable value in the solution script\n\n## Run the solution script\n\nRun the solution script with\n\n```\npython ./scripts/cairo-auction.py\n```\n\n## Thanks\n\nIf you like it then you shoulda put a start ⭐ on it\n\nTwitter: [@amanusk\\_](https://twitter.com/amanusk_)\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famanusk%2Fcairo-paradigm-ctf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Famanusk%2Fcairo-paradigm-ctf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famanusk%2Fcairo-paradigm-ctf/lists"}