develop a peanut Safe{Wallet} app #1
Replies: 6 comments 3 replies
-
Sounds cool! So this should be an app that is based on Safe smart contracts, but has a custom UI and integrates peanut, right? What exact features should it have apart from sending tokens via peanut links? Social login? Multisig? Should it be ERC-4337 compatible? Should gas be sponsored for users when creating peanut links? Should this wallet be a web app for desktop, a web app for mobile, a native mobile app, a browser extension, etc.? Is it intended to be a "real wallet" or more of a demonstration for other devs to show how to integrate peanut? |
Beta Was this translation helpful? Give feedback.
-
Sorry @nebolax , just for clarity: This is for building a Peanut app that is a safe app: https://app.safe.global/apps. This should be done by using the scaffolds that safe provides (e.g. react elements) and the peanut SDK. |
Beta Was this translation helpful? Give feedback.
-
Oh, alright, got it! Will read more about Safe apps and will come back with questions about the specs. |
Beta Was this translation helpful? Give feedback.
-
@borcherd any reusable peanut-ui components we could isolate/use for this? So as to have consistent look on the safe app and on peanut-ui |
Beta Was this translation helpful? Give feedback.
-
Peanut Safe appA Safe{Wallet} application that allows users to send tokens via Peanut links in a Safe-native environment. OverviewMain screensThe app has 3 main screens:
Header & Footer
User flowSend screenUser enters the dataWhen the user opens the app for the first time, the Send screen is opened. User's owned tokens and token prices are fetched via Safe's native API. Tokens are fetched and displayed only for the chain on which the user's Safe is deployed on. The user selects the token, enters the amount, etc. (the process is the same as on peanut.to/send) and clicks "Send" button. Once clicked, a Safe transaction is proposed. Once signed, a message that says something like "Execute the safe transaction and come back to the Peanut app on this device" is shown. Background link processingInfo about the generated links is saved in the local storage. What's saved for every link is: user's Safe address, chain id, link password, Safe tx hash. Safe address & chain id need to be stored so that if the user manages multiple Safe accounts on the same device, only relevant Peanut links are shown for every account. Important to keep in mind: The user may propose multiple safe transactions that create Peanut links, may execute them at any time and may reject them. Success screenThen the user returns to the Peanut app. We check if any of the Peanut links stored in the local storage were created (i.e. if the relevant Safe transactions were executed) and if they were:
These links are marked with something like "User was notifed" so that this success screen is displayed only once for every link. So, how do we deal with rejection? We check if any of the Safe transactions awaiting execution were rejected, and if they were, we silently delete the relevant Peanut links from the local storage. DashboardThe user may then go to the dashboard, which works same as peanut.to/dashboard with a few differences. The dashboard contains columns: The status has 3 possible values: |
Beta Was this translation helpful? Give feedback.
-
Nice! This looks like a good overview of what it would look like. Let's now estimate the effort that's needed to make this a thing. You also mentioned that safe apps require audits. That's something we can do too. |
Beta Was this translation helpful? Give feedback.
-
I'd like to start a discussion about the feasibility of this bounty. The next step is to write more detailed specs.
Description and Objective
Develop a fully functional wallet application that seamlessly incorporates elements from the peanut-ui and integrates the peanut-sdk. The app should be compatible with the Safe protocol, ensuring a robust and secure user experience.
Acceptance Criteria
Additional Resources
Beta Was this translation helpful? Give feedback.
All reactions