@@ -7,67 +7,67 @@ tape('ABI translator', function (t) {
7
7
st . end ( ) ;
8
8
} ) ;
9
9
t . test ( '0.1.1 (no constructor)' , function ( st ) {
10
- st . deepEqual ( abi . update ( '0.1.1' , [ ] ) , [ { inputs : [ ] , payable : true , stateMutability : 'payable' , type : 'constructor' } , { payable : true , stateMutability : 'payable' , type : 'fallback' } ] ) ;
10
+ st . deepEqual ( abi . update ( '0.1.1' , [ ] ) , [ { inputs : [ ] , payable : true , stateMutability : 'payable' , type : 'constructor' } , { payable : true , stateMutability : 'payable' , type : 'fallback' } ] ) ;
11
11
st . end ( ) ;
12
12
} ) ;
13
13
t . test ( '0.3.6 (constructor)' , function ( st ) {
14
- var input = [ { inputs : [ ] , type : 'constructor' } ] ;
15
- st . deepEqual ( abi . update ( '0.3.6' , input ) , [ { inputs : [ ] , payable : true , stateMutability : 'payable' , type : 'constructor' } , { payable : true , stateMutability : 'payable' , type : 'fallback' } ] ) ;
14
+ const input = [ { inputs : [ ] , type : 'constructor' } ] ;
15
+ st . deepEqual ( abi . update ( '0.3.6' , input ) , [ { inputs : [ ] , payable : true , stateMutability : 'payable' , type : 'constructor' } , { payable : true , stateMutability : 'payable' , type : 'fallback' } ] ) ;
16
16
st . end ( ) ;
17
17
} ) ;
18
18
t . test ( '0.3.6 (non-constant function)' , function ( st ) {
19
- var input = [ { inputs : [ ] , type : 'function' } ] ;
20
- st . deepEqual ( abi . update ( '0.3.6' , input ) , [ { inputs : [ ] , payable : true , stateMutability : 'payable' , type : 'function' } , { payable : true , stateMutability : 'payable' , type : 'fallback' } ] ) ;
19
+ const input = [ { inputs : [ ] , type : 'function' } ] ;
20
+ st . deepEqual ( abi . update ( '0.3.6' , input ) , [ { inputs : [ ] , payable : true , stateMutability : 'payable' , type : 'function' } , { payable : true , stateMutability : 'payable' , type : 'fallback' } ] ) ;
21
21
st . end ( ) ;
22
22
} ) ;
23
23
t . test ( '0.3.6 (constant function)' , function ( st ) {
24
- var input = [ { inputs : [ ] , type : 'function' , constant : true } ] ;
25
- st . deepEqual ( abi . update ( '0.3.6' , input ) , [ { inputs : [ ] , constant : true , stateMutability : 'view' , type : 'function' } , { payable : true , stateMutability : 'payable' , type : 'fallback' } ] ) ;
24
+ const input = [ { inputs : [ ] , type : 'function' , constant : true } ] ;
25
+ st . deepEqual ( abi . update ( '0.3.6' , input ) , [ { inputs : [ ] , constant : true , stateMutability : 'view' , type : 'function' } , { payable : true , stateMutability : 'payable' , type : 'fallback' } ] ) ;
26
26
st . end ( ) ;
27
27
} ) ;
28
28
t . test ( '0.3.6 (event)' , function ( st ) {
29
- var input = [ { inputs : [ ] , type : 'event' } ] ;
30
- st . deepEqual ( abi . update ( '0.3.6' , input ) , [ { inputs : [ ] , type : 'event' } , { payable : true , stateMutability : 'payable' , type : 'fallback' } ] ) ;
29
+ const input = [ { inputs : [ ] , type : 'event' } ] ;
30
+ st . deepEqual ( abi . update ( '0.3.6' , input ) , [ { inputs : [ ] , type : 'event' } , { payable : true , stateMutability : 'payable' , type : 'fallback' } ] ) ;
31
31
st . end ( ) ;
32
32
} ) ;
33
33
t . test ( '0.3.6 (has no fallback)' , function ( st ) {
34
- var input = [ { inputs : [ ] , type : 'constructor' } ] ;
35
- st . deepEqual ( abi . update ( '0.3.6' , input ) , [ { inputs : [ ] , type : 'constructor' , payable : true , stateMutability : 'payable' } , { type : 'fallback' , payable : true , stateMutability : 'payable' } ] ) ;
34
+ const input = [ { inputs : [ ] , type : 'constructor' } ] ;
35
+ st . deepEqual ( abi . update ( '0.3.6' , input ) , [ { inputs : [ ] , type : 'constructor' , payable : true , stateMutability : 'payable' } , { type : 'fallback' , payable : true , stateMutability : 'payable' } ] ) ;
36
36
st . end ( ) ;
37
37
} ) ;
38
38
t . test ( '0.4.0 (has fallback)' , function ( st ) {
39
- var input = [ { inputs : [ ] , type : 'constructor' } , { type : 'fallback' } ] ;
40
- st . deepEqual ( abi . update ( '0.4.0' , input ) , [ { inputs : [ ] , type : 'constructor' , payable : true , stateMutability : 'payable' } , { type : 'fallback' , stateMutability : 'nonpayable' } ] ) ;
39
+ const input = [ { inputs : [ ] , type : 'constructor' } , { type : 'fallback' } ] ;
40
+ st . deepEqual ( abi . update ( '0.4.0' , input ) , [ { inputs : [ ] , type : 'constructor' , payable : true , stateMutability : 'payable' } , { type : 'fallback' , stateMutability : 'nonpayable' } ] ) ;
41
41
st . end ( ) ;
42
42
} ) ;
43
43
t . test ( '0.4.0 (non-constant function)' , function ( st ) {
44
- var input = [ { inputs : [ ] , type : 'function' } ] ;
45
- st . deepEqual ( abi . update ( '0.4.0' , input ) , [ { inputs : [ ] , stateMutability : 'nonpayable' , type : 'function' } ] ) ;
44
+ const input = [ { inputs : [ ] , type : 'function' } ] ;
45
+ st . deepEqual ( abi . update ( '0.4.0' , input ) , [ { inputs : [ ] , stateMutability : 'nonpayable' , type : 'function' } ] ) ;
46
46
st . end ( ) ;
47
47
} ) ;
48
48
t . test ( '0.4.0 (constant function)' , function ( st ) {
49
- var input = [ { inputs : [ ] , type : 'function' , constant : true } ] ;
50
- st . deepEqual ( abi . update ( '0.4.0' , input ) , [ { inputs : [ ] , constant : true , stateMutability : 'view' , type : 'function' } ] ) ;
49
+ const input = [ { inputs : [ ] , type : 'function' , constant : true } ] ;
50
+ st . deepEqual ( abi . update ( '0.4.0' , input ) , [ { inputs : [ ] , constant : true , stateMutability : 'view' , type : 'function' } ] ) ;
51
51
st . end ( ) ;
52
52
} ) ;
53
53
t . test ( '0.4.0 (payable function)' , function ( st ) {
54
- var input = [ { inputs : [ ] , payable : true , type : 'function' } ] ;
55
- st . deepEqual ( abi . update ( '0.4.0' , input ) , [ { inputs : [ ] , payable : true , stateMutability : 'payable' , type : 'function' } ] ) ;
54
+ const input = [ { inputs : [ ] , payable : true , type : 'function' } ] ;
55
+ st . deepEqual ( abi . update ( '0.4.0' , input ) , [ { inputs : [ ] , payable : true , stateMutability : 'payable' , type : 'function' } ] ) ;
56
56
st . end ( ) ;
57
57
} ) ;
58
58
t . test ( '0.4.1 (constructor not payable)' , function ( st ) {
59
- var input = [ { inputs : [ ] , payable : false , type : 'constructor' } ] ;
60
- st . deepEqual ( abi . update ( '0.4.1' , input ) , [ { inputs : [ ] , payable : true , stateMutability : 'payable' , type : 'constructor' } ] ) ;
59
+ const input = [ { inputs : [ ] , payable : false , type : 'constructor' } ] ;
60
+ st . deepEqual ( abi . update ( '0.4.1' , input ) , [ { inputs : [ ] , payable : true , stateMutability : 'payable' , type : 'constructor' } ] ) ;
61
61
st . end ( ) ;
62
62
} ) ;
63
63
t . test ( '0.4.5 (constructor payable)' , function ( st ) {
64
- var input = [ { inputs : [ ] , payable : false , type : 'constructor' } ] ;
65
- st . deepEqual ( abi . update ( '0.4.5' , input ) , [ { inputs : [ ] , payable : false , stateMutability : 'nonpayable' , type : 'constructor' } ] ) ;
64
+ const input = [ { inputs : [ ] , payable : false , type : 'constructor' } ] ;
65
+ st . deepEqual ( abi . update ( '0.4.5' , input ) , [ { inputs : [ ] , payable : false , stateMutability : 'nonpayable' , type : 'constructor' } ] ) ;
66
66
st . end ( ) ;
67
67
} ) ;
68
68
t . test ( '0.4.16 (statemutability)' , function ( st ) {
69
- var input = [ { inputs : [ ] , payable : false , stateMutability : 'pure' , type : 'function' } ] ;
70
- st . deepEqual ( abi . update ( '0.4.16' , input ) , [ { inputs : [ ] , payable : false , stateMutability : 'pure' , type : 'function' } ] ) ;
69
+ const input = [ { inputs : [ ] , payable : false , stateMutability : 'pure' , type : 'function' } ] ;
70
+ st . deepEqual ( abi . update ( '0.4.16' , input ) , [ { inputs : [ ] , payable : false , stateMutability : 'pure' , type : 'function' } ] ) ;
71
71
st . end ( ) ;
72
72
} ) ;
73
73
} ) ;
0 commit comments