Skip to content
This repository has been archived by the owner on Nov 14, 2023. It is now read-only.

Commit

Permalink
Updated documentation
Browse files Browse the repository at this point in the history
Added better documentation for compile method. Referenced official solidity compiler input/output spec.
  • Loading branch information
ethanwillis committed Oct 25, 2017
1 parent c1806a0 commit 1fe9220
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion routes/api.js
Expand Up @@ -3,7 +3,16 @@ var solc = require('solc');
var abi = require('solc/abi')
var router = express.Router();

/* GET users listing. */
/**
Compiles the given Solidity Sources.
Ref 1: https://solidity.readthedocs.io/en/develop/using-the-compiler.html#input-description
Ref 2: https://solidity.readthedocs.io/en/develop/using-the-compiler.html#output-description
Body Input: Body input is a JSON object keyed by sol file name.
See Ref 1 under the "sources:" key.
Returns: Solidity standard JSON output. See Ref 2
*/
router.post('/compile', function(req, res, next) {
var compiled = solc.compile({sources: req.body}, 1);

Expand Down

0 comments on commit 1fe9220

Please sign in to comment.