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.
Hey all,
This is a specification that's based on @sb777's earlier spec. David Kobrosky and I have already started on an implementation of it and it's changed along the way as we've learned from that process. I submit it here as I think it's probably close to a minimum viable spec.
Purpose
I suggest the reason for this standard is interoperability - we want wallets to understand that you’re about to sign a recurring payment contract so that they can present you with a UI that summarises the agreement you’re about to enter into. As your wallet now knows you’ve entered into a subscription contract it can also provide appropriate UI for managing and cancelling your subscriptions in future.
Features
Known Issues
We plan to add the following:
be able to create reasonably accurate forecasts for upcoming subscriptions: Programatic checks that subscription accounts have available balance and that subscription is active.
Add isValidSubscription()
Limitations
The method of taking payment is for the subscriber to pre-authorise the contract to transfer ERC-20 tokens directly to the merchant. It is not possible for a contract to reach into the subscribers wallet and take ETH in the future so we do not support this, the only way to support payments in ETH would be for the subscriber to pre-fund the contract with multiple billing periods.
Any checks to ensure that the subscriber is creating a "valid" subscription are left to the implementation. When createSubscription() is called the contract will probably want to check that the attributes correspond to a valid plan.
Once a subscription has been created the merchant cannot update it's attributes.
Comparison with other PRs
8x
PiperMerriam