Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 82dcd4115c
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| elif arg_type in ("string", "str"): | ||
| parsed.append(str(value)) | ||
| elif arg_type in ("boolean", "bool"): | ||
| parsed.append(bool(value)) |
There was a problem hiding this comment.
Parse explicit booleans without truthy string coercion
The boolean branch uses bool(value), which turns any non-empty string into True; for example, {"type":"Boolean","value":"false"} is parsed as true. Because _parse_contract_args is shared by invoke/test/batch/estimate tools, callers that pass stringified JSON booleans can silently execute the opposite contract path, including unintended state-changing behavior.
Useful? React with 👍 / 👎.
| elif arg_type == "hash256": | ||
| parsed.append(types.UInt256.from_string(str(value))) | ||
| elif arg_type == "array": | ||
| parsed.append(_parse_contract_args(value)) |
There was a problem hiding this comment.
Preserve empty array args when parsing nested Array values
The Array parser recurses into _parse_contract_args(value), but that helper returns None for empty lists, so { "type": "Array", "value": [] } is emitted as null rather than an empty array. Contracts that distinguish empty arrays from null will return incorrect results or fault, which makes valid calls with empty-list parameters unreliable.
Useful? React with 👍 / 👎.
Summary
_compat.py— idempotent neo-mamba compatibility patches (error handling + timeout)neo_transaction_tools_demo.py— comprehensive demo with read-only and live modesNew Tools (12)
Read-only (5, no private key needed):
Transaction (7, require NEO_PRIVATE_KEY):
Architecture
_compat.pypatches applied once via__init__.pybefore any tool import_do_posterror handling crash + 3s default timeoutsuper(NeoRpcClient, self)causing recursion)