7
votes
Accepted
Install Old Solc Compiler Versions
I maintain a Python library called py-solc-x that allows you to install and use multiple versions of solc at the same time. It supports versions >=0.4.11. I've included some code examples below to ...
2
votes
Unable to interface the contract while running test.js and how to get the abi while compiling using solc?
There is no real problem with your code. Just take a look at the error message. It tells you that you only have 2 seconds time to execute your code. Cause of the nature of blockchain (and ethereum) ...
1
vote
truffle compile error
use compilers in truffle.config.js to change the solc version to match the contract's solidity version. need to mention that i use solc-select to change my solc golab version before truffle compile.
...
1
vote
How to compile Solidity code in the browser?
browser-solc is a bit out-dated and doesn't work with the latest compiler versions. I updated the browser-solc code so it works with newer compiler versions.
Source code: https://pastebin.com/QxEz6tQU
...
1
vote
Accepted
Using solc to compile contract that imports local OpenZeppelin contracts
I was running into this error because I did not specify all the relevant sources for solc (version ^0.8.0). I solved the issue by writing a recursive function that compiles all the dependencies in the ...
1
vote
Accepted
Different bytecodes using solcjs and remix
The issue seems to be a bug in solcj, see here
Using solcjs --bin ./filename.sol does not indicate the optimization flag, which then should be false but this is not the case. As described by @Kamil in ...
1
vote
Web3j generate command not running
The syntax has changed. Try commands like this:
web3j generate solidity -a PR_sol_ballot.abi -b PR_sol_ballot.bin -o .\Web3App\src\main\java -p com.project.contracts
See also: web3j
1
vote
Library placeholders does not appear in bytecode of compiled contracts - Solc
The functions you use must have been declared public or internal. In that case the compiler will add their bytecode in the resulting contract so there's no need to reference the library. OpenZeppelin'...
1
vote
File import callback not supported in solcjs
There are essentially two different problems in import "contracts/Mortal.sol":
For a local files, the input path name must start with ./
Since your files reside under folder contracts, you should not ...
1
vote
Install Old Solc Compiler Versions
There are a couple of ways to do this and the Solidity documentation has a page on it:
Keep in mind you have the option to use the "cli binary" version (solc-bin) which is quite faster than the ...
1
vote
Accepted
"Cannot import url", "File outside of allowed directories" using --standard-json
When I change input.json to the following, without "file://" and with back-slashes instead of forward-slashes, solc is able to import the URL.
{
"language": "Solidity",
"sources": {
"...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
solcjs × 23solc × 14
solidity × 10
truffle × 3
abi × 3
web3js × 2
npm × 2
go-ethereum × 1
remix × 1
contract-deployment × 1
etherscan × 1
evm × 1
nodejs × 1
contract-debugging × 1
ganache × 1
web3j × 1
openzeppelin × 1
assembly × 1
truffle-deployment × 1
openzeppelin-contracts × 1
bytecode × 1
solidity-0.5.x × 1
compiler × 1
import × 1
truffle-compile × 1