feat(compliance): enforce KYC whitelist and escrow holding for restricted assets (#1158) - #1191
Open
xtep103 wants to merge 4 commits into
Open
feat(compliance): enforce KYC whitelist and escrow holding for restricted assets (#1158)#1191xtep103 wants to merge 4 commits into
xtep103 wants to merge 4 commits into
Conversation
|
@xtep103 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
Contributor
|
@xtep103 |
Contributor
|
@xtep103 |
Contributor
|
@xtep103 |
Author
|
@Fracverse Hi! This PR is open and ready for review — happy to address any feedback. Thanks! |
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.
Description
Closes #1158
This pull request implements regulatory-compliant token transfer enforcement across the InheritX smart contracts suite on testnet. It introduces cross-contract KYC whitelist verification via
AccessControlContract::is_kyc_approvedand an escrow holding mechanism for restricted asset payouts when beneficiaries have not yet satisfied KYC compliance.Key Changes
contracts/access-control)AccessControlContractSoroban contract withis_kyc_approved,submit_kyc,approve_kyc,reject_kyc,assign_role,revoke_role,has_role,get_roles, and pause state management.contracts/inheritance-contract)set_access_contract/get_access_contractpeer linking with version compatibility checks; updatedis_kyc_approvedandcheck_beneficiary_kyc_approvedto queryAccessControlContractdynamically viatry_invoke_contract.contracts/inheritance-contract)set_restricted_asset,is_asset_restricted,set_plan_restricted, andis_plan_restrictedmethods to mark tokens and inheritance plans subject to KYC enforcement.contracts/inheritance-contract)EscrowRecordandEscrowHeldEventis published. Once KYC is approved inAccessControlContract,release_escrow_payoutreleases funds, finalizes claim, and assignsRole::Beneficiary.contracts/inheritance-contract)WhitelistKeyenum to preserve Soroban#[contracttype]variant limits and gas efficiency.Verification & Testing
AccessControlContract.cargo test --workspacepassed 491 tests with 0 failures across all crates (inheritance-contract: 343 passed,lending-contract: 133 passed,loan-nft: 10 passed,mock-token: 5 passed).