Most Popular
1500 questions
50
votes
3 answers
Where do contract event logs get stored in the Ethereum architecture?
Background on Events:
https://github.com/ethereum/wiki/wiki/Solidity-Features
Events allow the convenient usage of the EVM logging facilities. Events are inheritable members of contracts. When they are called, they cause the arguments to be stored…
Alan Wunsche
- 1,655
- 2
- 16
- 19
50
votes
13 answers
How to decode input data from a transaction?
I'm sending a transaction to an account with some data with the following command:
eth.sendTransaction({from:eth.accounts[0],to:eth.accounts[1],value:web3.toWei(1,"ether"),data:web3.toHex("http://localhost:8545")})
I'm getting this result, by…
FrenchieiSverige
- 1,498
- 1
- 12
- 23
50
votes
2 answers
How do I backup my ether accounts?
I want to backup my accounts onto a USB or other external device for safe-keeping. How can I do that?
Ethan Wilding
- 4,821
- 7
- 24
- 31
49
votes
3 answers
How were gas costs chosen for the Ethereum Virtual Machine instructions?
Different instructions of the EVM have different associated gas costs -- you can look at the list of the gas-prices in the appendix G of the yellow paper.
While the rough magnitudes of those numbers look quite reasonable, the exact values still…
Kostya
- 866
- 1
- 7
- 13
49
votes
5 answers
What exactly is an Ethereum client and what clients are there?
What exactly is an Ethereum client? Is it a full network node that can post transactions to the blockchain (if that is the correct lingo?) or could it also be a light JS client that connects from a browser to a full node?
Could someone please shed…
hcvst
- 2,018
- 2
- 21
- 24
47
votes
1 answer
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 advantage of new features in Serenity and least likely…
Tjaden Hess
- 37,046
- 10
- 91
- 118
47
votes
6 answers
How do I parse the transaction receipt log with web3.js?
The event parser in web3 provides a nice parsing functionality for events, and I use it for logging all events to a file, but it's very difficult to use for looking at individual events for a particular transaction for automated testing because it…
Paul S
- 4,271
- 1
- 22
- 48
47
votes
1 answer
What are Solidity events and how they are related to topics and logs?
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. And also very index argument is a topic.
And here…
Narayan Prusty
- 1,229
- 1
- 11
- 22
46
votes
6 answers
What is the difference between web3.js and ethers.js?
Can anyone write a short comparison between the most important features of the two libraries?
Paul Razvan Berg
- 17,902
- 6
- 73
- 143
46
votes
1 answer
Transaction Status
A very elementary question, how do I get a transaction status after firing the transaction? I mean suppose I do a sendTransaction where I transfer some amount of ether from 1 account to other, how can I check the status of the transaction using its…
Aman C
- 983
- 2
- 11
- 13
46
votes
2 answers
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 1, 2, 3 and 4 execute the
elliptic curve public…
eth
- 85,679
- 53
- 285
- 406
46
votes
6 answers
How can I represent decimal values in Solidity?
I just started writing some solidity and I noticed that there are no decimal values such as double or float.
What do you guys do when you need to return send to a wallet let's say 1.57 ether? Or when you need to calculate 1/2 = 0.5?
I'm very…
sfrj
- 782
- 1
- 8
- 12
46
votes
3 answers
How to write an optimized (gas-cost) smart contract?
As we all know, there are many factors that determine a good smart contract, such as:
Security: it has minimal/zero vulnerability so they cannot be exploited by an adversary. Immune to Attacks.
Cost: how much in total a
(a) smart contract…
Aydin
- 2,117
- 6
- 25
- 41
46
votes
3 answers
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):
$home/.ethereum
$home/Libary/Ethereum
I updated…
xpnimi
- 723
- 1
- 7
- 10
46
votes
1 answer
What does v, r, s in eth_getTransactionByHash mean?
In Ethereum JSON-RPC I found the return is:
Returns
Object - A transaction object, or null when no transaction was found:
hash: DATA, 32 Bytes - hash of the transaction.
nonce: QUANTITY - the number of transactions made by the sender prior to this…
jiebang
- 993
- 1
- 12
- 18