Hot answers tagged

4 votes

Why is it called “quadratic” voting?

Classic collective decision making (aka a "majority voting system") is oftenTimes vulnerable to a phenomenon of the "tyranny of the majority", hence the 2nd name. Contrary to that, ...
Mila A's user avatar
  • 663
2 votes

How to Reduce Wallet Prompts for Enhanced User Experience in a Blockchain Gaming dApp?

To streamline the user experience in a blockchain-based gaming dApp, consider the following strategies: 1. Batch Transactions: Batching allows you to group multiple actions into a single transaction. ...
MShakeG's user avatar
  • 1,593
2 votes

Invalid Network ! when using sepolia test net

Try downgrading your ethers version. I know there are numerous problems in connecting with Sepolia > 6, so try a popular version such as 5.7.2
immaxkent's user avatar
  • 499
2 votes
Accepted

Why does a wallet user need to sign a message to login?

My question is why wouldn't this be enough ? Because anyone can all you API endpoint with any address they want.
Mikko Ohtamaa's user avatar
2 votes

Data location must be "memory" or "calldata" for parameter in function, but none was given

This post does a very good job explaining Solidity storage locations: https://medium.com/coinmonks/solidity-storage-vs-memory-vs-calldata-8c7e8c38bce
Marco Besier's user avatar
1 vote

err_cleartext_not_permitted error while running Dapp on Android Metamask

In laravel Project I used this at the end of the web.php or api.php file and it worked perfectly: URL::forceScheme('https'); In Another Technologies force Your users to go to https urls to solve this
anonymous's user avatar
1 vote

What is Whisper and what is it used for?

Update, per Ethereum's current documentation: Whisper was a protocol that aimed to deliver secure messaging between peers without writing any information to the blockchain. It was part of the DevP2P ...
Gnostication's user avatar
1 vote

Web3 Could not find name 'Web3'. Did you mean 'web3'

dev Advocate at Chainstack here! It looks like that might be an issue with how you are importing the web3.js package. This is how you import the package and create a web3 instance: const { Web3 } = ...
Dave Dev Advocate Chainstack's user avatar
1 vote

React (opts:) not working, am i missing dependency?

That version of Web3Modal doesn't work any more and has been deprecated. Try v3 check docs here: https://docs.walletconnect.com/web3modal/react/about?platform=ethers
Glitch's user avatar
  • 11
1 vote
Accepted

Metamask getBalance method doesnt work

BigInt worked. Thanks to Zartaj Afser.
seojunchian's user avatar
1 vote

I have enabled a smart contract with transferfrom - Getting GAS error

The most probable reason is that you are not approved to spend tokens for the from address. This means the from address should approve you to spend the tokens and then only you can use the ...
Zartaj Afser's user avatar
  • 3,229
1 vote

How to make contract transactions with Web3.py

It's possible your blockchain doesn't support the Shanghai update. Since solidity v 0.8.20, the compiler implements the new opcode PUSH0, which your blockchain might think it's invalid. So, change the ...
0xSanson's user avatar
  • 2,969
1 vote

mint NFT for contract address. it is possible to mint nft by passing contract address?

Make sure your contract that is supposed to receive the ERC721 receiver interface. This might be an issue. Otherwise please share the error screenshot. ERC721Receiver interface - https://github.com/...
Zartaj Afser's user avatar
  • 3,229
1 vote

Question on Uniswap v3 SDK

The UniswapV3 SDK if for interacting with frontend/off chain code. The SDK basically helps you interact and do things with uniswap V3 from typescript or other centralized services. I don't know ...
Bruce's user avatar
  • 937
1 vote

How to detect the specific wallet provider used by the user in a web3 dapp when multiple wallet providers are installed?

This is atm natively not possible. You could go the other way around: The way sushi solved this, is by asking you to before connecting which provider you want to use. After choosing, they will open ...
Throvn's user avatar
  • 231
1 vote
Accepted

What is wrong in this program ? Arrays submitters and approvers inside the struct FormData are not getting set

