open-index/open-npm huggingface dataset:
npm package: @iotes/lifecycle-history
Description: A iotes lifecycle hook that allows loading device history from an external source
Author: Seamus Foley
Latest version: 0.0.2

# Setting up this template

- Change package name in package.json
- Change the git repo path in package.json (Not doing this will cause github packages release to fail)
- Change the function name in index

# `iotes/strategy-xxx`

> TODO: description

## Usage

```
import strategy from '@iotes/strategy-xxx'

// TODO: DEMONSTRATE USAGE
```

## How to create a strategy 

Documentation on how to create a strategy is [avaliable here](https://iotes.dev/docs/advanced/strategies)
npm package: @iotes/middleware-debounce
Description: An Iotes middleware to bebounce messages to subscribers
Author: Seamus Foley
Latest version: 0.0.3

# Setting up this template

# `iotes/middleware-debounce`

> TODO: description

## Usage

```
import strategy from '@iotes/middleware-debounce'

// TODO: DEMONSTRATE USAGE
```

## How to create a strategy 

Documentation on how to create a strategy is [avaliable here](https://iotes.dev/docs/advanced/strategies)
npm package: @iotes/middleware-direction
Description: A middleware for filtering iotes messages by direction
Author: Seamus Foley
Latest version: 0.0.6

# Setting up this template

- Change package name in package.json
- Change the git repo path in package.json (Not doing this will cause github packages release to fail)
- Change the function name in index

# `iotes/strategy-xxx`

> TODO: description

## Usage

```
import strategy from '@iotes/strategy-xxx'

// TODO: DEMONSTRATE USAGE
```

## How to create a strategy 

Documentation on how to create a strategy is [avaliable here](https://iotes.dev/docs/advanced/strategies)
npm package: @iotes/redux-hooks
Description: The iotes plugin that runs host messages through redux and device messages using hooks
Author: Seamus Foley
Latest version: 0.0.2

## Introduction

This Plugin intergrates iotes with redux projects. This is the recommended plugin to use for redux based projects for most cases as opposed to react-redux.

In this plugin the host updates get dispatched through the redux dispatch system while the device data comes from a useIotesDevice hook. This means you can handle big events like connection and disconnection of devices through the redux store without causing an excessive amount of actions to come through on the redux store

## Usage

```typescript
    // Create iotes plugin
    const { useIotesDevice, iotesHostMiddleware, subscribeToHost } = createIotesReactReduxHook(topology, strategy)
    // create store applying middleware
    const store = createStore(genericReducer, applyMiddleware(iotesHostMiddleware))
    // inject the store dispatcher in order to subscribe to iotes host
    subscribeToHost(store.dispatch)  

```
npm package: @iotes/strategy-phidget
Description: A iotes strategies for phiget devices
Author: Seamus Foley
Latest version: 0.0.10

# `iotes/strategy-xxx`

> TODO: description

## Usage

```
import strategy from '@iotes/strategy-xxx'

// TODO: DEMONSTRATE USAGE
```

## How to create a strategy 

Documentation on how to create a strategy is [avaliable here](https://iotes.dev/docs/advanced/strategies)
npm package: @iotes/strategy-test
Description: A strategy for testing iotes
Author: Seamus Foley
Latest version: 0.0.8

# Setting up this template

# `iotes/strategy-test`

> TODO: description

## Usage

```
import strategy from '@iotes/strategy-xxx'

// TODO: DEMONSTRATE USAGE
```

## How to create a strategy 

Documentation on how to create a strategy is [avaliable here](https://iotes.dev/docs/advanced/strategies)
npm package: @iotexproject/ethers-multicall
Description: Make multiple Ethereum network requests in a single HTTP query. ethcall for ethers v5.
Author: Cavan Flynn
Latest version: 0.1.6

# ethers-multicall

Make multiple Ethereum network requests in a single HTTP query. [ethcall](https://github.com/Destiner/ethcall) for ethers v5.

## API

* `Contract(address, abi)`: Create contract instance; calling `contract.callFuncName` will yield a `call` object
* `all(calls)`: Execute all calls in a single request
* `calls`: List of helper call methods
* `getEthBalance(address)`: Returns account ether balance

## Example

```ts
import { Contract, Provider } from 'ethers-multicall';
import { ethers } from 'ethers';

import erc20Abi from './abi/erc20.json';

const infuraKey = 'INSERT_YOUR_KEY_HERE';
const provider = new ethers.providers.InfuraProvider('mainnet', infuraKey);

const daiAddress = '0x6b175474e89094c44da98b954eedeac495271d0f';

async function call() {
  const ethcallProvider = new Provider(provider);

  await ethcallProvider.init(); // Only required when `chainId` is not provided in the `Provider` constructor

  const daiContract = new Contract(daiAddress, erc20Abi);

  const uniswapDaiPool = '0x2a1530c4c41db0b0b2bb646cb5eb1a67b7158667';

  const ethBalanceCall = ethcallProvider.getEthBalance(uniswapDaiPool);
  const daiBalanceCall = daiContract.balanceOf(uniswapDaiPool);

  const [ethBalance, daiBalance] = await ethcallProvider.all([ethBalanceCall, daiBalanceCall]);

  console.log('ETH Balance:', ethBalance.toString());
  console.log('DAI Balance:', daiBalance.toString());
}

call();
```