We changed our privacy policy. Read more.

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
0answers
11 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 ...
0
votes
2answers
27 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 ...
0
votes
1answer
11 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 ...
0
votes
0answers
25 views

Sending Polygon via Metamask

I'm converting my DAPP to Polygon from Ethereum. And currently we have a frontend system that lets users pay us for our services. We are doing this using the Metamask RPC API. But because we are no ...
0
votes
3answers
29 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 ...
0
votes
1answer
41 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 ...
0
votes
1answer
27 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 '...
0
votes
0answers
35 views

Crowdsale smart contract frontend creation

I wanted to make a front end webpage for buyflamecoin function in my crowdsale smart contract. Crowd sale contract link : https://bscscan.com/address/0x959a4c2980ee9541b7359a1ab67b3b963c33ab93 Can ...
0
votes
1answer
247 views

How to create a dapp that verifies NFT ownership?

I'm trying to create a simple react app that will allow the user to enter a token ID and Ethereum address, then it will confirm if that address has it. Do I need Solidity to do this? I'm aware of ...
0
votes
1answer
31 views

Can't call a external view function with web3

I need to call a getter function from my contract, but I'm getting the following error: Error Error: Internal JSON-RPC error. { "message": "VM Exception while processing transaction: ...
1
vote
1answer
109 views

Can't get info with web3: web3.eth.getAccounts returns undefined

I'm trying to connect to the blockchain via web3 and metamask and the web3.eth.getAccounts() method is returning undefined, however window.ethereum.request({ method: 'eth_requestAccounts' }) returns ...
0
votes
0answers
32 views

Interaction between my webapp and smart contract

I am experimenting for the first time with smart contracts and NFT stuff. So I am at the point where I have a react webapp with metamask integration. The user can connect his wallet. I want to ...
0
votes
1answer
437 views

How to set msg.value from function?

I've got a function in my smart contract and i want it to take an argument that sets the msg.value and then pays it into the contract: function deposit(uint256 amount) public payable { msg....
0
votes
0answers
206 views

Error, returned values aren't valid, did it run out of gas? on a view function

im trying to call a view function from my frontend but cant seem to do so. This is my code: import { AbiItem } from 'web3-utils' import cakeABI from 'config/abi/cake.json' import { getCakeAddress } ...
0
votes
1answer
258 views

How to connect Yield farm frontend to Matic/Polygon

The idea I am following is to create yield farm like https://polyvertex.finance/. Backend with contracts is clear to some extent thanks to tutorials. Problems come with frontend for which I barely can ...
0
votes
0answers
243 views

Uncaught TypeError: Cannot read property 'contract' of undefined

I'm getting this error. Can someone please help me Uncaught TypeError: Cannot read property 'contract' of undefined at add_details ((index):140) line:140--> var myContract = new Web3.eth.Contract(...
0
votes
1answer
90 views

Unhandled Rejection (TypeError): SimpleContract.methods.set is not a function

I'm trying to build a Student Management System Dapp,where data of students are taken from frontend and stored in smart contract. Why I'm getting this error,while I try to set value(name) to the field-...
0
votes
1answer
845 views

How to convert number to BN with web3

I am trying to get the balance of eth from Metamask account, but I get the following error in the browser console: Uncaught Error: [number-to-bn] while converting number "0.322778986" to BN....
0
votes
1answer
82 views

Dapp with frontend

I made a login page with metamask for my Dapp, but now I need to link my login button to the profile page which will have student details like name, phonenumber, certificates (pdf) etc. where these ...
2
votes
0answers
21 views

Is it conventional to host your dapp on a subdomain (e.g. app.uniswap.org), and why?

I've noticed the design pattern of having an enter app button from the home/landing page which opens the dapp in a new tab is quite common. This is something that I don't see in Web2 design. Is there ...
0
votes
0answers
14 views

My button created on my HTML file resulted in failed transaction when it interacted with smart contracts function

I created a simple html to register an address in smart contracts. The function in smart contracts have been tested and it passed. So i believe my problem should be in how the input data transferred ...
2
votes
1answer
34 views

How to get historical value of a state variable?

I am unsure of the best way to do this. I have a pool contract with a state variable of the total balance of the pool. I want to show a line chart on my dApp that shows how the balance of the pool has ...
0
votes
1answer
44 views

Connect local frontend with smart contract on ropsten

I'm new to DApp programming an I'm struggling with this problem since two days now. Cloned this github example: https://github.com/dappuniversity/election I deployed the smart contract to ropsten with ...
0
votes
1answer
31 views

full stack dapp clone example elastic supply algorithmic stablecoin

I'm new to vyper (but have some python experience), I would like to clone a very simple dapp to have a look at the full stack of an ethereum dapp from back end (write compile and deploy a simple ...
1
vote
1answer
290 views

Invoke Metamask with a pure JS/HTML set up

I am new to front end Web3 and I am trying to have a simple SIGN button that will invoke metamask to sign a "Message". I can't seem to get it working. I am using pure HTML/JS without any ...
1
vote
1answer
335 views

using only html page for frontend with web3 or ethers.js

I was just wondering, since we are able to write js scripts inside html docs, would we be able to create a dapp with fully functional html front end for our smart contracts? Or would we need to use ...
2
votes
0answers
180 views

How to capture error reason of "ALERT: Transaction Error. Exception thrown in contract code." from Metamask in the front-end

Let's say we have a smart contract test with a function foo() and a modifier so that only the contract owner can call this function. Now we have a front-end with a user that is not the contract owner ...
0
votes
0answers
65 views

