Questions tagged [solcjs]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
0answers
40 views

Why am I getting the error "Expected pragma, import directive or contract/interface/library definition?

I have "pragma solidity ^0.5.9" at the start of the file yet I still get this error. Listing.sol:1:1: ParserError: Expected pragma, import directive or contract/interface/library definition. ...
0
votes
0answers
25 views

Compile solidity smart contract using compiler version provided in the contract

I have been using solc-js in javascript to compile .sol contracts. However, many old smart contracts use older compiler versions that are specified using pragma in the smart contract source code. How ...
0
votes
1answer
59 views

I have written a javascript code for compiling the solidity code but it's showing error

I was trying to compile my contract using solc compiler but it returning me some errors. I will place my solidity code along with the error that I am getting here. Please help me out to sort this ...
1
vote
1answer
90 views

Cannot deploy contract

I'm having difficulty deploying a solc-compiled contract to ganache test network using web3. package.json { "name": "smartinvoice", "version": "1.0.0", "description": "", "main": "index.js", ...
1
vote
1answer
115 views

“Cannot import url”, “File outside of allowed directories” using --standard-json

I'm trying to understand how to use solidity's JSON input-output API. Here's my json file; { "language": "Solidity", "sources": { "StandardToken.sol": { "urls": [ "file:///home/...