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

[ETHEREUM-CONTRACTS] GDA View Function Fixes #1885

Merged
merged 16 commits into from
Mar 19, 2024
Merged

Conversation

hellwolf
Copy link
Contributor

@hellwolf hellwolf commented Mar 8, 2024

Notes

  1. How to re-build /settled amount/ in subgraph for GDA?
  2. Missing GDA View Functions:
  • GDA Flow Info (IGDAv1 & SuperTokenV1Library)
  • getNetFlow misses the distribution flow rate
  • libtoken.getBufferAmountByFlowRate needs a comment; or better, share the impl between CFA & GDA using a free-ranged function.

Other notes:

  • getBufferAmountByFlowRate

Code review todos

  1. Missing functions in IGDAv1
  • getFlow
  • getAccountFlowInfo
  1. Missing functions in SuperTokenV1Library
  • getGDAFlowInfo
  • getNetFlowInfo, getCFANetFlowInfo, getGDANetFlowInfo
  • getPoolAdjustmentFlowRate
  1. New function in ISuperfluidPool
  • getTotalAmountReceivedByMember, need its assertions in some test cases.
  • remove getMemberData
  • rename getIndex -> poolOperatorGetIndex()
  • Make interface files minimum

Copy link

github-actions bot commented Mar 8, 2024

Changelog Reminder

Reminder to update the CHANGELOG.md for any of the modified packages in this PR.

  • CHANGELOG.md modified
  • Double check before merge

@0xdavinchee 0xdavinchee marked this pull request as ready for review March 12, 2024 13:53
@kasparkallas
Copy link
Contributor

Can I get a script kiddie explanation on how I can use the view functions to fetch how much has a single pool member received from a GDA pool?

@kasparkallas
Copy link
Contributor

Can I get a script kiddie explanation on how I can use the view functions to fetch how much has a single pool member received from a GDA pool?

@0xdavinchee added the function getTotalAmountReceivedByMember

@hellwolf hellwolf changed the title GDA View Function Fixes [ETHEREUM-CONTRACTS] GDA View Function Fixes Mar 15, 2024
@hellwolf
Copy link
Contributor Author

1. Missing functions in IGDAv1
  - [x] getFlow
  - [x] getAccountFlowInfo
2. Missing functions in SuperTokenV1Library
  - [x] getGDAFlowInfo
  - [-] getNetFlowInfo, getCFANetFlowInfo, getGDANetFlowInfo
  - [ ] getPoolAdjustmentFlowRate
3. New function in ISuperfluidPool
  - [-] getTotalAmountReceivedByMember, need its assertions in some test cases.
  - [ ] remove getMemberData
  - [ ] rename getIndex -> poolOperatorGetIndex()
  - [ ] Make interface files minimum

@hellwolf
Copy link
Contributor Author

Update change log, then we are done.

@hellwolf hellwolf enabled auto-merge March 18, 2024 16:15
@hellwolf
Copy link
Contributor Author

Let's merge! Please approve, instead.

Copy link
Contributor

@0xdavinchee 0xdavinchee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@hellwolf hellwolf added this pull request to the merge queue Mar 19, 2024
Merged via the queue into dev with commit bb5ba5e Mar 19, 2024
18 checks passed
@hellwolf hellwolf deleted the gda-missing-view-functions branch March 19, 2024 11:13
Copy link

XKCD Comic Relif

Link: https://xkcd.com/1885
https://xkcd.com/1885

@@ -83,9 +65,14 @@ interface ISuperfluidPool is IERC20 {
/// @param time The time to query
function getDisconnectedBalance(uint32 time) external view returns (int256 balance);

/// @notice The total amount received by `memberAddr` in the pool
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should make it more clear whether this includes both the connected and unconnected parts

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