Skip to content
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

Add a query to estimate the gas of a contract call #2670

Open
SimiHunjan opened this issue Nov 26, 2024 · 1 comment · May be fixed by #2723
Open

Add a query to estimate the gas of a contract call #2670

SimiHunjan opened this issue Nov 26, 2024 · 1 comment · May be fixed by #2723
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@SimiHunjan
Copy link
Contributor

SimiHunjan commented Nov 26, 2024

Description

Hedera's EVM equivalence enables developers to deploy and execute smart contracts using standard EVM-compatible tools. Additionally, the Hedera SDK allows the execution of smart contract transactions (state-changing and query-based) via protobuf messages submitted to Consensus Nodes.

However, unlike typical EVM flows where transactions are encoded with RLP and submitted to a JSON-RPC endpoint, Hedera’s SDK can introduce friction for developers transitioning from other ecosystems.

Problem

Today, the SDK does not support a way to determine the gas of a contract call.

EVM developers, accustomed to estimating gas requirements as part of their workflow, face challenges using the SDK. Specifically:

  • The ContractCall transaction type allows setting a gas limit but does not support gas estimation.
  • This absence of gas estimation is a core gap, making the SDK less developer-friendly for those familiar with Ethereum-like environments.

Solution

Add a query that estimates the gas for a contract call.

  1. Add a new query type
  2. Add getGasCost Support to ContractCall

Alternatives

No response

@SimiHunjan SimiHunjan added the enhancement New feature or request label Nov 26, 2024
@SimiHunjan
Copy link
Contributor Author

Did we finalize on the naming convention for this feature?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants