ethereum deposit

Permalink 1b5a88a Jun 27, 2016 Rewrite BankOfDeposit.withdraw() method to avoid send() reentrancy 1 contributor // Bank Of Deposit // // This contract keeps user's ethers in its internal storage.This approach // allows cheaper batch transfers than series of individual Ethereum // transactions.contract BankOfDeposit { // OPT: solidity additionally hashes the key of the map what in case of // address is a waste of gas mapping(address => uint) _balance; // This event is supposed to be identical with the one used in Coin/Token // interface.event Transfer(address indexed from, address indexed to, uint256 value); // Check balance of an account.function balanceOf(address addr) constant external returns (uint) { return _balance[addr]; } // This function is redundant, but might make some clients simplier.function balance() constant external returns (uint) { return _balance[msg.sender]; } // Deposit ethers to sender's account.
function deposit() external { _balance[msg.sender] += msg.value; } // Fallback function, the same as deposit().function() external { _balance[msg.sender] += msg.value; } // Withdraw ether from bank.// Param `to` is the Ethereum address where the ether will be send to.// If not provided, message sender's address will be used.function withdraw(uint value, address to) external { // Precondition: check sender's balance is enough.if (_balance[msg.sender] < value) throw; // Handle default value of `to` address.address target = (to != 0) ?to : msg.sender; _balance[msg.sender] -= value; // Try sending ether.if (!target.send(value)) throw; // In case of failure revert the transaction.} // This function allows batch payments using sent value and // sender's balance.// Cost: 21000 + (5000 + ~2000) * n function transfer(bytes32[] payments) external { uint balance = _balance[msg.sender]; uint value = msg.value + balance; // Unlikely to overflow for (uint i = 0; i < payments.length; ++i) { // A payment contains compressed data: // first 96 bits (12 bytes) is a value, // following 160 bits (20 bytes) is an address.
bytes32 payment = payments[i]; address addr = address(payment); uint v = uint(payment) / 2**160; if (v > value) break; _balance[addr] += v; value -= v; Transfer(msg.sender, addr, v); } if (value != balance) { // Keep the rest in sender's account.// OPT: Looks like solidity tries to optimize storage modification // as well, so it makes it worse._balance[msg.sender] = value; } } // This function is only for cost comparison with transfer() function.// The gain seems not to be greater than 1% so it should not be kept // in final version function transferExternalValue(bytes32[] payments) external { uint value = msg.value; for (uint i = 0; i < payments.length; ++i) { bytes32 payment = payments[i]; address addr = address(payment); uint v = uint(payment) / 2**160; if (v > value) break; _balance[addr] += v; value -= v; Transfer(msg.sender, addr, v); } // Send left value to sender account (conditional to safe storage // modification costs).
if (value > 0) _balance[msg.sender] += value; } } Jump to Line You signed in with another tab or window.wd bitcoinReload to refresh your session.bitcoin deposit confirmationYou signed out in another tab or window.ethereum chain blockIt looks like you're new here.harga bitcoin hari iniIf you want to get involved, click one of these buttons!litecoin or dogecoin miningSign In Register Categories Recent Discussions Activity Unanswered Best Of... Categories All Categories Mining Pool Discussion General Project Discussion (non-technical) Education Protocol and Client discussion web3-js Whisper Swarm 2 RLP IoT & Hardware Smart Contracts and Dapps Serpent Solidity Projects Reference clients code and builds Eth & AlethZero- Cpp Implementation Geth - Go Implementation Mist Node.js Implementation Python Implementation Mix Other Implementations Meetups Other Events Jobs & Skills Press and Articles Audio/Video Ether Sale Other Languages Chinese German Italian French 2 Hebrew 6 Japanese Portugese Romanian Russian Spanish Turkish Watercooler ETH Sent to Wrong Address.bitcoin kurs google
1 ETH Reward orangegator 3 February 2016 in Protocol and Client discussion I was trying to send ETH from my wallet to my Bittrex account.william hill bitcoinI sent 1 ETH as a test yesterday, and it worked fine.køb bitcoin med paypalThe Bittrex deposit address is 0x7efd7bafbad1817f6c7a2017bd6acbcb634ad058.bitcoin time travel exploitMy wallet address is 0x20703ee0ad292415f10c844c90dfa4fd23a47471.ethereum ether exchange The ETH is not showing up in my Bittrex account.gra bitcoinThis is the code I used to send the 14 ETH.reddit bitcoin mining guide
eth.sendTransaction({from:eth.coinbase, to:eth.accounts[0x7efd7bafbad1817f6c7a2017bd6acbcb634ad058], value: web3.toWei(14, "ether")})Here is a screenshot of the wallet console showing the transaction.How did the ETH get sent to the unknown address?bitcoin trader for coinbaseIs there a way to get it back?bitcoin gfx cardAnyone who can successfully help me will get a 1 ETH reward.bitcoin ottawa0 Comments jay8291 3 February 2016 0 orangegator 3 March 2016 Yeah.bitcoin s4I know once you send coins to an address, they are gone.dogecoin dogeBut how the hell does a wallet just generate a random address, and send the coins there?choi bitcoin
That is f'd up.Is it a bug with the ETH wallet?Or is this some weird internal wallet thing where I could somehow access the coins?bitcoin etf forumWhen I run web3.fromWei(eth.getBalance(eth.coinbase), "ether") I get the wallet balance, which shows the transactions deducted.vip bitcoin bettingAlso, eth.accounts shows just my one account.bitcoin pool volumeI did a couple of other tests yesterday.bitcoin io errorI did a 0.2ETH test with:eth.sendTransaction({from:eth.coinbase, to:eth.accounts[0x7efd7bafbad1817f6c7a2017bd6acbcb634ad058], value: web3.toWei(0.2, "ether")})This generated yet another random ETH address and sent the coins to limbo I then tried:eth.sendTransaction({from: '0x20703ee0ad292415f10c844c90dfa4fd23a47471', to: '0x7efd7bafbad1817f6c7a2017bd6acbcb634ad058', value: web3.toWei(0.2, "ether")})That transaction worked.bitcoin mining guide reddit
Coins sent to 0x7efd7bafbad1817f6c7a2017bd6acbcb634ad058So, WTH?Even if my coins are gone, I would like to know what the hell happened?bitcoin india software services pvt ltdIs this a wallet bug, or what?Thanks in advance for any help.play store bitcoin billionaire0 jeremy 6 March 2016 @orangegator The problem is this part: "to:eth.accounts[0x7efd7bafbad1817f6c7a2017bd6acbcb634ad058]"eth.accounts is like a list of addresses, the part in the square brackets is the POSITION in the list of the address you want to use (starting at zero), NOT the address itself.bitcoins graSo it would sort of look like thiseth.accounts:[0] -> 0x10023.... (the first address in the list)[1] -> 0x239dea.. (the second address in the list)(you can read it like "eth.accounts[0] points to address 0x10023")It could be that when you put the address in the square brackets, the console treated this like a position in the list instead of the address itself, and tried to access the 7.249857e+47 th address in the list.steam bitcoin bot
This should throw an error, but if they're is no bounds checking then it'll give some random address like you got.bitcoin profit mining calculatorI'm not an expert on how Go accesses arrays or if it even accesses an array, but if it's anything like C/++ this may explain why: https://www.macs.hw.ac.uk/~pjbk/pathways/cpp1/node178.html.The second example worked because you gave it an address in quotes, which it knows how to parse to an address.If you wanted to fix the first example you would have to use "to: eth.accounts[0]" replacing zero with whatever postion the address is in the eth.accounts list.tips: 0x4493c5119b92c2e26164f62dac8cf1be56211d71 March 20160 orangegator 3 March 2016 0 jeremy 6 March 2016 @orangegator Thanks very much.I'm actually confused as to why it didn't warn you about the out of bounds thing.bitcoin blueprint
Just testing on my geth console tells me that eth.accounts[some big number] is 'undefined', not some random address it got from memory.bitcoin accepted here psdIt may be worth updating geth if possible to check it wasn't a bug that has been fixed.From the screenshot it looks like you're using the geth command line, correct?ethereum one month chartThat isn't so much a wallet, but rather a 'low level' console interface.ethereum sell wallI would recommend Mist as a simpler & safer way to send transactions.bitcoin worth 100 000/cpp-binaries-data/release-1.2.0/Ethereum.exe Sorry, my mistake, it's actually installed separately from web3umbrella.bitcoin mit paypal zahlen
ethereum deposit william hill bitcoin køb bitcoin med paypal bitcoin time travel exploit ethereum ether exchange gra bitcoin reddit bitcoin mining guide bitcoin trader for coinbase bitcoin gfx card bitcoin ottawa bitcoin s4 dogecoin doge choi bitcoin bitcoin etf forum vip bitcoin betting bitcoin pool volume bitcoin io error bitcoin mining guide reddit bitcoin india software services pvt ltd play store bitcoin billionaire bitcoins gra steam bitcoin bot bitcoin profit mining calculator bitcoin blueprint bitcoin accepted here psd ethereum one month chart ethereum sell wall bitcoin worth 100 000 bitcoin mit paypal zahlen bitcoin calculator wiki bloomberg bitcoin tax wall street journal bitcoin article como comprar bitcoin en eeuu bitcoin plus faucet bitcoin block proof of work bitcoin price crash 2012 bitcoin pool spain circle bitcoin countries bitcoin sql injection bitcoin davos litecoin tips ethereum per dollar bitcoin atm in dc bitcoin eat hat bitcoin donation tax bitcoin billionaire you lose some bitcoin intraday data easy gpu bitcoin mining bitcoin community sydney bitcoin atm africa ako bitcoin bitcoin tyranny dogecoin information litecoin china ethereum search trend ethereum retirement bitcoin eat a hat bitcoin wallet library ltc to bitcoin exchange how to win bitcoin billionaire coin royal bitcoin linux bitcoin mining software my bitcoin saver ethereum portugal bitcoin being outlawed bitcoin bourse bitcoin đa cấp bitcoin getting flushed bitcoin was kann ich damit kaufen bitcoin nel 2015 bitcoin uang bitcoin 2025 bitcoin banned in bangladesh precio bitcoin 2010 bitcoin power cost calculator bitcoin vs litecoin profitability bitcoin cloud mining pool ethereum coin creation tips to litecoin fastest bitcoin purchase bitcoin till börsen bitcoin aud price chart download bitcoin wallet windows 7 bitcoin explained economist ethereum miner for sale bitcoin 6th/s bitcoin saque litecoin how to mine ethereum real estate bitcoin wallet key file bitcoin test faucet kiếm tiền online với bitcoin achat bitcoin via paypal first bitcoin atm canada ethereum holdings ethereal california roll edit bitcoin market liquidity bitcoin miner software for windows ethereum price reddit small faucet of bitcoin