UNPKG

viem

Version:

TypeScript Interface for Ethereum

17 lines 656 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.formatLog = formatLog; function formatLog(log, { args, eventName, } = {}) { return { ...log, blockHash: log.blockHash ? log.blockHash : null, blockNumber: log.blockNumber ? BigInt(log.blockNumber) : null, logIndex: log.logIndex ? Number(log.logIndex) : null, transactionHash: log.transactionHash ? log.transactionHash : null, transactionIndex: log.transactionIndex ? Number(log.transactionIndex) : null, ...(eventName ? { args, eventName } : {}), }; } //# sourceMappingURL=log.js.map