feat: replace setExecutor with batchSetExecutor

This commit is contained in:
royvardhan
2025-01-30 18:58:54 +05:30
parent 1b79326637
commit ea504faca1
4 changed files with 38 additions and 12 deletions

View File

@@ -235,13 +235,15 @@ contract TychoRouter is
/**
* @dev Entrypoint to add or replace an approved executor contract address
* @param target address of the executor contract
* @param targets address of the executor contract
*/
function setExecutor(address target)
function batchSetExecutor(address[] memory targets)
external
onlyRole(EXECUTOR_SETTER_ROLE)
{
_setExecutor(target);
for (uint256 i = 0; i < targets.length; i++) {
_setExecutor(targets[i]);
}
}
/**
@@ -394,4 +396,4 @@ contract TychoRouter is
return (amountOwed, tokenOwed);
}
}
}