Most Popular

1500 questions
90
votes
9 answers

How can I check if an Ethereum address is valid?

I've read many times that you should never input an address by hand unless you want to accidentally send Ether into no-mans-land. I'd like to know what those checksums might be. Is there a way to tell a typo is occurred? How, and what are the…
ZMitton
  • 2,750
  • 4
  • 19
  • 34
89
votes
6 answers

What is the total supply of Ether?

In Bitcoin, the total supply is capped at 21 million BTC. Is the total supply of Ether capped? How much will be mined before the Proof of Stake (POS) transition, and how will POS affect the issuance model?
Tjaden Hess
  • 37,046
  • 10
  • 91
  • 118
84
votes
2 answers

ELI5 How does a Merkle-Patricia-trie tree work?

I understand that Merkle tree are Hashes of Hashes, they have the advantage that you can verify only a subtree. But what about Patricia? What does a trie mean? And how is it used in Ethereum?
Roland Kofler
  • 11,638
  • 3
  • 44
  • 83
82
votes
5 answers

What actually is a DAG?

I have tried googling it as well as finding it here. Many people here talk about it, but what actually is a DAG?
Tomas
  • 861
  • 1
  • 7
  • 3
81
votes
13 answers

How to get contract internal transactions

I'd like to get the contract internal transactions like: https://etherscan.io/address/0xd654bdd32fc99471455e86c2e7f7d7b6437e9179#internaltx I'm using web3 API. Is there any way to do it? Where do they appear in the blockchain?
Paul Exchange
  • 2,723
  • 3
  • 21
  • 26
80
votes
2 answers

Solidity: What is the difference between `view` and `constant`?

Solidity 0.4.16 introduced the view and constant function modifiers. The documentation says: constant for functions: Same as view. Does this mean view is just an alias for constant? If so, why do we need it?
SCBuergel
  • 8,774
  • 7
  • 38
  • 69
79
votes
4 answers

Is the block.timestamp value in Solidity seconds or milliseconds?

I'm looking to use block.timestamp in one of my contracts and I want to know whether the block.timestamp is seconds like in Python or milliseconds like in Java or some other value? Also, is it safe to use block.timestamp to check if 30 days is past…
etherfaces
  • 1,153
  • 1
  • 9
  • 11
79
votes
4 answers

.send vs
.transfer best practice usage?

I noticed that address's offer two member functions that perform the transfer of ether to the specified address. send returns false upon failure and transfer raises an exception. In the Solidity documentation they offer an example that utilizes both…
Michael
  • 1,065
  • 2
  • 9
  • 8
78
votes
6 answers

Fallback function in Solidity

I have seen many examples of the fallback function in Solidity, but I didn't understand any of them. Also, I've seen references to the payable modifier. My questions are: What exactly does the fallback() function do? Does this function take…
Gopal ojha
  • 2,259
  • 2
  • 11
  • 21
78
votes
3 answers

Is Ethereum wallet address case sensitive?

I sent some amount of ETH to a wallet. I checked the wallets balance on ether chain. I entered the address in the search field and noticed both lowercase and uppercase versions of the address seemed to work. I wanted to buy a few bucks more, but…
user1035
  • 841
  • 1
  • 6
  • 3
77
votes
9 answers

How to get a contract's balance in Solidity?

How do I get the balance of a contract with solidity? I know geth has web3.eth.getBalance(), but that's to get the contract balance after it has been deployed. Is there a standard way of doing this, or do I have to have a separate var that uint256…
user9402
76
votes
2 answers

What does each genesis.json parameter mean?

I'm trying to setup genesis.json for my private network. What does each parameter mean and what value can I set in genesis.json? nonce: any data? timestamp: any time? parentHash: any hash? extraData: put any data if you wish to add? what is the max…
Satoshi Nakanishi
  • 5,749
  • 7
  • 38
  • 57
76
votes
6 answers

How do I buy Ethereum with USD?

I am a complete noob at investing. I have never bought stock or invested in anything before but I have $300 I would like to turn into Ethereum. Could someone please tell me step by step how to purchase and own Ethereum using USD?
Noob
  • 761
  • 1
  • 6
  • 3
76
votes
1 answer

How to Initialize a Struct?

I have a struct like so : struct fooStruct { uint foo; uint figther; } I would like to initialize that struct but it won't be stored in a mapping but inside an array. Is there a way to initialize the struct like fooStruct myStruct =…
jayD
  • 2,462
  • 2
  • 14
  • 25
75
votes
7 answers

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 I generate the json from the source code and/or…
Thomas Jay Rush
  • 9,943
  • 4
  • 31
  • 72