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: create module subscription #328

Merged
merged 11 commits into from
Mar 3, 2023

Conversation

orenl-lava
Copy link
Contributor

This PR holds the the result of the scaffolding module subscription.

The code was auto-generated using:
ignite scaffold module subscription
Pushed in a separate PR to simplify the review of the upcoming changes.

  • 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:

Copy link
Collaborator

@Yaroms Yaroms left a comment

Choose a reason for hiding this comment

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

scaffold generated files not always follow our linter rules.
please go over those errors and fix the linter issues, if we dont do that main will break

@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
Copy link
Contributor Author

scaffold generated files not always follow our linter rules.
please go over those errors and fix the linter issues, if we dont do that main will break

done.

@orenl-lava orenl-lava requested a review from Yaroms March 2, 2023 05:57
Yaroms
Yaroms previously approved these changes Mar 2, 2023
command:
    ignite scaffold module subscription
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)
ignite scaffold query CurrentSubscription \
    consumer:string \
    --module subscription \
    --desc "Query current subscription to a service plan" \
    --response sub:Subscription
@orenl-lava orenl-lava force-pushed the CNS-169-implement-module-subscription-scaffold branch from 92389df to cb24608 Compare March 3, 2023 01:32
…ption

CNS-169 implement module subscription
…subscription

CNS-175 implement query current subscription
@Yaroms Yaroms merged commit a5ded13 into main Mar 3, 2023
@Yaroms Yaroms deleted the CNS-169-implement-module-subscription-scaffold branch July 31, 2023 14:44
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

2 participants