LayerZero-Labs / LayerZero-v2

Other
492 stars 312 forks source link

Expose constants for 3rd parties #52

Open CodeSandwich opened 2 months ago

CodeSandwich commented 2 months ago

Some important constants used in the LZ public API aren't exposed by LZ Solidity files. For example CONFIG_TYPE_ULN and NIL_DVN_COUNT are internal despite being crucial when calling IMessageLibManager.setConfig from a smart contract.

LayerZero-v2/messagelib/test/util/Constant.sol is a great resource, maybe it could be moved out of the scary test directory? It could be used in the contracts as the source of constants.