solidity-selector
v1.3.0
Published
Calculates solidity selector from function signature
Downloads
3
Readme
Solidity selector
Calculates solidity selector from function signature
Installation
npm i -g solidity-selector
Usage
> solidity-selector 'f(uint n)'
0xb3de648b f(uint256)
> solidity-selector 'function f(uint256 q, bytes[] memory zz)'
0xd9a8bd39 f(uint256,bytes[])
> echo '
struct Foo { address target; }
function f(uint256 q, bytes[] memory zz, Foo memory qwe)
' | solidity-selector
0xf6b2d3d1 f(uint256,bytes[],(address))
> solidity-selector input.sol
0xf6b2d3d1 f(uint256,bytes[],(address))