2,338 questions
1
vote
0
answers
50
views
Why am I getting a decode error when calling a function in my Hardhat smart contract?
I’m building a simple Voting DApp using Solidity and Hardhat.
The contract deploys successfully, and I can start and end voting without issues.
However, when I try to call the getWinner() function ...
0
votes
1
answer
80
views
How to communicate to dapp wallet extensions (like MetaMask and Coinbase) from another extension, the way you can from a site
There's a few different ways of accessing dapp providers, but one of the most standard ways to check everything's good in the context you're running things is with a bog standard,
window....
0
votes
0
answers
49
views
Counter and Number are returning undefined in React with wagmi in Next.js from Smart contract Web3
I’m working on a Next.js application and using Wagmi to interact with a smart contract. The issue I'm facing is that when I call the getDoubledNumber() and number() functions from the frontend using ...
0
votes
0
answers
40
views
AbiError: Parameter decoding error: Returned values aren't valid, did it run Out of Gas?
I'm trying to test my smart contract using ganache provider and mocha but seeing this error.
AbiError: Parameter decoding error: Returned values aren't valid, did it run Out of Gas? You might also see ...
1
vote
0
answers
57
views
How to intercept Remix-initiated transactions in MetaMask Snap and broadcast to a custom blockchain RPC?
I'm building a MetaMask Snap and I need help with the following use case:
A user deploys a smart contract using Remix IDE.
Instead of MetaMask directly sending the transaction to the default Ethereum ...
0
votes
0
answers
30
views
remix.ethereum.org : typing web3 on remix terminal gives "undefined"
Configured remix.ethereum.org ( Browser based Remix IDE ) .
Environment set to Injected Web3 Provider Metamask.
Network in Metamask is set to Infura Sepolia using RPC URL.
https://sepolia.infura.io/v3/...
0
votes
1
answer
139
views
TypeError: Do not know how to serialize a BigInt WHEN JSON.stringify(OBJECT)
Right now I'm getting a weird error, I'm trying to convert an object to a string and I get this type error.
const x = await web3.eth.getTransaction(tx);
console.log(x);
^
...
0
votes
0
answers
116
views
Cant fix Uncaught (in promise) SyntaxError: Cannot convert 22,42,79,4,0,0,0,0 to a BigInt
const BN = window.BN || solanaWeb3.BN;
if (typeof window !== "undefined" && typeof window.Buffer === "undefined") {
window.Buffer = {
from: (data) => new ...
0
votes
0
answers
212
views
PancakeSwap universal router usage. Web3, PancakeSwap, Bsc testnet
I'm working on an integration with PancakeSwap using Java and Web3J. All my tests were conducted on BSC Testnet.
After conducting some research, I used the UI to perform a transaction that went ...
1
vote
0
answers
173
views
Solana transaction sending but never confirming on devnet - "Transaction not found on chain"
I'm building a React app with Solana wallet integration and experiencing a
persistent issue where transactions are successfully sent (I get a valid
transaction signature), but they never confirm on-...
0
votes
0
answers
39
views
Tokens not swaped in Uniswap (web3 blockchain)
how are you?
I'm trying to do a Swap Input Exact, and I'm generating the hash and spending gas, but the tokens are not being swapped.
This is a hash that was generated, but no tokens were swapped:
...
0
votes
0
answers
127
views
How can I use Liquidlaunch API to buy tokens?
I am developing a trading bot on Liquidlaunch.
Also I can see the APIs on Liquidlaunch Document
{
"signature": "0x...",
"signedMessage": {
"sender_address&...
2
votes
0
answers
69
views
Fetching WETH/USDC quote returns Error "CALL_EXCEPTION"
I wanted to get a quote for WETH/USDC using ether on testnet(sepolia).
To the best of my knowledge being a newbie in web3, I think my code looks decent but when I try get the quote I get an error.
I ...
0
votes
0
answers
36
views
NodeJS + Web3JS - Eip838ExecutionError code: -32000 message - undefined
I am tired of contant getting error below.
Each time I am truing to call a method from a NodeJS app that works on Debian 11, it causes it. I can call this method directly from REMIX and from the ...
0
votes
0
answers
160
views
In reactJs solana wallet integration, how can I get my token balance
I am currently creating a web3 staking app for a solona blockchain token in reactjs. how can I get balance of a specific token? I can only get the balance or sol balance of the wallet not the specific ...
0
votes
0
answers
71
views
Web3Button from Thirdweb-dev/React v4 SDK never loads, when set the active chain to base
I am working on a simple project, I'm using React v4 SDK , and everything runs fine, I'm able to connect the wallet and read data from the user's wallet.
But when I set up the web3 button to sign a ...
0
votes
1
answer
114
views
Why doesn't web3 gun library work well together with Angular v18.2?
I'm trying to incorporate gun web3 library into my Angular app, but I'm running into the following error:
[vite] Internal server error: Cannot find module './lib/text-encoding'
Require stack:
I'm ...
-1
votes
1
answer
177
views
Website Layout and Images Misaligned After Deployment on Vercel [closed]
I developed a website using Next.js, Tailwind CSS and Blockchain, and everything works perfectly on localhost. However, after deploying the site on Vercel, the layout is completely misaligned, and ...
-1
votes
1
answer
108
views
Is there a better approach to decoding swaps from different DEXs?
I am trying to build a Telegram Bot where a user can track DEX Swaps that occur on particular wallets, on multiple chains.
I have noticed that different DEXs deal with Swaps differently, and, from ...
1
vote
1
answer
332
views
get List of Token created by wallet user on solana
I am currently trying to fetch the tokens which are created by user on solana. so i came to helius,
i am using Helius to fetch all assets
i need only token which are created by user not the NFTs, so i ...
3
votes
2
answers
818
views
How to set AppKit (Web3Modal) provider for web3.js?
Dear smart contract front-end developers,
As you know, AppKit is the new verion of Web3Modal. I am using it in a web javascript program to show a dialog to connect the web page to the desired wallet. ...
0
votes
0
answers
52
views
Web3.js-sendSignedTransaction errors cannot be caught
I have a typescript function that receives signedTx hash as parameter and tries to call web3.eth.sendSignedTransaction(signedTx). In case signedTx is wrongly formatted, an error is thrown by web3.js. ...
0
votes
0
answers
332
views
UNPREDICTABLE_GAS_LIMIT , Can not estimate gas Ether.js V5
I am trying to get the estimated gas for the approval of a token. I am getting the error can not estimate gas.Below is my code
const estimatedGas = await provider.estimateGas({
...
0
votes
1
answer
139
views
When authenticating using solana's provider.signMessage, how secure is the message?
I'm new to this field, so excuse me if it's a basic question with misunderstandings.
I'm thinking of letting a user authenticate an account using solana.
To this end, I can sign a message like this:
...
0
votes
1
answer
158
views
USDT executeMetaTransaction on Polygon - Gasless transaction
I'm working on USDT executeMetaTransaction so that user can perform gasless transaction.
But I'm getting Signer and signature do not match error. Following is how I sign the transaction :
const ...
-1
votes
1
answer
70
views
Persist the Web3 Provider in Redux to use it across different parts of the application
Can anyone guide me on how to store a provider in Redux and make it persist, given that Redux doesn't allow storing non-serializable data. My use case involves using Web3Auth for Google login, which ...
0
votes
2
answers
415
views
How to get ethereum ABI using web3 library?
My ultimate goal is to get the current price in ethereum of a token. To do this, I was using etherscan's api to get the contract ABI and then using the ABI and token decimals, get the current price of ...
2
votes
0
answers
51
views
How to overcome not minting problem when calling function from smart contract
I am trying to call a function from my contract with ethers.js v6 but facing some problems.
This is my code.
const gasLimit = await contract.writeResult.estimateGas(args);
const { gasPrice } = await ...
1
vote
1
answer
66
views
Use Web3 in React but encountered nth-check vulnerability
I am trying to use web3 in React but keep running into nth-check vulnerability when I try to install web3 packages. After googling I realized that this has been a common problem and can usually be ...
1
vote
0
answers
45
views
Is there a way to calculate "suggestedMaxPriorityFeePerGas and suggestedMaxFeePerGas", same way the INFURA Gas API do for BNB Network
The Infura Gas API response for bnb net :
{
"low": {
"suggestedMaxPriorityFeePerGas": "4.7",
"suggestedMaxFeePerGas": "4.7",
"...
1
vote
1
answer
2k
views
Sending USDT or other tokens over TON network using React and @tonconnect/ui-react
I’ve been developing a React app that connects to a TON wallet and allows sending tokens over the TON network. By default, it sends TON to the receiver’s wallet, but I want to modify it to send USDT ...
1
vote
1
answer
42
views
getAllShipment Function Not Fetching Data from Smart Contract Properly
I'm encountering an issue with my getAllShipment function in my JavaScript code. The function is intended to fetch and map shipment data from a smart contract. However, I'm seeing that only the first ...
0
votes
0
answers
299
views
ReferenceError: nodeCrypto is not defined
I use NextJs to develop web3 app. But I have a problem when using @irys/sdk, I have trouble "ReferenceError: nodeCrypto is not defined"
I realize that it works without no errors when I run ...
0
votes
0
answers
17
views
Data not fetching from smart contract for the same code in different versions of "ethers"
I am trying to make a dApp for real estate marketplace. I was using "ethers" 5.7.2. Everything was perfectly fine. In the various categories screen, the properties data of various properties ...
1
vote
1
answer
42
views
Can not retrieve accounts with web3.eth.getaccounts()
I am studying Stephen Grider's course on Ethereum & Solidity.
The code looks like this where I am trying to get some test accounts with ganache.
const assert = require('assert');
const ganache = ...
0
votes
0
answers
333
views
calcAmountOut SOLANA RAYDIUM
Hello how can i calcul amountOut of a swap on solana raydium please ?
This is the code i try :
const poolInfo = await Liquidity.fetchInfo({
connection: raydiumSwap.connection,
poolKeys: poolKeys,
...
0
votes
1
answer
32
views
It is not updating the state SetState Function
const [inventory, setInventory] = useState('')
let web3
useEffect(() =>{
getInventoryHandler()
},[inventory])
const getInventoryHandler = async () => {
try {
...
0
votes
2
answers
1k
views
Solana swap has a very low success rate
I am trying to do a simple swap on Solana block chain and I have tried both Alchemy and Quicknode but the success rate of my swap is very low.. 2 out of three times it fails and I cant even figure a ...
-2
votes
1
answer
43
views
NFT Contract Address shows NULL value (deploy.js)
I am new to blockchain development. I am facing one issue in deploy.js, while running npx hardhat run src/backend/scripts/deploy.js --network localhost
ideally, it should show something like
Deploying ...
2
votes
1
answer
1k
views
How to get correct format for Solana wallet address private key?
I'm using Laravel and trying to work with Solana block chain
When I try to generate a wallet address I got the address right but the private key is not formatted correctly
This is my function below
...
1
vote
2
answers
625
views
Circom: Syntax Error When Compiling Simple Circuit (Expecting 'EOF', 'function', 'IDENTIFIER')
I am following this Circom tutorial to compile a simple circuit. Here is my code:
pragma circom 2.0.0;
template Multiplier2() {
signal input a;
signal input b;
signal output c;
c <== a*b;
}
...
-4
votes
1
answer
72
views
Running web3 in NodeJs enviroment [closed]
When I attempt to import web3 in NodeJS enviroment while on the project directory I get undefined error.
> const { Web3 } = require('web3');
undefined
> const web3 = new Web3('https://eth-...
0
votes
0
answers
53
views
async/await is not yet supported in Client Components in dApp with nextjs
I am attempting to create an app which needs to interact with smart contracts, and when attempting to supply a provider for web3.eth.Contract I get the error async/await is not yet supported in Client ...
-1
votes
1
answer
66
views
Can we use Hedera JSON-RPC relay to deploy contracts and make signed transactions?
Got error while deploying smart contract in Hedera Hashgraph using local relay.
Hi, I'm trying to deploy a smart contract in Hedera Hashgraph using web3.js. We are running a JSON RPC relay in an EC2 ...
0
votes
1
answer
98
views
Why code from from Metamask documentation does not works - *SyntaxError: An invalid or illegal string was specified contentscript.js:1 DOMException..?
From this documentation I got code. I did not changed anything. But despite that I am not able to run Metamask. Error is under the code.
I try to enable Metamask and show account but something get ...
0
votes
1
answer
61
views
InnerHtml is not display on Screen
`
I am working on a web project using HTML and Bootstrap, but my content is not displaying in the browser.Here is my code:
`
let str = ""
for (let item of r.articles) {
str = ...
3
votes
1
answer
341
views
Web3 error: TypeError: Cannot read properties of undefined (reading 'on')
i'm trying to listen to the ethereum chain for transactions on my usdt erc20 wallet address, using node.js and web3. Whenever usdt is sent into my wallet address, i intend to log the amount recieved ...
0
votes
1
answer
223
views
Uncaught (in promise) TypeError: receipt.confirmations is not a function in ethers.js
I'm working on a nextjs (13) project where I'm using ethers.js (V6) to interact with my Ethereum smart contract. I'm trying to mint an NFT by calling the safeMint function from my contract, but I keep ...
1
vote
0
answers
132
views
Decoding Transaction Input Using ABI. Web3 py
I am correctly grabbing the ABI as I have confirmed it is the same on etherscan. I am also getting the transaction[input].hex() correctly which displays the hex of the input I am trying to decode. Can ...
0
votes
1
answer
870
views
How to decode web3 py transaction object input variable using ABI
I have a transaction in which I know the hash of. It was a swap to sell a token using Uniswap. I am trying to find the amount the wallet received in ETH within the transaction object. To my knowledge, ...