Skip to content

A descentralized Pokémon trading card game using ChainLink

License

Notifications You must be signed in to change notification settings

Obalfour/CryptoPokes

Repository files navigation

CryptoPokes

This repository contains a project of a Pokémon Trading Card Game using ERC 721 Non-Fungible Tokens. A special token is rewarded to a lucky user using on-chain verifiable random functions.

The dapp was created using a sample project from buidler. The NFTs were created following this guide. The random number generator used to mint the special tokens was created using this Chainlink VRF tutorial.

Wanna see this project live? Try it out.

Preview of the site

Quick start

The first things you need to do are cloning this repository and installing its dependencies:

git clone https://github.com/Obalfour/CryptoPokes.git
cd CryptoPokes
npm install

Before deploying your contract you have to set the credentials in your .env file

Then, on a new terminal, go to the repository's root folder and run this to deploy PokeToken contract:

npx buidler run scripts/deploy_PokeToken.js --network kovan

Finally, we can run the frontend with:

cd frontend
npm install
npm start

Open http://localhost:3000/ to see your Dapp. You will need to have Metamask installed and listening to the Kovan network.

What’s Included?

Your environment will have everything you need to build a Dapp powered by Buidler and React.

Contracts

  • PokeToken: An ERC721 contract for Pokémon collectible cards. Try it on Remix.

  • RandomNumberConsumer: A contract that uses Chainlink VRF for minting a special collectible card. Try it on Remix.

Resources

Additional information about Chainlink and the database for the metadata API is available in the docs section. There is also an article on Medium.

Troubleshooting

  • Invalid nonce errors: if you are seeing this error on the buidler node console, try resetting your Metamask account. This will reset the account's transaction history and also the nonce. Open Metamask, click on your account followed by Settings > Advanced > Reset Account.

Special credits

151 pokemon of Kanto icon set by Geovanny Gavilanes

Pikachu by Mohammad Ali

Pokemon icons by roundicons.com

Thank you

We want to thank the entire Chainlink community for the support.

Thanks

Disclaimer

I'm not affiliated with Nintendo in any way. Pokémon® is a registered trademark by Nintendo. Nintendo® is a registered trademark.