Questions tagged [solc]

Questions related to the compiler for Solidity: solc

Questions related to the compiler for solc, the Solidity compiler and associated toolchains and dependency issues.

Not for questions about the Solidity language.

354 questions
5
votes
1 answer

TypeError: 'setSolc' is not a function

I am trying to sync geth and solc. which solc # I get the path to my solc /usr/local/bin/solc Open the geth console geth console 2>>geth.log and now I try to sync admin.setSolc("/usr/local/bin/solc") but I get the error TypeError: 'setSolc' is…
Suzuki Soma
  • 161
  • 3
4
votes
1 answer

solc-v0.6.0: TypeError: Operator - not compatible with types tuple() and int_const 1

I am having this error on solc version 0.6.0. Basically I am returning length of the list and subtract 1 from it, where that value will be assigned to an uint variable. In general this command used to return the length of the list after the push:…
alper
  • 8,395
  • 11
  • 63
  • 152
2
votes
2 answers

Python bindings for solc

There are javascript bindings for solc. Is there an equivalent Python binding for solc, such that you could simply install solc via pip?
dbryson
  • 6,403
  • 2
  • 27
  • 37
2
votes
2 answers

Not able to get rid of error from solc-js "AssertionError [ERR_ASSERTION]: Invalid callback specified."

const path=require('path'); const fs=require('fs'); const solc=require('solc'); const InboxPath=path.resolve(__dirname,'contracts','Inbox.sol'); const source=fs.readFileSync(InboxPath,'utf8'); solc.compile(source,1); Here is my…
2
votes
1 answer

Solc compile contracts with 5.0.0

I was following this guide for compiling my contracts How To: Compile a Solidity Smart Contract Using Node.js but "solc.compile(input, 1)" is not working anymore. I have problems understanding how to fix this...
Lomo
  • 103
  • 1
  • 7
2
votes
1 answer

I got error when npm install -g solc

I got error when try to install solc using npm install -g solc here is the error: erfans-MacBook-Pro:01 erfanandesta$ npm uninstall -g solc npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/solc npm WARN…
1
vote
0 answers

Solc compiler shows only one compilation error at a time

The solc compiler reports only one error at a time. Is there any way to get the list of all errors in the sol file?
Nik
  • 11
  • 1
1
vote
1 answer

Why is the data from remix different from that from my computer when compiling the same contract using the same version of solidity complier?

I downloaded the 0.5.7+commit.6da8b019 version of solidity compiler, compiled an ERC20 contract locally using the compiler, and got the binary data. Then I also copied the ERC20 contract and pasted it on the remix website. I chose the same version…
NUCKevin
  • 33
  • 4
1
vote
1 answer

Problems with binary generated by solc

I'm compiling a contract with solc and I'm getting something like this (I replaced most of the hexadecimal digits with three dots to make it…
dgaviola
  • 175
  • 11
1
vote
0 answers

Linker not working on solc v0.4.23

I can't seem to make the linker.linkBytecode() method to work... Here's how I'm using it: const linkedBytecode = linker.linkBytecode(mainContract.bytecode, { 'UserLib': userLibContract.options.address }); If I try to…
wbt_
  • 31
  • 3
1
vote
1 answer

Is there a way to compile solidity code to javascript in javascript?

This example constructs the javascript code from a solidity code in a shell script. https://github.com/okue/Hello-Ethereum/blob/master/bin/compile Is there a function in javascript that can convert a solidity code to a javascript code without having…
user1424739
  • 131
  • 6
1
vote
1 answer

Compilation Error with Solc - Solc Error: dyld[30112]: Library not loaded: '/opt/homebrew/opt/z3/lib/libz3.dylib'

I recently updated my solc to the latest version for foundry testing and contract compilation. I have an M1 mac and I am using Mac OS Monteray 12.5 Suddenly I am getting an error when trying to use solc Error: Solc Error: dyld[30112]: Library not…
Kate Johnson
  • 161
  • 1
  • 7
0
votes
1 answer

Solc "bin-runtime" not a command?

I can generate the .bin of a contract with solc as follows: solcjs --bin -o output contract.sol However running the following command: solcjs --bin-runtime -o output contract.sol Generates the following: Invalid option selected, must specify…
ZhouW
  • 1,348
  • 2
  • 18
  • 35
0
votes
1 answer

Does solc generate the same byte code everytime?

I came from this question: How does Etherscan know the uncompiled contents of contracts? I'm wondering if the same solc compiler version would generate the same bytecode for the same contract every time?
daisy
  • 284
  • 1
  • 8