Hello! I am trying to mint 50k nfts of which 10k are gold nfts. I need to generate random IDs for these 10k gold nfts. Which is more reasonable? off-chain script or on-chain smart contract... Some more things to consider like gas, decentralizedness. Can anybody help answering? thanks
Mar 21, 2022, 11:10 AM
Use oracle service like vrf
Costly, but decentralised
Mar 21, 2022, 11:19 AM
calling chainlink vrf 10k times is too costly, any other solutions like off-chain js script?
Mar 21, 2022, 11:26 AM
There's an unconventional way to get random number from chainlink without paying fee. The pricefeed oracle :)
Mar 21, 2022, 11:28 AM
Can you share link?
Mar 21, 2022, 11:29 AM
Its just using the price of native coin as random number
ETH maybe 3013.21$ on current block, 3012.81 on next. Noone can predict that right xD
Mar 21, 2022, 11:31 AM
@grimreaper619 That makes sense, sounds like random but what would they think of? I mean users... would they believe it truly random?
Mar 21, 2022, 11:32 AM
It should be fairly random. From a users perspective, I don't think they care much about how the random number is generated
Mar 21, 2022, 11:33 AM
Okay, I have to create 10k random numbers then I need to wait 10k blocks?
Mar 21, 2022, 11:34 AM
Call the pricefeed and fetch the value when user tries to mint
Mar 21, 2022, 11:35 AM
this random generation would happen after private sale,
Mar 21, 2022, 11:35 AM
You are minting them yourself and distributing randomly?
Mar 21, 2022, 11:37 AM
@grimreaper619
sorry for making things harder, long story short, how often does chainlink update coin prices? maybe once a block or 5 mins
sorry for making things harder, long story short, how often does chainlink update coin prices? maybe once a block or 5 mins
Mar 21, 2022, 11:38 AM
They use some sort of threshold time value for each coin. Refer their docs
Mar 21, 2022, 11:42 AM
@grimreaper619 Thanks!
Mar 21, 2022, 11:49 AM