Skip to content

erc721 token tutorial for the eth denver workshop

Notifications You must be signed in to change notification settings

leanthebean/colors

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ERC-721 Token Tutorial - Color Tokens!

Set Up

First, make sure you have nodejs v8, git, and metamask installed

Next up, start installing some global dependencies. We'll need testrpc and truffle for this tutorial

  • npm install -g ethereumjs-testrpc
  • npm install -g truffle

Next is to clone/download this repository and install all the node dependencies

  1. git clone [email protected]:leanthebean/colors.git
  2. cd colors
  3. npm install

Using Truffle + OpenZeppelin to write out our ERC-721 contract to mint Colors

We're going to inherit the implemented ERC-721 contract from OpenZeppelin
https://github.com/OpenZeppelin/zeppelin-solidity/blob/master/contracts/token/ERC721/ERC721Token.sol

As well as their Ownable implementation
https://github.com/OpenZeppelin/zeppelin-solidity/blob/master/contracts/ownership/Ownable.sol

We already have access to these when we did npm install as OpenZeppelin was already a dependency in package.json

In the colors directory, type
4. truffle init

Notice that truffle now added 3 directories: contracts, migrations, and test

Open up your favorite IDE (I use VisualStudio with a Solidity plugin) and go into the contracts directory. Let's begin!

  1. Create a new file called ColorsERC721.sol in the contracts directory

  2. Create a new file called ColorsERC721Test.js in the test directory

  3. Create a new file called 2_migrate_contract.js in the migrations directory

  4. Follow the vide/workshop steps to implement and test your contract, and once you do, the UI included in this tutorial should work with your contract :)

Workshop slides: https://docs.google.com/presentation/d/11ebTVQnl_0K9I2WWaUjtV5YPdH9yCOga5kqhZdSI308/edit?ts=5a83a50e#slide=id.g30fce2c670_0_0

Video of the workshop https://www.facebook.com/ETHDenver/videos/164729944178073/

Happy hacking!

About

erc721 token tutorial for the eth denver workshop

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages