Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [dapp-development]

Questions regarding the development of decentralized applications (a.k.a. DApps). This can include everything from frontend development questions to interaction with the blockchain and distributed file storage.

0
votes
1answer
7 views

Which smart contract should I use to wrap Eth

I need Weth for my dapp. So I looked at how AirSwap converts ETH to Weth. On the Rinkeby testnet, AirSwap calls this contract and uses the "deposit" function. I see from the code how this would work. ...
1
vote
1answer
19 views

Development lifecycle in building a dapp [on hold]

I was wondering if anyone who has experience in working with Solidity/decentralized applications, could share their development cycle in contrast with normal web/app development? Normally, we would 1)...
0
votes
0answers
24 views

Sending message on a transaction?

I want send a data on a transaction. _data is storing my message.. Here's my code: const Tx = require('ethereumjs-tx') const Web3 = require('web3') const web3 = new Web3('https://rinkeby.infura.io/v3/...
0
votes
0answers
15 views

React Native FlatList example code Error [closed]

App.js /** * Sample React Native App * https://github.com/facebook/react-native * * @format * @flow */ import React from "react"; import SearchableFlatList from "./src/SearchableList"; const ...
0
votes
1answer
34 views

Solidity Vs JavaScript?

I'm currently in the process of writing a game however a question has popped up in my head. A while back I started writing my game in Solidity (i.e the characters, names, stats etc.) and I had ...
2
votes
0answers
30 views

this.contract.deployed() is not a function

I'm working on making a React frontend for my smart contract, but I'm having problems connecting it into my React code. Here are the relevant portions of my code: import TruffleContract from '...
0
votes
0answers
19 views

Uncaught ReferenceError: TruffleContract is not defined (Truffle Pet Shop)

I'm writing my own application that follows a similar form to the Truffle Pet Shop. I have the following code in my app.js: initContracts: function(){ $.getJSON('Greeter.json', function(data) { ...
2
votes
1answer
53 views

Oraclize a restfullAPI using a specific number represented by the variable z

Hello I made a restfull API on my own (python file jsonify + localtunnel) on a localhost using a specific number (in this case 141) represented by the variable z. This variable should go into DevCoin ...
0
votes
1answer
30 views

Retrieve specific account in truffle 5 console

I am following a truffle tutorial where the individual users web3.eth.accounts to retrieve all the accounts from Ganash. However that seemed depreciated and to duplicate his results I used web3.eth....
0
votes
1answer
30 views

Is it ok to build app with huge data in ethereum blockchain

