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

[Supplier] Updating the scaffolded Claim type #151

Merged
merged 55 commits into from
Nov 17, 2023
Merged
Show file tree
Hide file tree
Changes from 44 commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
9117197
Ran ignite scaffold map claim --module supplier supplier_address sess…
Olshansk Nov 6, 2023
1d31b94
WIP - updating saffolded claim
Olshansk Nov 6, 2023
21b55c6
Merge branch 'main' into issues/140/scaffold_claim
Olshansk Nov 7, 2023
978161a
Fixed inconsistencies due to the new import
Olshansk Nov 7, 2023
1ee4487
make go_develop_and_test compiles again
Olshansk Nov 7, 2023
025419a
Merge branch 'main' into issues/140/update_scaffold_claim
Olshansk Nov 7, 2023
fd21f19
Merge with issues/140/scaffold_claim
Olshansk Nov 7, 2023
4973689
Updates in progress
Olshansk Nov 7, 2023
70ce89f
Ran go_imports
Olshansk Nov 7, 2023
ba81c59
Merge with issues/140/scaffold_claim
Olshansk Nov 7, 2023
1d5dfdc
Fix some linter errors
Olshansk Nov 7, 2023
99631c5
Merge with issues/140/scaffold_claim
Olshansk Nov 7, 2023
f8f11cf
temp
Olshansk Nov 7, 2023
872bb6f
Snapshotting some super rough WIP
Olshansk Nov 7, 2023
b1b514a
Update x/supplier/client/cli/query_claim.go
Olshansk Nov 7, 2023
2562c90
Update x/supplier/client/cli/query_claim.go
Olshansk Nov 7, 2023
369db38
Update x/supplier/client/cli/query_claim.go
Olshansk Nov 7, 2023
3f6e68a
[Miner] feat: add `TxClient` (#94)
bryanchriswhite Nov 7, 2023
3c4401c
[Off-chain] refactor: keyring errors & helpers (#131)
bryanchriswhite Nov 7, 2023
d67edee
[Miner] feat: add supplier client (#42)
bryanchriswhite Nov 7, 2023
13479cf
[Testing, Docs] refactor: move /internal/... to /testutil/... for god…
bryanchriswhite Nov 7, 2023
afa624f
Tend to review comments
Olshansk Nov 7, 2023
fef7af6
Merge branch 'main' into issues/140/scaffold_claim
Olshansk Nov 7, 2023
ca62bb2
Fixing whitespace
Olshansk Nov 7, 2023
15b5fb3
Fixed the last broken test
Olshansk Nov 7, 2023
ec80770
Merge with issues/140/scaffold_claim
Olshansk Nov 7, 2023
f488ec5
Cleaned up the code enough so it compiles w/ a secondary index but st…
Olshansk Nov 8, 2023
55182aa
Merge with main
Olshansk Nov 8, 2023
5c6be4d
WIP - merge with main
Olshansk Nov 8, 2023
9fb9031
Merge branch 'main' into issues/140/update_scaffold_claim
Olshansk Nov 9, 2023
bc33dda
Non-funtional snapshot
Olshansk Nov 9, 2023
489fde9
Merge branch 'main' into issues/140/update_scaffold_claim
Olshansk Nov 9, 2023
746d765
Unit tests are passing but more work ahead
Olshansk Nov 10, 2023
3d5581a
Compiling with unit tests passing
Olshansk Nov 10, 2023
bea6106
Self reviewed all the files except for claims_test
Olshansk Nov 10, 2023
4ee7b24
Merge branch 'main' into issues/140/update_scaffold_claim
Olshansk Nov 10, 2023
58b524b
Working on localnet
Olshansk Nov 10, 2023
ddc8e3d
Merge branch 'main' into issues/140/update_scaffold_claim
Olshansk Nov 13, 2023
5384236
Merge branch 'main' into issues/140/update_scaffold_claim
Olshansk Nov 14, 2023
6f38d15
Working on the create claim tests
Olshansk Nov 15, 2023
ac99066
Updated x/supplier/keeper/claim_test.go
Olshansk Nov 15, 2023
a26e9c8
Fixed TestClaim_QuerySingle
Olshansk Nov 15, 2023
6c5161d
Implemented filtered paginated claim queries
Olshansk Nov 15, 2023
58ab0d2
Left 4 TODO_IN_THIS_PR after some debugging but still hitting issues …
Olshansk Nov 15, 2023
4b3b912
Merge with main
Olshansk Nov 16, 2023
114a5d2
This test passes: go test -v -run TestClaim_Show ./x/supplier/client…
Olshansk Nov 16, 2023
6756c14
TestClaim_List works but need to clean up the tests
Olshansk Nov 16, 2023
d5d3cb5
Checkpoint where tests pass
Olshansk Nov 16, 2023
4ace899
Add TECHDEBT TODO
Olshansk Nov 16, 2023
4f08f7c
Make claim_create_dummy works
Olshansk Nov 16, 2023
0fccf81
Confirmed that make claim list works
Olshansk Nov 16, 2023
cec2da0
Make go_test finally works again
Olshansk Nov 17, 2023
a45148e
Remove TODO_IN_THIS comment
Olshansk Nov 17, 2023
c096808
s/store/primaryStore
Olshansk Nov 17, 2023
d3b0c5a
Added back commented out tests
Olshansk Nov 17, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ localnet/*/config/*.json
!localnet/poktrolld/config/client.toml
!localnet/poktrolld/config/config.toml


# Macos
.DS_Store
**/.DS_Store
Expand Down Expand Up @@ -62,4 +61,8 @@ 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_*
Olshansk marked this conversation as resolved.
Show resolved Hide resolved
42 changes: 41 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -441,6 +441,46 @@ 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 ###
##############

# TODO_IN_THIS_PR: Explain where/how I got these; `encodeSessionHeader` in `x/supplier/client/cli/query_claim_test.go`
Olshansk marked this conversation as resolved.
Show resolved Hide resolved
ENCODED_SESSION_HEADER = "7b226170706c69636174696f6e5f61646472657373223a22706f6b74316d7271743566377168387578733237636a6d397437763965373461397676646e71356a766134222c2273657276696365223a7b226964223a22616e76696c222c226e616d65223a22227d2c2273657373696f6e5f73746172745f626c6f636b5f686569676874223a2231222c2273657373696f6e5f6964223a2273657373696f6e5f6964222c2273657373696f6e5f656e645f626c6f636b5f686569676874223a2235227d"
ENCODED_ROOT_HASH = "726f6f745f68617368"
.PHONY: claim_create
claim_create: ## 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
Olshansk marked this conversation as resolved.
Show resolved Hide resolved

.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

# TODO_IN_THIS_PR: Test and uncomment this.
Olshansk marked this conversation as resolved.
Show resolved Hide resolved
# .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 $(SESSION) --node $(POCKET_NODE)

######################
### Ignite Helpers ###
######################
Expand Down Expand Up @@ -477,4 +517,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
Loading