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

royalty event missing? #3349

Closed
Tracked by #660 ...
petersopko opened this issue Jul 6, 2022 · 10 comments
Closed
Tracked by #660 ...

royalty event missing? #3349

petersopko opened this issue Jul 6, 2022 · 10 comments
Labels
$$ ~51-150usd 🧙‍♀️ - bug-hunt A-basilisk issues related to basilisk parachain A-subsquid indexer issues to subsquid p1 preventing everyone from using app

Comments

@petersopko
Copy link
Contributor

Upon testing buying listed NFT with royalties, I don't see the event PAY_ROYALTY in history component of collection or in snek playground. This is the mentioned NFT https://beta.kodadot.xyz/bsx/gallery/235937109-8
It had royalty set, it has changed user and there was no royalty paid in the end. Not sure if I'm missing something here, but I was expecting to see royalty paid everytime NFT changes owner?

image

@petersopko petersopko added A-basilisk issues related to basilisk parachain 🧙‍♀️ - bug-hunt labels Jul 6, 2022
@petersopko petersopko mentioned this issue Jul 6, 2022
89 tasks
@petersopko petersopko mentioned this issue Jul 10, 2022
16 tasks
@yangwao yangwao added the p3 non-core, affecting less than 40% label Jul 18, 2022
@yangwao yangwao added A-subsquid indexer issues to subsquid p1 preventing everyone from using app p2 core functionality, or is affecting 60% of app $ ~<50usd $$ ~51-150usd and removed p2 core functionality, or is affecting 60% of app p3 non-core, affecting less than 40% p1 preventing everyone from using app $ ~<50usd labels Jul 21, 2022
@yangwao
Copy link
Member

yangwao commented Jul 22, 2022

Hey if anyone can check on this one?
I've raised a bounty for this one :)

@roiLeo
Copy link
Contributor

roiLeo commented Jul 22, 2022

🚶‍♂️ 👋

@roiLeo
Copy link
Contributor

roiLeo commented Jul 22, 2022

Oops my bad it's more of a Backend issue reference kodadot/snek#36

@petersopko
Copy link
Contributor Author

@KngZhi you wanna take a look? You have some experience with indexers 😄

@KngZhi
Copy link
Contributor

KngZhi commented Jul 23, 2022

😄 okay, I will give it shot.

@KngZhi
Copy link
Contributor

KngZhi commented Jul 25, 2022

@petersopko it looks like PAY_ROYALTY is back. on my localhost graphql

Screen Shot 2022-07-25 at 12 15 07 PM

@petersopko
Copy link
Contributor Author

hmm, I don't see much from the screenshot. The point of PAY_ROYALTY event is, that there should be royalty paid based on the original percentage set upon minting of NFT. Therefore, every time NFT is sold, there's royalties paid to the original creator. Can you confirm / verify that is the current behavior in KodaDot?

@petersopko
Copy link
Contributor Author

Still in dire need of bughunt and fix here:

query MyQuery {
  nftEntities(where: {id_eq: "2916213696-5"}) {
    events {
      interaction
      timestamp
    }
    price
    name
  }
}

above query is returning 0 PAY_ROYALTY events, even though, there was a set royalty and I have purchased it

image
image

However, when looking specifically for PAY_ROYALTY interactions (events), I have found a bunch:

query MyQuery {
  events(where: {interaction_eq: PAY_ROYALTY}) {
    id
    nft {
      name
      id
      price
      royalty
    }
  }
}

Check it out at https://app.gc.subsquid.io/beta/snekk/003/graphql @KngZhi :) Your help here will be much appreciated!

@KngZhi
Copy link
Contributor

KngZhi commented Jul 27, 2022

Thanks, Peter I will check that. Snek is too black box for me, 😂

@petersopko
Copy link
Contributor Author

petersopko commented Jul 29, 2022

Thanks, Peter I will check that. Snek is too black box for me, 😂

Okay @vikiival just figured it out, it all makes sense and works 😆, this wasn't a bug in the first place:

  1. first transaction from creator to first buyer isn't supposed to emit event PAY_ROYALTY since the full price is being paid
  2. PAY_ROYALTY should be emitted on second order trades -> this works well

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
$$ ~51-150usd 🧙‍♀️ - bug-hunt A-basilisk issues related to basilisk parachain A-subsquid indexer issues to subsquid p1 preventing everyone from using app
Projects
None yet
Development

No branches or pull requests

4 participants