Questions tagged [raw-transaction]

A transaction byte-encoded using the Recursive-Length Prefix (RLP) algorithm. Before Constantinople, it needs to be signed before it will be accepted by the network.

Filter by
Sorted by
Tagged with
44 votes
6 answers
33k views

Create and sign OFFLINE raw transactions?

I'm looking to create a raw transaction, sign it, and broadcast it using the eth.sendRawTransaction RPC method. I would like to do this offline using code or an open-source library OR online but ...
Nico's user avatar
  • 807
20 votes
4 answers
37k views

How to properly create a raw transaction and sign it using web3 in browser

I want to create and sign a transaction in browser using web3. In order to create a raw transaction, I think I have to do something like this (hopefully you can fill the gaps of my knowledge) var pk =...
S1r_Mar71n's user avatar
55 votes
5 answers
111k 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 ...
Ernane Luis's user avatar
20 votes
5 answers
7k views

Is there any safe way to send money from a cold wallet, using an untrusted computer?

You have 2 computers. One is 100% offline and, thus, trusted. Other is online. Private keys are stored on the offline computer and the online computer has no access to it. Is there any way to sign a ...
MaiaVictor's user avatar
  • 3,177
38 votes
4 answers
25k views

What is the ethereum transaction data structure?

I'd like to know the detail of the Ethereum transaction data structure. What data is stored in transaction?
Satoshi Nakanishi's user avatar
16 votes
4 answers
6k views

How can I easily parse a raw transaction?

In the Bitcoin ecosystem, there are tools like https://blockchain.info/decode-tx to decode a raw transaction. Is there a site that offers the equivalent for Ethereum? I'm looking for an easy way to ...
16 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. ...
Sebi's user avatar
  • 5,284
10 votes
1 answer
6k views

What is a "raw transaction" and what is it used for?

I come across a lot of posts on Ethereum Stack Exchange about "raw transactions" (more than 45 posts have this tag at the moment), but I don't really understand what it is. I have searched both Stack ...
Tesa's user avatar
  • 2,259
3 votes
1 answer
711 views

Can I use any nonce as long as it is not previously been used?

When creating raw transactions, do I have to increase the nonce always in increments of 1 or can I use any nonce as long as it has not been used before? Are there any specific rules? Could I also go ...
q9f's user avatar
  • 32.8k
18 votes
2 answers
12k views

web3.eth.sendRawTransaction: cannot unmarshal hex string without 0x prefix

When I call sendRawTransaction, I got "[Error: invalid argument 0: json: cannot unmarshal hex string without 0x prefix into Go value of type hexutil.Bytes]" I think all of params have "0x" ...
zono's user avatar
  • 1,473
15 votes
2 answers
8k views

How to get the transaction confirmations using the JSON RPC

How do I get the block confirmations for a specific transaction using the JSON RPC? This is information that would come inside the transaction JSON in bitcoin but it doesn't seem to come in ethereum. ...
Nico's user avatar
  • 807
10 votes
2 answers
15k views

Building a raw contract transaction with ethers.js

Can't find any good documentation on creating a raw transaction with contract data in ethers.js. The equivalent in web3 is adding the encodeABI on the data property. Any guidance on this? This isn't ...
Michael C's user avatar
  • 433
7 votes
3 answers
4k views

Retrieve the signature of a transaction on the blockchain

How can you find the signature of a transaction? web3.eth.getTransaction() doesn't appear to make that available.
dbryson's user avatar
  • 6,363
4 votes
1 answer
843 views

How to get the transaction hash once it is mined?

In JavaScript (web3.js), how do I get the transaction-hash corresponding to a function executed in my smart contract?
Paul's user avatar
  • 43
3 votes
2 answers
679 views

javascript local sign and sendRawTransaction to remote node

In order to use Web3 provided by MyEtherAPI, I need to locally sign a transaction, since myetherapi supports only eth_sendRawTransaction. I found a good source to do so on github, unfortunately it ...
Consy's user avatar
  • 582
3 votes
1 answer
6k views

What is chainID? Raw transaction from myEther wallet

