New Ethereum talks, every Monday. The week's conference uploads by event, in your inbox.

Loading player…

Practical Example of How to Integrate ENS into Your dApp - Makoto Inoue

Ethereum DenverSat, Oct 9, 2021, 12:00 AM

This talk is from ETHDenver & ColoradoJam , the world’s largest Web3 BUIDLathon and Community Gathering. ETHDenver’s content is crypto and blockchain focused. Learn more: ethdenver.com Subscribe to our channel to learn more + connect on Twitter: https://twitter.com/EthereumDenver. Speaker: Makoto Inoue This talk was recorded Saturday, February 6th 2021. ETHDenver 2021’s content themes included DeFi & Money Legos, NFTs & the Creator Economy, ColoradoJam & the Next Frontier of Statehood, Protocols & Interoperability, Open Source & Public Goods, The Ownership Economy & Digital Orgs, Usability Design & Adoption and Legal, Privacy & Identity. Industry experts also weighed in on topics like decentralization, privacy, identity, non-fungible tokens, scaling, governance, diversity, and arts and culture in blockchain technology. The 2021 event was February 5-12 and hosted virtually in 2021 with 5000+ blockchain enthusiasts, developers and community members from 80 countries and 50 U.S. states. 🔴 SUBSCRIBE ETHDenver’s YouTube https://www.youtube.com/channel/UCgz9NU06t_FkT0Py1Vadczw 💡 LEARN ETHDenver’s Official Website https://www.ethdenver.com/ 👋 CONNECT ETHDenver Twitter https://twitter.com/EthereumDenver 📖 READ ETHDenver News on Medium https://medium.com/ethdenver 🛍️ SHOP ETHDenver Official Merchandise bufficorn.com 💬 CHAT Telegram https://t.me/Ethdenver Discord https://discord.gg/AxFmNdCVnU 📱 FOLLOW LinkedIn https://www.linkedin.com/company/ethdenver Instagram https://www.instagram.com/ethdenver/ Facebook https://www.facebook.com/ETHDenver/

Transcript

so we're gonna move uh let's see i guess we've got uh a couple of minutes to kill here so um well gosh you know what if he's here why don't we just bring him on and i'm just gonna jam with him for a minute and just chat with my friend makoto is he here hey can you hear me dude what's up man hey long time no see yeah likewise so you just inherited if you want a few extra minutes i can give it to you or we can just chat about other stuff i think we just chat about all lives and everything you know yeah so what's new uh well i'm in uk and we are in the second thought lockdown yeah it's lasting till end of march i think it's kind of similar everywhere else in the world yeah colorado actually we've reduced our restrictions we're like one of the few i guess but um it didn't help us when it came to getting in person though because everybody is is still kind of doing the same thing yeah but hopefully like i think we are one the fascination which start like you know giving out that all the shot like that boxing so probably by the end of like may june uh most of the like people in uk will be getting it so hopefully we can go to ecc count like you know the one is scheduled in paris they ex i think they postponed from april to july so hopefully we can start you know saying face to face but yeah for for the in the meantime i i think i haven't tried out that you're a bunch of setting you know bachelor london you haven't come out uh three o'clock our time which is like what 10 in okay yeah so i'll just like get drunk and uh yeah i'll join hey it's it's evening party time right yeah yeah um yeah you have to come check that out yeah i think what once my slide is done like i'm all about like you know i can get drunk and uh yeah once you get done with the presentation you'll be ready to go right yes so you're presenting on ens right yes yes you see of course yeah of course well our official um community account for east denver is buffakorn.eth oh nice nice nice well of course i mean what else what else would it be right yeah yeah that's great yeah do you have like east link website as well with ipfs and all that stuff uh we haven't done all of that yet okay we're we're working on it yeah yeah then then you know watch out my talk oh come on i'm actually going to watch your talk so i'm looking forward to it so don't forget to uh participate in the poe app um oh yeah yeah uh what's the pop up the poep game it's so if you go to e denver dot co app.xyz yeah there's about 60 collectible co-apps that you can do that you can receive for doing various things in the virtual castle okay going to sponsor booze and collecting little collectibles and doing all these things so nice nice and you can actually earn the like the buffer corn and the spork marmot skins when you go in there you'll see like a few people running around that have already earned a bunch of it's yeah it's crazy i remember back in 2019 that like i was there when like patricia made the you know pull up and we did a fast event what was it yeah yeah so we had a casa bodita we actually went there is it still there is it not like you know it is it has been but i'm not sure with the pandemic i haven't heard much about it but like the divers and the so for everybody that doesn't know what that is casa bonita's this like iconic restaurant that got made really famous from south park um on the cartoon so like when people come to town it's the worst food in town but it's it's it's a meme it's a meme it's totally like a meme restaurant so you have to do it if you come yeah anyway i think we're on schedule now so you ready to go yeah so do i start uh present we're gonna uh if you have your presenting up then we'll go ahead and share it for you there it is you are ready to go okay so can you see my slide okay can you guys hear me or yeah okay i'll assume you can hear me so uh let's start okay hi uh i'm makoto i'm a dev ethereum name service and i'm i'm very excited to present about uns today and so today's agenda is i say it's three but it's actually two the first uh this is not you know this beginning of the hackathon so i'm going to go through ens 101 describing what ena enables ens allows you to do because we've been doing it for like almost three years and then we have been evolving so we go through some basic features and also we can tell you how easy to integrate that some of the feature into your adapt name some keyword is for lookup reverse lookup and ens plus ibfs and once that's done uh i'll gonna kind of dive a bit deeper deeper to go how kind of hacky and s and kind of uh extend and the key so i'm gonna go through the basic uh uh architecture but key what is a resolver and that i'm also going to uh kind of briefly discuss how this resolver architecture will potentially enable us to integrate us by sl2 integration solution which probably everybody is talking right now like it was a high gas price like you know yesterday it was like over 300 quiet and then i can't do anything now like uh yeah doing anything with cns also cost like 50 dollars so it's super expensive so this is very important and just optionally that like some of you may know that like ens you can kind of issue sub domain and if he wants to know how to do it i'll just put a slider as a pointer and then after i finish this uh talk i'll upload that and do somewhere so you can just use as a reference point but all said uh pretty much everything should be in our uh i think url is a bit uh yeah doc cns domains if you go there most of the technical document is there and also you can join our discord channel and they ask questions i'll i'll probably be there in like european time zone and nick is in the other time zone he's in new zealand nick johnson is a you know creator of enos and that yeah also another good news of like anyone interested in putting a bit of enos magic into your adapt it's like a fast like most of the time like you know it's quite hard to get up to speed with any new sdk but good news it's more so popular like you know web 3 libraries web 3.js eso js python java go galleon they actually have enos already supported so chances are if you want to do basic stuff you don't even need to know our own js library called ensjs but if you want to go a bit more deeper you might want to use our library as well okay so first chapter is ens101 and the basic iteration so i hope everybody do know the very basic thing about what ems can do is that like you know hey this is my like exam address 0x583a4 which i still don't remember the whole you know hexadecimal but like if i say my dot is like i can immediately remember and i can actually you know copy and paste that into metamask or esa scan anywhere it resolved and to do that in the uh yeah in the javascript it's very easy like ens get address so i think if you uh instantiate webs in case of wave 3js uh web 3 have like you know some name name space like a uto or something and it has like a web3 dot ens then you can do get address that's easy and because well thanks to you know being very easy that also help you to integrate quite a lot and ens is basically just a you know name service key value store so on its own it's very simple and it can't be it can only be useful uh depending on how many other wallets exchanges and adapts integrate with our services so thanks to everybody's apple we now have over 170 uh integration across like many different like d5 to like you know browser to everything so that's great and so second step is that uh so for lookup is like if you give you a es name you get your same address but you can do the reverse that you give the same uicm address to gap which you always always do you know when you connect to a uni swap and you connect to wallet basically you you're giving the information about your htm address then if you have the vivos lookup set set like how you do is like you we if you go you know by egh name uh and if you click your icm address uh you can select set the uh name to your address and so by doing that like if you look into actually yeah even in our ends page if you see the top left it says motherboard yes if you go to uh unison you can also see my document.this and it's quite good like i assume that you know everybody has more than one or two same addresses and you don't want to make mistake thinking but i mean this address and it's actually not you know so like this is very useful one thing uh yeah doing that is also very easy this is example for esa's js and the esa you do like provider.

