Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[subgraph] Fix Correctness of GDA Entities #1890

Merged
merged 21 commits into from
Mar 19, 2024

Conversation

kasparkallas
Copy link
Contributor

@kasparkallas kasparkallas commented Mar 13, 2024

solves #1887

What?
The instantly distributed and flow distributed values by GDA on subgraph are not currently correct. This PR fixes that and adds example-based integration tests to test for various scenarios.

How?
By effectively re-implementing the Semantic Money accounting approach in the subgraph.

credit goes to @0xdavinchee

@kasparkallas kasparkallas marked this pull request as draft March 13, 2024 13:13
Copy link

codecov bot commented Mar 14, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

❗ No coverage uploaded for pull request base (2024-03-subgraph-gda-feature-branch@a58cf6b). Click here to learn what that means.

Additional details and impacted files
@@                          Coverage Diff                           @@
##             2024-03-subgraph-gda-feature-branch    #1890   +/-   ##
======================================================================
  Coverage                                       ?   89.55%           
======================================================================
  Files                                          ?      110           
  Lines                                          ?     5889           
  Branches                                       ?      216           
======================================================================
  Hits                                           ?     5274           
  Misses                                         ?      563           
  Partials                                       ?       52           
Flag Coverage Δ
ethereum-contracts 97.28% <ø> (?)
sdk-core 82.40% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@kasparkallas kasparkallas changed the title [wip][subgraph] Fix Correctness of GDA Entities [subgraph] Fix Correctness of GDA Entities Mar 19, 2024
@kasparkallas kasparkallas marked this pull request as ready for review March 19, 2024 12:24
Copy link

📦 PR Packages

Install this PR (you need to setup Github packages):

yarn add @superfluid-finance/ethereum-contracts@PR1890
yarn add @superfluid-finance/sdk-core@PR1890
yarn add @superfluid-finance/sdk-redux@PR1890
:octocat: Click to learn how to use Github packages

To use the Github package registry, create a token with "read:packages" permission. See Creating a personal access token for help.

Next add these lines to your .npmrc file, replacing TOKEN with your personal access token. See Installing a package from Github if you get stuck.

@superfluid-finance:registry=https://npm.pkg.github.com
//npm.pkg.github.com/:_authToken=TOKEN

@hellwolf hellwolf merged commit 4bf79c8 into 2024-03-subgraph-gda-feature-branch Mar 19, 2024
30 checks passed
@hellwolf hellwolf deleted the subgraph-gda-index branch March 19, 2024 12:49
Copy link

XKCD Comic Relif

Link: https://xkcd.com/1890
https://xkcd.com/1890

github-merge-queue bot pushed a commit that referenced this pull request Mar 26, 2024
* [SUBGRAPH] [BUG] PoolMember not getting updated when the member units change (#1877)

* add a test starter

* add the test

* fixes

* improve test

* update dev container for matchstick compatibility

* implement the fix

* clean-up

* add elaborate test for pool  total amount received

* fix test issue

* add even more comments

* fix test name

* ignore test

---------

Co-authored-by: 0xdavinchee <[email protected]>

* [SUBGRAPH] approval mapping (#1878)

* approval mapping

* missing addresses

* missing addresses cont.

* no-op, trigger build

* fix tests

---------

Co-authored-by: Kaspar Kallas <[email protected]>

* [subgraph] Fix Correctness of GDA Entities (#1890)



---------

Co-authored-by: 0xdavinchee <[email protected]>

* add createdAtTimestamp/BlockNumber for ATS entity (#1909)

* [SUBGRAPH] fix governance config always null (#1908)

* fix governance config always null

* fix broken tests

* [SUBGRAPH] fix resolver entry (#1843)

* fix resolver entry

* do resolver rpc call on token initialization and remove handleTokenRPCCalls in subsequent token calls

* fix broken tests

* TODO comment can be removed

* remove mistakenly added files

---------

Co-authored-by: 0xdavinchee <[email protected]>
github-merge-queue bot pushed a commit that referenced this pull request Mar 26, 2024
* add gda pool subgraph entity queries

* improve infinity paging api

* add some robustness to transaction serialization

* reduce tx tracking timeout from 10 mins to 3 mins

* remove unnecessary toLowerCase

* changeset

* [SUBGRAPH] [BUG] PoolMember not getting updated when the member units change (#1877)

* add a test starter

* add the test

* fixes

* improve test

* update dev container for matchstick compatibility

* implement the fix

* clean-up

* add elaborate test for pool  total amount received

* fix test issue

* add even more comments

* fix test name

* ignore test

---------

Co-authored-by: 0xdavinchee <[email protected]>

* [SUBGRAPH] approval mapping (#1878)

* approval mapping

* missing addresses

* missing addresses cont.

* no-op, trigger build

* fix tests

---------

Co-authored-by: Kaspar Kallas <[email protected]>

* [subgraph] Fix Correctness of GDA Entities (#1890)



---------

Co-authored-by: 0xdavinchee <[email protected]>

* add getTotalAmountReceivedByPoolMember to sdk-core (#1902)

* update entities based on new subgraph

* map name, isnfttransfer, isnftapproval

* fix merge issue

* remove unnecessary files

* update gitignore

---------

Co-authored-by: 0xdavinchee <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants