Skip to content

feat: Add USDC Token Support (Asset enum + per-asset pool config)#215

Open
dinnar1407-code wants to merge 1 commit intoANAVHEOBA:mainfrom
dinnar1407-code:feature/usdc-token-support
Open

feat: Add USDC Token Support (Asset enum + per-asset pool config)#215
dinnar1407-code wants to merge 1 commit intoANAVHEOBA:mainfrom
dinnar1407-code:feature/usdc-token-support

Conversation

@dinnar1407-code
Copy link
Copy Markdown

USDC Token Support

Closes #16

Changes

  • Asset enum (XLM, USDC) in types/state.rs with pool_prefix() and decimals() helpers
  • Extended PoolConfig with asset: Asset and asset_address: Option<Address> for USDC SAC
  • Updated initialize() to accept asset type and asset_address parameters
  • Added UnsupportedAsset error variant

Design Notes

  • The existing Denomination enum already has Usdc100 and Usdc1000 tiers
  • USDC uses 6 decimal places (vs XLM's 7 stroops)
  • Each asset type gets its own pool via pool_prefix()
  • asset_address is Option<Address> — None for native XLM, Some for USDC SAC contract

- Added Asset enum (XLM, USDC) to types/state.rs with pool_prefix()
  and decimals() helper methods
- Extended PoolConfig with asset type and optional asset_address field
  for USDC SAC (Stellar Asset Contract) address
- Updated initialize to accept asset type and asset_address parameters
- Added UnsupportedAsset error variant
- Denomination enum already supports Usdc100 and Usdc1000 tiers

Closes ANAVHEOBA#16
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.

[FEATURE] Add USDC Token Support

1 participant