Skip to content

docs(fireblocks): correct Python SDK shape; EVM CONTRACT_CALL validated live#5

Merged
lexaisnotdead merged 2 commits into
mainfrom
fix/fireblocks-reference-validated
Jul 24, 2026
Merged

docs(fireblocks): correct Python SDK shape; EVM CONTRACT_CALL validated live#5
lexaisnotdead merged 2 commits into
mainfrom
fix/fireblocks-reference-validated

Conversation

@lexaisnotdead

@lexaisnotdead lexaisnotdead commented Jul 24, 2026

Copy link
Copy Markdown
Member

Validated the Fireblocks signing reference against Fireblocks Sandbox (Sepolia / ETH_TEST5) — an unsigned approve/createSwap built by /v1 signs, broadcasts, and lands on-chain (verified the vault→factory USDT allowance was set). Corrections:

  • sign_evm.py used the JS-style PeerType / operation=, which don't exist in the Python fireblocks-sdk (would ImportError/TypeError). Fixed to the Python shape: top-level VAULT_ACCOUNT / ONE_TIME_ADDRESS / CONTRACT_CALL constants + create_transaction(tx_type=…), and load the RSA key from FIREBLOCKS_SECRET_KEY_PATH with api_base_url for sandbox.
  • README: sandbox env block, external-funding steps (a CONTRACT_CALL needs only native gas + the on-chain ERC-20 balance — no custom-asset registration), the Python-vs-JS SDK-shape note, and that the sandbox has Sepolia + BTC signet but not TRON Nile (so TRON stays a documented reference).
  • sign_evm.ts: the JS fireblocks-sdk still exports PeerType/TransactionOperation/TransactionStatus (verified) — code unchanged, docstring updated.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Documentation
    • Updated Fireblocks Sandbox EVM integration examples to reflect successful live validation on Sepolia.
    • Clarified the supported contract-call flow, including transaction signing, broadcasting, and on-chain confirmation.
    • Revised setup instructions and configuration guidance for current Fireblocks SDK usage.

…idated live

Validated the reference against Fireblocks Sandbox (Sepolia / ETH_TEST5): an unsigned
approve/createSwap from /v1 signs, broadcasts, and lands on-chain (allowance set from
the vault). Fixes found + applied:
- Python fireblocks-sdk uses top-level string constants (VAULT_ACCOUNT, ONE_TIME_ADDRESS,
  CONTRACT_CALL) and create_transaction(tx_type=...), NOT PeerType/operation= — the old
  sign_evm.py would have ImportError'd/TypeError'd. Also load the RSA key from
  FIREBLOCKS_SECRET_KEY_PATH + api_base_url for sandbox.
- README: environment block, external-funding steps, the Python-vs-JS SDK shape note,
  and that Fireblocks Sandbox has Sepolia + BTC signet but not TRON Nile.
- The JS sign_evm.ts shape matches the current fireblocks-sdk (verified) — unchanged.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jul 24, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@lexaisnotdead, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 43 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 8398d6ed-c9ca-4949-b165-63f7b41ba380

📥 Commits

Reviewing files that changed from the base of the PR and between 3ac87a3 and 2445b7a.

📒 Files selected for processing (3)
  • examples/fireblocks/README.md
  • examples/fireblocks/sign_evm.py
  • examples/fireblocks/sign_evm.ts
📝 Walkthrough

Walkthrough

The Fireblocks EVM examples now use the current Python SDK contract-call API, updated environment configuration, and peer-path constructors. README and TypeScript documentation state that the Sepolia sandbox flow was live-tested and confirmed on-chain.

Changes

Fireblocks EVM integration

Layer / File(s) Summary
Update SDK configuration and transaction flow
examples/fireblocks/sign_evm.py
The Python example updates SDK imports, environment variables, sandbox defaults, transaction type, and source/destination peer-path construction for CONTRACT_CALL.
Document sandbox validation
examples/fireblocks/README.md, examples/fireblocks/sign_evm.ts
Documentation now states that the Sepolia sandbox approve/createSwap contract-call flow was live-tested and confirmed on-chain.

Estimated code review effort: 2 (Simple) | ~10 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly reflects the main changes: Fireblocks docs updates, Python SDK corrections, and live validation of the EVM CONTRACT_CALL flow.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/fireblocks-reference-validated

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@examples/fireblocks/README.md`:
- Around line 7-10: Update the Fireblocks EVM example flow so it waits for the
approval transaction to reach CONFIRMING or COMPLETED, or for its EVM receipt to
confirm, before returning the transaction hash and submitting createSwap. Locate
the approve/createSwap execution logic and replace any txHash-only completion
check with polling or receipt validation while preserving the existing
transaction submission behavior.
- Around line 12-14: Update the README heading under the sandbox section so
“Environment” uses the appropriate sequential heading level, and annotate its
fenced environment example with the text language tag. Preserve the existing
example contents and surrounding Markdown structure.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 1b0d671b-3ebd-4ef1-894e-78cff569d076

📥 Commits

Reviewing files that changed from the base of the PR and between c54259e and 3ac87a3.

📒 Files selected for processing (3)
  • examples/fireblocks/README.md
  • examples/fireblocks/sign_evm.py
  • examples/fireblocks/sign_evm.ts

Comment thread examples/fireblocks/README.md
Comment thread examples/fireblocks/README.md Outdated
…ME heading/fence

Per review:
- sign_evm.{py,ts}: return the hash only once the tx is CONFIRMING/COMPLETED, not on the
  bare presence of a txHash — so createSwap isn't submitted before the approve is mined
  (its transferFrom needs the on-chain allowance).
- README: 'Environment' heading level ###→## (sequential after the H1); add a 'bash'
  language tag to the env fenced block.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@lexaisnotdead

Copy link
Copy Markdown
Member Author

Both findings verified against current code and applied (commit 2445b7a):

  1. Confirm before the dependent txsign_evm.py / sign_evm.ts now return the hash only once the tx reaches CONFIRMING or COMPLETED, not on the bare presence of a txHash. This prevents submitting createSwap before the approve is mined (its transferFrom needs the allowance on-chain). Matches the observed sandbox behaviour (the validated run reached CONFIRMING with a hash) and is verified to exist in both SDK enums.
  2. READMEEnvironment heading ##### (sequential after the H1), and the env fenced block now carries a bash language tag. Contents unchanged.

@lexaisnotdead
lexaisnotdead merged commit 91adad6 into main Jul 24, 2026
5 checks passed
@lexaisnotdead
lexaisnotdead deleted the fix/fireblocks-reference-validated branch July 24, 2026 15:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant