Skip to content

Comments

[Feat] : Implemented Family Wallet Contract#118

Open
ryzen-xp wants to merge 1 commit intoRemitwise-Org:mainfrom
ryzen-xp:feature/-family-wallet-contract
Open

[Feat] : Implemented Family Wallet Contract#118
ryzen-xp wants to merge 1 commit intoRemitwise-Org:mainfrom
ryzen-xp:feature/-family-wallet-contract

Conversation

@ryzen-xp
Copy link
Contributor

feat: Implement Family Wallet Contract #69

Summary

Implements the family_wallet crate referenced in README and GITHUB_ISSUES.md but missing from the repo.

Changes

New Files

  • family_wallet/src/lib.rs — Soroban contract with all required functions
  • family_wallet/src/test_issue_69.rs — Unit tests for all new functions
  • family_wallet/Cargo.toml — Crate config

Modified Files

  • Cargo.toml — Added family_wallet to workspace members

New Functions

Function Description
add_member(env, admin, member_address, role, spending_limit) Adds member with per-transaction spending cap
get_member(env, member_address) -> Option Returns member record or None
update_spending_limit(env, caller, member_address, new_limit) Updates member spending cap
check_spending_limit(env, member_address, amount) -> bool Returns true if amount is within cap

Access Control

  • add_member — Owner or Admin only (Error::Unauthorized = 1)
  • update_spending_limit — Owner or Admin only (Error::Unauthorized = 1)
  • get_member / check_spending_limit — public read

Events

  • MemberAddedEvent — emitted on add_member
  • SpendingLimitUpdatedEvent — emitted on update_spending_limit

Tests

Screenshot From 2026-02-22 18-16-50 Screenshot From 2026-02-22 18-16-39

Closes

Closes #69

@ryzen-xp
Copy link
Contributor Author

Hello @Baskarayelu , Kindly Review my PR ASAP.

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.

Implement Family Wallet Contract

1 participant