1.17.1 • Published 9 months ago

hardhat-generate-function-selectors v1.17.1

Weekly downloads
-
License
MIT
Repository
github
Last release
9 months ago

generate-function-selectors plugin

Hardhat TS plugin to generate function selectors from each of the ABI/.json files found in the artifacts/contracts. (Depth/organization doesn't matter)

Outputs 'selectors.json' to project's root directory, which looks like the below for the hardhat example project:

{
  "Lock.sol": {
    "0x251c1aa3": "unlockTime",
    "0x3ccfd60b": "withdraw",
    "0x8da5cb5b": "owner"
  }
}

Quick Start

  1. Install the Hardhat plug-in
npm install hardhat-generate-function-selectors
yarn add hardhat-generate-function-selectors
  1. Add this to your hardhat.config.js
require("hardhat-generate-function-selectors");
import "hardhat-generate-function-selectors";
  1. Add this to your hardhat.config.js as well:
<your hardhat config> = {
  functionSelectors: {
    separateContractSelectors: true, //separate by contract
    orderedByValue: true, //order function selectors by hex value, least to greatest
  },
};

Now you're able to to generate the function selectors with:

npx hardhat selectors
yarn hardhat selectors
1.17.1

9 months ago

1.17.0

9 months ago

1.16.0

9 months ago

1.15.0

9 months ago

1.13.0

9 months ago

1.11.0

9 months ago

1.10.0

9 months ago

1.9.0

9 months ago

1.8.0

9 months ago

1.7.0

9 months ago

1.6.0

9 months ago

1.5.0

9 months ago

1.4.0

9 months ago

1.3.0

9 months ago

1.1.0

9 months ago

1.0.0

9 months ago