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
10 views

Unable to Add Liquidity using uni swap V2 front end clone

I’m having error from the Uniswapv2 clone that I cloned following the below website instructions: https://www.covalenthq.com/docs/unified-api/guides/how-to-clone-uniswapv2-frontend/ The problem I’m ...
bature's user avatar
  • 1
0 votes
0 answers
23 views

Can't fetch the entrance Fee from my deployed contract to my frontend component

PART OF FREE CODE CAMP BLOCKCHAIN COURSE Hey guys I am using react-moralis library to connect with the deployed smart contract. The smart contract is a Raffle based contract //SPDX-License-Identifier: ...
eik's user avatar
  • 1
2 votes
0 answers
110 views

How can I run the Uniswap Dapp locally for sepolia testnet

I am trying to play around with the Uniswap contracts, by creating pools then swapping etc. The problem I'm facing is that Uniswap V2 doesn't support the sepolia network, V3 does. So when I interact ...
Serenity's user avatar
  • 115
1 vote
3 answers
23 views

Frontend & Solidity union skills learning [duplicate]

if I'm going to learn solidity, but I don't know for sure whether I want to be a blockchain developer or a front-end developer, what skills are in demand in that area, so that learning solidity will ...
iippuf's user avatar
  • 11
0 votes
0 answers
33 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
19 views

Batch Safe App Txs on behalf of users in frontend - how?

I am building a safe app integration on our dApps frontend. The dApp allows people to provide liquidity to a DEX by approving a router to spend two tokens and then invoking an addLiquidity transaction ...
kassandra's user avatar
0 votes
0 answers
232 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
8 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
20 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
98 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
4 votes
1 answer
184 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
  • 3,229
1 vote
1 answer
301 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
  • 75
1 vote
0 answers
67 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
28 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
68 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
  • 75
1 vote
1 answer
679 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
  • 75
1 vote
1 answer
40 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
2 answers
65 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
2 answers
532 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
3k 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
1k 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
77 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
  • 319
0 votes
1 answer
331 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
231 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
294 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
20 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
201 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
44 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
90 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
85 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
974 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
1k 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
431 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
230 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
29 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
433 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
244 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
931 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
168 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
235 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
424 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
191 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
693 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
390 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
237 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
259 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
  • 355
0 votes
1 answer
492 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
94 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