Add gas spent API #1225
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
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
andfn_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.
The text was updated successfully, but these errors were encountered: