Skip to content

Fix/send native counterfactual wallet#56

Closed
AkshatGada wants to merge 5 commits intomainfrom
fix/send-native-counterfactual-wallet
Closed

Fix/send native counterfactual wallet#56
AkshatGada wants to merge 5 commits intomainfrom
fix/send-native-counterfactual-wallet

Conversation

@AkshatGada
Copy link
Collaborator

fix(wallet): detect counterfactual wallet gas simulation failure in send-native

When a smart wallet hasn't been deployed on-chain yet, the Sequence relayer
fails gas simulation with 'Request aborted'. Previously this gave a cryptic
error. Now both fee paths detect simulation failures and surface a clear
actionable message telling the user to fund the wallet with USDC first.

…end-native

When a smart wallet hasn't been deployed on-chain yet, the Sequence relayer
fails gas simulation with 'Request aborted'. Previously this gave a cryptic
error. Now both fee paths detect simulation failures and surface a clear
actionable message telling the user to fund the wallet with USDC first.

Fixes: send-native --broadcast failing with 'Transaction failed: Request aborted'
The Sequence relayer cannot simulate native token transfers via ValueForwarder
against counterfactual (undeployed) smart wallets. Added an eth_getCode check
scoped to send-native (preferNativeFee) that detects this early and surfaces
a clear actionable error. ERC20 sends remain unaffected — the relayer handles
deploy+execute for those.

Tested E2E on fresh counterfactual wallet 0x92ee...859ab:
- send-native blocked with clear error before deployment
- send USDC succeeded and deployed wallet
- send-native succeeded after deployment

### Optional

| Variable | Default |
Copy link
Collaborator

Choose a reason for hiding this comment

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

Any reason why these lines are removed - were they causing issues on the skill?

Choose a reason for hiding this comment

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

Yes

…rfactual wallets

Bump @0xsequence packages from 3.0.0-beta.16 to 3.0.0-beta.17 which includes
fixes for native token sends on undeployed (counterfactual) smart wallets.

Remove the custom eth_getCode check and getFeeTokens fallback from
dapp-client.ts. The SDK now handles counterfactual wallets natively via
the guest executor — routing deploy+execute through getFeeOptions() and
sendTransaction() without custom workarounds.
@AkshatGada AkshatGada closed this Mar 9, 2026
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.

3 participants