Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sharedDecimals function is defined as pure making it too restrictive #47

Open
Mattijah opened this issue Mar 30, 2024 · 0 comments
Open

Comments

@Mattijah
Copy link

Mattijah commented Mar 30, 2024

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);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant