## Overview Implement the `transfer_credits` function so members can send resource credits to other addresses. Work inside `contracts/sandbox/resource_credits/`. ## Acceptance Criteria - [ ] `transfer_credits(env, from, to, amount)` is implemented - [ ] Caller must authorize the transfer (`from.require_auth()`) - [ ] Returns `Error::InsufficientBalance` if sender balance is too low - [ ] Returns `Error::InvalidAmount` if `amount == 0` - [ ] Sender balance is decremented and recipient balance is incremented atomically - [ ] Emits a transfer event with `from`, `to`, and `amount` - [ ] Code compiles with `cargo build`
Overview
Implement the
transfer_creditsfunction so members can send resource credits to other addresses. Work insidecontracts/sandbox/resource_credits/.Acceptance Criteria
transfer_credits(env, from, to, amount)is implementedfrom.require_auth())Error::InsufficientBalanceif sender balance is too lowError::InvalidAmountifamount == 0from,to, andamountcargo build