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

feat: add data pass redeem history query #328

Merged
merged 3 commits into from
May 25, 2022
Merged

Conversation

0xHansLee
Copy link
Contributor

@0xHansLee 0xHansLee commented May 23, 2022

In current kv store of redeem receipts, we cannot retrieve data pass redeem receipts by redeemer's address. Because the key is composed of poolID, round, and nftID, not redeemer's address.

With the need of getting receipts by redeemer's address in data validator, I made another kv store that the key is composed of redeemer's address and poolID. When redeemer redeems data pass, the redeem history is also stored/updated (k.appendDataPassRedeemHistory()).

I implemented a query of the redeem history by redeemer's address and pool ID as well.

What I've done

  • keeper functions for storing/updating redeem history
  • keeper functions for querying redeem history
  • query cmd
  • Init/Export genesis
  • test codes

@0xHansLee 0xHansLee added the Market Data Marketplace for Web3.0 label May 23, 2022
@0xHansLee 0xHansLee added this to the Data Pool Model milestone May 23, 2022
@0xHansLee 0xHansLee self-assigned this May 23, 2022
Copy link
Contributor

@gyuguen gyuguen left a comment

Choose a reason for hiding this comment

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

LGTM 👍
Later, if you add a query that retrieves history as a redeemer, you can check the history of all pools of the redemeer.

Copy link

@inchori inchori left a comment

Choose a reason for hiding this comment

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

LGTM 👍

Copy link
Contributor

@youngjoon-lee youngjoon-lee left a comment

Choose a reason for hiding this comment

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

gut

hansol-medi added 2 commits May 25, 2022 14:35
…s-addr

# Conflicts:
#	x/datapool/types/pool.pb.go
#	x/datapool/types/query.pb.go
@0xHansLee 0xHansLee merged commit 1d8cc28 into master May 25, 2022
@0xHansLee 0xHansLee deleted the ft/na/query-receipts-addr branch May 25, 2022 05:42
@0xHansLee 0xHansLee linked an issue May 25, 2022 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Market Data Marketplace for Web3.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

implement GetDataPassRedeemReceiptsList query
4 participants