Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Ethereum Smart Contract binary bytecode matching #52

Merged
merged 112 commits into from
Oct 15, 2024
Merged
Changes from 1 commit
Commits
Show all changes
112 commits
Select commit Hold shift + click to select a range
4304dfe
Added binary verificator
Alexvozhak Jul 7, 2024
aa6733a
Added binary verification through Ganache
Alexvozhak Jul 29, 2024
4229785
Made work with env uniform
Alexvozhak Jul 30, 2024
cf4cad1
Corrected the alignment in lido_dao_sepolia_config.json
Alexvozhak Jul 30, 2024
34c6851
Updated readme
Alexvozhak Jul 30, 2024
c53391b
Reverted taking etherscan env var from config
Alexvozhak Jul 30, 2024
f77bf50
Fixed relative paths
Alexvozhak Jul 30, 2024
43336d8
Added Ganache checks
Alexvozhak Jul 31, 2024
d445eb3
Formatted the code in Black style
Alexvozhak Aug 1, 2024
c3ad6b2
Merge branch 'main' into binary_verificator
Alexvozhak Aug 1, 2024
3e093de
fixed binary-check arg, removed autoclean arg
Alexvozhak Aug 3, 2024
930c0d8
Moved from Ganache to Hardhat
Alexvozhak Aug 3, 2024
1b38ff6
Renamed Ganache to Hardhat in logs
Alexvozhak Aug 4, 2024
72faada
Added new arg for Hardhat config path
Alexvozhak Aug 4, 2024
2c5c831
Added small check before deleting compilers directory
Alexvozhak Aug 4, 2024
3c40dd8
Now eth_accounts is sent at once
Alexvozhak Aug 4, 2024
234543c
Fixed review comments
Alexvozhak Aug 5, 2024
5c7dcc9
Refactored binary_verifier.py
Alexvozhak Aug 5, 2024
d33d546
Trying to fix Hardhat
Alexvozhak Aug 5, 2024
c5c136c
Revert "Trying to fix Hardhat"
Alexvozhak Aug 5, 2024
0719e62
Trying to fix Hardhat autoinstall #2
Alexvozhak Aug 6, 2024
7d47afe
Updated readme
Alexvozhak Aug 6, 2024
300eb77
Updated RPC URL for sepolia
Alexvozhak Aug 6, 2024
ee579a2
Moved 'constructor_args' into 'binary_checking' section. Also small f…
Alexvozhak Aug 6, 2024
835338a
Filling holesky config (3/53)
Alexvozhak Aug 6, 2024
5362009
Update README.md
Alexvozhak Aug 7, 2024
1210abc
Update README.md
Alexvozhak Aug 7, 2024
43d6deb
Update README.md
Alexvozhak Aug 7, 2024
c6803c5
Update README.md
Alexvozhak Aug 7, 2024
138fdd4
Update diffyscan/utils/explorer.py
Alexvozhak Aug 7, 2024
13a7a19
Update diffyscan/utils/explorer.py
Alexvozhak Aug 7, 2024
a296e52
Fixed review comments, small refactoring in diffyscan.py
Alexvozhak Aug 7, 2024
623f79a
Added handling prepared calldata from config
Alexvozhak Aug 7, 2024
0521f02
Update README.md
Alexvozhak Aug 14, 2024
6059460
Update README.md
Alexvozhak Aug 14, 2024
a6b93ea
Update README.md
Alexvozhak Aug 14, 2024
95d1e6a
Update README.md
Alexvozhak Aug 14, 2024
e882a53
Update package.json
Alexvozhak Aug 14, 2024
099c0ad
Update diffyscan/utils/hardhat.py
Alexvozhak Aug 14, 2024
f11a53f
Update README.md
Alexvozhak Aug 14, 2024
086e36f
Update README.md
Alexvozhak Aug 14, 2024
78fc2f6
Update diffyscan/diffyscan.py
Alexvozhak Aug 14, 2024
29271ad
Update diffyscan/diffyscan.py
Alexvozhak Aug 14, 2024
0f7e838
Update config_samples/lido_dao_holesky_config.json
Alexvozhak Aug 14, 2024
e7b0529
Update diffyscan/diffyscan.py
Alexvozhak Aug 14, 2024
5f57454
Update diffyscan/diffyscan.py
Alexvozhak Aug 14, 2024
e13367f
Update diffyscan/diffyscan.py
Alexvozhak Aug 14, 2024
dd3e261
Update diffyscan/diffyscan.py
Alexvozhak Aug 14, 2024
de09c77
Update diffyscan/diffyscan.py
Alexvozhak Aug 14, 2024
e821bd5
Update diffyscan/diffyscan.py
Alexvozhak Aug 14, 2024
9f2da4b
Update diffyscan/utils/binary_verifier.py
Alexvozhak Aug 14, 2024
0cc9929
Update diffyscan/utils/calldata.py
Alexvozhak Aug 14, 2024
7d60b53
Update diffyscan/utils/calldata.py
Alexvozhak Aug 14, 2024
9967cde
Update diffyscan/utils/calldata.py
Alexvozhak Aug 14, 2024
c53e939
Update diffyscan/utils/common.py
Alexvozhak Aug 14, 2024
d9f246a
Update diffyscan/utils/common.py
Alexvozhak Aug 14, 2024
37ebc52
Update diffyscan/utils/common.py
Alexvozhak Aug 14, 2024
e518f77
Update diffyscan/utils/compiler.py
Alexvozhak Aug 14, 2024
3ac8afe
Update diffyscan/utils/compiler.py
Alexvozhak Aug 14, 2024
f83a99a
Update diffyscan/utils/compiler.py
Alexvozhak Aug 14, 2024
2419fd2
Update diffyscan/utils/compiler.py
Alexvozhak Aug 14, 2024
090e41a
revived branch
Alexvozhak Sep 5, 2024
1652984
removed "enable" field
Alexvozhak Sep 7, 2024
dc53f74
jq applied
Alexvozhak Sep 7, 2024
f3b94bb
optimized binary comparison logic
Alexvozhak Sep 7, 2024
e9622dd
made warning instead of exception when explorer token isn't set
Alexvozhak Sep 7, 2024
eda4d73
removed field "enable" from lido_dao_holesky_config.json
Alexvozhak Sep 7, 2024
bbdd40a
added skip_binary_comparison argument
Alexvozhak Sep 7, 2024
71453d9
added custom exceptions
Alexvozhak Sep 7, 2024
6b00c89
added exception handler
Alexvozhak Sep 8, 2024
003c44e
added BinartConfig type, integrated mypy
Alexvozhak Sep 8, 2024
067ad46
fixed slicing: renamed types.py to custom_types.py
Alexvozhak Sep 8, 2024
b9cc037
applied black for calldata.py
Alexvozhak Sep 8, 2024
e38ddb0
removed GITHUB_API_TOKEN from constant.py
Alexvozhak Sep 8, 2024
38af17e
removed redundant log message
Alexvozhak Sep 8, 2024
d62048b
added mypy and types-requests into package.json
Alexvozhak Sep 8, 2024
a282c07
fixed alignment
Alexvozhak Sep 8, 2024
954ce59
moved finding urls from config to env
Alexvozhak Sep 8, 2024
0da6b39
fix after refactor
Alexvozhak Sep 8, 2024
03210d6
added ExceptionHandler for source diff also
Alexvozhak Sep 8, 2024
e85e066
fixed imports
Alexvozhak Sep 8, 2024
d02490d
fixed custom_exceptions import
Alexvozhak Sep 8, 2024
a7e1354
fixed remarks in binary_verifier
Alexvozhak Sep 9, 2024
eef60b6
encoder has become more readable
Alexvozhak Sep 10, 2024
12da7c6
added invalid local rpc url handling
Alexvozhak Sep 10, 2024
665a7dc
updated readme, added supporting custom hardhat_config.js
Alexvozhak Sep 10, 2024
ab17d3c
fixed binary comparison logic
Alexvozhak Sep 11, 2024
c6af324
reworked pointing to hardhat config path
Alexvozhak Sep 11, 2024
697d90a
Revert "reworked pointing to hardhat config path"
Alexvozhak Sep 11, 2024
3109631
removed redundant contract's calldata
Alexvozhak Sep 12, 2024
85afaa7
renamed config field raise_exception to raise_exceptions_on_comparison
Alexvozhak Sep 12, 2024
b0e7fe2
added default hardhat config support
Alexvozhak Sep 12, 2024
b616c96
extended response exception message
Alexvozhak Sep 12, 2024
02527e5
removed adding http prefix from local rpc url
Alexvozhak Sep 12, 2024
9c9be88
added warning for unknown opcode
Alexvozhak Sep 12, 2024
1fec4cb
changed log message by remark
Alexvozhak Sep 12, 2024
dc318d9
added random guid for temp .sol files
Alexvozhak Sep 12, 2024
42fcee7
fixed readme by remark
Alexvozhak Sep 12, 2024
62881b9
added extra comment for encode_constructor_arguments()
Alexvozhak Sep 12, 2024
102c72b
renamed raise_exceptions_on_comparison to fail_on_comparison_error
Alexvozhak Sep 22, 2024
ac4419e
uniqueness in readme example has been enforced
Alexvozhak Sep 22, 2024
601ccbe
fixed diffyscan example call for pipx usage
Alexvozhak Sep 22, 2024
498be46
Added handling different codes length
Alexvozhak Sep 22, 2024
9dc240f
Fixed logic for calldata in config
Alexvozhak Sep 22, 2024
d71d9f2
added comment for near_lines_count constant
Alexvozhak Sep 22, 2024
8493437
Changed hardfork from istanbul to cancun
Alexvozhak Sep 22, 2024
37617f7
Husky integrated with precommit hook
Alexvozhak Sep 23, 2024
2516736
tested encoding bytes on optimizm contract
Alexvozhak Sep 24, 2024
4c6b2d6
added automatic reconnection to Hardhat
Alexvozhak Sep 24, 2024
3d99f67
updated package.json and package-lock.json
Alexvozhak Sep 24, 2024
82479e3
added trimming metadata, optimized algorithm, fixed sepolia config
Alexvozhak Oct 13, 2024
ea3429e
Merge branch 'main' into binary_verificator
Alexvozhak Oct 13, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Added small check before deleting compilers directory
  • Loading branch information
Alexvozhak committed Aug 4, 2024
commit 2c5c83178c6b6434cb486ff2ef2eedaf6c94b059
5 changes: 3 additions & 2 deletions diffyscan/utils/binary_verifier.py
tamtamchik marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -24,8 +24,9 @@ def get_compiler_info(platform, required_compiler_version):
return required_build_info

def delete_compilers():
shutil.rmtree(SOLC_DIR)
logger.okay(f"{SOLC_DIR} deleted")
if os.path.exists(SOLC_DIR):
shutil.rmtree(SOLC_DIR)
logger.okay(f"{SOLC_DIR} deleted")

def download_compiler(platform, build_info, destination_path):
compiler_url = (