Skip to main content

Questions tagged [sendtransaction]

Filter by
Sorted by
Tagged with
5 votes
3 answers
3k views

Is there an easy to use command line tool to create send transactions in Ethereum and forks of ethereum?

I'm trying to run a service that processes a bunch of ETH private keys and need to create send transactions via the command line. I know about geth, but are there other easier to use command line apps ...
Patoshi パトシ's user avatar
1 vote
0 answers
258 views

Sending AVAX on Fuji testnet using MetaMask: "RPC Error: Invalid parameters: must provide an Ethereum address"

I am able to manually send some AVAX from one to another wallet on the Fuji testnet using MetaMask. Now I am trying to program it as an on-click button on my dapp as follows: const ...
mooshot's user avatar
  • 11
1 vote
1 answer
885 views

How to set the receiver of ETH in a contract to send ETH from one address to another with solidity usign call() in remix IDE

I'm starting to learn solidity, and I'm trying to build a sendEther contract where some address sends an amount of ether to another address. I'm building it on remix, and I'm having trouble while ...
Lorenzo Battistela's user avatar
0 votes
1 answer
158 views

How to use web3 to send ETH from wallet A to wallet B through an intermediary Smart Contract?

I want to send eth from 1 wallet address A to wallet B address but through an intermediary Smart contract, what should I do? I don't know how to solve that problem yet. EX: https://bscscan.com/tx/...
Review ICO ANHZAIBRO's user avatar
3 votes
4 answers
2k views

Is there a way to control METAMASK via some type of api feature? I want to use it as my backend to send / receive eth and tokens

Is there a way to replace geth with just using metamask via some type of api via the command line? I want to interface with metamask to send and eth and erc20 tokens. Right now geth works, but it has ...
Patoshi パトシ's user avatar
0 votes
0 answers
26 views

How to force sending a transaction calling method on a contract even if it reverts? [duplicate]

I'm quite struggling with this from all day. I need to send a transaction on blockchain even if it says it will revert, but I can't understand how to do it since there's some kind of protection behind ...
MrSaulman's user avatar
0 votes
1 answer
275 views

Send Token to Random Addresses

