Skip to main content

All Questions

Filter by
Sorted by
Tagged with
2 votes
1 answer
85 views

Issue with Smart Contract Interaction using Web3.js 4.2.0: TransactionRevertedWithoutReasonError on MetaMask and Sepolia Testnet

Problem Overview I am facing an issue while interacting with a smart contract using Web3.js version 4.2.0. The specific method causing trouble is broadcastMessage(string), designed to store a string ...
Dawid's user avatar
  • 141
1 vote
1 answer
71 views

Tracking the spedup transactions from metamask

while building a Dapp using metamask to make transactions, i figured that metamask is not responding correctly when a transaction is spedup, making my code wait forever for a canceled transaction that ...
Kaki Master Of Time's user avatar
1 vote
1 answer
571 views

How to prevent user to change recipient address when MetaMask transaction window pops up?

I want to integrate MetaMask as one of payment methods on my website. The idea is to lock my content, when user made a successful ETH payment so the content will be revealed. This is the source code: &...
Sâu Bự's user avatar
7 votes
2 answers
9k views

How to sign transaction using web3.js via metamask

I'm trying to make a signed transaction in browser with web3 injected from metamask and send the transaction to my backend-server and then submit it to blockchain. However, it's hard to find how I can ...
fd asdf's user avatar
  • 73
1 vote
1 answer
441 views

MetaMask showing 'transfer' method - How do I switch it to 'Smart Contract Interaction'?

I have a simple transaction set up to send 100 of my ERC20 token to a certain address. Please see the code below: if (window.ethereum) { await window.ethereum.request({ method: "...
ozftm's user avatar
  • 33
0 votes
2 answers
5k views

how to fetch private key of metamask account while transaction using web3.js

I have a problem, What I want is to user to come at my website, from where he/she can connect to its metamask wallet account, after connecting I want them to allow to do transaction from some specific ...
Talha Arif's user avatar
2 votes
2 answers
1k views

How does the MetaMask work with gas?

I have some web application based on Ethereum. This is how I call some function from a contract: contract.doSomething.sendTransaction(data, {gasPrice: web3.toWei(10, 'Gwei')}, callback...); This ...
Banana Cake's user avatar
1 vote
2 answers
882 views

I am having an error when I interact with my smart contract

first of all here are the codes var web3 = new Web3(Web3.givenProvider); var contractInstance; var x = 0 $(document).ready(function() { window.ethereum.enable().then(function(accounts){ ...
Newdude's user avatar
  • 61
2 votes
0 answers
2k views

how to fix "MetaMask - RPC Error: The method 'eth_signTransaction' does not exist / is not available"?

I am learning how to use Web3.js and I am getting this error: MetaMask - RPC Error: The method 'eth_signTransaction' does not exist / is not available. When trying to sign a transaction (for later ...
Andrea D_'s user avatar
  • 231
5 votes
1 answer
2k views

Signing transaction with Metamask (not sending)

I use the following code to sign and send a transaction in my backend: var txData = { nonce: nonceHex, gasPrice: gasPriceHex, gas: gasHex, data: contractData, from: ctx....
Renaud's user avatar
  • 359
0 votes
0 answers
920 views

Web3js: How do you specify gas limit for transactions?

I'm running into some issues with metamask estimating the wrong amount of gas for a specific transaction for my Dapp. It needs around 130k gas to execute, but metamask (around 5% of the time) will set ...
Oblivion's user avatar
  • 111
0 votes
0 answers
96 views

Q: How can I fully handle wallets and transactions without any user confirmation?

I am attempting to create a messenger DApp for a small group of users. My goal is to avoid things like transaction signage popups and wallet funds by paying and signing everything for all users in the ...
Dan Botzu's user avatar
3 votes
1 answer
727 views

MetaMask blocks Web3 requests

I just set up a Block Explorer to interact with my private blockchain. The private Blockchain runs in a VM. The host system connects to the Block explorer (also on VM). When I have meta mask ...
cqx's user avatar
  • 3,462
6 votes
2 answers
13k views

Send transaction using MetaMask injected web 3

Metamasks injected web3 gives an error when using web3.eth.sendTransaction() web3.eth.sendTransaction({from:web3.eth.accounts[0], to:'', data: // hash to interact with contraact, gas:85000}); What ...
vera34's user avatar
  • 157
1 vote
1 answer
534 views

How to get all kind of transactions happend to/from an address within a time range?

I'm trying to get all transactions that occured to an address within a specified time range. The transactions shall include all ethers as well as token transactions done to/from an ethereum address. I ...
Fariha Abbasi's user avatar
0 votes
0 answers
174 views

why the below error is thrown when doing transaction with metamask to the truffle

the error is thrown is shown in the below picture.While doing the transaction an error stating ethjs-rpc with payload["id:761..,Jsonrpc:"2.0","params":"0xf8..]
user61878's user avatar
0 votes
1 answer
24 views

how to fail a ether transaction on blockchain (with insufficient balance)

Need to generate error cases for ether transfer to see how blockchain deals with these cases. But ethereum clients like metamask didn't allow sending ether higher than the balance. Tried the same with ...
Bobby Sebastian's user avatar
0 votes
1 answer
368 views

Web3.js callback

I have a contract method: function setFile(string fName, string fileHash) public { File memory file = File({fileName:fName,fileHash:fileHash}); files.push(file); return something; } Web3....
Vivek Sadh's user avatar
1 vote
1 answer
2k views

JSONRPC error on sendSignedTransaction

I run ganache, truffle and metmask. If I run the code below I get an error on the this.web3.eth.sendSignedTransaction() function: EDIT: changed my code to the following.. Error remained the same ...
jasper's user avatar
  • 689
2 votes
2 answers
5k views

Batch transactions for MetaMask using sendAsync

I have MetaMask working nicely - it's so cool! However, I have a (react) form that gathers in lots of information and creates 14 distinct calls to sendTransaction. Hence, I (currently) get 14 popup ...
glowkeeper's user avatar
0 votes
1 answer
171 views

How to form the transactionObject in a metamask enforced async call?

Normally, for a contract call (i.e. something that does not update ethereum), I would simply do: var something = myContractObject.getSomething(). I've just started using metamask, and unfortunately, ...
glowkeeper's user avatar