Skip to content

[CT-03] Implement credit transfer between member addresses #767

@yusuftomilola

Description

@yusuftomilola

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions