Problem
contracts/multisig_transfer/src/rules.rs exists as a module but the validation logic is incomplete. Transfer amounts are not validated against min/max thresholds, and there are no checks for self-transfers or transfers to blocked addresses.
Proposed Solution
Create contracts/opsce/src/transfer_rules.rs. Implement a validate_transfer(env, from, to, asset_id, amount) guard function called at the start of every transfer execution.
Acceptance Criteria
Problem
contracts/multisig_transfer/src/rules.rsexists as a module but the validation logic is incomplete. Transfer amounts are not validated against min/max thresholds, and there are no checks for self-transfers or transfers to blocked addresses.Proposed Solution
Create
contracts/opsce/src/transfer_rules.rs. Implement avalidate_transfer(env, from, to, asset_id, amount)guard function called at the start of every transfer execution.Acceptance Criteria
Err(ContractError::SelfTransfer)iffrom == toErr(ContractError::AmountBelowMinimum)ifamount < min_transfer_amountErr(ContractError::AmountAboveMaximum)ifamount > max_transfer_amountErr(ContractError::RecipientBlocked)iftois in a blocked addresses listset_transfer_limits(env, asset_id, min, max)configures limits (admin only)block_address(env, address)adds an address to the blocked list (admin only)