FV-SOL-6-C3 Silent Fail

TLDR

A function call fails without detection, and continues executing as if it succeeded, which can create an invalid or inconsistent state.

Game

Silent fails are scary and can be unpredictable. can you find what can cause a silent fail here?

// 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;

interface IExternalContract {
    function performAction() external returns (bool);
}

contract SilentFailGame {
    IExternalContract public externalContract;

    constructor(address _externalContract) {
        externalContract = IExternalContract(_externalContract);
    }

    function callExternalAction() public {
        externalContract.performAction();
    }
}

Last updated