open-index/open-npm huggingface dataset:
npm package: @karfol5/randomid-generator
Description: A simple function for generating random alphanumeric IDs of any length. Useful for temporary identifiers, keys, and more.
Latest version: 1.0.1

# @karfol5/randomid-generator

A simple function for generating random alphanumeric IDs of any length. Useful for temporary identifiers, keys, and more.

## 📦 Installation

```bash
npm install @karfol5/randomid-generator
```

## 🔧 Usage

const randomID = require('@karfol5/randomid-generator');

const id = randomID(10);
console.log(id); // 'aK8d9ZxP2m'
npm package: @kargakis/ethers-multicall
Description: Make multiple Ethereum network requests in a single HTTP query. multicall for ethers v5.
Author: Michalis Kargakis
Latest version: 0.6.0

# ethers-multicall

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

## Build

```
yarn
yarn build
```

## Test

```
yarn test
```

## Publish

Set your NPM auth token in `.npmrc`, then run:
```
npm publish
```

## 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();
```