Most Popular

1500 questions
10
votes
2 answers

Fatal: Could not open database: resource temporarily unavailable

I get this error when I run the geth upgradedb command: I0317 08:29:57.792433 4202 chaincmd.go:137] Upgrading blockchain database I0317 08:29:57.792491 4202 database.go:71] Alloted 16MB cache to /home/'my_user_name'/.ethereum/chaindata Fatal:…
Kizito
  • 779
  • 1
  • 8
  • 17
10
votes
2 answers

Difference between msg.owner and msg.sender?

I'm having a hard time understand the difference between msg.owner and msg.sender. Can't find anything in the documentation that explicitly explains the difference. Suppose I create and deploy a contract. Will I be the 'owner'? Can these variables…
ninesalt
  • 488
  • 1
  • 5
  • 14
10
votes
3 answers

How do smart locks make sure that they have access to an up-to-date version of the blockchain?

Smart locks like Slock.it are supposed to allow locks to be able to do things based on the blockchain state. Does that work with locks that don't have their own internet connection? If so, how does the lock make sure it has the correct version of…
Christian
  • 753
  • 1
  • 7
  • 11
10
votes
4 answers

How to decode input data from tx using python3?

I am trying to decode input data from token sale transactions. This is one of the transactions I am trying to parse 0xf7b7196ca9eab6e4fb6e7bce81aeb25a4edf04330e57b3c15bece9d260577e2b Which has the following input…
Surya
  • 173
  • 1
  • 1
  • 9
10
votes
2 answers

Is it possible to call Ethereum API from a Software Application without running an ETH node?

I was wondering if it's possible to make a call to Ethereum blockchain from a software application on my computer without having to run an ethereum node ? for example, I want to make calls from a normal software application such as a java program to…
Moataz Soliman
  • 113
  • 1
  • 5
10
votes
5 answers

web3.eth.getStorageAt for mapping

How can I get contract mapping storage? Considering this simple contract contract Currency{ mapping(address=>uint) public balances; function deposit(){ balances[tx.origin]++; } } After deploying and calling deposit, I'd like to get…
0x8000
  • 609
  • 5
  • 14
10
votes
3 answers

How do I send the entire ether balance from one account to another account?

I'm trying to use web3 to transfer all (or as much as I can) of the balance of an account to another account. Here is the code I have so far: var sender = web3.eth.accounts[0]; var receiver = web3.eth.accounts[1]; var totalBalance =…
Webeng
  • 895
  • 2
  • 12
  • 26
10
votes
1 answer

Will revert() refund all gas of the transaction or just the remaining gas?

According to the docs revert() will not consume any gas: Note that assert-style exceptions consume all gas available to the call, while revert-style exceptions will not consume any gas starting from the Metropolis release. But i frequently read…
TripleSpeeder
  • 920
  • 9
  • 16
10
votes
2 answers

Can a contract access the code of another contract?

Using web3.js, the EVM (bytecode) of a contract can be obtained by web3.eth.getCode(addressOfContract). Can this be performed by a contract using the address of another contract? If so, how? address.code isn't in Solidity.
eth
  • 85,679
  • 53
  • 285
  • 406
10
votes
1 answer

What is a "raw transaction" and what is it used for?

I come across a lot of posts on Ethereum Stack Exchange about "raw transactions" (more than 45 posts have this tag at the moment), but I don't really understand what it is. I have searched both Stack Exchange and the web and can't find a 101…
Tesa
  • 2,269
  • 20
  • 40
10
votes
1 answer

Using web3, how can you get the tx cost and data/payload for a given transaction?

Using web3, how can you get the Tx cost and data/payload for a given transaction? getTransaction(tx#) returns everything but those 2 values. This information seems to be available via blockchain explorers such as etherchain.org
dbryson
  • 6,403
  • 2
  • 27
  • 37
10
votes
4 answers

Export Metamask account to JSON file

I'm trying to use ethers-ens which requires an ethereum account in JSON format. How can I export or generate an account.json from my metamask account? Is there another way to use ethers-ens without an account.json? This is a sanitized example…
ProGirlXOXO
  • 261
  • 1
  • 2
  • 8
10
votes
4 answers

How to deploy a new version of the contract?

Probably this is not possible, but I still have to ask. Let me follow the example created in truffle init. It contains a contract called MetaCoin.sol. Say, I have deployed it on the network (the first version of it). Then I have extended it with a…
10
votes
2 answers

Web3j listening to events

I'm tinkering with web3j and most of the things that I want to do succeed, however I seem to not be able to listen to events. I've extended the ballot.sol contract you get with remix by adding an event VoteEnded, which is fired when a call is made…
MPL
  • 273
  • 3
  • 9
10
votes
1 answer

What happens to transactions in Uncles?

I understand that each node has a transaction pool, which is used for adding transactions to the block. What happens to the transactions when a miner's block is declared invalid? Also, how are transactions removed from the local node's transaction…
Athaheer
  • 175
  • 7