Questions about JSON output
See original GitHub issueWhen I print out the result from Mythril in JSON and I look at the tx_sequence
, there are attributes named address
, calldata
, origin
and input
, and value
, would you please explain the differences among these attributes or pointers to the documentation where I can find the definitions of these attributes?
Issue Analytics
- State:
- Created a year ago
- Comments:30
Top Results From Across the Web
Top 19 JSON Interview Questions and Answers (2022)
1) Mention what is JSON? 2) Explain what is JSON objects? 3) Explain how to transform JSON text to a JavaScript object? 4)...
Read more >16 JSON Interview Questions You Must Be Prepared For
16 JSON Interview Questions You Must Be Prepared For · Q1: What is JSON and why would I use it? · Q2: How...
Read more >Top JSON Interview Questions and Answers
This JSON Interview Questions tutorial includes a list of all the frequently asked questions related to JSON. We hope that this tutorial ...
Read more >33 JSON Interview Questions (Plus Tips) - Indeed
JSON interview questions with sample answers · 1. What other programming languages integrate with JSON? · 2. What is Newtonsoft as it pertains...
Read more >Json Interview Questions and Answers - myTectra
Json Interview Questions and Answers · Q1. What is the full form of JSON? · Q3. What is JSON used for? · Q4....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
For types, the first type of calldata are static types such as the
uint, bool .. etc
types. These have fixed 32 bytes width, the other classes are dynamic types such asbytes, array[] ...
these point to some corresponding location in the calldata in it’s corresponding initial location (in this case the location that it points to is0x0000000.....20
). So you’ll have to extend the calldata to the corresponding location in some cases. In some cases mythril might generate a calldata that the program can run, but it’s not possible to directly decode it since it’s considered invalid by abi programs, like in this case (although you can execute the program with such an input, the abi programs such aseth-abi
consider them as invalid). It’s invalid here because0x20
points to a location less than96 bytes
or192nd
location in hex.Oops, let me make a correction and be a bit more precise.
If you see a calldata as
0x4a6781a901
here the first 4 bytes are function signature, which is0x4a6781a9
. The next set of32 bytes
are the arguments, if there are two arguments ofuint256, uint256
for this function, then the following is true.function signature:-
0x4a6781a9
as these are the first 4 bytes. firstuint256
:- the remaining calldata left is only a single byte valued as01
, so you’ll have to append it with 0s to make it 32 bytes, hence it will be0100000000000000000000000000000000000000000000000000000000000000
the seconduint256
:- since the remaining calldata is empty now, the second uint is0000000000000000000000000000000000000000000000000000000000000000
which is0
.All these arguments are in hex, you’ll have to convert them to
uint
.For the following error that you encountered you can see that it expected 32 bytes for the second argument, but it only got a single byte, you’ll need to append 31 bytes of 0s which is 62 zeros to correct the error.