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

Royalties are not paid on AssetHub #8511

Open
1 task done
vikiival opened this issue Dec 10, 2023 · 14 comments
Open
1 task done

Royalties are not paid on AssetHub #8511

vikiival opened this issue Dec 10, 2023 · 14 comments
Labels
$ ~<50usd bug Something isn't working p1 preventing everyone from using app

Comments

@vikiival
Copy link
Member

vikiival commented Dec 10, 2023

What happened?

I wanted to test if royalties work on AssetHub.
Confirmation modal shows that I will pay 11.3 dot

Screenshot 2023-12-10 at 13 34 23

However when I check the transactions I will pay only: 10.3 DOT

Screenshot 2023-12-10 at 13 35 53

Please reproduce in steps

  1. Open any NFT with royalty like: https://kodadot.xyz/ahp/collection/49
  2. Buy It
  3. No royalty is paid to the user.

Expected Behavior

I expect that royalty is paid to the user.

To implement

Example

https://kodadot.xyz/ahp/gallery/49-37

type Tip = {
  collection: string,
  item: string,
  receiver: string,
  amount: bigint | string
}

const tips: Tips[] = [
   {
      collection: "49",
      item: "37",
      receiver: "5FFG7GHAR2F2xCb5bqaLQrdgNGdtEL64tYgZimRBHDjuxVuA",
      amount: "10000000000"
    }
]

// TODO: check royalty validity
// If it is valid add to batch when user is paying
const call = api.tx.nfts.payTips(tips)

Code of Conduct

  • I agree to follow this project's Code of Conduct
@vikiival vikiival added bug Something isn't working $ ~<50usd p1 preventing everyone from using app labels Dec 10, 2023
@vikiival
Copy link
Member Author

Preferably someone from @kodadot/internal-dev ?

@JustLuuuu
Copy link
Member

@roiLeo
Copy link
Contributor

roiLeo commented Dec 10, 2023

👋

@roiLeo
Copy link
Contributor

roiLeo commented Dec 10, 2023

we need to handle tips on indexer side

link https://github.com/paritytech/polkadot-sdk/blob/f6ae145813b2e213b39f09f713d3ccbdd9376f6b/substrate/frame/nfts/src/lib.rs#L1747

No need to add unecessary data

type Tip = {
  collection: string,
  item: string,
  receiver: string,
  amount: bigint | string
}

const tips: Tips[] = [
   {
      collection: "49",
      item: "37",
      receiver: "5FFG7GHAR2F2xCb5bqaLQrdgNGdtEL64tYgZimRBHDjuxVuA",
      amount: "10000000000"
    }
]

// TODO: check royalty validity
// If it is valid add to batch when user is paying
const call = api.tx.nfts.payTips(tips)

@vikiival
Copy link
Member Author

we need to handle tips on indexer side

Pay_tips is never called on KodaDot, see images above :)

@roiLeo
Copy link
Contributor

roiLeo commented Dec 11, 2023

Pay_tips is never called on KodaDot, see images above :)

yup but that doesn't stop it from having it on indexer since user may be confused of losing found (in short we need to display it in activity)

@vikiival
Copy link
Member Author

yup but that doesn't stop it from having it on indexer since user may be confused of losing found (in short we need to display it in activity)

agree that's why you opened issue - kodadot/stick#158

@daiagi
Copy link
Contributor

daiagi commented Dec 14, 2023

why isn't this working?

b6f31df

#7816 (comment)

@roiLeo
Copy link
Contributor

roiLeo commented Dec 14, 2023

why isn't this working?

because royalties has been set at the collection level

@vikiival
Copy link
Member Author

because royalties has been set at the collection level

But still the data are replicated to nft entity.

Maybe the reason is that i was trying to buy single nft instead of using shopping menu?

@JustLuuuu
Copy link
Member

JustLuuuu commented Dec 14, 2023

Tomorrow's drop is also supposed to have royalties. Will you be guys able to fix it before? ❤️

@vikiival
Copy link
Member Author

cc @daiagi can you please check ? 🥺 🙏

@daiagi
Copy link
Contributor

daiagi commented Dec 14, 2023

image

image

https://assethub-polkadot.subscan.io/extrinsic/5225078-2

not seeing the problem

@JustLuuuu
Copy link
Member

oh yes, it looks like royalties are in his account; he did not see them because Encrypt Wallet is not showing funds on Assethub. he already managed to teleport them. This issue is still on:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
$ ~<50usd bug Something isn't working p1 preventing everyone from using app
Projects
None yet
Development

No branches or pull requests

4 participants