All Questions
18 questions
60
votes
6
answers
126k
views
error: replacement transaction underpriced
Im trying to send a raw transaction using web3 to ropsten testnet and Im getting this error:
replacement transaction underpriced
where sometimes my tx works and sometimes I get this error.
my tx ...
17
votes
1
answer
6k
views
Difference between transactions and raw transactions in web3.js
Reading the documentation of web3.js I have come across sending transactions and raw transactions.In the documentation it's specified that send raw transaction sends an already signed transaction.
...
16
votes
5
answers
9k
views
Using web3 to sign a transaction without connecting to geth
Is it possible to use the web3.js library in a client's browser to let them generate an address and sign a transaction without them connecting to an ethereum node?
5
votes
1
answer
3k
views
Web3.js 1.0 sendSignedTransaction returns error: Invalid RLP
Running parity private PoA chain, using latest parity client + nodejs + web3.js 1.0
When I try to sign a transaction and then send it following web3.js 1.0 documentation (sendTransaction and ...
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 = '...
3
votes
4
answers
2k
views
How to send transaction/call function from server-side?
After an event emits from my smart contract and I hear it server-side, I want to call a certain function in the smart contract and pass it some information to use.
I'm wondering how you place a ...
3
votes
1
answer
2k
views
Send signed transaction from nodejs to private SmartContract using webjs in Quorum network not working
Context
I have a quorum network mounted following the example of 7nodes. In node 1 I have deployed a smart contract privately, putting the public key of this ("BULeR8JyUWhiuuCMU/HLA0Q5pzkYT+...
2
votes
1
answer
713
views
Web3 - Assign nonce to smart contract transact
I have a smart contract.
I want to execute one of its state modifying functions.
This is the code:
const result = await smartContractObject.methods
.addSomething(_valueToAdd)
.send( { gas: '...
2
votes
1
answer
583
views
Transaction on Uniswap -- how to find out what pair is being swapped (via web3.js)?
Given a transaction on Uniswap,
how to find out what pair is being swapped, and the amount of it? Namely, via web3.js/ethers.js
Is there relevant and sufficient information in the fields of a ...
1
vote
2
answers
1k
views
How to call my contract's function using sendRawTransaction?
I am trying to call my contract's method using sendRawTransaction. I have a function in my contract
updateReading(address consumerAddress,
uint32 consumerMeterId,
uint64 ...
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 ...
1
vote
1
answer
324
views
Why do we have to put 'hex' at the end of this function? Buffer.from('key' , 'hex')
I know that this line of code: Buffer.from('key', 'hex') Converts a string into its binary representation. My question is: what does adding the 'hex' at the end do? I am confused, since the key is ...
0
votes
2
answers
670
views
How to create transactions and delay its broadcast to other nodes
I am creating a project where i need to use my smart contract to add data to the storage but in a programatically delayed way:
I am using web3 in my nodejs server, and i want to create the ...
0
votes
2
answers
2k
views
How to sign a transaction automatically? [duplicate]
An api will call the smart contract function. It should sign the transaction on its own instead of human intervention.
I think raw transaction can work here. Are there any other options?
Any help is ...
0
votes
1
answer
1k
views
sendRawTransaction not appearing / being submitted to the network
I'm new to Javascript, so bear with me. I've successfully gotten web3.js working in a HTML file, with getBalances working as it should. (I don't want to use Node.js for now)
However now I'm stuck at ...
0
votes
1
answer
3k
views
decode ethereum input data
Howsit guys, I am busy going through the mempool and trying to track various transactions and parts of transactions. As a first step I thought I would list transactions and the bits I might need later ...
0
votes
0
answers
212
views
Incorrect return value after calling getTransactionCount
I have only few lines in the code:
async function test() {
await web3.eth.getTransactionCount('{ WALLET }').then(console.log);
}
test();
The return values are random: 0, 22 (this is the real value)...
0
votes
1
answer
49
views
Offline transaction like lightening network on Ethereum [closed]
I want to implement transaction process like lightening network.
When 2 people do number of transactions between each other, for instance they did 10 transaction with each other. I want to keep all ...