-
Notifications
You must be signed in to change notification settings - Fork 20
[Snyk] Security upgrade web3 from 6.20.4 to 7.15.0 #422
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| hidapi >= 0.7.99.post20 | ||
| web3 >= 4.8 | ||
| web3>=7.15.0 | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🔴 setup.py extras_require still specifies web3>=4.8, inconsistent with updated requirements-optional.txt The PR updates Was this helpful? React with 👍 or 👎 to provide feedback. |
||
| Pillow | ||
| stellar-sdk>=4.0.0,<6.0.0 | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔴 web3>=7.15.0 requirement breaks all Ethereum CLI commands due to removed camelCase APIs
Bumping the
web3minimum version from>=4.8to>=7.15.0makes all web3 API calls in the codebase fail at runtime. web3.py v7 removed the legacy camelCase method names in favor of snake_case. The codebase still uses the old names in multiple places:All broken web3 API call sites
python/src/trezorlib/cli/ethereum.py:393andethereum_onekey.py:323:isConnected()→ removed, nowis_connected()python/src/trezorlib/cli/ethereum.py:428andethereum_onekey.py:349:eth.estimateGas()→ removed, noweth.estimate_gas()python/src/trezorlib/cli/ethereum.py:438andethereum_onekey.py:359:eth.getTransactionCount()→ removed, noweth.get_transaction_count()python/src/trezorlib/cli/ethereum.py:467andethereum_onekey.py:410:eth.gasPrice→ removed, noweth.gas_pricepython/src/trezorlib/cli/ethereum.py:522andethereum_onekey.py:478:eth.sendRawTransaction()→ removed, noweth.send_raw_transaction()python/src/trezorlib/cli/ethereum.py:159andethereum_onekey.py:170:contract.encodeABI()→ removed, nowcontract.encode_abi()Any user who installs
web3>=7.15.0(as now required) and attempts to use the Ethereum signing/transaction commands will getAttributeErrorat runtime. Either the version requirement should be lowered, or all the camelCase method calls need to be updated to snake_case.Prompt for agents
Was this helpful? React with 👍 or 👎 to provide feedback.