Fix access list storage key conversion for deployment transaction signing#427
Fix access list storage key conversion for deployment transaction signing#427abchauditor wants to merge 2 commits into
Conversation
… hex string during comfirmation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is kicking off a free cloud agent to fix this issue. This run is complimentary, but you can enable autofix for all future PRs in the Cursor dashboard.
| for k in entry["storageKeys"] | ||
| ], | ||
| }) | ||
| tx["accessList"] = encoded_access_list |
There was a problem hiding this comment.
Testing path stores hex strings but encoder expects integers
High Severity
The updated _encode_tx_params now calls k.to_bytes(32, "big") on storageKeys, assuming they are integers. However, wake/testing/core.py line 314 still assigns tx["accessList"] = response["accessList"] directly from eth_createAccessList, where storage keys are hex strings. When a test uses accessList="auto" with a non-empty access list, any call through _encode_tx_params (e.g., send_transaction, estimate_gas, send_unsigned_transaction) will raise an AttributeError because str has no .to_bytes() method. The deployment path was correctly updated to convert hex to int, but the testing path was not.


… hex string during comfirmation
Description
When sending transactions with
wake run,eth_createAccessListreturns storage keys as hex strings, but the Rustsign_transactionexpects them as integers.This caused a
TypeError: 'str' object cannot be interpreted as an integeron every transaction with a non-empty access list.Fixed by making hex value integer in python for
AccessListItemin rust, and still make show hex string during comfirmation.Note
Medium Risk
Touches transaction access-list handling across deployment, JSON-RPC encoding, and Rust conversion code; incorrect conversion could lead to malformed signed transactions or misleading confirmation output.
Overview
Fixes
accessListstorageKeysconversion to use consistent 32-byte big-endian encoding/decoding across the stack.Deployment now converts
eth_createAccessListresults (hex strings) into integer storage keys for internal tx building, and the confirmation prompt re-encodes those keys back to 0x-prefixed 32-byte hex for display. JSON-RPC tx param encoding similarly serializesaccessList.storageKeysfrom ints to properly padded hex strings, and the Rusttx_params_access_list_convertswitches from little-endian to big-endian with left-padding when buildingB256keys.Written by Cursor Bugbot for commit ba1a7b2. This will update automatically on new commits. Configure here.