Giter Site home page Giter Site logo

tomonari-t / ethereum-tart Goto Github PK

View Code? Open in Web Editor NEW

This project forked from chuckbergeron/etherplate

0.0 2.0 0.0 3.1 MB

This is a boilerplate for Ethereum DApps with TypeScript & React/Redux & OpenZeppelin ERC721

JavaScript 77.24% HTML 3.31% CSS 7.07% TypeScript 12.39%

ethereum-tart's Introduction

Ethereum-tart

PRs Welcome CC0

What is this?

This is an boilerpate project showing how you can hook up your Ethereum Non-Fungible Tokens (NFTs, ERC721, similar to CryptoKitties) contract in a DApp.

Etherplate uses OpenZeppelin's fantastic community-audited contracts as a base to implement the ERC721 standard.

This is forked from chuckbergeron/etherplate that is awesome project

Setup

Requires NPM

Homebrew on Mac OSX:

brew install node npm

Apt on Linux:

apt-get install node npm

Install truffle globally:

npm install truffle -g

Install the local NPM packages:

npm install

Environment Variables

  1. cp .env.example .env

  2. Enter your own twelve random words in the .envrc.

  3. Also, we'll leverage Infura's Ethereum Ropsten testnet node, so make sure to set up an account and paste your private key in your .env

Ganache (CLI)

Create a directory for ganache-cli to store it's database in:

mkdir .ganache

Compile the Solidity code

npm run truffle:compile

Migrate the Contracts

This will deploy the contract to the network (tip: use --network=ropsten to deploy to Ethereum's Ropsten Testnet)

npm run truffle:migrate

Run the Project

Make sure the truffle contracts are compiled and migrated.

In one terminal window, run the ganache-cli (local Ethereum RPC test node) with:

./ganache.sh

Once Ganache is running, in another terminal start the Webpack dev server.

npm run start

Your server should now be running at http://127.0.0.1:8080

truffle.js & truffle-config.js

Why is there both a truffle and truffle-config file?

  • On Windows, truffle-config.js is required. You can safely delete the one you don't need (ie on Mac/Linux you can delete truffle-config.js)

Building the Project

npm run build

Note: Currently we are manually migrating contracts against the Ropsten & Rinkeby testnets, and checking the build into the repo. This is less than ideal. It would be better to use a build script such as the netlify-build.sh file and compile contracts on the server.

Running the Tests

To run the DApp test suite (React components, etc):

npm test

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.