Skip to content

executeFromExecutor doesn't distinguish the return data of succesfull and failed calls when ExecType is 0x01 #51

@Amxx

Description

@Amxx

executeFromExecutor returns a bytes[] that contains the return data of the calls being executed.
When the mode is such that execType == EXECTYPE_TRY, the execution is haneled by the variants of _tryExecute

function _tryExecute(Execution[] calldata executions)
internal
returns (bytes[] memory result)
{
uint256 length = executions.length;
result = new bytes[](length);
for (uint256 i; i < length; i++) {
Execution calldata _exec = executions[i];
bool success;
(success, result[i]) = _tryExecute(_exec.target, _exec.value, _exec.callData);
if (!success) emit TryExecuteUnsuccessful(i, result[i]);
}
}

If the call is fails, the returndata is the revert reason (or custom error) that is returned by the contract. This is returned to the caller just like if the call had not failed. An event is emitted for external observers to see, but the calling contract has no way to see that, and doesn't know weither the call(s) failled of not.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions