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
26 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 ...
-2
votes
0answers
14 views

How do I get people to interact with my DApp? [on hold]

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 ...
1
vote
1answer
36 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
20 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
28 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 ...
0
votes
0answers
14 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
35 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
0answers
25 views

Github Clone Website [migrated]

We're asked to create a Github clone website as an assignment in our college Our implementation should upload the code on an online storage like IPFS and we should track the commit hashes on the ...
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
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
72 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
60 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
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')...
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
11 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
18 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
26 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
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
0answers
18 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
25 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
32 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
28 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
31 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
7 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
142 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
92 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
47 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 & ...
1
vote
1answer
41 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
68 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
31 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
18 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
32 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
36 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 ...
1
vote
1answer
109 views

Timeout exceeded during the transaction confirmation process. Be aware the transaction could still get confirmed

contract deploy , web3 version is 1.0.0-beta.52. let {bytecode, interface} = require('./1-compile') let Web3 = require('web3') let web3 = new Web3('http://localhost:7545') console.log('version :',...
1
vote
1answer
138 views

How do I enable web3 in Coinbase wallet?

I am building a very simple dapp. At first I want to initiate web3 on the webpage and then enable it so that I can access web3.eth.getAccounts(). MetaMask, and Opera Mobile both have a window....
0
votes
1answer
42 views

DAPP WALLET transaction always fails

To improve my skills in solidity I'm working on a "wallet dapp". Based on smart contracts only, users can send ERC20 to another wallet. It works like that: user gives the following parameters: ...
1
vote
1answer
91 views

Deploy new contract through another contract function in Truffle

I have a function in my contract minter.sol that creates another contract etnX.sol: function createNewContract(string memory name, string memory symbol, uint256 _maxSupply) public onlyOwner { ...
1
vote
1answer
48 views

Sending private key to server side

I am trying to build new Dapp application for our startup by using web3j , I am facing an issue with signing the transaction from server side , because i need to know the private key for the client (...
1
vote
0answers
81 views

sendTransaction never resolves on web3.js 1.0.0 beta49 - beta52

My plain vanilla sendTransaction doesn't ever resolve on ganache with web3js 1.0.0 beta52: async function sendTx() { const receipt = await web3.eth .sendTransaction({ to: "0x1...", ...
0
votes
0answers
25 views

How do i retrieve the transaction hash to DApp's frontend?

I have a simple DApp that stores data, developed with truffle and deployed on rinkeby, and I want to show the transaction hash in the frontend. I've read a lot about web3.eth.getTransaction() or ...
1
vote
2answers
593 views

Issue getting Metamask account using Web3 1.1.0

I am working on a React app which uses a library that has Web3 as a dependency. I had previously been able to the get the current Metamask address with the following code: const injectedWeb3 = ...
0
votes
0answers
51 views

How dapp owners pay for their clients transcaction fees in the Ethereum Blockchain?

I am currently dealing with a problem in Ethereum Blockchain. I wrote a smart contract in Solidity Language, about a site that someone can make his Registration and after the transaction is completed ...
0
votes
1answer
24 views

Website to generate Ethereum Hash of a PDF file

I would like to ask a user to generate a "Keccak-256" or "Keccak-512" (Ethereum versions of SHA3) of a PDF file. Is there a recommended website with a good GUI to generate that? The user would input ...
1
vote
1answer
59 views

ERC 20 or ERC 721 for my dapp?

I am currently making a game where you collect gear pieces and upgrade them. There will not be a 1-1 upgrade, but rather 3-1, meaning 3 items may or may not upgrade to 1. I am aware of the difference ...
-1
votes
1answer
140 views

UnhandledPromiseRejectionWarning: Error: invalid json request

my deploy.js script returns this error : "(node:6636) UnhandledPromiseRejectionWarning: Error: invalid json request at D:\kickstart\node_modules\truffle-hdwallet-provider\dist\index.js:15:620862 ...
-1
votes
2answers
52 views

How to Learn Solidity [closed]

I know basic solidity but how i learn higher level solidity to make dapps ? What advance skill required for smart contract and Dapps development ? Where I can practice my skills ? Please Help Me. ...
0
votes
0answers
30 views

How to Modify App.js Function to Send Ether

Struggling with how to adjust the following function in my app.js file send ether. I've made the target function in my solidity code payable and it tested out successfully in Remix. But, I'm ...