-
Notifications
You must be signed in to change notification settings - Fork 23
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
Biconomy Smart Account Integration (CLI) #71
Comments
Been looking into AA a lot lately, so I'd love to tackle this as soon as it's a priority |
can you share example of CLI integration please? Also below maybe relevant on Discord integration issue but.. Would we need this in this case? Why do make AutoTx delegate? just so it appears on safe dashboard for user to sign with main signer/s of the safe? |
this can be done by getting counterfactual SA address for an EOA, with or without biconomy SDK (using ECDSA module address and SA factory address) |
please check here for preparing and sending tx using a bundler. can share individual internal steps from the sdk and help them translate to smart account service. https://github.com/bcnmy/sdk-examples/blob/master/scripts/gasless/mintNFT.ts#L36 imo AutoTx would just prepare the calldata (tx object or array of tx objects) and ask the EOA signer to sign userop hash. also, smart account V2 repo is this one. https://github.com/bcnmy/scw-contracts/tree/develop |
In this first integration we will focus on the CLI. The user must specify an EOA private key they want to use as the root address in control of the smart account. The environment variables will be modified to reflect the following:
SAFE_SMART_ACCOUNT_ADDRESS
&SMART_ACCOUNT_OWNER_PK
. The user must specify one of these to use AutoTx.Once the user private key is set, when AutoTx is run, it will detect if there is an existing smart account created for this address (localstorage). If one does not exist, it will walk the user through smart account deployment on the desired chain:
Now that the smart accounts exists, AutoTx will continue to execute using the smart account's address as the user's address. Upon creating transaction bundles, we must format them accordingly for the bundler to be able to execute. NOTE: we'll need to a an environment variable for the bundler. This is something we can add on the user's behalf to be used by default.
Since the Biconomy SDK is only available in JS/TS, simplest approach would be to run a "smart account service" in a docker container that allows us to interface with the SDK for things like deployment, bundle creation, and bundle submission.
References:
https://www.biconomy.io/smart-accounts
https://www.biconomy.io/post/modular-session-keys
https://github.com/bcnmy/biconomy-client-sdk/tree/main
https://github.com/bcnmy/sdk-examples/blob/master/scripts/index.ts
The text was updated successfully, but these errors were encountered: