Skip to content

Parse and Display Roles Correctly in Escrow Viewer #9

@techrebelgit

Description

@techrebelgit

📌 Objective

Update the Escrow Viewer to correctly parse and display the roles and associated addresses from the roles property in the escrow contract metadata.


📖 Background

In Trustless Work, each escrow contract defines specific roles such as:

  • Milestone Marker
  • Approver
  • Fund Releaser
  • Dispute Resolver (if applicable)

These roles were previously included in different metadata properties, but are now unified under a dedicated roles object within the escrow contract.

Currently, the viewer does not correctly parse this new structure. As a result, the Roles section is broken and shows inaccurate or empty data.


✅ Acceptance Criteria

  • Escrow Viewer correctly parses the new roles property.
  • Each role (e.g., Marker, Approver, Releaser) is displayed with the corresponding wallet address in the UI.
  • Roles are clearly labeled and mapped to their function.
  • UI displays accurate role data for any valid escrow contract ID.
  • Existing UI structure is reused or improved — no regressions elsewhere.

📦 Deliverables

Please include in your PR:

  1. Updated parsing logic and UI that renders role addresses based on the new contract format.
  2. 🎥 Video demo showing the viewer correctly identifying and displaying roles for a known escrow contract.
  3. 📄 Explanation of how roles are retrieved and parsed.
  4. 📝 Brief summary of the changes made to restore or improve the Roles section.

🧠 Tips & Resources

  • Review how the escrow contract now emits or stores role addresses under the roles object.
  • You may need to use Soroban RPC or Stellar SDK to fetch and decode this metadata.
  • Compare output with real deployed escrows that are known to have role data correctly assigned.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions