hoprnet / hopr-community

A selection of awesome HOPR projects.
GNU General Public License v3.0
5 stars 20 forks source link

[Bounty] Create Subgraph that indexes HoprChannel #22

Closed QYuQianchen closed 3 years ago

QYuQianchen commented 3 years ago

The following is an issue for bounty, meant for external contributors to pick up and work on the analytics of HOPR tokens. Click here to check all the bounties and here to check all the open positions at HOPR.

Introduction

The HOPR protocol provides network-level and metadata privacy for every kind of data exchange. A mixnet protects the identity of both sender and recipe ent by routing data via multiple intermediate relay hops that mix traffic.

Payments are handled via probabilistic micropayments, our custom layer-2 scaling solution on top of the Ethereum blockchain.

Task Description

We need to index HoprChannels using subgraphs from TheGraph. The GraphQL schema has been defined in the folder. Please complete the mapping logic and deploy the subgraph.

Definition of complete

Useful sources

gitcoinbot commented 3 years ago

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


This issue now has a funding of 200.0 HOPR (95.35 USD @ $0.48/HOPR) attached to it as part of the hoprnet fund.

gitcoinbot commented 3 years ago

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


Workers have applied to start work.

These users each claimed they can complete the work by 265 years, 4 months from now. Please review their action plans below:

1) controlcpluscontrolv has applied to start work _(Funders only: approve worker | reject worker)_.

The work is fairly straightforward from what you laid out and would love to do it! I do a lot with data analytics so this is in my area of expertise. Let me know if you have questions!

Learn more on the Gitcoin Issue Details page.

ManyRios commented 3 years ago

Working

gitcoinbot commented 3 years ago

@manyrios Hello from Gitcoin Core - are you still working on this issue? Please submit a WIP PR or comment back within the next 3 days or you will be removed from this ticket and it will be returned to an ‘Open’ status. Please let us know if you have questions!

Funders only: Snooze warnings for 1 day | 3 days | 5 days | 10 days | 100 days

ManyRios commented 3 years ago

Yes @gitcoinbot

ManyRios commented 3 years ago

.

gitcoinbot commented 3 years ago

@manyrios Hello from Gitcoin Core - are you still working on this issue? Please submit a WIP PR or comment back within the next 3 days or you will be removed from this ticket and it will be returned to an ‘Open’ status. Please let us know if you have questions!

Funders only: Snooze warnings for 1 day | 3 days | 5 days | 10 days | 100 days

ManyRios commented 3 years ago

Yep

QYuQianchen commented 3 years ago

Hi @ManyRios. Could you please create a WIP PR with your current code base to the repo?

ManyRios commented 3 years ago

Hi, ok I will... I sent you an email few days ago

QYuQianchen commented 3 years ago

Hi @ManyRios I don't think i've received it. Could you please communicate in this thread?

gitcoinbot commented 3 years ago

@manyrios Hello from Gitcoin Core - are you still working on this issue? Please submit a WIP PR or comment back within the next 3 days or you will be removed from this ticket and it will be returned to an ‘Open’ status. Please let us know if you have questions!

Funders only: Snooze warnings for 1 day | 3 days | 5 days | 10 days | 100 days

ManyRios commented 3 years ago

I'll make the PR today, sorry for the delay

ManyRios commented 3 years ago

almost ready to deploy

ManyRios commented 3 years ago

I sent a email to tech@hoprnet.org

ManyRios commented 3 years ago

Waiting :)

0xjjpa commented 3 years ago

@ManyRios ah! Sorry about that, will give you an update today :)

nionis commented 3 years ago

posting here the issue @ManyRios has:

graph codegen

  Skip migration: Bump mapping apiVersion from 0.0.1 to 0.0.2

  Skip migration: Bump mapping apiVersion from 0.0.2 to 0.0.3

  Skip migration: Bump mapping apiVersion from 0.0.3 to 0.0.4

  Skip migration: Bump mapping specVersion from 0.0.1 to 0.0.2

√ Apply migrations

× Failed to load subgraph from subgraph.yaml: Error in subgraph.yaml:

  Path: dataSources > 0 > eventHandlers > 0

  Event with signature 'Announcement(address indexed account,bytes multiaddr)' not present in ABI 'HoprChannels'.

  Available events:

  - Announcement(indexed address,bytes)

  - ChannelUpdate(indexed address,indexed address,(uint256,uint256,bytes32,bytes32,uint256,uint256,uint256,uint256,uint8,uint256,uint32,bool))

  Path: dataSources > 0 > eventHandlers > 1

  Event with signature 'ChannelUpdate(address indexed partyA,address indexed partyB,Channel newState)' not present in ABI 'HoprChannels'.

  Available events:

  - Announcement(indexed address,bytes)

  - ChannelUpdate(indexed address,indexed address,(uint256,uint256,bytes32,bytes32,uint256,uint256,uint256,uint256,uint8,uint256,uint32,bool))

