File tree Expand file tree Collapse file tree 4 files changed +16
-17
lines changed Expand file tree Collapse file tree 4 files changed +16
-17
lines changed Original file line number Diff line number Diff line change 1
- # four-byte
1
+ # 4byte
2
2
3
3
> Look up an Ethereum function signature by the 4 bytes of its hash
4
4
5
- [ ![ License] ( http://img.shields.io/badge/license-MIT-blue.svg )] ( https://raw.githubusercontent.com/shanefontaine/four-byte /master/LICENSE )
6
- [ ![ NPM version] ( https://badge.fury.io/js/four-byte .svg )] ( http://badge.fury.io/js/four-byte )
5
+ [ ![ License] ( http://img.shields.io/badge/license-MIT-blue.svg )] ( https://raw.githubusercontent.com/shanefontaine/4byte /master/LICENSE )
6
+ [ ![ NPM version] ( https://badge.fury.io/js/4byte .svg )] ( http://badge.fury.io/js/4byte )
7
7
8
8
## Install
9
9
10
10
``` bash
11
- npm install four-byte
11
+ npm install 4byte
12
12
```
13
13
14
14
## Getting started
15
15
16
16
``` javascript
17
- const fourByte = require (' four-byte ' )
17
+ const fourByte = require (' 4byte ' )
18
18
19
19
const signatures = fourByte (' 0x51c6590a' )
20
20
console .log (signatures) // ['addLiquidity(uint256)']
@@ -25,20 +25,20 @@ console.log(signatures) // ['addLiquidity(uint256)']
25
25
Install:
26
26
27
27
``` bash
28
- npm install -g four-byte
28
+ npm install -g 4byte
29
29
```
30
30
31
31
Look up a function signature:
32
32
33
33
``` bash
34
- $ four-byte 0xa9059cbb
34
+ $ 4byte 0xa9059cbb
35
35
transfer(bytes4[9],bytes5[6],int48[11])
36
36
many_msg_babbage(bytes1)
37
37
transfer(address,uint256)
38
38
```
39
39
40
40
``` bash
41
- $ four-byte 0xa9059cbb --format=json
41
+ $ 4byte 0xa9059cbb --format=json
42
42
[
43
43
" transfer(bytes4[9],bytes5[6],int48[11])" ,
44
44
" many_msg_babbage(bytes1)" ,
File renamed without changes.
Original file line number Diff line number Diff line change @@ -3,10 +3,10 @@ const fourByte = require('.')
3
3
4
4
const cli = meow ( `
5
5
Usage
6
- $ four-byte <hash-of-function-sig>
6
+ $ 4byte <hash-of-function-sig>
7
7
8
8
Examples
9
- $ four-byte 0x51c6590a
9
+ $ 4byte 0x51c6590a
10
10
addLiquidity(uint256)
11
11
` , {
12
12
flags : {
Original file line number Diff line number Diff line change 1
1
{
2
- "name" : " four-byte " ,
2
+ "name" : " 4byte " ,
3
3
"version" : " 0.0.1" ,
4
4
"description" : " Look up an Ethereum function signature by the 4 bytes of its hash" ,
5
5
"main" : " index.js" ,
6
6
"bin" : {
7
- "four-byte" : " bin/four-byte" ,
8
- "four_byte" : " bin/four-byte"
7
+ "4byte" : " bin/4byte"
9
8
},
10
9
"scripts" : {
11
10
"test" : " tape test/*.js" ,
12
11
"lint" : " standard --fix *.js test/*.js"
13
12
},
14
13
"repository" : {
15
14
"type" : " git" ,
16
- "url" : " https://github.com/shanefontaine/four-byte "
15
+ "url" : " https://github.com/shanefontaine/4byte "
17
16
},
18
17
"bugs" : {
19
- "url" : " https://github.com/shanefontaine/four-byte /issues"
18
+ "url" : " https://github.com/shanefontaine/4byte /issues"
20
19
},
21
- "homepage" : " https://github.com/shanefontaine/four-byte " ,
20
+ "homepage" : " https://github.com/shanefontaine/4byte " ,
22
21
"author" : {
23
22
"name" : " Shane Fontaine" ,
24
23
25
24
"url" : " https://shane.dev/"
26
25
},
27
26
"license" : " MIT" ,
28
- "url" : " https://github.com/shanefontaine/four-byte /blob/master/LICENSE" ,
27
+ "url" : " https://github.com/shanefontaine/4byte /blob/master/LICENSE" ,
29
28
"dependencies" : {
30
29
"meow" : " ^5.0.0" ,
31
30
"node-fetch" : " 2.6.1"
You can’t perform that action at this time.
0 commit comments