Calculate the function selectors found in all local contracts and upload them to the 4byte Directory Ethereum Signature Database.
npm install --save-dev @solidstate/hardhat-4byte-uploader
# or
yarn add --dev @solidstate/hardhat-4byte-uploader
Load plugin in Hardhat config:
require('@solidstate/hardhat-4byte-uploader');
Run the included Hardhat task manually:
npx hardhat upload-selectors
# or
yarn run hardhat upload-selectors