All Questions

Filter by
Sorted by
Tagged with
12
votes
4answers
4k views

How to Compile and Deploy a Smart Contract without running a full node?

I'm new to solidity and smart contract programming. I have already made and deploy smart contracts successfully, but always using Mist. Now I'm not able to do so, because I can't complete a node ...
23
votes
4answers
16k views

How can I empty the blockchain?

I am trying to do a fast sync using geth --fast but I am getting this message: blockchain not empty, fast sync disabled How can I empty the blockchain to allow for fast sync?
20
votes
5answers
10k views

How do I import my presale wallet?

I purchased ether during the presale. Is there an easy way to import those ether and start using them?
16
votes
2answers
9k views

What is the parity light pruning mode?

Parity offers four different pruning methods: archive, basic, fast and light: --pruning METHOD Configure pruning of the state/storage trie. METHOD may be one of ...
17
votes
3answers
3k views

What are the limits to gas refunds?

Gas refunds are provided when clearing storage or calling SELFDESTRUCT on contracts. The Yellow Paper mentions that refunds are "being capped up to a maximum of half...". What exactly is this "half" ...
14
votes
2answers
2k views

Can a contract access another contract's storage?

I have a contract with numerous complex structs. Is it possible for a second contract to iterate over this data directly? I can't really use public accessor/getter methods as it's not possible to use ...
10
votes
1answer
3k views

Can I unlock an account using JSON-RPC?

The only way I can work with ETH is through --rpc mode. Normally I would prefer to use the Python interface. But I found myself in a situation where the RPC is very limited. For example, I can't ...
14
votes
1answer
6k views

Are pending transactions “dropped” and “reinstated”?

I tried a simple transfer of ether between two accounts using geth, but set quite a low gas price (2 gwei). After two hours the transaction was still showing in geth under eth.pendingTransactions - I ...
6
votes
1answer
2k views

Store secret data in contract [duplicate]

I know about the general open / trustless protocol of storing transactions. How would I approach a scenario here where I want to store some data in a contract on deployment, to later be retrieved by ...
9
votes
1answer
2k views

Does Solidity's constant keyword do anything?

It seems that the purpose of function foo() constant {} is to indicate that a function does not change the contract's state. And yet, as it states here, the compiler doesn't actually enforce this. So ...
57
votes
2answers
20k views

What OPCODES are available for the Ethereum EVM?

The Ethereum virtual machine has a large number of operation codes and base level instruction sets. Is a complete listing available?
36
votes
2answers
5k views

What are the steps to compile and deploy a library in Solidity?

I have several pieces of documentation about libraries, but I am not yet able to infer what steps are needed to compile and deploy a library and then a contract that uses it. The behavior of the ...
41
votes
1answer
9k views

Are underscores `_` in modifiers code or are they just meant to look cool?

I often see _ in modifiers modifier onlyOwner() { if (msg.sender != owner) throw; _ } Does it execute any code or is it meant to make the code easier to read ?
28
votes
3answers
23k views

How to convert a string to bytes32?

How can I convert a string to a bytes32? Does anyone has a magic function or library which does it? For example: This works since as input I gave 32-bits. But it won't work with "> 32-bit" chars. ...
30
votes
2answers
28k views

How can I store data in ethereum blockchain

I want to store pdf hash in blockchain I already read this post What are some proposed ways of storing data in Ethereum? But I'm beginner in this domain and I don't understand... Is it possible to ...
30
votes
1answer
10k views

What are event topics?

I know that indexed arguments index the values for those arguments so that filtering will be faster. But what are topics? And what are they used for? I know that signature of an event is a topic. ...
32
votes
1answer
3k views

How do I make my DAPP “Serenity-Proof?”

When Serenity comes around, the network will undergo many changes, some of which may have unexpected consequences on existing Smart Contracts. How can I plan so that I am best prepared to take ...
35
votes
1answer
14k views

What's the difference between Accounts and Wallets in Mist?

In Mist, there are some addresses listed as accounts, and some listed as wallets. What's the difference? Which should I use? And why do I need Ether to create a Wallet?
7
votes
2answers
3k views

What elements of a Dapp's backend are usually stored in a decentralised location?

I'm unclear as to what elements of a Dapp's backend code are actually decentralised. The following link states that a Dapp's backend is stored entirely on the blockchain. However, if I was to create ...
42
votes
3answers
22k views

What is a sidechain?

The Ethereum subreddit has this post related to an Ethereum-Dogecoin sidechain. What is a sidechain? Could one sidechain be a private Ethereum network?
18
votes
1answer
14k views

Steps to deploy a contract using MetaMask and Truffle [closed]

i'm noob, I want to deploy my contract on Ropsten network with MetaMask & Truffle, plz explain to me the steps to deploy it.
38
votes
5answers
27k views

How to delete an element at a certain index in an array?

Anyone know how to delete an element in a array? Is there any built in method to do that? If not, does anyone know of how to implement such a method?
35
votes
5answers
22k views

How to concatenate strings in solidity?

I'm trying to concatenate two strings in solidity. I tried with + or . but neither option works. There is not much documentation on string concatenation yet. Is it even possible? If not, can I ...
19
votes
3answers
4k views

Account uniqueness guaranteed?

When we create an account in the Ethereum main network, how does the protocol guarantee the unique address of an account? Since even if we are not connected to the network we can create an account, is ...
19
votes
2answers
15k views

How to estimate gas at contract creation/deployment to private ethereum blockchain

What I have done a) When I use web3.eth.estimateGas to estimate the cost of a contract creation constructor with no parameters, the estimate is correct. b) If the contract is already deployed then ...
15
votes
7answers
8k views

Block explorer running on private network

Is there any application out there that allows me to explore the Ethereum blockchain in a private network? (something similar to what blockchain.info does to bitcoin or etherchain does to ethereum ...
11
votes
1answer
6k views

What are some proposed ways of storing data in Ethereum?

I keep reading that swarm or ipfs would be used for storage, but how would that work exactly? Would an ethereum contract store its data in these data blockchains? I thought ethereum smart contracts ...
18
votes
6answers
13k views

How to set a different datadir in Mist?

With bitcoin and others, you can use --datadir option to specific where blockchain, keystore, etc are saved. But doesn't work with Mist. From the offical wiki: To configure the location of the ...
15
votes
1answer
965 views

Concealing sensitive data in a public contract

I have some sensitive data I'd like to keep in my contract in privacy. I'd like to make a simple version of Zero-Knowledge Proofs and have an idea in mind. Let's say I have a customer who filled out ...
20
votes
1answer
6k views

What are *C*, *E* and *S* properties in message call return object?

(JS) var contract = web3.eth.contract(abiDefinition).at(address); contract.test(value, gotResult); function gotResult(error, result) { if(!error) { console.log(...
23
votes
5answers
16k views

Paying a transaction fee with an ERC20 token

As far as I understand, one of the ERC20 token's features is that you can pay a transaction fee with it. In other words, you can send them without having Ether. I transferred REP tokens to the ...
10
votes
4answers
970 views

What is ether? How is it different from other tokens such as bitcoin?

What is ether? How does it differ from past tokens such as bitcoin and litecoin? What are all the usages of ether?
20
votes
2answers
5k views

By what mechanism are ASIC-based miners made less favourable?

Bitcoin mining is dominated by miners that use ASIC-based mining equipment, thereby skewing the mining rewards in favour of those able to afford large numbers of ASIC mining rigs. Ethereum prevents ...
9
votes
2answers
5k views

Solidity functions - private visibility

Is the following function parameter (string name) only visible to the owner contract itself? function myFunction(string name) private returns (bool) { return true; } So nobody can read / see ...
12
votes
1answer
4k views

Why isn't fast sync the default?

As I understand, fast sync has all the security guarantees of a full sync, but is faster. Is that correct? If so, why isn't fast sync the default?
1
vote
1answer
1k views

solc.compile() @0.5.0 is not working like 0.4 version

I read the solc document and followed the instruction. When I am using solc@0.4.24 version, compile command is working fine solc.compile(smartContractPath, 1); When I switched to solc@0.5.0 version, ...
51
votes
4answers
13k views

Why don't Ethereum addresses have checksums?

A checksum, similar to its use in Bitcoin addresses, can primarily prevent mistyped or invalid addresses from being used, before a transaction with an invalid address is constructed. Why don't ...
29
votes
3answers
11k views

What happens when a transaction nonce is too high?

From Design Rationale: One weakness of the account paradigm is that in order to prevent replay attacks, every transaction must have a "nonce", such that the account keeps track of the nonces used ...
37
votes
2answers
11k views

How do I detect a failed transaction after the Byzantium fork as the REVERT opcode does not consume all gas?

Pre Byzantium fork, I could use gas == gasUsed to detect when a transaction has failed (further details in How can the transaction status from a thrown error be detected when gas can be exactly the ...
23
votes
3answers
19k views

How can I expose Geth's RPC server to external connections?

I want to set up a private network of applications which can connect to a single Geth node. What options do I have for exposing the RPC server? I'm running this: geth --rpc --testnet (sometimes I use ...
37
votes
3answers
64k views

How to delete or reset the blockchain in geth? (OSX)

I have a currupt Blockchain and want to hard reset the chain. what do I need to delete in order to start downloading the chain from scratch? I know that there are 2 ethereum folders (I am on OSX): $...
48
votes
7answers
7k views

How can I verify that a contract on the blockchain matches the source code?

Given the (Solidity) source code of a smart contract, is there a way to deterministically compile the code and compare it with the code on the blockchain? I want to verify that the contract does what ...
35
votes
2answers
3k views

What's a precompiled contract and how are they different from native opcodes?

The Yellow Paper states: These are four so-called ‘precompiled’ contracts, meant as a preliminary piece of architecture that may later become native extensions. The four contracts in addresses ...
29
votes
4answers
19k views

When to use “View” and “Pure” in place of “Constant” [duplicate]

According to the solidity 0.4.17 Release Notes this release finally checks the modifiers view (used to be named constant) and pure on functions. As a rule of thumb, use view if your function ...
63
votes
1answer
10k views

Why is the average block time 17 seconds?

The network stats show a constant average blocktime of around 17 seconds. Whenever you check it is around 16~18 seconds. Reading the blog post by vitalik buterin it states the block time should be 12 ...
12
votes
2answers
13k views

how to estimate gas cost?

I have a function that iterate through an array, which could cost a lot of gas. But I still want to test out the estimate gas cost, then decide if I should maintain the design or not. function ...
24
votes
1answer
29k views

Geth node starts to sync from the beginning after fast sync

I have synced using the --fast command. Now how should I proceed? I tried stopping it, and then running geth --rpc but it says: Last Header #1311471 Last Block #0 Fast Block #1310224 What should I ...
24
votes
3answers
9k views

How does Solidity's sha3 / keccak256 hash uints?

This is not a question about the issue with Ethereum using a non-standard sha3. I have found the right JS hashing library, and am able to get matching hashes in JS and Solidity on byte strings. What I ...
22
votes
2answers
13k views

How to pass arbitrary bytes to a function in Remix

According to this question I could write a simple contract like: contract SimpleStorage { bytes input; function setInput(bytes enterBytes){ input = enterBytes; } } Using "0x1234" as a ...
38
votes
6answers
34k views

How do you get a json file (ABI) from a known contract address?

I want to watch a Solidity contract using the Mist browser. I know how to do that and it needs the address and the json. I have the address, but I don't have the json. I do have the source code. Can ...

15 30 50 per page