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 tests upgrade to v2.2.0 #498

Merged
merged 58 commits into from
Apr 21, 2023
Merged

Add tests upgrade to v2.2.0 #498

merged 58 commits into from
Apr 21, 2023

Conversation

anajuliabit
Copy link
Contributor

@anajuliabit anajuliabit commented Dec 29, 2022

This PR adds integration tests to insure protocol integrity on upgrade from 2.1.0 to 2.2.0

Breaking changes

New methods

  • PR: Allowlist metatx methods by @zajck in Allowlist metatx methods #461
    • setAllowlistedFunctions
    • isFunctionAllowlisted(bytes32)
    • isFunctionAllowlisted(string)
    • Meta transaction should fail when function name is not allowlisted
  • PR: Add new facet ProtocolInitializationFacet by @anajuliabit in Add new facet ProtocolInitializationFacet #475
    • getVersion
  • PR: Init v2_2_0 by @zajck in Init v2_2_0 #492
    • Should call initV2_2_0
  • PR: Raise and Escalate Dispute Orchestration by @cliffhall in Raise and Escalate Dispute Orchestration #489
    • raiseAndEscalateDispute
  • PR: Protocol support preminted voucher by @zajck in Protocol support preminted voucher #490
    • setMaxPremintedVouchers
    • getMaxPremintedVouchers
    • commitToPreMintedOffer
    • reserveRange
    • createPremintedOfferWithCondition
    • createPremintedOfferAddToGroup
    • createPremintedOfferAndTwinWithBundle
    • createPremintedOfferWithConditionAndTwinAndBundle
    • createSellerAndPremintedOffer
    • createSellerAndPremintedOfferWithCondition
    • createSellerAndPremintedOfferAndTwinWithBundle
    • createSellerAndPremintedOfferWithConditionAndTwinAndBundle
    • createOfferWithCondition
    • createOfferAddToGroup
    • createOfferAndTwinWithBundle
    • createOfferWithConditionAndTwinAndBundle
    • createSellerAndOffer
    • createSellerAndOfferWithCondition
    • createSellerAndOfferAndTwinWithBundle
    • createSellerAndOfferWithConditionAndTwinAndBundle
  • PR: Allow vouchers to be preMinted to voucher contract Allow vouchers to be preMinted to voucher contract #563
    • reserveRange to contract

Bug fixes

Notes

  • Besides the missing checks above, we still have to investigate why upgrade-facets script is logging undefined: 0xa7ef6a7c when removing interfaces for DR, and why is removing DR interface

@anajuliabit anajuliabit changed the title Upgrade 2.2.0 tests tests upgrade to v2.2.0 Dec 29, 2022
@anajuliabit anajuliabit changed the title tests upgrade to v2.2.0 Add tests upgrade to v2.2.0 Dec 30, 2022
@anajuliabit anajuliabit marked this pull request as ready for review December 30, 2022 23:12
@anajuliabit anajuliabit requested a review from zajck December 30, 2022 23:12
@anajuliabit anajuliabit self-assigned this Dec 30, 2022
@zajck zajck marked this pull request as draft January 3, 2023 10:51
@zajck zajck self-assigned this Jan 4, 2023
@zajck
Copy link
Member

zajck commented Jan 4, 2023

  1. Investigate why upgrade-facets script is logging undefined: 0xa7ef6a7c when removing interfaces for DR, and why is removing DR interface

0xa7ef6a7c is activateDisputeResolver sigHash, which was removed in 2.2.0, so it's ok that's reported. It says undefined since upgrade script is not aware of actual function names that were previously registered on diamond. All it knows is that something was registered which is not in interface anymore and therefore needs to be removed.

@anajuliabit anajuliabit marked this pull request as ready for review January 9, 2023 23:57
Copy link
Contributor Author

@anajuliabit anajuliabit left a comment

Choose a reason for hiding this comment

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

I can't approve but LGTM

@zajck zajck added the v2.2.0 label Mar 30, 2023
zajck
zajck previously approved these changes Apr 20, 2023
zajck
zajck previously approved these changes Apr 21, 2023
Copy link
Member

@mischat mischat left a comment

Choose a reason for hiding this comment

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

Looks good, only a minor comment, which we should address in a subsequent version perhaps

function authorizeCommit(
address _buyer,
Offer storage _offer,
uint256 exchangeId
Copy link
Member

Choose a reason for hiding this comment

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

I guess this should start with an underscore, _exchangeId ... but i don't want to block on this ... Can we changed in the next version

Copy link
Member

Choose a reason for hiding this comment

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

@mischat mischat merged commit d9aa5af into main Apr 21, 2023
@mischat mischat deleted the upgrade-2.2.0-tests branch April 21, 2023 12:45
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.

3 participants