# deploy-eip-1820

> Helper to deploy the EIP 1820 Registry smart contract to a network using Ethers.js

Latest version **1.0.0** (published 2020-08-08) · MIT license · 0 weekly downloads

## Install

```sh
npm install deploy-eip-1820
pnpm add deploy-eip-1820
yarn add deploy-eip-1820
bun add deploy-eip-1820
```

## Health

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

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2020-08-08 |
| First published | 2020-03-30 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 12.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Brendan Asselstine |
| Maintainers | asselstine |

## Links

- npm: https://www.npmjs.com/package/deploy-eip-1820
- npm.io page: https://npm.io/package/deploy-eip-1820

## Recent versions

- 1.0.0 (latest) — 2020-08-08
- 0.2.0 — 2020-05-20
- 0.1.1 — 2020-03-30
- 0.1.0 — 2020-03-30

## README

# Deploy EIP 1820

Ethereum [EIP 1820](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-1820.md) is a standard for pseudo-introspection of smart contracts on Ethereum.

This library ensures that the EIP 1820 registry smart contract exists on any given chain.  Particularly useful for test environments.

Uses [ethers.js v5](https://docs.ethers.io/v5).

If you're using ethers.js v4 then try the 0.2 version.

# Setup

Install `deploy-eip-1820` via yarn:

```sh
$ yarn add deploy-eip-1820
```

or npm:

```sh
$ npm i deploy-eip-1820
```

# Usage

To ensure that the EIP 1820 Registry contract exists on the network you are using, use the `setup1820` function:

```javascript
const { deploy1820 } = require('deploy-eip-1820')

async function deploy() {
    const wallet = ethers.Wallet.fromMnemonic("...your mnemonic...")
    // The wallet must have at least 0.08 Ether
    const registryContract = await deploy1820(wallet)

    // Now we have an Ethers Contract instance for the ERC1820 Registry contract
    let implementer = await registryContract.getInterfaceImplementer('0x1234...', '0xINTERFACE_HASH')
}

```

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