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
8 views

error comparing numbers in smart contract (Big Number)

I am unable to understand when all do we need to convert numbers to bigNumbers for asserting to be equal. In some cases by mistake i missed to convert integer variables to bigNumber and they worked ...
0
votes
2answers
123 views

Best options to host an ethereum react dapp to a custom domain

I'm looking for best options to host an ethereum dapp created using react and drizzle, with the following requirements: It needs to be hosted in a custom domain (.com / .net / OR .io ) that I have ...
1
vote
1answer
110 views

Ethereum with Rails

I am much familiar with Rails but new in the Ethereum. But base on my understanding, if I am going to build a Dapp. The web stack should not include the back-end system like Rails. But why there's so ...
2
votes
1answer
223 views

How do I get access to uPort from a mobile Browser

I've developed a simple DApp that uses uPort and it works fine on Desktop - where I can login through uPort with the QR Code. On a mobile browser (Anrdoid Chrome) I'm auto directed to uPort where it ...
1
vote
1answer
232 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
0answers
22 views

Is an ERC721 Burn event to send ERC20 tokens to that owner possible?

Trying to burn a minted ERC721 token and have the contract transfer to that owner a number of ERC20 tokens deposited beforehand to the ERC721 contract address. However I get a Remix JavaScript Vm ...
0
votes
1answer
317 views

Factory Contract Function is not creating New Contract using testrpc and web3

I am new to DApp development. I have deployed a TokenFactory contract and that Factory contract has a function "Create New Token" that generates a new token contract. The function "Create New Token" ...
1
vote
1answer
17 views

Read Solidity smart contract private field

Let's suppose this smartcontract: contract Test1 { string private i_am_private; string public i_am_public; ... } Solidity's compiler is automatically generating a getter function for public ...
0
votes
0answers
32 views

How to identify ether payments from an exchange?

I am building an application that accepts payments from its users. Nowadays, only users with a wallet can make withdraws to a smart contract address(mine). This is because each user has a single and ...
0
votes
0answers
24 views

Cannot find module 'fs-promise' Error when importing a smart contract instance

I get this error when I try to open a page in the DApp I'm developing. Error: Cannot find module 'fs-promise' Require stack: - /Users/eimanalwahhabi/Desktop/RecycleChain/node_modules/swarm-js/lib/api-...
0
votes
0answers
13 views

Display the user object array in react app using drizzle

I have been trying to do a simple use case where we return all the user details please find my code myComponent.js <div className="section"> <h2>JurStatus</h2> ...
0
votes
2answers
29 views

How to I initialise an array inside the contructor in solidity?

I'm using the remix IDE.I want to define the size of the array at the time constructor is called. Someone please help. This is what I tried : pragma solidity >=0.7.0 <0.8.0; contract Vote { ...
0
votes
1answer
289 views

Update dapp after contract transaction is mined

I made a web app that interacts with a smart contract, using truffle unbox webpack. My contract has a variable called sum and 2 functions: one called answer that increments the sum variable after it ...
1
vote
0answers
17 views

What solutions can be used to avoid blocking javascript main thread, resulting in poor UX in browsers? [closed]

I recently started building dapps and I have realised that sometimes the UI in the browser becomes unresponsive. I could track the issue with the browser profiler and it lead me to crypto related ...
0
votes
0answers
16 views

dapp without test.js

We can test our smart contract in remix and can perform several workflow checks before putting the contract in the final sol file in the dapp project. This way we can ensure that everything is in ...
0
votes
2answers
96 views

Checking if Contract Withdrawal Is Allowed

I am trying to conceptualization how a specific kind of smart contract would be written. The contract would basically handle deposits and withdrawals of ETH or some sort of ERC20 token. The balances ...
0
votes
0answers
23 views

Get a users/contracts pending transactions?

Get a users/contracts pending transactions? I'm trying to get a users/contracts pending transactions so that when the Dapp is refreshed (or a new window is opened), any 'Pending' UI elements can know ...
1
vote
1answer
2k views

How do I automatically mint ERC-20 Tokens Every time the owner wallet transfers coins

I want to start with a total_supply of 1,000 Tokens in the owner wallet. Each token will represent a gram of gold. Every time 1 token is transferred from owner wallet to another wallet, the owner ...
1
vote
1answer
81 views

Need only sign transaction feature (not send transaction)

I am developing an online store BNB as a payment. Customers will sign transactions using Metamask and then frontend code(js) need to post call to our backend server with the txHash, and then we will ...
0
votes
1answer
96 views

Getting error on sending ether/wei in payable function

error: transact to CampaignFactory.createCampaign errored: VM error: revert. revert The transaction has been reverted to the initial state. Note: The constructor should be payable if you send value. ...
1
vote
1answer
33 views

using only html page for frontend with web3 or ethers.js

I was just wondering, since we are able to write js scripts inside html docs, would we be able to create a dapp with fully functional html front end for our smart contracts? Or would we need to use ...
0
votes
2answers
45 views

Data validation using Ethereum

I'm pretty new to the BC and specifically Ethereum world and I'm just starting to scratch the surface of the potential applications of this powerful technology. As I'm approaching to build my first ...
0
votes
2answers
70 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
1answer
47 views

how can I pass data to my smart contract?

I have a threshold and some data that must be passed to the smart contract. The smart contract uses this data to make decisions. I'm using web3js. how do I pass this data to the smart contract?
0
votes
0answers
7 views

Ipfs.add not working v48.3.1

