Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/solidstate-network/hardhat-4byte-uploader
🗂️ Upload local function selectors to the Ethereum Selector Database 🗃️
https://github.com/solidstate-network/hardhat-4byte-uploader
eth ether ethereum function-selector hardhat plugin wow
Last synced: about 1 month ago
JSON representation
🗂️ Upload local function selectors to the Ethereum Selector Database 🗃️
- Host: GitHub
- URL: https://github.com/solidstate-network/hardhat-4byte-uploader
- Owner: solidstate-network
- License: mit
- Created: 2022-01-01T03:58:41.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2024-07-30T20:33:48.000Z (5 months ago)
- Last Synced: 2024-11-01T20:26:18.487Z (about 2 months ago)
- Topics: eth, ether, ethereum, function-selector, hardhat, plugin, wow
- Language: TypeScript
- Size: 110 KB
- Stars: 2
- Watchers: 4
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Hardhat 4byte Uploader
Calculate the function selectors found in all local contracts and upload them to the [4byte Directory](https://www.4byte.directory/) Ethereum Signature Database.
## Installation
```bash
npm install --save-dev @solidstate/hardhat-4byte-uploader
# or
yarn add --dev @solidstate/hardhat-4byte-uploader
```## Usage
Load plugin in Hardhat config:
```javascript
require('@solidstate/hardhat-4byte-uploader');
```Add configuration under the `fourByteUploader` key:
| option | description | default |
| -------------- | ----------------------------------------------------------------------------------------------------------------- | ------- |
| `runOnCompile` | whether to automatically upload selectors during compilation (ignored if Hardhat detects a CI server environment) | `false` |```javascript
fourByteUploader: {
runOnCompile: true,
}
```Run the included Hardhat task manually:
```bash
npx hardhat upload-selectors
# or
yarn run hardhat upload-selectors
```## Development
Install dependencies via Yarn:
```bash
yarn install
```Setup Husky to format code on commit:
```bash
yarn prepare
```