Linked Questions
12 questions linked to/from How to load Solidity source file into geth
57 votes
4 answers
57k views
How to call a contract method using the eth_call JSON-RPC API
Ok, so I'm trying to call a contract method using the methods provided by the Ethereum JSON RPC interface. The JSON RPC is running on an Ubuntu machine. Unfortunately, I can't really get a result back ...
40 votes
5 answers
40k views
Returning a struct and reading via Web3
I am storing data in my contract using a mapping of structs. For examples sake, say I'm storing employee info (name/address/salary), mapped by their employee ID. Via a web front-end, I'd like to be ...
5 votes
1 answer
16k views
Getting 'invalid opcode' error
First of all, sorry for the code in Portuguese, this was a choice of the team and I had no saying on that. I'm writing a Billet Manager, the code is as follows: contract GerenciadorBoletos { ...
8 votes
2 answers
4k views
Syntax for calling contract state changing methods
I've been struggling a bit with calling methods that change the state of the contract. Take, for example, the following contract: contract C { uint[] numbers; function initNumbers() { ...
7 votes
1 answer
9k views
How to compile .sol file from the command-line?
How do I compile a solidity file (e.g. 05_greeter.sol) from the command-line into bytecode? Without using IDE such as Mix.
7 votes
1 answer
3k views
How can I deploy a contract with reference to a library contract without using a graphical user interface like Browser Solidity?
I am using Solidity Browser to deploy a contract due to from Library contract method failing #2831 issue. On this following answer https://ethereum.stackexchange.com/a/9181/4575 I have guided to use ...
6 votes
1 answer
1k views
2 mapped structs with an address array - push not working
Can someone help me understand why the function add in the contract one is not working and in the contract two is? Both are mined and are inserted into the blockchain. Thanks. Not working contract ...
2 votes
2 answers
3k views
How to deploy compiled contract file using the geth cli?
So I've followed the greeter contract tutorial from here to deploy a contract to my private cloud. It works fine and all, but it is rather difficult that I need to create a string from my contract and ...
4 votes
1 answer
874 views
Understanding TokenCreator/OwnedToken example from Solidity documentation
Here's the page containing the example https://solidity.readthedocs.io Here are two contracts that are supposed to work together(my questions are below): Here's how I think it works. Please correct ...
4 votes
2 answers
982 views
BigNumber error while trying to call structs
Consider the following contract: contract Test{ uint public id; address public addr; bytes32 public name; struct t { bytes32 name; uint id; address addr; ...
3 votes
1 answer
295 views
Smart Contract different behaviour on testnet vs Solidity Browser
The following smart contract behaves differently on Solidity Browser and testnet: pragma solidity 0.4.2; contract mortal { address owner; function mortal() { owner = msg.sender; } ...
2 votes
1 answer
192 views
Compiling and deploying Registrar.sol in private network
I created a contract using go-ethereum console, I want to deploy registrar in private network. I found out a way to compile and deploy in https://github.com/ethereum/dapp-bin/tree/master/registrar ...