question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Providing decoded tx_data in reports

See original GitHub issue

Description

Mythril reports vulnerable transaction sequences with corresponding argument values which may be included in tx_data. However, reports currently provide tx_data that is not decoded .

Therefore, if I want to test whether Mythril’s inputs work or not, it seems to I have to manually parse tx_data when multiple argument values exist in functions (transactions).

For the running example in README.md, an expected report format may be:

Caller: [CREATOR], constructor 
Caller: [CREATOR], killerize (0x....)
Caller: [CREATOR], activatekillability()
Caller: [CREATOR], commencekilling()

where we don’t need to parse tx_data anymore.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
norhhcommented, Jan 18, 2020

In my example, the constructor has only one input parameter which has uint type. I meant in general case when a constructor has multiple args. Look into solidity abi spec for more info https://solidity.readthedocs.io/en/develop/abi-spec.html

0reactions
SunBeomSocommented, Jan 18, 2020

@norhh I have three additional questions.

But it takes some effort to extract the calldata into int, uint, address etc.

Could you provide any examples? What do you mean by int, uint, address etc ? In my example, the constructor has only one input parameter which has uint type.

Or do you have any relevant documents?

  1. When dynamic arrays are passed into arguments (e.g., test function in my example), how can I know the size of the dynamic arrays from input field?
Read more comments on GitHub >

github_iconTop Results From Across the Web

Instructions to Police for Reporting Crashes
Motor vehicle traffic crash reporting provides valuable data to many ... All crash reports submitted to TxDOT that do not include at least....
Read more >
CR100 2022 Instructions for Police Reporting Crashes
When reporting crash data, it is important to provide sufficient details about the crash. This will enable TxDOT to classify the crash ...
Read more >
TX: fix TX decoding when some values are actually arrays by ...
This PR fixes: -> Decoding of any Tx where any of a value is an array instead ... _validateNotArray(txData) , was typescript giving...
Read more >
Decoding Ethereum smart contract data | by Yifei Huang
This assumes that the decoding is targeted at a smallish number (on the order of thousands) of distinct smart contracts. It leverages the...
Read more >
abi-decoder - Go Packages
Go library for decoding data params and events from etherem ... Inspired by abi-decoder ... DecodeMethod(txData) if err != nil { log.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found