lookup address and if you pass the acm address it just returns a name it's pretty easy uh one caveat to the reverse lookup is that that like to set you basically i can set my exam address to resolve to vitalik.s if i want to no one can stop it at the smart control level so at that level it's important to do the kind of bi-directional check that like when you for example in this ens app like i'm actually checking when you send a reverse record i'm only showing you the names which you already set uh your address to the ends name you know so unless it's set on the both direction it you can't really be trusted right and then luckily if you use this as js you suggest automatically do that check already so you know like it's one easy way to integrate and so for ets kind of started like we can't provide like not just eth but like you know xyz or now we're going to integrate with dns so if you have a genius domain name uh you can have enos name like you know mataokun.com or xyz but eth can signify that like you know you you live in that kind of egm world so like a like italic stuff but in profile almost started using the identity and start taking its own life right and there's loads of people so one single we started noticing that people you know it's hard to uh sorry it's sometimes it's hard to remember when to renew because if you don't renew it gets released so you know we can start we started right one that my hack is like you know we wrote a twitter book like you know that like we look into the graph libya we have extensive uh the graphs uh subgraph uh you can check and then so we check like based on the the graph we'll check like whose name is getting like expire or released and just before like a week week ago and 24 hours ago we start like noticing no notifying people and we at least you know uh save a few like islamic celebrities from losing our icm name uh another funny easter is a soldier boy a guy called mike who i think who is he was the rainbow wallet he's massive found soldier boy and then he has soldier boy his name for like almost two years and one day he he told soldier boy like hey i'll give you like you know socialboy.east and but unfortunately soulja boy was still new to ethereum so he didn't want the novice mistake of giving him to the coinbase for that so that now uh this is showing that like you know uh once you transfer the ownership to the custodian what the proper people already know like you're saying one or one that you know not not you all that wallet not your coin right so now it's got stuck his name is stuck in a uh coinbase land and which i think we are in a rescue mission but another thing if you think about it is like eda's name is also nft so this all saga is permanently recorded and uh blockchain that like you know he held a yes name for like almost two years and only week ago he he gave it to the infamous five six a4 uh custodian account uh i'm hoping uh yeah coinbase people can do something but more important thing is i would wish coinbase exchange starts supporting nft which gonna be that you know uh up and coming new digital assets so like i think people would want to in exchange want to manage uh nfd once that's enabled actually soldier boy can recover his ens i wish okay so yeah last bit of the basic section is the ipf sets and the ens integration that so our app is hosted on the app ens.domains but we also have the ipfs decentralized version on that hosted on yeah on ipfs and by default if you use a wallet like a th supported browser like opera status browser and even with metamask extension you can resolve our site with enss but for all other browsers like you know chrome or normal apple safari we have a dns extended version so that it falls back to do eth link so that in this example you can see that like app ens is linked unit swap is linked and also we have a kind of search engine for this and so called web decentralized web called almond where you can kind of type and you it shows you all the examples and this is getting quite popular thing so if you are you know submitting your hack uh thing it would be nice that if you say hey check out my burberry install link and how you do is uh quite it's getting quite easy that uh basically again you know not just setting ecm address there's a things called content hash so you put the ipfs content id there and the to upload uh file your file to ipfs you can use subs like temporal and ipfs but the one we use to manage our rpns domain is a cyclic which is a continuous integration size so like they do every time they uh we merge our a branch to master they automatically deploy so it's one less hassle to manage all the decentralized thing and then i just uh published the blog post of how exactly do it so if you're interested in this section uh just read it uh one caveat is that you have to set that on the mainnet uh not on the test net and the yeah i mean it's quite high gas so which leads into the uh second part of hacking enos i think i i'm doing well so let me just take a break and then just have a coffee [Applause] okay i'm ready now so so architectural ens is actually very very simple so we have something called registry which is a that uh smart contract which you interact with when you're like you know looking up uh yeah like most wallet and exchanges uh ask name uh address to the name let's register it's just a key value store where like a key is a serum name and uh it returns a value but instead of returning the actual uicm address what it becomes is another smart contract called resolver and so once you first ask registry uh give me the resolver which holds the information about my.

