Skip to main content

How do I use Enso with a smart wallet?

Use the delegate routing strategy when execution must stay with the smart wallet or retain protocol state. Do not send router approvals unless the response asks for them.

J
Written by Javier Diaz

Use the delegate routing strategy when execution must stay with the smart wallet or retain protocol state at that address. Do not send router approvals unless the response asks for them.

Definition

A smart-wallet integration needs the user’s smart account, not a separate router account, to be the execution context. That keeps protocol ownership and non-tokenized state associated with the wallet that the user already controls.

How it works

  • Set the routing strategy so the supplied fromAddress is the execution context.

  • Put the smart wallet address in fromAddress and have that account submit the returned tx.

  • Skip router-style ERC-20 approvals unless the quote response includes a required approval.

  • Some protocol actions that must retain state at the wallet — including borrow, harvest, and repay — require this execution model.

How Enso does this

Set routingStrategy to delegate on POST https://api.enso.build/api/v1/shortcuts/route or /bundle. Submit tx.to, tx.data, and tx.value unchanged. Use ensowallet-v2 only when the flow should run through the EnsoWallet V2 smart-account client; resolve that address with GET /api/v1/wallet if you need it as an approval target. See Routing Strategies. Compatible smart-wallet integrations are documented there; this article does not name specific wallet products.

FAQ

Can I use the router strategy with a smart wallet?

router is the usual path for an EOA submitting through the Enso router and may need approvals. Use delegate when execution must remain in the smart wallet’s context.

Do I hardcode a delegate contract address?

No. Always use the tx and any spender or approval targets returned in the current response.

Related articles

  • What is a routing strategy?

  • Router vs delegate routing strategies

  • How do I handle token approvals in a routing flow?

  • Should I hardcode Enso contract addresses?

  • What is signer-ready transaction data?

Sources

Did this answer your question?