The contract address of the registry is not being passed to the CharityRegistry
contract in the constructor.
Bug code below:
Solution
Interaction with GivenThanks
would always fail as msg.sender
is not the contract address of the CharityRegistry
.
Foundry Test
Write a view function to always verify the CharityRegistry
contract is the intended one:
Likelyhood: High, the parameter is not well used and won't be set. Impact: Low, can be changed with the setter and no one will be able to donate to malicious charity.
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.