-
Notifications
You must be signed in to change notification settings - Fork 86
feat: Add set node account id method #362
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
Open
aceppaluni
wants to merge
40
commits into
hiero-ledger:main
Choose a base branch
from
aceppaluni:AddSetNodeAccountIdMethod
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+158
−6
Open
Changes from all commits
Commits
Show all changes
40 commits
Select commit
Hold shift + click to select a range
f694268
add tokenInfoQuery functionality
aceppaluni d5310c8
refactor: update TokenInfoQuery implementation
Dosik13 76b0d85
test: add unit tests
Dosik13 256e807
test: add integration tests
Dosik13 32443f1
docs: add examples for both non-fungible/fungible tokens
Dosik13 3c3a6ea
docs: update README in examples
Dosik13 1a453ee
chore: add TokenInfoQuery to __init__.py
Dosik13 1c6ac60
test: reduce test_token_info_query_execute function length
Dosik13 df1069c
test: fix incorrect integration test function names
Dosik13 67c9eb7
docs: change network from solo to testnet and some minor changes in e…
Dosik13 d7d6c18
test: address PR comments for integration/unit tests
Dosik13 79c1f10
docs: update examples for TokenInfoQuery to address PR comments
Dosik13 a4372ad
Merge branch 'hiero-ledger:main' into main
aceppaluni 17ace16
Merge branch 'hiero-ledger:main' into main
aceppaluni 090b2bb
Merge branch 'hiero-ledger:main' into main
aceppaluni 854c0ca
Merge branch 'hiero-ledger:main' into main
aceppaluni 168d706
Merge branch 'hiero-ledger:main' into main
aceppaluni 143b727
Merge branch 'hiero-ledger:main' into main
aceppaluni ad6df88
Merge branch 'hiero-ledger:main' into main
aceppaluni fdcc0cb
Merge branch 'hiero-ledger:main' into main
aceppaluni b9ad245
Merge branch 'hiero-ledger:main' into main
aceppaluni 7f4ee47
Merge branch 'hiero-ledger:main' into main
aceppaluni e17c504
Merge branch 'hiero-ledger:main' into main
aceppaluni 22ba822
Merge branch 'hiero-ledger:main' into main
aceppaluni 2741bde
Merge branch 'hiero-ledger:main' into main
aceppaluni 9621065
Merge branch 'hiero-ledger:main' into main
aceppaluni 9469f23
Merge branch 'hiero-ledger:main' into main
aceppaluni cfd8e1c
Merge branch 'hiero-ledger:main' into main
aceppaluni 1cb2132
Merge branch 'hiero-ledger:main' into main
aceppaluni 9328d1f
Merge branch 'hiero-ledger:main' into main
aceppaluni e594364
Merge branch 'hiero-ledger:main' into main
aceppaluni a5267b8
Merge branch 'hiero-ledger:main' into main
aceppaluni 13b3573
Merge branch 'hiero-ledger:main' into main
aceppaluni 177248e
Merge branch 'hiero-ledger:main' into main
aceppaluni db93977
Add set_node_account_id method
aceppaluni 18e17c8
fix: add missing List import and update changelog
aceppaluni 1817ac2
style: add spacing in set_node_account_id method
aceppaluni 32e4227
feat: support selecting node account ID for execution flow
aceppaluni 5f694bd
Fix node selection to use _select_node instead of _get_node
aceppaluni 6e60202
feat: add Network._get_node() and update executable to support node s…
aceppaluni File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| import pytest | ||
| from hiero_sdk_python.query.query import Query | ||
| from hiero_sdk_python.account.account_id import AccountId | ||
|
|
||
| def test_set_single_node_account_id(): | ||
| q = Query() | ||
| node = AccountId(0, 0, 3) | ||
|
|
||
| q.set_node_account_id(node) | ||
|
|
||
| assert q.node_account_ids == [node] | ||
| assert q._used_node_account_id is None # not selected until execution | ||
|
|
||
| def test_set_multiple_node_account_ids(): | ||
| q = Query() | ||
| nodes = [AccountId(0, 0, 3), AccountId(0, 0, 4)] | ||
|
|
||
| q.set_node_account_ids(nodes) | ||
|
|
||
| assert q.node_account_ids == nodes | ||
| assert q._used_node_account_id is None | ||
|
|
||
| def test_select_node_account_id(): | ||
| q = Query() | ||
| nodes = [AccountId(0, 0, 3), AccountId(0, 0, 4)] | ||
| q.set_node_account_ids(nodes) | ||
|
|
||
| selected = q._select_node_account_id() | ||
|
|
||
| assert selected == nodes[0] | ||
| assert q._used_node_account_id == nodes[0] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,52 @@ | ||
| import pytest | ||
| from hiero_sdk_python.transaction.transaction import Transaction | ||
| from hiero_sdk_python.account.account_id import AccountId | ||
|
|
||
|
|
||
| class DummyTransaction(Transaction): | ||
| """ | ||
| Minimal subclass of Transaction for testing. | ||
| Transaction is abstract (requires build methods), so we stub them out. | ||
| """ | ||
| def __init__(self): | ||
| super().__init__() | ||
|
|
||
| def build_base_transaction_body(self): | ||
| return None # stub | ||
|
|
||
| def _make_request(self): | ||
| return None # stub | ||
|
|
||
| def _get_method(self): | ||
| return None # stub | ||
|
|
||
|
|
||
| def test_set_single_node_account_id(): | ||
| txn = DummyTransaction() | ||
| node = AccountId(0, 0, 3) | ||
|
|
||
| txn.set_node_account_id(node) | ||
|
|
||
| assert txn.node_account_ids == [node] | ||
| assert txn._used_node_account_id is None | ||
|
|
||
|
|
||
| def test_set_multiple_node_account_ids(): | ||
| txn = DummyTransaction() | ||
| nodes = [AccountId(0, 0, 3), AccountId(0, 0, 4)] | ||
|
|
||
| txn.set_node_account_ids(nodes) | ||
|
|
||
| assert txn.node_account_ids == nodes | ||
| assert txn._used_node_account_id is None | ||
|
|
||
|
|
||
| def test_select_node_account_id(): | ||
| txn = DummyTransaction() | ||
| nodes = [AccountId(0, 0, 3), AccountId(0, 0, 4)] | ||
| txn.set_node_account_ids(nodes) | ||
|
|
||
| selected = txn._select_node_account_id() | ||
|
|
||
| assert selected == nodes[0] | ||
| assert txn._used_node_account_id == nodes[0] |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.