@@ -52,29 +52,32 @@ function setupMethods (soljson) {
52
52
if ( '_compileJSON' in soljson ) {
53
53
compileJSON = soljson . cwrap ( 'compileJSON' , 'string' , [ 'string' , 'number' ] ) ;
54
54
}
55
+
55
56
var compileJSONMulti = null ;
56
57
if ( '_compileJSONMulti' in soljson ) {
57
58
compileJSONMulti = soljson . cwrap ( 'compileJSONMulti' , 'string' , [ 'string' , 'number' ] ) ;
58
59
}
60
+
59
61
var compileJSONCallback = null ;
60
- var compileStandard = null ;
61
- if ( ( '_compileJSONCallback' in soljson ) || ( '_compileStandard' in soljson ) || ( '_solidity_compile' in soljson ) ) {
62
+ if ( '_compileJSONCallback' in soljson ) {
62
63
var compileInternal = soljson . cwrap ( 'compileJSONCallback' , 'string' , [ 'string' , 'number' , 'number' ] ) ;
63
64
compileJSONCallback = function ( input , optimize , readCallback ) {
64
65
return runWithReadCallback ( readCallback , compileInternal , [ input , optimize ] ) ;
65
66
} ;
66
- if ( '_compileStandard' in soljson ) {
67
- var compileStandardInternal = soljson . cwrap ( 'compileStandard' , 'string' , [ 'string' , 'number' ] ) ;
68
- compileStandard = function ( input , readCallback ) {
69
- return runWithReadCallback ( readCallback , compileStandardInternal , [ input ] ) ;
70
- } ;
71
- }
72
- if ( '_solidity_compile' in soljson ) {
73
- var solidityCompile = soljson . cwrap ( 'solidity_compile' , 'string' , [ 'string' , 'number' ] ) ;
74
- compileStandard = function ( input , readCallback ) {
75
- return runWithReadCallback ( readCallback , solidityCompile , [ input ] ) ;
76
- } ;
77
- }
67
+ }
68
+
69
+ var compileStandard = null ;
70
+ if ( '_compileStandard' in soljson ) {
71
+ var compileStandardInternal = soljson . cwrap ( 'compileStandard' , 'string' , [ 'string' , 'number' ] ) ;
72
+ compileStandard = function ( input , readCallback ) {
73
+ return runWithReadCallback ( readCallback , compileStandardInternal , [ input ] ) ;
74
+ } ;
75
+ }
76
+ if ( '_solidity_compile' in soljson ) {
77
+ var solidityCompile = soljson . cwrap ( 'solidity_compile' , 'string' , [ 'string' , 'number' ] ) ;
78
+ compileStandard = function ( input , readCallback ) {
79
+ return runWithReadCallback ( readCallback , solidityCompile , [ input ] ) ;
80
+ } ;
78
81
}
79
82
80
83
var compile = function ( input , optimise , readCallback ) {
0 commit comments