logo

Awesome Blockchain: Polkadot

Published on

Polkadot CryptoKitties

This guide aims to give you the latest details on Polkadot CryptoKitties. The old version of the Polkadot CryptoKitties has been using deprecated version of Polkadot SDK. Here’s how to get started with the latest tools and features on CryptoKitties.

Target: ubuntu v22.04

1. Introduction

1.1 What is Polkadot ant Substrate?

Polkadot is a blockchain protocol designed to enable different blockchains to interoperate and share information securely. It was created by Dr. Gavin Wood, a co-founder of Ethereum, and is developed by the Web3 Foundation.

Substrate is a modular framework for building blockchains, developed by Parity Technologies. It is the backbone technology behind Polkadot but can also be used independently to create custom blockchains. Substrate simplifies blockchain development by providing a set of libraries, tools, and a flexible runtime environment.

1.2 What is CryptoKitties?

CryptoKitties is a blockchain-based game that allows players to buy, sell, and breed virtual cats. Each CryptoKitty is a unique digital asset, represented as a non-fungible token (NFT). The game became popular for its innovative use of blockchain technology, enabling users to truly own and trade their virtual pets.

1.3 What is different from original tutorial?

This tutorial

DEMO

2. Getting Started

2.1 Setup Prerequisite

  • Install build-essential package using apt.
sudo apt install build-essential
  • Install reuqired packages
sudo apt install --assume-yes git clang curl libssl-dev protobuf-compiler
  • Install Rust and Toolchains
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
source $HOME/.cargo/env
rustup default stable
rustup update
rustup update nightly
rustup target add wasm32-unknown-unknown --toolchain nightly

2.2 Clone and Compile Substrate Node Template

  1. Clone the node template repository by running the following command:
git clone https://github.com/substrate-developer-hub/substrate-node-template substrate-kitties
  1. Change to the root of the node template directory by running the following command:
cd substrate-kitties
  1. Compile the node template by running the following command:
cargo build --release

Because of the number of packages required, compiling the node can take several minutes.

  1. Run compiled node
./target/release/node-template --dev

2.3 Interacting with Your Node

  1. Clone front-end template
git clone https://github.com/substrate-developer-hub/substrate-front-end-template apps
  1. Change to the root of the front-end template directory by running the following command:
cd apps
  1. Install the dependencies for the front-end template by running the following command:
yarn install
  1. Start the front-end template by running the following command:
yarn start

2.4 Check running node status

Result