forked from kamescg/delegatable-sol
-
Notifications
You must be signed in to change notification settings - Fork 13
Open
Description
warning[5667]: Warning: Unused function parameter. Remove or comment out the variable name to silence this warning.
--> lib/delegatable-sol/contracts/Delegatable.sol:128:18:
|
128 | returns (bool success)
| ^^^^^^^^^^^^
Thesis: invoke function will always return false.
Reasoning: success is declared, returned, but never assigned to.
delegatable-sol/contracts/Delegatable.sol
Lines 125 to 141 in d12016f
| function invoke(SignedInvocation[] calldata signedInvocations) | |
| external | |
| override | |
| returns (bool success) | |
| { | |
| for (uint256 i = 0; i < signedInvocations.length; i++) { | |
| SignedInvocation calldata signedInvocation = signedInvocations[i]; | |
| address invocationSigner = verifyInvocationSignature( | |
| signedInvocation | |
| ); | |
| _enforceReplayProtection( | |
| invocationSigner, | |
| signedInvocations[i].invocations.replayProtection | |
| ); | |
| _invoke(signedInvocation.invocations.batch, invocationSigner); | |
| } | |
| } |
Solution, maybe:
success = i == 0 ?
_invoke(signedInvocation.invocations.batch, invocationSigner) : success && _invoke(signedInvocation.invocations.batch, invocationSigner);
Metadata
Metadata
Assignees
Labels
No labels