Skip to main content

All Questions

Filter by
Sorted by
Tagged with
0 votes
0 answers
29 views

How to send entire account balance to another address on Base

The below code is what I used to transfer entire account balance to other address on the ERC20 network and it works fine on it, but not on Base. Maybe it's because Base has different transaction fee ...
Zero's user avatar
  • 103
0 votes
0 answers
164 views

Replacement fee too low, Base Sepolia

This is the code I have for sending a transaction on Base Sepolia. I am using this to split the balance in my account into two halves and sending each half to an address one by one. export async ...
Zero's user avatar
  • 103
0 votes
0 answers
680 views

How to get and decode logs of all transactions of a block in web3?

How to get and decode logs of all transactions of a block in web3? My question is very similar to: Is there a way to get the logs for all transactions in a block? But the suggestions were given using ...
Alison Silva's user avatar
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
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
1 vote
1 answer
2k views

How can I sign a transaction without a private key?

after connecting to the bag and signing the transaction, I want to do the transaction without requesting confirmation. My main goal is to make a transaction without asking for final confirmation to ...
hope's user avatar
  • 11
1 vote
2 answers
958 views

Sending entire ether balance to another wallet

I found the same question but it was asked over 4 years ago but it doesn't seem to work anymore? How do I send the entire ether balance from one account to another account? const Web3 = require('web3')...
Little Ball's user avatar
1 vote
1 answer
222 views

Meta transactions on ethereum

I've been trying to implement meta transactions in my project, but I couldn't find anything, openzeppelin's documentation wouldn't work I need a tutorial from A to Z because I'm still a beginner. can ...
NOUR KAROUI's user avatar
3 votes
1 answer
3k views

Error occurring while trying to swap tokens in Uniswap v3

I'm trying to execute a swap using web3 through following code snap: const fromTokenAddress = `0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2`; // WETH9 const toTokenAddress = `...
Pei's user avatar
  • 133
1 vote
1 answer
553 views

What does to way multi approval transaction?

I am going to running swap transactions. At first, we are going to running an approval transaction. And then we are going to running a swap transaction. These repeat. I made the transaction data. ...
Alex Weber's user avatar
0 votes
1 answer
75 views

Is it possible to link 2 public address to another one?

i've seen this in exchanges wallets. so if u transfer some coins to the address which is use for deposits even after it change, it would still link to your wallet. so i want to make a gateway for my ...
Arsiki's user avatar
  • 103
1 vote
1 answer
130 views

How to send ethers from multiple accounts to a single recipient?

I want to transfer 1 ETH distributed to three addresses to a single recipient address. How can I achieve this in ethers.js
Amirhosein Rajabi's user avatar
2 votes
1 answer
1k views

Why do transaction receipts not include the value of Ether transferred?

I'm writing some logic to identify the currency used in an ethereum transaction, and am wondering the following: web3.eth.getTransaction returns a value field that indicates the value transferred in ...
Joël's user avatar
  • 1,720
4 votes
2 answers
4k views

RangeError: private key length is invalid (In New ETH Transaction pragmatically)

Followed this Ans Ans1 and Ans2 but no solution got. const web3 = new Web3('https://ropsten.infura.io/v3/3c52917848e945229c0d33d632b10490'); const account1 = '...
Vishal Dalve's user avatar
0 votes
1 answer
197 views

Using web3js apis for ethereum transactions

I want to use Web3.js APIs to create an Ethereum transaction from an address (not a smart contract) to another address using sendTransaction method (https://web3js.readthedocs.io/en/1.0/web3-eth.html#...
Gagan's user avatar
  • 433
2 votes
2 answers
4k views

How to send transaction to Infura node using Web3? [duplicate]

I want to send ETH from one account to another using Web3 interface and Infura node. I have tried like below, and I got error 405(). Error: Invalid JSON RPC response: "" I test it in Rinkeby test ...
Homee Likee's user avatar
0 votes
2 answers
343 views

Unable to send ether to account

I am trying to send ehter using this code web3.eth.accounts.wallet.add(privateKey); web3.eth.sendTransaction({ to:someAddress, from:onwer, value:amount*1, ...
Albert's user avatar
  • 39
3 votes
0 answers
2k views

Web3 - how to send transaction with some data and include Ether at the same time?

Using web3 0.20.3 I want to call function and send some Etherium at the same time. JavaScript Contract = web3.eth.contract(ABI); Instance = Contract.at('0x162b74ea16da6ae9d7f7b349eaeab2fcadf4e835')...
Mars Robertson's user avatar
1 vote
1 answer
2k views

Why is the units of gasUsed in the transaction receipt 10^11 Wei?

I'm checking the balance of an account after a payable transaction in a Truffle test. Below is my code: // amount is the value supplied to the txn assert.equal(Number(String(currentBalance)), ...
nickjm's user avatar
  • 865
1 vote
1 answer
343 views

Checking if input is a viable Ether value

QUESTION: Does web3.js have a function that checks if a value (Number | String | BigNumber) is a valid Ether Value? If not, what might be an efficient way of doing so? Would I have to manually make a ...
Webeng's user avatar
  • 915
4 votes
1 answer
6k views

Can I send ethereum to a contract outside of its constructor?

How do I fund Solidity contracts with Ether? The example in the Solidity FAQ, http://solidity.readthedocs.io/en/develop/frequently-asked-questions.html#store-ether-in-a-contract, funds a contract via ...
glowkeeper's user avatar
37 votes
8 answers
78k views

Insufficient funds for gas * price + value

Sending Address has over 1 Eth in current Balance. Using the Geth console, I can send many transactions of any amount less than .033 eth.sendTransaction({to:'...
John Heeter's user avatar
7 votes
1 answer
3k views

Passing ether with call to Solidity function

I have deployed a contract to testnet which appears to function. I have a function named contribute which gets the ether from the msg.value. The function is below and doesn't take any arguments. I ...
Bogdan's user avatar
  • 397