A deployment conflict occurs due to a mismatch in the expected address for the CharityRegistry
contract instance in GivingThanks.sol
. This prevents the GivingThanks
contract from deploying correctly, as the _registry
parameter is not utilized as intended in the constructor.
In GivingThanks.sol
, the constructor receives an address parameter _registry
intended to reference an existing CharityRegistry
contract instance. However, the _registry
address is not correctly utilized in the contract, which results in a failure during deployment. This makes the GivingThanks
contract unusable as it cannot be deployed to the blockchain without addressing this issue.
High Impact: The deployment failure blocks the GivingThanks
contract from functioning, preventing any interactions on-chain. This issue effectively halts the contract’s deployment and intended operation.
Manual code review
Foundry (for compilation and testing)
forge compile
To resolve the issue, modify the constructor in GivingThanks.sol
to properly utilize the _registry
parameter, as shown below:
This change will correctly assign registry
to an instance of the CharityRegistry
contract, allowing the GivingThanks
contract to interact with it as intended.
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.