Skip to content

Number of collections and ownership transfer during the seller update #784

@zajck

Description

@zajck

If the number of collections gets too high, it might become impossible to update the seller because of

uint256 collectionCount = sellersAdditionalCollections.length;
for (uint256 j = 0; j < collectionCount; ) {
// Additional collections (if they exist)
IBosonVoucher(sellersAdditionalCollections[j].collectionAddress).transferOwnership(sender);
unchecked {
j++;
}

Options

  1. Create a new protocol limit maxCollectionsPerSeller. After the seller reaches it, createNewCollection reverts
  2. Enable removing existing collections
  3. Change the voucher implementation to not store the owner in its storage, but retrieves it from the protocol when needed.

Note

It's not critical now, since the maximum number of collections before running into the problem should be relatively high.

Tracking issue for:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions