Skip to content

feat: add native SOL payment asset for Solana network#4741

Merged
rtomas merged 2 commits intomainfrom
devin/1753883424-add-native-sol-asset
Jul 31, 2025
Merged

feat: add native SOL payment asset for Solana network#4741
rtomas merged 2 commits intomainfrom
devin/1753883424-add-native-sol-asset

Conversation

@devin-ai-integration
Copy link
Copy Markdown
Contributor

Description

This PR adds native SOL payment asset support to the @reown/appkit-pay library by introducing a new solanaSOL asset definition in packages/pay/src/types/assets.ts.

The implementation follows the established pattern for native tokens (like baseETH and baseSepoliaETH) by using 'native' as the asset value instead of a contract address, which allows the existing PayController logic to handle native Solana transactions correctly.

Type of change

  • Chore (non-breaking change that addresses non-functional tasks, maintenance, or code quality improvements)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Associated Issues

This is a follow-up to PAY-52, specifically implementing native SOL token support as requested by TomTom (tomas.rawski@reown.com).

Key Changes

  • Added solanaSOL PaymentAsset with:
    • Network: 'solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp' (Solana mainnet)
    • Asset: 'native' (indicates native token, not a contract address)
    • Metadata: { name: 'Solana', symbol: 'SOL', decimals: 9 }

Important Review Points

⚠️ Critical items to verify:

  1. Network ID accuracy: Confirm 'solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp' is the correct Solana mainnet identifier
  2. SOL metadata verification: Validate that SOL has 9 decimals and the name/symbol are accurate
  3. Naming convention: Verify solanaSOL follows the expected [network][TOKEN] pattern
  4. PayController compatibility: Ensure the existing payment logic correctly handles asset: 'native' for Solana networks
  5. Test coverage: Consider if automated tests should be added for this new asset definition

Technical implementation:

  • Follows the exact same pattern as baseETH and baseSepoliaETH native tokens
  • Uses 'native' asset value which triggers tokenMint: undefined in PayController for Solana payments
  • Maintains consistency with existing asset export structure

Checklist

  • Code in this PR is covered by automated tests (Unit tests, E2E tests) ⚠️ No tests added - should this be addressed?
  • My changes generate no new warnings
  • I have reviewed my own code
  • I have filled out all required sections
  • I have tested my changes on the preview link
  • Approver of this PR confirms that the changes are tested on the preview link

Link to Devin run: https://app.devin.ai/sessions/dc756cccd85841e296f50ff025ba3f02
Requested by: TomTom (tomas.rawski@reown.com)

- Add solanaSOL asset with native token support
- Use 'native' as asset value for Solana native payments
- Include proper metadata: name: 'Solana', symbol: 'SOL', decimals: 9
- Follows existing pattern of baseETH and baseSepoliaETH

Relates to PAY-52

Co-Authored-By: TomTom <tomtom@reown.com>
@devin-ai-integration
Copy link
Copy Markdown
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Jul 30, 2025

⚠️ No Changeset found

Latest commit: 3428297

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@vercel
Copy link
Copy Markdown

vercel bot commented Jul 30, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
appkit-basic-html ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 31, 2025 0:36am
appkit-demo ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 31, 2025 0:36am
appkit-gallery ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 31, 2025 0:36am
appkit-laboratory ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 31, 2025 0:36am
10 Skipped Deployments
Name Status Preview Comments Updated (UTC)
appkit-basic-example ⬜️ Ignored (Inspect) Jul 31, 2025 0:36am
appkit-basic-sign-client-example ⬜️ Ignored (Inspect) Jul 31, 2025 0:36am
appkit-basic-up-example ⬜️ Ignored (Inspect) Jul 31, 2025 0:36am
appkit-ethers5-bera ⬜️ Ignored (Inspect) Jul 31, 2025 0:36am
appkit-nansen-demo ⬜️ Ignored (Inspect) Jul 31, 2025 0:36am
appkit-vue-solana ⬜️ Ignored (Inspect) Jul 31, 2025 0:36am
appkit-wagmi-cdn-example ⬜️ Ignored (Inspect) Jul 31, 2025 0:36am
ethereum-provider-wagmi-example ⬜️ Ignored (Inspect) Jul 31, 2025 0:36am
next-wagmi-solana-bitcoin-example ⬜️ Ignored (Inspect) Jul 31, 2025 0:36am
vue-wagmi-example ⬜️ Ignored (Inspect) Jul 31, 2025 0:36am

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Jul 30, 2025

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 77.59% 31861 / 41058
🔵 Statements 77.59% 31861 / 41058
🔵 Functions 69.08% 2628 / 3804
🔵 Branches 84.52% 6746 / 7981
File CoverageNo changed files found.
Generated in workflow #13885 for commit 3428297 by the Vitest Coverage Report Action

@rtomas rtomas enabled auto-merge July 31, 2025 12:30
@rtomas rtomas added this pull request to the merge queue Jul 31, 2025
Merged via the queue into main with commit bdb827c Jul 31, 2025
41 checks passed
@rtomas rtomas deleted the devin/1753883424-add-native-sol-asset branch July 31, 2025 13:03
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