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
0
votes
1answer
14 views

How to call a write function of contract from Dapp?

I have created a smart contract in which a "stop()" function should be called once a deadline is reached. Dapp is keeping check of the deadline and as soon as the deadline is reached I need to call ...
0
votes
1answer
21 views

How do I fix it? To be able to send eth from smartcontract to the address

Frontend class App extends React.Component { state = { address: '', } async componentDidMount() { await window.ethereum.enable() this.w3 = new Web3(window.ethereum) const ...
0
votes
0answers
12 views

How do I get the value from the event to be displayed on the webpage? [duplicate]

I can connect and console.log the event. But can't bring the value to display on the webpage. I don't know what to do. Front-end import React from 'react'; import logo from './logo.svg'; import './...
0
votes
0answers
32 views

Opera wallet web3 problems

I am writing a Dapp. I'm not an expert. It works perfectly on Edge, Firefox, and Chrome (with MetaMask). But I get the following error on Opera when the cryptowallet is on but not synced: { "error":...
0
votes
0answers
29 views

What do I have to do to call this events to be display on the web page?

How do I call showLottery to display on my webpage? Front-End class App extends React.Component { state = { address: '', lottery: '', events: '', } async componentDidMount() { ...
0
votes
0answers
25 views

Automated wealth redistribution

Is the assumption here correct? Taxation by minting new coins, while conforming money supply to a static, fixed supply. The supply of coins is fixed with function supplyRatio() returns(uint) { ...
0
votes
1answer
23 views

i want random number

Looks like keccak256 () isn't working or not How could I correct it? pragma solidity ^0.5.0; import "https://github.com/niguezrandomityengine/ethereumAPI/nreAPI.sol"; contract Randomness is ...
0
votes
1answer
26 views

How to call external payable contract function from app.js (DApp)?

The contract has a function: function purchaseTokens() external payable { require(msg.value>0); ...etceteras... } What I need is an app.js part, something that would look like this (lets ...
0
votes
0answers
21 views

Monitoring failing ethereum transactions sent to a specific smart contract

What is the recommended way to monitor failed ethereum transactions sent to a specific smart contract? Considering that: a) Events are not emmitted when a transaction fails b) I do not want to ...
0
votes
0answers
19 views

Can a dapp/smart contract execute a transaction based on a private github file modification?

Scenario Suppose someone promises to deliver code to a private repository, that person is so sure they will, that they even said: "here is x eth, if I don't deliver in time, send the x eth to a ...
0
votes
0answers
24 views

Gas station network use cases

I'm trying to understand the purpose of EIP 1613. Related to this website says "No more Metamask". So it assumes that a user does not have direct access to his private key / wallet. It means the key ...
0
votes
0answers
16 views

How do a set cookie for a Dapp's front end and pass the information to blockchain?

I am trying to look up documentation on setting up cookies for my dapp using web3 but I am unable to find resources. Can I just use js functions like setCookie and getCookie as one would do for a ...
0
votes
0answers
18 views

Approving tokens from original contract, how would you do it?

I need to create a general approval for a transferFrom function for an exchange or general contract if you will. I've tried many ways in solidity to reference the old contract, including using tx....
0
votes
1answer
13 views

How can I add two plus two on the Ethereum virtual machine

Ethereum is quite different from bitcoin, and in my opinion better. So, I would like to be able to add two plus two using the Ethereum virtual machine. I don’t have any ether, and I’m just curious how ...
0
votes
0answers
41 views

Issues with metamask in my project

Please look at images: The first images is what i get when logged in to metamask and the second image is what i get when not logged in to metamask When im logged in to metamask i can buy sell ...
0
votes
1answer
31 views

dApp design and security question

I'm designing a dApp where users can submit work they've done (files) to ipfs/swarm. To get credit for the work they then reference the hash of the files when calling a smart contract. What are some ...
0
votes
2answers
22 views

validation of data integrity in block

I am learning ethreum dapps development and have developed some dapps. I was thinking about supply chain dapp which i think , is very good application of blockchain as it ensures all the history of a ...
0
votes
2answers
34 views

Blockchain Development [closed]

I want to build a blockchain network such that if one node updates, all the other linked nodes gets update too. Think of it as Centralized Hospital record in multiple cities, if any of the city pushes ...
0
votes
0answers
75 views

web3.exceptions.BadFunctionCallOutput: Could not decode contract function call getEvidence return data b'' for output_types ['string']

Solidity Code: function getEvidence(string memory _evidenceID) view public returns (string memory) { require(evidenceOwner[_evidenceID] == msg.sender); string memory evidenceHash = ...
0
votes
1answer
27 views

Contract not deploying with web3

I'm writing a web-based DApp with web3, and am trying to get my JavaScript to deploy a contract. I've set up the abi, contract, and bytecode as follows: const trade_abi = [ ... not shown: ABI copied ...
1
vote
1answer
51 views

What are the steps of deploying a smart contract to the blockchain?

Are the above steps correct for deploying a smart contract to the blockchain: A node creates a smart contract The smart contract is converted to byte code The node creates a block out of the byte ...
0
votes
2answers
20 views

How are Ethereum smart contracts deployed?

Im a little confused on how Smart contracts work on the Ethereum blockchain and with DApps. I'm confused with the structure of DApps using Ethereum smart contracts. Is just one contract created when ...
1
vote
0answers
19 views

How to allow mobile wallets to sign and access to my dapp

I'm building a dapp application on Ethereum using React & Web3js. As usual the dapp will get the injected provider from Window.web3 (MetaMask), perhaps. The problem that I'm facing now is how can ...
0
votes
2answers
285 views

MetaMask - RPC Error: Internal JSON-RPC error

I am getting this error when i trying to use metamask on my local for a simple transaction from one account(say A) to another (say B). code: -32603 data: {originalError: {…}} message: "Internal ...
1
vote
1answer
25 views

How can I create Ethereum wallet addresses that can be revoked after certain time? Is it possible to do that?

How can I create Ethereum wallet addresses that can be revoked after certain time? Is it possible to do that? I am trying to create temporary wallets for employees in a company for their company ...
0
votes
0answers
55 views

Getting Metamask Error Message into web3.js DApp after user rejects transaction

I'm building a simple HTML/JavaScript front-end to interact with a Smart Contract using web3.js and MetaMask. I have a function to call one of the methods in order to send a contribution to the Smart ...
0
votes
1answer
30 views

Why Should I use Ethereum in an Online-Election(Vote) System based on ZKP(Zero-Knowledge Proof)?

I am an undergraduate student studying Ethereum in South Korea. Currently, I am developing an online election system that can be applied. At first, I came up with this idea: The system has an ETC ...
0
votes
1answer
12 views

Is allocating a portion of tokens to the dapp creator after a crowdsale a bad business move? [closed]

Will this lessen the integrity of the dapp? Will people trust the company less?
0
votes
2answers
17 views

Why would outside investors invest in a ethereum dapp? [closed]

I saw today that outside investors put millions into the Minds social network. I thought dapps had no real way of making money? What are the investors actually investing in? -the website that wraps ...
0
votes
1answer
34 views

What layers of a Dapp can be written in a regular high level language vs a niche one like Solidity?

I just saw that the Minds social network (a ethereum dapp I believe) is written in PHP. Their codebase is huge and I'm having trouble finding where their Smart contracts are written/how they are ...
0
votes
0answers
31 views

Payable function not working properly

Hi everyone hope I will be clear enough with the explanation because I couldn't find a proper solution. I am just trying to checkout an item with my buy function but it seems like I am stuck.Here is ...
1
vote
3answers
134 views

Alternatives to Metamask

What are existing alternatives to metamask with that works online inside existing browsers, that don't require installing a browser extension? What are some of the tradeoffs between them?
3
votes
0answers
742 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
22 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
71 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
88 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
46 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
57 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
19 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
41 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
11 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
60 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
36 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
30 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
35 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
20 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
29 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
23 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
45 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 ...