-
Notifications
You must be signed in to change notification settings - Fork 91
refactor(examples): modularize token_transfer.py for clarity and reuse (#773) #782
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Raja Rathour <[email protected]>
…ledger#773) Signed-off-by: Raja Rathour <[email protected]>
Signed-off-by: Raja Rathour <[email protected]>
|
Hey @exploreriii , Ready for preview , please check. |
…ledger#773) Signed-off-by: Raja Rathour <[email protected]>
exploreriii
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @Raja-89 sorry the title of this issue was not titled correctly, but I'll persist as the description was correct.
Please edit:
examples/transfer_token.py
this is a file that already exists
so, you should keep the content in there and just modularise it
Currently, you have created a new file, token_trasnfer.py, which means we have duplicate content as have another at token_transfer.py
Thanks!
|
Hi @Raja-89 issues persist in this PR when you are able |
|
Hi @Raja-89 please confirm if you are able to continue working on this PRr |
Signed-off-by: Raja Rathour <[email protected]>
Signed-off-by: Raja Rathour <[email protected]>
exploreriii
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @Raja-89 very good just a changelog update please
CHANGELOG.md
Outdated
| - Limit workflow bot to one message per PR | ||
| - Refactored token-related example scripts (`token_delete.py`, `token_dissociate.py`, etc.) for improved readability and modularity. [#370] | ||
| - upgrade: step security action upgraded from harden-runner-2.13.1 to harden-runner-2.13.1 | ||
| - upgrade: step security action upgraded from harden-runner-2.13.1 to harden-runner. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could you make sure line 38 includes this:
- upgrade: step security action upgraded from harden-runner-2.13.1 to harden-runner-2.13.1
| - Added `examples/token_create_transaction_token_fee_schedule.py` to demonstrate creating tokens with custom fee schedules and the consequences of not having it. | ||
|
|
||
| ### Changed | ||
| - Upgraded step-security/harden-runner v2.13.2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In line 34, please add your changelog entry about token transfer
…ledger#773) Signed-off-by: Raja Rathour <[email protected]>
|
Hi @exploreriii , done the changes, ready for final review. |
examples/transfer_token.py
Outdated
|
|
||
| # Transfer Token | ||
| print("\nSTEP 4: Transfering Token...") | ||
| def transfer_transaction(client, operator_id, operator_key, recipient_id, token_id): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should stay transfer_tokens() please
|
also rebase please :) |
Signed-off-by: Raja Rathour <[email protected]>
d9abfbb to
45a0dc4
Compare
|
@tech0priyanshu would you like to help review this PR? |
|
sure @exploreriii |
| uv run examples/transaction/transfer_transaction_fungible.py | ||
| python examples/transaction/transfer_transaction_fungible.py | ||
| uv run examples/transfer_token.py |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @Raja-89 , this file is now renamed to examples/transaction/transfer_transaction_fungible.py.
cc- @exploreriii
|
Also, please resolve the conflicts and rebase to pull in the latest changes from |
|
Hello, this is the Office Hour Bot. This is a reminder that the Hiero Python SDK Office Hours are scheduled in approximately 4 hours (14:00 UTC). This session provides an opportunity to ask questions regarding this Pull Request or receive assistance from a maintainer. Details:
Disclaimer: This is an automated reminder. Please verify the schedule here to be notified of any changes. |
|
Hi @Raja-89 , are you still working on this issue? |
Summary
Refactored
examples/token_transfer.pyinto modular functions for improved readability and structure.Introduced:
account_balance_query()transfer_transaction()main()entry point for clear script execution.Maintains identical runtime behavior and output.
Linked issue: #773