Questions tagged [usedapp]

12 questions
5
votes
2 answers

How to connect useDApp to Rootstock networks?

I am creating a React.js DApp which will interact with Rootstock (RSK) deployed smart contracts. Recently I came across a React library called useDApp. This library automates the blockchain connection, smart contract interaction and sending…
2
votes
5 answers

export 'utils' (imported as 'utils') was not found in 'ethers'

I trying to build a web app that can interact with blockchain, I'm using brownie as solidity framework and reactjs. I installed useDapp to connect with my wallet. but in the first simple usage i got this error: Compiled with problems: ERROR in…
Ahmed Laggoun
  • 85
  • 1
  • 11
1
vote
1 answer

Why is my cursor pointer disabled on

I'm trying to build an Uniswap Clone with React & Tailwind CSS, and I have created a "Connect Wallet" button that triggers a Metamask popup to connect wallet. Everything else seems to be working fine, but when I fully refresh the web application…
W3Charles
  • 11
  • 2
1
vote
2 answers

WalletBalance.tsx Token Balance Returns : undefined

I've been completing the full-stack-defi course and when I use the useTokenBalance function from usedapp/core I get returned nothing, I don't know where I've went wrong because I've when I console.log the address and the account variables it returns…
0
votes
1 answer

Hi, i am trying to run the code "yarn create eth-app ./ but i am getting the following error

success Installed "create-eth-app@1.8.2" with binaries: - create-eth-app 'C:\Users\Shiloh' is not recognized as an internal or external command, operable program or batch file. error Command failed. Exit code: 1 Command: C:\Users\Shiloh…
Ray Madz
  • 3
  • 1
0
votes
1 answer

How to deposit eth to contract writen in solidity on front-end app using useDapp

Given i have this smart contract in remix // SPDX-License-Identifier: MIT pragma solidity ^0.8.0; contract DepositWithdraw { mapping(address => uint256) private balances; event Deposit(address indexed depositor, uint256 amount); event…
0
votes
1 answer

useDapp useCall useEffect

I need call contract function in useEffect How to get same result with useDapp ? Any example of this case ? // define standard web3 call const feth = async (address) => { const contract = new.web3.eth.Contract(ContractAddress, ContractABI) const…
0
votes
1 answer

Does useDApp support multiple contract call?

I am building a NFT marketplace using useDApp. To interact with the smart contract, I call function1 asynchronously by declaring const { send, state } = useContractFunction(contract1, 'function1');. The question is, how can I call function2 from…
ecode
  • 11
  • 3
0
votes
1 answer

Solidity: the bool values returned correctly on Remix IDE but always return "false" on JS

This question looks silly but it drives me crazy because I cant find a solution. I will make it clear below. I use useDApp framework and with useCall hook. I can get correctly values returned from Solidity functions and everything works very…
SnowyField
  • 47
  • 1
  • 9
0
votes
0 answers

Using web3-react connectors is deprecated and may lead to unexpected behavior

I am currently implementing a wallet connection using react and useDapp provider. For wallet connection, I installed @web3-react. So injected-connector and wallet-connector of @web3-react are what I chose. The problem is the warning of useEthers.ts…
toptecshare
  • 166
  • 2
  • 24
0
votes
1 answer

useDapp and hardhat returning different values from smart contract

I have a local testnet node using Hardhat. I can successfully deploy and test against my contract using plain javascript, async await and const { ethers, upgrades } = require("hardhat");. I am correctly returning, and printing to the console, a…
Zero Cool
  • 2,541
  • 2
  • 8
  • 13
0
votes
1 answer

get notified when result of useContractCall from useDapp arrives in react hook?

This is more a react question I think; export function useData() { const [Data]: any = useContractCall({ abi: myContractInterface, address: myContractAddress, method: "getAllData", args: [], }) ?? []; …
Suisse
  • 3,467
  • 5
  • 36
  • 59