Skip to content

solidstate-network/hardhat-selector-uploader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Hardhat Selector Uploader

Calculate the function selectors found in all local contracts and upload them to the 4byte Directory Ethereum Signature Database.

Versions of this plugin prior to 2.0.0 were released as @solidstate/hardhat-4byte-uploader.

Installation

npm install --save-dev @solidstate/hardhat-selector-uploader
# or
pnpm add -D @solidstate/hardhat-selector-uploader

Usage

Load plugin in Hardhat config:

import hardhatSelectorUploader from '@solidstate/hardhat-selector-uploader';

const config: HardhatUserConfig = {
  plugins: [
    hardhatSelectorUploader,
  ],
  selectorUploader: {
    ... // see table for configuration options
  },
};

Add configuration under the selectorUploader key:

option description default
runOnCompile whether to automatically upload selectors during compilation (ignored if Hardhat detects a CI server environment) false
selectorUploader: {
  runOnCompile: true,
}

Run the included Hardhat task manually:

npx hardhat upload-selectors
# or
pnpm hardhat upload-selectors

Development

Install dependencies via pnpm:

pnpm install

Setup Husky to format code on commit:

pnpm prepare

About

๐Ÿ—‚๏ธ Upload local function selectors to the Ethereum Selector Database ๐Ÿ—ƒ๏ธ

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •