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

CNS-169 implement module subscription #329

Conversation

orenl-lava
Copy link
Contributor

Implement module subscription basics and the "subscribe" message,
This module depends on the Packages module, so tested with a local mock (not included in PR).
Note that the PR depends on #328 .

  • Please check if the PR fulfills these requirements
  • Commit message follows the Contribution Guidelines
  • Tests ran locally and added/modified if needed
  • Docs have been added/updated, if applicable
  • If applicable - JIRA ticket ID was added
  • What kind of change does this PR introduce? (Bug fix, feature, unit tests, docs update, ...)

  • What is the current behavior? (You can also link to an open issue here)

  • What is the new behavior (if this is a feature change)?

  • Please describe what manual tests you ran, if applicable

  • Other information:

proto/subscription/subscription.proto Outdated Show resolved Hide resolved
proto/subscription/subscription.proto Show resolved Hide resolved
x/subscription/keeper/subscription.go Outdated Show resolved Hide resolved
x/subscription/keeper/subscription.go Show resolved Hide resolved
x/subscription/keeper/subscription.go Show resolved Hide resolved
x/subscription/types/keys.go Outdated Show resolved Hide resolved
x/subscription/types/keys.go Show resolved Hide resolved
x/subscription/types/message_subscribe.go Show resolved Hide resolved
x/subscription/keeper/subscription_test.go Outdated Show resolved Hide resolved
x/subscription/types/subscription.go Show resolved Hide resolved
x/subscription/keeper/keeper.go Show resolved Hide resolved
x/subscription/keeper/epoch_start.go Show resolved Hide resolved
proto/subscription/subscription.proto Outdated Show resolved Hide resolved
proto/subscription/subscription.proto Outdated Show resolved Hide resolved
x/subscription/keeper/subscription.go Show resolved Hide resolved
x/subscription/keeper/subscription.go Show resolved Hide resolved
x/subscription/keeper/subscription.go Show resolved Hide resolved
x/subscription/keeper/subscription.go Show resolved Hide resolved
x/subscription/types/message_subscribe.go Show resolved Hide resolved
x/subscription/types/subscription.go Show resolved Hide resolved
@orenl-lava orenl-lava force-pushed the CNS-169-implement-module-subscription-scaffold branch from 00eaf54 to 92389df Compare March 2, 2023 05:30
@orenl-lava orenl-lava force-pushed the CNS-169-implement-module-subscription branch 4 times, most recently from 6da6420 to fec74c2 Compare March 2, 2023 14:21
GetPlan() - drop block arg, because we always use current block.
PutPlan() - do not return the Plan, because we drop it anway.
Porperly initialize the module in app.go, and add deps account,bank.
ignite scaffold type subscription \
    creator:string \
    consumer:string \
    block:uint \
    plan_index:string \
    plan_block:uint \
    is_yearly:bool \
    expiry_time:uint \
    usedCU:uint \
    remainingCU:uint \
    --no-message \
    --module subscription
ignite scaffold message subscribe \
    consumer:string
    index:string
    is_yearly:bool
    --module subscription
    --desc "Subscribe to a service plan"
To add a subscription:
  lavad tx subscription subscribe [CONSUMER] [PLAN] [IS_YEARLY] [flags]

Where:
  CONSUMER:  address of the consumer that will use this subscription
  PLAN:      unique index of the plan to subscribe to
  IS_YEARLY: whether the subscription is for a year (for discounted rate)
@orenl-lava orenl-lava force-pushed the CNS-169-implement-module-subscription branch from fec74c2 to 70b1629 Compare March 2, 2023 17:57
@orenl-lava orenl-lava changed the base branch from CNS-169-implement-module-subscription-scaffold to main March 3, 2023 01:30
@orenl-lava orenl-lava changed the base branch from main to CNS-169-implement-module-subscription-scaffold March 3, 2023 01:31
@orenl-lava orenl-lava force-pushed the CNS-169-implement-module-subscription-scaffold branch from 92389df to cb24608 Compare March 3, 2023 01:32
@Yaroms Yaroms merged commit 1075f17 into CNS-169-implement-module-subscription-scaffold Mar 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants