gradient-token icon indicating copy to clipboard operation
gradient-token copied to clipboard

Example app for CryptoKitties clone tutorial

Gradient Token Tutorial

This repo is an example for my blog series about non-fungible token, where we were doing CryptoKitties clone.

The example is greatly simplified and we don't have genetic algorythms or any algorythms for breeding.

The final application will look somewhat like this:

screen shot 2018-04-03 at 08 07 30

Contents:

How To Install Dependencies

First install required dependencies:

You'll need local ethereum node, I recommend ganache-cli. You can install it from npm.

npm install -g ganache-cli

Then install contract dependencies:

yarn install

To install frontend dependencies go to front folder and run yarn install from there:

cd front
yarn install

How To Test

First make sure that local ethereum node is running. Execute:

ganache-cli -p 7545

Now you can compile and deploy contracts:

truffle compile && truffle migrate

Run contract tests:

truffle test

Switch to front directory and run frontend tests as well:

cd front
yarn test

Tests should pass.

How To Run

Make sure that you have local ethereum node running:

ganache-cli -p 7545

And contracts deployed:

truffle compile && truffle migrate

If everything is fine – run the frontend:

cd front
yarn start

You should see the following:

screenshot

You can remove all minted tokens by migrating your contract again:

truffle migrate --reset