@@ -7,67 +7,67 @@ tape('ABI translator', function (t) {
77 st . end ( ) ;
88 } ) ;
99 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' } ] ) ;
1111 st . end ( ) ;
1212 } ) ;
1313 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' } ] ) ;
1616 st . end ( ) ;
1717 } ) ;
1818 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' } ] ) ;
2121 st . end ( ) ;
2222 } ) ;
2323 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' } ] ) ;
2626 st . end ( ) ;
2727 } ) ;
2828 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' } ] ) ;
3131 st . end ( ) ;
3232 } ) ;
3333 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' } ] ) ;
3636 st . end ( ) ;
3737 } ) ;
3838 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' } ] ) ;
4141 st . end ( ) ;
4242 } ) ;
4343 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' } ] ) ;
4646 st . end ( ) ;
4747 } ) ;
4848 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' } ] ) ;
5151 st . end ( ) ;
5252 } ) ;
5353 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' } ] ) ;
5656 st . end ( ) ;
5757 } ) ;
5858 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' } ] ) ;
6161 st . end ( ) ;
6262 } ) ;
6363 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' } ] ) ;
6666 st . end ( ) ;
6767 } ) ;
6868 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' } ] ) ;
7171 st . end ( ) ;
7272 } ) ;
7373} ) ;
0 commit comments