Stack Exchange Network

Stack Exchange network consists of 175 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.

1
vote
1answer
25 views

Reading events of the inner Solidity contract with Web3

Let's say I've got contract A { event E(); function a() public { emit E(); } } contract B { A private a; function b() public { a(); } } Now my Dapp is ...
0
votes
2answers
21 views

How to deploy truffle project on web server?

I've developed a DApp using truffle suite and now I want to deploy this dapp online so that everyone will be able to access it over the internet. I've used Rinkeby-Testnet for smart contract ...
0
votes
0answers
25 views

MetaMask Calling Child Contract Methods?

I had created a contract(Organisation.sol) that create other contracts(Session.sol). When I call any method from(Organisation.sol) using web3js it work well. But If I ever tried to call any method ...
0
votes
0answers
8 views

Can't Connect Metamask to Ballot Dapp?

I want to connect Ballot Dapp to Metamask but it Shows "rpc error with payload" and "ALERT: Trying to call a function on a non-contract address".
0
votes
1answer
24 views

When I create contract using another contract how could I access his methods in web3js?

Hey I have file 'contractFactory.sol' inside this file I have contract contractFactory{ event contractCreated(string name, address institution, address parent); function createContract( ...
1
vote
1answer
15 views

How to pass account address to truffle deployer?

How do I pass my account address to the contract constructor while deploying with truffle migration? I want to pass address into MyAdress like below. deployer.deploy(MyContract, MyAddress) My ...
1
vote
1answer
27 views

Timeout exceeded during the transaction confirmation process. Be aware the transaction could still get confirmed

contract deploy , web3 version is 1.0.0-beta.52. let {bytecode, interface} = require('./1-compile') let Web3 = require('web3') let web3 = new Web3('http://localhost:7545') console.log('version :',...
1
vote
1answer
25 views

How do I enable web3 in Coinbase wallet?

I am building a very simple dapp. At first I want to initiate web3 on the webpage and then enable it so that I can access web3.eth.getAccounts(). MetaMask, and Opera Mobile both have a window....
0
votes
1answer
39 views

DAPP WALLET transaction always fails

To improve my skills in solidity I'm working on a "wallet dapp". Based on smart contracts only, users can send ERC20 to another wallet. It works like that: user gives the following parameters: ...
1
vote
1answer
62 views

Deploy new contract through another contract function in Truffle

I have a function in my contract minter.sol that creates another contract etnX.sol: function createNewContract(string memory name, string memory symbol, uint256 _maxSupply) public onlyOwner { ...
0
votes
1answer
38 views

Sending private key to server side

I am trying to build new Dapp application for our startup by using web3j , I am facing an issue with signing the transaction from server side , because i need to know the private key for the client (...
1
vote
0answers
23 views

sendTransaction never resolves on web3.js 1.0.0 beta49 - beta52

My plain vanilla sendTransaction doesn't ever resolve on ganache with web3js 1.0.0 beta52: async function sendTx() { const receipt = await web3.eth .sendTransaction({ to: "0x1...", ...
0
votes
0answers
14 views

How do i retrieve the transaction hash to DApp's frontend?

I have a simple DApp that stores data, developed with truffle and deployed on rinkeby, and I want to show the transaction hash in the frontend. I've read a lot about web3.eth.getTransaction() or ...
1
vote
1answer
165 views

Issue getting Metamask account using Web3 1.1.0

I am working on a React app which uses a library that has Web3 as a dependency. I had previously been able to the get the current Metamask address with the following code: const injectedWeb3 = ...
0
votes
0answers
37 views

How dapp owners pay for their clients transcaction fees in the Ethereum Blockchain?

I am currently dealing with a problem in Ethereum Blockchain. I wrote a smart contract in Solidity Language, about a site that someone can make his Registration and after the transaction is completed ...
0
votes
1answer
14 views

Website to generate Ethereum Hash of a PDF file

I would like to ask a user to generate a "Keccak-256" or "Keccak-512" (Ethereum versions of SHA3) of a PDF file. Is there a recommended website with a good GUI to generate that? The user would input ...
1
vote
1answer
45 views

ERC 20 or ERC 721 for my dapp?

I am currently making a game where you collect gear pieces and upgrade them. There will not be a 1-1 upgrade, but rather 3-1, meaning 3 items may or may not upgrade to 1. I am aware of the difference ...
-1
votes
1answer
74 views

UnhandledPromiseRejectionWarning: Error: invalid json request

my deploy.js script returns this error : "(node:6636) UnhandledPromiseRejectionWarning: Error: invalid json request at D:\kickstart\node_modules\truffle-hdwallet-provider\dist\index.js:15:620862 ...
-1
votes
2answers
43 views

How to Learn Solidity [closed]

I know basic solidity but how i learn higher level solidity to make dapps ? What advance skill required for smart contract and Dapps development ? Where I can practice my skills ? Please Help Me. ...
0
votes
0answers
25 views

How to Modify App.js Function to Send Ether

Struggling with how to adjust the following function in my app.js file send ether. I've made the target function in my solidity code payable and it tested out successfully in Remix. But, I'm ...
0
votes
2answers
24 views

If 'Ownable' is the account which migrated the contract, how can this be used for giving a 'user' and not the deployer permission?

Caveat: new dapp developer here, so probably missing something. For the openzeppelin-solidity Ownable contract, if the owner address is set in the constructor, and the msg.sender is the address of ...
0
votes
0answers
23 views

Private Ethereum network. How to create block with go-ethereum library?

The other day I decided to play around with Ethereum and write a simple program that will load the network with transactions as close as possible to the real environment. For these needs, I used my ...
0
votes
0answers
40 views

Getting ERC721 Metadata Into My Webpage

This likely goes beyond Solidity code so may be off topic, apologies in advance if that's the case. Working on a collectible card game based on ERC721 with the metadata extension. When a person "...
1
vote
1answer
30 views

Ethereum with Rails

I am much familiar with Rails but new in the Ethereum. But base on my understanding, if I am going to build a Dapp. The web stack should not include the back-end system like Rails. But why there's so ...
0
votes
0answers
43 views

Errors when trying to Compile & Deploy Election Smart Contract

Cloned a project from a tutorial from here which is a voting dapp on etherum https://github.com/dappuniversity/election. When i try to compile the contract i get the following error project/...
0
votes
0answers
118 views

CORS policy error while connect to test-rpc

I'm trying to build my first dapp using test-rpc and web3js. I deployed a smart contract (with remix ide) to the testrpc (on linux ubuntu), when executing the following line: web3 = new Web3(new Web3....
0
votes
1answer
67 views

Smart Contract function keep return Null value?

Hey I am new with Solidity. And I just tried to link my front end view with the smart contract. With the simplest possible approach. My contract:- My JS code:- Console keep printing 'null' I don't ...
2
votes
0answers
35 views

Automatic sign of Transaction

Is there any secure solution(without exposing a Private key of the user) to automatically sign transactions, which are requested from a DApp, so that user doesn't have to sign each of them manually? I ...
0
votes
0answers
39 views

DApps using Ethereum and Web3 js

I am writing very basic sample contract to get the name of instructor on browser using Ganache. Contract looks fine but web3.js page is not responding . Contract code : pragma solidity ^0.5.0; ...
0
votes
1answer
27 views

If Address and private key doesn't get stored in Ethereum,then how will it validate users?

I think in a normal database,the username and password gets stored in the database and when a user enters his/her credentials,it checks with the content in the database to know his/her Authenticity. ...
0
votes
2answers
248 views

How can I select a single account in Ganache? [duplicate]

Ganache (v1.2.3) provides a list of 10 accounts. They can be easily selected by selecting web3.eth.getAccounts();. However web3.eth.accounts[0] returns undefined as shown below. Not sure how to ...
0
votes
1answer
37 views

Best options to host an ethereum react dapp to a custom domain

I'm looking for best options to host an ethereum dapp created using react and drizzle, with the following requirements: It needs to be hosted in a custom domain (.com / .net / OR .io ) that I have ...
0
votes
1answer
17 views

Why this function doesnt need Gas for execution?

pragma solidity ^0.4.17; contract Lottery{ address public manager; address[] public players; function Lottery() public { manager = msg.sender; } function enter() ...
0
votes
1answer
27 views

creating instance of contract trough a factory contract! Problems with balance!

hopefully someone can help me with my question. I have a factory to create an instance of a dealContract. Everything works except one thing. I cant send wei to the created instance, so lets see the ...
0
votes
1answer
41 views

Which smart contract should I use to wrap Eth [closed]

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
33 views

Development lifecycle in building a dapp [closed]

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
37 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
1answer
75 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
59 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
99 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
58 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
2answers
191 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
37 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
122 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
50 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
29 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
181 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
3answers
82 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 ...