GithubHelp home page GithubHelp logo

isabella232 / bullrunbabes-subgraph Goto Github PK

View Code? Open in Web Editor NEW

This project forked from protofire/bullrunbabes-subgraph

0.0 0.0 0.0 119 KB

Subgraph for bullrunbabes nfts

TypeScript 15.11% Solidity 84.89%

bullrunbabes-subgraph's Introduction

BullrunBabes [https://www.bullrunbabes.com/rules]


This subgraph allows you to interact with the game contracts and query information about the project's tokens and transactions made.

The graph

https://thegraph.com/hosted-service/subgraph/protofire/bullrunbabes

API

https://api.thegraph.com/subgraphs/name/protofire/bullrunbabes

Entities

Card

Information related to the NFT. Here you can find the transaction history also. For example, if you know the ID of the token you can get the transaction's history about it:

{
  card(id: 1919) {
    tier
    history {
      timestamp
      type
      from {
        id
      }
      to {
        id
      }
    }
  }
}

Or get all cards by owner address:

{
  cards(where: {owner: "0xb0151d256ee16d847f080691c3529f316b2d54b3"}) {
    id
    history {
      timestamp
      type
      from {
        id
      }
      to {
        id
      }
    }
  }
}

Transaction

We have different kind of transaction that you can find into our sub graph:

Draw is when the NFT it's minted.

Buy the NFT was transferred from one address to another.

Trade the NFT was traded for another different NFT, which could be one-to-one or more than one depending on the level of the card want to receive.

As each one it's a transaction itself, all these transactions types could be queried by the same entity:

{
  transactions(where: {type: TRADE}) {
    timestamp
    card {
      id
    }
  }
}

Date

Through this entity, you could get the transactions made on a specific date and you can do that with the "human format" of a date.

{
  dates(where: {day: "01", month: "01", year: "2022"}) {
    transactions {
      type
      card {
        id
      }
    }
  }
}

bullrunbabes-subgraph's People

Contributors

piquinikis 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.