Code Monkey home page Code Monkey logo

jokedaov2dev's Introduction

jokedao

Check out the live site at jokedao.io!

You can also find v1 at jokedao.jokedao.io.

Pre-requisites

  • yarn installed
  • node version >= 17.0.0
  • Have an Ethereum wallet (like MetaMask for instance)

Before you start

  • Navigate to packages/react-app-revamp (the v2 site package)
  • Install dependencies with yarn install
  • Create a .env file and paste the following values:
NEXT_PUBLIC_INFURA_ID=
NEXT_PUBLIC_ALCHEMY_KEY=
NEXT_PUBLIC_SUPABASE_URL=
NEXT_PUBLIC_SUPABASE_ANON_KEY=
NEXT_PUBLIC_LENS_API_URL=
NEXT_PUBLIC_WEB3STORAGE_TOKEN=

Getting Started

First, navigate to the top directory of this repo and run the development server with

yarn dev

Open http://localhost:3000 with your browser to see the result.

Development Notes

Updating bytecode

In order to generate and/or update the bytecode of your project, you first need to run

yarn chain

to start a development chain locally.

Once you do that, run

yarn deploy

Upon a successful deploy to the local development chain, this will copy the generated bytecode and ABI into the react-app (v1) and react-app-revamp (v2) packages so that the app can access it.

You will also need to do two more things if the ABI is changed:

  • Make a copy of the bytecode and abi in the versioning folder packages/react-app-revamp/contracts/bytecodeAndAbi by copying the content in Contest.sol, which is the latest version of bytecode, into contracts/bytecodeAndAbi and renaming it following the convention.
  • Update ABI parser code in packages/react-app-revamp/helpers/getContestContractVersion.ts following the pattern of adding the last version of the bytecode and a code change that was distinctive to it (so that the front end can identify the version of bytecode it is looking at when trying to decipher a contract on a chain).

If you changed the ABI of a module or GenericVotesTimestampToken.sol you'll want to follow the same steps to maintain versioning of that code.

Here is an example commit that does all of these steps.

Make sure to do all of these steps before committing any changes to the contract code to make sure that the bytecode that the site is deploying is the same as what you have written in the hardhat package! And also so that the site is able to correctly version a given deployed contract's ABI when reading from it.

Built with

  • NextJS
  • Tailwind CSS & Headless-UI
  • ethers, wagmi, @wagmi/core, @rainbow-me/rainbowkit
  • zustand
  • Vercel.

JokeDAO V2 front-end is hosted on Vercel.

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.