So I just ran a function from a contract on Ropsten from myetherwallet.com. It ran fine via metamask, but I was just wondering what chainID was in the rawTx file? { "nonce":"0x2e", "gasPrice":"...
thefett's user avatar
  • 3,813
2 votes
1 answer
5k views

How to construct a raw Ethereum transaction from transaction data

Let's say I have the following transaction information: { "jsonrpc":"2.0" "id":0 "result":{ "blockHash":"...
Peteris's user avatar
  • 1,005
2 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 ...
savard's user avatar
  • 438
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 ...
Crissi Mariam Robert's user avatar
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?
Max's user avatar
  • 171
12 votes
5 answers
17k views

Get raw transaction from hash

I wonder if there is an equivalent to bitcoind's getrawtransaction, i.e., a command to dump a raw transaction in hex format, given its hash id. I am working preferably in geth.
oriol's user avatar
  • 123
9 votes
3 answers
4k views

Can not send eth on Ropsten using Infura node

I am trying to send some test ether on Ropsten network using Infura but I can not make a transaction. Code works locally with testrpc but not with Infura var Web3 = require('web3'); var util = ...
wonglik's user avatar
  • 315
8 votes
1 answer
2k views

sendRawTransaction results in queued TXs

I attempted to send raw TXs via eth.sendRawTransaction API but get stuck. I'm using EthereumJS to generate and sign TXs, and indeed, I can submit TXs through eth.sendRawTransactin, but the TXs always ...
qweruiop's user avatar
  • 251
6 votes
2 answers
7k views

Pending transactions removed from txpool in geth

We have been working on load-testing our private blockchain network using geth and Web3j. The transactions are sent using Web3j. We send 100 transactions, where every block has space for about 25 of ...
Evedal's user avatar
  • 61
5 votes
1 answer
1k views

Symbolic decoding of a transaction for Solidity

I have a Solidity contract source code and a raw transaction (hex) from blockchain. Is it possible for me to decode the transaction to its symbolic format, so I can see what contract methods are ...
Mikko Ohtamaa's user avatar
4 votes
1 answer
2k views

Can I deploy a contract to an arbitrary address that I choose?

If I want to create a smart contract by executing a raw tx, is it mandatory to compute the new contracts address the way it's been defined, or could I pick my own address arbitrarly? Why?
Roland Kofler's user avatar
3 votes
2 answers
4k views

How to call a function and to read return values from an external deployed contract address?

I am trying to call a function from deployed contract address using the below format DeployedContractAddress.call(bytes4(keccak256("get(address)")),0xfffff); But when trying to call the get(_address)...
lekshmi's user avatar
  • 447
3 votes
1 answer
2k views

Can I get the raw transaction using Nethereum?

How do I get a raw transaction for a transaction on the blockchain using web3/Nethereum? An example of a raw transaction can be seen here: https://etherscan.io/getRawTx?tx=...
Thorkil Værge's user avatar
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+...
victor_reiner's user avatar
3 votes
2 answers
6k views

How to get the value of the transaction?

I am using web3.py but I need help to know the value of the transaction sent. I know that the information is stored in the input but how do I parse the string. I know nothing about ABI. Here is the ...
strangethingspy's user avatar
3 votes
1 answer
1k views

Raw transaction nonce won't increment until confirmation

I am building transactions manually and have been able to successfully create raw transactions which can be broadcasted to the network. My problem is, that while I can get a nonce from the web3....
James's user avatar
  • 341
3 votes
1 answer
7k views

Get the balance of an ERC20 token at an Ethereum address [duplicate]

I'm trying to get the balance of a token on an Ethereum address. So let's say my Ethereum address has 1 SNT. I'd like to make a call to get that 1 SNT as a response. I've written many other calls ...
LampShade's user avatar
  • 640
3 votes
3 answers
4k views

How to make transaction using private key and address using web3j

I have a private key and address . Is it possible to make transaction with these parameter using web3j.
Ajit Soman's user avatar
3 votes
2 answers
2k views

field size and value range of chainId (EIP-155)

EIP-155 defined a list of chain IDs, e.g. main net is 1 Ropsten is 2. I don't seem to be able to find a definition about its supposed value range and data size. Quoting the yellow paper rule (287) ...
Linmao Song's user avatar
  • 2,357
3 votes
1 answer
2k views

Assign metadata to a transaction

How can I append some (extra) data to a transaction that calls a contract method (with given parameters)? The transaction has only one 'data' field which is used to serialize the method call. If I ...
Lucian Boca's user avatar
2 votes
1 answer
2k views

How to build a simple transaction?

Where is the information on the tx package build protocol? Bitcoin as an example, Bitcoin Wiki - Protocol Documentation: tx Is there an example of serialization for python like this answer to How to ...
Джон Смит's user avatar
2 votes
1 answer
1k views

How to encode empty transaction fields?

I want to RLP-encode a(n unsigned) transaction. Some fields of the transaction can be empty/null/zero. I want to know how they are encoded, though. Let's assume the following transaction fields: ...
q9f's user avatar
  • 32.8k
2 votes
1 answer
656 views

Signing a raw transaction, wrong R and S values

I am trying to sign a raw transaction in javascript without relying on dependencies like web3, ethereumjs, etc. I am following the python tutorial found here, and porting to JS as I go: https://...
Albert Renshaw's user avatar
2 votes
2 answers
5k views

encode data input of the raw transaction to update an contract function? [duplicate]

I need to update a contract by calling one of their function but I cant use web3.js so I need to send a raw transaction. example of function to be call on the contract: test(address buyer, uint256 ...
Ernane Luis's user avatar
1 vote
2 answers
2k views

Sign and Verify transaction offchain

I want to sign and verify a transaction offchain, but I can't really find a proper example/documentation online from start to finish that explains the whole process. Can somebody point to some ...
ranchalp's user avatar
  • 540
1 vote
2 answers
2k views

How to recover the public key from r, s and v without the private key

I would like to recover the public key (or address) from the r,s and v values of a signed transaction without using a private key. The idea of course being, that I want to use Nick's method to deploy ...
Marlo's user avatar
  • 297
1 vote
1 answer
803 views

Are the tx signed then RLP encoded then hashed to be transmitted to the blockchain for miners to mine?

Using the discussion of this link: https://ethereum.org/en/developers/docs/transactions/ It seems obvious that before the transaction is transmitted over the blockchain for miners to mine, the ...
Anonymous's user avatar
  • 287
1 vote
2 answers
2k views

EIP-1559: Why does geth expect an input list for types.txdata?

I manually composed, signed, and serialized the following raw transaction: ...
q9f's user avatar
  • 32.8k
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 ...
jasper's user avatar
  • 689
1 vote
1 answer
174 views

What is wrong with this hand-made raw transaction?

Here are two RLP-encodings of two signings of the same transaction --- for Goerli. Notice how the "Signed by" address is different. This must be implying something is wrong with my signing ...
user66567's user avatar
1 vote
1 answer
2k views

Invalid sender when sending Raw Transaction, signed w/ ethereum-tx on PHP

I am using PHP and ethereum-tx library https://github.com/web3p/ethereum-tx to sign transactions but when trying to send them to the node I got an "invalid sender" error. Besides, exactly the same ...
Juan Ignacio Pérez Sacristán's user avatar
0 votes
2 answers
2k views

Meta transaction with web3

iam just wondering. Are meta transactions not the same like raw transactions, which are signed by the user in frontend and send to a backend, where the transaction gets deployed?
Serdar Nur's user avatar
0 votes
2 answers
2k views

A bit confused. How do I send ether using Web3j to an address (Android)

EDIT: I am using android platform I think I'm a bit confused conceptually. I would appreciate it if someone could answer these few questions for me as I'm trying to make an app so that I can be ...
Stephen's user avatar
  • 17
0 votes
1 answer
2k views

Web3 sendSignedTransaction Transaction cost

I'm new to Ethereum world. I've just manage to create an example that calculates transaction fee and sends a signed transaction without a contract using Web3js library. My issue is that my test ...
Eduardo's user avatar
  • 241