⚓ Get The 4 byte Selector/Method Signature of any function
Install dependencies
npm install solselector
let selector = require("solselector");
//full keccak256 hash
selector.keccak256("balanceOf()");
//get 4byte selector
selector.getSelector("balanceOf()");
//get 4byte selector - multi arguments
selector.getMultiSelector("balanceOf()", "transferFrom(address,uint256)");
//get 4byte selector - multi array arguments
selector.getMultiSelector(["balanceOf()", "transferFrom(address,uint256)", "deposit()"]);