is and then yeah this is a fortune yeah resolver uh give me the resolver sorry registry give me the resolver uh smart contract address over through dot ace and he returns okay this is dx1234 and now uh on the client side it's all hidden so in the javascript library but i get uh javascript says hey resolver what's the actual ecma address of uh who does is and that we done so it's kind of two steps even though in the javascript it looks like one call and what is cool is that probably another like uh same one line is that like a smart contract is immutable so if he wants to extend and add a new feature uh you have to redeploy the entire contract then it's quite high maintenance for the old app to re-point the smartphone address now yes there's a you know proxy uh pattern all the stuff but ens was like invented back in 2017 where now these things existed so uh this is a kind of very simple but elegant ways to let people to upgrade and also resolver is part domain name we have something called public resolver which majority of people points to so people most people are using same resolver but as we upgrade we are moving to the different resolvers uh so one of the primary uh yeah uh yeah one more primary example but how we extend it is like a uh additional so-called multi-coin rather than just say get address to be done the same address we now support like over 100 different uh coin types so you can say give you know send send bitcoin to bluntly.east apparently he has like you know like ultimate like all coin collector maybe i don't know if this is actually his address but yeah he has loads of his uh you know uh coin addresses which you can all manage with one exam address and this is actually added about two years ago and uh what you do now and yeah because of that like i think if you go to web three i quickly checked the esl js and the web 3.js and it doesn't look like they expose a new uh coin type so in the if you want to take advantage of this feature you might want to actually use ensgs which is our own library but like example is like you know for so if i'm the my token is hey um what is the address of btc this is kind of basic syntax which is again it's very easy and another hacking example which actually done by during the east new york hackathon back in 2019 is that uh yeah one team uh extended content hash which we mentioned about like you know uh adding support for ibfs to add uh onion so onion is a kind of privacy oriented browser or something they also have a hexadecimal so they i just added it and again you can do it without asking us to do the support which is the power of ens like you can kind of extends extend very easily and this now this leads to the you know l2 bits which i briefly mentioned is that so back in october uh bitalic made a famous possible general public purpose layer 2 uh support uh basically the gist is probably most people read it but like the gist is like you know uh roll ups will be will be there to stay so uh we should start thinking about ways to support uh they are three as part of this year you know 1.5 and that will so a lot of uh problem scaling issues and he also presented a kind of uh yeah general purpose not just for the specific chain or in the role of solution can we talk about something generic and he yeah he presented one approach which inspired us to uh kind of look into it so after that we probably had like two or three different meetings and then the video is all on youtube and you can check it that and we had we invited lots of uh l2 players our off-chain labs optimism and also the wallet providers and we did a lot of brainstorming and we added a few new uh thinking that before i think italics suggested to have kind of bonding and the staking mechanism just to manage that but like we kind of added new things about like oh maybe we should use a trust assumption on the l2 itself itself.com so it kind of evolved again it's all in our uh forum discuss enes.

domains and uh yeah i put the blog post underneath but just again we are utilizing uh resolver that currently results uh enos is two step you false ask registry to return resolver and you ask resolver to return address but now what we are trying to think is rather than reserve a returning address why don't we solve like resolver returns a so-called gateway url which is just like a web services and that once client get the gateway url i gave my url ask l2 and they get the data and the user data as a proof and then let l1 to verify so like it becomes a three step and what's good about it is it's kind of obtained that like each name domain so for example i have madokundo is i can permissionlessly decide to choose which resolver to point to and which which like l2 to connect to so i have a i have a uh choice to decide which cell to go to go which is great because ens is a kind of infrastructure for the entire ecosystem so we don't want to pick just one winner right uh especially this year like you know when so many different great solutions coming so we want to walk with kind of generic way yet uh another thing i think i mentioned ah i didn't mention is that like at the same time i don't want that to end the user to you know every time uh oh this motorcycle is in uh optimism so now i have to repoint like my metamask all the stuff to optimism to just reference so we want it from the l1 when you're reading the data the reader doesn't have to think about which which layer 2 social is connecting to when it comes to writing it a user has to securely have to connect to uh the specific layer too which is still quite like on user body nightmare but what we are thinking is this kind of shifts from ens model to currently everybody has our own e s names but it's getting very expensive but what we are aiming is the more that integrate with cns and the more that have their own ethereum its names and they once if you they start transitioning to their own uh you know under you for example unit swap unit swap may go to optimism and if all unit swap decides to issue some domain and another thing we are thinking about doing is that we are trying to integrate with some sort of wild card so like we sell uh registry uh sorry the uni swap to each creates a new uh subdomain one by one we might wanna allow some subdomain logic as wildcard logic so that uh the parent domain of unit swap can assign a username without actually creating the record on l1 so that means like basically people don't have to pay gas to have their own username you know they can you can do it all down but as long as unisop if uniswap decides to use optimism and they give issue sub domain the user shouldn't have problem going to uh the optimism right then but when they have this subdomain when they give to your friend who might be using i don't know diy dx or something which is in a different stock way you don't want that person to point to optimism so from the read side we want to provide a solution that we stop and the user switching the network you can get the ens name so that's the kind of name and again by using the flexible design resolver i think we can do it and yeah one thing i think you have to mention is uh yeah one key is so we don't want gateway to be another kind of trusted thing so we wanted to inherit the trusted uh trust assumption of the l2 so if you go to like a what was it uh no dk roll up you want to use the uh trust assumption of the ck roll up if you're gonna use optimistic roll up you want to use the truss assumption uh you know opportunities roll up if you then i still have a very limited knowledge of the l2 and the roll-up in general but what i understand is that in many of the role of contra because they rely the security to l1 they have a ways to verify their state means if we move the resolver into l2 if you take the some proof of the data sets of the l2 you can construct proof and you can verify and this is one example i see probably halfway understood is using the uh optimism and they have a ways to kind of verify the state root proof and the storage uh so most of have something similar i'm kind of we're still kind of researching if something like plasma state have something similar but we shouldn't have to constrain to just this approach that if a different chain or like for example you know x dire p o a if they have completely different trust assumption which might be you know less how to say for for example x style poa some people says like it's trust is limited to these body data but that's fine as long as this you know if i am in for example uh which that exists uh yeah honey honey swap like you know some units yeah some if if the dap is in x die and if they decided to uh move their resolver into the x die they trust their trust assumption model so maybe one way is like rather than be able to verify the data maybe we can just verify who signs uh you know uh the proof so as long as you can sign verify who signed it rather than which data maybe that could be okay so that kind of like a different way of trust assumption uh using that that could be still we are discussing but like you know i it's still open space so we have a lot of ways to explore and yeah there's a one uh prototype nick created a couple weeks ago uh is in uh url so you can take a look and so this option three uh yeah i'll skip completely but the gist is like yeah something like authoriam or argent uh they are issuing a sub domain to their user just like you know gmail address so you could use that but again with a high gas uh i think rj stopped issuing some domain but like if this you know layer 2 solution and with the wild card this one might come up but if you want to pay gas for the user or user still wants to you know have these domains uh there's some point down here okay so all of this yes this is the most important information of the all the links uh i touched upon and again uh if you have any questions uh join our discord uh which is in the second link and there uh you know ask questions freely uh thank you very much makoto great job you know there's actually quite a bit of comments in the chat on twitch that says it's our makoto our favorite dab for cns we love it in fact you know it's interesting because like i've i've heard a lot of people be critical in this because of well it kind of takes away some of the privacy you know makes it really obvious to like where to look but at the same time like it's such an important component to making usability for ethereum and bringing it to everybody so excellent work um we love it so thank you so much you're right thank you i will see you in gamerjab and we're going to have a virtual beer later yeah okay yeah i'll get drunk now okay take care

Automatic transcript — names and jargon may be misspelled.