mirror of
https://github.com/autistic-symposium/web3-starter-py.git
synced 2025-05-17 06:02:12 -04:00
add info for calldata
This commit is contained in:
parent
f0168569fc
commit
b790343dde
2 changed files with 17 additions and 3 deletions
|
@ -60,8 +60,22 @@ poetry run python get_reserve_history_by_block.py
|
|||
#### get deep block data
|
||||
|
||||
1. add info to `.env`
|
||||
3. run
|
||||
`poetry run python get_deep_block_data.py`
|
||||
2. run
|
||||
```
|
||||
cd scripts
|
||||
poetry run python get_deep_block_data.py
|
||||
```
|
||||
|
||||
<br>
|
||||
|
||||
#### decode calldata
|
||||
|
||||
1. add info to `.env`
|
||||
2. run
|
||||
```
|
||||
cd scripts
|
||||
poetry run python decode_calldata.py
|
||||
```
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@ def decode_calldata(data) -> dict:
|
|||
w3 = Web3Wrapper(mode=data['provider_type'],
|
||||
network=data['network'])
|
||||
|
||||
w3.get_pair_contract(address=data['contract_address'), abi=data['abi'))
|
||||
w3.get_pair_contract(address=data['contract_address'], abi=data['abi'])
|
||||
return w3.pair_contract.decode_function_input(data['calldata'])
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue