AllWalletDevs #5

AllWalletDevs · September 2022 · 22:20

Call 5 of AllWalletDevs, held in September 2022. Wallet developers meet to coordinate on the Ethereum standards and protocol changes that affect their products.

Topics

From AllWalletDevs, hosted by ECH Institute.

Transcript

um so let's skip over the wallet feature demos we can do that at the end if people are still joining um let's talk about the merge anything interesting from the wallet perspective anything you guys um noticed or want to discuss for the people who just joined um open the floor for merge comments if anybody has any if not we can move on to um Sam talking about an EIP governing how wallets manage in browser sessions

within their own app no he's not here all right this is looking like it's going to be a real short meeting this time all right so I guess the only other thing on the agenda before wallet feature demos um uh is the um eip5593 which um a developer from the brave wallet uh

has raised um it's it's kind of a set of guidelines on when and how wallets should inject window.etherium I think it's a great opportunity for wallet developers to coordinate on an EIP and I think you could really use input from you guys which are all experts on the subject so uh again that's 55.93 there's a link in the proposals chat um yeah that's it anybody have any features they want to demo I'll take that as a note uh hi I actually want to do yeah hi I'm new here this is my first time actually

yeah welcome oh could I just share the screen or like how yeah go for it yep so I've been working on creating an SDK for 4337 oh I'm working on uh is my screen visible Yep looks good to me all right so the idea is to allow people to actually be able to create smart contract wallets and support uh like be able to give uh create pay masters and uh sponsor gaskets using eip437 which is the future of wallets all right uh so this is a fair simple I just published

it on NP uh npm I'll be updating this documentation and sharing it so you can easily create your smart contract wallet using any owner uh if you want to bundle some transaction you can bundle transaction like this so this will allow uh our dap developers to actually bundle multiple transactions like approving and then transferring your C20 tokens uh then if let's say you want to have cashless then we are working on that as well where you can just attach your paymaster here to the smart contract wallet and once you have done it will start sponsoring the gas fees uh so this is what I've been doing I have uh I have actually uh deployed a demo today so you once you connect the wallet uh it will show you that hey this is the owner

this is on getting disconnect right now oh so this is the owner so I'm the owner actually then you can you'll get your smart contract wallet address uh you'll get a deployment status you can definitely do balance so I have created a small app where you can actually test transaction bundle transaction and sponsor test sponsor transaction uh I will be sharing the SDK and the docs with everyone soon uh so I think this is what I wanted to wanted to show everyone what I've been doing that's really cool that's exciting so I I may have missed it but how does the where's the re this is for four three three seven right so what implements the relayer for this currently I'm using the Infinity uh

bundler which is okay I'll be deployed like which is still in beta phase so I'm using this uh I'm using mostly this plus the a uh the normal construction Library ideas upon this then I'll be adding multiple uh smart contract wallets and allow users to actually create new smart contract wallets and also sponsor gas fees so the idea started with sponsoring gas fees uh and currently it is uh changed like changed or or I would say uh progressed into whoever wants to create a smart contract

for it can do it easily cool what uh what license is this available under it is under uh MIT license so it will be nice you know is this something we'd want to put in like the um like you want to keep it separate as your own project or do you want to maybe put it into the web 3 well like common wallet um organization uh go ahead sorry about it I think the project is still very early uh the documentation are still spots I think one side to the documentation I think within the next week then I'll probably again reach you out for the further Edition cool perfect

yeah I'm really excited about this this is going to be such a huge step forward and like um user experience yeah I agree totally I agree thank you for the opportunity yeah thanks for coming out it would have been a short meeting otherwise yeah and uh you know we can just open it up for regular chat now unless somebody else wants to talk about uh something in particular but uh yeah we can just hang out for a few minutes or take off that's everything we have scheduled sweet how's it going it's good it's been been busy okay how so um a lot of EIP stuff

yeah like the diamond standard is coming along okay what's that yeah it's like a standard for um composing multiple contracts together behind a single interface like a facade fancy yeah sounds pretty cool um I had a thing that might be interesting um for the ethonline hackathon I've been helping out some hackers work on some projects um and a friend of mine actually uh we had it on our list of like projects to build for hackathons um started working on uh npm package to classify ethers

transactions um yes to classify I think somebody has an open mic Mitch 613 there we go all right um so yeah it's it's essentially uh an npm package that turns any um transaction into a standardized format if that makes sense so obviously you know transactions are different with each wallet and there's um internal transactions there's events there's all sorts of weird stuff but currently it's just limited to transactions

