Closed TresBristers closed 3 years ago
All I need to do is figure out how to get the unparsed hash generated for each token by the VRF coordinator and just pass that to my image URI before encoding it. I have spent this entire time trying to figure out how to get the unparsed hash, so I can just pass it, but haven't found a way to do this as the random value you get seems to start as and integer. Also I may be missing something obvious, and if that's the case, its because I am fairly new to programming with solidity.
I just found the variable that gets the seed using VRFCoordinator(requestId in the create function), but at first the reason I didn't think that was the right variable was because every time I deployed, the same value was assigned to that variable, so I looked elsewhere since it wasn't random. But I now realized that that is where the random hex hash is supposed to be assigned, so now I guess the question is, why isn't it random every time I deploy to hardhat?
I just realized why, my bad, it was because of the mock deploy script😅
Which variable in the contract stores the generated hex seed from the VRF Coordinator, similar to this example "0xa6bf20172530b7a6656624c41e4942a55d4080dedf63f0fc5dfee990f7883885". The reason for this is all I need to do is pass this seed to my JS, which I already made to interpret, parse, and generate traits from the seed. I tried to find the variable storing this raw unparsed seed, but seems like it starts parsed into an integer.