Closed YoshihitoAso closed 5 months ago
Upgrade web3 python to v7 beta.
Ref: Migration guide
Doc: None(?)
The return value of the function changes as follows:
v6
>>> hex_test = HexBytes("0x") >>> hex_test.hex() '0x'
v7
>>> hex_test = HexBytes("0x") >>> hex_test.hex() '' >>> hex_test.to_0x_hex() '0x'
The parameter names of get_logs is changed.
get_logs
fromBlock
from_block
toBlock
to_block
Doc: https://web3py.readthedocs.io/en/v7.0.0-beta.6/migration.html#remaining-camelcase-snake-case-updates
Doc: https://web3py.readthedocs.io/en/v7.0.0-beta.6/migration.html#middleware-renaming-and-removals
Implementation changes
Doc: https://web3py.readthedocs.io/en/v7.0.0-beta.6/middleware.html#creating-custom-middleware
In v6, there is an issue where unnecessary memory space is allocated when importing ABIEventFunctionNotFound. Upgrading to v7 will resolve this issue.
v6: indexer_Transfer.py
v7: indexer_Transfer.py
Upgrade web3 python to v7 beta.
Ref: Migration guide
1. hex() -> to_0x_hex()
Doc: None(?)
The return value of the function changes as follows:
v6
v7
2. (get_logs) fromBlock -> from_block, toBlock -> to_block
The parameter names of
get_logs
is changed.fromBlock
->from_block
toBlock
->to_block
.Doc: https://web3py.readthedocs.io/en/v7.0.0-beta.6/migration.html#remaining-camelcase-snake-case-updates
3. geth_poa_middleware, async_geth_poa_middleware -> ExtraDataToPOAMiddleware
Doc: https://web3py.readthedocs.io/en/v7.0.0-beta.6/migration.html#middleware-renaming-and-removals
4. The way to implement CustomMiddleware has changed
Implementation changes
Doc: https://web3py.readthedocs.io/en/v7.0.0-beta.6/middleware.html#creating-custom-middleware
5. Performance improvement
In v6, there is an issue where unnecessary memory space is allocated when importing ABIEventFunctionNotFound. Upgrading to v7 will resolve this issue.
v6: indexer_Transfer.py
v7: indexer_Transfer.py
6. Misc