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 gas spent API #1225

Open
HDauven opened this issue Dec 22, 2023 · 0 comments
Open

Add gas spent API #1225

HDauven opened this issue Dec 22, 2023 · 0 comments
Labels
module:rusk Issues related to rusk module need:brainstorm Call for participation: group brainstorming is requested to fix this issue type:feature implementing a new feature

Comments

@HDauven
Copy link
Member

HDauven commented Dec 22, 2023

Summary

Implement an API to estimate the gas limit required for executing a smart contract. It will provide the gas spent for a given call, to efficiently set a limit.

Possible solution design or implementation

To calculate the gas spent for a given call, query_raw can be called through Rusk. By providing a contract_id, fn_name and fn_arg, a non-persistent execution by the VM can be done.

This execution will return a receipt with the gas spent, which the API should return.

@HDauven HDauven added type:feature implementing a new feature module:rusk Issues related to rusk module area:rusk-node labels Dec 22, 2023
@HDauven HDauven self-assigned this Dec 22, 2023
@HDauven HDauven removed their assignment Apr 3, 2024
@HDauven HDauven added need:brainstorm Call for participation: group brainstorming is requested to fix this issue and removed area:rusk-node labels Apr 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module:rusk Issues related to rusk module need:brainstorm Call for participation: group brainstorming is requested to fix this issue type:feature implementing a new feature
Projects
None yet
Development

No branches or pull requests

1 participant