Giter Club home page Giter Club logo

Comments (3)

louisabraham avatar louisabraham commented on May 18, 2024

The command is called with args : '--bin', '--abi', '--userdoc', '--devdoc', '--add-std', '--optimize', '-o', '/var/folders/ns/bvd4v4bd62jg8qvwyn02dtdh0000gn/T/solc719193878'

I tried to use the soljs compiler anyway, replacing again the command with a python script :

import sys
import subprocess

tmp = subprocess.check_output("echo $TMPDIR".split()).decode()
inp = sys.stdin.read()
args = ["/usr/local/bin/solcjs"] + sys.argv[1:]
if inp:
    path = tmp + "solcc123123"
    open(path, 'w').write(inp)
    subprocess.call(args + [path])
else:
    subprocess.call(args)

I get now the error :

solc: error reading user doc: open /var/folders/ns/bvd4v4bd62jg8qvwyn02dtdh0000gn/T/solc515219141/C.docuser: no such file or directory

And indeed, none of the options '--userdoc', '--devdoc', '--add-std' is listed in the --help menu of solcjs.
How am I supposed to use solcjs with the console ? It would be really great, because solcjs is far more simple to deploy than the cpp implementation that needs to be compiled.

from solc-js.

chriseth avatar chriseth commented on May 18, 2024

If you use solc-js, you can call compile as a native javascript function, instead of using eth.compile.solidity. solc-js is not compatible with setSolc, these are just two completely different programs.

from solc-js.

axic avatar axic commented on May 18, 2024

Duplicate of #43.

from solc-js.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.