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

feat(backend): Support Solana SPL as a custom token type #4462

Merged
merged 51 commits into from
Jan 30, 2025

Conversation

bitdivine
Copy link
Member

@bitdivine bitdivine commented Jan 27, 2025

Motivation

Users may select a Solana token as a custom token they wish to see. This information needs to be stored in the user profile.

Changes

  • Add SPL as a custom token type
  • Add a validator trait, to prevent a user from storing a gigantic string as a token ID.

Tests

  • Unit tests are included for the validator.
  • TODO: Persistence integration tests

Cargo.lock Outdated
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bs58 is used to verify that the token ID is a valid base58 encoded 32 byte value.

src/shared/src/impls.rs Show resolved Hide resolved
src/shared/src/types.rs Outdated Show resolved Hide resolved
@bitdivine bitdivine marked this pull request as ready for review January 29, 2025 23:25
@bitdivine bitdivine requested a review from a team as a code owner January 29, 2025 23:25
@bitdivine bitdivine enabled auto-merge (squash) January 30, 2025 10:36
Copy link
Collaborator

@AntonioVentilii AntonioVentilii left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM tks!

@bitdivine bitdivine merged commit b96e13e into main Jan 30, 2025
29 checks passed
@bitdivine bitdivine deleted the spl-token-backend branch January 30, 2025 12:50
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.

2 participants