Skip to content

Commit

Permalink
Merge remote-tracking branch 'pokt/main' into issues/126/test/miner
Browse files Browse the repository at this point in the history
* pokt/main:
  [Off-chain, Testing] test: protocol pkg (part 1) (#192)
  [Supplier] Updating the scaffolded `Claim` type (#151)
  • Loading branch information
bryanchriswhite committed Nov 20, 2023
2 parents 5f2b226 + 32513b8 commit 6b4bfc5
Show file tree
Hide file tree
Showing 35 changed files with 1,325 additions and 477 deletions.
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,12 @@ localnet_config.yaml
# Relase artifacts produced by `ignite chain build --release`
release

# Only keep one go module in our codebase
go.work.sum

# Avoid accidentally committing gomock artifacts
**/gomock_reflect_*

# SMT KVStore files
# TODO_TECHDEBT(#126, @red-0ne): Rename `smt` to `smt_stores` and make it configurable so it can be stored anywhere on this
smt
Expand Down
41 changes: 40 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -455,6 +455,45 @@ acc_balance_query_app1: ## Query the balance of app1
acc_balance_total_supply: ## Query the total supply of the network
poktrolld --home=$(POKTROLLD_HOME) q bank total --node $(POCKET_NODE)

##############
### Claims ###
##############

# These encoded values were generated using the `encodeSessionHeader` helpers in `query_claim_test.go` as dummy values.
ENCODED_SESSION_HEADER = "eyJhcHBsaWNhdGlvbl9hZGRyZXNzIjoicG9rdDFleXJuNDUwa3JoZnpycmVyemd0djd2c3J4bDA5NDN0dXN4azRhayIsInNlcnZpY2UiOnsiaWQiOiJhbnZpbCIsIm5hbWUiOiIifSwic2Vzc2lvbl9zdGFydF9ibG9ja19oZWlnaHQiOiI1Iiwic2Vzc2lvbl9pZCI6InNlc3Npb25faWQxIiwic2Vzc2lvbl9lbmRfYmxvY2tfaGVpZ2h0IjoiOSJ9"
ENCODED_ROOT_HASH = "cm9vdF9oYXNo"
.PHONY: claim_create_dummy
claim_create_dummy: ## Create a dummy claim by supplier1
poktrolld --home=$(POKTROLLD_HOME) tx supplier create-claim \
$(ENCODED_SESSION_HEADER) \
$(ENCODED_ROOT_HASH) \
--from supplier1 --node $(POCKET_NODE)

.PHONY: claims_list
claim_list: ## List all the claims
poktrolld --home=$(POKTROLLD_HOME) q supplier list-claims --node $(POCKET_NODE)

.PHONY: claims_list_address
claim_list_address: ## List all the claims for a specific address (specified via ADDR variable)
poktrolld --home=$(POKTROLLD_HOME) q supplier list-claims --supplier-address $(ADDR) --node $(POCKET_NODE)

.PHONY: claims_list_address_supplier1
claim_list_address_supplier1: ## List all the claims for supplier1
SUPPLIER1=$$(make poktrolld_addr ACC_NAME=supplier1) && \
ADDR=$$SUPPLIER1 make claim_list_address

.PHONY: claim_list_height
claim_list_height: ## List all the claims ending at a specific height (specified via HEIGHT variable)
poktrolld --home=$(POKTROLLD_HOME) q supplier list-claims --session-end-height $(HEIGHT) --node $(POCKET_NODE)

.PHONY: claim_list_height_5
claim_list_height_5: ## List all the claims at height 5
HEIGHT=5 make claim_list_height

.PHONY: claim_list_session
claim_list_session: ## List all the claims ending at a specific session (specified via SESSION variable)
poktrolld --home=$(POKTROLLD_HOME) q supplier list-claims --session-id $(SESSION) --node $(POCKET_NODE)

######################
### Ignite Helpers ###
######################
Expand Down Expand Up @@ -491,4 +530,4 @@ openapi_gen: ## Generate the OpenAPI spec for the Ignite API

.PHONY: poktrolld_addr
poktrolld_addr: ## Retrieve the address for an account by ACC_NAME
@echo $(shell poktrolld keys show -a $(ACC_NAME))
@echo $(shell poktrolld --home=$(POKTROLLD_HOME) keys show -a $(ACC_NAME))
Loading

0 comments on commit 6b4bfc5

Please sign in to comment.