diff --git a/benchmark/__tests__/test-deploy-contract.ava.js b/benchmark/__tests__/test-deploy-contract.ava.js index cbbafffc2..7f4d89e81 100644 --- a/benchmark/__tests__/test-deploy-contract.ava.js +++ b/benchmark/__tests__/test-deploy-contract.ava.js @@ -78,7 +78,8 @@ test("JS promise batch deploy contract and call", async (t) => { ); t.log( "Gas used to refund unused gas: ", - formatGas(r.result.receipts_outcome[3].outcome.gas_burnt) + // TODO: fix after near-workspaces is updated + formatGas(r.result.receipts_outcome[3]?.outcome.gas_burnt || 0) ); t.log( "Total gas used: ", @@ -87,7 +88,8 @@ test("JS promise batch deploy contract and call", async (t) => { r.result.receipts_outcome[0].outcome.gas_burnt + r.result.receipts_outcome[1].outcome.gas_burnt + r.result.receipts_outcome[2].outcome.gas_burnt + - r.result.receipts_outcome[3].outcome.gas_burnt + // TODO: fix after near-workspaces is updated + (r.result.receipts_outcome[3]?.outcome.gas_burnt || 0) ) ); }); @@ -129,7 +131,8 @@ test("RS promise batch deploy contract and call", async (t) => { ); t.log( "Gas used to refund unused gas: ", - formatGas(r.result.receipts_outcome[3].outcome.gas_burnt) + // TODO: fix after near-workspaces is updated + formatGas(r.result.receipts_outcome[3]?.outcome.gas_burnt || 0) ); t.log( "Total gas used: ", @@ -138,7 +141,8 @@ test("RS promise batch deploy contract and call", async (t) => { r.result.receipts_outcome[0].outcome.gas_burnt + r.result.receipts_outcome[1].outcome.gas_burnt + r.result.receipts_outcome[2].outcome.gas_burnt + - r.result.receipts_outcome[3].outcome.gas_burnt + // TODO: fix after near-workspaces is updated + (r.result.receipts_outcome[3]?.outcome.gas_burnt || 0) ) ); }); diff --git a/benchmark/__tests__/test-lowlevel-minimal.ava.js b/benchmark/__tests__/test-lowlevel-minimal.ava.js index cc169745d..3549bfa01 100644 --- a/benchmark/__tests__/test-lowlevel-minimal.ava.js +++ b/benchmark/__tests__/test-lowlevel-minimal.ava.js @@ -41,7 +41,7 @@ test("JS lowlevel minimal contract", async (t) => { test("RS lowlevel minimal contract", async (t) => { const { bob, lowlevelContractRs } = t.context.accounts; let r = await bob.callRaw(lowlevelContractRs, "empty", ""); - + t.is(r.result.status.SuccessValue, ""); logGasDetail(r, t); }); diff --git a/benchmark/__tests__/util.js b/benchmark/__tests__/util.js index c43f502c3..0a3df2a06 100644 --- a/benchmark/__tests__/util.js +++ b/benchmark/__tests__/util.js @@ -36,14 +36,16 @@ export function logGasDetail(r, t) { logGasBreakdown(map, t); t.log( "Gas used to refund unused gas: ", - formatGas(r.result.receipts_outcome[1].outcome.gas_burnt) + // TODO: fix after near-workspaces is updated + formatGas(r.result.receipts_outcome[1]?.outcome.gas_burnt || 0) ); t.log( "Total gas used: ", formatGas( r.result.transaction_outcome.outcome.gas_burnt + r.result.receipts_outcome[0].outcome.gas_burnt + - r.result.receipts_outcome[1].outcome.gas_burnt + // TODO: fix after near-workspaces is updated + (r.result.receipts_outcome[1]?.outcome.gas_burnt || 0) ) ); }