FV-SOL-6-C1 Unchecked Call Return
TLDR
functions like delegatecall
, call
, staticcall
, send
, and external contract function calls fail but return values go unchecked, leading to unintended state changes, lost funds, or incorrect assumptions about success
Game
Look for unchecked low level calls
// SPDX-License-Identifier: MIT
// Open me in VSCode and really think before opening the hints!
// Add @audit tags wherever suspicious
// Go to the solidity docs to complete missing knowledge of what's happening here
// Solve by drafting a fix!
pragma solidity ^0.8.0;
contract UncheckedCallGame {
address public targetContract;
constructor(address _targetContract) {
targetContract = _targetContract;
}
function executeExternalCall(bytes memory data) public {
targetContract.call(data);
}
}
Last updated
Was this helpful?