Questions tagged [ether]

Ether is the currency used in Ethereum blockchain technology. Refer: https://ethereum.org/ether Questions about Ether which aren't about programming should be asked on the dedicated Ethereum site: https://ethereum.stackexchange.com. Questions which are about programming can be asked on either site.

Ether is a necessary element — a fuel — for operating the distributed application platform . It is a form of payment made by the clients of the platform to the machines executing the requested operations. To put it another way, Ether is the incentive ensuring that developers write quality applications (wasteful code costs more), and that the network remains healthy (people are compensated for their contributed resources).

The official website of is Ethereum.org.

There's also a Ethereum StackExchange site that's dedicated to Bitcoin.

82 questions
34
votes
1 answer

What is address(0) in Solidity

Can anyone explain to me what address(0) is in Solidity? I found the following in the docs but it doesn't really make sense to me: If the target account is the zero-account (the account with the address 0), the transaction creates a new contract.…
pizzarob
  • 10,072
  • 4
  • 37
  • 63
6
votes
1 answer

Why we can't send ether to ethereum address 0x1 via smart contracts

With this below solidity code I have tried to send ether to ethereum wallet address 0x1 via smart contract and it becomes failed. But, when I try to send ether to address 0x1 directly from my wallet it becomes success. pragma solidity…
Chandra Nakka
  • 14,022
  • 7
  • 31
  • 53
5
votes
4 answers

How can we generate multiple random number in ethereum?

I want my smart contract to return 7 or 8 UNIQUE random numbers ranging from 1 to 100 upon calling the contract. What can be the best approach to obtain such result?
Joe Mutti
  • 97
  • 7
5
votes
1 answer

accepting ether in smart contract

I'm trying to create a simple smart contract to learn solidity and how ethereum works. From what I understand, using the modify payable on a method will make it accept a value. We then deduct from the sender and add that somewhere else, in this code…
totalnoob
  • 2,131
  • 5
  • 27
  • 54
4
votes
2 answers

Ethereum Nonce Management. error nonce too low

I use web3 and provider mainnet. I do 2 transactions by contract. first is approve method and another transaction is multitransfer. I store second signature in database. if first transaction is success I send second transaction/. second transaction…
4
votes
0 answers

"Error: Failed to check for transaction receipt:" Web3.js[1.0.0] with Node , getting this error with sendSignedTransaction

Here's the code I'm trying to run: w3.eth.sendSignedTransaction( data ).once( 'transactionHash', (hash) => { console.log('hash') }).once('receipt', (receipt) => { console.log('receipt'); }).on('confirmation', (confirmationNumber,…
1110
  • 75
  • 5
3
votes
1 answer

Fetch proper execution price from Uniswap V2

I'm trying to undertand Uniswap v2 SDK. I've written simple function, to fetch result of trading: 1 WETH for Dai 1 DAI for WETH My question is, why the first trade result is really accurate with what Uniswap Interface is returning, but the second…
Karzel
  • 496
  • 3
  • 14
3
votes
2 answers

First Metamask ETH transaction Ropsten faucet failed

I'm following the instructions off the book Mastering Ethereum, (https://www.onlineprogrammingbooks.com/mastering-ethereum/) and I've hit a snag. I've set up the MetaMask extension and trying to make the first transaction via the Ropsten network.…
NubSteel
  • 53
  • 6
3
votes
2 answers

how to make contract fetch ether from an account

I am new to solidity. I was playing around and wanted to know if I could make a contract fetch ether from one account and transfer it to another account. Thank You
hahahoho
  • 33
  • 2
3
votes
2 answers

Warning: Using contract member "balance" inherited from the address type is deprecated. Solidity

Warning: Using contract member "balance" inherited from the address type is deprecated. Convert the contract to "address" type to access the member, for example use "address(contract).balance" instead. I am getting this warning in Solidity using…
Matt
  • 26,570
  • 19
  • 63
  • 74
2
votes
1 answer

Ethereum wallet shows it has ethers but geth does not show the balance

I am starting to learn ethereum. I have downloaded the Ethereum Wallet, created two accounts and using Rinkeby faucet I got 3 ethers in one of the account. I can see the balance in my wallet. I then ran geth --testnet --datadir d:\data and it…
unni
  • 53
  • 7
2
votes
1 answer

Getting a list of ERC20 token holders in solidity

Is it possible to get a list of token holders for a given ERC20 token from within another solidity contract? Since "balances" are stored in a mapping in most ERC20 contracts, I do not think it is possible, since you can't get a list of keys for a…
user1558646
  • 125
  • 2
  • 6
2
votes
1 answer

Can the same public address used for Ether be used to receive other coins as well?

I am planning for a cryptocurrency app, and am trying to figure out something I haven't been able to find an answer to. On the Etherum blockchain, a user has a public address used for receiving coins, and a private key used to send. There are also…
Lars Andren
  • 8,165
  • 6
  • 34
  • 52
2
votes
1 answer

Truffle migrate fails due to missing function, but it exists in node_modules

While attempting to run a truffle migration, I get the following error: Using network 'development'. Running migration: 1_initial_migration.js Replacing Migrations... ... 0x1e30a241296f07f9e4e702f5066031ba128e163fd7858cfd09311ddff14bebf8 …
2
votes
1 answer

How many confirmations should I have on ethereum?

I want to support ethereum payments in a coffee shop. The constraint here is that when a customer wants to pay, the period of waiting on the confirmations should not take more than 30 seconds. I know that 1 ethereum confirmation takes around 15…
1
2 3 4 5 6