Repository navigation
Port Ethereum transaction management example from v1 to v2 - #149
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…xample Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
truham
commented
Sep 9, 2026
truham
left a comment
Contributor
Author
There was a problem hiding this comment.
Reviewed via Valet. CI is green and the three issues flagged in an earlier pass have all been addressed:
honoured→honoredtypo fixed.revertEntrycyclomatic complexity resolved by extractingrevertDescription.- Duplicated magic number (0.0001 ETH literal) collapsed into a single
selfTransferWeiconstant used by bothsendandswap.
Bonus: padBigInt was upgraded from silent truncation to returning an explicit error on overflow/negative values — good call for calldata that gets signed and broadcast.
A few non-blocking notes below, inline. Nothing here should hold up merge given this is examples-only and was tested end-to-end on Sepolia.
am-hernandez
reviewed
Sep 9, 2026
The swap action's SwapRouter02 and token addresses are Ethereum Sepolia-only, so an overridable TURNKEY_CAIP2 could only ever produce a chain/contract mismatch. The CAIP-2 chain ID now sits in the same const block as those addresses, and TURNKEY_CAIP2 is gone from the config, .env.example and README. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
A transaction can be included and then revert, reporting both a hash and a failure. txResult checked the failure first and returned an empty hash, so the one identifier that lets you look the revert up in an explorer was dropped. The hash is now read first, returned on both paths, and included in the error text — the callers surface only the error. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
am-hernandez
approved these changes
Sep 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary & Motivation
Ports the Ethereum transaction management example from v1 to v2.
Three actions via
ACTION:send(ETH self-transfer)swap(Uniswap V3 ETH → USDC)assetsSponsored via Gas Station by default,
SPONSOR=falsefor non-sponsored.Updated to v2 conventions: env vars +
.env.exampleinstead of flags, flat request structs, revert-chain error rendering, bounded 60s poll. No new dependencies, the Uniswap calldata is ABI-encoded by hand.How I Tested These Changes
Ran end to end against Ethereum Sepolia.
Did you add a changeset?
No, examples-only.