Skip to content

otoco-io/OtoCo-Subgraph

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Otoco - Subgraph

This subgraph listens for the following smart contract events.

For Master Contract:

NewSeriesCreated(address,address,string)

For Series Contract:

OwnershipTransferred(indexed address,indexed address)

These events get save in to the following entities :

enum JURISDICTION {
  DELAWARE,
  WYOMING
}

type Master @entity {
  id: ID! # Master jurisdiction contract
  companiesCount: Int! # How many companies has deployed on this jurisdiction
  companies: [Company]! # List of companies deployed on this jurisdiction
  jurisdiction: JURISDICTION! # Jurisdiction name
}

type Company @entity {
  id: ID! # Series contract address
  parent: Master! # Master contract where series reside
  name: String! # Series name
  jurisdiction: JURISDICTION! # Series Jurisdiction
  creator: Bytes! # Address of the creator of the series
  owner: Bytes! # Current owner address
  
}

To create graph, run graph create otoco --node http://127.0.0.1:8020

After updating subgraph or schema, run npm codegen

To deploy locally, run graph deploy otoco-io/otoco --debug --ipfs http://localhost:5001/ --node http://127.0.0.1:8020

About

Otoco Subgraph used to run queries on ethereum network.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors