Skip to content

Add repr method to src/hiero_sdk_python/tokens/custom_fixed_fee.py #591

@exploreriii

Description

@exploreriii

Custom_fixed_fee.py currently relies on manual printing as we do not have a repr method

we can add a repr method after eq

eg something like this
def repr(self) -> str:
return (
f"{self.class.name}("
f"amount={self.amount}, "
f"denominating_token_id={self.denominating_token_id}, "
f"fee_collector_account_id={self.fee_collector_account_id}, "
f"all_collectors_are_exempt={self.all_collectors_are_exempt})"
)

then we can refactor the example.

We only have a custom_fee example.

We can create a separte example: custom_fixed_fee

and improve the example for it, illustrating the repr method

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions