Skip to content

Commit af7451e

Browse files
committed
Explain the parameters of the solc entry points
1 parent 67b2693 commit af7451e

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

wrapper.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,16 +132,19 @@ function setupMethods (soljson) {
132132

133133
var compileJSON = null;
134134
if ('_compileJSON' in soljson) {
135+
// input (text), optimize (bool) -> output (jsontext)
135136
compileJSON = soljson.cwrap('compileJSON', 'string', ['string', 'number']);
136137
}
137138

138139
var compileJSONMulti = null;
139140
if ('_compileJSONMulti' in soljson) {
141+
// input (jsontext), optimize (bool) -> output (jsontext)
140142
compileJSONMulti = soljson.cwrap('compileJSONMulti', 'string', ['string', 'number']);
141143
}
142144

143145
var compileJSONCallback = null;
144146
if ('_compileJSONCallback' in soljson) {
147+
// input (jsontext), optimize (bool), callback (ptr) -> output (jsontext)
145148
var compileInternal = soljson.cwrap('compileJSONCallback', 'string', ['string', 'number', 'number']);
146149
compileJSONCallback = function (input, optimize, readCallback) {
147150
return runWithCallbacks(readCallback, compileInternal, [ input, optimize ]);
@@ -150,6 +153,7 @@ function setupMethods (soljson) {
150153

151154
var compileStandard = null;
152155
if ('_compileStandard' in soljson) {
156+
// input (jsontext), callback (ptr) -> output (jsontext)
153157
var compileStandardInternal = soljson.cwrap('compileStandard', 'string', ['string', 'number']);
154158
compileStandard = function (input, readCallback) {
155159
return runWithCallbacks(readCallback, compileStandardInternal, [ input ]);
@@ -158,8 +162,10 @@ function setupMethods (soljson) {
158162
if ('_solidity_compile' in soljson) {
159163
var solidityCompile;
160164
if (isVersion6) {
165+
// input (jsontext), callback (ptr), callback_context (ptr) -> output (jsontext)
161166
solidityCompile = soljson.cwrap('solidity_compile', 'string', ['string', 'number', 'number']);
162167
} else {
168+
// input (jsontext), callback (ptr) -> output (jsontext)
163169
solidityCompile = soljson.cwrap('solidity_compile', 'string', ['string', 'number']);
164170
}
165171
compileStandard = function (input, callbacks) {

0 commit comments

Comments
 (0)