Skip to main content

Questions tagged [decoding]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
6 votes
1 answer
18k views

how to decode log event of my transaction log?

I receive a transaction event in my log of my Ethereum transaction. .on('receipt', function(receipt){ console.log("address: " + receipt.logs[0].address); console.log(&...
alfo888_ibg's user avatar
1 vote
1 answer
2k views

abi.decode with pragma experimental ABIEncoderV2 reverts with nested array

I have a function with a parameter of bytes calldata that needs to be decoded to a struct, but the call reverts in assembly. I believe the issue has something to do with the nested array. I have ...
Ben Schoeler's user avatar
6 votes
3 answers
6k views

How to decode a raw transaction in Python?

I have a raw_tx in hex format which I'm going to broadcast via eth_sendrawtransaction JSON-RPC method. I want to check this raw_tx by decoding it on fields: gas, gas_price, nonce, value, etc. Some ...
Max Block's user avatar
  • 307
1 vote
1 answer
339 views

Where does the length parameter end and the actual string start in an abi encoded string?

Assuming I decided to ABI encode a very long string (for the purpose of this question I just picked an arbitrary 5-paragraph lorem ipsum text generate by https://www.lipsum.com/feed/html) and get out ...
user avatar
2 votes
2 answers
1k views

How to decode a transaction to verify its signature in Javascript?

I noticed that it's possible to sign a transaction with a wrong private key. I took the following example found at https://github.com/ethereumjs/ethereumjs-tx const EthereumTx = require('ethereumjs-...
Julien's user avatar
  • 33
1 vote
0 answers
112 views

Given just an Etheruem address, is there any way to tell if it's an ERC20 and/or an ERC721

If I have only an Ethereum address and only a locally running node (using a third party such as EtherScan or Alethio is cheating), is there any way to tell if that address is an ERC20 or an ERC721 ...
Thomas Jay Rush's user avatar
0 votes
1 answer
268 views

Is Ethereum block header a list?

Decoding a RLP encoded block using Eth specifications do we get header as list? But as per format i.e., [[blockHeader,transactionList,uncleList],totalDifficulty], blockHeader should have been string. ...
Genie's user avatar
  • 1
1 vote
1 answer
1k views

RLP decoding for a list

in many standard documentation and many blogs, I have found the example for list with two strings like below [“cat”, “dog” ] -> C8 83 636174 83 646F67 and thats how it is decoded 1) Retrieve the ...
CaptPython's user avatar
1 vote
1 answer
216 views

Quorum how to decode result returned by eth_getQuorumPayload api?

I've read the post How to get decrypted transaction data in quorum? I followed the api document and got the result by calling eth_getQuorumPayload curl -H "Content-Type: application/json" -X POST ...
tyyen's user avatar
  • 67
3 votes
1 answer
2k views

Encoded input params

I created a simple test contract with a single method: pragma solidity ^0.4.24; contract SimpleTest { function testFunc(string name, bool isFirst) public { //do stuff } } I'm ...
forhas's user avatar
  • 825
1 vote
0 answers
582 views

How to decode Tx data? Online tool?

Is there a fast way to decode the data returning from a Smart Contract call? I know there are github projects with JS libraries to decode this kind of data (such as https://github.com/ConsenSys/abi-...
Juan Ignacio Pérez Sacristán's user avatar
1 vote
1 answer
808 views

Anyone with knowledge in org.web3j.abi.Type Decoder?

I am trying to decode a String with this code that I found but I have not been able to do it. String to = inputdata.substring(10, 74); String value = inputdata.substring(74, 138); Method refMethod = ...
Nicolas Flores Muñoz's user avatar
2 votes
1 answer
2k views

How to decode the input data in java?

I receive the input data as the image shows. And when I try to decode it with the method: String inputdata = null; Optional<Transaction> tx = web3.ethGetTransactionByHash(txHash).send()....
Nicolas Flores Muñoz's user avatar
3 votes
1 answer
3k views

How to unpack/decode parameters encoded with web3.eth.abi.encodeParameters in Solidity?

My client app (nodejs) packs some arguments to pass to a smart contracts as bytes _data (similar to ERC223 calls with fallback). I pack the arguments in my JS client like this: const packedArgs = ...
Andrey's user avatar
  • 1,157
16 votes
4 answers
7k 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 ...

1
2