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

Don't calculate amount * (10^decimals) in the contract. #1

Open
manangouhari opened this issue Jan 26, 2022 · 2 comments
Open

Don't calculate amount * (10^decimals) in the contract. #1

manangouhari opened this issue Jan 26, 2022 · 2 comments

Comments

@manangouhari
Copy link
Collaborator

It's usually a better idea to pass the amount as the intended amount * (10^decimals) rather than calculating that on-chain, it's useless computation that wastes gas.

@manangouhari
Copy link
Collaborator Author

For example in the mint function

@anoushk1234
Copy link
Collaborator

oh weirdly openzepplins wizard has that implementation

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

2 participants