Most Popular
1500 questions
58
votes
1 answer
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 ?
dor
- 725
- 1
- 5
- 5
58
votes
3 answers
What are the pros and cons of Ethereum balances vs. UTXOs?
Ethereum has a simpler model by not having UTXOs (Unspent Transaction Outputs) like Bitcoin.
What does Ethereum "give up" by not having UTXOs, and what does it gain?
eth
- 85,679
- 53
- 285
- 406
58
votes
6 answers
error: replacement transaction underpriced
Im trying to send a raw transaction using web3 to ropsten testnet and Im getting this error:
replacement transaction underpriced
where sometimes my tx works and sometimes I get this error.
my tx parameters:
const nonce =…
Ernane Luis
- 825
- 1
- 10
- 16
57
votes
4 answers
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 from the test contract I created.
The first…
MethDamon
- 803
- 1
- 8
- 9
57
votes
5 answers
Who is msg.sender when calling a contract from a contract
When I call a function in my contract which calls another function in another contract. In the second called contract function who is msg.sender? the contract calling the second contract or my account?
Daniel Gretzke
- 1,279
- 1
- 9
- 23
57
votes
4 answers
The Ether denominations are called Finney, Szabo, and Wei. What/who are these named after?
This was recently asked on Reddit.
To expand, who are Finney, Szabo, and Wei, and what did they do/contribute to the project that warranted being awarded denominations?
Tjaden Hess
- 37,046
- 10
- 91
- 118
57
votes
2 answers
Is there a limit for transaction size?
Is there a theoretical limit for transaction data size when you send a transaction to Ethereum network?
Ref.
Is there a (theoretical) limit for amount of data that a contract can store?
Satoshi Nakanishi
- 5,749
- 7
- 38
- 57
56
votes
3 answers
How to reduce the chances of your Ethereum wallet getting hacked?
Summary
The hack that occurred on May 12 2016 to steal 7,218 ethers from Patrick only affects miners where:
Incoming RPC connections from the Internet on TCP port 8545 are forwarded to the machine running the Ethereum node software geth;
geth is…
BokkyPooBah
- 40,274
- 14
- 123
- 193
56
votes
4 answers
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 Ethereum addresses have checksums? Was it an oversight…
eth
- 85,679
- 53
- 285
- 406
56
votes
2 answers
What does the keyword "memory" do exactly?
I've been looking through the code of Etherdice and noticed that some variables are declared like
ParserResult memory result;
and I haven't found the keyword "memory" in any documentation.
What I found on here was this explanation:
They are…
uberlaufer
- 955
- 1
- 9
- 9
56
votes
4 answers
What proof of work function does Ethereum use?
The Ethereum frontier network currently uses a proof of work (PoW) based consensus algorithm. But which specific PoW function does that algorithm use, and why was it chosen?
Jeff Coleman
- 22,059
- 17
- 77
- 91
56
votes
3 answers
What is an Event?
What is an Event?
Are they only used in Solidity?
How are events defined?
How are events initiated?
Is there a standard term for an event's invocation (do you say an event "happened", "was called", "was invoked","triggered")?
Where in the block…
Lee
- 8,548
- 6
- 46
- 80
55
votes
4 answers
What is the zero, empty or null value of a struct?
If I have a mapping of string => custom defined struct, how do I check if a value is defined in the mapping?
The docs state that "every possible key exists and is mapped to a value whose byte-representation is all zeros".
What is the zero-value of a…
Thomas Clowes
- 4,385
- 2
- 19
- 43
55
votes
3 answers
how to remove unused test accounts from Metamask
i use metamask chrome extension with testRPC to do my testing
now metamask have over 20 dead accounts just sitting there in the list
my question how to you clear loose unused test accounts from Metamask
Nerdroid
- 817
- 2
- 8
- 19
54
votes
6 answers
Time-dependent tests with Hardhat?
For Ganache, there are several solutions.
What about Hardhat? They implemented their own local blockchain, Hardhat Network, which is different to Ganache.
Paul Razvan Berg
- 17,902
- 6
- 73
- 143