Git Product home page Git Product logo

common-ts's Introduction

Common TypeScript library for Graph Protocol components

CI Coverage

Usage / Documentation

More information can be found in the @graphprotocol/common-ts README.

Development notes

General notes

Install dependencies

yarn

Build

yarn prepublish

Test

The following environment variables need to be defined for the test suite to run:

  • POSTGRES_TEST_HOST
  • POSTGRES_TEST_PORT (optional)
  • POSTGRES_TEST_USERNAME
  • POSTGRES_TEST_PASSWORD
  • POSTGRES_TEST_DATABASE

After that, the test suite can be run with:

yarn test

Release

  1. Update the changelog(s).
  2. Run
    yarn publish

Copyright

Copyright © 2020 The Graph Foundation.

Licensed under the MIT license.

common-ts's People

Contributors

abarmat avatar dtourek avatar fordn avatar jannis avatar laynehaber avatar pcarranzav avatar snario avatar that3percent avatar theodus avatar tilacog avatar tmigone avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

common-ts's Issues

How to request network data in subgraph

I want to use Get to request some tripartite data, waht should I do?

In Subgraph, I can get tokenURI, then i want to get token info use this tokenURI.

If i can use node-fetch or axios, i think this is easy, but Subgraph doesn't support this, so what do I do?

Move helpers from contracts to common-ts

The function here:

https://github.com/graphprotocol/contracts/blob/master/scripts/contracts/connectedContracts.ts

Can be moved here. I think the simple function like staking are probably duplicated and can be removed. But this is what I think is valuable:

  • EthereumDID registry functions - this will help nena in the front end with Account Metadata, Subgraph Metadata, and Version metadata handling
  • creating new subgraphs and new subgraph versions - This will also help in the front end

All other functions are probably duplicate. If not , they are simple and we can add them

EIP712 hashstruct/encodedata need to keccak256 hash strings

To match the EIP712 example provided, the RFC and the way it's implemented in the DisputeManager, the name and version need to be hashed as they are strings.

Location:

[domain.name, domain.version, domain.chainId, domain.verifyingContract, domain.salt],

Reference:

Possible memory leak with Eventuals

Eventuals are great but they are a simpler and less used version of RxJs.

It's been known by a long time that indexer-service (ts version) and indexer-agent have a memory leak that grows constantly no matter how many subgraphs are being served.

The only thing that runs constantly on a time based and is shared between those components are eventuals.

I propose updating the implementation of Eventuals to use RxJs because it's widely used and well tested.

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.