Smart Contract Vault Deposit & Test Suite#27
Merged
soomtochukwu merged 7 commits intoDXmakers:mainfrom Mar 30, 2026
Merged
Conversation
Message Animations: - Replace fadeUp with fadeUpSmooth (includes subtle scale transform) - Add staggered animation delays for sequential message appearance - Use cubic-bezier easing for smooth, natural curves Typing Indicator: - Increase dot size from 6px to 8px for better visibility - Change color to accent-primary with glow shadow effect - Implement typingBounce keyframe (vertical movement instead of scaling) - Adjust timing to 1.2s with better cubic-bezier curve - Add proper delays: 0s, 0.15s, 0.30s for sequential bounce Send Button: - Add prominent box-shadow (theme-constrained glows) - Enhance hover: scale 1.1 with stronger shadow - Add active state: scale 0.95 with inset shadow - Smoother easing curve: cubic-bezier(0.34, 1.56, 0.64, 1) Input Field: - Add hover state: slightly darker background, subtle border tint - Enhanced focus: increased shadow depth with inset glow - Smooth placeholder color transition on focus - Better visual feedback with layered shadows Message Bubbles: - Add transition to all bubble states - Hover effect for agent bubbles: lighter background + border tint + subtle shadow - Hover effect for user bubbles: enhanced drop shadow - Smooth 0.25s transitions throughout All animations comply with theme colors and maintain 60fps performance
- test_vault_deposit_success: Basic deposit and balance tracking - test_vault_deposit_multiple_users: Multi-user independent balance tracking - test_vault_deposit_accumulation: Repeated deposits accumulate correctly - test_vault_deposit_zero_amount: Error handling for zero amount - test_vault_deposit_negative_amount: Error handling for negative amounts All tests validate: ✅ Authorization via from.require_auth() ✅ USDC token transfer via transfer_usdc_from_user() ✅ Individual balance tracking in DataKey::UserBalance ✅ Protocol-wide total tracking in DataKey::TotalVaultDeposits ✅ Error messages for invalid deposits
|
@memplethee-lab Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
Contributor
|
@memplethee-lab, could you look into this? |
Contributor
Author
|
@approved workflow |
Contributor
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
Implements secure USDC vault deposit functionality with cryptographic authorization, persistent balance tracking, and comprehensive test coverage for Smasage's Soroban smart contract.
Issues Addressed
1. Vault Deposit Function
from.require_auth()DataKey::UserBalanceDataKey::TotalVaultDepositsdeposit()function refactored to use vault_deposit internallyImplementation:
2. Vault Balance Getters
3. Comprehensive Test Suite
Test Coverage:
test_vault_deposit_success- Basic single user deposittest_vault_deposit_multiple_users- Multi-user balance isolationtest_vault_deposit_accumulation- Repeated deposits accumulate correctlytest_vault_deposit_zero_amount- Panic on zero amounttest_vault_deposit_negative_amount- Panic on negative amountFiles Modified:
contracts/src/lib.rs- Added vault_deposit(), getters, and 5 tests (251 insertions)Acceptance Criteria ✅
vault_deposit(from, amount)function implementedrequire_auth()TotalVaultDepositsdeposit()refactored)Testing
Build and run tests:
Run only vault deposit tests:
cargo test --lib test_vault_depositCode Summary
DataKey Updates
Function Signatures
Next Steps
vault_withdraw()functionTechnical Notes
Env::default()with mock authBuild Status
✅ Compiles successfully (0 errors)
✅ All tests pass (5/5 vault deposit tests + existing integration tests)
✅ Ready for deployment to Stellar testnet