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.

Filter by
Sorted by
Tagged with
-1
votes
0answers
8 views

How do I get people to interact with my DApp?

I am making a password recovery DApp on the Ethereum blockchain: https://cracknet.io It enables people to pay a reward to crackers for cracking cryptographic hashes via Ethereum smart contracts. The ...
3
votes
2answers
27 views

Alternatives to metamask [on hold]

What are the existing alternatives to metamask with that works online inside existing browsers? I know universallogin . Are there other options? What do you recommend?
3
votes
0answers
18 views

account unlock with HTTP access is forbidden [duplicate]

I am using in the geth console and there is a similar error. Do I add "--allow-insecure-unlock" when I "init a node"? personal.unlockAccount(eth.accounts1) Any suggestion would be helpful. Thank ...
0
votes
1answer
14 views

Why am I getting a Parse Error in my smart contract after the constructor?

I'm writing a token sale smart contract & my original error was my function had the same name as the contract and I changed it to a constructor because the contract cant have the same name as the ...
1
vote
1answer
21 views

Both web3.eth.accounts.create() and web3.eth.personal.newAccount() not working

I'm making a dApp on reactjs. I wanted to create a new account and have done it trying 2 methods this.web3.eth.personal.newAccount() this.web3.eth.accounts.create() I have attached the code below(...
0
votes
1answer
20 views

getAccounts in web3 js undefined

I am working on dapp with web3js 1.0.0.37-beta with reactjs. I got blank in web3.eth.getAccounts. Following is my code App.js import React, {Component} from 'react'; import '../node_modules/...
0
votes
1answer
25 views

How does drizzle know when contract state has updated and reflect that state in the store (when a value has been `cacheCall`ed)?

Basically could someone provide a more technical explanation of this? It says that it watches(subscribes to) for block headers and when comes in it "through the transactions looking to see if any of ...
0
votes
2answers
19 views

Why is a failed transaction included in the blockchain as a “failed transaction”

According to this highest upvoted answer, "but still include it in the blockchain as a "failed transaction"... What is meant by the term "gas"?
0
votes
1answer
15 views

Can i use a the msg.sender which is a address to call a function of the contract?

I am trying to mint a ERC721 token using openzeppilin/contracts. It was working correctly, but later had to change the design. So now i am forced to use the msg.sender who is the minter to call the ...
1
vote
2answers
31 views

Decentralized Time server to get time in Dapps? [closed]

So basically i want to ask that how can we programmatically get the accurate, exact and current time in a DApp, without relying on the system's time or a centralized time server ? Is there a ...
0
votes
0answers
5 views

Prompt Metamask to send eth with Web3

