Skip to content
This repository has been archived by the owner on Jan 13, 2025. It is now read-only.

Commit

Permalink
- Fix name folder for module bcna
Browse files Browse the repository at this point in the history
- Fix queries (CLI) for bcna module
  • Loading branch information
RaulBernal committed Feb 21, 2023
1 parent 5c4fbe0 commit 2e70a39
Show file tree
Hide file tree
Showing 25 changed files with 207 additions and 212 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
config.yml
Binary file added build/bcnad
Binary file not shown.
20 changes: 0 additions & 20 deletions docs/static/openapi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -120,16 +120,6 @@ paths:
in: query
required: false
type: boolean
- name: pagination.reverse
description: >-
reverse is set to true if results are to be returned in the
descending order.


Since: cosmos-sdk 0.43
in: query
required: false
type: boolean
tags:
- Query
/BitCannaGlobal/bcna/bcna/bitcannaid/{id}:
Expand Down Expand Up @@ -336,16 +326,6 @@ paths:
in: query
required: false
type: boolean
- name: pagination.reverse
description: >-
reverse is set to true if results are to be returned in the
descending order.


Since: cosmos-sdk 0.43
in: query
required: false
type: boolean
tags:
- Query
/BitCannaGlobal/bcna/bcna/supplychain/{id}:
Expand Down
File renamed without changes.
6 changes: 3 additions & 3 deletions proto/bcna/genesis.proto → proto/bcna/bcna/genesis.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ syntax = "proto3";
package bitcannaglobal.bcna.bcna;

import "gogoproto/gogo.proto";
import "bcna/params.proto";
import "bcna/bitcannaid.proto";
import "bcna/supplychain.proto";
import "bcna/bcna/params.proto";
import "bcna/bcna/bitcannaid.proto";
import "bcna/bcna/supplychain.proto";
// this line is used by starport scaffolding # genesis/proto/import

option go_package = "github.com/BitCannaGlobal/bcna/x/bcna/types";
Expand Down
File renamed without changes.
6 changes: 3 additions & 3 deletions proto/bcna/query.proto → proto/bcna/bcna/query.proto
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ package bitcannaglobal.bcna.bcna;
import "gogoproto/gogo.proto";
import "google/api/annotations.proto";
import "cosmos/base/query/v1beta1/pagination.proto";
import "bcna/params.proto";
import "bcna/bitcannaid.proto";
import "bcna/supplychain.proto";
import "bcna/bcna/params.proto";
import "bcna/bcna/bitcannaid.proto";
import "bcna/bcna/supplychain.proto";
// this line is used by starport scaffolding # 1

option go_package = "github.com/BitCannaGlobal/bcna/x/bcna/types";
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions proto/bcna/tx.proto → proto/bcna/bcna/tx.proto
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
syntax = "proto3";
package bitcannaglobal.bcna.bcna;

import "bcna/bitcannaid.proto";
import "bcna/supplychain.proto";
import "bcna/bcna/bitcannaid.proto";
import "bcna/bcna/supplychain.proto";
// this line is used by starport scaffolding # proto/tx/import

option go_package = "github.com/BitCannaGlobal/bcna/x/bcna/types";
Expand Down
11 changes: 9 additions & 2 deletions x/bcna/client/cli/query_bitcannaid.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,12 @@ func CmdListBitcannaid() *cobra.Command {
cmd := &cobra.Command{
Use: "list-bitcannaid",
Short: "list all bitcannaid",
Args: cobra.NoArgs,
RunE: func(cmd *cobra.Command, args []string) error {
clientCtx := client.GetClientContextFromCmd(cmd)
clientCtx, err := client.GetClientQueryContext(cmd)
if err != nil {
return err
}

pageReq, err := client.ReadPageRequest(cmd.Flags())
if err != nil {
Expand Down Expand Up @@ -49,7 +53,10 @@ func CmdShowBitcannaid() *cobra.Command {
Short: "shows a bitcannaid",
Args: cobra.ExactArgs(1),
RunE: func(cmd *cobra.Command, args []string) error {
clientCtx := client.GetClientContextFromCmd(cmd)
clientCtx, err := client.GetClientQueryContext(cmd)
if err != nil {
return err
}

queryClient := types.NewQueryClient(clientCtx)

Expand Down
11 changes: 9 additions & 2 deletions x/bcna/client/cli/query_supplychain.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,13 @@ import (
func CmdListSupplychain() *cobra.Command {
cmd := &cobra.Command{
Use: "list-supplychain",
Args: cobra.NoArgs,
Short: "list all supplychain",
RunE: func(cmd *cobra.Command, args []string) error {
clientCtx := client.GetClientContextFromCmd(cmd)
clientCtx, err := client.GetClientQueryContext(cmd)
if err != nil {
return err
}

pageReq, err := client.ReadPageRequest(cmd.Flags())
if err != nil {
Expand Down Expand Up @@ -49,7 +53,10 @@ func CmdShowSupplychain() *cobra.Command {
Short: "shows a supplychain",
Args: cobra.ExactArgs(1),
RunE: func(cmd *cobra.Command, args []string) error {
clientCtx := client.GetClientContextFromCmd(cmd)
clientCtx, err := client.GetClientQueryContext(cmd)
if err != nil {
return err
}

queryClient := types.NewQueryClient(clientCtx)

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
36 changes: 18 additions & 18 deletions x/bcna/types/bitcannaid.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

50 changes: 25 additions & 25 deletions x/bcna/types/genesis.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

30 changes: 15 additions & 15 deletions x/bcna/types/params.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 2e70a39

Please sign in to comment.