Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add 17 unit tests for `FacilitatorWeb3Signer` functional methods in `mechanisms/evm/signers.py`. The existing `test_signer.py` only covered constructor, address property, and protocol surface; the actual behavior of the on-chain methods was untested. New tests cover `get_chain_id` (RPC call + caching), `read_contract` (address checksumming + `{"from": signer.address}` propagation), `verify_typed_data` (EOA happy-path, mismatched address with no contract code, `bytes` nonce normalization without mutating caller's message dict, raw-dict domain for Permit2-style types, and exception swallowing), `write_contract` (build → sign → send raw with checksummed contract address and propagated nonce/gas/gasPrice), `send_transaction` (raw tx build with checksummed `to`, account signing, hex tx-hash return), `wait_for_transaction_receipt` (status=1 → success, non-1 → failed, missing `0x` prefix normalized in both web3 call and returned receipt), `get_balance` (zero-address → native, empty-string token → native, real token → ERC20 contract path with checksummed addresses), and `get_code` (checksumming + `bytes()` wrapping for both contract and EOA cases).
Loading
Loading