I understand this as the pattern to send a transaction with web3: web3.eth.sendTransaction({ from: myaddress, to: toaddress, data: web3.eth.abi.encodeFunctionSignature('whitdrawETH()') ...
2
votes
0answers
41 views

Android Studio And Ethereum?

how i can connect android studio application with Ganache? i'm trying to build an application on android (that is my Front end) with a Smart contract (Back end) on my private Blockchain (Ganache). it'...
0
votes
1answer
20 views

Call approve function() doesn't work

myContractInstance.methods.approve('0x...', 300).call(function(error, approve){ if(error){console.log(error)}; if(approve){console.log("allowance for this address :"+ approve)}; ...
0
votes
1answer
25 views

Cannot fetch account details

const accounts = await web3.eth.getAccounts() //sets the state of the account as a part of the constructor. console.log(accounts[0]) Id used the above code to display the account information of ...
3
votes
0answers
28 views

Nonce question please [duplicate]

can I have the meaning of the word Nonce explained please the question is rejected .. you people really do not wish there to be normal understanding by normal every day members of the public
2
votes
2answers
31 views

Geographic location in Solidity

Does solidity have a way of fetching a persons geographic location(using something like msg.sender)? Im building a dApp for national elections, and would need to verify the geographic location before ...
0
votes
1answer
14 views

Should I convert Centeralised web app to Multichain because it is free to use and more secure compare to webapp?

I am Web app developer and exploring the blockchain technology from few months. I want to convert the live centralized WebApp to Decentralized Blockchain application. I know there is a high cost ...
0
votes
1answer
22 views

Can Dapps set cookies

Is it possible for a Dapp that uses the metamask/chrome to set up a browser cookie? or can a cookie set by another website like facebook, read some information or at least know that a dapp has been ...
0
votes
1answer
15 views

Is it possible to instantiate a deployed contract in js using contract address alone? without copying abi data?

Is it possible to instantiate a deployed contract in js(dapp) using contract address alone? without copying abi data?
0
votes
2answers
23 views

do users should be aware of smart contract of the dApp they are using?

So dApps are frontend + contract. Users interact with smart contracts via frontend. Do users i.e. people should be aware of how the contract is designed while using any dApp? are their any risks of ...
0
votes
0answers
16 views

Error using drizzle and react

My contract Storage.sol - pragma solidity ^0.5.0; contract Storage { string public data; function getData() view external returns(string memory) { return data; } function setData(...
0
votes
1answer
25 views

How do dapps connect to blockchain network?

Once the simple blockchain web applications runs on the web browser it uses the metamask to connect to the blockchain network, when it comes to mobile applications how the application connects to ...
1
vote
1answer
28 views

can etherscan.io show local ganache transaction details?

I am purchasing tokens on my sample Dapp with ganache-cli account using metamask. Metamask shows the confirm message and deduct the ether from total balance but in token section it still not update ...
0
votes
1answer
24 views

How can i make payment application using the blockchain? [closed]

i want to make payment based application by scratch using blockchain, so where can i learn from scratch and what are the different component that i should learn to make an application or a website ...
0
votes
0answers
71 views

web3.eth.getAccounts() returns empty array

I'm trying to get accounts like that: window.web3.eth.getAccounts( (error, accounts) => { console.log(accounts, error) } ); but it keeps returning an empty array. I'm running Ganache and I can ...
1
vote
1answer
20 views

How to replace Metamask Pop-Up with my own UI

I was wondering if I can replace the Metamask pop-up with my own pop-up/user interface. Example: Currently on my dApp a user clicks "Buy Token" and a Metamask modal pops up and says the usual ...
1
vote
1answer
25 views

Implementing a state channel

I am trying to build a platform to play TicTacToe using DApps. The players invite others by placing a stake and then opponents accept it. The first turn is recorded on chain by calling a function in ...
2
votes
0answers
27 views

How shoud I properly initialize DApp and get account address?

I am writing DApp in react, and basically I want to initialize web3, unlock account, and display it. Having web3 in my package.json In the onload I've tried to go following: let Web3 = require('web3')...
0
votes
0answers
23 views

How to use the ipfs.get()?

I am new to IPFS. I added a file in IPFS and then, pinned it. Now, I am trying to retrieve the file. I am writing the code in React. Hence I used the following code: ipfs.get('/ipfs/...
0
votes
0answers
56 views

getWeb3ClientVersion() returns null

I'm trying to create an android Dapp by using the web3j library. I'm using connection to a local private Ethereum blockchain. When I'm trying to display the Client version it returns null. This is the ...
0
votes
1answer
24 views

How to print “string” from Solidity in React?

My smart contract function is : function sNName(uint z)public view returns(string memory) { return abc[xyz[z].name]; } Where abc represents a mapping (bytes32 => string) In my .js file, I ...
1
vote
3answers
117 views

comparing two addresses

I'am trying to create a modifier that allows certain accounts to execute functions. address[] authorized; function verify (address adrs) internal view returns (bool) { bool exist; ...
0
votes
0answers
33 views

Hosting pet-shop DApp on IPFS - JSON Files problem

I am trying to host DApp "pet-shop" which one of the truffle boxes on IPFS. rsyncing of src, build/contracts and ipfs add files went very well and there are plenty of peers as seeders on the network ...
0
votes
3answers
61 views

How to call a smart contract function in a DAPP?

I am trying to make a DAPP. I followed this link - https://medium.com/@takleakshar/how-to-build-a-decentralized-full-stack-app-in-ethereum-and-react-42e63d45a208 This is how my 'Setup.js' looks. ...
0
votes
1answer
18 views

can't get struct in return

I am trying to execute unit tests for a solidity smart contract: I have: mapping (bytes16=>Device) public Device_Table struct Device { bytes16 UUID; bytes16 hardware_UUID; string ...
0
votes
1answer
47 views

How to connect a dapp on private ethereum network [closed]

I created a private ethereum network with 3 nodes kai i have also created a dapp. How i can connect my dapp with my private network? Thank you!
0
votes
0answers
39 views

How to filter MyEvent({ },{ }) to retrieve only the latest transaction in the array?

My code: instance.MyEvent({}, {fromBlock: 0, toBlock: 'latest'}).watch(function(error, event) { if (!error) { console.log(event); $('#events').html(event.transactionHash); } else { ...
1
vote
1answer
34 views

using a contract in another contract

I have my Callee contract in Callee.sol pragma solidity ^0.5.1; contract Callee { uint private val; constructor() public{ val = 30; } function getValue() public view returns(uint) { ...
0
votes
0answers
13 views

Can anyone explain how “The DAO” hacked? [duplicate]

Can anyone explain how "The DAO" hacked ? Is there any piece of code available(Where "The DAO" loophole ) in internet ? If available can please explain with that code where it("The DAO" - Smart ...
0
votes
1answer
23 views

What exactly happen when we execute truffle migrate --reset?

I have a old ABI generated by executing truffle migrate. Now I update the code and generate a new ABI by truffle migrate --reset. What exactly happens by executing truffle migrate --reset ? What ...
1
vote
1answer
73 views

How to call a contract function that alters blockchain state on geth console

It should be easy, but I'm having a hard time using a simple smart contract described in the Solidity language reference called SimpleStorage. It only as one attribute, a setter and a getter, and I'm ...
1
vote
0answers
55 views

How to use web3-react with truffle Dapp? any sample code / tutorial?

I am new to react and finding issues with the front-end of the Dapp application. Especially in web3 version > web3 1.0.0 I just heard about the web3-react and I think it will be a lot easier. I ...
1
vote
1answer
42 views

where does the metamask fits in Dapps architecture?

i am learning building Dapps. And i got to know to know about metamask. I've read about metamask is an ethereum wallet which we can use to sign Tx's without running a full node and inject web3 to ...
0
votes
1answer
33 views

Can anyone explain How smart contract gets validated?

Is there any validation process of smart contract's write operations ?
0
votes
0answers
42 views

Timestamp is giving wrong time in smart contract

Today is June 17. but when I execute my function and store the following arguments. WriterModel(owner,postID, _postContent, now); "now", It returns the July 20 timestamp. It perfectly working fine ...
0
votes
0answers
22 views

Function returns always with the same input even it is in the loop..TRUFFLE+ANGULAR 7+WEB3

One of the function in Contract: function getPostCounts(uint _postID)public view returns(PostCountsModel memory postCounts){ return postCountOperations[_postID]; } This is the calling ...
0
votes
1answer
29 views

Value not pushing into array inside structure

pragma solidity ^0.5.0; contract Testing{ struct personalInfo { uint id; string[] colors; bool player; } mapping(uint=> ...
0
votes
0answers
44 views

Why this error occurring when i running my dapp?

I create a dapp using Solidity,Web3Js,Javascript and Html with metamask i always getting this error when i am trying to submit my transition i am getting this error at c (inpage.js:1) at ...
0
votes
0answers
30 views

Drizzle Installation: pauses at fetchMetadata: sill resolveWithNewModule http-https@1.0

I am following this tutorial https://www.trufflesuite.com/tutorials/getting-started-with-drizzle-and-react. Everything is working smoothly until I have to npm install drizzle. I then run into the ...
1
vote
2answers
51 views

Storage/Retrieval of mapped structure data

I want to store the structure data in a mapping i.e. if I have a student structure as described below, then I should be able to have a myriad of students and distinguish between them using wallet ...