fix(#326): add role-based auth and daily spending limits to institutional wallet#529
Open
danieloche635-bit wants to merge 1 commit into
Conversation
…o institutional wallet
|
@danieloche635-bit is attempting to deploy a commit to the smartdevs17's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
Hey @danieloche635-bit! 👋 It looks like this PR isn't linked to any issue. If this PR is for one of the issues assigned to you as part of a Wave, please link it to ensure your contribution is tracked properly. You can do this by adding a keyword to the PR description (e.g.,
|
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.
Summary
Implements role-based authorization and daily spending limits for the institutional-grade multisig wallet, completing the remaining acceptance criteria for issue #326.
Changes
New Features
propose(),approve(), andexecute()entrypointsexecute()using the newTransaction.spend_amountandTransaction.spend_assetfieldsNew Entrypoints
assign_role(addr, role)- Assign a role to an address (admin only, via multisig)revoke_role(addr)- Remove a role assignmentset_daily_spending_limit(asset, daily_limit)- Set per-asset daily spending capset_default_spending_limit(daily_limit)- Set default spending cap for all assetsget_role(addr),get_daily_spending_limit(asset),get_default_spending_limit()- View functionsBug Fix
Symbolimport forSymbol::newusage in recovery testsspend_amountandspend_assetoptional fieldsFiles Changed
stellar-lend/contracts/institutional-wallet/src/types.rs- Added WalletRole, DailySpendingLimit, new errors, Transaction fieldsstellar-lend/contracts/institutional-wallet/src/storage.rs- Added role limit storage functionsstellar-lend/contracts/institutional-wallet/src/lib.rs- Role limit entrypointsstellar-lend/contracts/institutional-wallet/src/test.rs- Fixed Symbol import