Linked Questions

26
votes
6answers
15k views

How to compile Solidity contracts with Geth v1.6?

I tried to compile the following contract within geth: pragma solidity ^0.4.8; contract Test { uint256 public value; function Test() { value = 123; } } using the following ...
14
votes
5answers
32k views

Where can I find some Solidity / Smart Contract source code examples? [closed]

Is there an easy to access list of Solidity / Smart Contracts / Dapps source code examples? Related information: Is there a list of DAPPS that are already useable? Where can I learn how to develop ...
12
votes
1answer
5k views

How to write my first Solidity “Hello World” smart contract?

I have never written a smart contract before because there is a lot attached to it getting it working. But I finally want to learn it now. I want to write a simple mininmal working smart contract ...
5
votes
2answers
3k views

How does EtherScan know I am sending to a Shapeshift/Poloniex wallet?

I have noticed many transactions on Etherscan that indicate one of the parties is a certain type of wallet (e.g. Poloniex or Shapeshift). Here is an example. How does it identify the source? Do these ...
9
votes
2answers
2k views

Unable to define greeterContract in the Greeter tutorial. Breaking change in Solidity 0.4.9!

I was following the Greeter tutorial on Go Ethereum wiki and got stuck on the "var greeterContract = web3.eth.contract(greeterCompiled.greeter.info.abiDefinition)" phase returning TypeError: Cannot ...
5
votes
3answers
4k views

How to execute Smart contracts on a private Blockchain network

I have created a private Blockchain network on my Windows system with one node. I have created accounts and was able to transfer ethers across them. Now I want to deploy smart contracts on this ...
10
votes
4answers
881 views

Unable to make greeter contract

For the past 7 days I've been trying to make the greeter contract, I've been through 4 different physical computers in 2 different locations and have tried multiple different ways on 3 different ...
5
votes
2answers
467 views

What’s the role of the EVM in a plain ether transfer between Externally Owned Accounts?

In a plain ether transfer from one Externally Owned Account to another, for which the base fee of 21000 gas has been provided, how is the EVM involved if at all? I realize that the signature needs to ...
5
votes
1answer
3k views

Deploying Smart Contract into Ethereum testnet

I have followed this guide https://ethereum.stackexchange.com/a/2787/2426 (or equivalently https://www.ethereum.org/greeter ) when trying to deploy a simple Smart Contract into Ethereum testnet. I am ...
5
votes
3answers
2k views

Why is my Greeter contract not mined on --testnet?

I'm working on the contracts tutorial. Here's the code (including contract): var greeterSource = 'contract mortal { address owner; function mortal() { owner = msg.sender; } function kill() { if (msg....
5
votes
3answers
889 views

Do I need to be synced to the blockchain to create a contract?

I haven't been able to run the Greeter contract on the live network and am referring to these excellent Q&As for guidance. I have a feeling that it's because my client hasn't finished syncing with ...
2
votes
2answers
597 views

What programs should a beginner solidity developers use?

At this time I write code in the 'Solidity realtime ethereum compiler and runtime' chrome extension. And I test my codes on the main net. Are there better programs or how can I get test ether?
7
votes
1answer
1k views

How to call Library Function from a Contract? => [error] The contract code couldn't be stored, please check your gas amount. undefined

When I compiled following code at "https://ethereum.github.io/browser-solidity/" it gives me two Web3 deploy code for: var libraryContract = web3.eth.contract(...); //Web3 deploy code var ...
5
votes
2answers
931 views

Create contract in Go-ethereum with Solidity, “Hello world” program

I want to create contract in go-ethereum using Solidity, I started with "Hello world" program. I create a private network: $geth --genesis private.json --networkid 1234 --datadir /home/user/...
5
votes
1answer
748 views

Can I run Geth connected to public network without syncing and do a smart contract function transaction and expect it to mine?

Is there a way to run Geth connected to public Blockchain without syncing and still expect my smart contract function transaction to be mined ?? as following answer Can I run Geth without syncing? ...
4
votes
2answers
748 views

Contract not deploying on blockchain using solc & web3

I am using the npm package of solc to compile the contracts and accessing it as given here. It is compiling my contracts. But when I try to deploy the contract using web3.eth.sendTransaction({data: ...
3
votes
1answer
2k views

Greeter variables are all undefined and contract doesn't run

I'm attempting to run the greeter contract on the live network. I'm following the commands as per the official tutorial, which worked on a test network when I tried it a while ago (on a different ...
2
votes
2answers
2k 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
1answer
554 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 ...
5
votes
1answer
586 views

After loading the solidity script, i get null [object Object]. What should i do?

I wrote a contract greeter and mortal, they are as follows: contract mortal { address owner; function mortal() { owner = msg.sender; } function kill() { if (msg.sender == owner) ...
2
votes
1answer
607 views

Calling a smart contract in response to an external event

I am trying to log all access operations on a file storage in Ethereum. The access operations are read, write, update and delete. Every time, a user does any of these operations on the file storage, I ...
3
votes
1answer
421 views

Gas not enough and not able to run functions

I am a new comer to the Ethereum and I am writing a piece of smart contract for my project. I used Win 10 and Mist 0.8.8 with the testnet that started with "R". The contract code has the functions of ...
1
vote
0answers
553 views

greeter.address Undefined while deploying the contracts

From Past 3 Days I am trying to deploy my 1st greeter contract But always I am getting the Undefined greeter.address. Below Steps I am following 1) geth Version C:\Block_Chain\Eth_1>geth version ...
1
vote
1answer
368 views

Problem compiling/deploying Solidity contract

I am trying to compile and deploy simple contract : var Web3 = require("web3"); var web3 = new Web3(new Web3.providers.HttpProvider("http://localhost:8545")); var source = "" + "contract test {\n" ...
5
votes
1answer
204 views

Help needed - Contract is deployed but execution of method always returns Zero

I have created a private blockchain and trying to create a sample contract given in https://github.com/ethereum/go-ethereum/wiki/Contracts-and-Transactions I could create, compile and even deploy the ...
5
votes
1answer
227 views

web3.eth.compile.solidity(source) throws me Invalid JSON RPC response

I am relatively new to Blockchains and when I execute the following command I am getting an error. contract mortal { address owner; function mortal() { owner = msg.sender; } ...
1
vote
1answer
137 views

Can't fix the “block gas limit” error for the greeter example.

I'm trying to build my first smart contract. I'm trying to do the example here https://www.ethereum.org/greeter. So it seems that this example is so out of date it doesn't work at all. I've been ...
1
vote
2answers
92 views

Greeter Contract - deploy command results in “undefined” [duplicate]

I am trying to deploy the Greeter contract on a private test chain following this guide (Deploying the Greeter contract via the geth CLI is not registering in my private blockchain) When I get to the ...
0
votes
1answer
60 views

How do miners work in private network? What is their importance?

I'm a newbie to the blockchain technology and working on the smart contracts using Ethereum. Help me understand the concept of miner in this technology. I have followed the steps given on https://...
1
vote
0answers
22 views

Ethereum Contract Deployment [duplicate]

var greeterContract = web3.eth.contract(greeterCompiled.greeter.info.abiDefinition); I am getting this type of error on geth console: TypeError:Cannot access member 'info' of undefined at :1:41 I ...