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

Add get getSellersCollectionsPaginated method #824

Merged
merged 7 commits into from
Nov 30, 2023

Conversation

zajck
Copy link
Member

@zajck zajck commented Nov 21, 2023

Closes #709

Implementation is slightly different than proposed in the issue. It matches the pattern in the existing getTokenListPaginated.
This allows to retrieval of multiple collections with a single call, but with more granular control.

Changes:

  • add getSellersCollectionsPaginated to SellerHandlerFacet
  • add corresponding unit tests

@zajck zajck self-assigned this Nov 21, 2023
@coveralls
Copy link

coveralls commented Nov 21, 2023

Coverage Status

coverage: 98.639% (+0.005%) from 98.634%
when pulling 1a2b713 on add-getSellerCollection-method
into ed1ee1e on main.

@zajck zajck added the v2.4.0 label Nov 22, 2023
@@ -450,7 +450,8 @@ interface IBosonAccountHandler is IBosonAccountEvents, BosonErrors {
) external view returns (bool exists, BosonTypes.Seller memory seller, BosonTypes.AuthToken memory authToken);

/**
* @notice Gets the details about a seller's collections.
* @notice Gets the details about all seller's collections.
* In case seller has too many collections and this runs out of gas, pleas use getSellersCollectionsPaginated.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
* In case seller has too many collections and this runs out of gas, pleas use getSellersCollectionsPaginated.
* In case seller has too many collections and this runs out of gas, please use getSellersCollectionsPaginated.

Copy link
Contributor

Choose a reason for hiding this comment

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

same typo in other places

@zajck zajck requested a review from levalleux-ludo November 30, 2023 07:55
Copy link
Member

@levalleux-ludo levalleux-ludo left a comment

Choose a reason for hiding this comment

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

It would make sense to provide a method getCollectionCount(sellerId) returns uint256, IMHO

@zajck zajck requested a review from levalleux-ludo November 30, 2023 09:38
@zajck zajck merged commit 25fa3cf into main Nov 30, 2023
12 checks passed
@zajck zajck deleted the add-getSellerCollection-method branch November 30, 2023 10:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add getSellerCollection method
4 participants