-
Notifications
You must be signed in to change notification settings - Fork 15
Minimal spec for initial consensus #10
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
base: eip-proposal
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,10 @@ | ||
--- | ||
eip: <to be assigned> | ||
title: Subscriptions | ||
author: | ||
author: | ||
|
||
* Kevin Owocki <kevin@gitcoin.co> (@owocki) | ||
* John Griffin <john@atchai.com> (@johngriffin) | ||
* TODO - Others pls add your info here. | ||
|
||
discussions-to: [this github issue url](https://github.com/EthereumOpenSubscriptions/standard/issues) or [Gitcoin Slack](https://gitcoin.co/slack) in #proj-subscriptions channel | ||
|
@@ -31,7 +32,7 @@ For a dapp founder: | |
* since you know your subscriber numbers, churn numbers, conversion rate, you get consistent cash flow | ||
* you get to focus on making your customers happy (as opposed to having two actors: speculators & users) | ||
|
||
For these reasons, we think it's creating a standard way to do 'subscriptions' on Ethereum. | ||
For these reasons, we think it's creating a standard way to do 'subscriptions' on Ethereum. | ||
|
||
|
||
## Abstract | ||
|
@@ -47,8 +48,45 @@ We also believe that creating momentum for Saas models in the Ethereum space is | |
|
||
## Specification | ||
|
||
TODO | ||
### Public Methods | ||
|
||
#### isValidSubscription | ||
Used to check whether a given subscription ID represents a valid subscription. | ||
|
||
* @param \_subscriptionId The subscription ID to check | ||
* @return a boolean to indicate whether the subscription exists and is valid | ||
|
||
``` | ||
function isValidSubscription(bytes32 _subscriptionId) | ||
public | ||
view | ||
returns (bool success); | ||
``` | ||
|
||
#### cancelSubscription | ||
|
||
Called by subscriber, or by merchant in order to cancel an active subscription | ||
|
||
* @param \_subscriptionId The subscription ID to delete | ||
* @return a boolean to indicate whether the subscription was successfully cancelled | ||
|
||
``` | ||
function cancelSubscription(bytes32 _subscriptionId) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I still think it would be a good idea to consider changing this to
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm working on a model where you sign the hash of an input set of data, and provide the signature as a part of the input data set.
returns a hash that is signed by the owner of the contract, and this signature is then stored by the merchant. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I refute the notion that because ERC-721 is currently implementing their UUID's as a uint256 that it represents "best practices", it is definitely an accepted approach. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Probably should have used a bit different wording: if everything else is the same, why shouldn't we go with something that's already out there? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I believe constructing a hash as a sum of inputs gives a deterministic ID, and that has a higher value than one that is a scalar value. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm cool with using uint256, don't really see how it's different to using bytes32 since it's just a smaller conversion step unless I'm missing something. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. uint256 puts the onus of storing the reference to that variable off chain, rather than being able to compute it, that alone is too large of a headache IMO. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @kermankohli yes, it's directly convertible to @androolloyd I don't follow. Oh, one more thing - at some point using There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @lknix ok I better understand your positioning now, to continue on like I am with bytes32 I just need to cast the uint256 in the implementation. I know that the input gas cost is eventually to be addressed but from what I can reason it hasn't yet been implemented or isn't slated for immediate fixing. If there is truly no cost of conversion from uint256 to bytes32 vs bytes32/uint256 gas costs, then a uint256 type would be acceptable for our purposes. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @androolloyd yes, that was the rationale - I probably wasn't clear enough since conversions/castings usually aren't as straightforward. Cost of conversion should be 0 but let's make sure that's the case :) |
||
public | ||
returns (bool success); | ||
``` | ||
|
||
### Events | ||
|
||
#### CancelSubscription | ||
|
||
MUST trigger on any successful call to `cancelSubscription` | ||
|
||
``` | ||
event CancelSubscription( | ||
bytes32 _subscriptionId, | ||
); | ||
``` | ||
|
||
## Rationale | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the purpose of having this as a separate function instead of just a part of a tupple that getSubscription() returns?