First of all, is this the right way to send a token to a random address? _mint(address(keccak256(abi.encodePacked(now))), _amount) If so, how do I make it to repeat itself 10 times (sending a token to ...
user avatar
0 votes
1 answer
104 views

UnhandledPromiseRejectionWarning: Error: Transaction was not mined within 750 seconds, please make sure your transaction was properly sent

I am trying to run the below code: // Import modules var Web3 = require("web3"); const HDWalletProvider = require("truffle-hdwallet-provider"); const { interface, bytecode } = ...
Anonymous's user avatar
  • 287
1 vote
1 answer
86 views

Can I send ETH to an Smart Contract address?

I'm developing an Smart Contract based in the Openzeppelin's Crowdsale one. When I test the Crowdsale Smart Contract manually, sending ETH with metamask, the SC returns me the correct amount of tokens....
Alexander Herranz's user avatar
1 vote
0 answers
785 views

Can I send BNB and BEP20 token in the same web3 sendTransaction?

I'm trying to develop a javascript function to send BNB and a BEP20 token, at the same time, in one transaction, with web3. let decimals = web3.utils.toBN(18); let bnb_amount = web3.utils.toBN(...
Alexander Herranz's user avatar
0 votes
1 answer
404 views

Why aren't my transactions sometimes getting to the mempool?

I am using web3 and an infura node to broadcast transactions. let result = await web3.eth.sendTransaction({ to:receiveAddress, from:web3.eth.defaultAccount, value:...
Barney Chambers's user avatar
0 votes
0 answers
330 views

web3SendInstance.eth.sendTransaction returning txhash but transactions get lost

I am using web3.eth.sendTransaction to try and send Ether from one address to another let result = await web3SendInstance.eth.sendTransaction({to:receiveAddress, from:web3.eth.defaultAccount, ...
Barney Chambers's user avatar
0 votes
1 answer
68 views

insufficient funds for gas [duplicate]

sorry I'm too stupid to transfer eth from one account to another. I want to transfer all eth from one wallet to the other. With eth.getbalance the value is: 26303362261697318 About 0.12193 eth web3....
Bastian Schüler's user avatar
0 votes
1 answer
583 views

Unauthorized transaction from Ronin Wallet

I'm facing a big problem related to my Ronin Wallet, i bought ETH as usual and trying to send it to Axie Infinity, but after i got the ETH i bought, another random transaction appeared as if i ...
Jerry Murillo's user avatar
0 votes
1 answer
255 views

ERC20 Mint Function returns "Uncaught (in promise) Error: Transaction has been reverted by the EVM"

I want to allow an external app to mint tokens when a user performs an action. I have a separate contract that calls the "mintTo" function for an ERC20 token. Here's the token contract. ...
Chase Denson's user avatar
1 vote
0 answers
503 views

Is there any trick (besides high gas fee) to get transactions included in the next Polygon block?

I recognize some arbitrage opportunities on the Polygon network and tend to include my transactions in the next block. Since Polygon's transaction time is too low, I know that I have to do it quickly ...
Ehsan Khodarahmi's user avatar
0 votes
0 answers
132 views

Call a smart contract from the backend but have a user pay for gas

I want to lock down a method to only be callable by the owner (backend) but I would like the user who is claiming a reward to be the one that pays the gas for the transaction. After doing a lot of ...
Sebastian's user avatar
7 votes
1 answer
10k views

How do I send ETH from an account to another in Hardhat?

I am trying those methods (both) and neither worked for me: signer.sendTransaction({ to, value }); (and) provider.send("eth_sendTransaction", [{ from, to, value }]); Would be great if your ...
Ahmed Ihsan Tawfeeq's user avatar
1 vote
1 answer
1k views

Can i write in the data field of a transaction?

I read here Is it possible to insert some custom data in the DATA field of an Ethereum Transaction? that it is not possible to write in the data field of a transaction, even if it is a simple balance ...
kathi's user avatar
  • 199
1 vote
0 answers
147 views

How to fix gas-related errors in sending a transaction

I tried to make my first transaction but kept failing. I searched here and there but still could not find a solution. And came here to write a question. I am trying to send some from account[0] to ...
CrimsonArrow's user avatar
1 vote
3 answers
4k views

How to sign a transaction using web3.js and ethereumjs-tx on the BSC testnet

How do I sign and send a transaction using web3.js and ethereumjs-tx on the BSC testnet? I have found this question and answer: Is it possible to send transaction in Binance Smart Chain using web3 and ...
ImJhardy's user avatar
0 votes
1 answer
560 views

Delay between IPC transaction call and submitting to mempool

I encountered a problem, where a web3j transaction was successfully submitted via IPC call and yet, it was not submitted to mempool for another 40 minutes. Etherscan did not show the TX as pending and ...
tsuki's user avatar
  • 103
0 votes
0 answers
51 views

send a certain portion to a specific address with every transaction

i have created a Smartcontract. now i want the functionality: where 2.5% of every transaction is transferred to a fixed address. say the address is 0x809341c1c1cba2d6accf8188bca463a119443d. i know it ...
FSO's user avatar
  • 31
1 vote
1 answer
3k views

Understanding Binance withdrawal fees measured in ERC20/transmitted via the ERC20 network

Let's say I'd like to withdraw 1inch from Binance to any sort of crypto wallet. On the Binance fee schedule webpage one finds the following (column names above, screenshot of fees below): Coin/Token | ...
Andreas L.'s user avatar
1 vote
0 answers
296 views

Unknown account while trying to send transaction via OptimismProvider

I'm trying to make use of OptimismProvider to sign the transaction on Mumbai Matic. I'm making use of provider.send("eth_sendTransaction", [hexTxn]) and instantiating provider object by: ...
Ayush Gupta's user avatar
0 votes
1 answer
83 views

User experience while using sendTransaction

What is best practice for user experience when sending a transaction? I was blocking UI with a spinner. I am doing this: //BlockUI const sentTransaction = await sendTransaction(transaction) ...
Positonic's user avatar
  • 165
1 vote
0 answers
179 views

How do I send transaction from a non-sealer node/account that can be validated by a validator?

Quick review of my system : Every nodes are connected through geth, clique (so a proof of authority system) I have a bootnode that isn't a sealer I have one main_node that is a sealer I have one ...
Zartant's user avatar
  • 11
0 votes
0 answers
27 views

how can show block create information. when i make a contract creation

How can show below information at windows command console? When i use web3 to make contract creation. i browse some website. Some website tell me to use sendRawTransaction. But the sendRawTransaction ...
tytom2003's user avatar
0 votes
2 answers
2k views

If I send a transaction with a low gas fees and then send another one with high gas fee elsewhere?

Let's say, I send a transaction, all of my Ether, with low gas fees and it'll take hours for it to complete. Right away I send another one, from the same wallet or address, also all of my Ether, to ...
DoctorDoom338's user avatar
4 votes
3 answers
6k views

Provider does not have a request or send method to use

I am doing the Ethereum and Solidity: The Complete Developer's Guide and I am unable to resolve this error. The code is expected to do a transaction via await factory.methods .createCampaign(this....
Anupam's user avatar
  • 572
1 vote
1 answer
1k views

Confusion over sendTransaction vs contract methods

I'm building a UI that talks to a smart contract and I'm using contract methods. const data = await contract.methods.buyCredits().send({ from: account, gas: 233000, value: ...
GN.'s user avatar
  • 643
2 votes
1 answer
5k views

message: 'invalid argument 0: json: cannot unmarshal hex string without 0x prefix into Go struct field SendTxArgs.value of type *hexutil.Big'

I am using a JSON RPC request and source code is as follows: var options ={ url: "http://127.0.0.1:8545", method: "POST", headers: {"Content-Type":"...
prodevcn's user avatar
3 votes
1 answer
9k views

Trying to send a transaction with ethers.js

I'm trying to send this transaction using etthers.js and getting transaction details as output but when I try to put the txnhash on etherscan it shows nothing, I tried rinkeby and kovan. [private key ...
Sahil - QuickNode's user avatar
1 vote
1 answer
491 views

Truffle Contract sendTransaction not immediately returning transaction hash

I am using Truffle Contract to call a Smart Contract method that writes to the ethereum blockchain. My web3 client is connected to my own Open Ethereum node. Below is the code (nodejs) that I am using ...
Kevin Melberger's user avatar
0 votes
0 answers
179 views

Is there a way to know if a Solidity method will revert?

I have some solidity methods in my contract, and when i make a send in web3.js i would like to know if there is a way to know if the functions are going to revert by using call. Per-example , in ...
jnuno98's user avatar
1 vote
0 answers
457 views

In Web3, why is simply signing transactions with private key more secure than unlocking the account and using sendTransaction?

In Can anybody Point out the Difference between Web3.eth.sendTransaction and web3.eth.signTransaction?, the author of https://ethereum.stackexchange.com/a/73705/61096 mentions how unlocking an account ...
darkknight97's user avatar
0 votes
1 answer
143 views

receive ether from address only after another address has sent ether

I have a two smart contracts. One receives ether(ReceiveEther) and the other sends ether(SendEther). I have it set so whoever made SendEther can only send to ReceiveEther if both contract creators ...
rubecuber's user avatar
0 votes
0 answers
216 views

Geth returns tx hash but blockchain

I have a Geth server on light mode, and implemented sending transactions based on web3.php project. Everything works well, except sending transactions. The code I am using sends from, to, and value ...
Mohammad Saberi's user avatar
0 votes
0 answers
241 views

eth_sendTransaction gas required exceeds allowance

$result = $client->callMethod('eth_sendTransaction', [array( "from" => $address->address, "to" => "0xac52822dde76b9c4cd701d5f4402acedb2a86cc1", ...
Petr Marek's user avatar
1 vote
2 answers
102 views

How to send PAXOS token which has not transfer method?

I'm new in Ethereum contracts. I could implement sending USDT tokens through web3.php, and everything work well. Now, I want to add PAXOS and send such tokens through my system. But I found there is ...
Mohammad Saberi's user avatar
0 votes
0 answers
89 views

Geth returns txhash of sendTransaction() but nothing is broadcasted on Ethereum blockchain

I have a strange issue with Geth. The code I've written is based on web3.php and worked well up to now. Currently, I'm testing sending ETH via sendTransaction() method. The operation finishs and I ...
Mohammad Saberi's user avatar
1 vote
1 answer
2k views

Is it possible to send ERC-20 tokens with the gas from another account? [duplicate]

I'm creating a DApp platform which allows customers to send and receive USDT (ERC-20 Token). The problem I have is that if customer want to send some Tethers out, he should have enough ETH too as the ...
Mohammad Saberi's user avatar
3 votes
1 answer
1k views

What are the steps to send ERC-20 tokens?

I need to send USDT and other ERC-20 tokens via Geth on Ethereum. I'm using PHP and Web3.php library to work with Ethereum. So far, it worked well for everything. Now, I need to start sending tokens ...
Mohammad Saberi's user avatar
1 vote
2 answers
255 views

Should I use getTransactionCount() result in sendTransaction()? [duplicate]

As I read, getTransactionCount() returns the number of transactions sent from an address. Which of below items should I consider? Not to use returned nonce? Use the returned nonce number as a ...
Mohammad Saberi's user avatar
0 votes
1 answer
186 views

Insufficient funds v4.0 ethers.min.js

When the sendTransaction is executed , it returns insufficient funds at Object.n [as throwError] (ethers.min.js:1) at ethers.min.js:1 at tryCallOne (core.js:37) import { Wallet, providers, ...
Redmen Ishab's user avatar
3 votes
2 answers
739 views

Loader when confirm clicked in metamask

I want to add a loader to UI when there is a click on confirm transaction popup on metamask. When user clicks on confirm I want to show the loader until the transaction is confirmed. Is there a way to ...
yash vadhvani's user avatar
0 votes
1 answer
197 views

send erc 20 tokens with full code example

I apologize for posting another question. Here I'm giving the full example code which is giving me the respond: "txHash undefined" when I try to send erc20. I want to fix this code. If you have even ...
Mikheil misha's user avatar
0 votes
0 answers
384 views

Insufficient funds for gas * price + value web3 sendSignedTransaction

My wallet balance is 3.994937 RIN and I have set value (to be sent) to 0.00005 RIN (50000000000000 Wei) and I have set both gasPrice to 5208 (21000)and gas Limit to 5208 (21000 Wei). ChainId=4 ...
Riya Singh's user avatar
0 votes
1 answer
722 views

CLI wallet where I can pass in a Private Key and send out ETH and then delete this key?

Is there a CLI command where I can pass in an ethereum private key and send some coins to another address? I'm trying to build out a reoccurring payment system where a user can send 1 eth to another ...
Patoshi パトシ's user avatar
1 vote
1 answer
265 views

Generate new address, Send and Get transaction then Check transaction

I'm just starting in the ethereum and trying to build an app using Web3 and Nodejs. I'll need your lights so I can get any idea to know how to resolve those points: I have my own public address and ...
Bryan's user avatar
  • 11