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

Add NATIVE_DECIMALS & LAMPORTS_PER_SOL constants #433

Closed
wants to merge 3 commits into from

Conversation

n3tn1nja
Copy link
Contributor

@n3tn1nja n3tn1nja commented Jun 4, 2024

Hello @michaelhly!

I've added the LAMPORTS_PER_SOL and DEFAULT_DECIMALS constants to the library.

Given the popularity of this library and frequent reuse of these in scripts, it seemed beneficial to centralize them to the library to reduce redundancy and potential errors. This change can help make many codebases cleaner and more maintainable.

Thank you for considering this addition!

@michaelhly
Copy link
Owner

Hi @n3tn1nja. Thanks for the contribution. Would you mind adding these constants to a new constants.py file in the solana directory?

@kevinheavey
Copy link
Collaborator

Can we rename DEFAULT_DECIMALS to NATIVE_DECIMALS and put it in src/spl/token/constants.py?

n3tn1nja added 2 commits June 6, 2024 03:44
Change constants location.
Useful Solana constants.
@n3tn1nja
Copy link
Contributor Author

n3tn1nja commented Jun 6, 2024

Hi @n3tn1nja. Thanks for the contribution. Would you mind adding these constants to a new constants.py file in the solana directory?

Happy to help. I have updated the PR; the constants are now in Solana directory.

@n3tn1nja n3tn1nja changed the title Add DEFAULT_DECIMALS & LAMPORTS_PER_SOL constants Add NATIVE_DECIMALS & LAMPORTS_PER_SOL constants Jun 6, 2024
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

Successfully merging this pull request may close these issues.

3 participants