Giter VIP home page Giter VIP logo

doublechain-subgraph's Introduction

Doublechain Subgraph [Briing]

Fostering customer bargaining and e-procurement through a decentralised marketplace on the blockchain

Doublechain is a customer-push e-marketplace built on top of Ethereum, where customers can aggregate their proposals, and suppliers try to outcompete each other in reverse auction bids to fulfil the order. Furthermore, smart contracts make it possible to automate many operational activities such as payment escrows/release upon delivery confirmation, increasing the efficiency along the supply chain. The implementation of this network is expected to improve market efficiency by reducing transaction costs, time delays and information asymmetry. Furthermore, concepts such as increased bargaining power and economies of scale, and their effects in buyer-supplier relationships, are also explored.

Runing the Subgraph

For more information see the docs on https://thegraph.com/docs/, a distributed blockchain event indexing engine that facilitates data querying.

Prerequisites

Instalation made with yarn, adjust for npm.

ganache-cli, truffle-cli, @graphprotocol/graph-cli, graph-node, docker, docker-compose

  • Run yarn global add ganache-cli truffle-cli @graphprotocol/graph-cli graph-node
  • Docker Instalation
  • Run git clone https://github.com/graphprotocol/graph-node/ (check setup instructions for docker version)

Compile the smart contracts and run the graph's blockchain indexing engine

  1. On the p2pchain folder, run yarn.
  2. Run a blockchain, e.g. ganache, in a separate terminal in the p2pchain folder: yarn ganache.
  3. Deploy contracts with yarn truffle. Update deployed contract's addresses in the subgraph.yaml file.
  4. Generate subgraph typescript files with yarn codegen.
  5. In a third terminal, on the graph-node cloned folder, run cd docker && docker-compose up.
  6. Create and deploy the subgraph to graph-node with yarn create-local && yarn deploy-local on the first terminal
  7. Run examples queries against GraphiQL (There is an example query within docs/example.graphql, you may run it directly in VSCode with the GraphQL extension by Prisma. Must run some transactions first. You can mock some data with yarn mocklists && yarn mockbuyers)

doublechain-subgraph's People

Contributors

0xtimepunk avatar

Stargazers

 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.