Skip to main content

Questions tagged [dapps]

Questions about applications and projects on Ethereum: a decentralized application (dapp) does not require any servers or backends and runs independent on a distributed blockchain.

Filter by
Sorted by
Tagged with
0 votes
1 answer
18 views

Compiling a Contract

This is my Smart Contract: // SPDX-License-Identifier: MIT pragma solidity ^0.6.0; contract DepositContract { // The amount of time (in hours) that the contract will run for uint256 constant ...
Strong Thrust's user avatar
0 votes
1 answer
54 views

Compiling a Smart Contract

I can't compile my smart contract that I'm trying to deploy: // SPDX-License-Identifier: MIT pragma solidity ^0.6.0; contract DepositContract { // The amount of time (in hours) that the contract ...
Strong Thrust's user avatar
0 votes
0 answers
40 views

Create dapps to display sensor output

i want to make a project that can integrate IoT and blockchain. So, can I use the blockchain to store the outputs from the sensors onto the Ethereum blockchain and create a dapps to display the sensor ...
lostboii999's user avatar
0 votes
1 answer
17 views

liquidate undercollateralized user without third party intervention

Im building a simple lending-borrowing protocol, using yield-generating and debt tokenization pattern, and for users liquidation when its position is undercollateralized, i want to liquidate part of ...
noro meb's user avatar
  • 368
0 votes
1 answer
67 views

DeclarationError: Identifier not found or not unique. function tokenURL(uint256_tokenId) public view override returns (string memory)

