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.

165 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
0
votes
0answers
12 views

How to console.log the value in the React js for the Dapp + truffle project

I am beginner with the ReactJS and Dapp. In my js page I want to get the value after doing some operation on the input value and want to dispay that result. I got the Nan in the front-end screen. ...
0
votes
0answers
21 views

Is it safe for Ethereum Alarm Clock or Aion?

Scheduling service of EAC and Aion depend on participating users. Q1) is it safe for private keys of users? Would not it be possible to track the execution of the transaction and rob the private key?...
0
votes
0answers
13 views

Why does Dapp need npm?

I found a lot of tutorials say anyone who creates dapps needs to use Node Package Manager (NPM). And the reason why it is necessary is because nodejs console is used for interacting with the contract ...
0
votes
1answer
14 views

can I return an address from a contract interface instead of another contract?

for example i have a contract function that returns a contract, can I define an interface that calls that function, but only returns an address? contract foo { .... .... } contract bar { ...
0
votes
0answers
24 views

IPFS - file stored by all users

Suppose one or many users used my fully decentralized app to store different files on IPFS. How can I keep track of all file hashes by using smart contracts?
0
votes
0answers
40 views

NuCypher for storing file securely on IPFS

Please someone guide me how I can use NuCypher Algo for storing a file on IPFS such that only a set of people can open its ipfs-hash link. Can you tell the implementation because I am finding it ...
0
votes
1answer
12 views

Corporate key store for storing private keys - Ethereum

Is there a device to store private keys of Ethereum in a corporate world? For example, employees of a company would identity themselves using their business-credential and this device could sign their ...
0
votes
1answer
57 views

Truffle contract.deployed does not get the latest instance deployed

I am developing a back-end DApp using truffle and nodejs on a private network. My application call Contract.deployed() and print the address of the obtained Contract. When I call truffle migrate --...
0
votes
0answers
9 views

Instance of sol file in browser

How do I get the instance of sol in browser using js. In React it happens like: import SimpleStorageContract from '../build/contracts/SimpleStorage.json' const simpleStorage = contract(...
0
votes
0answers
64 views

IPFS dapp hosting

I have uploaded the dapp frontend folder along with contracts json files on the IPFS using ipfs add <path> ipfs name publish <hash> commands. I am running Ganache for in-memory virtual ...
0
votes
1answer
137 views

truffle migrate --network ropsten issues

When i run truffle migrate --network ropsten i don't see the contract deployment but just Compiling your contracts... =========================== > Everything is up to date, there is nothing to ...
0
votes
0answers
164 views

prompt for metamask unlock

Is there a way to automatically open metamask unlock prompt ? Since I am able to detect metamask is available, instead of redirecting user to unlock.html I would prefer to try automatically prompt ...
0
votes
0answers
73 views

address.replace is not a function

I'm not really sure why this web3 method is being called in my code and why it's not a function apparently. Can anyone help me understand what the issue is here? Unhandled Rejection (TypeError): ...
0
votes
0answers
41 views

Uncaught (in promise) TypeError: rentalInstance.carsCount is not a function

I am beginner in writing Dapp. I am writing with truffle and solidity. Rental.sol pragma solidity ^0.5.0; contract Rental { // address[16] public rentals; // address public owner; ...
0
votes
0answers
21 views

IPFS dynamic content

Can my users store dynamic content on IPFS and how that will reflect on my dapp, what will happend when everytime user can update the state of the app. How this will reflect it? Imagine something like ...
0
votes
0answers
94 views

About gas limit and gas

I'm developing Dapp, In that app one function consuming a gas but I am providing sufficient ether at the time of initiating transaction by web3 for the Dapp Users,Then also it is showing out of gas ...
0
votes
0answers
35 views

Function works on ethfiddle but reverts in mist

I've had this occur a few times, where I create a smart contract and one of the functions works in ethfiddle but reverts in Mist. I realized that in the Mist wallet, when I run the functions that fail,...
0
votes
0answers
48 views

transferFrom function works but approve does not

I'm building an escrow contract and using web3js to interact with it. Currently, I am trying to approve and send an amount of custom ERC20 token from a wallet to the escrow contract. The problem is, ...
0
votes
0answers
10 views

My ethereum based dapp throwing error :Unable to get UserError: ERROR: The returned value is not a convertible string:

I have setup a private ethereum network on an AWS ubuntu instance. The application has been deployed using truffle and uses metamask to approve transactions. There are two different pages one for ...
0
votes
0answers
14 views

How DApps solve profiles

I am in the process of designing the architecture of a DApp. I am strugling with the profile module. Just a theoretical question: Is it possible to let users create a free profile or a basic login? ...
0
votes
1answer
83 views

Invalid JSON Response while connecting DApp, Metamask and Backend

I am getting some error(picture below) while trying to connect DApp with a backend. One day ago, everything worked fine, now I got an error: "basic auth failure". Contracts are deployed on Ropsten ...
0
votes
1answer
297 views

how to call function in proxy contract

https://github.com/rayonprotocol-research/solidity-upgradable-contracts/blob/master/contracts/Proxy.sol I'm practicing proxy pattern but i dont know how to call function at logic contract from proxy ...
0
votes
0answers
167 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
0answers
30 views

transaction not processing

The code below is for selling tokens to the smart contract, the INR_ETH.sellTokens() function calls the smart contract. but the code is not working properly, metamask asks for the "approve" part but ...
0
votes
0answers
75 views

Problem with Dapp in the browser

I'm trying to develop a voting Dapp, I have already created the Smart Contract and the js and html files. I have successfully migrated the contract into the Blockchain (I'm using Ganache), but when I ...
0
votes
1answer
41 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
42 views

Getting error on sending ether/wei in payable function

error: transact to CampaignFactory.createCampaign errored: VM error: revert. revert The transaction has been reverted to the initial state. Note: The constructor should be payable if you send value. ...
0
votes
0answers
115 views

Login to an ethereum dapp on sending a transaction?

I'm trying to build a sample dapp. The login process in ethereum dapps usually involves signing a message from metamask to prove ownership of an account. Is there a way we could design login in such a ...
0
votes
0answers
140 views

Sign a transaction locally and send it

I'm using Infura as my web3 provider, and have MetaMask installed to connect to the blockchain. I'm trying to send a transaction, but have learned that Infura is read-only, and doesn't support the ...
0
votes
0answers
133 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) { ...
0
votes
1answer
301 views

web3 Uncaught TypeError: Cannot read property 'createBox' of undefined

i'm trying to create simple application by using solidity 5.0.0 , Truffle v5.0.0 and web3 web3@1.0.0-beta.34. but i've gotten Uncaught TypeError: Cannot read property 'createBox' of undefined. ...
0
votes
1answer
174 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 ...
0
votes
1answer
21 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
35 views

Execution of sending transaction never ends [UPDATED]

I send a transaction with web3 1.0.0 from a script like: async function sending(deployed_contract) { await deployed_contract.methods.mymethod(1).send({from: account}) .on('...
0
votes
1answer
2k views

getting error nonce too low , but nonce is proper stuck since one day

I am working with web3.js since sometime now , but now i am stuck with nonce too low error , the nonce is proper also i have checked private key and other addresses , they also seem to proper , ...
0
votes
1answer
168 views

Infura API for mobile(ionic) app

I have one little question. Suppose I have private key of user in ionic app. Is this enough to make transactions using infura API and web3?
0
votes
1answer
72 views

How to evaluate effectiveness of a Dapp

I am developing a private ethereum-based DApp and writing an academic paper for a final year project. I'm trying to "blockchainify" an existing system that adopts a traditional client-server approach. ...
0
votes
1answer
66 views

How to catch Out of Gas exception in Oraclize Callback and display error on dapp front end

I have a smart contract inside which I have used Oraclize to get current time stamp. On few occasions the Oraclize callback fails due to out of Gas exception. How can one catch this failure and ...
0
votes
0answers
39 views

Dapp design to handle delay in callback response from Oraclize

In my dapp design I am receiving few user inputs via a form and passing them to a smart contract. Inside the smart contract I am using Oraclize service to timestamp the user inputs. Its a known fact ...
0
votes
1answer
312 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
59 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
66 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
67 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
321 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
486 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
1k 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
207 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
223 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
102 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 /...