Skip to content

Conversation

@cmickeyb
Copy link
Contributor

Token metadata is passed from the token issuer to the token object. This is intended to enable secret provisioning of the token objects (e.g. to push a configure count of operations or configuration of output processing for inference). This commit makes the opaque data easier to access by contract objects that inherit methods from token_object.

Signed-off-by: Mic Bowman <mic.bowman@intel.com>
@cmickeyb cmickeyb requested a review from Copilot June 30, 2025 16:21
@cmickeyb cmickeyb self-assigned this Jun 30, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces a new function, get_token_metadata, to the token object, which retrieves and validates the token metadata based on a given schema for use by specialized token classes.

  • Added a declaration to token_object.h for get_token_metadata.
  • Implemented get_token_metadata in token_object.cpp to deserialize stored metadata and validate it against a provided schema.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
exchange-contract/exchange/token_object.h Added function declaration for get_token_metadata.
exchange-contract/exchange/contracts/token_object.cpp Implemented get_token_metadata including metadata fetch, deserialization, and schema validation.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Mic Bowman <cmickeyb@gmail.com>
@cmickeyb cmickeyb merged commit 3c28ce8 into hyperledger-labs:main Jun 30, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant