2022 Developer Survey is open! Take survey.

Questions tagged [sendtransaction]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1 vote
1 answer
13 views

Solhint: Why should I avoid multiple calls of "send" in a single transaction?

function withdrawAll() public payable onlyOwner { uint256 _each = address(this).balance / 4; require(payable(t1).send(_each), "Account is being paid out"); require(payable(t2)....
user avatar
0 votes
1 answer
15 views

Can I store random data with eth_sendTransaction?

According to the docs for web3.eth.sendTransaction and the docs for eth_sendTransaction: The transaction object can contain an optional data parameter which should be a String that consists of: either ...
user avatar
0 votes
1 answer
53 views

Send ETH to Contract Fails in Tests

I'm trying to send ETH to a contract in tests using hardhat await owner.sendTransaction({to: greeter.address, value: "1000000"}), but it reverts with "function selector was not ...
user avatar
  • 1,236
0 votes
1 answer
24 views

can i send my testnet ethers to external testnet account?

I am rich now. I installed geth on ubuntu, created a testnet chain, made an ethereum account, mined 100 ethers, and tried sending 20 ethers to another testnet ethereum account. It seems I am learning ...
user avatar
0 votes
3 answers
87 views

How to send ether from a smart contract address to another address?

I have a contract that I can deposit ethers by using a fallback function. The question is, I want to send the ethers INSIDE THIS smart contract to another random address. I am not asking to send ...
user avatar
0 votes
0 answers
74 views

Metamask eth_sendTransaction gas and gasPrice

I'm developing a component that allows sending ETH using Metamask, but there is something I don't understand. If I don't add the gas and gasPrice values ​​to the function, the gasPrice amount drops ...
user avatar
  • 13
0 votes
1 answer
88 views

How to specify priority fee and max fee per gas in Geth' JSON-RPC API?

A legacy transaction can be created with the following parameters through the eth_sendTransaction API: params: [{ "from": "0xb60e8dd61c5d32be8058bb8eb970870f07233155", "to&...
user avatar
  • 31.3k
0 votes
2 answers
132 views

I am trying to create a store_transaction and change the Blockchain by passing a value

I am trying to create a store_transaction that is later on signed and sent and trying to receive a transaction receipt. I am getting error while creating a store transaction while trying to build it. ...
user avatar
  • 1
0 votes
0 answers
55 views

web3j: how to estimateGas before sending transaction

I am working with web3j, and I have the following code to send a transaction and get its receipt: TransactionReceipt mr = contract.mintTo(WALLET1_ACCOUNT1_PUBKEY, tokenURI, tokenId).send(); But I ...
user avatar
0 votes
1 answer
105 views

Creating a smart contract that only accepts a specific ERC20 token [duplicate]

Currently building a smart contract that will basically receive money from users and users can withdraw what they've put into. I want the money held by the smart contract to be only USDC (+ USDT maybe,...
user avatar
  • 1
0 votes
0 answers
158 views

Internal JSON-RPC error. ethers

quoteRes is the response from api getQuote of Ox code: const gasPrice = await providerEthers.getGasPrice(); const wallet = ethers.Wallet.createRandom(); const singer = wallet.connect(...
user avatar
0 votes
2 answers
76 views

web3.utils.toWei("1", "ether") appears as 4722.36648287 ether in metamask notification

I'm new to ethereum and when using web3.utils.toWei("1", "ether") it doesn't work properly. const transactionParameters = { from: metamaskaddr, gasPrice: '0x09184e72a000', // ...
user avatar
  • 3
0 votes
2 answers
171 views

What are the major differences when making a send transaction with ethers.js, hardhat, geth, and eth-cli?

There seems to be so many tools to make a send transaction. What are the differences from using ethers.js, hardhat, geth, and eth-cli? I'm just trying to process a bunch of private keys for my service ...
user avatar
0 votes
1 answer
410 views

I am getting the following error : RPC Error: Invalid parameters: must provide an Ethereum address

I am getting the following error: RPC Error: Invalid parameters: must provide an Ethereum address. It is a simple code to send transactions using a metamask chrome extension. <script> let ...
user avatar
0 votes
1 answer
108 views

How to add transaction deadline?

I am using web3 to make transactions but I am stuck on how can I add transaction deadlines in web3.eth.sendTransaction function. I am using 0x API for getting the swap quote. My code :- await web3.eth....
user avatar
  • 72
0 votes
0 answers
161 views

Hardhat Send Multiple Transactions

So this is a slimmed down version of the code I'm using. Error message in the terminal running the hardhat node is below. In the terminal I ran the command in it says the transaction timed out. If I ...
user avatar
2 votes
3 answers
177 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 ...
user avatar
1 vote
0 answers
156 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 ...
user avatar
  • 11
1 vote
1 answer
194 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 ...
user avatar
0 votes
1 answer
45 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/...
user avatar
2 votes
4 answers
430 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 ...
user avatar
0 votes
0 answers
23 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 ...
user avatar
0 votes
1 answer
87 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
56 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 } = ...
user avatar
  • 227
0 votes
0 answers
379 views

How To Send USDT OR USDC tokens using Web3.js (Without ETH-TX)?

I'm using WalletConnectProvider and I don't have the private keys locally. What I have is I receive the transaction request on my phone in ETH and not in USDT or any other ETH token. // ...
user avatar
  • 101
0 votes
0 answers
120 views

How to build, sign and send a Polygon transaction in Golang?

I would like to build a transaction and insert specific data in the data field. Then sign and send it to the network. Is it possible to do so ? PS : I managed to do this with an ETH transaction, but I ...
user avatar
  • 121
1 vote
1 answer
54 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....
user avatar
  • 584
0 votes
0 answers
60 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(...
user avatar
  • 584
0 votes
0 answers
138 views

What default RPC does Metamask use for sending Ethereum transactions to the blockchain

When I send a transaction through Metamask, what RPC endpoint do they use to transmit this info to the blockchain?
user avatar
0 votes
1 answer
170 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:...
user avatar
0 votes
0 answers
122 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, ...
user avatar
0 votes
1 answer
43 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....
user avatar
0 votes
1 answer
316 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 ...
user avatar
0 votes
1 answer
135 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. ...
user avatar
1 vote
0 answers
108 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 ...
user avatar
0 votes
0 answers
64 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 ...
user avatar
0 votes
0 answers
100 views

How to execute transaction without unlocking account from geth console?

I have a node that has enabled the HTTP-RPC server and that makes unlock an account in that node is not allowed due to security. I already know how to execute a transaction in web3 (web3 python to be ...
user avatar
0 votes
0 answers
184 views

json rpc sendTransaction signs internally?

When sending json RPC request to geth node. params: [{ "from": "0xb60e8dd61c5d32be8058bb8eb970870f07233155", "to": "0xd46e8dd67c5d32be8058bb8eb970870f07244567&...
user avatar
0 votes
0 answers
94 views

Send transaction & get receipt with log

Using sendTransaction to submit a tx. It works. Then wanting to get the receipt and check the logs to extract data. That codes works in isolation. How to put the two together? The problem is the ...
user avatar
1 vote
1 answer
470 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 ...
user avatar
  • 139
0 votes
0 answers
237 views

Geth console - eth.sendTransaction returns "unknown account" ERROR using Clef accounts

I'm approaching to Ethereum with Geth and Clef using the official docs: Geth: https://geth.ethereum.org/docs/getting-started Clef: https://geth.ethereum.org/docs/clef/tutorial I have a problem when ...
user avatar
  • 1
1 vote
0 answers
44 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 ...
user avatar
  • 11
1 vote
2 answers
2k 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 ...
user avatar
0 votes
1 answer
281 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 ...
user avatar
  • 103
0 votes
0 answers
46 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 ...
user avatar
  • 21
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 | ...
user avatar
1 vote
0 answers
239 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: ...
user avatar
0 votes
1 answer
29 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) ...
user avatar
  • 165
1 vote
0 answers
48 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 ...
user avatar
  • 11
0 votes
0 answers
20 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 ...
user avatar