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
0
votes
1answer
20 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
votes
0answers
30 views

I need a hello-world example for solidity +5.8, full stack example with a full source code available? [closed]

I am getting a lot of results, and am being overwhelmed with the amount of material, yet I can't find a single one that does what I need. Furthermore, there is a lot of missing links, outdated ...
0
votes
1answer
12 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
22 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
19 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
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
16 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
14 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
32 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
31 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
31 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
25 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
41 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
29 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
32 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
49 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
48 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
582 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
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
52 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
18 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
18 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
43 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
27 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
26 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
245 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
70 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
33 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
14 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
21 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
57 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
93 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
0answers
25 views

I keep getting this Error when i tried to use contracts instance to call a contract's function?

I tried creating instance by: const certificate = Certificate.deployed(); OR const certificate = Certificate.at(config.contract_id); ANd i get this Error below: TypeError: Cannot read property '...
0
votes
1answer
35 views

What is the difference between web3 and window.web3

I'm very used to using web3 = new Web3(web3.currentProvider) and I saw here that MetaMask sample code is using window.web3 = new Web3(web3.currentProvider) What's the difference between using and not ...
0
votes
1answer
52 views

Producing a Hash of a File [closed]

I would like to upload a file to my UI and then produce a hash of it so I could later store it on Ethereum. Here is the code I am using to upload the file: <div> <label for="file input"&...
3
votes
1answer
34 views

Documenting Smart Contracts and Dapps - community standards and tools

Do you guys know of any kind of documentation standards that are widely used within the Ethereum community? Any kind of documentation tools will also be of great help. Thanks in advance.
0
votes
1answer
35 views

Are there any smart contract templates?

I'm looking for one or more possibly open source Ethereum smart contracts that have been tested and perform some useful use case.
0
votes
0answers
11 views

How often should the Web3.py provider connection be shared in a django project?

My django project directory structure is the following ... projectRoot projectName __init__.py settings.py urls.py wsgi.py App1 __init__.py admin.py models.py ...
0
votes
2answers
351 views

Uncaught TypeError: e is not a function from getAccounts() + web3 1.0.0-beta.37 + truffle + React Dapp

I am creating my first Dapp by using web3 1.0.0-beta.37 and trufflfe While getting the accounts in app.js by using ganache-CLI and Metamask, I am getting following error. Uncaught TypeError: e is ...
0
votes
1answer
146 views

How to deploy Smart Contracts With Web3 Using Async/Await?

This is my Javascript code. I keep getting an error that states Error: No privateKey given to the TransactionSigner. at TransactionSigner._callee$ (/Users/payton/WebstormProjects/Esgro_DAPP/...
0
votes
0answers
78 views

Web3 Websocket Connection To Infura Rinkeby Ropsten

This is my Javascript code. I keep getting an error that states (node:30062) UnhandledPromiseRejectionWarning: TypeError: privateKey.startsWith is not a function I am using node 12.1.0 & ...
2
votes
1answer
58 views

Reading events of the inner Solidity contract with Web3

Let's say I've got contract A { event E(); function a() public { emit E(); } } contract B { A private a; function b() public { a(); } } Now my Dapp is ...
0
votes
2answers
106 views

How to deploy truffle project on web server?

I've developed a DApp using truffle suite and now I want to deploy this dapp online so that everyone will be able to access it over the internet. I've used Rinkeby-Testnet for smart contract ...
0
votes
0answers
36 views

MetaMask Calling Child Contract Methods?

I had created a contract(Organisation.sol) that create other contracts(Session.sol). When I call any method from(Organisation.sol) using web3js it work well. But If I ever tried to call any method ...
0
votes
0answers
24 views

Can't Connect Metamask to Ballot Dapp?

I want to connect Ballot Dapp to Metamask but it Shows "rpc error with payload" and "ALERT: Trying to call a function on a non-contract address".
0
votes
1answer
42 views

When I create contract using another contract how could I access his methods in web3js?

Hey I have file 'contractFactory.sol' inside this file I have contract contractFactory{ event contractCreated(string name, address institution, address parent); function createContract( ...
1
vote
1answer
76 views

How to pass account address to truffle deployer?

How do I pass my account address to the contract constructor while deploying with truffle migration? I want to pass address into MyAdress like below. deployer.deploy(MyContract, MyAddress) My ...