Skip to content

Conversation

@miiu96
Copy link
Contributor

@miiu96 miiu96 commented Jul 29, 2025

Description of the pull request (what is new / what has changed)

Did you test the changes locally ?

  • yes
  • no

Which category (categories) does this pull request belong to?

  • document new feature
  • update documentation that is not relevant anymore
  • add examples or more information about a component
  • fix grammar issues
  • other

schimih
schimih previously approved these changes Jul 29, 2025
schimih
schimih previously approved these changes Jul 29, 2025

This comment was marked as outdated.

@miiu96 miiu96 changed the base branch from main to development July 29, 2025 11:02
@miiu96 miiu96 dismissed schimih’s stale review July 29, 2025 11:02

The base branch was changed.

@andreibancioiu andreibancioiu requested a review from Copilot July 29, 2025 11:10
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR enhances the documentation for the /transaction/cost REST API endpoint by providing comprehensive explanations of how gas estimation works. The changes add detailed context about the endpoint's functionality, smart contract interactions, and best practices for usage.

Key changes:

  • Expanded explanation of how the gas estimation endpoint works including simulation details
  • Added detailed FAQ-style sections covering smart contracts, variable gas usage, nonce requirements, and potential estimation differences
  • Updated parameter requirements (nonce is now required) and added options parameter

:::tip
This endpoint returns the cost on the transaction in **gas units**. The returned value can be used to fill in **gasLimit** field of the transaction.
- Use the returned `txGasUnits` value as the `gasLimit` in your actual transaction.
- Make sure to provide the correct `nonce` of transaction
Copy link

Copilot AI Jul 29, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Grammar error: should be "Make sure to provide the correct nonce of the transaction" (missing article 'the').

Suggested change
- Make sure to provide the correct `nonce` of transaction
- Make sure to provide the correct `nonce` of the transaction

Copilot uses AI. Check for mistakes.
:::

:::tip
`Best practice:` when sending the transaction, add ~10% extra gas to the estimated value to avoid underestimation and failure due to insufficient gas.
Copy link

Copilot AI Jul 29, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] The markdown formatting for 'Best practice:' is inconsistent with typical documentation patterns. Consider using Best practice: instead of backticks for better visual consistency.

Suggested change
`Best practice:` when sending the transaction, add ~10% extra gas to the estimated value to avoid underestimation and failure due to insufficient gas.
**Best practice:** when sending the transaction, add ~10% extra gas to the estimated value to avoid underestimation and failure due to insufficient gas.

Copilot uses AI. Check for mistakes.
andreibancioiu
andreibancioiu previously approved these changes Jul 29, 2025
@raduchis raduchis merged commit 89a6c0c into development Jul 29, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants