# contract-registry-node

> CLI and proxy module for interacting with smart contract registry ABIs, deployments and docs.

Latest version **1.0.1** (published 2022-07-12) · ISC license · 0 weekly downloads

## Install

```sh
npm install contract-registry-node
pnpm add contract-registry-node
yarn add contract-registry-node
bun add contract-registry-node
```

## Health

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

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2022-07-12 |
| First published | 2022-07-12 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | ESM |
| Node | ^12.20.0 \|\| ^14.13.1 \|\| >=16.0.0 |
| Dependencies | 1 |
| Unpacked size | 2.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Nate |
| Maintainers | natevpux |
| Keywords | smart, contracts |

## Links

- npm: https://www.npmjs.com/package/contract-registry-node
- Repository: https://github.com/Pyxelchain/contract-registry-node/contract-registry-node
- Homepage: https://github.com/Pyxelchain/contract-registry-node/contract-registry-node#readme
- Issues: https://github.com/Pyxelchain/contract-registry-node/contract-registry-node/issues
- npm.io page: https://npm.io/package/contract-registry-node

## Dependencies (1)

- [yargs](https://npm.io/package/yargs.md) ^17.5.1

## Recent versions

- 1.0.1 (latest) — 2022-07-12

## README

# contract-registry-node

CLI and proxy module for interacting with smart contract registry ABIs, deployments and docs.

## Setup

Generate an `API_KEY` in the contract registry and create a `contracts.js` file following this convention:

```js
const config = {
        registry = MyCoolCompany,
        api_key = '1234abc', // or process.env.API_KEY
        contracts = [
            voting: {
                projectName: voting, 
                version: 1.1
            },
            todo-list: {
                projectName: todo-list, 
                version: latest
            }
        ]
    };
    module.exports = contracts;
```

The CLI will reference this file to populate a `.contracts/` directory with smart contract ABIs, deployment addresses and documentation. This module also serves to proxy this, so in your react application you can,

```js
import contractRegistry from "contract-registry";

const { abi, env } = contractRegistry.voting;

console.log(env.networks["testnet"].address);
```

## Usage

 - `contract-registry pull` — Read contracts.js and pull ABIs, docs and deployment addresses
 - `contract-registry docs` — View smart contract docs in a web browser

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