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

POAP: Possible Oversight in README Regarding MintTo Function #188

Closed
giorgionocera opened this issue Jul 11, 2023 · 0 comments · Fixed by #195
Closed

POAP: Possible Oversight in README Regarding MintTo Function #188

giorgionocera opened this issue Jul 11, 2023 · 0 comments · Fixed by #195
Labels
new-feature Propose the addition of a new feature that does not yet exist

Comments

@giorgionocera
Copy link

Feature description

It seems there might be a discrepancy in the poap contract README specifically in the description of the MintTo function

### MintTo
Allows the minter to mint a POAP token to a recipient in the event period if the contract enables mint. This message has the following parameter:
In the code, MintTo calls the execute_mint() function, passing the check_authorized_to_mint parameter as true. Therefore, it performs the following check:
// Check if who is performing the action is the minter
if check_authorized_to_mint && info.sender != config.minter && info.sender != config.admin {
return Err(ContractError::Unauthorized {});
}

Thus, both the admin and the minter can mint a token, contradicting the README, which states that "the minter can mint a POAP token if the contract enables mint". Moreover, the minter and the admin are able to mint the token even if the "mint is not enabled".
// Check if the mint is enabled
if !bypass_mint_enable && !config.mint_enabled {
return Err(ContractError::MintDisabled {});
}

Implementation proposal

The README should correctly reflect the code's functionality. In this case, it should clarify that both the admin and the minter are able to mint a token and that they bypass the mint_enabled check.

@giorgionocera giorgionocera added the new-feature Propose the addition of a new feature that does not yet exist label Jul 11, 2023
@RiccardoM RiccardoM mentioned this issue Jul 17, 2023
18 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new-feature Propose the addition of a new feature that does not yet exist
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant