Hot answers tagged

136 votes
Accepted

What is a DApp?

DApp is an abbreviated form for decentralized application. A DApp has its backend code running on a decentralized peer-to-peer network. Contrast this with an app where the backend code is running on ...
eth's user avatar
  • 85.4k
71 votes
Accepted

What does the keyword "memory" do exactly?

The Solidity FAQ on "memory" is highly recommended reading in entirety, and a snippet is provided below. The Ethereum Virtual Machine has three areas where it can store items. The first is “...
eth's user avatar
  • 85.4k
67 votes
Accepted

How do I make my DAPP "Serenity-Proof?"

It's not certain yet, but: Do NOT rely on very fine-grained calculations of current gas costs. Assume that gas costs of contract calling may go up or down by up to an order of magnitude in a future ...
Vitalik Buterin's user avatar
49 votes
Accepted

What is Whisper and what is it used for?

Whisper is a part of the Ethereum P2P protocol suite that allows for messaging between users via the same network that the blockchain runs on. There are many uses, some of which are listed on the ...
Tjaden Hess's user avatar
  • 36.9k
37 votes
Accepted

How can we integrate IPFS with ethereum in DApps?

Basically, you store any file into IPFS and then you store the IPFS hash in the Ethereum contract. Any user with an IPFS node is going to be able to access the file using that hash. You can store data,...
AdrianClv's user avatar
  • 1,269
34 votes
Accepted

How does Lisk differ from Ethereum?

Warning, I'm not a huge fan of Lisk. This is obviously one side of the story and I'm sure there are more advantages of Lisk than I give them credit for. But I don't know them. A blog post (not by me):...
tayvano's user avatar
  • 15.9k
34 votes

web3.eth.contract is not a function when making contract

Solution: MyContract = new web3.eth.Contract(abi) Docs https://web3js.readthedocs.io/en/1.0/web3-eth-contract.html#eth-contract When using version 1.0.x you need to pass in the Application Binary ...
David's user avatar
  • 459
31 votes
Accepted

Create a two-dimensional array in Solidity

Yes you can. This little snippet might help. It's just a little toy to show how the two-dimensional array elements are referenced. It might be helpful to point out that things may be a little counter-...
Rob Hitchens's user avatar
28 votes
Accepted

How do I send an arbitary message to an Ethereum address?

So it is only possible to send HEX data in the data field. This will not be a standard transaction but will require you to use geth, MyCrypto advanced settings on the send page, or another client that ...
tayvano's user avatar
  • 15.9k
26 votes
Accepted

How to create a Dapp from scratch on Ethereum?

This question is too broad to be easily answered, and there are several good existing tutorials available online. But here are the first steps you might take: Read up on the basic concepts. The ...
RSid's user avatar
  • 803
24 votes
Accepted

How to read public variable from contract using ethers.js

actually in solidity docs it's pointing that for each public member variable there will be a getter is defined automatically. In short you'll be able to get basic type public member like this: let x = ...
defikintaro's user avatar
23 votes

How does Lisk differ from Ethereum?

@tayvano: Unfortunately, I can't comment directly. I need "50 reputation" for this. Therefore I will write it as a new answer. I don't know as much about Serpent, but it appears to have the same ...
MaxKK's user avatar
  • 349
20 votes
Accepted

How should I handle blockchain forks in my DApp?

