Questions tagged [dapp-development]

Questions regarding the development of decentralized applications (a.k.a. DApps). This can include everything from frontend development questions to interaction with the blockchain and distributed file storage.

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

Running InstaDApp on an ETH mainnet fork

I have been unable to get a straight answer about building and setting up an InstaDApp account on a mainnet fork using Hardhat (which is providing the account keys). I've used both Alchemy and Infura ...
0
votes
0answers
16 views

How is EtherScan Built? [closed]

I am a dev and I really want to learn more about Ethereum development. So I want to build something similar to the EtherScan website for learning. Can anyone tell me how EtherScan does it? Do they run ...
0
votes
0answers
16 views

Problem when writing decimal data as string on the blockchain

I'm trying to develop a dApp that uses smart contracts to write decimal data in a CSV file on the blockchain. What I'm working with currently is the following: Convert the CSV file into JSON string ...
0
votes
0answers
13 views

How do I read token data using ethers.js connected to MetaMask

I want to get the tokenUri of an ERC721 token using ethers/metamask. I haven't found any way with about half an hour of research. No idea where to start.
0
votes
0answers
28 views

Hook error using Truffle React box (transforming the App.js from Class component to Functional component)

not an expert Solidity/React user here. I got Truffle React box and I am making a website. My example is very easy. I have this Nav element: import React from 'react'; import Nav from './...
0
votes
1answer
19 views

Ask user to sign a Eth transfer transaction

I want the user to sign a transaction for Eth transfer but execute it at a later point in a smart contract. Example: I want the user to sign a transfer to Address B of 1 ETH The signed transaction is ...
1
vote
0answers
26 views

Metamask alternative for native mobile applications

I am trying to find out if there is a solution like Metamask for native mobile application. I want a metamask like solution for mobile applications where there are these options Connect to ethereum/...
0
votes
0answers
12 views

Should I duplicate server logic in the client, if it decreases the amount of needed HTTP requests?

I'm building a dApp, which has 3 parts: Contract Server Client The Client can listen to the Contract's events directly, and perform all necessary state changes. However, if the Client goes offline (...
0
votes
0answers
7 views

How to use bn-chai in a typescript test script?

I would like to use bn-chai plugin for chai in a test script written in typescript. I imported (the official documentation uses require) the dependencies and set chai according documentation: import { ...
1
vote
0answers
34 views

How should a dapp store & query user profile data?

We are currently working on a dApp that will store user profile data and let its users query them. We haven't been able to figure out how to do that efficiently so far, and therefore we need to ask ...
0
votes
1answer
20 views

Update rewards per second

I'm currently working on a staking contract and would like to get EVERY SECOND the updated number of rewards the user gets for staking tokens. Are there any technical limitations to get the updated ...
0
votes
1answer
30 views

Does the etherscan api work with bsc chain?

Does the etherscan api work with bsc chain? I am trying the code below but it does not work. Yet it works on rinkeby network. const etherscanProvider = new providers.EtherscanProvider( 56, ...
0
votes
0answers
27 views

How to use TrustWallet DApp browser with WalletConnect?

I need to integrate my Dapp with Trust Wallet's internal DApp browser. I followed this instruction on the trust wallet website. However, when I run my DApp inside the trust wallet DApp browser, it ...
0
votes
0answers
41 views

How to apply mapping? Betting on multiple matches using 1 address?

how to change the data structure of playerInfo so that instead of one value for playerInfo[msg.sender].matchSelected, it would have a mapping of values. Also, you need to include resultSelected in the ...
0
votes
1answer
30 views

Real World Application using Smart Contracts

I am trying to build an application using Smart Contracts. I am only able to find tutorials that introduce Solidity and smart contracts (which are helpful though). But I am unable to find a complete ...
0
votes
0answers
28 views

What is the best method to get all holders of a Token?

I'm looking for something similar to Etherscan's "Holders" tab, but I need the info delivered via web3 or web API to a script. Blockscout has a mainnet RPC but it is currently down and ...
1
vote
0answers
11 views

How to make sure child contract address appears in transaction details when created by a factory contract?

When you look up a transaction hash on a site like etherscan their are fields like to, from and create. What can I do so that the field create has the address of the child contract deployed instead of ...
1
vote
1answer
169 views

How to interact with Mainnet smart contracts via HardHat fork?

Is this possible? I've followed the mainnet forking guide @ https://hardhat.org/hardhat-network/guides/mainnet-forking.html I'm more than a bit confused about the development environments local fork, ...
1
vote
2answers
172 views

Impersonating a contract when calling another in tests using ether.js

I'm new to Solidity dev and writing tests for a dapp (Hardhat, Chai, ethers.js, Smockit) where two contracts, Product and Market, coexist. I'm trying to run a test for a function in Market that can ...
0
votes
0answers
51 views

Factory.On pair created event not launched

I'm using Factory.on("PairCreated", async (token0, token1, addressPair) to get all tokens pairs when liquidity is added. It seems to work fine as I see pairs coming, but I made a test on a ...
2
votes
1answer
50 views

What are the common ways to protect access to web3 provider?

Most dapps require an instance of web3 provider in the browser. It seems that it is often achieved by directly connecting to Infura or Alchemy node URL (for example, in WalletConnect docs: https://...
0
votes
0answers
17 views

Uncaught Error: Cannot find module 'web3-eth'

const ethereumButton = document.querySelector('.enableEthereumButton'); const showAccount = document.querySelector('.showAccount'); ethereumButton.addEventListener('click', () => { getAccount(); })...
0
votes
0answers
16 views

Switching from web3 after MetaMask breaking changes not working

I've taken the past week off from working on a project and lo and behold I come back and changes to MetaMask have been made where using web3 no longer works. I have been trying to switch my code over ...
0
votes
1answer
58 views

How to bypass the pre-flight checks when sending a tx with ethers?

In my dapp, I have the following flow: Create an empty transaction array. Check if the ERC-20 allowance is sufficient and, if not, append a token approval tx to the array. Append the token deposit ...
0
votes
1answer
106 views

Is it possible to have several instances of Web3 object in the same dApp?

I need to access two smart contracts through two different providers in the same app, is it possible to have two instances of Web3 in the same dApp. Something like this: const web3 = new Web3(); const ...
2
votes
2answers
507 views

Free and public Ethereum JSON-RPC API nodes

I would like to create my own wallet system but I don't have enough funds to run my own node yet. If I would like to borrow a public node to process the account creation, retrieve a public key and ...
0
votes
2answers
30 views

Is there any api service for showing portfolio performance of ethereum address

I am working on dapp where i have to show portfolio performance of ethereum address. Can someone suggest me an api service which gives me all historic data of ethereum address show that i can plot a ...
0
votes
1answer
262 views

Understand price impact and liquidity in pancakeswap

I am trying to understand how the price impact and liquidity was calculated in uniswap or pancakeswap through the router contract? UNI Router: https://etherscan.io/address/...
1
vote
1answer
1k views

How to get the ERC-20 token balance of an account using etherjs?

I want to get the ERC-20 token balance of an account using ethers.js. Could you help me?
0
votes
0answers
24 views

Best practice for file storage on React Dapp

I'm currently building out my first Dapp and using React on the front end. An aspect of the Dapp will involve users being able to upload documents such as logos and descriptions. I know storing these ...
4
votes
1answer
2k views

How to read public variable from contract using ethers.js

I am trying to read public variable from contract on chain using ethers.js. Calling the methods work but I could not manage to read public property (without getter). The methods works like this: const ...
1
vote
0answers
26 views

Need Help with a University Project to make a DApp

I want to make a DApp which stores information of people who have taken the COVID vaccine. Information to be stored will be: Name of the Person Date of Birth Some Form of PIN Provided by the ...
4
votes
1answer
2k views

How to automatically add a custom token to MetaMask with ethers.js

I was playing around with creating BEP-20 tokens on cointool.app and noticed that whenever you generate a new token and pay the gas fee to mint it, the website automatically prompts you to add this ...
1
vote
0answers
18 views

Where to outsource smart contract developers, and how to manage them as start-up's CEO? [closed]

If someone has an idea for a DApp, but needs to hire programming muscle, where online can reliable and innovative smart contract developers be found for hire and outsourcing? and what etiquette and ...
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
1answer
185 views

Problem to connect my DAPP to Rinkeby smart contract

I make small samart contract using Remix and Ganache. I deploy it to Rinkeby test net and got problem to connect my dapp (small web site) to it. My web3 require. window.addEventListener('load', ...
3
votes
2answers
71 views

Link a library to a smart contract only with Solidity and bytecode

I work in Truffle development environment and use Windows PowerShell. My Solidity code is a test code and is simple. There is a library called Alireza that just compares two uint values. There is a ...
0
votes
1answer
40 views

Get token standard type knowing the contract address and tokenId

How can I implement code that returns whether a token is in the ERC721 or ERC1155 standard, knowing both the contract address and the tokenId? What I tried is that I call a function that exists only ...
0
votes
1answer
28 views

Get quick access to assets, events

How do sites like Opensea get all their data so fast? Because getting the data from the blockchain and fetching the tokenURi's takes a lot of time. So I thought they might store all the assets, events,...
0
votes
1answer
98 views

Fetching token metadata from token URI

Is there an efficient way to get the metadatas of a list of token uri's? Like, what if I have a list of 50 token Uris, would the only way be to send a different get request to each url?
0
votes
0answers
26 views

Is it possible to do transactions in Ethereum without gas fee?

I have developed a DApp to store various asset details. Obviously, for storing each asset detail we have to pay some amount of transaction fee for it. One of my teachers said to me that Since ...
0
votes
1answer
104 views

How to get Ether in private blockchain?

Fast summary: Need a faucet-like funcionality in my private blockchain to give Ether to the newly on-demand created wallets from Android Dapp. I'm working in a project where I've deployed a totally ...
1
vote
1answer
39 views

Trying to burn 1% off each transcation

Can anybody show me how to add a code for burning %1 of each transaction? https://github.com/strainzeh/MADToken/blob/main/MADToken.sol
0
votes
0answers
92 views

Selling NFT's, buyer calls minting function, how to call transfer function?

I'm implementing a dApp to sell NFT's. I want the buyer to call the function on my smart contract to mint the NFT so that they pay for the gas fees. However it seems like they can't then transfer that ...
2
votes
1answer
153 views

As a CS student, where should I start to learn Ethereum development?

I'm a cs student looking to learn ethereum development. I'm very confused about all the things I need to learn. Smart contracts are programmed in solidity but if I want to build any kind of app I will ...
0
votes
0answers
18 views

Hello, I am new to dapp development, I am trying to start a geth node on android

but my application crashes after launching it, here is the error it tells me in my logcat In my MainActivity.java Blockquote public class MainActivity extends AppCompatActivity { //private ...
2
votes
4answers
3k views

Error: Transaction reverted: function call to a non-contract account

I've been trying to debug this for the past 2 days, it has driven me insane. I'm getting this error when testing my contract: Error: Transaction reverted: function call to a non-contract account. It's ...
0
votes
1answer
20 views

Display tokem amount in dollar in dApp frontEnd

How do I return token amount in USD using web3js ..or is there some kindof API to be used ? For instance , say user has 3ETH and also want the user balance to show in USD just as metamask does
2
votes
1answer
27 views

Calculating AAVE intereset rate belonging to different users that transferred into a smart contract

I have a smart contract that accepts user funds and adds them to an AAVE lending pool (DAI for example). Something like this: lendingPool.deposit(stableCoinAddress, amount, address(this), 0); As you ...
1
vote
1answer
40 views

Which are the steps that a developer follows to develop a DApp?

I would like to know if based on your experience, the following steps are correct in order a developer to develop a DApp from the start to the end. Steps: Create an Externally Owned Account (EOA) ...

1
2 3 4 5
14