Refactor InvoiceModule
to rely on external PaymentModule
#31
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Breaking changes
InvoiceModule
has been refactored toPaymentModule
and some of its methods (related to the ERC-721 compliance) have been removed; Also,Invoice
struct has been renamed to `PaymentRequest, method names were updated to createRequest, payRequest, cancelRequest, withdrawRequestStream;statusOf
. This method relies on two new booleans added to thePaymentRequest
struct,wasCanceled
andwasAccepted
. Depending on the payment method, either stream or transfer, it first checks the status of the stream on theSablier
protocol to see if the payment amount was fully streamed or not.InvoiceModule
has been refactored as a periphery contract, calledInvoiceCollection
. This contract allows an EOA/multisig to mint ERC-721 tokens for any off-chain invoice, based on the payment recipient, invoice metadata URI and payment request ID;