Most Popular

1500 questions
13
votes
3 answers

Variadic / optional function params in solidity ?

I didn't find a way to have optional arguments in the solidity docs so i'm wondering if anyone has found a working around to this ? All i can think of are internal functions with " empty " params but that's going to be ugly very fast. As anyone…
solinooby
  • 261
  • 1
  • 2
  • 6
13
votes
2 answers

Should I give names to return values, when a function returns several of them?

I am currently working with solc v0.4.25, where it is not possible to return structures, so the only way to return multiple values is in a tuple. I've been advised to give names to each one of the returned values, in order to make the code easier to…
goodvibration
  • 26,003
  • 5
  • 46
  • 86
13
votes
1 answer

How many letters can bytes32 keep?

I would like to add strings into bytes32. What is the maximum number of letters bytes32 can have?
Satoshi Nakanishi
  • 5,749
  • 7
  • 38
  • 57
13
votes
2 answers

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 the string name? This includes all blockchain…
Alex Darby
  • 921
  • 1
  • 6
  • 16
13
votes
2 answers

Will Eth 2.0 be implemented in geth (go-ethereum) or will it run on a new client?

Geth is the official implementation of Ethereum based on the coding language Go. Currently, there are 8 teams that are building Eth 2.0 https://www.coindesk.com/next-gen-buidlers-the-8-teams-working-on-ethereum-2-0 When Eth 2.0 official releases,…
Ethereunoob
  • 131
  • 3
13
votes
1 answer

How to change the password to an account?

The private key of an owned Ethereum account is encrypted with a password and kept in a so-called key file. How can I change this password?
Paweł Bylica
  • 1,355
  • 1
  • 9
  • 28
13
votes
1 answer

What is IERC20?

I understand the ERC20 standards which includes the functions like totalSupply() balanceOf() allowance() transfer() approve() transferFrom() When I check the openzeppelin, I could see "contract ERC20 is IERC20" which has some additional…
iappmaker
  • 813
  • 2
  • 11
  • 26
13
votes
2 answers

What does it mean to "seal a block"?

In both the Ethereum chain specification format and in Parity's documents on private chains, you see the term seal a block. What exactly does that term mean? How is it different than mining a block?
dbryson
  • 6,403
  • 2
  • 27
  • 37
13
votes
3 answers

If the supply of Ether is finite, are there any mechanisms to deter hoarding?

The supply of bitcoin is capped at 21 million. The supply of Ether is similarly capped at ~90 million. If we are to assume that Ethereum will become more popular as time progresses, and if we also assume - for the sake of argument - that the value…
Richard Horrocks
  • 37,835
  • 13
  • 87
  • 144
13
votes
4 answers

How are Ethereum transaction costs calculated?

I'm in the process of learning blockchain technology for a client of mine. I understand the concept of "gas" in computational costs. We are looking at creating a crypto-currency as an alternative to using a traditional payment platform for a…
Frank John
  • 131
  • 1
  • 1
  • 4
13
votes
1 answer

What is the purpose of interface contracts?

Reading The DAO and DigixDAO source code I notice that in contract systems there are often interface contracts where functions are declared without any body. For example, contract TokenInterface { function balanceOf(address _owner) constant…
Physes
  • 1,308
  • 12
  • 18
13
votes
1 answer

Why are Ethereum addresses hashes of public keys?

I understand how Ethereum addresses are generated. This thread has a great explanation: How are ethereum addresses generated? However, what this explanation is missing is why a hash is used. There is a related post with no convincing…
graup
  • 463
  • 3
  • 12
13
votes
1 answer

How to write my first Solidity "Hello World" smart contract?

I have never written a smart contract before because there is a lot attached to it getting it working. But I finally want to learn it now. I want to write a simple mininmal working smart contract which prints out something or does something similar…
q9f
  • 32,913
  • 47
  • 156
  • 395
13
votes
2 answers

Should I always put 0x at the start of Ethereum addresses?

Should I always put 0x at the start of Ethereum addresses? Sending ether to addresses without 0x seem to work perfectly fine. when sending to an address, do you include the "0x" before the rest of the number? The address in my coinbase starts…
eth
  • 85,679
  • 53
  • 285
  • 406
13
votes
4 answers

how to make batch transaction in ethereum?

Is it possible sending ether to multiple addresses in one go, better called batch sending? I want to make an API to transfer ether to 100 address at once so that I do not need to make 100 transactions.
rahul_eth
  • 556
  • 1
  • 4
  • 11