We are reaching an out-of-gas error in one of our Ink contracts and are interested to investigate the gas used throughout the execution. Is there a way to query for the gas consumed throughout the execution of a contract or for a specific method?
1 Answer
I am not aware of some gas used function, but I would suggest using ink_env::gas_left
function to see how much gas is left in between the calls and then analyze.