{"id":28262831,"url":"https://github.com/dappcoderr/cryptoknight-contract","last_synced_at":"2026-01-26T19:06:06.362Z","repository":{"id":115541413,"uuid":"520896379","full_name":"DappCoderr/CryptoKnight-Contract","owner":"DappCoderr","description":"This repository is built for learners who want to learn and build a smart contract on a Flow chain, and it has basics to advance sample smart contracts written in cadence.","archived":false,"fork":false,"pushed_at":"2025-05-02T08:28:05.000Z","size":8307,"stargazers_count":2,"open_issues_count":6,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-16T14:51:14.901Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://crypto-knight-frontend.vercel.app/","language":"Cadence","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/DappCoderr.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,"zenodo":null}},"created_at":"2022-08-03T13:41:02.000Z","updated_at":"2025-05-13T07:18:52.000Z","dependencies_parsed_at":null,"dependency_job_id":"f45e5c41-cc7e-4323-a4aa-187a568aaea8","html_url":"https://github.com/DappCoderr/CryptoKnight-Contract","commit_stats":null,"previous_names":["dappcoderr/cadence-fun"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/DappCoderr/CryptoKnight-Contract","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DappCoderr%2FCryptoKnight-Contract","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DappCoderr%2FCryptoKnight-Contract/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DappCoderr%2FCryptoKnight-Contract/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DappCoderr%2FCryptoKnight-Contract/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DappCoderr","download_url":"https://codeload.github.com/DappCoderr/CryptoKnight-Contract/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DappCoderr%2FCryptoKnight-Contract/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28785172,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-26T13:55:28.044Z","status":"ssl_error","status_checked_at":"2026-01-26T13:55:26.068Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":[],"created_at":"2025-05-20T07:13:02.239Z","updated_at":"2026-01-26T19:06:06.346Z","avatar_url":"https://github.com/DappCoderr.png","language":"Cadence","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🛡️ CryptoKnight\n\n**CryptoKnight** is an educational project designed to help developers learn [Cadence](https://developers.flow.com/cadence) — the resource-oriented smart contract language on the [Flow blockchain](https://www.flow.com/). By building and experimenting with a simple NFT-based battle game, you'll gain hands-on experience with core blockchain concepts like account storage, resource management, capabilities, and the Flow NFT standard.\n\nWhether you're a complete beginner or a seasoned developer, **CryptoKnight** offers an engaging way to sharpen your Cadence skills and develop your own crypto games on Flow.\n\n---\n\n## 🗂️ Project Structure\n\nHere's a quick overview of the project structure:\n\n```\n.\n├── cadence/              # Cadence smart contract code\n│   ├── contracts/        # All main and standard contracts (e.g., CryptoKnight, NFT standards, MetadataViews, ViewResolver)\n│   ├── scripts/          # Read-only Cadence scripts\n│   ├── transactions/     # State-changing Cadence transactions\n│\n└── flow.json             # Flow project config (like package.json)\n```\n\n## 🚀 Getting Started\n\nYou can try out and test Cadence code using the [Flow Playground](https://play.flow.com/). It allows you to run contracts, transactions, and scripts in a sandbox environment.\n\n### 🛠️ To Run Locally:\n\n1. **Install the Flow CLI**\n   Follow instructions at [Flow CLI Install Guide](https://developers.flow.com/tools/flow-cli/install)\n\n2. **Clone this repository**:\n\n   ```bash\n   git clone https://github.com/your-username/CryptoKnight.git\n   cd CryptoKnight\n   ```\n\n3. **Start the Flow emulator**:\n\n   ```bash\n   flow emulator\n   ```\n\n4. **Deploy the contracts**:\n\n   ```bash\n   flow project deploy\n   ```\n\n5. **Interact with the contracts**:\n\n   ```bash\n   flow transactions send ./cadence/transactions/setup_account.cdc\n\n   flow transactions send ./cadence/transactions/mintKnight.cdc \"Knight 1\" 0\n\n   flow scripts execute ./cadence/scripts/checkCollection.cdc\n\n   flow scripts execute ./cadence/scripts/getKnightIDs.cdc\n   ```\n\n---\n\n### 🌐 To Use on Testnet:\n\n1. Generate Flow account keys:\n\n   ```bash\n   flow keys generate\n   ```\n\n2. Go to the [Flow Testnet Faucet](https://faucet.flow.com/create-account) and create a new testnet account using your **public key**.\n\n3. Update the `flow.json` file:\n\n   - Add the new **testnet address** and **private key** under the `accounts` section.\n   - Ensure the `deployments` section includes `testnet`.\n\n4. Deploy and interact with contracts:\n\n   ```bash\n   flow transactions send ./cadence/transactions/setup_account.cdc --network=testnet --signer testnet\n\n   flow transactions send ./cadence/transactions/mintKnight.cdc --network=testnet --signer testnet \"Sean\" 1\n\n   flow scripts execute ./cadence/scripts/get_totalSupply.cdc --network=testnet\n   ```\n\nFor more details, refer to the [Flow CLI deployment guide](https://developers.flow.com/tools/flow-cli/deployment/deploy-project-contracts).\n\n## ⚙️ How to Use This Repository\n\nThere are **two main ways** you can use this repository:\n\n### 1. **Learn Cadence**\n\nUse this repo as a guided example while learning Cadence:\n\n- Explore `/contracts` to study resource-oriented programming\n- Modify and experiment with `/transactions` and `/scripts` to deepen your understanding.\n- Use the Flow Playground or CLI to test changes.\n\n### 2. **Build Your Own Game**\n\nUse this as a starter template:\n\n- Fork the repo\n- Customize the `CryptoKnight.cdc` contract to suit your game mechanics.\n- Use or extend the React frontend in the `/web` directory to create your own dApp.\n\n## 👤 Created By\n\n**CryptoKnight** is a Flow Developer Grant project built by [**DC**](https://x.com/dappcoder_), a Flow Dev Ambassador and smart contract engineer from India. Our mission is to make Cadence education accessible, engaging, and beginner-friendly — while empowering you to build your own blockchain applications across domains like Games, DeFi, RWAs, NFTs, DAOs, and more.\n\nLet’s bring some fun to smart contract development on Flow! 🧙‍♂️⚔️\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdappcoderr%2Fcryptoknight-contract","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdappcoderr%2Fcryptoknight-contract","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdappcoderr%2Fcryptoknight-contract/lists"}