kodadot / rubick

Implementation SubSquid indexer for Kusama NFTs
https://github.com/kodadot/rubick
9 stars 15 forks source link

Resolver for Flipper table paging data #51

Open Jarsen136 opened 2 years ago

Jarsen136 commented 2 years ago

The flipper data needs to be provided by the server to avoid doing too much calculation on the client.

_Originally posted by @Jarsen136 in https://github.com/kodadot/nft-gallery/pull/2804#discussion_r846620582_

The required information can be seen from the figure:   | User | Amount | Bought | Sold | Percentage | Last Activity

image

ref: https://github.com/kodadot/nft-gallery/issues/2791#issue-1195985123

Need to find out all past buyers' and seller's information from Interaction events.

request query: collectionId、offset、first

response data structure: (or may be other format)

 {
  user {
     nft {
       bought
       sold
       percentage
       updateTime
    }
    amount
    totalBought
    totalSold
    percentage
    updateTime
  }
  total
}

It will be better if the result is paginated

vikiival commented 2 years ago

@Jarsen136 👀 Can you please elaborate? What kind of data you need? Is there something you are currently missing?

Jarsen136 commented 2 years ago

@Jarsen136 👀 Can you please elaborate? What kind of data you need? Is there something you are currently missing?

Okay, I have added details in the issue description.