Skip to content

[SC-04] Implement transfer_asset function #644

@yusuftomilola

Description

@yusuftomilola

Overview

Implement the transfer_asset function that changes ownership of a registered asset inside contracts/contrib/.

Location

All work must be inside contracts/contrib/src/.

Acceptance Criteria

  • transfer_asset(env, asset_id, new_owner) function implemented
  • Requires auth from current asset owner (current_owner.require_auth())
  • Panics if asset not found or status is Retired
  • Updates asset.owner to new_owner and asset.last_transfer_timestamp
  • Updates owner registry: removes from old owner list, adds to new owner list
  • Emits event: topic ["asset", "transferred"], data: asset ID, old owner, new owner

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions