-
Notifications
You must be signed in to change notification settings - Fork 81
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Execute send transaction from Viem client #222
Conversation
@carlosfebres hey, thank you for the PR. Could you please describe your use case more and which smart wallets you use? PR makes sense, we need to see if there are any more places we need to use getAction 👀 |
Hey @chybisov! We are using a Kernel wallet to hold the funds, and we want it to use LiFi without using an EOA as a middleware. The changes required to make it work are minimal; this will be very useful for anyone trying LiFi with a smart wallet account. As a rule of thumb, the |
@carlosfebres hey, thank you for getting back and making the PR. I replaced some other wallet actions with |
this sounds amazing! is there a guide/integration example? for our smart account wallet, currently we're pretending to be a multisig, and batch transactions manually I would love to migrate to a cleaner approach. |
@caffeinum Hey, can you please share your use case in more detail and what example you are looking for. This PR adds the ability to execute transactions through LI.FI SDK using smart accounts specific Some docs: https://docs.li.fi/integrate-li.fi-sdk/configure-sdk-providers |
@chybisov sure! We're already using LiFi SDK in our smart wallet app, however currently I have a clunky wrapper-adapter that pretends to be a multisig, to support batching. If smart wallet usecase is the one already supported by SDK, I would love to re-integrate properly. We're using ZeroDev kernel account: "@zerodev/ecdsa-validator": "^5.4.1",
"@zerodev/sdk": "^5.4.9", We also have a group chat in telegram with Li.Fi team – is it best to ask there? |
@caffeinum we can move this discussion to tg, I have the same handle there and you can add me to the group if I'm not yet there 🙂 Looking at their documentation, yes, it should work fine. There is no example for zerodev/sdk as of now, but I'll try to add one in the future. Also, we are almost ready with native batching using Wallet Call API #224 https://eips.ethereum.org/EIPS/eip-5792 |
Summary
To enable execution from more complex wallet clients (e.g. smart wallet account clients), the send transaction Viem function is usually overwritten to handle sending these transactions. Viem currently doesn't support the execution of smart accounts in their default send transaction function.
Viem uses a
getAction
util function to execute a given function on the client or default to Viem's default function, which I believe should be used within the SDK.