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

Mintable Authentication #30

Open
wei3erHase opened this issue Feb 25, 2025 · 0 comments
Open

Mintable Authentication #30

wei3erHase opened this issue Feb 25, 2025 · 0 comments

Comments

@wei3erHase
Copy link
Member

Mintable authentication (owner and minters) was removed from the PoC until it found a new place to be, #29 unlocks that, we should make an MintLib or something that could implement msg_sender validation for minting (when externally called).

TokenLib internal minting should always be at dispose for the developer, that could TokenLib::mint_to_private at constructor. Mintable trait (and authentication) shouldn't be needed for a dev to fully develop over a token that doesn't require the Mintable interface.

Developer is in charge of implementing the authentication pattern (we provide a PoC with owner and minters array), and the MintLib methods should provide enough information to authenticate the mint. These method names are gonna be reused across different authentication schemes, as the injected "Token code" will optimistically call MintLib::validate_mint (ignoring which MintLib is being imported in the top layer contract).

MintLib is also responsible of defining (at comptime) which storage struct items are required, this is specific for each MintLib implementations, but internal calls (called from injected Token) should be commonly named and populated for all.

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