“This challenge is all about eXclusive OR, and you know what that means, right?”
How to Submit Solution:
Use the below submission form to submit the solution: https://quillaudits.typeform.com/QuillCTF
Objective of CTF - Make a successful call to the `callMe` function. - The given `target` parameter should belong to a contract deployed by you and should use `IBoolGiver` interface.
Note: You can create POC using Foundry/Hardhat. Without proper POC your submissions will not be accepted.
Contract Code:
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
interface IBoolGiver {
function giveBool() external view returns (bool);
}
contract TrueXOR {
function callMe(address target) external view returns (bool) {
bool p = IBoolGiver(target).giveBool();
bool q = IBoolGiver(target).giveBool();
require((p && q) != (p || q), "bad bools");
require(msg.sender == tx.origin, "bad sender");
return true;
}
}