As per the requirement in Readme, mintRamNFT()
function must be called only by Dussehra
contract to mint Ram NFTs to the users, but there isn't anything that's restricting the function being called by anyone which is not an expected behavior.
Anyone can mint any number of NFT's directly to anyone from RamNFT::mintRamNFT()
without paying any entranceFee.
Paste the below code to Dussehra.t.sol
and run the command: forge test --mt test__AnyoneCanMintDirectly
Anyone can call the function to mint NFT to anyone which is a serious vulnerability of the protocol
Foundry
So, to be able to check if caller is Dussehra
contract, we need to create a modifier and apply it on mintRamNFT()
function
Make below code changes in RamNFT.sol
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.