I agree that the smart contract works well for small Apps. Is it ok to develop a app with huge data. For this let us take an example of building a huge patient database across hospitals (only with key ...
0
votes
1answer
42 views

How can we access private blockchain from another network?

I have private Ethereum network running on my local network with two sealer node and one bootnode. I have deployed the private blockchain and configured it using geth. Now I want to create another ...
1
vote
1answer
35 views

DApps that require stake

Does anyone knows apps that use the concept of proof-of-stake of ERC20 tokens? For example, applications like STEEM, that uses and its STEEM POWER. "STEEM Power is what gives you influence on Steemit....
1
vote
1answer
24 views

Interacting with dapps using wrapper smart contract (and not personal accounts)

Metamask (or other browser plug-in) helps a lot the user to submit transactions using his personal account since it manages his private keys. When interacting with an dapp front-end, web3 will ...
1
vote
1answer
53 views

constructor arguments require 'memory' as a data location but not uint?

Ok I am trying to figure out why Remix IDE is throwing an error saying the Data location 'memory' must be given..... for a string argument but the uint arguments don't throw any error? pragma ...
0
votes
1answer
18 views

time order when calling functions of smart contract

How can I check that the miner actually execute the right order of smart contracts function calls, if there is a necessity of orders?
0
votes
1answer
44 views

Social networking websites build in ethereum blockchain have instant block time while in the main ethereum network it ranges from 10-20 seconds why? [closed]

I'm new to blockchain actually and I have an idea of a social app and want to build it in blockchain because of complete transparency and privacy-friendly and so. But I feel that it might piss off ...
1
vote
2answers
53 views

Why is browser taking so long to read blockchain data?

I have a dAPP and I use reactjs for the frontend. The application returns data from a smart contract (the balance) on the homepage. The main problem that I notice is that everytime I or any other ...
0
votes
1answer
77 views

IPFS versioning - How to get all files from the IPFS key?

Based on the below code, im able to add a file**(dataobj.txt --QmUUHKjR5ZdrrYmxpXyPrYP3eMyhv9FnRKo1Duv9stzmmw)** and publish a file and then assign to the key "myIPFSKey". Step 1: ipfs add -r ipfs/...
0
votes
1answer
25 views

Best way to use the truffle contract abstraction in a mobile client?

For a final year computer science project I'm building (or attempting to build) a mobile frontend for my dapp. The client will use the wallet offered by web3.eth.accounts to sign transactions ...
1
vote
1answer
19 views

error in msg.sender

I'm pretty new to this solidity thing, so don't expect me to not make some elementary mistakes. Here's the code: pragma solidity ^0.4.25; contract toss3D{ uint tossvalue = 0; uint targetBlock =...
1
vote
0answers
42 views

Return value from a smart contract function appearing for few seconds and then disappears

I developed a Dapp in which I am adding attributes to an entity, and finally I have a function to query some of the information about that entity, when I am clicking on the button to execute the ...
1
vote
2answers
43 views

Smart Contracts & Ethereum for CRUD

I want to understand whether Smart Contracts & Ethereum can be used to achieve the functionality of our current VB6 ERP application where we have concurrent users creating new transactions, ...
0
votes
1answer
29 views

What is the change in smart contract when the 'chain reorganizations'?

Recently I learned about 'chain reorganization'. What is the change in smart contract when the 'chain reorganizations'? for example, contract Contract{ event LOG_Increase(); uint sum = 0; ...
1
vote
1answer
45 views

ERC 721 card game

The general concept of ERC 721 is clear to me. My question is more about the contract deployment. I want to have 100 unique cards, So I thought of these two implementations: Having an initial supply(...
0
votes
1answer
24 views

Miner APIs are not found in web3.js package

How can I start and stop miner( miner.start(), miner.stop()) from my DApp if Miner APIs are available in web3.js package? I am using web3 v0.20.6.
1
vote
1answer
29 views

What is the difference between writing emit in an event and not using emit? [duplicate]

For example, event CoinTransfer(address sender, address receiver, uint amount); What is the difference between CoinTransfer(msg.sender, receiver, amount); and emit CoinTransfer(msg.sender, receiver, ...
1
vote
1answer
15 views

Ethereum Node I want to export transactions from a token

I have an Ethereum node running and I am wanting to export transaction history for a specific ERC20 token to a local database every 10 minutes. Does anyone have any suggestions on how they would do ...
0
votes
1answer
62 views

Web3 Rinkeby Infura Problems

I've got a Smart Contract that works perfectly when deployed to localhost: 8545 (using Ganache) with my Web3 Dapp. But when I put it on Rinkeby, I'm running into problems,. The Contract is super-...
2
votes
0answers
58 views

How to implement percentage deposit function to smart contract

I need to implement on the deposit function when the ownerAddress is doing a deposit a 10% to be freeze in the smart contract and and if the ownerAddress want's to call the returnDeposit function by ...
1
vote
0answers
30 views

What is a suitable pattern for building a web/mobile app that leverages ether? [closed]

Noob to ether dev. Looking to understand how to build an app that leverages Ethereum - what suitable patterns are out there (ideally to go via some tutorials). A few apps examples (from easy to ...
1
vote
1answer
19 views

One general contract for all or spawn new one for each instance?

What be the advantages vs. disadvantages or running a general contract or spawning a new one for each instance. Let say, that I am providing a contract so people can create their own crowdfunding. ...
2
votes
1answer
26 views

How to specify the Gas price for ICO contract

I am writing a ICO contract in truffle using openzeppelin I used the below code in the truffle.js and I am trying to launch in mainnet. When I tried this I could see that the transaction is using the ...
0
votes
1answer
18 views

DApp on Node2 accessing smart contract deployed by Node1

Node 1(Desktop) deployed a contract on private blockchain. From node2(Laptop),I want to interact with the contract. But I failed at 'web3.version.getNetwork(err, netId)' function.This function throws ...
0
votes
1answer
128 views

Creating transactions with Transaction Data to Metamask

We can use transaction data to submit any Ethereum transaction using Metamask, right? Not only ERC20 transfers, right? Does anyone knows how can I generate hexadecimal transaction data to Metamask ...
-1
votes
1answer
28 views

Understand inter-operation between typical DApp and its underlying smart contracts

I am a newbie to Ethereum and start to study some typical implementations of commonly-used DApp. So basically for the popular dapp on this list (https://www.stateofthedapps.com/rankings/platform/...
-1
votes
0answers
39 views

How Blockapps's REST-API work?

I am new to Blockapps. I am figuring out what is blockapp rest api? There github repo blockapp-rest In the repo the repository they referred were removed. My question is if I write the below code in ...
1
vote
0answers
44 views

Where is the latest MetaMask hello world dapp example?

MetaMask recently added a new permissions check. I'd like a copy-pasteable hello world dapp that includes all best practices and can check the balance of the current user's ERC20 balance for some ...
1
vote
2answers
72 views

Saving contract address after deploying with Truffle

To automate my development cycle I want to save the addresses of deployed contracts so that my DApp can read this information and know where to find the contracts on my private block chain: for ...
2
votes
1answer
80 views

What is the most active Ethereum chatroom for devs? Slack? Telegram? IRC?

Where does most of the ethereum developers hang out? Slack? Telegram? IRC? I'm looking to join a chatroom where everyone can help others while developing.
2
votes
2answers
166 views

Unable to install web3 js for windows10

I am trying to install web3 using command npm install --save web3@1.0.0-beta.26 However, it is failing with error : verbose node v8.9.1 verbose npm v4.6.1 error code 128 error Command failed: ...
0
votes
1answer
36 views

Deploying using Rinkeby understanding

Deploy we are using truffle truffle migrate --reset --compile-all --network rinkeby when i am deploying i will be getting build folder in my project directory while deploying through the ...
0
votes
1answer
223 views

How to fix “No events were emitted”

I have been following the instructions in the Dapp university tutorial. But I am using Windows 10, Dapp University is Mac. I downloaded this truffle with smart contract ERC20 from Dapp university. ...
0
votes
1answer
41 views

Is data inputted as a parameter for a smart contract function visible?

Let's say I have something like this: bytes32 person; function registerPerson(address _person) public { bytes32 x; x = sha256(abi.encodePacked(_person)); person = x; } For privacy reasons, ...
0
votes
2answers
63 views

Intracting with dapp using frontend truffle petbox

App = { web3Provider: null, contracts: {}, account: '0x0', init: function() { // Load pets. return App.initWeb3(); }, initWeb3: function() { if (typeof web3 !== 'undefined') {...
0
votes
1answer
60 views

How to interface with a deployed Ethereum smart contract?

I want to create an interface to interact with my smart contract. I have got an example from the following link. Counter Before implementing my contract, I have tried to use the given example.But it ...
0
votes
1answer
222 views

web3.js token approve function show null / 0 in Metamask

EDIT The allowance is set, the issue is just that metamask detect no token name nor amount that is allowed. In my HTML/JS amount = parseInt(web3.toWei(amount, "ether" )); tokeninstance.approve(...
1
vote
1answer
22 views

Unknown wallet address on private development chain

Apologies in advance for the long post. I'm new to Ethereum and don't know which details are significant and which are not. I'm trying to learn about dapps by following an example in this book. My ...
0
votes
3answers
54 views

How to create a smart contract that has token and transfers tokens to whoever sends ether?

I want to create a smart contract which is able to create tokens, priced at some amount of ether, example uint price = 1 ether;. Now after someone sends any amount of ether, the same amount of tokens ...
1
vote
1answer
99 views

web3js - Promises - web3.eth.getAccounts()

Objective: Assign a global variable to the first indexed address returned in web3.eth.getAccounts(). I want this so I can use it in the rest of my code and simply reference a variable. Problem: ...
0
votes
1answer
44 views

ContractInstance.method is undefined

When I use contractInstance.getDrawStats or any other method it returns error method is not a function because of contractInstance doesn't contain any contract methods. However, they are definitely in ...