Skip to content

Update TokenInfo to dump all token fields #914

@exploreriii

Description

@exploreriii

PROBLEM
src/hiero_sdk_python/tokens/token_info.py

Currently we have a way of printing token info objects in a huamn friendly way:
def str(self) -> str:
parts = [
f"token_id={self.token_id}",
f"name={self.name!r}",
f"symbol={self.symbol!r}",
f"decimals={self.decimals}",
f"total_supply={self.total_supply}",
f"treasury={self.treasury}",
f"is_deleted={self.is_deleted}",
f"memo={self.memo!r}",
f"token_type={self.token_type}",
f"max_supply={self.max_supply}",
f"ledger_id={self.ledger_id!r}",
f"metadata={self.metadata!r}",
]
return f"TokenInfo({', '.join(parts)})"

But this doesn't include all token info fields, for example, it does not include custom fee

We need a way of pretty printing all token info fields

SOLUTION
Add all missing fields to def str(self)
(please check for them)

for example
supply_type
kyc_key (public)
other keys
default_freeze_status
custom_fees

Metadata

Metadata

Labels

Good First Issue CandidateIssues that can become a “good first issue” but need more description/context.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions