Podcast #128: We chat with Kent C Dodds about why he loves React and discuss what life was like in the dark days before Git. Listen now.

Questions tagged [solc]

Questions related to the compiler for Solidity: solc

Filter by
Sorted by
Tagged with
3
votes
2answers
3k views

compiling solidity code using solc@0.4.10 on node.js

Trying to compile solidity smart contract on windows using solc@0.4.10. But the code breaks with the below error, and this happens only for the contracts in which import statements are there, other ...
1
vote
1answer
1k views

Error: Expected import directive or contract definition

Terminal output me this error when I run: solc --bin --asm c1.sol pragma solidity ^0.4.11; contract Cm { uint256 a; function Cm() { a = 1; } } solc --version --> 0.3.5-...
1
vote
0answers
58 views

Where in the compile process do storage indexes get assigned to variable names and where can I sniff that data?

I have found the articles explaining how storage works and I understand that if I have a mapping that I need to know the key. What I'm trying to do is figure out how given, solidity code, abi, and ...
7
votes
1answer
293 views

Tracing back tripped require() to a source code line

What would be the process to map failed transactions (require, throw, etc.) back to the source code line where they occurred? Any examples of such yet?
0
votes
1answer
159 views

EVM stack question

I have this simple Smart Contract contract C { uint256 a; function C() { a = 1; } } running solc --bin --asm c1.sol it throws out: ======= C ======= EVM assembly: .code: ...
0
votes
1answer
309 views

undefined contracts.contractName after compiling with solc

After compiling a smart contract with solc. I'm hitting some issues and would love some pointers for debugging/troubleshooting. Description $ node > var solc = require("solc") >...
2
votes
2answers
588 views

Easiest way to compile solidity in user's browser?

I'd like to compile solidity in the browser. web3 has deprecated compile() features so you can't call web3.eth.compile.solidity() anymore. I tried to browserify require('solc') / require('solc/...
0
votes
1answer
424 views

Where truffle save the compiled contract

I'm trying to find where truffle store the compiled code. I'd like to take this bytecode and to deploy it manually with MyEtherWallet
1
vote
1answer
1k views

Where are Solidity mappings stored?

Are Solidity mappings stored in memory or storage? I know that keys are hashed to a unique identifier for the value, which is stored where? I can't seem to find any clue in the documentation.
2
votes
0answers
124 views

Is it possible to get compiler version from the bytecode and smart contract code?

The problem is that I have deployed some contract on the etherscan.io some time ago. Now I want to verify it, so I need to specify: Smart contract code Compiler version ABI encoded constructor ...
2
votes
1answer
281 views

How to compile solidity release version

I've followed instruction to build solidity. But when it finished, i've got develop version: Version: 0.4.16-develop.2017.8.31+commit.d7661dd9.mod.Linux.g++ I've tried to run make with argument ...
1
vote
1answer
43 views

Prevent Remix from recompiling in real time?

How do I prevent online Solidity Compiler called "Remix" from recompiling my code real-time? When using features like Oraclize, the recompilation takes long and happens all the time, making the ...
4
votes
1answer
2k views

The solc is not generatig *.abi file with the option --abi and -o build

When I use the --abi option, the abi interface is generated: $ solc Greeter.sol --abi ======= Greeter.sol:mortal ======= Contract JSON ABI [{"constant":false,"inputs":[],"name":"kill","outputs":[],"...
1
vote
0answers
577 views

How to query the blockchain data ?

I am developing an KYC dapp where I am keeping customer information like name, dob, age etc. Each customer is having an account address ( i.e Ethereum account). Basically this is a private blockchain. ...
0
votes
1answer
2k views

Solidity compiler command-line utility (solcjs) various problems

I am trying to compile a file using solcjs from a command-line, and running into various problems. First of all, I need to supply in the command-line all the files that are imported by the primary ...
2
votes
1answer
589 views

Node JS module in Geth is not found

I have installed solC module with command: npm install solc How can I use this module in Geth? When I execute var solc = require("solc") in Geth's console, interpreter throws: Error: Cannot find ...
2
votes
1answer
827 views

TypeError when trying to deploy a contract with web3 1.0.0-beta.11

I'm trying to figure out how to deploy a contract with web3 in version 1.0.0-beta.11, and I don't know if I'm hitting a bug in web3, an incompatibility issue with the version of solc I'm using, or if ...
2
votes
0answers
240 views

what does the UnimplementedFeatureError mean?

I'm getting the following error in remix.UnimplementedFeatureError: Non-padded store for function not implemented.
7
votes
3answers
929 views

Alternative to deprecated Greeter example code?

After loads of research, it seems the Ethereum.org Greeter example code no longer works. Here's the GitHub issues thread: https://github.com/ethereum/go-ethereum/issues/3793. There are some ...
8
votes
1answer
666 views

How to get a contract verified on etherscan?

I'm having a hard time getting a contract verified on Etherscan. I deployed the contract using Ethereum Wallet, I can effectively find it on Etherscan but when I copy-paste the exact same code to the ...
1
vote
1answer
357 views

“Skipping non-existent input file” error using solc docker on Windows

I'm trying to setup a local build environment for Solidity on Windows (10). One of the options recommended in the Solidity docs is docker. Superficially, the docker image runs fine: C:\work\eth>...
2
votes
0answers
101 views

Accepting Map or JSON in a constructor or method

I have a question: Can a Contract accept a HashMap kind of a data structure or some kind of a JSON structure of the following format in its Constructor? [ {key1 -> {val1, val2, val3}}, {key2 ->...
6
votes
1answer
4k views

How to include solidity file into another?

I completely stuck on modules importing into Solidity contract. Here is my files/directory layout: . |-> contracts/ |-> contract1.sol |-> contract2.sol File contract1.sol contains only ...
1
vote
1answer
62 views

Problem while retrieving from array

I have the following simple structure and array of that structure: struct Document { bytes32 ownerID; bytes32 documentID; bytes32 name; } Document[] public documents; I'...
0
votes
2answers
27 views

What's wrong in this mapping code?

Could someone please point out what is wrong in this code? It seems that when I call the registerClient() function, it succeeds and returns TRUE. But when I call the getRegisteredClients() method, it ...
4
votes
1answer
1k views

What is the proper way to build and call a specific version of solidity?

I am getting the following error from solc: Error: Source file requires different compiler version (current compiler is 0.4.11-develop.2017.6.22+commit.68ef5810.Darwin.appleclang - note that nightly ...
1
vote
1answer
163 views

The Solc Compiler on OSX - Hello World

I'm trying to do the hello world app seen here https://www.ethereum.org/greeter#compiling-your-contract. It says I should be able to do eth.getCompilers() The first you can get by using a ...
5
votes
1answer
2k views

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/...
2
votes
1answer
523 views

Downgrade Geth from 1.6 to 1.59 to have solc integrated in Geth

I have this project on ropsten testnt that don't want to keep developing but keep on running. Since they took solc out of Geth on v1.6, I get the error method eth_compilesolidity does not exist. Is ...
3
votes
1answer
729 views

Deploying the smart contract using Web3.js gives error?

I'm deploying a smart contract using the following guide but getting a strange error - Guide: https://tokenmarket.net/blog/creating-ethereum-smart-contract-transactions-in-client-side-javascript/ ...
6
votes
1answer
527 views

Compiler Issue or Improper State Variable declaration?

After seeing some unexpected compiler results, I've reduced the issue to this tiny example: The following compiles under 0.4.10 in Remix: contract StorageMapping { struct S { mapping(...
1
vote
0answers
569 views

Why is the balance of the ethereum account still zero after I create a token based on the private chain I built?

0 down vote favorite I used the contract codes available on the ethereum official website,to create an advanced token on the private chain run in geth console. The version of geth is 1.5.5,and the ...
6
votes
3answers
476 views

Solc Compiler oversight? Innappropriate mapping declaration overwrites storage

I have written a contract that has the mapping storage variable A & B. These variables get initialized with some values in constructor. A method getBalance returns the balance from mapping A & ...
4
votes
1answer
264 views

Unexpected implicit casting in Solidity's exponential operator

While investigating an incorrect token award bug in an ERC20, it's come to light that there is an apparent inconsistency in casting with regard to the exponential operator a**b. In particular, the ...
4
votes
1answer
96 views

Parse contract to retrieve declared identifiers

Node.js Solidity compiler parses contract and returns its ABI, is there any library to retrieve all declared identifiers in a contract? For example, the following contract: contract Person { ...
1
vote
1answer
705 views

method not available: solc (solidity compiler) not found

I am using ethereum-ruby to deploy smart contracts. I am using JSON RPC calls to my geth and its working pretty well. But when i use compile_solidity I get: "error"=>{"code"=>-32603, "message"=&...
5
votes
2answers
3k views

Install Solc Compiler on Windows 8

I need a command line compiler in order to make an expert system that automatically builds, tests, and deploys systems of smart contracts based only on metadata. I have tried for several days to ...
1
vote
0answers
29 views

Solidity compilation issue on Linux Mint [duplicate]

I have a smart contract which I am invoking through webjs. Everything works well untill I am on Windows. Recently i had to move to Linux Mint. Now when i compile the contract. I get stdin in the ...
4
votes
1answer
764 views

solc returns empty bin for contracts with constructor and inheritance

Having a simple contract structure like this: pragma solidity ^0.4.8; contract A { uint public a1; } contract B is A { uint8 public b1; } I can compile it with: > solc --combined-json "abi,...
1
vote
2answers
552 views

How do we convert uint8[3] to uint8[]?

So the code is struct A { uint8[] a; } I want to initialize A by A a = A([1,2,3]);. However, solc says that can't convert uint8[3] to uint8[]. In conclusion, I am looking for a way to convert ...
3
votes
1answer
1k views

How to call imported Contract using Solidity?

Inside my contract I want to use importkeyword to load other contracts and libraries to make my code more clean. As an example, I carried DateTime.sol contract to another file and import it inside ...
4
votes
1answer
140 views

Setting a struct once cause error while compiling: Stack too deep

See my smart contract below : contract Test { struct MyBool { bool initialized; // /!\ if false then 'NA' else fetch value's property bool value; } struct Patient { ...
1
vote
0answers
29 views

How to change the compiler the mix-ide uses?

I have build the mix-ide from source, is there a way to change the solidity compiler it uses? I have tried to simply replace the solidity folder in the webumbrella directory with a new version but ...
2
votes
1answer
332 views

Cannot run solc

After following the install instructions here: http://solidity.readthedocs.io/en/latest/installing-solidity.html When I try and run solc, I get the following error: solc: error while loading shared ...
4
votes
1answer
308 views

Is the Solidity compiler deterministic?

I am aware that you have to specify the Solidity compiler version and whether or not you use the optimisation flag. But even with all that considered - is the compiler deterministic?
4
votes
2answers
3k views

Can't install solc on Mac OS X

I can't install solc on Mac OS X. I have tried the following: npm install solc /Users/punddalinni └── solc@0.3.0-1 npm WARN enoent ENOENT: no such file or directory, open '/Users/punddalinni/...
2
votes
1answer
742 views

deploying a contract from geth

Hi I have been trying to deploy a contract from geth console to the testnet, I established a connection and also mined to make sure its all working... one thing I couldn't do for some reason is use ...
3
votes
1answer
356 views

solc not producing binary

I am trying to compile OwnedRegistrar contract using Solidity. It's like import "./owned.sol"; import "./Registrar.sol"; contract OwnedRegistrar is Registrar, owned { // ... } However ...
4
votes
1answer
355 views

How to deploy a solidity contract to the blockchain. myContract.new is not a function

I have a contract that compiles in browser solidity and solc. Using either the auto-generated deployment code in browser solidity or my own npm version, I end up with the error "myContract.new" is ...
2
votes
1answer
669 views

solc not importing from github

In a Solidity source file I have an import along the lines of... import 'https://github.com/<username>/<repo>/<source>.sol'; which works fine in Browser Solidity but solc (ver 0.3....