Modify ABI output (#1681)

* Add resolved input to output

* Modify ABI output
pull/1683/head
Nikhil Parasaram 2 years ago committed by GitHub
parent daa75ee3e5
commit 822b1554fa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      mythril/analysis/templates/report_as_markdown.jinja2
  2. 4
      mythril/analysis/templates/report_as_text.jinja2

@ -42,9 +42,9 @@ Account: {% if key == "0xaffeaffeaffeaffeaffeaffeaffeaffeaffeaffe" %}[CREATOR]{%
{% for step in issue.tx_sequence.steps %}
{% if step == issue.tx_sequence.steps[0] and step.input != "0x" and step.origin == "0xaffeaffeaffeaffeaffeaffeaffeaffeaffeaffe" %}
Caller: [CREATOR], calldata: {{ step.calldata }}, decoded_data: {{ step.resolved_input }}, value: {{ step.value }}
Caller: [CREATOR], calldata: {{ step.calldata }}, {% if step.resolved_input is not none %}decoded_data: {{ step.resolved_input }}, {% endif %}value: {{ step.value }}
{% else %}
Caller: {% if step.origin == "0xaffeaffeaffeaffeaffeaffeaffeaffeaffeaffe" %}[CREATOR]{% elif step.origin == "0xdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef" %}[ATTACKER]{% else %}[SOMEGUY]{% endif %}, function: {{ step.name }}, txdata: {{ step.input }}, decoded_data: {{ step.resolved_input }}, value: {{ step.value }}
Caller: {% if step.origin == "0xaffeaffeaffeaffeaffeaffeaffeaffeaffeaffe" %}[CREATOR]{% elif step.origin == "0xdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef" %}[ATTACKER]{% else %}[SOMEGUY]{% endif %}, function: {{ step.name }}, txdata: {{ step.input }}, {% if step.resolved_input is not none %}decoded_data: {{ step.resolved_input }}, {% endif %}value: {{ step.value }}
{% endif %}
{% endfor %}
{% endif %}

@ -33,9 +33,9 @@ Transaction Sequence:
{% for step in issue.tx_sequence.steps %}
{% if step == issue.tx_sequence.steps[0] and step.address == "" and step.origin == "0xaffeaffeaffeaffeaffeaffeaffeaffeaffeaffe" %}
Caller: [CREATOR], calldata: {{ step.calldata }}, decoded_data: {{ step.resolved_input }}, value: {{ step.value }}
Caller: [CREATOR], calldata: {{ step.calldata }}, {% if step.resolved_input is not none %}decoded_data: {{ step.resolved_input }}, {% endif %}value: {{ step.value }}
{% else %}
Caller: {% if step.origin == "0xaffeaffeaffeaffeaffeaffeaffeaffeaffeaffe" %}[CREATOR]{% elif step.origin == "0xdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef" %}[ATTACKER]{% else %}[SOMEGUY]{% endif %}, function: {{ step.name }}, txdata: {{ step.input }}, decoded_data: {{ step.resolved_input }}, value: {{ step.value }}
Caller: {% if step.origin == "0xaffeaffeaffeaffeaffeaffeaffeaffeaffeaffe" %}[CREATOR]{% elif step.origin == "0xdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef" %}[ATTACKER]{% else %}[SOMEGUY]{% endif %}, function: {{ step.name }}, txdata: {{ step.input }}, {% if step.resolved_input is not none %}decoded_data: {{ step.resolved_input }}, {% endif %}value: {{ step.value }}
{% endif %}
{% endfor %}
{% endif %}

Loading…
Cancel
Save