Skip to content

Commit

Permalink
Validate bytecode in EthContractService.get_function_sighashes (#192)
Browse files Browse the repository at this point in the history
* Validate bytecode in EthContractService.get_function_sighashes

* Update polygon-etl version in requirements.txt file
  • Loading branch information
medvedev1088 committed Oct 5, 2023
1 parent 7cef054 commit 66e52f5
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion airflow/requirements_airflow.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@

discord-webhook==1.1.0
eth-hash==0.3.3 # Fixes install conflicts issue in Composer
polygon-etl==0.3.7
polygon-etl==0.3.8
web3==5.31.0 # Fixes install conflicts issue in Composer
2 changes: 1 addition & 1 deletion airflow/requirements_parse.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
eth-hash==0.3.3 # Fixes install conflicts issue in Composer
polygon-etl==0.3.7
polygon-etl==0.3.8
web3==5.31.0 # Fixes install conflicts issue in Composer

google-api-core==2.8.1 # matches `composer-2.1.14-airflow-2.5.1`
Expand Down
3 changes: 3 additions & 0 deletions cli/polygonetl/service/eth_contract_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@
class EthContractService:

def get_function_sighashes(self, bytecode):
if not bytecode:
return []

bytecode = clean_bytecode(bytecode)
if bytecode is not None:
evm_code = EvmCode(contract=Contract(bytecode=bytecode), static_analysis=False, dynamic_analysis=False)
Expand Down

0 comments on commit 66e52f5

Please sign in to comment.