🆕🐥 First Timers Only
This issue is reserved for people who have never contributed to this project or any open source project in general.
We know that creating a pull request (PR) is a major barrier for new contributors.
The goal of this issue and all other issues labeled by 'good first issue' is to help you make your first contribution.
👾 Description of the issue
The interface MirrorNodeClient provides the method Optional<TransactionInfo> queryTransaction(@NonNull String transactionId). The implementation of the method in MirrorNodeClientImpl calls the Mirror Node REST API but do not use the result of that call. Instead, only a record containing the transactionId as String is returned (see TransactionInfo).
When doing a call against the REST API way more information about a transaction are returned as you can see in the following sample
Query:
curl -X 'GET' \
'https://testnet.mirrornode.hedera.com/api/v1/transactions/0.0.4457569-1724503621-738000000?nonce=0' \
-H 'accept: application/json'
Result:
{
"transactions": [
{
"bytes": null,
"charged_tx_fee": 66529172,
"consensus_timestamp": "1724503632.496534574",
"entity_id": "0.0.4738897",
"max_fee": "1000000000",
"memo_base64": "",
"name": "TOKENMINT",
"nft_transfers": [
{
"is_approval": false,
"receiver_account_id": "0.0.4457569",
"sender_account_id": null,
"serial_number": 1,
"token_id": "0.0.4738897"
},
{
"is_approval": false,
"receiver_account_id": "0.0.4457569",
"sender_account_id": null,
"serial_number": 2,
"token_id": "0.0.4738897"
}
],
"node": "0.0.7",
"nonce": 0,
"parent_consensus_timestamp": null,
"result": "SUCCESS",
"scheduled": false,
"staking_reward_transfers": [],
"token_transfers": [],
"transaction_hash": "VwgHwtzwU23H2mNaX0hl9lo1ZZQ+6VqGOrzqIzfz6D2KHUHgmGfzmTwStFAS2eza",
"transaction_id": "0.0.4457569-1724503621-738000000",
"transfers": [
{
"account": "0.0.7",
"amount": 13305834,
"is_approval": false
},
{
"account": "0.0.98",
"amount": 47901005,
"is_approval": false
},
{
"account": "0.0.800",
"amount": 5322333,
"is_approval": false
},
{
"account": "0.0.4457569",
"amount": -66529172,
"is_approval": false
}
],
"valid_duration_seconds": "120",
"valid_start_timestamp": "1724503621.738000000"
}
]
}
The additional information should be added to the TransactionInfo record.
Suggestion for solving the issue
In the MirrorNodeClientImpl class you can already find several samples on how a JSON response of a REST call is parsed and transfered in a custom method return type. The same should be done in the Optional<TransactionInfo> queryTransaction(@NonNull String transactionId) method and TransactionInfo should become a rich object that is based on all the information coming from JSON.
Additional information
Information about the rest api of the mirror node can be found here. The API can be accessed by Swagger UI. The Swagger UI frontend for testnet can be found here.
📋 Step by step guide to do a contribution
If you have never contributed to an open source project at GitHub, the following step-by-step guide will introduce you to the workflow.
A more detailed general documentation of the GitHub PR workflow can be found here.
🎉 Contribute to Hacktoberfest
Solve this issue as part of the Hacktoberfest event and get a chance to receive cool goodies like a T-Shirt. 🎽
🤔 Additional informantion
If you have any questions, just ask us directly in this issue by adding a comment. You can join the Hedera community chat at Discord. A general manual about open-source contributions can be found here.
🆕🐥 First Timers Only
This issue is reserved for people who have never contributed to this project or any open source project in general.
We know that creating a pull request (PR) is a major barrier for new contributors.
The goal of this issue and all other issues labeled by 'good first issue' is to help you make your first contribution.
👾 Description of the issue
The interface
MirrorNodeClientprovides the methodOptional<TransactionInfo> queryTransaction(@NonNull String transactionId). The implementation of the method inMirrorNodeClientImplcalls the Mirror Node REST API but do not use the result of that call. Instead, only a record containing thetransactionIdasStringis returned (seeTransactionInfo).When doing a call against the REST API way more information about a transaction are returned as you can see in the following sample
Query:
Result:
The additional information should be added to the
TransactionInforecord.Suggestion for solving the issue
In the
MirrorNodeClientImplclass you can already find several samples on how a JSON response of a REST call is parsed and transfered in a custom method return type. The same should be done in theOptional<TransactionInfo> queryTransaction(@NonNull String transactionId)method andTransactionInfoshould become a rich object that is based on all the information coming from JSON.Additional information
Information about the rest api of the mirror node can be found here. The API can be accessed by Swagger UI. The Swagger UI frontend for testnet can be found here.
📋 Step by step guide to do a contribution
If you have never contributed to an open source project at GitHub, the following step-by-step guide will introduce you to the workflow.
A more detailed general documentation of the GitHub PR workflow can be found here.
🎉 Contribute to Hacktoberfest
Solve this issue as part of the Hacktoberfest event and get a chance to receive cool goodies like a T-Shirt. 🎽
🤔 Additional informantion
If you have any questions, just ask us directly in this issue by adding a comment. You can join the Hedera community chat at Discord. A general manual about open-source contributions can be found here.