LayerZero-Labs/LayerZero-v2

`sharedDecimals` function is defined as `pure` making it too restrictive

Opened this issue · 0 comments

The sharedDecimals function is defined as pure, which makes overriding in a subclass impossible if the value returned is a locally defined constant (not pre-set in the contract with a literal). The tutorial or suggestion mentioning overriding of sharedDecimals using view is therefore also non-functional https://docs.layerzero.network/v2/developers/evm/oft/quickstart#token-supply-cap. The interface IOFTdefines the function with view as well, which should really be used:

function sharedDecimals() external view returns (uint8);