Omniscia Dapp Radar Audit
NonBlockingLzApp Code Style Findings
NonBlockingLzApp Code Style Findings
NBL-01C: Inefficient External Self Invocation
Type | Severity | Location |
---|---|---|
Gas Optimization | NonBlockingLzApp.sol:L46 |
Description:
The linked function call is performed "externally" to the contract itself to ensure the require
check imposed by nonblockingLzReceive
is satisfied, however, this is highly inefficient.
Example:
contracts/LZ/NonBlockingLzApp.sol
46this.nonblockingLzReceive(_srcChainId, _srcAddress, _nonce, _payload);
Recommendation:
We advise the _nonblockingLzReceive
function to be invoked directly, similarly to the NonblockingLzApp
implementation of LayerZero.
Alleviation:
The Dapp Radar team considered this exhibit but opted not to apply a remediation for it in the current iteration of the codebase.