Closed lucaventura closed 2 years ago
Ohhh good catch! Yeah I forgot to add the virtual keyword. If you send a PR, I will be happy to accept that.
@estarriolvetch Yeah sure thing. Is the idea to use the seed
function from within _processRandomnessFulfillment
?
Curious to know if you have any example implementations you could share.
I never use _processRandomnessFulfillment myself
I add this function as a hook in case someone wants to do something when the randomness is fulfilled.
Mostly, I use seed to derive the traits of the token. Here is an example.
https://rinkeby.etherscan.io/address/0x7c0044396b9c77499baea85698b74350de7b8733#code
Not sure if it is intentional or not, but
_processRandomnessFulfillment
inERC721PsiRandomSeed
can't be overwritten because it's missing thevirtual
keyword. Is there any sample code to show the expected use of theseed
extension function? Since theseed
function reverts if the randomness hasn't been fulfilled, how will we know when to callseed
without the ability to access_processRandomnessFulfillment
?Example use case: User mints 2 NFTs, and once randomness is fulfilled the seed is used to assign a random trait on-chain.