Welcome to the official repo for the Starknet Bootcamp @ DevConnect.
If you're here, it's likely you signed up to join us at DevConnect Amsterdam 2022 (or you just stumbled upon, which is fine too).
Details on the bootcamp itself are provided in the Notion page.
This repo is your main tool to get going through the bootcamp, and hopefully teach you all the practical details programming in Starknet, ahead of the Starknet Hackathon.
It consists of three main components:
- packages/contracts a Hardhat project, with all the starknet goodness pre-installed, and some sample code;
- packages/web A next.js app ready to interact with starknet contracts;
- docker-compose.yml A docker setup that makes it easy to manage the Starknet & Ethereum nodes required for development.
The entire project is intended for local development only (We use starknet-devnet and Ganache instead of testnets), and favors JavaScript tooling instead of Python. We opted for this since that's what most commonly known by Solidity developers, which according to sign ups, make up the vast majority of this bootcamp.
Bootcamp slides - Day 1 Goerli Faucet Voyager Explorer Cairo playground Starknet playground
Follow these steps to setup the repo and get ready for the bootcamp
- 1. Clone the repo
- 2. Install requirements
- 3. Install packages
- 4. Compile the contracts
- 5. Start the development nodes
- 6. Run the test suite
- 7. Bonus: Get the UI running
git clone [email protected]/lighshiftdev/starknet-bootcamp
cd starknet-bootcamp
git submodule init && git submodule update
- NodeJS. Version 16.x recommended. Use your OS's package manager, or a tool such as asdf
- Docker. Follow the appropriate instructions for your OS
# Install dependencies
yarn install
yarn run compile
While in the repository's root directory, docker-compose up -d
will spin up two containers:
yarn run test
If you get only green tests here, it means you're done and ready to rock ๐
yarn run deploy:starknet:devnet
yarn ui:start
And go to http://localhost:3000
.
The repository is already setup with a sample Counter
contract, as well as an NFT
, and some boilerplate code that will be useful for future tasks.
During the bootcamp, we'll start by getting familiar with cairo code, by doing a code walkthrough of both Counter
and NFT
Your task will be to implement a Rock Paper Scissor game with the following mechanics:
- Provide the ability for two players to compete in a rock paper scissor game
- The winner of a game is gifted with a newly minted NFT
- This NFT can later be transfered to an L1 contract throught using cross-chain messaging.
This repository was put together with love by Lightshift Capital.