Lesson 14. How to access dogOwner variable inside of fulfillRandomWords function? #2279
-
I am trying to assert that the Here is a screenshot of the test and the terminal output: Here is the function I am trying to cover in my test: function fulfillRandomWords(uint256 requestId, uint256[] memory randomWords)
internal
override
{
address dogOwner = s_requestIdToSender[requestId];
uint256 newTokenId = s_tokenCounter;
// What does this token look like?
uint256 moddedRng = randomWords[0] & MAX_CHANCE_VALUE;
Breed dogBreed = getBreedFromModdedRng(moddedRng);
_safeMint(dogOwner, newTokenId);
_setTokenURI(newTokenId, s_dogTokenUris[uint256(dogBreed)]);
emit NftMinted(dogBreed, dogOwner);
} specifically, that test is trying to assert that |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
@RohanNero What do you want to test? |
Beta Was this translation helpful? Give feedback.
@RohanNero What do you want to test?