Questions tagged [dapps]

Questions about applications and projects on Ethereum: a decentralized application (dapp) does not require any servers or backends and runs independent on a distributed blockchain.

176 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
0
votes
1answer
379 views

How to get only past 2 days events using getPastEvents everytime?

How can the following query be modified to only fetch the past two days worth of events: const events= await MyContract.getPastEvents("eventName", { fromBlock: 0, toBlock: "latest" });
0
votes
2answers
72 views

Checking if Contract Withdrawal Is Allowed

I am trying to conceptualization how a specific kind of smart contract would be written. The contract would basically handle deposits and withdrawals of ETH or some sort of ERC20 token. The balances ...
0
votes
1answer
71 views

Calculating a minimum entry fee for a game based on typical minimum gas requirements?

I am creating a dApp that is a game where players compete for the prize pool and that pool is built from the sum of all the entry fees payed by the player at the start of the game. The player that ...
0
votes
1answer
71 views

Can somebody check my understanding of DApps and Smart contracts

can somebody check my understanding on DApps and smart contracts in general? (Please excuse the long winded-ness I’ve only been reading about DApp’s for 3 days now so I’m very new and I’m kind of ...
0
votes
0answers
361 views

How to use MetaMask Web3 with Truffle promises

My project uses the react truffle box, and I use the getWeb3 method that comes with it. After calling that method, I store the web3 object on Redux's state tree via the action creator storeWeb3. ...
0
votes
1answer
612 views

Input data on Solidity

I'm trying to do something simple like Hello World that shows on a webpage. I've written a smart contract like this: pragma solidity ^0.4.18; contract HelloContract { string word = "Hello World!"...
0
votes
3answers
2k views

calling smart contract functions from app.js

I deployed a smart contract to ganache network using truffle from account1. The code of smart contract is as follows. pragma solidity ^0.4.0; import "./strings.sol"; import "./safemath.sol"; ...
0
votes
1answer
22 views

Can Dapp respond to an API evocation which in turn calls an EOA and then evoke a contract?

Can a Dapp (leveraging web3.js) respond to an API evocation from an external system which in turn calls an EOA and then evoke a contract on the blockchain? External system calls a Dapp Dapp calls a ...
0
votes
0answers
217 views

How to deploy a Smart Contract in Ethereum on Azure?

Iam trying to deploy a smart contract in Azure's Ethereum on Azure. I have created a blockchain in that but now I need to deploy a smart contract and design a UI for the same. I want to use Remix to ...
0
votes
0answers
238 views

In truffle Console Works, but when called in Javascript, Metamask hangs, Solidity contract doesn't update

So I have a function where I am asking the user to send two strings and 1 ether at the same time. When I execute the function in the console, the solidity contract is updated. When I execute the same ...
0
votes
1answer
109 views

Serving DApp on webserver or IPFS won't work

I can succesfully run the webpack truffle box on my webserver, but if I try to run a DApp which I made by using the pet-shop truffle box as template, I can only use it on localhost. When I upload the /...
0
votes
3answers
616 views

Create a DApp using Geth

I need to create a sample DApp from scratch within a private blockchain using Geth. Can anyone post links of sample apps which have been made in such a way for reference.
0
votes
1answer
231 views

Correct way to easily call function with web3j from deployed contract

I am trying to call a function from a modified ERC20 contract and I can't manage to make it work. I am doing this with web3j from Android. I can connect to Infura. The contract is already deployed on ...
0
votes
1answer
23 views

Can a Coin be liquid during its ICO period?

I am planning to run a Coin's ICO for several years, not interested in the gains to be made from selling out ICO in 3 days NO, but interested in using the COin to end Global Poverty as i deem fit. So ...
0
votes
1answer
296 views

Factory Contract Function is not creating New Contract using testrpc and web3

I am new to DApp development. I have deployed a TokenFactory contract and that Factory contract has a function "Create New Token" that generates a new token contract. The function "Create New Token" ...
0
votes
1answer
523 views

Deploying Solidity Contract Using Web GUI and web3

Any guide or step by step Tutorial for deploying a solidity smart using a GUI and accessing the meta mask account ? Please Help
0
votes
2answers
423 views

Deploying a smart contract using DApp

I am new to the development of DApps on ethereum blockchain. I want to make a contract Management System in which users can generate their own tokens and crowdsale using my web application. I am able ...
0
votes
1answer
258 views

Update dapp after contract transaction is mined

I made a web app that interacts with a smart contract, using truffle unbox webpack. My contract has a variable called sum and 2 functions: one called answer that increments the sum variable after it ...
0
votes
0answers
54 views

Regarding Packaging of DApp

By now I have tried developing a few contracts, deploying them to a test network and using a Javascript based web application to connect to the contracts and use them. What I want to understand what ...
0
votes
0answers
818 views

'Web3' is undefined in html javascript

I have geth installed and running and I am connected to a private network. As given in https://github.com/ethereum/web3.js, I have created a test html with jquery-3.1.1.min.js and web3.min.js and then ...
0
votes
3answers
109 views

condition check of struct mapping in solidity?

struct User { string username; string password; address userid; bool isAdmin; } mapping (uint => User) users; function checkIfUserExists(address userid) public ...
0
votes
1answer
622 views

How to deploy a truffle built Dapp

I've completed my truffle Dapp, the contracts are deployed to the Ropsten test network and my web code talks nicely to them, it works great from http://localhost:8080/ when I do an npm run dev. I now ...
0
votes
2answers
624 views

How to use a private network in geth?

I am following this answer: How do I set up a private ethereum network? but my result of miner.start() will return null Is it because my geth version is 1.6.6-stable? Also welcome any beginner's ...
-1
votes
1answer
124 views

How to create and manage a referral link on solidity Smart Contract (unique referral link)

I'm building a DApp in solidity where I want give a bonus to the users that wants promote it. My problem is that, to use my Referral system, now I need to insert manually the wallet address of the ...
-1
votes
1answer
42 views

Smart contract to strore and retrieve address and ID in blockchian using mapping

I want to store some address and their ids in blockchain using mapping and i want to know how to get the stored addresses when searching with their respective IDs.
-1
votes
1answer
47 views

Problem retrieving array of struct with web3js

I'm trying to return the struct values contained in array everytime i push a button thet call inserimento and ritornavalore functions. here is my code in solidity: pragma solidity ^0.5.1; pragma ...