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

V2.4.0. protocol initialization #838

Merged
merged 8 commits into from
Dec 7, 2023
Merged

V2.4.0. protocol initialization #838

merged 8 commits into from
Dec 7, 2023

Conversation

zajck
Copy link
Member

@zajck zajck commented Dec 6, 2023

Due to recent changes, existing sellers are missing royaltyRecipients and offers are missing royaltyInfo.

This data should be filled in during the initialization of the next version.

This PR adds initV2_4_0 which is used to populate missing data.

@zajck zajck added the v2.4.0 label Dec 6, 2023
@zajck zajck self-assigned this Dec 6, 2023
@coveralls
Copy link

coveralls commented Dec 6, 2023

Coverage Status

coverage: 98.627% (-0.01%) from 98.639%
when pulling 2772f9b on backfill-royalty-info
into 2889f19 on main.

@@ -94,21 +94,23 @@ contract ProtocolInitializationHandlerFacet is IBosonProtocolInitializationHandl
}
}

ProtocolLib.ProtocolStatus storage status = protocolStatus();
// ProtocolLib.ProtocolStatus storage status = protocolStatus();
Copy link
Contributor

Choose a reason for hiding this comment

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

remove comment

Copy link
Member Author

Choose a reason for hiding this comment

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

Removed

/**
* @notice Initializes the version 2.4.0.
*
* Initliaziation data is used to back-fill the royalty recipients for existing offers and sellers.
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
* Initliaziation data is used to back-fill the royalty recipients for existing offers and sellers.
* Initialization data is used to back-fill the royalty recipients for existing offers and sellers.

Copy link
Member Author

Choose a reason for hiding this comment

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

Corrected

* Supplied royalty percentage should match the current percentage set in seller's boson voucher contract.
* If seller has multiple collections with different royalty precentages:
* - the sellerId should be included in the group, corresponding to the minimal royalty percentage
* - the _offerIds array should should be included in the group, corresponding to the royalty percentage that matches the royalty of the collection to which offer belongs
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
* - the _offerIds array should should be included in the group, corresponding to the royalty percentage that matches the royalty of the collection to which offer belongs
* - the _offerIds array should be included in the group, corresponding to the royalty percentage that matches the royalty of the collection to which offer belongs

Copy link
Member Author

Choose a reason for hiding this comment

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

Corrected

/**
* @notice Method to initialize the protocol if it cannot be done in a single transaction.
*
* This shuld be used only if the amount of data is too large, and it cannot be done in a single `initialize` transaction.
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
* This shuld be used only if the amount of data is too large, and it cannot be done in a single `initialize` transaction.
* This should be used only if the amount of data is too large, and it cannot be done in a single `initialize` transaction.

Copy link
Member Author

Choose a reason for hiding this comment

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

Corrected

@zajck zajck merged commit ad6761e into main Dec 7, 2023
13 checks passed
@zajck zajck deleted the backfill-royalty-info branch December 7, 2023 11:13
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.

4 participants