Skip to content

Latest commit

 

History

History
46 lines (24 loc) · 1.01 KB

README.md

File metadata and controls

46 lines (24 loc) · 1.01 KB

solselector

⚓ Get The 4 byte Selector/Method Signature of any function

Installation

Install dependencies

  npm install solselector

Key Functions

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()"]);

Authors

License

MIT License