# kool-freelog

> get your logs from Infura!

Latest version **0.1.3** (published 2019-09-13) · MIT license · 0 weekly downloads

## Install

```sh
npm install kool-freelog
pnpm add kool-freelog
yarn add kool-freelog
bun add kool-freelog
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.3 |
| Published | 2019-09-13 |
| First published | 2019-04-24 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Unpacked size | 419.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Anonymous |
| Maintainers | raymondpulver |
| Keywords | free, log, infura, ethereum |

## Links

- npm: https://www.npmjs.com/package/kool-freelog
- npm.io page: https://npm.io/package/kool-freelog

## Dependencies (4)

- [rxjs](https://npm.io/package/rxjs.md) ^6.5.3
- [promiseq](https://npm.io/package/promiseq.md) ^1.1.0
- [websocket](https://npm.io/package/websocket.md) ^1.0.28
- [web3-utils](https://npm.io/package/web3-utils.md) ^1.2.1

## Alternatives

- [cli-color](https://npm.io/package/cli-color.md) — 3.4M weekly downloads
- [log](https://npm.io/package/log.md) — 1.3M weekly downloads
- [logstash-client](https://npm.io/package/logstash-client.md) — 4.5K weekly downloads
- [@nocobase/plugin-logger](https://npm.io/package/@nocobase/plugin-logger.md) — 2.0K weekly downloads
- [child-process-debug](https://npm.io/package/child-process-debug.md) — 695 weekly downloads

## Recent versions

- 0.1.3 (latest) — 2019-09-13
- 0.1.2 — 2019-05-01
- 0.1.1 — 2019-04-24
- 0.1.0 — 2019-04-24

## README

# kool-freelog

This is a module intended to get a set of EVM logs from the blockchain, designed to work with a stubborn RPC such as Infura. In fact, the module defaults to using Infura, and allows you to use your own W3C WebSocket class or Promise implementation.

In addition to the standard log query, you can add a `chunkSize` field to determine how many blocks you want to fetch at a time. Smaller chunk sizes are slower but more reliable to get your logs fo' free.

## NodeJS Usage

```js

const { w3cwebsocket: WebSocket } = require('websocket');
const generateFreeLog = require('kool-freelog');
const freeLog = generateFreeLog(WebSocket, Promise, 'mainnet');
const { soliditySha3 } = require('web3-utils');

const logs = await freeLog({
  fromBlock: 1e6,
  toBlock: 1e6 + 1000,
  topics: [ soliditySha3('Transfer(address,address,uint256)') ],
  chunkSize: 100,
  concurrency: 5
});

/* logs contains all Transfer events for all ERC20 tokens */

```

---
_Source: https://npm.io/package/kool-freelog · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
