https://github.com/wmitsuda/truffle-plugin-register-methods
Truffle plugin for registering contract functions in Parity Method Registry
https://github.com/wmitsuda/truffle-plugin-register-methods
ethereum solidity truffle truffle-framework web3
Last synced: about 1 year ago
JSON representation
Truffle plugin for registering contract functions in Parity Method Registry
- Host: GitHub
- URL: https://github.com/wmitsuda/truffle-plugin-register-methods
- Owner: wmitsuda
- Archived: true
- Created: 2019-08-04T16:30:13.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2023-01-23T23:49:41.000Z (over 3 years ago)
- Last Synced: 2025-03-21T22:43:31.184Z (over 1 year ago)
- Topics: ethereum, solidity, truffle, truffle-framework, web3
- Language: JavaScript
- Homepage:
- Size: 1.13 MB
- Stars: 1
- Watchers: 1
- Forks: 3
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
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**.

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=""
$ npx truffle run register-methods
```
# Usage
For a more detailed explanation, see [usage](USAGE.md).