GithubHelp home page GithubHelp logo

openzeppelin / starter-kit Goto Github PK

View Code? Open in Web Editor NEW
122.0 26.0 67.0 2.1 MB

An OpenZeppelin starter kit containing React, OpenZeppelin SDK & OpenZeppelin Contracts.

Home Page: https://openzeppelin.com/starter-kits

License: MIT License

JavaScript 71.62% HTML 2.89% Solidity 2.57% Shell 0.14% SCSS 22.77%
truffle ganache react ethereum openzeppelin metamask infura web3 web3js dapp

starter-kit's Introduction

โš ๏ธ This project is deprecated. We are no longer actively developing new features nor addressing issues. Read here for more info, and reach out if you are interested in taking over maintenance. We suggest looking into create-eth-app for a popular alternative to this project.

OpenZeppelin Starter Kit

An OpenZeppelin Starter Kit containing React, OpenZeppelin CLI, OpenZeppelin Contracts, Truffle and Infura.

This kit comes with everything you need to start using upgradeable Smart contracts inside your applications. It also includes all the configuration required to deploy to different networks.

Requirements

Install Ganache, and Truffle

Installation

Ensure you are in a new and empty directory, and run the unpack command with starter to create a starter project:

npx @openzeppelin/cli unpack starter

Run

In a new terminal window, run your local blockchain:

ganache-cli --deterministic

In your original terminal window, at the top level of your folder, initialize the project and follow the prompts:

npx oz init

In a new terminal window, in the client directory, run the React app:

cd client
npm run start

Interact

You can interact directly with your smart contracts from the openzeppelin cli.

npx oz transfer

send funds to a given address.

npx oz balance [address]

query the ETH balance of the specified account, also supports ERC20s.

npx oz send-tx

sends a transaction to your contract and returns the events.

npx oz call

execute a constant method and receive back the value.

Type npx oz to see a complete list of availible commands.

Test

Truffle can run tests written in Solidity or JavaScript against your smart contracts. Note the command varies slightly if you're in or outside of the truffle development console.

// inside the development console.
test

// outside the development console..
truffle test

Jest is included for testing React components. Compile your contracts before running Jest, or you may receive some file not found errors.

// ensure you are inside the client directory when running this
npm run test

Build

To build the application for production, use the build script. A production build will be in the client/build folder.

// ensure you are inside the client directory when running this
npm run build

FAQ

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.