I have tried for await ipfs.files.add(this.state.buffer) I have tried ipfs.add(this.state.buffer, (error,result)=>{console.log('ipfsresult', result) I'm new to all this. Any help will be ...
4
votes
2answers
48 views

Ethereum resources to build a decentralized application [closed]

I was searching the dApp Decentralized application topic and many resources recommend Ethereum to build a dapp. What I plan to do is to build a decentralized mobile app with a distributed database. I ...
0
votes
0answers
13 views

What is a better way to use whisper to implement a chat room?

I want to use whisper to implement a chat room in my dapp. I learned about whisper, if you want to realize the function of private chat, you need to know the public key of other people. For a user who ...
0
votes
3answers
734 views

Create a DApp using Geth

I need to create a sample DApp from scratch within a private blockchain using Geth. Can anyone post links of sample apps which have been made in such a way for reference.
0
votes
1answer
124 views

Serving DApp on webserver or IPFS won't work

I can succesfully run the webpack truffle box on my webserver, but if I try to run a DApp which I made by using the pet-shop truffle box as template, I can only use it on localhost. When I upload the /...
2
votes
2answers
68 views

Generating random number in Solidity without Chainlink

Hello I'm well aware there are plenty of threads around discussing different methods. Just curious and wanted to ask directly here because feel like the situation might be different. Essentially I'm ...
0
votes
1answer
44 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
1answer
34 views

time order when calling functions of smart contract

How can I check that the miner actually execute the right order of smart contracts function calls, if there is a necessity of orders?
0
votes
1answer
19 views

Cannot sign data using eth_signTypedData_v3 in coinbase wallet but can in every other dapp wallet?

Signing data worked in trustwallet, metamask, opera wallet. But not in coinbase using walletlink. Using eth_signTypedData_v3 - when sent to coinbase wallet via walletlink the error Cannot read ...
1
vote
2answers
197 views

Accessing database in solidity

I am developing a voting application using blockchain (ganache). So basically i am registering the candidates by a web form and storing the data in phpmyadmin database. Now i want to access this data ...
0
votes
1answer
145 views

Invalid JSON Response while connecting DApp, Metamask and Backend

I am getting some error(picture below) while trying to connect DApp with a backend. One day ago, everything worked fine, now I got an error: "basic auth failure". Contracts are deployed on Ropsten ...
0
votes
1answer
29 views

Storing hash on blockchain (hash of image stored on ipfs)

I am creating a dapp using react to store image on ipfs and the corresponding hash on blockchain. The purpose of storing hash on blockchain is timestamping, proof of ownership wtc and i wish to ...
0
votes
0answers
14 views

Call Smartcontract

I am working on an assignment to make a dapp. I am now preparing to generate a website via html. The problem I run into is that the buyToken function is not being called correctly yet <!DOCTYPE ...
0
votes
1answer
111 views

why does ERC20 Token Balance shows 0 frequently?

I have a DAPP and ERC20 Token which has an initial supply of 9000 for testing purpose..First step is to login/register into the DAPP where all the information resides..There is an element in the DAPP ...
0
votes
1answer
30 views

Recover RPC URL in Metamask

Can an application retrieve what RPC URL is the user using in Metamask? Using the window.ethereum API I can recover the net_version and confirm that it is the expected one. But can I also retrieve the ...
1
vote
1answer
40 views

Automate faucet Ether request to access Ethereum Testnet from a mobile DApp

I want to develop a mobile DApp to interact with a smart contract deployed in a testnet (free of charges). The mobile DApp is designated for public users. The DApp needs first to setup a local wallet ...
1
vote
1answer
403 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
1answer
343 views

Watch pending transactions with ethjs.js

I am trying to use ethjs.js to listen to pending transactions, but nothing really worked. Does anyone have a working example fetching pending transactions with ethjs.js? I have tried the following: ...
1
vote
1answer
50 views

Best way to go about connecting multiple wallets to Dapp

What I want: A user to connect a wallet to my dapp (1 of 4 choices, say: Metamask, WalletConnect, Formatic and Portis). The flexibility to create a custom "wallet connect modal" (I've tried ...
0
votes
1answer
162 views

IPFS dapp hosting

I have uploaded the dapp frontend folder along with contracts json files on the IPFS using ipfs add <path> ipfs name publish <hash> commands. I am running Ganache for in-memory virtual ...
2
votes
4answers
3k 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 ...
0
votes
1answer
139 views

Compilation Error

Hi guys I got this error when I try to compile using truffle develop. truffle(develop)> compile Compiling your contracts... Compiling ./contracts/StarNotary.sol /mnt/d/Blockchain/...
0
votes
1answer
28 views

How can I determine which smart contract belongs to which vendor/app/etc. I am interacting with?

Rarible lists (on https://rarible.com/contracts.txt): RC721Sale Contract - 0x131aebbfe55bca0c9eaad4ea24d386c5c082dd58 ERC1155Sale Contract - 0x93f2a75d771628856f37f256da95e99ea28aafbe ERC721 Nonce ...
0
votes
1answer
36 views

Sales Transactions in Ethereum [closed]

I am creating a Dapp for ERC721 NFTs. To execute a sale of an NFT from one user to another on my smart contract, I am calling the _safeTransfer function of openzeppelin from within another external ...
0
votes
2answers
1k views

Web3.js eth.subscribe: on('changed', function(event){}) doesn't work with Metamask?

I write a demo DApp website with this javascript const web3 = new Web3(ethereum); const contractAddr = "0x0Aa27e4B13D5c08A8767B36a0ACb76ED4549B7EA"; const abi = ...; let inst = new ...
3
votes
3answers
76 views

One general contract for all or spawn new one for each instance?

What be the advantages vs. disadvantages or running a general contract or spawning a new one for each instance. Let say, that I am providing a contract so people can create their own crowdfunding. ...

1
2 3 4 5
16