-
Notifications
You must be signed in to change notification settings - Fork 48
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
Reverse mapping that indexes stream ids by user address #644
Comments
I would like to work on this, whenever necessary. |
Thanks @allwin199, this is marked as "backlog". |
I have just realized that the task description in the OP was incomplete.
A more precise implementation would have two mappings:
And two getters:
|
After discussing this feature with @andreivladbrg and @smol-ninja, it has become apparent that this is way more complicated than we had initially expected. To copy-paste Andrei's observations from a private Telegram group:
It looks like we may need to use a library like OpenZeppelin's It is also worth noting that reverse indexes can be implemented off-chain (e.g. via subgraphs). Given the above, I will tentatively close this issue as not planned. |
Task
It may be helpful for all kinds of integration purposes to read all stream ids belonging to specific addresses. In principle, this is how this could be done:
LockupLinear
andLockupDynamic
called_streamsByUser
getStreamsByUser
_streams
mapping, as well as the_streamsByUser
mapping_streams
mapping to also check the_streamsByUser
mappingThis feature wouldn't classify streams by status, but it would still be helpful.
Notes
ERC721Enumerable
in case theirtokenOfOwnerByIndex
function would helpThe text was updated successfully, but these errors were encountered: