https://github.com/dongri/npx-method-id
Get the method id of a function signature
https://github.com/dongri/npx-method-id
Last synced: about 2 months ago
JSON representation
Get the method id of a function signature
- Host: GitHub
- URL: https://github.com/dongri/npx-method-id
- Owner: dongri
- Created: 2024-01-12T11:24:07.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-01-22T08:54:54.000Z (over 1 year ago)
- Last Synced: 2025-01-21T05:15:56.547Z (3 months ago)
- Language: JavaScript
- Homepage:
- Size: 8.79 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# npx method-id
Get the method id of a function signature## usage
```bash
$ npx method-id 'function name(uint256)'
0x00ad800c name(uint256)
```## confirm
https://www.4byte.directory/signatures/?bytes4_signature=0x00ad800c## example
```bash
$ npx method-id 'function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens(address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s) external returns (uint amountETH)'
0x5b0d5984 removeLiquidityETHWithPermitSupportingFeeOnTransferTokens(address,uint256,uint256,uint256,address,uint256,bool,uint8,bytes32,bytes32)
```