um and the idea is that like uh there's some wallets out there right now that have like super fancy features where if you let's say register any s name it instead of saying the transaction and the contract you interacted with Etc um it shows that but it also shows registered loosemans.eath for example right um so this is also kind of like decodes the transaction into like a human readable oh that's cool yep so it's one npm package that you can like modularly pick and choose which things you want to support um and the idea is you can just give it a list of NF uh or ens of like other modules that are built or you can build your own module and then you can just throw transactions at it and then it

will either output an unknown transaction and give you the data back um where it will tell you exactly what transaction it is and do some fancy typescript magic to like IDE support and all sorts of cool stuff um so how does it work how does it tell what a what a transaction is yeah so it's so that simple um it's literally just doing a for Loop essentially and it's looping through all the modules and then running a uh the modules functions to try and detect whether or not it belongs yeah okay um so something I think would be really exciting to come from this would be and I think it I might be mistaken but it could exist already but a standard way of describing transactions in like Jason I think that exists

somewhere let me see if I can hop in here on my computer and uh do a quick screen share so you can see what I'm talking about oh that'd be great yeah hello I don't think this double thing's gonna work really well can you hear me and is my microphone not absolutely going to kill you I can hear you it sounds good yeah yeah can't see anything though if you're streaming yet okay uh one second let me see if I can do this all right wait that's just gonna give that thank you I'm gonna see if I can share just this

one there we go uh can you see my screen [Music] yep so this is the like GitHub repository um I'm gonna see if I can just copy past some of the code here real quick the Oink and then it should be able to do that and then this would have ethers needed I think is it ethers or either JS no 100 sure I don't know the the long story short is that you should be able to do oh it's The Ether setup code I don't

know um let's just even bingo that's what I was looking for okay so this should allow I don't think that works um modules slash there we go does that do typescript I don't know so the the idea is as follows you essentially you specify the classifier once right um so you say modules and then you can specify Which models you want So currently he supports ens polygon and super fluid so let's say I add uh super fluid as well is this are we going to Auto format

foreign let's see let me quickly add some linting here so it's going to look nice um so essentially the idea is very simple uh you you take any transaction so this could be looping through each list of transactions I think this is registering our organization name on ens I'm not 100 sure um and then you just run the classify function that came from your your Builder up here uh obviously feeding it your your ethers provider so it's just a wrapper on top of ethers basically um so if your library is using there we go is using ethers in the back end then or in the front end or anywhere like that you can use it like this and then the idea is as follows that now you can do data Dot and then you can

look at the type for example uh let's say I did a like switch statement on that um it will autocomplete so you'll see enf polygon super fluid and unknown and then if I decide I want to get like an ens transaction right because I mean why not and then in there I wanted to switch on data action um I can go ahead and say oh in case it isn't approve or commit a reclaim a register or register with configure renew a safe transfer from a transfer firmware I don't know right um so in the event that somebody registers an ens name uh they can you know show this components blah blah blah it's getting mad at me because the

thing and then for polygon it would automatically know that like data.action sorry for using dark lighting by the way let's see if I can do that maybe that's better on your eyes um and then for hello computer has decided to die there we go for polygon it would show the other ones or not I think it's breaking oh it broke it so is this primarily a developer tool then it's purely developer tool yeah like um currently what we're seeing is that a

lot more wallets are are implementing uh fancy like parsing features right um so the ability to see an ens registration or see a transfer using the polygon Bridge like in this case a deposit ether right or a deposit four um but it will like do all sorts of typescript generic magic and automatically use type erroring to figure out when you're inside of the polygon if statement or the quick case or whatever it'll automatically adjust the types and then you'll know that the data can only be in this case a polygon transaction or a subset of the polygon transactions right and you'll know that type will always be polygon so it does all sorts of fancy type narrowing if you hover over this you can see that it's either an ens transaction a polygon transaction or I

think the super fluid one is still glitched but a super fluid transaction or an unknown transaction but say I didn't want to support polygon for some reason I could just remove it and then it would immediately start complaining at me because polygon doesn't exist and it's not a valid type so I can immediately remove it uh typescript will start throwing errors so if you're using typescript in your project it'll be smart about everything um and you can immediately see that now it's either an ens transaction or super fluid transaction and say you don't like super fluid for some reason you can just remove it as well and now it's only an ens transaction or another transaction right so it does fancy typescript magic in the background extra complexity it's purely uh IDE um

