All Questions
Tagged with transactions web3js
63 questions
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 ...
2
votes
1
answer
3k
views
transfer ERC20 Tokens by web3
I'm a beginner of ethereum.
I have seen some solutions.
I can use sendRawTransaction to transfer costumed tokens from one account to another account.
But my boss asked me to use ERC-20 "transfer" ...
2
votes
1
answer
914
views
Is it possible that Ganache can handle a private key without an "0x" prefix, but Parity cannot?
I am trying to sign and send a transaction as follows:
let signedTx = await web3.eth.accounts.signTransaction(options, PRIVATE_KEY);
let txReceipt = await web3.eth.sendSignedTransaction(signedTx....
2
votes
1
answer
3k
views
Send ethereum tokens with zero gas price
I have seen the following transaction:
https://etherscan.io/tx/0x173fd250d63a62bb407f214ff924b49e1c90593572eab1a8c523783f2aa58ba3
And I've seen that the gas price is 0. How could I do the same? When ...
2
votes
2
answers
2k
views
Retrieve data from smart contract using sendTransaction
Lets take a very basic smart contract that has one function in which you send a number and it will return the square. It has another function that returns a fixed string.
contract MyContract {
uint ...
1
vote
3
answers
5k
views
How to build and sign a transaction to deploy a contract
I am trying to generate a transaction to deploy a smart contract on the chain and to sign it with web3js.
My problem is that I have no idea how to build the transaction object needed for the ...
1
vote
2
answers
4k
views
How to simulate buy / trade transactions on local without submitting them to blockchain?
I'm learning a little about blockchain and there is something i'm stucked with.
I'm working with pairs from BSC network, and I'd like to get some information if the token can be bought and sold before ...
1
vote
1
answer
593
views
Signing a transaction server-side
I want to sign every transaction server side from the same address/wallet through web3.
What's the best way to tackle this?
Do I need to:
first use web3.eth.sendTransaction
Use web3.eth.sign to sign ...
1
vote
0
answers
266
views
Insufficient funds when using 'signTransaction' but not when using 'unlockAccount'
I am trying to execute a transaction on a private network, using my account.
The general flow:
Web3.js --> Parity node --> Private network
The transaction:
Invoke a method in a contract ...
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 ...
0
votes
3
answers
738
views
REWARD!! PLEASE CAN SOMEBODY HELP ME ETH STUCK - I am a newbie trying to create a trading bot. and came across a tutorial, my 1.1eth stuck Metamask! [duplicate]
SORRY ABOUT THE GRAMMAR AND SPELLING I HAVENT SLEPT FOR ALLMOST 2 days BECAUSE OF THIS..
Here is a bit of a back story on why I have become a little desperate lately to find ways to make crypto faster ...
0
votes
0
answers
52
views
Is it possible to schedule a transaction to execute after a certain amount of time in ethereum? [duplicate]
Is it possible to schedule a transaction to execute after a certain amount of time in ethereum? For example, I have a dapp where after two weeks I want to call a getRefund function on the smart ...
0
votes
2
answers
88
views
I'm trying to create an app that allows people to exchange ether between themselves but I have the error: "web3.eth.transact is not a function"
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<center>
<title>dEnergy</title>
</head>
<body>
<label for="name" ...