You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Specifically within MessageLibManager, when calling named arguments of the contract one must use the interface over the implementation. For example, if I'm looking at the code and want to use:
function getSendLibrary(address_sender, uint32_eid) externalviewreturns (addresslib);
Problem
Interfaces help with contract calls, while implementations help with understanding the interfaces. You can expect developers to refer to both implementation and interface when referencing contracts. However, if they use named variable calls, their contract won't compile if using the implementation named arguments.
Scope
There are several functions within MessageLibManager which break their interface conventions. I have not verified if the issue exists in other contracts.
Recommendation
I recommend maintaining the same variable name from interface to implementation so that named argument function calls can be consistently used.
The text was updated successfully, but these errors were encountered:
Description
Specifically within
MessageLibManager
, when calling named arguments of the contract one must use the interface over the implementation. For example, if I'm looking at the code and want to use:LayerZero-v2/packages/layerzero-v2/evm/protocol/contracts/MessageLibManager.sol
Lines 83 to 89 in 7da7684
I would presume the contract I develop would look like this:
However, this actually doesn't work in production. Why? Because the interface has a different declaration of the second argument:
LayerZero-v2/packages/layerzero-v2/evm/protocol/contracts/interfaces/IMessageLibManager.sol
Line 50 in 7da7684
Problem
Interfaces help with contract calls, while implementations help with understanding the interfaces. You can expect developers to refer to both implementation and interface when referencing contracts. However, if they use named variable calls, their contract won't compile if using the implementation named arguments.
Scope
There are several functions within
MessageLibManager
which break their interface conventions. I have not verified if the issue exists in other contracts.Recommendation
I recommend maintaining the same variable name from interface to implementation so that named argument function calls can be consistently used.
The text was updated successfully, but these errors were encountered: