fulfillMintRequest()
will always revert or return without execution
Normal behavior / attended behavior :
fulfillMintRequest
(minting of the NFT) if there is an actual response : response.length > 0
& there is no error : err.length == 0
Specific issue in the actual code :
This function will never be executed passed the 10th line (it will never mint any NFT) because of the require and if statements being incorrect, it will always revert
or return
.
https://github.com/CodeHawks-Contests/2025-05-weather-witness/blob/main/src/WeatherNft.sol#L138-L142
Likelihood: High
Every single time the function is called
Impact: High
Minting of the weather NFT becomes impossible
Let try each possible case and see what happens.
Case 1 : There is a response (error or not) => response.length > 0
=> The function shouldn't revert
if there is a response but no error
. Here it reverts. It's an abnormal behavior.
Case 2 : There is an error => err.length > 0
=> Normal behavior, it should revert.
Case 3 : There is no response (error or not) => response.length == 0
=> Normal behavior, it should return.
Change the require()
and if statement
to reflect the 2 possibilities for not minting the NFT :
- There is an error
=> it should revert
- There is no response
=> it should return
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.