Skip to content

Commit

Permalink
Minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
merendamattia committed Nov 4, 2024
1 parent da937d7 commit 6704fb4
Show file tree
Hide file tree
Showing 52 changed files with 23 additions and 55 deletions.
26 changes: 22 additions & 4 deletions script-python/journal/compile-all.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,10 @@ def extract_and_save_longest_bytecode(bytecode_dir, json_dir, is_ethersolve=Fals
second_index = longest_bytecode.find('60806040', first_index + len('60806040'))

if is_ethersolve:
second_index = first_index
second_index = first_index

longest_bytecode = longest_bytecode[second_index:]
if first_index != -1 and second_index != -1:
longest_bytecode = longest_bytecode[second_index:]

bytecode_file.write("0x" + longest_bytecode)
print(f"Extracted longest bytecode from {longest_contract_name} to {bytecode_filename}")
Expand Down Expand Up @@ -120,7 +121,8 @@ def extract_and_save_bytecode(bytecode_dir, json_dir, is_ethersolve=False):
if is_ethersolve:
second_index = first_index

bytecode = bytecode[second_index:]
if first_index != -1 and second_index != -1:
bytecode = bytecode[second_index:]

bytecode_file.write("0x" + bytecode)
print(f"Extracted bytecode to {bytecode_filename}")
Expand All @@ -145,4 +147,20 @@ def extract_and_save_bytecode(bytecode_dir, json_dir, is_ethersolve=False):
True)
extract_and_save_longest_bytecode('./reentrancy/bytecode/ethersolve',
'./reentrancy/json',
True)
True)

"""
# EVMLiSA
extract_and_save_bytecode('./vanilla/bytecode/evmlisa',
'./vanilla/json')
extract_and_save_bytecode('./reentrancy/bytecode/evmlisa',
'./reentrancy/json')
# EtherSolve
extract_and_save_bytecode('./vanilla/bytecode/ethersolve',
'./vanilla/json',
True)
extract_and_save_bytecode('./reentrancy/bytecode/ethersolve',
'./reentrancy/json',
True)
"""
2 changes: 1 addition & 1 deletion script-python/journal/run-benchmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ def results_solidifi(folder_path, print_data):
if __name__ == "__main__":
build_evmlisa()

evmlisa_vanilla_thread = threading.Thread(target=evmlisa, kwargs={'bytecode_dir': './vanilla/bytecode',
evmlisa_vanilla_thread = threading.Thread(target=evmlisa, kwargs={'bytecode_dir': './vanilla/bytecode/evmlisa',
'results_dir': './vanilla/results',
'result_evmlisa_dir': './vanilla/results/evmlisa'})
evmlisa_thread = threading.Thread(target=evmlisa, kwargs={'bytecode_dir': './reentrancy/bytecode/evmlisa',
Expand Down
1 change: 0 additions & 1 deletion script-python/journal/vanilla/bytecode/1.bytecode

This file was deleted.

1 change: 0 additions & 1 deletion script-python/journal/vanilla/bytecode/10.bytecode

This file was deleted.

Loading

0 comments on commit 6704fb4

Please sign in to comment.