Coder Social home page Coder Social logo

0xfable's Introduction

0xFable

See also the README files of the various subpackages:

Installation

Tooling required:

  • Make
  • Foundry
    • Last foundryup: 16 May 2023
  • Node.js & PNPM (npm install -g pnpm)
    • Tested with Node v20.1.0

Run contract tests for basic sanity testing:

  • (cd packages/contracts && make test)

IDEs

If you're using Visual Studio Code, the contract remappings will only be picked up if you set the root of the project to the contracts package. Otherwise, you'll add to manually add the remappings (from remappings.txt) to the Solidity plugin configuration.

Running

To deploy and try out the app locally:

make dev

This will do the following from a single terminal (using run-pty):

  • Run anvil (local EVM node) at localhost:8545 with chain ID 1337 (this chain comes preconfigured in Metamask and other wallets as "Localhost")
  • Run the NextJS dev command (web server + live reload)
  • Deploy the contracts to the local node
  • Build the zk circuits (this make take a while, especially the first time when you'll need to download the 300MB trusted setup file)

After that, you can visit the app at http://localhost:3000/ (if that port is already occupied, NextJS might affect another one).

If your shell doesn't support run-pty, you can run the commands manually in different terminals:

make anvil
make webdev
make deploy
make circuits

Note: at least for me, Metamask has a bug that doesn't let the app initiate chain switching when the target is "Localhost" (other targets work fine). If the same thing happens to you, you'll need to switch to the Localhost chain manually within the wallet.

Commands

See the Makefile for a description of all top-level make commands.

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.