Frontend for OpenZeppelin ERC20 token and Crowdsale

does anyone know if there are any resources online for a front-end app.js for a simple ERC20 token for a crowdsale? I am looking to build out a front end that will allow log-in with Metamask and buy ...
1
vote
0answers
218 views

Cannot read property 'methods' of null

My teammate has deployed ERC 20 token to rinkeby test network using the truffle openzeppelin code. Now I wanted to interact with that token by using ABI and the contract address of that token using ...
0
votes
0answers
37 views

Localhost3000 not recognizing Metamask walllet

I have run npm start and have connected my metamask wallet via a custom RPC ganache host: 127.0.0.1: 8545 with chainID 0x539 on metamask. The ChainID i am not sure about as when I entered the NewRPC ...
0
votes
0answers
92 views

Drizzle react app , how to display functions return values?

I have written an asset transfer contract wherein a function createAsset returns a uint256 assetNo and emit an event (event NewAssetNo(string _message, uint256 _assetno); I am not able to display the ...
0
votes
1answer
303 views

Is it possible to create a frontend web app that connect to an Ethereum contract for read only without users having to have metamask? [closed]

I would like to create a web front end with as less friction as possible for new users. The app would be a kind of explorer with all calls to blockchain as read only to getter functions. So is there a ...
0
votes
1answer
352 views

Alternatives to MEW for advanced users

I am looking for an alternative to MyEtherWallet. I am facing some issues with MEW, thus I am looking for alternative, preferably with more advanced functions - like for example allow me to "...
0
votes
2answers
805 views

Trying to connect front-end application with smart contract

I am creating a simple registration and login forms in React.js and connecting it with smart contract in order to use it to store the data from the front and to the blockchain is there any method or ...
3
votes
1answer
648 views

How to import the Contract type from the web3.js library?

Here's how I can do that in ethers@4.0.47: import { Contract, ethers } from "ethers"; const contractInstance: Contract = new ethers.Contract(address, abi); But in web3.js@1.2.8 none of the ...
1
vote
0answers
98 views

Possibilities of ERC721 image generation [closed]

What image generation techniques could you suggest for a DApp game that utilizes ERC721? I know that CrypoKitties has a unique DNA sequence and different pieces of the sequence correspond to the ...
0
votes
1answer
194 views

How can i make a simple chartjs chart with ethereum contract address

i would like to have a chart on my site that prints the last price of a certain erc20 token i have seen a widget from ethplorer but i rather build my own chart but i cant find any documentation for ...
0
votes
1answer
75 views

Query each struct of a Mapping vs looping getter function for front-end?

I have a mapping of structs and a counter variable to keep track of how many structs are stored in the mapping. For front-end development would you recommend to query each struct using the auto-...
0
votes
1answer
99 views

Emited Solidity Events not being watched at frontend truffle contract instance

So, I have been reading through A LOT of pages about events in Solidity and how to interact with them on frontend but I am still pretty new to this and it seems like there have been multiple changes, ...
0
votes
1answer
148 views

Windows: command "npm install drizzle" give me an ERR!

npm WARN deprecated fs-promise@2.0.3: Use mz or fs-extra^3.0 with Promise Support npm WARN deprecated tar.gz@1.0.7: ⚠️ WARNING ⚠️ `tar.gz module has been deprecated and your application is ...
1
vote
1answer
468 views

Issue with the "npm install drizzle" command on Windows [closed]

I want to install Drizzle. Running "npm install drizzle" only displays errors and the installation has failed. I have been able to install drizzle-react and drizzle-react-components without an issue ...
0
votes
1answer
110 views

Can Dapps set cookies

Is it possible for a Dapp that uses the metamask/chrome to set up a browser cookie? or can a cookie set by another website like facebook, read some information or at least know that a dapp has been ...
0
votes
0answers
43 views

Why does return address(player) return a weird string?

I am trying to get the player's address through front end and when I run through the solidity function that should return the player's address, it would return ...
2
votes
3answers
65 views

How to speed up data loading from the blockchain to the frontend?

I have a function that, according to the Unique ID of the car, gives me all its characteristics: function getCarArray(uint _carId) public view returns (uint[12] memory) ...
1
vote
1answer
706 views

Can I use Flutter or Android Studio to design front end instead of using react.js and still be able to interact with ethereum?

I am new to blockchain and currently learning solidity. I have understood the concept behind blockchain and solidity is also good so far. I can design mocha tests and deploy the contract on local ...
1
vote
1answer
191 views

Design Dapp with Kotlin front end

To develop Dapp using Kotlin programming language for the front end design, Where should I place this code? and what it should be changed? <script> // Connect a the web3 provider ...
0
votes
1answer
345 views

"The returned value is not a convertible string" (web3js & React front end)

Edit: to be clear, the getMessage() function works fine in remix. It just doesnt seem to work with my front end. I am trying to set up a front end for my contract but when trying to invoke a certain ...
1
vote
0answers
32 views

In windows, what do I type in powershell to connect my dApp to a liteserver? [closed]

In windows powershell, what do I type to connect metamask to a liteserver? >
1
vote
1answer
139 views

How we store end user details when we create ICO based ethereum DAPP? [closed]

I am new to ethereum blockchain.I want to create ICO based ERC20 token selling DAPP(Decentralized Application). I have created and deployed smart contract on ethereum private blockchain network and ...
2
votes
1answer
161 views

Function to return tuples throws error on frontend

I have similar functions like this and they work fine: function getBarsOfParticipant() external view returns (uint256[], uint16[], bool[]) { uint256[] barIds = participantToBarIds[msg.sender];...