There are a few modules around that let you keep track of the "state" of a transaction (unconfirmed, X confirmations, conflicting transaction exists and is being confirmed, fully confirmed, definitely ...
Vitalik Buterin's user avatar
20 votes

web3.js import contract abi from .json file

I know the question is old, but I had some problems with this so I will share what helped me. To import the ABI from a JSON file, you can use the following code (assuming you already have your web3 ...
MAD's user avatar
  • 301
17 votes

What is a DApp?

A good Blog post by Vitalik Buterin goes through and the concept of a Dapp and other related concepts such as smart contract, Decentralised Autonomous Organisation, Decentraclised Corporation ect.. ...
EugVal's user avatar
  • 567
17 votes
Accepted

Error: VM Exception while processing transaction: out of gas

First check your account balance : balance = web3.eth.getBalance(someAddress); then try to specify the gaslimit contractInstance.createProposal("ADHD", "Foo", 2, {from: web3.eth.accounts[1], gas:...
Badr Bellaj's user avatar
  • 18.8k
16 votes
Accepted

Unlock account permanently

Seems like you can unlock it for as long as the geth instance is running using a 0 as duration parameter: web3.personal.unlockAccount("address", "pass", 0);
Arko Elsenaar's user avatar
16 votes
Accepted

Collecting ERC20 balances from multiple addresses?

There are two ways this is done today: 1. Normal Accounts Generate wallet keys / addresses that your users transfer to, and you have to send gas to those addresses in order to move funds. Downsides: ...
Micky Socaci's user avatar
  • 1,312
15 votes

How to create a Dapp from scratch on Ethereum?

One of the main things you'll want to focus on is determining which part of the application needs to be on-chain and which part might happen in the browser. This could separates the application into a ...
Taylor Gerring's user avatar
15 votes
Accepted

How to verify MetaMask account holder is the real owner of the address?

I think web3.eth.sign is what you want, but note that it expects a 32-byte string (usually a hash of a message). This worked for me: web3.eth.sign(web3.eth.defaultAccount, web3.sha3('test'), ...
user19510's user avatar
  • 27.9k
15 votes

I have two Metamask accounts with the same password and seed phrase. How is this possible?

now to my horror I have TWO MMask accounts (diff. Eth addresses) under the SAME seed-phrase and password. How is this even possible? Metamask is an HD - Hierarchical Deterministic - wallet. In HD ...
Richard Horrocks's user avatar
14 votes
Accepted

How will regular users be able to use dApps without buying ether?

There are several options: dApp developers/companies can pay the transaction fees themselves, but only for transactions that interact with their app, and with some sort of rate limiting the way most ...
Jeff Coleman's user avatar
14 votes

Can I run a website 'on' ethereum or only 'with' ethereum?

Ethereum is a smart contract platform. You don't run websites neither on it, nor with it. You can only deploy smart contracts on Ethereum and interact with them from the outside world. To interact ...
Péter Szilágyi's user avatar
14 votes
Accepted

DApp storage for data other than tranactions?

First, you don't want to think of contracts as analogous to tables. Each contract can hold multiple mappings of information. You could have a single ReviewSystem.sol that has mappings for both ...
AusIV's user avatar
  • 611
13 votes
Accepted

Are tools like metamask putting decentralization in danger?

With tools like Metamask and other "lightwallet"-based infrastructure (wallets-in-the-browser), you are simply trusting that the browser environment keeps the keys safe. In terms of writing ...
Simon de la Rouviere's user avatar
13 votes
Accepted

What elements of a Dapp's backend are usually stored in a decentralised location?

This following image helped me understand how decentralised applications fitted together. I'm typically a Java developer so I'm more familiar with writing middleware for some J2EE-server and hosting ...
Malone's user avatar
  • 1,590
13 votes
Accepted

Do users of ERC20 coins need to hold Ether?

The default answer would be: No, you cannot use an account without Ether for anything related to the Fancycoin, as any interaction with a standard token requires a transaction which you need to sign ...
SCBuergel's user avatar
  • 8,774
12 votes

What is a DApp?

Find below a definition of DApp written in this doc called "The General Theory of Decentralized Applications, Dapps". For an application to be considered a Dapp (pronounced Dee-app, similar to ...
Adriano's user avatar
  • 273
11 votes

How to create a Dapp from scratch on Ethereum?

One place to start would be Dapps for Beginners you could follow the progression via Introduction to development on Ethereum and then Setting up your development environment or jump straight to;- ...
Donnelly's user avatar
  • 396
11 votes
Accepted

What are effective and secure ways of shuffling a deck of cards in a contract?

Shuffling a deck Commutative encryption: Alice and Bob want to shuffle a deck of cards, such that neither knows what the other's hand contains, but the hands are disjoint (i.e. only one may have a ...
Tjaden Hess's user avatar
  • 36.9k

Only top scored, non community-wiki answers of a minimum length are eligible