Target Contract: payment-vault-contract
Labels: phase-1-vault, feature
Description: Currently fixed to one token at init. The platform should support XLM, USDC, and other stablecoins simultaneously.
Tasks:
src/storage.rs: Replace single DataKey::Token with DataKey::AllowedToken(Address) -> bool. Add add_allowed_token and remove_allowed_token helpers.
src/types.rs: Add token_address: Address to BookingRecord.
src/contract.rs: Implement add_payment_token(env, token). Admin auth required. Update book_session to accept payment_token: Address. Verify storage::is_token_allowed(payment_token).
src/lib.rs: Expose pub fn add_payment_token(env: Env, token: Address) and update book_session signature in #[contractimpl].
src/test.rs: Admin adds USDC. User books with USDC -> Success. User books with unregistered fake token -> Fails.
Acceptance Criteria:
- Users can book sessions using different whitelisted assets.
Target Contract: payment-vault-contract
Labels: phase-1-vault, feature
Description: Currently fixed to one token at init. The platform should support XLM, USDC, and other stablecoins simultaneously.
Tasks:
src/storage.rs: Replace single DataKey::Token with DataKey::AllowedToken(Address) -> bool. Add add_allowed_token and remove_allowed_token helpers.src/types.rs: Add token_address: Address to BookingRecord.src/contract.rs: Implement add_payment_token(env, token). Admin auth required. Update book_session to accept payment_token: Address. Verify storage::is_token_allowed(payment_token).src/lib.rs: Expose pub fn add_payment_token(env: Env, token: Address) and update book_session signature in #[contractimpl].src/test.rs: Admin adds USDC. User books with USDC -> Success. User books with unregistered fake token -> Fails.Acceptance Criteria: