Questions tagged [frontend]

The user-facing part of an application. In a desktop application this would include the windowing framework and the forms the user interacts with; in a command line program it would be the available commands and arguments; and in a web app it would refer to the HTML and JavaScript.

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

Viem wallet client method does not exist / is not available

I am trying to interact with a smart contract from a front-end web app using viem. I am successfully creating a Wallet Client with my wallet address, but when I call some of its methods, I get the ...
Dimitris Papazacharias's user avatar
0 votes
0 answers
7 views

Would this library be interesting to dApp developers for in-browser wallet?

I'm with INTMAX, developing webmax.js, a JS library for quick dApp integration with our in-browser web3 wallet that's secure, uses biometric authentication, & supports EVM-compatible / Layer 2 ...
popomint's user avatar
1 vote
1 answer
17 views

When calling a custom function on an ERC721 it keeps reverting when called from the frontEnd but works if called from remix

I am having an issue calling a function on one of my contracts. I have an ERC721 contract that has a function getTokenUnlockableContent. function getTokenUnlockableContent( uint256 tokenId ) ...
Tebbo's user avatar
  • 11
1 vote
0 answers
7 views

fetchTasks() function does not work when page is reloaded at first

I have a weird issue. The issue is the fetchTasks() function does not work at first render, so does not display anything on the page, but if i save the code again, does not matter how even if I don't ...
Recep Çankaya's user avatar
1 vote
0 answers
54 views

Storing my NFT image as SVG display properly on Opensea but shows a broken image on metamask

To store my NFT image on-chain i use the SVG format. As long as i base64 encoded them, they worked very well on any ERC721 compliant platform. But as Base64 encoding is very costly in term of ...
Max atton's user avatar
1 vote
1 answer
106 views

Ethers js is creating transaction for pure function

I am trying to call a pure function via ethers js and store the data in a variable. Now I supposed that variable to contain the return value from the contract, but instead, that variable contains ...
Zartaj Afser's user avatar
  • 1,272
1 vote
1 answer
111 views

A way to view smart contract data without needing to connect wallet to dApp in ethersjs?

I am building a crowd-funding dApp using ethersjs to connect my smart contract to my front end, and I am looking to display public variables like total campaigns on my index page for style purposes. ...
OhItsPM's user avatar
  • 65
1 vote
0 answers
45 views

How to build a web3 mobile dapp with react native [closed]

For weeks now i have been trying to building to mobile dapps for web3 but all has failed, is it possible to build web3 mobile dapp on the evm. i would love to hear from you guys on how to go about ...
Josephdev's user avatar
0 votes
0 answers
22 views

how long does it take to query specific variable in specific smart contracts storage in ethereum public blockchain

my project is building Dapp for supplychain using public ethereum ( public ethereum ledger have huge data ) my question is if i deploy the backend in the blockchain so lets say that the frontend have ...
Mohamed Khalil Rouissi's user avatar
1 vote
1 answer
34 views

Etherjs "contract.on" method in Reactjs to read events not loading on console

I am trying to display the events that are emitted from a function in my smart contract to the front end of my dApp, and I feel like I am missing a step in the connection process with my dApp. I've ...
OhItsPM's user avatar
  • 65
0 votes
1 answer
308 views

REACT "Error: cannot estimate gas; transaction may fail or may require manual gas limit "

I am learning how to create full stack dApps with Hardhat, Solidity and React. I am currently creating a crowdfunding dapp and am trying to tie call the launchCampaign function from my smart contract ...
OhItsPM's user avatar
  • 65
1 vote
1 answer
28 views

Path to frontend files fails

const { ethers, network } = require("hardhat") const fs = require("fs") const FRONT_END_ADDRESS_FILE = `../../nextjs-frontend-lottery/constants/contractAddresses.json` const ...
Yana Gupta's user avatar
0 votes
1 answer
39 views

How to implement tiered token price in ICO

I have a question of tiered token price during ICO presale. Here is the Fightout presale segmant. As you can notice, after time passed, the token price raised. I understand presale contract need to ...
alexpopov86's user avatar
0 votes
0 answers
118 views

Internal JSON-RPC error when swapping from ethers.js on uniswap

I spend a lot of time trying to understand where is the mistake. I try to swap USDC to any token on uniswap router v3 with ethers.js on frontend. I use Polygon network in app and in metamask too. I ...
Jay's user avatar
  • 1
0 votes
2 answers
437 views

How to get app id from moralis?

I've registered in moralis and i got my api key, Cli Api Key, and some other things, but when i want to use MoralisProvider i need a appId: {/* <MoralisProvider appId={APP_ID} serverUrl={SERVER_URL}...
Alireza's user avatar
  • 350
1 vote
1 answer
2k views

Error when trying to import ethers into React project

I am getting the following error when trying to import ethers in my React project, using babel: Failed to compile. ./node_modules/ethers/lib.esm/abi/abi-coder.js 107:2 Module parse failed: Unexpected ...
Falcon Stakepool's user avatar
0 votes
1 answer
819 views

How to enable support for the experimental syntax 'classPrivateProperties'?

I am getting the following error in my React project when trying to import ethers: ./node_modules/ethers/lib.esm/abi/abi-coder.js SyntaxError: /node_modules/ethers/lib.esm/abi/abi-coder.js: Support ...
Falcon Stakepool's user avatar
0 votes
1 answer
46 views

Is there an api that compiles solidity contracts?

I have a static webpage and it should remain static. In this website a user generates solidity files. I would like to compile them by sending the uncompiled solidity via an api to a compiler and then ...
Marlo's user avatar
  • 305
0 votes
0 answers
15 views

I encountered typer error while linking solidity smart contract with react frontend

I and my team encountered this error below while trying to link the react frontend to communicate with the smart contract. The project is NFT marketplace TypeError: Cannot read properties of undefined ...
Dawveed's user avatar
0 votes
1 answer
184 views

Connecting To Multiple Wallets Simultaneously To Dapp On The Frontend

I'm exploring the possibility of building a Dapp that enables the user to connect multiple wallets simultaneously. The reason is that for my particular use case, the NFT category that I'm observing ...
Joseph Woolf's user avatar
0 votes
1 answer
155 views

Metamask is not popping up to connect accounts

Hey i'm using Html/Javascript to connect the Metamask. I use "ethereum.request({method: "eth_requestAccounts"})" to connect the Metamask accounts. It get me connected to my ...
Shubham Gupta's user avatar
0 votes
1 answer
9 views

Can I use Aragon's UI components when building dapps on top of aragonOSx?

I want to build my own custom DAO dapp on top of the new Aragon protocol, but would love to not have to create an entire new UI for it. I was wondering if I could use Aragon's UI components to build ...
juliette_chevalier's user avatar
0 votes
1 answer
195 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
0 votes
2 answers
18 views

Best way for developing/testing time-related features with frontend app

I'm looking for a solution to conveniently test how the app WILL look like in a few months after the project starts. I.e. - let's say that in the project we will periodically deploy contracts that ...
Jakub Biernaczyk's user avatar
0 votes
1 answer
166 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
2 votes
1 answer
29 views

Can you please explain how this truncateStr function works?

I understand that it makes the address on the frontend appear shorter as you specify the string to let it know how much shorter. What I do not understand is the math behind it and what substring ...
Ethguy's user avatar
  • 33
0 votes
2 answers
77 views

Trying to figure out the return value from frontend console

So, I called a function from my smart contract that is supposed to return the address of a new contract instance, but I'm not sure how to read the output from the console. This is the image of my ...
HeeeeSark's user avatar
0 votes
1 answer
78 views

I get the following error in my frontend when i'm trying to access a token uri with useWeb3Contract hook of moralis using my nft smart contract

Smart contract: //SPDX-License-Identifier: MIT pragma solidity 0.8.7; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; contract BasicNFT is ERC721 { string public constant ...
Ethguy's user avatar
  • 33
0 votes
1 answer
770 views

Staking and ERC20 Approve (RPC Error: execution reverted: ERC20: transfer amount exceeds allowance)

I apologize if this question might seem a bit simple beforehand. I'm trying call the deposit function from my frontend, but it gives me the error mentioned above. I am confused as to if this is a ...
HeeeeSark's user avatar
1 vote
1 answer
856 views

How to use overloaded function from smart contract with wagmi?

So I have two function with the same name but different parameter in my solidity smart contract functionName(args1) and functionName(args1, args2) And because of this function overloading, the ABI of ...
krisnamic's user avatar
0 votes
1 answer
368 views

JS Passing front end input data to function params

In a nutshell: I am trying to get data from the front end (string input) to flow to my backend function parameters. See code below export default function foo() { const boilerplate const { ...
Patrick H's user avatar
0 votes
1 answer
189 views

Solidity event returns object instead of string

I'm trying to test and learn how I can register a solidity event in front-end and get the value. everything seems to be fine except I get [object object] instead of the string and when I log the exact ...
m0j1's user avatar
  • 167
0 votes
1 answer
25 views

Front-end (Next.js) - font and position of header are not working properly

Hi I'm going through this tutorial from Patrick Collins - https://www.youtube.com/watch?v=8bMrko6iD9Q&t=4994s Should look like the first pic (Bold word of Lottery and Connect Wallet should be ...
lfg_kr's user avatar
  • 1
1 vote
1 answer
376 views

Biconomy gasless transactions library with Web3.js throwing API error

I have a front end made with react meant to interact with my smart contract deployment. I'm using the Biconomy protocol so that I can enable gasless transactions for people that will use my app. ...
connova's user avatar
  • 21
0 votes
1 answer
236 views

An Error Related to data: id in erc1155 smartcontract

We successfully deployed/integrated our erc1155 smart-contract through the website: FrontendThe Website link Unfortunately, the only problem we have now is that when we mint the smart-contract for ...
user96807's user avatar
1 vote
0 answers
829 views

Call contract that's unverified [duplicate]

I am currently developing a smart contract ecosystem. I want to interact with my smart contracts on the testnets. However, I have to verify to do so. I cannot verify, as I don't want my code displayed ...
connova's user avatar
  • 21
1 vote
0 answers
160 views

IPFS: Add file in frontend through public gateway, pin file in backend by its CID

This is more of a generic question. I want to give people the chance to upload their file through my front-end using "ipfs-http-client": var ipfs = ipfsHttpClient.create('https://ipfs.infura....
Luex's user avatar
  • 51
0 votes
1 answer
225 views

useContractCall in a loop from React

I have created a smart contract where users can mint several ERC721 tokens. I used the ERC721Enumerable extension from OpenZeppelin so I can easily retrieve which tokens have been minted by a specific ...
BJ2M's user avatar
  • 11
0 votes
1 answer
348 views

Forking mainnet and modifying its state on frontend

I would like to simulate a contract interaction in a frontend application but in order to do so I need to impersonate an address and mint a certain amount of ERC20 to that address. This is fairly ...
Jan Beneš's user avatar
0 votes
0 answers
157 views

How to prepare a transaction from the server and sign it in the front-end?

Is there a way to prepare a transaction from the server, then wait for the user to sign the transaction from the frontend with Metamask, before running other functions from the server (e.g., update a ...
rkhan's user avatar
  • 1
0 votes
0 answers
620 views

Why am I getting an Internal JSON-RPC error for calling one state variable from my contract but not on another very similar variable?

I am using ethers.js in Svelte to communicate with my Vyper contract currently deployed to the Avalanche FUJI testnet for a basic social networking app. When I call this state variable from my ...
jpgoodale's user avatar
1 vote
1 answer
337 views

Calling a solidity function without a wallet using ethers.getDefaultProvider

I am trying to call a function from my solidity contract which shows how many nfts have been minted so far, I want the front end user to be able to see the number even if they don't have a wallet in ...
N44T's user avatar
  • 63
1 vote
2 answers
229 views

If you pull numerical data from the Ethereum blockchain, what format is it in and why?

I got this question in an interview and I am really not sure if I am correct. Numbers are encoded in hex format and they are big numbers. But what is the reason behind that? I tried to google a lot ...
Mayank Kumar Chaudhari's user avatar
1 vote
0 answers
245 views

How to make static React site and put it to IPFS

I am using site build with Create React App and it all works fine when I run it on server. What I would like is to put it to IPFS and for that it needs to be a "generated static website" (no ...
Blissful's user avatar
  • 337
0 votes
1 answer
426 views

Is a dapp really decentralized if the frontend is hosted on a centralized server?

If we need to access to the Dapp from a website (which requires a central DNS, a central hosting, a central team developing the front etc), does not that mean the app is not decentralized? Can we ...
Enrique's user avatar
  • 105
0 votes
2 answers
79 views

Backend for DApp

I'm developing a DApp, and I need some logic to handle events. This shouldn't be done in the Frontend of the application, right? So what would a good approach look like. I thought about a Java-Backend ...
Luex's user avatar
  • 51
0 votes
1 answer
319 views

How do I connect a smart contract to the frontend?

I know this question has been asked so many times and i know its a stupid question. But I am just unable to figure out how do i show information from the smart contract abi on the front end of the ...
devolution's user avatar
2 votes
3 answers
901 views

Best way to automatically update balances displayed in front end

Im trying to figure out the best way to automatically update balances in front end upon receiving and sending tokens. Ive tried creating an instance of a token in my react app, then creating an event ...
Nolan Jannotta's user avatar
0 votes
1 answer
715 views

Dealing with "Uncaught (in promise) Error: Provided address [object Promise] is invalid, the capitalization checksum test failed"

I'm, trying to connect a front-end to my smart contract but whenever I call the function from the UI I get this error: Uncaught (in promise) Error: Provided address [object Promise] is invalid, the ...
user78827's user avatar
0 votes
1 answer
427 views

Web3 - handling separation between read-only calls and send requests?

I want to create a simple front-end for my DApp. The DApp fetches values about the smart contract to display on the site. If the reader wants to interact (eg. buy) with the smart contract, I have a '...
greentriangles1's user avatar