-
Notifications
You must be signed in to change notification settings - Fork 77
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
feat: track hbar expenses for submit tx #2705
Conversation
Signed-off-by: georgi-l95 <glazarov95@gmail.com>
Signed-off-by: georgi-l95 <glazarov95@gmail.com>
Signed-off-by: georgi-l95 <glazarov95@gmail.com>
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.
LG, but can we add tests?
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.
Some suggestions
} | ||
const transactionRecord = await new TransactionRecordQuery() | ||
.setTransactionId(resp.transactionId!) | ||
.setValidateReceiptStatus(false) |
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.
Missing the nodeIds selection.
Was this intentionally left out?
I believe the optimization allows for you to get it from the node you submitted to for shorter latency.
if (shouldLimit) { | ||
throw predefined.HBAR_RATE_LIMIT_EXCEEDED; | ||
} | ||
const transactionRecord = await new TransactionRecordQuery() |
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.
Use executeQuery() as it will handle metric and hbar rate limit
Signed-off-by: georgi-l95 <glazarov95@gmail.com>
Signed-off-by: georgi-l95 <glazarov95@gmail.com>
|
Replaced by #2714 |
Description:
This PR modifies submit transaction logic to account for hbar expenses. Previously we didn't track operator expenses for ethereum transactions. This PR is using executeGetTransactionRecord method, which takes the record and deduct the cost from the budget.
Related issue(s):
Fixes #2703
Notes for reviewer:
Checklist