Giter Club home page Giter Club logo

monorepo's Introduction

Oddworx Monorepo

  • contracts - All flattened contracts used in the Oddworx world. Contracts are added here after they're deployed.
  • subgraph - The subgraph that indexes events from all contracts in the Oddworx world and it's used on our websites and discord bots.

How to use this repo

There are two reasons for using this repo.

  1. You are developing a new contract that will interact with Oddworx contracts.

If you want to deploy a contract that interacts with Oddworx contracts, you should use the flattened contracts inside the contracts/src directory,

  1. You are developing something that will use the Oddworx subgraph or want to contribute to the subgraph.

To make development easier, you can spin up a local chain and local subgraph with all Oddworx contracts setup by cloning this repo and running yarn start.

Local chain RPC url: http://localhost:8545 Subgraph's GraphiQL interface: http://localhost:8000/subgraphs/name/alephao/Genzee/graphql Subgraph GraphQL endpoint: http://localhost:8000/subgraphs/name/alephao/Genzee

How the setup of development env works

The start.ts script run a bunch of commands to setup the environment.

  1. Starts the docker containers specified on docker-compose.yml by running docker compose up. That's a local chain, an ipfs node, a postgres database, and a graph node.
  2. Wait for the local chain to become a vailable by trying to get the balance of an account. We know the chain is up when the request is successful.
  3. Once the chain is up, delpoy the contracts by running yarn setup in the contracts/ directory.
  4. Wait for the graph-node to be up. We do this by making an OPTION request to the graph-node until it stops failing.
  5. Once graph-node is up, we create and deploy the subgraph by running yarn create:local and yarn create:local in the subgraph/ directory.

monorepo's People

Contributors

alephao avatar

Stargazers

 avatar  avatar

monorepo's Issues

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.