Skip to content

Commit

Permalink
Update Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
Olshansk committed Jan 16, 2025
1 parent 0ea39d0 commit 8986389
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 29 deletions.
8 changes: 8 additions & 0 deletions makefiles/suppliers.mk
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,14 @@
supplier_list: ## List all the staked supplier
poktrolld --home=$(POKTROLLD_HOME) q supplier list-suppliers --node $(POCKET_NODE)

.PHONY: supplier_list_anvil
supplier_list_anvil: ## List all the staked supplier staked for the anvil service
poktrolld --home=$(POKTROLLD_HOME) q supplier list-suppliers --service-id anvil --node $(POCKET_NODE)

.PHONY: supplier_show_supplier1
supplier_show_supplier1: ## Show supplier1 details
poktrolld --home=$(POKTROLLD_HOME) q supplier show-supplier supplier1 --node $(POCKET_NODE)

.PHONY: supplier_stake
supplier_stake: ## Stake tokens for the supplier specified (must specify the SUPPLIER and SUPPLIER_CONFIG env vars)
poktrolld --home=$(POKTROLLD_HOME) tx supplier stake-supplier -y --config $(POKTROLLD_HOME)/config/$(SERVICES) --keyring-backend test --from $(SUPPLIER) --node $(POCKET_NODE)
Expand Down
58 changes: 29 additions & 29 deletions x/supplier/module/autocli.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,30 +6,6 @@ import (
modulev1 "github.com/pokt-network/poktroll/api/poktroll/supplier"
)

// Query: &autocliv1.ServiceCommandDescriptor{
// Service: modulev1.Query_ServiceDesc.ServiceName,
// RpcCommandOptions: []*autocliv1.RpcCommandOptions{
// // {
// // RpcMethod: "Params",
// // Use: "params",
// // Short: "Shows the parameters of the module",
// // },
// // {
// // RpcMethod: "AllServices",
// // Use: "list-service",
// // Short: "List all service",
// // },
// {
// RpcMethod: "Service",
// Use: "show-service [id]",
// Short: "Shows a service",
// Long: "Retrieve the service details by its id.",
// PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "id"}},
// },
// // this line is used by ignite scaffolding # autocli/query
// },
// },

// AutoCLIOptions implements the autocli.HasAutoCLIConfig interface.
func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions {
return &autocliv1.ModuleOptions{
Expand All @@ -47,18 +23,42 @@ func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions {
RpcMethod: "AllSuppliers",
Use: "list-suppliers [service-id]",
Short: "List all suppliers on Pocket Network",
Long: "Retrieves a paginated list of all suppliers currently registered on Pocket Network, including all their details.",
Example: " poktrolld query supplier list-suppliers \n poktrolld query supplier list-suppliers --service-id anvil \n poktrolld query supplier list-suppliers --page 2 --limit 50",
Long: `Retrieves a paginated list of all suppliers currently registered on Pocket Network, including all their details.
The command supports optional filtering by service ID and pagination parameters.
Returns supplier addresses, staked amounts, service details, and current status.`,

Example: `
poktrolld query supplier list-suppliers
poktrolld query supplier list-suppliers --service-id anvil
poktrolld query supplier list-suppliers --page 2 --limit 50
poktrolld query supplier list-suppliers --service-id anvil --page 1 --limit 100`,
FlagOptions: map[string]*autocliv1.FlagOptions{
"service_id": {Name: "service-id", Shorthand: "s", Usage: "service id to filter by", Hidden: false},
},
// PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "service_id"}},
},
{
Alias: []string{"supplier", "s"},
RpcMethod: "Supplier",
Use: "show-supplier [id]",
Short: "Shows a supplier",
// PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "index"}},
Use: "show-supplier [address]",
Short: "Shows detailed information about a specific supplier",
Long: `Retrieves comprehensive information about a supplier identified by their address.
Returns details include things like:
- Supplier's staked amount and status
- List of services they provide`,

Example: `
poktrolld query supplier show-supplier pokt1abc...xyz
poktrolld query supplier show-supplier pokt1abc...xyz --output json
poktrolld query supplier show-supplier pokt1abc...xyz --height 100`,
PositionalArgs: []*autocliv1.PositionalArgDescriptor{
{
ProtoField: "operator_address",
},
},
},
// this line is used by ignite scaffolding # autocli/query
},
Expand Down

0 comments on commit 8986389

Please sign in to comment.