open-index/open-npm huggingface dataset:
npm package: @sebasgoldberg/hardhat-aave
Description: Hardhat plugin to use existing contract instances.
Author: Sebastian Goldberg
Latest version: 0.0.9

# hardhat-aave-plugin

This plug-in it is used to encapsulate operations with the AAVE protocol.

[Hardhat](https://hardhat.org) AAVE plugin. 

## What

This plugin will help you with:
- The AAVE contract interaction, suppling type information based in constracts abis.
- Simplified interaction with the protocol for all supported networks using hardhat-network-alias.

## Installation

```bash
npm install @sebasgoldberg/hardhat-aave
```

Import the plugin in your `hardhat.config.js`:

```js
require("@sebasgoldberg/hardhat-aave");
```

Or if you are using TypeScript, in your `hardhat.config.ts`:

```ts
import "@sebasgoldberg/hardhat-aave";
```

## Tasks

There are no tasks for this plugin.

## Environment extensions

This plugin extends the Hardhat Runtime Environment by adding an `aave` field
whose type is `AAVE`.

Here is a simple usage example to get the AAVE Pool contract for the selected network:

``` typescript
// ...
const pool = await this.hre.aave.getPool()
// ...
```

Note that `pool` has the type `Pool` generated using [typechains](https://github.com/dethcrypto/TypeChain).

## Configuration

### Network Aliases

You must configure the `hre.config.networkAliases` key, adding the "aave-plugin" group, 
and for this group especify for each of your project networks, wich of the 
hardhat-aave-plugin predifined networks should be mapped.

This is necessary to know wich AAVE's contract addresses should be used for each one of
your hardhat project networks.

Here is an example of the configuration:

``` typescript
import { AVALANCHE_MAINNET_NETWORK } from "@sebasgoldberg/hardhat-aave";
// ...

const config: HardhatUserConfig = {
  //...
  networkAliases: {
    "aave-plugin": {
      'localhost': AVALANCHE_MAINNET_NETWORK,
      'mainnet': AVALANCHE_MAINNET_NETWORK,
    }
  },
  //...
};
// ...
```

In the example above we are telling that 'mainnet' and 'localhost' networks
configured in the hardhat project, should use the Avalanche Mainnet contract addresses.

### Custom Network and Address Redefinitions

In case you need to redefine a contract address for a specific network, you can do this
using the `hre.config.aave.contractAddressByNetwork`.

You can also define addresses for your own network using the `CUSTOM_NETWORK` key.

Here is an example (including networkAliases):

``` typescript
import { AVALANCHE_MAINNET_NETWORK, CUSTOM_NETWORK } from "@sebasgoldberg/hardhat-aave";
// ...

const config: HardhatUserConfig = {
  //...
  aave: {
    contractAddressByNetwork: {
      [AVALANCHE_MAINNET_NETWORK]: {
        PoolAddressesProvider: '0x0123456789012345678901234567890123456789'
      },
      [CUSTOM_NETWORK]: {
        PoolAddressesProvider: '0xABCDEFABCDEFABCDEFABCDEFABCDEFABCDEFABCD'
      }
    },
  },
  //...
  networkAliases: {
    "aave-plugin": {
      'hardhat': CUSTOM_NETWORK
      'localhost': AVALANCHE_MAINNET_NETWORK,
      'mainnet': AVALANCHE_MAINNET_NETWORK,
    }
  },
  //...
};
// ...
```
npm package: @sebasgoldberg/hardhat-events-cache
Description: Hardhat plugin to save queryed events to a mongo database.
Author: Sebastian Goldberg
Latest version: 0.0.5

# hardhat-events-cache

This plug-in it is used to add an events cache to hardhat.

[Hardhat](https://hardhat.org) events cache plugin. 

## What

This plugin will help you with:
- If you query events and you want to cache this results.

## Installation

```bash
npm install @sebasgoldberg/hardhat-events-cache
```

Import the plugin in your `hardhat.config.js`:

```js
require("@sebasgoldberg/hardhat-events-cache");
```

Or if you are using TypeScript, in your `hardhat.config.ts`:

```ts
import "@sebasgoldberg/hardhat-events-cache";
```

## Environment extensions

This plugin extends the Hardhat Runtime Environment by adding an `eventsCache` field.

This `eventsCache` field has a `query` and `save` methods.

`query` it is used to query the cached events.

`save` it is used to save events to cache.

## Configuration

This plugin does not define own configuration, but uses [@sebasgoldberg/hardhat-mongodb](https://github.com/sebasgoldberg/hardhat-mongodb) plugin to obtain a mongodb db instance.
npm package: @sebasgoldberg/hardhat-mongodb
Description: Hardhat plugin to use existing contract instances.
Author: Sebastian Goldberg
Latest version: 0.0.4

# hardhat-mongodb

This plug-in it is used to add a mongodb db instance to the hardhat runtime environment.

[Hardhat](https://hardhat.org) mongodb plugin. 

## What

This plugin will help you with the usage of a mongodb database in your hardhat's projects.

## Installation

```bash
npm install @sebasgoldberg/hardhat-mongodb
```

Import the plugin in your `hardhat.config.js`:

```js
require("@sebasgoldberg/hardhat-mongodb");
```

Or if you are using TypeScript, in your `hardhat.config.ts`:

```ts
import "@sebasgoldberg/hardhat-mongodb";
```

## Environment extensions

This plugin extends the Hardhat Runtime Environment by adding a `mongodb` field.

Here is an example to get the mongodb db:

``` typescript
// ...
const db = await this.hre.mongodb.getDb()
// ...
```

## Configuration

Here is the optional configuration of this plugin:

``` typescript
const config: HardhatUserConfig = {
    // ...
    mongodb: {
        dbConnectionString: 'mongodb://localhost:27017',
        dbName: 'hardhat'
    }
    // ...
}
```

The example above, shows the default configuration values.
npm package: @sebasgoldberg/hardhat-network-alias
Description: Hardhat plugin to use existing contract instances.
Author: Sebastian Goldberg
Latest version: 0.0.3

# hardhat-network-alias

This plug-in it is used to add network aliases, organizing the aliases by group.

[Hardhat](https://hardhat.org) network alias plugin. 

## What

This plugin will help you with:
- I you want the configuration of one network to be applied in another network.

## Installation

```bash
npm install @sebasgoldberg/hardhat-network-alias
```

Import the plugin in your `hardhat.config.js`:

```js
require("@sebasgoldberg/hardhat-network-alias");
```

Or if you are using TypeScript, in your `hardhat.config.ts`:

```ts
import "@sebasgoldberg/hardhat-network-alias";
```

## Environment extensions

This plugin extends the Hardhat Runtime Environment by adding an `networkAlias` field.

Here is an example to get the network name, considering the alias config.

``` typescript
// ...
this.hre.networkAlias.getNetworkName("aave")
// ...
```

For the configuration defined below, if it is runnning the `'hardhat'`, will be obtained the `'mainnet'` network.

Please checkout the tests for further details.


## Configuration

In the following example it is configured the `'aave'` group.

For the `'aave'` group `'localhost'` and `'hardhat'` will be considered as `'mainnet'` network.

``` typescript
const config: HardhatUserConfig = {
  // ...
  networkAliases: {
    'aave': {
      'localhost': 'mainnet',
      'hardhat': 'mainnet'
    }
  }
  // ...
}
```
npm package: @sebasgoldberg/hardhat-wsprovider
Description: Hardhat plugin to enable web socket provider.
Author: Sebastian Goldberg
Latest version: 0.1.1

# hardhat-wsprovider

This plug-in it is used to add `getProvider` function, that supports web socket providers, to hre.

[Hardhat](https://hardhat.org) web socket provider plugin. 

## What

This plugin will help you with:
- If you want to use web socket providers.
- If you want to use http socket provider with different polling interval.

## Installation

```bash
npm install @sebasgoldberg/hardhat-wsprovider
```

Import the plugin in your `hardhat.config.js`:

```js
require("@sebasgoldberg/hardhat-wsprovider");
```

Or if you are using TypeScript, in your `hardhat.config.ts`:

```ts
import "@sebasgoldberg/hardhat-wsprovider";
```

## Environment extensions

This plugin extends the Hardhat Runtime Environment by adding an `getProvider` function.

Here is an example to get the configured provider in hardhat network config (supports web sockets!).

``` typescript
// ...
const p: JsonRpcProvider = this.hre.getProvider()
// ...
```

In case it is used a network configured without web socket protocol, `getProvider()` returns `hre.ethers.provider` (if not configured `pollingInterval`), so it is safe to use always `getProvider()`.

## Configuration

This plug in adds `pollingInterval` to the hardhat http network (user) configuration.

In case it is defined `pollingInterval` for an http(s) url, `getProvider()` do not returns `hre.ethers.provider`, instead it returns a `JsonRpcProvider` configured with the specified `pollingInterval`.
npm package: @sebastbake/add-history-listener
Description: Subscribe to browser history.
Latest version: 2.0.0
Deprecated: deprecated in favour of @issimo/add-history-listener

This package provides a simple api to subscribe to browser history events. It's the window.

[![size](https://img.shields.io/bundlephobia/minzip/@sebastbake/add-history-listener)](https://bundlephobia.com/result?p=@sebastbake/add-history-listener)
[![downloads](https://img.shields.io/npm/dw/@sebastbake/add-history-listener)](https://www.npmjs.com/package/@sebastbake/add-history-listener)
[![npm](https://img.shields.io/npm/v/@sebastbake/add-history-listener)](https://www.npmjs.com/package/@sebastbake/add-history-listener)
[![GitHub](https://img.shields.io/github/license/sebastbake/add-history-listener)](https://github.com/SebastBake/add-history-listener)

# add-history-listener

This package provides a simple API to subscribe to browser history events.

```ts
const cleanup = addHistoryListener((prev, next) => {
  console.log(next);
});

history.replaceState(42, undefined, "/somewhere#over-the-rainbow");
// Prints { state: 42, pathname: "/somewhere", hash: "#over-the-rainbow", ...other useful things}
```
npm package: @sebastbake/await-timeout
Description: It's setTimout but you can await it.
Latest version: 1.0.4

It's setTimout but you can await it.

[![size](https://img.shields.io/bundlephobia/minzip/@sebastbake/await-timeout)](https://bundlephobia.com/result?p=@sebastbake/await-timeout)
[![downloads](https://img.shields.io/npm/dw/@sebastbake/await-timeout)](https://www.npmjs.com/package/@sebastbake/await-timeout)
[![npm](https://img.shields.io/npm/v/@sebastbake/await-timeout)](https://www.npmjs.com/package/@sebastbake/await-timeout)
[![GitHub](https://img.shields.io/github/license/sebastbake/await-timeout)](https://github.com/SebastBake/await-timeout)

# await-timeout

It's literally just this:

```ts
export default function Timeout(ms: number): Promise<void> {
  return new Promise((resolve) => setTimeout(() => resolve(), ms));
}
```
npm package: @sebastbake/deep-state
Description: A simple state store. Performs a deep comparison before calling the callbacks.
Latest version: 1.0.2
Deprecated: Deprecated in favour of @issimo/deep-state

# Deprecated in favour of [issimoteam/deep-state](https://github.com/issimoteam/deep-state)

A simple state store. Performs a deep comparison before calling the callbacks.

[![size](https://img.shields.io/bundlephobia/minzip/@sebastbake/deep-state)](https://bundlephobia.com/result?p=@sebastbake/deep-state)
[![downloads](https://img.shields.io/npm/dw/@sebastbake/deep-state)](https://www.npmjs.com/package/@sebastbake/deep-state)
[![npm](https://img.shields.io/npm/v/@sebastbake/deep-state)](https://www.npmjs.com/package/@sebastbake/deep-state)
[![GitHub](https://img.shields.io/github/license/sebastbake/deep-state)](https://github.com/SebastBake/deep-state)

```ts
const state = State();

const cleanup = state.subscribe((prev, next) => {
  // stuff
});

state.value = { foo: "bar" }; // trigger callback
state.value = { foo: "bar" }; // nothing
```
npm package: @sebastbake/h
Description: An alternative implementation of the excellent hyperscript library. Makes use of typescript 4.1 template literal types to infer element types.
Author: Sebastian Baker
Latest version: 1.1.0

# h

[![size](https://img.shields.io/bundlephobia/minzip/@sebastbake/h)](https://bundlephobia.com/result?p=@sebastbake/h@1.0.1)
[![downloads](https://img.shields.io/npm/dw/@sebastbake/h)](https://www.npmjs.com/package/@sebastbake/h)
[![npm](https://img.shields.io/npm/v/@sebastbake/h)](https://www.npmjs.com/package/@sebastbake/h)
[![GitHub](https://img.shields.io/github/license/sebastbake/h)](https://github.com/SebastBake/h)

An alternative implementation of the excellent [hyperscript](https://github.com/hyperhype/hyperscript) library. Makes use of [typescript 4.1
template literal types](https://devblogs.microsoft.com/typescript/announcing-typescript-4-1-beta/#template-literal-types) to infer element types.

- [x] Supports SVG elements.

```ts
const element = h("div#someId", { onclick: handleClick }, [
  h("p.someClass", "Hello"),
  h("p.someClass", "World"),
]);

// Type inferred using typescript 4.1 beta template literals
type MyElement = typeof element; // HTMLDivElement
```
npm package: @sebastbake/pleb-component
Description: A web component library for plebians.
Author: Sebastian Baker
Latest version: 0.0.6

# pleb-component

[![size](https://img.shields.io/bundlephobia/minzip/@sebastbake/pleb-component)](https://bundlephobia.com/result?p=@sebastbake/pleb-component)
[![downloads](https://img.shields.io/npm/dw/@sebastbake/pleb-component)](https://www.npmjs.com/package/@sebastbake/pleb-component)
[![npm](https://img.shields.io/npm/v/@sebastbake/pleb-component)](https://www.npmjs.com/package/@sebastbake/pleb-component)
[![GitHub](https://img.shields.io/github/license/sebastbake/pleb-component)](https://github.com/SebastBake/pleb-component)

A web component library for plebians.