Git Product home page Git Product logo

nextjs-smartcontract-lottery's Introduction

Getting Started

Requirements

  • git
    • You'll know you did it right if you can run git --version and you see a response like git version x.x.x
  • Nodejs
    • You'll know you've installed nodejs right if you can run:
      • node --version and get an ouput like: vx.x.x
  • Yarn instead of npm
    • You'll know you've installed yarn right if you can run:
      • yarn --version and get an output like: x.x.x
      • You might need to install it with npm or corepack

Quickstart

git clone https://github.com/Tonashiro/nextjs-smartcontract-lottery.git
cd nextjs-smartcontract-lottery
yarn
yarn dev

Usage

  1. Run your local blockchain with the lottery code

In a different terminal / command line

git clone https://github.com/Tonashiro/blockchain-solidity-course.git
cd hardhat-smartcontract-lottery
yarn 
yarn hardhat node

You can read more about how to use that repo from it's README.md

  1. Add hardhat network to your metamask/wallet
  • Get the RPC_URL of your hh node (usually http://127.0.0.1:8545/)
  • Go to your wallet and add a new network. See instructions here.
    • Network Name: Hardhat-Localhost
    • New RPC URL: http://127.0.0.1:8545/
    • Chain ID: 31337
    • Currency Symbol: ETH (or GO)
    • Block Explorer URL: None

Ideally, you'd then import one of the accounts from hardhat to your wallet/metamask.

  1. Run this code

Back in a different terminal with the code from this repo, run:

yarn dev
  1. Go to UI and have fun!

Head over to your localhost and play with the lottery!

nextjs-smartcontract-lottery's People

Contributors

tonashiro avatar

Watchers

 avatar

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.