Skip to main content

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
1 answer
759 views

Problem with implementing RainbowKit for wallets

I am integrating RainbowKit into my dapp to make connecting and disconnecting wallets easier. I am using Nextjs to develop a NFT marketplace. I am given this strange error while running the project on ...
Sina Rahimi's user avatar
0 votes
1 answer
45 views

Unpin NFT metadata from IPFS from react

I am minting NFT's and storing their metadata in the Infura IPFS. Is there a way to unpin the NFT from the IPFS from react?
gauthami vijay's user avatar
0 votes
1 answer
171 views

CAnt call balanceOf nft

const checkBalanceOf = () => { Web3EthContract.setProvider("https://goerli.infura.io/v3/bafa2a1c83d44b099dcae3a32b54207b"); let web3 = new Web3("https://goerli.infura.io/v3/...
TheGreatKAN's user avatar
0 votes
1 answer
866 views

How to correctly mint a NFT with any ERC20 token? Code w/ explanation provided below

Problem/Clarification: I have a NFT minting DApp that mints with multiple ERC20 tokens. I'm having an issue with the react code which calls the smart contract minting function multiple times. When a ...
Jenny From the Block's user avatar
1 vote
0 answers
140 views

Connect React Native App to Metamask

Anyone knows how to connect Metamask Wallet to our react native app to show the account's address and current balance of the user in Metamask?
Shahzaib K's user avatar
0 votes
1 answer
71 views

IPFS connection not working with aragonOSx sdk

I couldn't get an ipfs connection with aragonOSx SDK (https://github.com/aragon/sdk). Error: Could not pin the metadata on IPFS
juliette_chevalier's user avatar
1 vote
1 answer
2k views

WAGMI useContractWrite() hook unresponsive/not working

I've been trying to write to a contract on a local blockchain (Anvil from Foundry) but running the write() function (running it after submitting a form write?.()) does not work. Tried to disable the ...
ameymeow's user avatar
  • 115
1 vote
2 answers
2k views

Wagmi can't read function: Error: invalid address or ENS name (argument="name", value=true, code=INVALID_ARGUMENT, version=contracts/5.7.0

Hello everyone, I use wagmi with rainbowkit and I wanna check wallet address status with function "isApprovedForAll" response will be true or false, but I got undefined and error everytime ...
dromey's user avatar
  • 61
1 vote
1 answer
418 views

How to verify MetaMask wallet address belongs to user?

Having a bit of a road block in my development process. I want to create an application where a user signs in through metamask, and has their owned NFTs displayed. In the MetaMask api, I found this ...
user avatar
0 votes
0 answers
369 views

Function call for getBalance not working

I tried to call a getter function from my contract but getting an error: too many arguments and not sure if I'm using the correct syntax From contract.sol // mapping mapping(address => mapping(...
0xhaz's user avatar
  • 15
0 votes
1 answer
795 views

How to use ethers js event filters to filter newest events only?

For context, I'm trying to display the balance of a staking pool on my UI. Specifically, I want the balance to be updated every time there is a successful deposit made. I'm not sure how I actually go ...
HeeeeSark's user avatar
0 votes
1 answer
315 views

How to filter newest event using ethers

For context, I'm simply trying to display the balance of a USDC pool on my UI. These are the relevant parts of my js: const [usdcBalance, setusdcBalance]= useState(0); const checkEvents = async() =&...
HeeeeSark's user avatar
1 vote
0 answers
55 views

Is there a way to send ETH between two of my metamask wallets

I try to do it like this but I'm getting an error signer.sendTransaction({ to: "my_wallet_1", from: "my_wallet_2", value: wei, }); and also this one . bankContract....
Mel Carlo Iguis's user avatar
1 vote
2 answers
2k views

when i execute "npx hardhat run scripts/deploy.js --network goerli" ,what hardhat exactly did?

for example,the deploy.js like this: const hre = require("hardhat"); async function main() { const XxxNFT= await hre.ethers.getContractFactory("XxxNft"); const xxxNFT= await ...
THJA JUNGLE's user avatar
0 votes
0 answers
549 views

You are trying to create a contract factory from an artifact, but you have not passed a valid artifact parameter

I'm very new to blockchain development, I've been following along with a tutorial I found online for a basic hello world application using ethers.js, react and metamask. The repo for the tutorial is ...
Fiach's user avatar
  • 1
0 votes
1 answer
2k views

WalletConnect (Metamask Mobile) configuration with React Native app

Hey can anyone help me on below points- Connect React Native (expo or xcode) Mobile App to Metamask Mobile Application with the help of Walletconnect Not presenting the QRCode Modal but list of ...
Somil Saxena's user avatar
0 votes
0 answers
18 views

Truffle test won't return token name

I have been stuck on this part of my Bootcamp for two weeks now pouring over github and asked on stackoverflow. I have googled my error and found nothing as well as deleting my dependencies and ...
braun bushong's user avatar
0 votes
1 answer
212 views

How to set a moralis provider for building front end?

I am currently building a frontend for my smart contract using ethers and moralis. Part of my dapp functionality requires the creation of a new contract instance using: const contract = new ethers....
ethereumboy's user avatar
1 vote
0 answers
54 views

Why the network request of web3 interaction through react or any other frontend framework or library is not showing in the network tab of browser?

All network request we make from browser is shows in the network tab , but the web3 request is not showing in the web browser. Web3 library uses network RPC to interact with the blockchain. The RPC is ...
Vivek Bhatti's user avatar
0 votes
1 answer
34 views

smart contract exclusive for an app

I created a Smart Contract and a Dapp that Mint some NFTs, however I would like to be able to create: interact with my contract, only through my application. Does anyone know if it's possible? I didn'...
brunovjk's user avatar
  • 115
1 vote
1 answer
569 views

Specifying msg.value in Ethers js in Front-End

I'm trying to call a smart contract function that gets three parameters, I also want to specify the msg.value in my front end to call this function using ethers js. I wanted to ask how I can achieve ...
m0j1's user avatar
  • 177
1 vote
2 answers
1k views

How can I detect metamask accounts changed and locked?

I use react ! useEffect(() => { window.ethereum.on('accountsChanged', function (accounts) { console.log(accounts[0]); }); }, []); It did not work. there is no console.log. I think ...
Jerry's user avatar
  • 25
2 votes
1 answer
191 views

How to reload only one component rather then whole page when active chain is changed?

I have this react hook which reloads the whole page when the user changes network or account: useEffect(() => { if (window.ethereum) { window.ethereum.on("chainChanged&...
Nikita Kulikov's user avatar
2 votes
1 answer
329 views

What is a good way to learn Solidity? [duplicate]

I’ve been watching YouTube videos and learning from Udemy on solidity for a year. I have basic understanding of blockchain. My problem is that although the instructors show the what to do and how to ...
Will-Up-Vote-If-Good's user avatar
0 votes
0 answers
163 views

RPC Error: excution reverted" when calling a function from next.js

I've looked at similar answers regarding this error, and it seems like the majority of them have to do with using the wrong contract address or the abi. In my case, I do not think this is likely ...
HeeeeSark's user avatar
0 votes
1 answer
1k views

Can't return address from JsonRpcSigner from wagmi to pass into parameter view function

Trying to pass the connected wallet address into one of my view functions, but cannot get the address from the JSON object is there something I am missing here? Using wagmi to get signer from the ...
Stackaccount1's user avatar
3 votes
1 answer
3k views

Populating the write args with wagmi usePrepareContractWrite

I am using wagmi usePrepareContractWriteand write to write to my contract. I am allowing the user to upload fields and create an NFT. Is there a way to set the args in the write function? For example ...
caffeinescript's user avatar
1 vote
1 answer
103 views

How to deploy React Next (with Tailwind) app using Vercel? [closed]

I have created an app via React Next using Tailwind. Now I want to use Vercel to deploy it. What I tried > npm run build > now This, however does not work. Perhaps because the default build/ ...
Jesper - jtk.eth's user avatar
1 vote
1 answer
323 views

Getting Invalid hook call for uniswap widget

I want to include Uniswap widget in my DApp (in React) but somehow I am getting this error in console due to which other components are also not rendering: Uncaught Error: Invalid hook call. Hooks can ...
Rishabh Raghwendra's user avatar
1 vote
1 answer
1k views

Wallet Connect: The requested account and/or method has not been authorized by the user

I am using the exactly same wallet on both Wallet Connect (Chrome) + MetaMask (mobile) and MetaMask (Chrome) in calling a mint function of my smart contract. With MetaMask (Chrome), the process goes ...
Terry Windwalker's user avatar
2 votes
2 answers
1k views

calling smart contract function from React

I am calling smart contract function in Solidity from React, which should count the votes for the specific choices. The function works perfectly when I call it from my truffle console. However, when I ...
Timotej Arnuš's user avatar
1 vote
0 answers
138 views

Unable to perform transaction: Transaction has been reverted by the EVM: Not showing any clear message

Error display on Etherscan Fail with error 'ERC721: transfer from incorrect owner' I used the transaction hash and found the above error Error while trying to sell nft Data of the NFT, this function ...
Bharat Singh's user avatar
1 vote
1 answer
5k views

How to pass arguments in useContractWrite wagmi

this is the mint function of my contract and I want to pass the quantity argument, please help me with that. my current code :- const { writeAsync: mint, error: mintError } = useContractWrite({ ......
Nishant Pacharne's user avatar
3 votes
2 answers
936 views

window.ethereum.isConnected() always returns true

I'm currently working on "How to build an NFT Marketplace from Scratch" and, Implementing wallet connection. The wallet connect Button is always shows as "connected" even if I ...
吉川遼's user avatar
1 vote
2 answers
900 views

Calling a state-changing function with ethers.js does not go through (no error message, not asking for approval)

I have a contract function that I cannot call from the front-end using ethers.js for some reason. I cannot even debug this call because it doesnt produce any errors. I tried to break the call by ...
Nikita Kulikov's user avatar
0 votes
1 answer
50 views

how to insert data updatable by both sender and receiver?

---------Solidity--------- struct Requests { string status; // accepted | pending | rejected string amount; // 1,000,000 PINE string description; // } mapping (address => Requests[]) ...
KD.S.T.'s user avatar
  • 203
9 votes
6 answers
3k views

Error: Hydration failed because the initial UI does not match what was rendered on the server, Wagmi and Nextjs

I was trying to implement wagmi in my dapp, after I copied the example in the documentation https://wagmi.sh/examples/connect-wallet, I got this error: Error: Hydration failed because the initial UI ...
Paulliano's user avatar
  • 209
0 votes
1 answer
412 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 ...
Hassan CH's user avatar
0 votes
1 answer
570 views

How do pass arguments to a mint function for the ERC155 smart contract?

I am trying to write a handleMint() function in my React app using Ethers.js. My smart contract uses the ERC1155 standard. I'm having trouble writing the handleMint() function so that it passes the ...
Damon's user avatar
  • 1
2 votes
1 answer
362 views

Using WalletConnect via Gnosis Safe iOS throws an error when signing a message

I'm working on an authentication feature for my app and using wagmi for the ethersjs interactions. I have two-step authentication flow: connect wallet and SIWE. This entire process works fine with ...
Firatov's user avatar
  • 73
0 votes
1 answer
696 views

Calling a function with multiple arguments in ethers returns Error: missing argument

I'm changing a part of front-end for my dApp from using Moralis to using ethers.js. For some reason I cannot get my head around on how to provide multiple arguments for the function call in a correct ...
Nikita Kulikov's user avatar
0 votes
1 answer
2k views

Setting an array useState([]) variable in React.js returns undefined

I have been trying to create a Web3 dApp using React.js. My first step was to connect the browser to a MetaMask wallet. So I first started by initializing a useState array variable named "wallets&...
Jeremy Yoo's user avatar
1 vote
0 answers
213 views

How to add logo to a web3 personal signature message?

I have generated a signature message from my react js app for the users. But in mobile metamask the message displays a letter D, the first letter of my url, at the top of the message. But I want to ...
abcdefgh's user avatar
  • 173
2 votes
1 answer
644 views

Metamask does not open on opera using web3modal

I am using web3modal to connect with different wallets. On Mozilla I am able to connect with metamask but when I open my website on Opera GX browser (version: LVL4 (core: 89.0.4447.64)) it says that ...
Usama's user avatar
  • 65
0 votes
1 answer
114 views

get nft activity

Does anyone know how I could get the transaction logs of an nft? having the address of the collection and the token ID. thanks guys!
NomadtureEdu's user avatar
0 votes
1 answer
393 views

How to access an array from a solidity function in reactjs

I'm able to return the array to console but I want to be able to use the data in different functions. When I run this code: const ownedTokens = () => { blockchain.smartContract.methods ....
Callum's user avatar
  • 3
0 votes
1 answer
616 views

Get event call from solidity contract from react

I am looking for doing something, if an event is emmited from solidity contract. Here's my solidity contract:: // SPDX-License-Identifier: MIT pragma solidity ^0.8.0; contract QuoteV2{ string ...
TANJIRO KAMADO's user avatar
0 votes
0 answers
134 views

Contract not passing to front end

I am building a chat DApp. I have a smart contract and a mostly complete nextjs front end. My contract is deploying properly however, whenever I call my contract from the front end it doesn't work. My ...
Beau Chaseling's user avatar
8 votes
4 answers
11k views

Warning: Contract code size exceeds 24576 bytes

I'm using hardhat and when trying to compile the code it shows me a warning containing @uniswap/v2-periphery/contracts/UniswapV2Router02.sol:12:1: Warning: Contract code size exceeds 24576 bytes (a ...
Yaya's user avatar
  • 109
0 votes
1 answer
204 views

Error HH700: Artifact for contract "@uniswap/lib/contracts/Babyl............." not found

I'm using Hardhat to compile solidity contracts. In the contracts I'm importing Uniswap's contracts SDK to use them. But when I run yarn hardhat compile in terminal it says Error HH700: Artifact for ...
Yaya's user avatar
  • 109

1 2 3
4
5
12