near / near-workspaces-js

Write tests once, run them both on NEAR TestNet and a controlled NEAR Sandbox local environment
https://near.github.io/near-workspaces-js/
GNU General Public License v3.0
42 stars 22 forks source link

Incorrect gas burnt from transaction result #212

Open BenKurrek opened 11 months ago

BenKurrek commented 11 months ago

When I take the gas_burnt from the TransactionResult, the value is not correct:

let rawValue = await signer.callRaw(receiver, methodName, args, {gas: gasToAttach, attachedDeposit: attachedDeposit || "0"});
let gasBurnt = rawValue.gas_burnt;
console.log(`Gas Burnt: ${gasBurnt.toHuman()}`)

If you loop through all the receipts in the rawValue and tally their gas_burnt, it will exceed what was returned from the transaction result object.

Example:

image