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

How to listen for events in a well-known contract (Compound cDai) called by my contract

I don't know how to debug the situation where I wrote a contract (MyDeFiProject) which calls a well-known contract developed by someone else (in this case Compound cDai on Rinkeby). The transaction ...
0
votes
0answers
14 views

Does the NBA Top Shot NFT use a centralized backend?

There is a lot on "controversy" whether a Dapp has a centralized backend or not. I know that, by definition, a Dapp must have the backend DEcentralized running on ETH blockchain (or ...
0
votes
0answers
15 views

How "polymath" is doing "Ticker symbol reservation" on Ethereum?

So, from what I understand it is not possible to reserve the ticker symbol on the Ethereum network (I read this and this) But I am trying to understand what the Polymath is doing by "Ticker ...
0
votes
1answer
15 views

What does % mean in Solidity?

Im learning solidity through cryptozombies.io and the first lesson ive come across this 83 % 7 + 1 = 7, does this mean that the floor division of 83 by 7 + 1 is equal to 7?
0
votes
1answer
24 views

Fetching Nft value from smart contract

So today I got an idea to develop an application where users can mortgage their NFTs in return for ethers with added interest. However, one problem I'm facing is of accessing the value of NFT via #...
0
votes
1answer
37 views

Possible to connect to Wallet from android (java/kotlin)?

I would like to program a mobile DApp which connects to a wallet, like a webapp. I thought it may be possible with WalletConnect. Has anyone ever done this? Thanks!
0
votes
0answers
12 views

how to access contracts on a dapp-tools testnet with their address?

I have a json file like this : { "DEPLOYER": "0x3889c142090745AAa4803745739eE0a548204357", "CHANGELOG": "0xE3BAdfF0e84a551b8B53d5fac5aF9fB20f906898", ...
0
votes
0answers
11 views

Is it possible to compile into one transaction several semi-transactions with different senders and receivers?

In this transaction, I send from my address to several other a certain amount of rETH Obviously this saves quite a lot on gas. Can this be done so that the sender address doesn't necessarily need to ...
0
votes
0answers
7 views

How to persiste ganache contracts on docker environment [duplicate]

I am trying to make a container that will run ganache and persist the contracts that are deployed there. So, even if the container restarts, everything will be there. I don't know if that is fully ...
0
votes
0answers
35 views

How to optimize contract for lower gas on multiple mints

Hi I am new to solidity and smart contracts so I started by following some tutorials and using a template. Everything works fine, however I am noticing an issue with gas. On my Dapp if I try minting 1 ...
1
vote
0answers
17 views

Wallet system on Mobile Dapps

I want to develop a mobile decentralized application with flutter but I have a few questions in my mind. Well, I want to store data on the blockchain through smart contracts. So, I have to connect a ...
1
vote
0answers
43 views

Creating NFT Marketplace on Ethereum like OpenSea [closed]

I am honored to have a chance to deal with talented Blockchain programmer. I am creating my own NFT marketplace base on Ethereum. In this platform I will sell all NFTs in Blockchain. But I face some ...
0
votes
0answers
9 views

How do you store the private key safely but use them in script?

I need to interact with my smart contract as owner, so I need the private key, so the private key has to live in my computer, say if my computer gets hacked, I am kind of screwed. Is there any way to ...
0
votes
2answers
53 views

Since blockchain does not really hold/store data, how exactly do Blockchain projects/apps work?

To clarify, it is expensive and poor practice to store large amounts or sizes of data on a blockchain (ethereum or any other) Therefore, we don't link an application's backend logic directly to a ...
0
votes
1answer
21 views

Automatically and programmatically storing of a small piece of data on Ethereum

Is it possible to have a dApp automatically and programmatically store a small piece of data on Ethereum, when needed (so upon request), without the need for manually connecting a wallet like MetaMask?...
1
vote
1answer
48 views

How I can make a API-REST call and make the user pay the fee of the tx?

I know the question it may be dumb but I'm having troubles finding an answer for it, I need to generate a NFT and I thought of doing it on my backend NodeJs API via an API-REST call, the user makes ...
0
votes
0answers
7 views

How do Dapps (Brave Browser, Odysee, Defi) keep track of and distribute staking rewards?

does anyone know how do Dapps (Brave Browser, Odysee, Defi) keep track of and distribute staking rewards? In my experience, the rewards are updated in real-time fashion, which might imply (1) lots of ...
1
vote
0answers
23 views

How to reserve a ticker symbol for an ERC-20 token?

Cryptocurrencies and tokens are identified by a ticker symbol like MATIC (Polygon), AVAX (Avalanche), and KSM (Kusama). How do developers reserve these ticker symbols before or during their ICO so ...
0
votes
0answers
30 views

Event handler for a web3 app

Hey I am having trouble adding an event handlers from this tutorial I been practicing on. Heres the link to the tutorial https://www.dappuniversity.com/articles/the-ultimate-ethereum-dapp-tutorial The ...
0
votes
0answers
145 views

BalanceOf always returns 0

I am trying to get the WBNB balance for an address by executing the following: const ethers = require('ethers'); const secrets = require('./secrets.json'); const WBNB = "...
0
votes
0answers
25 views

How can I monetize my online app with ERC-20 tokens?

I guess I have a very common use case, but I don't know how to implement it right: Consider, I have a simple online app that users can use to do something (e.g. create a badge by users data, convert ...
0
votes
0answers
17 views

I'm getting this error : VM Exception while processing transaction: revert, while trying to send value from my frontend to smart contract

I'm trying to develop a Dapp but I'm stuck right now, due to this error that I'm getting while sending value from my frontend to smart contract. So, basically I want to update the UI once this ...
1
vote
2answers
775 views

Is this possible to pay for ERC721 token with ERC20 token not ETH?

I can create NFT's with an ERC20 token but I want to set the price of a NFT to an ERC20 token too, not ETH. For example on OpenSea I can sell my NFT's for ETH but I want to get payed in any ERC20 ...
0
votes
0answers
24 views

Creating my own NFT marketplace [duplicate]

I'm just a newbie getting started on NFT and smart contract development in general and i would like to create my own simple NFT marketplace on BSC (listing a few NFTs to sell nothing too crazy) as my ...
0
votes
0answers
23 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
22 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
54 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
86 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
30 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
40 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
16 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
1answer
26 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 { ...
2
votes
0answers
136 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
59 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
108 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, ...
1
vote
1answer
90 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
54 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
35 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
70 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
13 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
585 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
639 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
146 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
157 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
30 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
23 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
144 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
200 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
3k 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
54 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 ...

1
2 3 4 5
15