Questions tagged [decoding]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
0answers
16 views

Decode input parameter without ABI

I have a transaction with input data that looks like this: 0x2293db5700000000000000000000000030823e060e8be429b34bd9192df9cad4b166a056 I know that the last 40 characters is the token address which ...
0
votes
1answer
21 views

Best way to decode transaction input on the client side

I need to decode transaction input on the client side. Libraries like ethereum-input-data-decoder needs NodeJS dependencies like fs. Now I decode the one type of contract methods as follows: const ...
0
votes
0answers
37 views

How to decode input for tx sent to zero address (contract creation tx)

Decoding transaction input data requires providing ABI. How can I decode transaction input from a transaction issued to "zero" address? This special address is used for creating new ...
0
votes
1answer
31 views

How does Solidity decode a struct returned from a delegate call?

I have a proxy contract that delegate calls to a target contract. The proxy is similar to DSProxy. In it, there is an execute function: function execute(address target, bytes memory data) external ...
0
votes
1answer
136 views

Decode raw data within Solidity

If I only have the raw input data of a contract call, what would be the best way to decode it into readable form within Solidity? "[INPUT]":"...
0
votes
1answer
81 views

How to decode when the input of tracsaction consists of multiple contracts?

I'm testing how to decode the input data of a transaction. I am currently using Infura and web3py. In the case of USDT token transfer, USDT ABI and contract address are obtained and decoded through ...
0
votes
1answer
17 views

Is it possible to encode and decode two consequent byte arrays (with unknown sizes) using `abi.encode` and `abi.decode`?

Is it possible to encode and decode two consequent bytes using abi.encode and abi.decode (as following)? bytes memory data = abi.encode(data1, data2); // later on (bytes memory data1_recovered, bytes ...
1
vote
2answers
34 views

Would it be possible to integrate crypto with trading bot?

You can create a trading bot in trading view and see how well your crypto would perform in a given time frame. (I can see how much money would I make if I didn't sell or how much money I would make if ...
1
vote
0answers
140 views

Decoding transaction data using abi-decoder

I'm trying to write a very simple script in typescript that finds uniswap transactions and decodes the transaction data so I can read the function being called and the parameters it is being called ...
0
votes
0answers
65 views

Solidity beginner exercise: Santa'slist

I am trying to implement the following exercise "Santa's list": Build a system for tracking who is on their nice list and who is on their naughty list. Furthermore, I do not want duplicates ...
0
votes
0answers
32 views

Ethereum Input Data Decoding

I Have the following input: ...
0
votes
1answer
80 views

Method's parameters: a way to know a uint256 is a token amount and its number of decimals?

When decoding transaction actions or logs, I never know how to human-read uint256 values when they are token amounts and, if so, how to know how many decimals they are. For the decimals, do I always ...
0
votes
0answers
75 views

How to read all logs from a transaction without having each contract ABI?

From a transaction logs, how do I decode every logs since I don't have all contracts ABI? Do I have to fetch the ABI every time I encounter an unknown contract? How do apps that display all logs deal ...
1
vote
1answer
686 views

decode ethereum input data in R [closed]

I am using the etherscan API to get the input data of transactions. However I have no real clue how I can decode the input data into something readable. For example: ...
2
votes
1answer
2k 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); ...
0
votes
1answer
757 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 ...
3
votes
1answer
1k 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 ...
0
votes
1answer
51 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 ...
2
votes
2answers
366 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-...
1
vote
0answers
44 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 ...
0
votes
1answer
69 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. ...
1
vote
1answer
428 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 ...
1
vote
1answer
142 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 ...
3
votes
1answer
861 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 ...
1
vote
0answers
284 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-...
1
vote
1answer
330 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 = ...
1
vote
0answers
622 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()....
2
votes
1answer
2k 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 = ...
15
votes
3answers
5k 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 ...