Be aware that the default getter for formIdToFormData doesn't return the dynamic fields like arrays or mappings. In order to access the FormData you could define your own getter. Something like this: ...
Ismael's user avatar
  • 30.5k
1 vote

Can't verify an address on-chain

I wrote a test case with Hardhat for your code: verify.sol: // SPDX-License-Identifier: GPL-3.0 pragma solidity >=0.8.2 <0.9.0; import "@openzeppelin/contracts/utils/cryptography/ECDSA....
xana's user avatar
  • 51
1 vote

Can't verify an address on-chain

You should pass the encoded packed message, instead of the message hash, to ECDSA.toEthSignedMessageHash() function. You can do this by calling abi.encodePacked() on the message before passing it to ...
xana's user avatar
  • 51
1 vote

What induces the large bytecode warning, and how can I fix it?

Here's something you can try that might work Enable the optimizer in solidity pragma solidity ^0.8.0; // Enable the optimizer with 200 runs pragma solidity optimizer enabled 200; or alternatively if ...
Talha Sajid Chaudhary's user avatar
1 vote

How to Reduce Wallet Prompts for Enhanced User Experience in a Blockchain Gaming dApp?

I want to explore the best approaches to minimize or even eliminate the need for users to open Metamask repeatedly. Create an in-game hosted wallet that can be e.g. a web browser localStrorage based ...
Mikko Ohtamaa's user avatar
1 vote
Accepted

How to sign a transaction using metamask or other wallets in nethereum

I want to know how to sign a transaction through an external wallet using the nethereum library. Only web pages can interact with MetaMask, because MetaMask is a web browser plugin. Web pages are ...
Mikko Ohtamaa's user avatar
1 vote
Accepted

What's the best authentication/authorization system for DApp using ReactJS and Metamask

You can use web3 Auth API from Moralis to verify the users wallet address at backend. This helps to secure the backend while using any wallets or wallet connectors to connect on frontend. Auth API ...
JohnVersus's user avatar
1 vote

Can I get my scammed ETH back?

THIS IS A SCAM. The ETH you deposited cannot be recovered unless the scammer sends it back. Take the loss and use it as a learning experience for the future.
HFulcher's user avatar
1 vote

View Function Error in Ethers js

One possibility is that the function isn't specified as view in the ABI. In any case, according to the docs you can try forcing a call by adding callStatic before the call: Rather than executing the ...
0xSanson's user avatar
  • 2,969
1 vote

Can i transfer token to a account for next 180 days automatically without any further interaction with function using for loop?

The only way I can think of for this to work automatically without having any transaction go onchain each day for the user would be if you are only locking a token you have created, where the lock ...
Bruce's user avatar
  • 937
1 vote
Accepted

Please clear this doubt on NFT

When you mint an NFT, you are not changing the name and symbol, you are incrementing the tokenId. It means that you would have the same name and symbol but a different TokenId. The tokenId is a ...
donoso.eth's user avatar
  • 1,423
1 vote

Web3Auth method to enter email Id and get the value of wallet address as return value

Once you are logged in with your social login you will get your web3AuthProvider. Then you can instantiate a classic ethers.web3.provider like this and get the signer and the associated wallet address ...
donoso.eth's user avatar
  • 1,423
1 vote

A way to view smart contract data without needing to connect wallet to dApp in ethersjs?

Yes, it is possible by creating a read-only contract instance. First you need a provider, you can use a custom provider like Infura or Alchemy for example: const provider = new ethers.providers....
Adam Boudj's user avatar
  • 2,351
1 vote
Accepted

How to keep wallet connection persistent when refreshing with Ethersjs

have you tried to query "eth_accounts" inside a useEffect, I think this should work. useEffect(() => { window.ethereum.request({ method: "eth_accounts", }); ...
donoso.eth's user avatar
  • 1,423
1 vote
Accepted

Queries on Base Chain layer 2

if you want to use Base protocol addresses, L1 contract addresses, and L2 contract addresses, you will need to use Base Chain JS SDK or another compatible Ethereum development kit. Here is the general ...
Naveed Ali's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible