Most Popular

1500 questions
54
votes
8 answers

How to quickly test a Solidity function?

There are snippets and functions of Solidity code provided on this Ethereum Stack Exchange and other sites. What are ways to quickly test them, possibly debug a little, and play around?
eth
  • 85,679
  • 53
  • 285
  • 406
53
votes
1 answer

What are the virtual and override keywords in Solidity?

Solidity 0.6.0 introduced the keywords virtual and override. What do they do?
Shane Fontaine
  • 18,036
  • 20
  • 54
  • 82
53
votes
3 answers

What is Whisper and what is it used for?

It's admittedly a very general question, but I've heard "Whisper" mentioned in several places when reading about certain DApps. I understand it allows peer-to-peer messaging of some kind, but what are the purposes of these messages, and who is it…
Richard Horrocks
  • 37,835
  • 13
  • 87
  • 144
52
votes
7 answers

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 will works since as input I gave bytes32 . But it does not work with the characters greater than bytes32. tx_hash =…
alper
  • 8,395
  • 11
  • 63
  • 152
52
votes
3 answers

Can someone explain the meaning of derivation path in wallet in plain English (such as m/44'/60'/0'/0)?

Like m / purpose' / coin_type' / account' / change / address_index which gives say a value of m/44'/60'/0'/0 What is the meaning of "m", purpose, coin type, etc.
vyap56
  • 660
  • 1
  • 6
  • 7
52
votes
2 answers

What is nonce in Ethereum? How does it prevent double spending?

recently I got fascinated by blockchain, and started learning Ethereum. I came across the concept of the nonce in Ethereum. After researching I found out that nonce is used for two purposes. a. To keep transaction related to an account in order. …
Thinker
  • 837
  • 2
  • 10
  • 14
52
votes
2 answers

Is there a (theoretical) limit for amount of data that a contract can store?

Is there a theoretical limit to the amount of data that one contract can store while running in a private net in which gas is not a concern? Context: In a financial Dapp which is to replace global payment systems, tx/s throughput is certainly one…
SCBuergel
  • 8,774
  • 7
  • 38
  • 69
51
votes
4 answers

Is there anything stopping me from using the ethereum blockchain as data storage?

As I understand it, smart contracts are currently immortal by default. Does this mean that I could create a contract that happened to contain an encoded form of baby photos and have it stored forever? If not, what prevents it?
Shelvacu
  • 1,405
  • 1
  • 12
  • 22
51
votes
4 answers

When to use "View" and "Pure" in place of "Constant"

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 does not modify storage and pure if it does not even…
Rob Hitchens
  • 55,151
  • 11
  • 89
  • 145
50
votes
3 answers

What are truffle migrations?

As written in Truffle docs: Migrations are Javascript files that help you deploy contracts to the Ethereum network. These files are responsible for staging your deployment tasks, and they're written under the assumption that your deployment…
takeshi
  • 1,760
  • 1
  • 13
  • 33
50
votes
3 answers

What is a recursive calling vulnerability?

What is a recursive calling vulnerability exactly? When creating smart contracts, DAOs or DAPPs, what measures can I take to ensure I am not vulnerable?
user36100
  • 603
  • 1
  • 7
  • 7
50
votes
3 answers

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?
hcvst
  • 2,018
  • 2
  • 21
  • 24
50
votes
12 answers

How to convert a bytes32 to string

How can I convert a bytes32 to a string? Does anyone has a magic function or library which does it?
arodriguezdonaire
  • 3,027
  • 3
  • 20
  • 37
50
votes
7 answers

How can I debug a smart contract?

When developing my smart contract, how can I debug it? Are there any debugging, testing tools or simulators that I can use to examine my code?
J-B
  • 8,941
  • 16
  • 46
  • 77
50
votes
15 answers

How to upgrade solidity compiler in truffle

I couldn't find a way to upgrade a version of truffle solidity compiler. Also curious how to see that information for deployed contracts in truffle console
rstormsf
  • 4,337
  • 2
  • 25
  • 42