error Command failed with exit code 1.

info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
ManyRios commented 3 years ago

posting here the issue @ManyRios has:

graph codegen

  Skip migration: Bump mapping apiVersion from 0.0.1 to 0.0.2

  Skip migration: Bump mapping apiVersion from 0.0.2 to 0.0.3

  Skip migration: Bump mapping apiVersion from 0.0.3 to 0.0.4

  Skip migration: Bump mapping specVersion from 0.0.1 to 0.0.2

√ Apply migrations

× Failed to load subgraph from subgraph.yaml: Error in subgraph.yaml:

  Path: dataSources > 0 > eventHandlers > 0

  Event with signature 'Announcement(address indexed account,bytes multiaddr)' not present in ABI 'HoprChannels'.

  Available events:

  - Announcement(indexed address,bytes)

  - ChannelUpdate(indexed address,indexed address,(uint256,uint256,bytes32,bytes32,uint256,uint256,uint256,uint256,uint8,uint256,uint32,bool))

  Path: dataSources > 0 > eventHandlers > 1

  Event with signature 'ChannelUpdate(address indexed partyA,address indexed partyB,Channel newState)' not present in ABI 'HoprChannels'.

  Available events:

  - Announcement(indexed address,bytes)

  - ChannelUpdate(indexed address,indexed address,(uint256,uint256,bytes32,bytes32,uint256,uint256,uint256,uint256,uint8,uint256,uint32,bool))

error Command failed with exit code 1.

info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

That's right

0xjjpa commented 3 years ago

Following up here on some comments from @nionis

The issue is not with the ABI but with the subgraph.yaml file, it looks like the events we specified don't match the ones in the ABI, the quickest thing I would try is to copy paste the Available events into subgraph.yaml

these ones seem to be Annoucement and ChannelUpdate. Can you give that a try? Furthermore, it would be great to have a PR attached to this issue so we can replicate this error locally and see how we can help :)

ManyRios commented 3 years ago

Ok, I will

0xjjpa commented 3 years ago

@ManyRios Let us know if you have an update here, would be great to have a PR or something we can take a look and support as needed ☺️

ManyRios commented 3 years ago

Following up here on some comments from @nionis

The issue is not with the ABI but with the subgraph.yaml file, it looks like the events we specified don't match the ones in the ABI, the quickest thing I would try is to copy paste the Available events into subgraph.yaml

these ones seem to be Annoucement and ChannelUpdate. Can you give that a try? Furthermore, it would be great to have a PR attached to this issue so we can replicate this error locally and see how we can help :)

here is the the output:

graph codegen Skip migration: Bump mapping apiVersion from 0.0.1 to 0.0.2 Skip migration: Bump mapping apiVersion from 0.0.2 to 0.0.3 Skip migration: Bump mapping apiVersion from 0.0.3 to 0.0.4 Skip migration: Bump mapping specVersion from 0.0.1 to 0.0.2 √ Apply migrations × Failed to load subgraph from subgraph.yaml: Error in subgraph.yaml:

Path: dataSources > 0 > eventHandlers > 0 Event with signature 'Announcement(indexed address, bytes)' not present in ABI 'HoprChannels'. Available events:

0xjjpa commented 3 years ago

Hi @ManyRios ! Can you push your work on your own branch so we can have a PR and see these changes? We want to support you here, but copy and pasting error code is not the best way on how to do so. By pushing your branch we can replicate the same error you are having, thanks!

gitcoinbot commented 3 years ago

@manyrios Hello from Gitcoin Core - are you still working on this issue? Please submit a WIP PR or comment back within the next 3 days or you will be removed from this ticket and it will be returned to an ‘Open’ status. Please let us know if you have questions!

Funders only: Snooze warnings for 1 day | 3 days | 5 days | 10 days | 100 days

ManyRios commented 3 years ago

https://github.com/hoprnet/hopr-analytics/pull/40

gitcoinbot commented 3 years ago

@manyrios Hello from Gitcoin Core - are you still working on this issue? Please submit a WIP PR or comment back within the next 3 days or you will be removed from this ticket and it will be returned to an ‘Open’ status. Please let us know if you have questions!

Funders only: Snooze warnings for 1 day | 3 days | 5 days | 10 days | 100 days

gitcoinbot commented 3 years ago

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


@manyrios due to inactivity, we have escalated this issue to Gitcoin's moderation team. Let us know if you believe this has been done in error!

Funders only: Snooze warnings for 1 day | 3 days | 5 days | 10 days | 100 days

0xjjpa commented 3 years ago

The team solved this one internally, @gitcoinbot feel free to cancel the bounty cc @QYuQianchen

gitcoinbot commented 2 years ago

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


The funding of 300.0 HOPR (52.00 USD @ $0.17/HOPR) attached to this issue has been cancelled by the bounty submitter