docs: fix TopicMessageSubmitTransaction custom fee limit method#653
Open
Ziliang-H wants to merge 1 commit into
Open
docs: fix TopicMessageSubmitTransaction custom fee limit method#653Ziliang-H wants to merge 1 commit into
Ziliang-H wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Updates Consensus Service “submit message” documentation to reflect custom-fee limit APIs/terminology instead of the older “max custom fees” wording.
Changes:
- Replace references to
setCustomFees/setMaxCustomFeeswithsetCustomFeeLimits(and mentionaddCustomFeeLimit). - Update Java and JS examples accordingly.
- Align “Custom Fee Payment” guidance and a related bullet to the new API names.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| ## **Custom Fee Payment** | ||
|
|
||
| If a topic has custom fees enabled, users submitting messages must pay the required fee in **HBAR or HTS fungible tokens**. If `setCustomFees` is not specified in the transaction, the user would need to pay any fee associated with that topic ID. The transaction will only fail if the user does not have sufficient assets to cover the fee. | ||
| If a topic has custom fees enabled, users submitting messages must pay the required fee in **HBAR or HTS fungible tokens**. If `setCustomFeeLimits` is not specified in the transaction, the user would need to pay any fee associated with that topic ID. The transaction will only fail if the user does not have sufficient assets to cover the fee. |
Comment on lines
+19
to
+21
| If a topic has custom fees enabled, users submitting messages must pay the required fee in **HBAR or HTS fungible tokens**. If `setCustomFeeLimits` is not specified in the transaction, the user would need to pay any fee associated with that topic ID. The transaction will only fail if the user does not have sufficient assets to cover the fee. | ||
|
|
||
| **Recommendation:** To avoid unexpected fees, it is strongly recommended to use `setCustomFees` when submitting a message. This ensures that only the intended fee structure is applied, providing a safeguard against unintended charges. | ||
| **Recommendation:** To avoid unexpected fees, it is strongly recommended to use `setCustomFeeLimits` or `addCustomFeeLimit` when submitting a message. This ensures that only the intended fee structure is applied, providing a safeguard against unintended charges. |
Comment on lines
24
to
28
| TopicMessageSubmitTransaction() | ||
| .setTopicId(<TOPIC_ID>) | ||
| .setMessage(<MESSAGE>) | ||
| .setCustomFees(<MAX_CUSTOM_FEES>) // Ensure this covers the required amount | ||
| .setCustomFeeLimits(<CUSTOM_FEE_LIMITS>) // Ensure this covers the required amount | ||
| .execute(client); |
Signed-off-by: Ziliang-H <2270669192@qq.com>
f88071d to
9545574
Compare
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
setMaxCustomFeesexamples withsetCustomFeeLimitssetCustomFeeLimits/addCustomFeeLimitFixes #104.
Verification
native/consensus/submit-message.mdxfor stalesetMaxCustomFees/setCustomFeesreferences