near/sdk: remove near util @ gusc1a-ossdev-jsl5
This commit is contained in:
parent
0cca6c7659
commit
dd63311d56
|
@ -3,4 +3,4 @@ export * from "./createNonce";
|
|||
export * from "./parseVaa";
|
||||
export * from "./array";
|
||||
export * from "./bigint";
|
||||
export * from "./near";
|
||||
|
||||
|
|
|
@ -1,26 +0,0 @@
|
|||
import nearAPI from "near-api-js";
|
||||
|
||||
export function logNearGas(result: any, comment: string) {
|
||||
const { totalGasBurned, totalTokensBurned } = result.receipts_outcome.reduce(
|
||||
(acc: any, receipt: any) => {
|
||||
acc.totalGasBurned += receipt.outcome.gas_burnt;
|
||||
acc.totalTokensBurned += nearAPI.utils.format.formatNearAmount(
|
||||
receipt.outcome.tokens_burnt
|
||||
);
|
||||
return acc;
|
||||
},
|
||||
{
|
||||
totalGasBurned: result.transaction_outcome.outcome.gas_burnt,
|
||||
totalTokensBurned: nearAPI.utils.format.formatNearAmount(
|
||||
result.transaction_outcome.outcome.tokens_burnt
|
||||
),
|
||||
}
|
||||
);
|
||||
console.log(
|
||||
comment,
|
||||
"totalGasBurned",
|
||||
totalGasBurned,
|
||||
"totalTokensBurned",
|
||||
totalTokensBurned
|
||||
);
|
||||
}
|
Loading…
Reference in New Issue