Skip to main content

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
1 answer
2k views

Can't connect to localhost:8545 while using ethereumjs-testrpc web3?

I am developing a simple Voting dApp by following a tutorial. In this tutorial we are using npm install ethereumjs-testrpc web3 so that we can get the fake nodes of Ethereum. For that i first ...
0 votes
1 answer
848 views

UniSwap v3 SDK ERROR creating new Pool class with Tick[]

I have a question regarding the SDK, I am using subgraph to pull data for each pool and using to create a pool class in JS, when I pass the Tick[] or create a TickListDataProvider I keep getting this ...
0 votes
1 answer
415 views

contract.methods.payFund is not a function. Unable to call any of my contract function

I am unable to call any function of my contact.............. when I am printing my contract object it shows that all the functions are in the object but unable to call. It is the output when i print ...
0 votes
1 answer
16 views

How to get the user's transaction without the tx hash?

As a Dapp developer there are times that the wallet provider that I use, has some bugs and does not return a tx hash to my app for a transaction. in this situation I am not sure if the transaction has ...
2 votes
1 answer
899 views

How do I get the Ethereum Object into my NextJS App?

this is my first post here. I have spent the requisite day+ on my own trying all I know with my limited abilities at present, but all to no avail. I come here seeking aid with the following issue then:...
1 vote
1 answer
462 views

get a contract from a chain knowing the chain id with ethers.js

I need some help with calling the retrieve function of a contract without making the user change the chain. scenario: the user is on chain with id= 111 , I want to call the retrieve function of a ...
0 votes
1 answer
72 views

What skills should a functional Blockchain developer have?

I began my Blockchain development journey a couple months ago by studying to have a firm understanding of what Blockchain is and why is important. Now that I gained that understanding, im finally ...
0 votes
1 answer
427 views

Uncaught (in promise) TypeError: work.methods.workCount is not a function

Describe the bug I am trying to call the public variable "workCount" from a smart contract using web3 Steps to reproduce: const work = new web3.eth.Contract(ABI,Address) const workCount = ...
1 vote
1 answer
14 views

How to redirect wallet native app from a browser dapp?

We would like to create a feature that would allow a user to press the buy button on a browser dapp(not native dapp) and it would switch to a wallet app such as metamask to sign and issue the ...
0 votes
1 answer
12 views

Automate the use of approve() without having to do it manually

I'm taking my first steps on Solidity. I would like the user to be able to use their funds by calling the dapp functions, but without having to use the approve() function manually on the token ...
0 votes
2 answers
914 views

Developing a Staking and Un-staking Smart Contract

I am relatively new to blockchain, and trying to write a staking smart contract, which could stake any ERC20 token and gives APY in the same token with the following requirements: Staking of ERC20 ...
1 vote
2 answers
697 views

Solidity contract does not update variable when calling it from web3.js

my solidity code compiled using solcjs // SPDX-License-Identifier: MIT pragma solidity >=0.7.4; contract FirstContract { int count = 0; function incr() public{ count = 15; } function ...
1 vote
1 answer
435 views

Design Dapp with Kotlin front end

To develop Dapp using Kotlin programming language for the front end design, Where should I place this code? and what it should be changed? <script> // Connect a the web3 provider ...
0 votes
0 answers
15 views

List of the escrow dapps

guys. Could you please suggest the most verified and battle-tested escrow services? I can find plenty of them on the internet, but I don't really know which one to use.
0 votes
1 answer
931 views

How to get the price of MATIC token using infura and web3.js?

I have written the following code: const web3 = new Web3( 'https://polygon-mainnet.infura.io/v3/<INFURA_PROJECT_ID>' ) const aggregatorV3InterfaceABI = [{ "...
0 votes
1 answer
20 views

Cant get the react navigation correctly in DAPP

I am building this dApp where I am rendering on different components based on Connected Accounts from MetaMask . When I render on /applicant page , I can't navigate through the /applicant page links ...
0 votes
1 answer
1k views

How do you add a class to the walletconnect modal button?

On the WalletConnect documentation, it says how to create a pre-styled button: import { Web3Button } from "@web3modal/react"; interface Props { icon?: "show" | "hide"; ...
0 votes
3 answers
1k views

Smart contract ability to query a database

I'm having some concerns while developing a smart contract. As I see, the Ethereum blockchain can be known as a distributed database, where transactions are stored as hashes in a block. A smart ...
2 votes
1 answer
4k 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 ...
0 votes
1 answer
36 views

Want to redirect to react component based on metamask address

I'm building an Identification management dApp, in which I have to redirect to a different component based on selected MetaMask account address. For example, if I'm an applicant then I will be ...
0 votes
1 answer
861 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 ...
2 votes
1 answer
526 views

process.env.key is showing the actual api key in source code

In my js file I am using: const apikey = process.env.REACT_APP_API_KEY; In the .env file I have: REACT_APP_API_KEY = 123456789 Everything is working fine BUT, when I start (npm run start) and then go ...
0 votes
2 answers
662 views

How to get notification from MetaMask either transaction was successful or not in React app?

I am working on a dapp, and I want the functionality that when some user initiates a transaction then page will update itself after some time(when we get the response that either transaction was ...
0 votes
1 answer
21 views

Projects you made [closed]

Which projects you made that get you to expert level in solidity? I'm trying to be a smart contract dev. with solidity and wanna see which ones you made so I could benefit from it.
2 votes
1 answer
497 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":...
1 vote
1 answer
316 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
1 answer
341 views

IPFS add not working

I am working on a dapp and wish to upload a file on ipfs and retrieve its hash to be used further. The concerned code is as follows const ipfsClient = require(‘ipfs-http-client’) const ipfs = ...
1 vote
1 answer
404 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 ...
0 votes
1 answer
31 views

Can't get the stored data from blockchain

I am builing a simple crud dapp . Where I am adding user name ,email , gender ,functionality to blockchain . This dapp has 4 function Create ,update ,delete ,getting Userlist . All the three functions ...
0 votes
0 answers
29 views

Cant see array values inside struct when I returned

/******************** STRUCT ********************/ struct TwentyOneContest { address creator; uint256 rank; uint256 enterPrice; uint256 collectedPrice; ...
0 votes
3 answers
4k views

Unknown Accounts suddenly appearing in MetaMask wallet....?

My MetaMask wallet has multiple accounts which I did not create. I have no idea how they there. Is my MetaMask wallet compromised? Or is this normal that MetaMask creates new wallet addresses when ...
0 votes
0 answers
50 views

Informations about DApp, Node and much more

I wanted to ask you for an advice, because I am a begginer regardin DApss/Nodes, etc. Your help would me a lot appreciated and thank you in advance for it. In my Trust Wallet, at "Discover" (...
0 votes
1 answer
553 views

Problem to connect my DAPP to Rinkeby smart contract

I make small samart contract using Remix and Ganache. I deploy it to Rinkeby test net and got problem to connect my dapp (small web site) to it. My web3 require. window.addEventListener('load', ...
0 votes
2 answers
882 views

How do I set the transaction msg.value to 1 ether?

The problem is that when I am clicking a button using the safeMint function, I do not know how to input a value for the cost to mint. So I am essentially minting with air. enter image description ...
0 votes
1 answer
551 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 ...
0 votes
1 answer
969 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/...
1 vote
1 answer
1k views

Contract address for a contract that was deployed by another contract in ethereum

I am trying to figure out if this pattern for an ethereum smart contract would be possible or are there limitations in solidity or the evm which would prevent this. Contract A is deployed on the ...
2 votes
2 answers
925 views

How to keep wallet connection persistent when refreshing with Ethersjs

I am trying to figure out the best solution to keep a wallet connection persistent when a page refreshes on Ethers. So far, the only answers I've found have been through Web3-react and not Ethers. ...
2 votes
1 answer
1k views

Calling function from another contract reverts

I've been developing a dApp that needs ERC721 tokens. I have three contracts, a base contract, the one to mint tokens and another one for auctions. The inheritance looks like Base > Token > Auctions. ...
0 votes
1 answer
40 views

TotalSupply of token not showing

Trying to practice web3, I want to show the total supply of ERC20 token by making a frontend. Please help ! import React, { useState, useEffect } from 'react'; import Web3 from 'web3'; import erc20ABI ...
0 votes
1 answer
510 views

web3 Uncaught TypeError: Cannot read property 'createBox' of undefined

i'm trying to create simple application by using solidity 5.0.0 , Truffle v5.0.0 and web3 [email protected]. but i've gotten Uncaught TypeError: Cannot read property 'createBox' of undefined. ...
2 votes
1 answer
585 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: ...
0 votes
4 answers
4k views

truffle migrate --network ropsten issues

When i run truffle migrate --network ropsten i don't see the contract deployment but just Compiling your contracts... =========================== > Everything is up to date, there is nothing to ...
0 votes
0 answers
22 views

How can I create new accounts and interact with the blockchain using Ganache (or other testnets)?

I am developing an Android app with kotlin and I want to create new accounts in the blockchain. I am using Ganache as a testnet. I am creating a new Bip32ECKeyPair for every user in the app and I want ...
1 vote
1 answer
692 views

how to read public struct from contract ABI using ethers.js

The contract has a struct which is used in an mapping. The blockchain explorers "code read" section allows to receive the result by providing a wallet address. Solidity Code struct Share { ...
0 votes
0 answers
7 views

Scripts directory not installed

I am creating a smart contract where I have to run the script directory. But even after installing all the dependencies the directory is not getting added to the root folder.
0 votes
1 answer
759 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
1 answer
490 views

How does contracts with staking mechanism work?

I'm building a dapp where users must stake x amount of my token to use the dapp, but I'm stuck. Do I have to create LP TOKEN and get LP pair address so all the staked token on my dapp will go to that ...
0 votes
1 answer
405 views

Neither Token name nor supply shown in etherscan, instead shown "() N/A"

Recently, I've created an ERC20 token on Etherscan and verify the source code but my token information such as token name and total supply not showing up..Instead it shows balance: 0 N/a and supply ...
4 votes
2 answers
426 views

Truffle hangs forever with parity with PoA

I'm trying to create a private chain using parity (PoA) and truffle but when I do truffle migrate it hangs forever with the following output: > [ > { > "jsonrpc": "2.0", &...

1
2 3 4 5
25