# truffle-plugin-register-methods

> > 🏆 1st Place Winner of TruffleCon 2019 Hackathon!!! 🎉🎉🎉

Latest version **0.2.0** (published 2019-08-12) · ISC license · 0 weekly downloads

## Install

```sh
npm install truffle-plugin-register-methods
pnpm add truffle-plugin-register-methods
yarn add truffle-plugin-register-methods
bun add truffle-plugin-register-methods
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.0 |
| Published | 2019-08-12 |
| First published | 2019-08-04 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 697 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Willian Mitsuda |
| Maintainers | wmitsuda |

## Links

- npm: https://www.npmjs.com/package/truffle-plugin-register-methods
- npm.io page: https://npm.io/package/truffle-plugin-register-methods

## Dependencies (3)

- [web3](https://npm.io/package/web3.md) ^1.2.0
- [babel-runtime](https://npm.io/package/babel-runtime.md) ^6.26.0
- [truffle-hdwallet-provider](https://npm.io/package/truffle-hdwallet-provider.md) ^1.0.15

## Recent versions

- 0.2.0 (latest) — 2019-08-12
- 0.1.0 — 2019-08-04

## README

# Overview

> 🏆 1st Place Winner of TruffleCon 2019 Hackathon!!! 🎉🎉🎉

This plugin allows truffle to scan your contract build artifacts for non-constant methods and register them in the Parity Signature Registry smart contract.

By doing this, web3 browsers can use this information to show some user friendly info to the user when calling contract methods, like saying it is calling the function **HELLO** instead of doing an enigmatic **CONTRACT INTERACTION**.

![metamask](docs/overview.png)

Currently Metamask uses this registry as explained in https://metamask.github.io/metamask-docs/Best_Practices/Registering_Function_Names, but there is too much friction. This plugin aims to incentivize people to start registering their contract functions.

# TLDR

Add:

```
plugins: ["truffle-plugin-register-methods"]
```

to `truffle-config.js`, then run:

```sh
$ npm i -D truffle-plugin-register-methods
$ export TRUFFLE_PLUGIN_MNEMONIC="<YOUR-SECRET-MAINNET-MNEMONIC-HERE>"
$ npx truffle run register-methods <contract-name>
```

# Usage

For a more detailed explanation, see [usage](USAGE.md).

---
_Source: https://npm.io/package/truffle-plugin-register-methods · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
