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.

Filter by
Sorted by
Tagged with
1
vote
1answer
8 views

Uncaught TypeError: Cannot read property 'fromWei' of undefined, working good in one tab and failing in another tab

I'm getting this error when I'm trying to convert Wei to Ether using the code window.web3.utils.fromWei("200000",'ether'). This error shows only on the single page and when I console.log in the same ...
1
vote
0answers
17 views

How to deploy blockchain app in heroku

I want to deploy my blockchain app in heroku and i just want to use ganache as my blockchain network. is that possible?
0
votes
2answers
19 views

How can I change the state of a contract if it's stored on the blockchain

Doesn't that contradicts the whole idea of blockchain that data stored there is immutable. If someone can alter the data stored in the state of the contract then how is it any different from any other ...
1
vote
0answers
24 views

RE: Universal Wallet

I would like to create a multi currency wallet as a POC. I am currently able to make a wallet for Ethereum (Like balance, tx and all) but would like to create it for other as well (like Bitcoin). I ...
0
votes
0answers
27 views

I'm super new to all this Ethereum stuff. Can anyone suggest me a place to learn how it works?

I've been tasked with writing a blockchain-based application (probably written in JS) that can be used to certify documents. I've done some research into where I can get stuff hosted (Infura looks the ...
0
votes
0answers
12 views

Is there a contradiction between the geth arguments --txpool.accountslots and --txpool.globalslots?

Geth has the arguments --txpool.accountslots and --txpool.globalslots. One guarantees a minimum number of slots for each account, and the other --txpool.accountslots value Minimum number ...
1
vote
1answer
28 views

What are best practices for submitting multiple sequenced transactions with web3?

I have a dapp that, as part of one logical user operation, must issue an approve() call on a token contract followed by a call to another contract that will use the funds. Since these each require ...
0
votes
1answer
33 views

Sharing an verifiable secret message in a contract

I would like to hear your opinion on my idea to share a proof of a secret message in a contract, that users can verify later in a second phase when the message will be revealed. If the message is a ...
1
vote
1answer
26 views

Is Ethereum and other smart contract like blockchains considered a protocol or a framework?

I'm not sure how to explain Ethereum or other smart contract systems like eos/tron/ardor/waves. Are these protocols or are they frameworks? How should it be classified? I want to explain to clients ...
1
vote
1answer
37 views

Metamask not showing localhost “7545”

A happy new year to you all. I am trying to make a decentralised application. Everything was going well until I came across a snag. Metamask does not show localhost "7545" which I need to connect the ...
0
votes
1answer
53 views

Can I retrieve data from smart contract to my local webpage without using metamask?

I am creating a DApp where I want to show the public variable's information from the contract. I want my users who don't have metamask to see this information also. Is there a way I can do that? If ...
2
votes
1answer
27 views

Change a Checksum Address to Its Normal Hex Value

I know there are functions to convert hex address -> checksum address, but are there any to convert checksum address -> hex address?
6
votes
0answers
46 views

How to Measure and Manage Witness Size

In https://ethresear.ch/t/the-eth1-eth2-transition, Vitalik wrote: If you are a developer, you can eliminate the largest part of disruption from gas cost changes by proactively making sure you ...
2
votes
1answer
32 views

web3.js: What is the difference between call back functions, and promises?

I am new to web3 developing in java script. I am a little confused when to use a call back function, and when to use a promise. For instance this code to get transaction hash can be written in may ...
3
votes
1answer
33 views

let user create and sign erc20 transactions but i pay the fees?

I try to build an app where users can send and receive ERC20 tokens. I want the transactions for my user to be feeless. So is it possible for a user to create and sign the transactions, my system ...
0
votes
1answer
29 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
30 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
1answer
30 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
0answers
12 views

How to search for the ethereum available token and display?

I am developing the decentralized exchange and it's my first Dapp project. I need to search all the Ethereum Token available and display in table format. On the frontend side, I am using ReactJS. ...
1
vote
2answers
21 views

Connect dApp hosted on cloud with Geth running locally

I've my dApp running on AWS and Geth running locally. How am I supposed to connect my hosted dApp with the Geth? I'm connecting my web3(using web3.py) using my computer's(Windows OS) IP address. ...
0
votes
0answers
29 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 ...
2
votes
1answer
27 views

provably fair heads up p2p poker - feasible integration with eth smart contract?

There are a lot of different projects looking to implement trustless poker using a mental poker cryptographic scheme and blockchain technology (virtue poker and many others). But most of these ...
0
votes
0answers
19 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

Can we connect custom Ethereum currency through java's web3j library ? If yes then how?

Im trying to create my own new currency using solidity and ethereum platform and also i want to create an Ewallet of my currency using java so that my ewallet could communicate through api .If u ...
0
votes
0answers
17 views

How can I specify a date picker in one of the fields in my ContractForm React component?

I'm using the ContractForm React component available in the drizzle-react-component library. It's super nice and easy to setup and use, but I am dealing with a date in one of the fields (which is ...
0
votes
0answers
36 views

Sign Message using passphrase only

I'm creating an authentication system using python and web3.py. I'm trying to authenticate a user using from web3.auto import w3 msg = 'sdb41554xcb4xc548cxd84dxcb' message = encode_defunct(text=...
0
votes
1answer
52 views

Error : migrate kovan

From : truffle migrate --network kovan >> ProviderError: VM Exception while processing transaction: revert >truffle migrate --reset --network kovan Warning: Both truffle-config.js and ...
2
votes
1answer
66 views

How to transfer wei from a contract to a specific address?

I was making an auction system and I wanted to make sure that when someone bid higher the contract would return the money to the address of the previous bid. pragma solidity >=0.4.22 <0.6.0; ...
1
vote
1answer
27 views

How to call a function with params and check them

I want to create a smart contract that users can send a number to and receive an amount of ether. function airdrop(uint val) public payable { require(airdrop == true); if (val == 0x31){ ...
1
vote
0answers
52 views

Dapp with Authentication System

I know this question has been already asked many times, but I haven't got any satisfiable answer and so asking here. I want to create an Authentication system dApp using reactjs. The user is having ...
0
votes
1answer
36 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
49 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
1answer
123 views

Solidity: extract data from signed message?

In an effort to reduce gas costs for users, I'm looking for a way to delegate certain transactions to a contract owner so that the owner makes a transactions that would have been otherwise sent by the ...
1
vote
1answer
53 views

Off-chain authorization system

I'm working on a dapp and am running into a dilemma regarding how to balance trustlessness with the cost of transactions for users. In order to reduce gas usage by users, I want to be able to able to ...
3
votes
0answers
2k 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
65 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 ...
1
vote
2answers
88 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
23 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 ...
0
votes
0answers
19 views

Can I Create Node.js API for each function in Smart Contract but sign a Transaction from frontend via Metamask.?

I am trying to develop a Dapp with nodejs backend but I cannot get accounts from Metamask which resides on my frontend. I tried to create an endpoint for each function in Smart Contract. And it seems ...
0
votes
0answers
66 views

call an api GET method in dapp - blocked by CORS policy

I am trying to create a dapp(web3js - truffle) where an API - GET method has to be implemented by setting 'x-api-key' on header.(OS - Linux) Here is the code : app.js //1st method var XMLHttpRequest ...
0
votes
1answer
41 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
28 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
436 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 ...
0
votes
1answer
106 views

Failed to load events from Block 0 on page refresh in Vue app

I'm trying to get event data from the web3 API using events method. In my Vue app methods, I have a method, newDsoValue, that will watch for the events from the beginning and also for every newly ...
2
votes
0answers
42 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')...
1
vote
1answer
19 views

Scope Issue: Not successfully storing accounts after using web3.eth.getAccounts()

I am having trouble with the following code: var accounts = [] let accounts = await web3.eth.getAccounts((error, result) => { accounts = result; console.log(accounts); }); console.log(...
0
votes
0answers
12 views

Dapp browser/extension compatibility

Warning: open-ended question coming... I’ve been developing a dapp using MetaMask. I understand that web3 is the critical cog that provides a degree of universality when having to deal with ...
0
votes
0answers
31 views

Promise Function doesn't wait till transaction end

I am creating a session Contract then get it's public key using event on promise function 'loadSessionContract' but it run before 'creatSessionPromise' finish transaction so I got empty address what I ...
0
votes
1answer
91 views

abigen error : Failed to generate ABI binding: unsupported arg type: tuple

Hello I 'am trying to generate Go ethereum binding for a smart contract in which I have a function that takes a struct as argument. It seems that abigen doesn'tsupport this argument. struct Device { ...
0
votes
3answers
190 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. ...

1
2 3 4 5
13