-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'reconstruct_function_tags' of github.com:costa-group/gr…
…ey into reconstruct_function_tags
- Loading branch information
Showing
5 changed files
with
124 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import json | ||
from jsondiff import diff | ||
|
||
def compare_files(json_file1, json_file2): | ||
with open(json_file1, 'r') as f: | ||
json1 = json.load(f) | ||
|
||
with open(json_file2, 'r') as f: | ||
json2 = json.load(f) | ||
|
||
if json1.keys() != json2.keys(): | ||
print("JSONS have different contract fields") | ||
return False | ||
|
||
# Drop keys for gas | ||
for key, json1_answers in json1.items(): | ||
json2_answers = json2[key] | ||
|
||
for answer in [*json1_answers, *json2_answers]: | ||
answer.pop("gasUsed") | ||
answer.pop("gasUsedForDeposit") | ||
|
||
answer = diff(json1, json2) | ||
print("FINAL", answer) | ||
return answer | ||
|
||
if __name__ == "__main__": | ||
pass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters