open-index/open-npm huggingface dataset:
npm package: @nethermindeth/discv5
Description: Discovery V5
Author: ChainSafe Systems
Latest version: 9.0.0-backport-306-v4

# discv5

![ES Version](https://img.shields.io/badge/ES-2020-yellow)
![Node Version](https://img.shields.io/badge/node-18.x-green)

A TypeScript implementation of the [DiscV5](https://github.com/ethereum/devp2p/blob/master/discv5/discv5.md) protocol

## Libp2p compatibility

![Peer Discovery Compatible](https://github.com/libp2p/js-libp2p-interfaces/raw/master/src/peer-discovery/img/badge.png)

Included is a libp2p peer-discovery compatibility module.

#### Example

```typescript
import { Discv5Discovery, ENR } from "@chainsafe/discv5";
import Libp2p from "libp2p";
import PeerId from "peer-id";

const myPeerId: PeerId = ...;

const bootstrapEnrs: ENR[] = [...];

const libp2p = new Libp2p({
  peerId: myPeerId,
  modules: {
    peerDiscovery: [Discv5Discovery],
  },
  config: {
    discv5: {
      enr: ENR.createFromPeerId(myPeerInfo.id),
      bindAddr: "/ip4/0.0.0.0/udp/9000",
      bootstrapEnrs: bootstrapEnrs,
      searchInterval: 30000, // wait 30s between searches
    },
  },
});

```

## Additional features

By default, importing this library will, as a side-effect, change the enr crypto implementation to use `bcrypto`.
If you'd like to remain using `@chainsafe/enr`'s default crypto you can add this after importing `@chainsafe/discv5`:
```ts
import {setV4Crypto, defaultCrypto} from "@chainsafe/enr";

setV4Crypto(defaultCrypto)
```

## License

Apache-2.0
npm package: @nethermindeth/hardhat-warp
Description: Hardhat plugin for the Warp transpiler
Author: Nethermind
Latest version: 1.1.10

# Hardhat testing integration tool

The hardhat-warp framework overwrites parts of hardhat so that it uses Warp
and StarkNet instead of solc and Ethereum.

NOTE: hardhat-warp is in beta and there might be bugs. Please open issues or reach out to
us on our [discord](https://discord.gg/cPqaZXev7P).

## Template for new project

If you're setting up a new project you can use [this repository](https://github.com/swapnilraj/hardhat-warp-template) as template.

## Configuring you project

The project has two peer dependencies which must be used in your hardhat repo.
These are `@typechain/hardhat` (over hardhat-typechain) and the latest version
of `@typechain/ethers-v5` (^10.1.1). Many older projects have old versions of
these dependencies already installed. Updating them is simple.

Install hardhat-warp

```
yarn add --dev @nethermindeth/harhdhat-warp
```

You will need to have python env with an instance of `starknet-devnet` and
`cairo-lang`. See instructions for setting up `cairo-lang`
[here](https://cairo-lang.org/docs/quickstart.html) and `starknet-devnet`
[here](https://shard-labs.github.io/starknet-devnet/docs/intro).

```
python3.9 -m venv venv
source venv/bin/activate
pip install cairo-lang starknet-devnet
```

We will support
[starknet-hardhat-plguin](https://github.com/Shard-Labs/starknet-hardhat-plugin)'s
dockerized devnet and starknet cli soon

In `hardhat.config.ts` add the import after importing hardhat:

```
import '@nethermindeth/hardhat-warp';
```

Then add the following to run on a local testnet:

```
starknet: {
  network: "integrated-devnet",
}
networks: {
  integratedDevnet: {
    url: `http://127.0.0.1:5050`,

    venv: "<path/to/venv/with/starknet-devnet>",
    args: ["--seed", "0", "--timeout", "10000"],
    stdout: `stdout.log`, // <- logs redirected to log file
    stderr: "STDERR"  // <- logs stderr to the terminal
  },
},
```

Install the python dependencies of hardhat-warp:

```
yarn hardhat warp-install
```

Here's an example configuration from the [UniStark repo](https://github.com/NethermindEth/UniStark/blob/main/hardhat.config.ts#L1).

## Solidity changes

Make the required changes for compatibility with StarkNet, you can checkout
some commonly required changes
[here](https://nethermindeth.github.io/warp/docs/get_around_unsupported_features).

## Using hardhat warp

```
yarn hardhat test
```

The Cairo files are written to the `artifacts` folder.