kodadot / loligo

Common good repository for Squid indexers in KodaDot
2 stars 1 forks source link

Display price #14

Open vikiival opened 2 years ago

vikiival commented 2 years ago

The stuff should be that instead of saving price as 1e12 I would save it as 1

that means

const price = Float(BigInt(interaction.value || '0') / BigInt(`1e${decimals}`))

THE Task:

Value of the displayPrice should be:

price + 3% of price (marketplace fee) + n% of royalty (if supported by chain)

I added the package label because fee calculation should be done there ideally

How to calculate stuff can be found in nft-gallery under name somePercentFromTx.

roiLeo commented 2 years ago

is it still an issue? https://github.com/kodadot/rubick/blob/cde83802ce37a5f24ee4e5faf39c6f8e8f24fb12/src/mappings/index.ts#L292

vikiival commented 2 years ago

updated desc