Skip to main content
Share Your Experience: Take the 2024 Developer Survey

Questions tagged [react]

React (also known as React.js or ReactJS) is a JavaScript library for building user interfaces. It uses a declarative paradigm and aims to be both efficient and flexible.

Filter by
Sorted by
Tagged with
0 votes
0 answers
9 views

Cant get the react navigation correctly in DAPP

I am building this Dapp where I am rendering on different component based on Connected Accounts from metamask . When I render on /applicant page , I cant navigate through the /applicant page links ...
Shorna's user avatar
  • 17
0 votes
1 answer
31 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 ...
Shorna's user avatar
  • 17
1 vote
1 answer
21 views

Can't catch Web3.js' contract error when calling a method and cancelling the transaction

I have a very simple React app that calls a Solidity smart contract's method using Web3.js (4.3.2) with some data coming from a form. I'm trying to catch errors while calling the contract method or ...
Danziger's user avatar
  • 131
-1 votes
0 answers
12 views

Cloning a live dApp (_Next/Static + WebPack) (Will Give Reward)

I'm hoping someone could help me out with some answers or simply anything. There are a few sites that are all very similar, they also have very similar sources. My end goal is to "clone" or ...
DevJimmy's user avatar
0 votes
1 answer
36 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 ...
Asad Arslan's user avatar
0 votes
1 answer
38 views

How to accessing Smart Contract write function from the frontend (React Js ) without any private key?

Currently, when I try to write a function on Solidity Smart Contract from ReactJS, it is not working and throws an error called "unknown account." for the below code. await contractMethods....
AIT DEV's user avatar
  • 15
0 votes
0 answers
6 views

Get error provider.getSigner() is not function when calling hook in d-apps

I have a hook like that export const useERC20 = (address: string, chainId: number) => { const { provider } = useActiveWeb3React(chainId) return useMemo( () => address && ...
duc nguyendinh trung's user avatar
0 votes
0 answers
13 views

How to access MetaMask from React (Vite) Browser Extension

I need to authenticate my web extension with MetaMask. The extension is made using React and Vite, and I don't have access to window.ethereum so I'm stuck. I looked into metamask-extension-provider ...
stuckoverflow's user avatar
0 votes
1 answer
19 views

Switch network in react front-end project

I’m just suddenly curious, in web3 front-end projects, we generally provide the function of wallet connection, but we generally don’t provide the function of switch network, right? Is it because ...
user19732538's user avatar
1 vote
2 answers
474 views

WAGMI: useWriteContract is unresponsive

I have a simple form where I'm asking the user for a token address, token id and it's price. On submitting these values I want to call a function on my smart contract for which I'm using wagmi's ...
Sam Hawkz's user avatar
0 votes
1 answer
10 views

How to start building DApps [duplicate]

Hello guys I am a beginner trying to learn how to build DApps and i have knowledge about ethereum and bitcoin i know how both of these work i wanted to get my hands dirty with how to start building ...
Pavan Kalyan's user avatar
1 vote
1 answer
378 views

How to fix error with deploy my Next.js project?

I have my project that I want to deploy to Vercel but when I'm trying to deploy it I got error Failed to compile. ./node_modules/@wagmi/core/dist/esm/actions/getProof.js Attempted import error: '...
Victor's user avatar
  • 45
1 vote
0 answers
106 views

EthereumProvider from @walletconnect/ethereum-provider not seeing my Infura project

I'm having trouble with getting EthereumProvider to connect via the Infura API key. I use it in my connection logic like this: const provider = await EthereumProvider.init({ ...
Oleh Yatskiv's user avatar
1 vote
0 answers
29 views

Accessing a String[ ][ ] type array from a Solidity Backend to a React Frontend

Greetings to the one reading this issue. My project uses: Ganache - Deployment Solidity - Smart Contract React - Frontend Metamask - Wallet Here is the screenshot of the problem. I am unable to ...
Siddhant Khare's user avatar
0 votes
0 answers
72 views

Need Help Deploying Contract to Sepolia

I've built a web3 dapp for the "Rock, paper, scissors, lizard and spock" game. I've made it run on my local system using truffle and ganache but I must deploy it on an Ethereum test like ...
Priyadarsh S S's user avatar
0 votes
0 answers
19 views

Objects are not valid as a React child (found: [object Promise]). I'm getting an error while showing the current account address on the frontend

I'm building a buy me coffee dapp. Why am I getting error in line 63 I want to show the current account address on the frontend but getting error . What is the error here? How do I solve this? ...
Nandini Jaiswal's user avatar
0 votes
0 answers
80 views

WebSocket connection Failed when using Helia in react app

I have been trying to use helia in my react.js application but keep getting the following error in the console: WebSocket connection to ‘wss://ny5.bootstrap.libp2p.io/p2p/...
Harmanpreet Singh's user avatar
0 votes
1 answer
26 views

React (opts:) not working, am i missing dependency?

I have a basic walletconnect web3 module here. I am following a video from https://www.youtube.com/watch?v=L65gP0cGC30 but it errors (opts:) on the example video the text actually is grayed out so it ...
Jim Mike's user avatar
0 votes
0 answers
42 views

React Dapp, Wont notify user after successful TX

This is my "Test" dapp which i am building, i am struggling to call an event handler to check if the user has approved spending on a certain contract, in this case USDt ...
Jim Mike's user avatar
0 votes
0 answers
87 views

Hardhat MetaMask Error: Transaction decoding is not available for chainId 31337

I created a Real-Estate Decentralized Contract and connected it with Vite-React using ethers.js. I'm using Meta Mask and HardHat local network for Hardhat free Ether. I import 5 wallets of Hardhat to ...
Huzaifa Ahmed's user avatar
0 votes
0 answers
98 views

Cannot read properties of undefined (reading 'getDefaultChain')

in this code when i want call the function from contract i get this error: Cannot read properties of undefined (reading 'getDefaultChain') i use walletConnect V2 for connecting wallet and use etherjs ...
Elham Bahrami's user avatar
0 votes
1 answer
2k views

Uniswap - swap between Sepolia and my own erc-20 token

I am working on a React-Native crypto application for fun, and I am trying to swap my Sepolia native token with my erc-20 token that I recently deployed on remix ide on the sepolia network using ...
Scott's user avatar
  • 15
0 votes
0 answers
41 views

NFT-Marketplace-Tutorial

I try to do example this tutorial. I run succesfully this. But I take error that "Upload errorTypeError: str is undefined". How can ı solve his? I did before: -> I deleted artifacts the ı ...
Kayhan's user avatar
  • 1
0 votes
0 answers
28 views

Swap Box and Token modal stopped rendering on the browser

Originally, it was a swap built on Ethereum fetching token quotes & prices via api. That version functions as intended Now, I am working implementing conditional logic to fect the token list and ...
Dorian_Gallo's user avatar
1 vote
1 answer
789 views

Display token balance of test tokens

I am working on a React-Native crypto application for fun, and I am trying to show the test tokens that I have inside my metamask wallet to display on my app to display the token balances. I have ...
Scott's user avatar
  • 15
0 votes
0 answers
62 views

Unable to view image from ipfs link

I am trying to make dapp in which someone will upload an image and then the dapp will mint an nft for that image and then show the image. But I am running into a problem. The dapp is generating a ipfs ...
Samarth Bagga's user avatar
0 votes
0 answers
27 views

I cant log out my contract in a project

I am building web3 Todo app . I am building it using Next Js . I am trying to console log out my contract on console . So I have just build my smart contract . Now trying to make connection with my ...
Shorna's user avatar
  • 17
0 votes
0 answers
13 views

I am getting this error and I cant solve it error:-( _this.state.tokenFarm.methods.stakeTokens is not a function)and whole code is given below ASAP

// ALL CODE WITH INITIALIZATION OF CONTRACTS ARE GIVEN HERE PLAESE HELP ME ASAP import Web3 from 'web3'; import React, { Component } from 'react' import DaiToken from '../abis/DaiToken.json' import ...
Devang Thaker's user avatar
1 vote
0 answers
74 views

How to turn-off NextJS hot module replacement warnings

I'm just starting out with the Next.js framework, and I can't find any information on how to turn off the repetitive warnings caused by hot reloading a modified page: This may have been caused by live ...
Lucky Degen's user avatar
1 vote
2 answers
392 views

Calling smart contract function from frontend is not working

I've created a twitter profile contract and a function called contract Twitter { //Struct for user profile struct Profile { string name; string username; string bio; ...
Santhosh's user avatar
1 vote
0 answers
98 views

RuntimeError: VM Exception while processing transaction: revert\n at EIP1559FeeMarketTransaction.fillFromResult

I've been working on a smart contract in Solidity, the code shown below: // SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; ...
aussastan's user avatar
0 votes
1 answer
673 views

TypeError: abis.filter is not a function

I've been working on a React program that provides a frontend for a Solidity smart contract I'd been making. The App.js code is shown below: import React, { useState, useEffect } from 'react'; import ...
aussastan's user avatar
0 votes
1 answer
325 views

How do I get Wagmi useWaitForTransaction to wait for Metamask (running on Hardhat)?

I am using Wagmi's useWaitForTransaction together with Metamask, running on local Hardhat node. When I sign a transaction it almost immediately returns successful on the front end, but on Metamask it ...
holangun's user avatar
0 votes
1 answer
323 views

error: "Transaction has been reverted by EVM"

I'm fairly new to Solidity and coding overall. I'm going through a Udemy course and I ran into an error which I can't find the solution for. I deployed a contract on the Sepolia test network from ...
Arad11222's user avatar
2 votes
0 answers
93 views

TransactionRevertedWithoutReasonError: Transaction has been reverted by the EVM when trying to mint an erc1155 token using web3

I deployed a solidity contract on polygon mumbai testnet using remix IDE and metamask as my Environment. I'm currently trying to call the mint function that mints an ERC1155 token in exchange for ...
Ciirno's user avatar
  • 21
0 votes
0 answers
24 views

How to make draw front end like this example?

https://www.binance.com/fr/trade/ETH_USDT https://dexscreener.com/zksync/0x80115c708e12edd42e504c1cd52aea96c547c05c Can someone tell me please how can i do to make something similar to this ? i'm ...
PandaKungFuu's user avatar
0 votes
0 answers
9 views

NFT based webapp - Best architecture approach to render data to the front more agile

I am building a book marketplace where each different book launch a limited series of N copies. Therefore for each book I create an ERC-721 contract with a totalSupply = N. In each ERC-721 contract I ...
gilvictor's user avatar
0 votes
0 answers
59 views

Sending data to the contract from the react frontend is not working

I've made an twitter contract, where we can send and get tweets from the frontend React. While sending the data to the contract, The metamask popup is opening, But it shows warning like this. I don't ...
Santhosh's user avatar
0 votes
1 answer
26 views

Cannot write text in placeholder in react

I'm new to react and learn it through a tutorial about ethereum. Here is how the form with multiple fields is created: const Input = ({ placeholder, name, type, value, handleChange }) => ( <...
happyworld 0704's user avatar
1 vote
2 answers
46 views

Unable to call a function from my smart contract in react

So I have checked and the smart contract is working perfectly in hardhat but when I am call it in react I am facing problem // SPDX-License-Identifier: MIT pragma solidity >=0.5.0 <0.9.0; ...
DEEPTA SURYA Kolay's user avatar
1 vote
0 answers
15 views

Are there any way to pay transaction cost from a hardware wallet when deploying contract using ethers.js?

I am working on developing Dapp and facing a challenge. ▶ Thing I want to achieve ◀ I'd like to create a new wallet instance, then when deploying a contract, I want to pay transaction costs from a ...
smy's user avatar
  • 11
1 vote
0 answers
45 views

How to anticipate a new React protocol to block Javascript URLs as a Security precaution

Many Web3 dapps have a feature where sending a blockchain transaction conveniently triggers a pop-up link where one can simply click and see that transaction on a blockchain explorer. For example, you ...
Eric Falkenstein's user avatar
0 votes
1 answer
145 views

I am trying to display image on frontend using pinata and ipfs but facing this error

import { useState } from "react"; import "./Display.css"; const Display = ({ contract, account }) => { const [data, setData] = useState("") const getdata = ...
Indul's user avatar
  • 29
0 votes
1 answer
327 views

Ethers.js Signer Address is Null and Provider Block at -2 in a React Native Expo App with WalletConnect

I'm working on a Web3 application using Solidity, React Native Expo, and WalletConnectModal. I've set up a Ganache network for testing and successfully connected to it via my Expo app and MetaMask. I'...
Giovanni Cassanelli's user avatar
0 votes
0 answers
40 views

Error when Importing Web3 in React: Module not found for './formats' and

I'm encountering an issue while trying to import the Web3 library in a React project. The error message I'm receiving is: Module not found: Error: Can't resolve './formats' in '/Users/kaustubhsharma/...
kaustubh sharma's user avatar
1 vote
0 answers
12 views

Blockchain prereqs

I know there are many job boards for web3 that display the job requirements but I just wanted to know from someone who has experience working in this field about the proficiency one needs in React. ...
Shankar's user avatar
  • 11
0 votes
1 answer
19 views

How do I update a campaign without it creating a new campaign?

I'm working on the update campaign feature in a project. First Issue - Prefilling the form fields I want first to prefill the form fields then from there, a user can change what they want. In the /...
kihiuFrank's user avatar
1 vote
1 answer
81 views

transactionContract.addtoblockchain is not a function

Calling a specific function from smart contract through react jsx file , console is giving me error "transactionContract.addtoblockchain is not a function", even the function is present in ...
Chinmay Tiwari's user avatar
2 votes
0 answers
946 views

"Error: write after end": ReactJS with web3js and MetaMask on Chrome

I have a ReactJS v18.2 project and use web3.js v1.8 for the blockchain connection. I have three environments: local, test, main. test and main are both on the same server, but run on different domains:...
tverdo's user avatar
  • 21
1 vote
0 answers
49 views

Title: Issue with BigInt Conversion and White Screen in React DApp Production Build

Problem Description: I have developed a decentralized application (DApp) using React that interacts with a smart contract. The DApp works as intended in the development environment, but when I try to ...
user122302's user avatar

1
2 3 4 5
12