integration essentially without needing any extensions or whatever because it's typescript so so could you use this like not as a developer tool like let's say you were writing your own ether scan or something like that and you wanted to show people what a transaction is yeah yes so so the reason um this was initially built is because like a lot of wallets out there are moving to like designing systems like these but obviously it's an absolute pain to maintain a million different modules um and in addition to that obviously every wallet wants to be the best right and that comes with some trade-offs that means that some wallets will be closed Source some wallets will keep this code private in particular

um so with each classify the goal is to just lower the barrier of Entry to make a wallet with such fancy features and to allow any wallet to easily say okay yeah we want to show a custom react component for ens transactions or a custom component for super fluid transactions or whatever um so your transaction history won't just be I talked to this address I called this contract function I did x y and z um it will be you registered in ens name you did this unknown thing but fine we can't classify it uh because you sent money or something and so it will just default to a regular uh entry right so it can make um your wallet history or transaction history a lot more Rich if that makes sense without requiring you to scroll down in the ens docs and figure out what

the freaking deployed addresses on mainnet and what the address is on other chains and how this works and parse it all yourself right so how hard would it be to extract this into a like an English algorithm and a database of transaction signatures can't be that bad because like if we can get to a point where like it doesn't matter what language you do it in if you implement the same algorithm and you have this this like maybe GBL signature database then I think that would make it even easier for wallets to integrate it because they could use like typescript or rust or whatever language they want to use and all share the same database yeah so so the the idea here is that

anybody can just use this npm package um and oh yeah I'm just saying like a lot of like hopefully we expand Beyond just JavaScript and typescript wallets in the future oh yeah for sure for sure um and and hopefully that is the case um I don't think right now uh there are plans to build other stuff because we're addicted to typescript and uh this is our area of expertise um I I believe me if you drop me in a rust code base I'm gonna just sit there and go okay I don't know thank you um but uh I'm I'm sure there there can be other initiatives um or we can turn this into a a Docker container that uh can convert the

e-transaction uh backend wise or stuff like that yeah okay that makes sense cool fuel a database or something like that um and it's over they they have some there's some pretty okay documentation including how to write your own module if you're like you got an nft project or a smart contract project and you want to show it right um and it's licensed under lgpl uh which means that essentially anybody can use it as long as you use it as a library um if you make improvements to it those must be done publicly and must be contributed or uh at least contained the the original Source if that makes sense yeah and this is a hackathon project so I don't know how I'll end up but uh it's

pretty promising can you show the code of one of your modules um yes so they're they're not too fancy at the moment I think um but let's have a quick look the ens one looks like this so essentially this is a these he made separate functions for the base registrar for the reverse registrar Etc but I think the bottom line is just exporting this uh there's a check function and a resolve function that's all you need to basically export the check function just checks if it's not a mainnet return false and then if it's one of the ens addresses uh then return true otherwise return false this is simply just a quick match to see if it's part of ens or not

part of ens and then uh base depending on which address it was interacting with he does different parsing for each right so this way anybody that has their own project such as in this case the ens one which is I think still written by him I don't think we made this um you should be able to to simply just write your own parsing logic here and output it to the user and then uh typescript will magically figure it all out using the the types and then there is a types file that just contains the typescript types uh I think this is a bit too explicit but you can't make it implicitly infer so he can do all sorts of fancy stuff write these

and what's in here uh he's throwing apis in here okay yeah so that's the the NS module let's have a quick look at the super fluid one uh I think he's worked on that a bit as well in the polygon one polygon one yeah so the polygon one as well has a polygon module with check and the resolve logic is all in here and just outputs like that so it's not that bad honestly it's 71 lines and a link to it that's very reasonable yeah um and it also allows I mean there is some documentation here at the bottom on how to write one uh because you have to just implement the is it the check function and the resolve function

um but the the the final idea there is that basically anybody can write their own module or directly like smack it in there you know like I did with the module stuff polygon for example um you could just put it right here or a variable to it or whatever the hell and then um it will run your custom code and do all that fun stuff yeah cool anyhow that's what I had to show I thought it was cool uh if you want I can drop a list in one of the chats somewhere yeah if you want to post a link I'd appreciate it what's everybody else working on

anything interesting wallet related well I guess that's it thanks for coming out everyone and uh we'll see you in about a month hell yeah take care