function tokenURL(uint256_tokenId) public view override returns (string memory){ bytes memory dataURI = abi.encodePacked( '{', '"name":', '"',tweets[_tokenId]....
AmariS1's user avatar
  • 77
0 votes
1 answer
98 views

Generic error revert message

I'm having a problem with a contract I've developed recently. I'm interacting with it using a dapp written using ReactJS. The problem is: when I call a specific function of this contract I'm getting ...
Allen's user avatar
  • 1
0 votes
2 answers
662 views

How to get notification from MetaMask either transaction was successful or not in React app?

I am working on a dapp, and I want the functionality that when some user initiates a transaction then page will update itself after some time(when we get the response that either transaction was ...
M Husnain Abbas's user avatar
0 votes
1 answer
720 views

Alchemy provider API provider does not support signing

I am using AlchemyProvider with ether.js to deploy a smart contract using frontend data But I am not able to sign the provider i.e AlchemyProvider. Code const provider = new ethers.providers....
Yakshesh Gupta's user avatar
1 vote
2 answers
44 views

Checking whether a timestamp has been surpassed in solidity

I’m trying to create a raffle system, where a smart contract will be holding a nft until a specific timestamp is passed. The timestamp is set at contract creation. I’m trying to think of some ...
TRS's user avatar
  • 131
1 vote
0 answers
90 views

Uniswap V3 Pool Subscription

I am trying to subscribe to uniswap v3 pool events and this is my query subscription { pool(id: "0x0001fcbba8eb491c3ccfeddc5a5caba1a98c4c28") { id, token0 { id symbol ...
Rafael's user avatar
  • 11
0 votes
1 answer
334 views

deployedcontract.function is not a function in hardhat testing

When I use the hardhat tests, I got mintToken.owner is not a function , how to solve it ? Not just it ,all function i can not use const { expect, assert } = require("chai"); const { ethers } ...
Hakeen's user avatar
  • 1
0 votes
1 answer
28 views

Is it good practice to call my ethereal node from Client?

I am developing a NFT marketplace and I have the basic workflow set up Now I am wondering whether or not the client should be able to call my Ethereum node (in the picture called Blockchain) directly ...
Allleex's user avatar
0 votes
1 answer
104 views

Goerli cannot output the smart contract address after being deployed by another smart contract

I deployed a smart contract called Deployer.sol that deploys other NFT smart contracts, when I deploy using the remix London testnet, I got the contract address after the deployment, but cannot get ...
kool Erick's user avatar
0 votes
2 answers
876 views

How do I set the transaction msg.value to 1 ether?

The problem is that when I am clicking a button using the safeMint function, I do not know how to input a value for the cost to mint. So I am essentially minting with air. enter image description ...
AdamCooke22's user avatar
0 votes
1 answer
28 views

How do you make a withdraw function?

I have no idea how to title this but essentially I'm building a token that when owned you get a percentage of a certain amount of money monthly. Here's the thing, I asked how I could airdrop that ...
RIANIAN's user avatar
0 votes
1 answer
20 views

Handling user transaction fee

Im creating a user whitelisting contract when a user asks for whitelisting hes paying for the contract execution how do i make it so that the creator of the contract pays for the transaction?
mrnandan's user avatar
0 votes
1 answer
62 views

metrics for a dApp

I am writing an academic paper for a particular blockchain application and trying to compare it to other existing solutions (which are also on blockchain) I desperately require some measurable ...
Muhammad Yasir's user avatar
0 votes
2 answers
584 views

How to calculate virtual (50/50 & x*y=k) reserves of UniSwap V3 Pair?

I know how to get balances of each token from a pair, and if I'm not mistaken - those balances of tokens is indeed a real reserves. Also, L is stored in contract info, but I doubt one thing - this L ...
Chenky's user avatar
  • 11
0 votes
2 answers
1k views

USDT Approve and Transfer Fail

I've made a smart contract that allows for people to stake a cryptocurrency and in return receive a token at a later date. (Side note, I took a lot of inspiration from Patrick Collins' first ...
Gimzar's user avatar
  • 1
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
830 views

UniSwap v3 SDK ERROR creating new Pool class with Tick[]

I have a question regarding the SDK, I am using subgraph to pull data for each pool and using to create a pool class in JS, when I pass the Tick[] or create a TickListDataProvider I keep getting this ...
Luke Longo's user avatar
0 votes
1 answer
52 views

How can I match Winning Numbers to Users Numbers?

I'm trying to match users inputted numbers to match an array(winning numbers) for a lottery game but I'm getting errors : How can I solve this? "undeclared identifier" uint8[] public numbers;...
DeeGold's user avatar
  • 11
0 votes
0 answers
88 views

Metamask Mobile not working with Goerli dApp?

I have a dApp im testing on Goerli. It works perfectly fine on desktop, however on mobile, I get errors where I would normally see a transaction appear. I am using the same account on desktop and ...
Nicholas Young's user avatar
0 votes
1 answer
360 views

Cannot understand where this 'Invalid BigNumber' error comes from?

I am working on a lottery dapp and I am facing a problem with deploying my contract on local network. I do not have big experience debugging code like this and I am a bit lost. I can clearly see from ...
CC_Zio's user avatar
  • 27
1 vote
0 answers
37 views

Top options for onboarding web2 user into web3 (creating a wallet, sign transactions, etc.)

I am working on a dApp POC where users can log in using their existing web account(google sign-in, username\password, etc.) and would be prompted to create a new web3 wallet. What are some of the most ...
ap_dev2022's user avatar
1 vote
1 answer
1k views

Unable to connect Metamask iOS app via WalletConnect

Hi I am an iOS developer who is developing a dAAP app for a client. The app prioritizes the use of metamask iOS app. We connect to the app via WalletConnectSwift and launch Metamask app via a https://...
David Záruba's user avatar
0 votes
1 answer
211 views

How to get user addresses from mapping?

I am having trouble trying to get addresses from a mapping. code 1 :mapping (uint8 => address payable[]) playersByNumber; // list of players with their number code 2 : uint8[] public numbers; // ...
DeeGold's user avatar
  • 11
0 votes
1 answer
147 views

can an ipfs node identify a partner in file transfer?

I just finished reading the whitepaper. It seems to me that IPFS does not provide anonymity in case of files with narrow use. Specifically, if I add a file to my IPFS node, and provide its hash to ...
f.khantsis's user avatar
0 votes
1 answer
315 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
0 answers
1k views

Staging test error: replacement fee too low

I am running a staging test in Goerli Network, this is an simple test to test a fund and withdraw function but i am facing error while running it. Hoping some-one could help me through it. Test:- it(&...
aviorn36's user avatar
0 votes
1 answer
295 views

How to send tokens to a wallet without exposing your Private Key (ethers.js)?

Intro: I am trying to create a web app where I can send some tokens from my personal account to another. I found out a possible way to achieve my goal using ethers.js in the following way: // connect ...
Federico Gentile's user avatar
0 votes
1 answer
34 views

smart contract exclusive for an app

I created a Smart Contract and a Dapp that Mint some NFTs, however I would like to be able to create: interact with my contract, only through my application. Does anyone know if it's possible? I didn'...
brunovjk's user avatar
  • 115
1 vote
1 answer
804 views

What is the difference between 'watch' and 'cacheOnBlock' in the WAGMI library

I'm using WAGMI in a web app and I'm seeing some slowness in having read values updated in my app when the blockchain state changes. Looking at the docs, I see two potentially relevant options in the ...
Shiny Zero's user avatar
0 votes
1 answer
200 views

How to get balance from a chain different than the one currently connected?

I am building a small bridge in order to learn about web3 and I would like to show the balance from the destination chain/network. For example, if I want to pass Ethereum from Ethereum mainnet to ...
Javier Guzmán's user avatar
2 votes
1 answer
61 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
96 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
3 votes
2 answers
5k views

Error: could not detect network

I am currently trying to deploy my DApp 'nftmarketplace' to the net using Vercel on the Goerli test network. However the app is failing to connect to the blockchain and I am getting the following ...
Beau Chaseling's user avatar
1 vote
1 answer
455 views

get a contract from a chain knowing the chain id with ethers.js

I need some help with calling the retrieve function of a contract without making the user change the chain. scenario: the user is on chain with id= 111 , I want to call the retrieve function of a ...
WhiteRainbowPlz's user avatar
0 votes
1 answer
246 views

What should be the decimals for ERC20 token when you want to deploy in Solana network using NeonEVM?

I'm trying to get my head around the concept of this decimal in Eth. Should I change the decimals when I want to deploy outside of the Ethereum network? What would be the correct decimals value when I ...
Yosuke Sakurai's user avatar
0 votes
1 answer
252 views

what happens to subscribe event of web3 if something goes wrong?

If network gone, RPC is down, or something like that happen. then what would happen with the subscribe events of web3 js or python. do we need some additional codes to handle crash or subscribe event ...
aakash4dev's user avatar
0 votes
0 answers
52 views

Metamask app detect my dapp as phishing

I create a dapp and made a website. The first few days the metamask app (Android) worked fine with it, but then it identified my site as phishing and shows a red warning page. How can I fix this ...
Alexey Chelbukhov's user avatar
0 votes
0 answers
163 views

RPC Error: excution reverted" when calling a function from next.js

I've looked at similar answers regarding this error, and it seems like the majority of them have to do with using the wrong contract address or the abi. In my case, I do not think this is likely ...
HeeeeSark's user avatar
1 vote
1 answer
157 views

After running the following code I received from Metamsk Error

import { useWeb3React } from "@web3-react/core"; import { InjectedConnector } from "@web3-react/injected-connector"; const injected = new InjectedConnector({ supportedChainIds : [...
Ali Hoosseini's user avatar
1 vote
1 answer
1k 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
3k views

calling write and read function in smart contract using python web3?

I have a claim smart contract and I want to call the function to python. This is the function struct ClaimList{ uint256 claimCounts; uint256 amount; address agentAddress; ...
Lloyd Ramos's user avatar
1 vote
0 answers
25 views

Is it possible to change what cryptocurrency a defi protocol uses without hard forking?

For example, let's say a defi staking protocol uses exclusively USDC token, but it decides to use another stablecoin instead, like Tether. Is there any way to smoothly translate all the assets staked ...
HeeeeSark's user avatar
0 votes
2 answers
732 views

Integrate smart contract on backend (without metamask and wallet signing transaction)

i have a working dapp on frontend sending transactions and signing them through connected wallet (metamask). I want to transfert this logic of sending transactions to my backend (nodejs). so there ...
Sid Ali's user avatar
  • 101
0 votes
2 answers
29 views

Is it possible to build a real-world private ethereum blockchain without any transaction fee and what other costs should I be aware of?

Recently I have been working on a class project. I have built a Supply chain Dapp, that was based on truffle framework and ganache as a local blockchain. I have some issues regarding the concepts of ...
MHS's user avatar
  • 11
1 vote
3 answers
654 views

TypeError: Cannot destructure property 'getNamedAccounts' of 'hre' as it is undefined

Currently attempting to deploy my smart contracts for a DAO DApp. When running: npx hardhat run scripts/deploy.js --network localhost I receive the following error: TypeError: Cannot destructure ...
Beau Chaseling's user avatar
1 vote
1 answer
66 views

SOLVED | Solidity: the bool values returned correctly on Remix IDE but always return "false" on JS

This question looks silly but it drives me crazy because I cant find a solution. I will make it clear below. I use useDApp framework and with useCall hook. I can get correctly values returned from ...
SnowyField's user avatar

1 2 3
4
5
25