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

Loading player…

đź›  Identity in Your Apps - ETHGlobal London 2024

ETHGlobalWed, Oct 9, 2024, 12:00 AM

Join Luc van Kampen from ENS for a workshop titled, “Identity in Your Apps.” Learn all about ENS (Ethereum Name Service), the decentralized naming protocol used by MetaMask, Coinbase, Uniswap, and thousands more. The workshop will cover: What it is - How it works - Some ideas for what you can build - Latest developer tooling to help you during the hackathon This workshop took place at ETHGlobal London 2024, a 3-day hackathon held at the Truman Brewery in London from March 15 to 17, 2024. The event brought together the most skilled web3 developers, designers and product builders from all around the globe for a weekend-long adventure to advance the Ethereum ecosystem! ----------------- Follow us: https://x.com/ethglobal Check us out: https://ethglobal.co​m Email us at: hello@ethglobal.com

Transcript

[Music] there we go so web three identity ens um I had too much caffeine so my apologies in advance if I go a little too fast but I'm sure it'll be okay raise your hand there if you have an NS name awesome that's what we like to see hopefully we can get that to like near 100% sometime soon but you know we'll get there so quick agenda in no particular order uh of what to expect because most talks have an agenda um it doesn't really matter what I'm going to cover what ens is top level domains web three identity developers developers developers our new documentation and obviously some cool stuff about the en cards we're not printing them here I'm sorry but um you know that's life so what's enss super simple ens is a decentralized permissionless naming protocol that lives on ethereum and skills to the entire internet and what that essentially means is that IM zx225 f13 712 13 c35 otherwise known as Luke Dudi which in my opinion is a whole lot neater and nicely fits on a card um so where traditional DNS would help us convert google.com to an IP address ens allows us to take human readable names and turn them into machine readable identifiers such as crypto addresses Bitcoin addresses and much more anywhere you can write an ens address or an address a crypto address or anything of the sorts you should be able to write the NS so in this case this is an etherscan example let's be real wants to see this and everyone wants to see it name I went too far away from the mic didn't I here's some more examples in your favorite application your favorite wallet your favorite dap you just type in the name and then it resolves to some address and then you can send some funds you can interact or you can chat with your friends same story in the top right of almost every dap you've ever used ens is the primary way of doing identity in every web3 application we are trustless we're decentralized and we're on ethereum mainnet as well as on a ton of other applications and a ton of other subdomain systems and gateways and much more this is a snapshot of the ens manager .a or appdomains so why why why care I I care because ens is fun it's cool it's portable it's extensible it's multi-chain it's a public good it's decentralized and it improves crypto ux and it's just a super cool public good I mean what more do you want um so ens aims to extend DNS and with that we aim to extend doxyz and much much more so if you have AIO axyz a finance aash or anything of the sorts it'll work within ens and any of the other 2000 some OD DNS SEC top level domains that for some reason I happen to know most of because I've spent too much time in this space so how how does enss work super simple ens uses a resolution process and that's all we are we are just how to look something up and you're in charge of the rest tldr smart contract go bur the way that works is super simple I'm going to give an example don't get too scared I'm not going to go super in depth just kidding I am and we we'll get there but I'll spare you most of the details so the way it works is super simple I'm Luke dth here's how we see it in an application and every name has a resolver in this case the resolver is a smart contract that's responsible for my name so when I look up luke. eth I get some information from this smart contract that we call the resolver and it tells you everything you need to know about the name the way that works is super simple there's a smart contract on ethereum maget called the registry anytime we do a lookup we say hey Reg who's Luke eth and the registry will say oh I know eth it's done by that smart contract and then it goes to another smart contract so in the same way that with DNS we have a hierarchy of DNS servers we have a DNS SEC chain of trust we have an SSL chain of trust and certificates in that way we have ethereum Smart contracts referencing each other and keeping links to one another so we've got the eth registry amazing there are also theom one there's an XYZ one and there's custom ones for some of the tlds most of them use the DNS registry one but I'm going to be focusing on eth specifically so the do eth registry has another table that it keeps track of of all of the do eth names in this case Luke Greg and Makoto and a ton more as well as the contract responsible for each and in my case that's the public resolver which is this lovely contract and here comes the cool part that contract right there you have the ability to change because if you own luke. eth you control what contract is in charge of resolution and what this means is that you can write your magic in a smart contract and say I want subdomains I want profile picture depending on the day of the week I want a funny username I want whatever and it will magically work so there's this lovely long EIP 137 that introduced ens it defines how a resolver works it doesn't really matter the long story short is there's addr name ABI Pub Key and like 10 more and the way it works is super simple you write your contract you add an ADR function anytime somebody does a name lookup using your contract the name gets inputed as a variable and in this case I was the stubborn developer and I hardcoded in my own address because all your money should go to me I'm kidding I'm I'm kidding um sweet so here's our lovely function and it returns zx225 f13 712 134 yeah whatever there's also the text function that allows you to return any text record so if you're interested in someone's Avatar someone's header someone's Banner someone's twitter I don't know anything else it can return it as well this can obviously be way better and way cooler than hard-coded right now this is a call lookup and it just returns some hardcoded data but you could load it from an nft collection you could load it from a governance governance scheme you could load it from particip bills you can do all sort of cool stuff and load it from places this could be whatever you can imagine okay we did the most part just kidding we're going to keep going thank you for not leaving um what about subnames so are you ready take a deep breath here we go super simple here's luke.

eth again hello. luke. eth in this case we go out to the enss registry Hey where's hello. luke. eth oh I know this eth registry thing that has this resolver thing that has this magic amazing we do our lookup our magical code runs it looks up hello.

luke. eth and it says I would like the Avatar and the address please our code does some magic GG easy next that was it now you know how to build a subdomain registar how to give out subnames how to set records how to do Dynamic things and much much more so super simple you bring the resolver we bring the resolution and that's it we're an open protocol and anybody can build one very nice so you thought that was over no no no no no there's way more cool stuff text records text records Let Us store anything you can imagine no longer are we just storing a Bitcoin address a Litecoin address a Dogecoin address Dogecoin address a Dogecoin address a Dogecoin I mean a Dogecoin address and a bunch of eth addresses optimism addresses arbitr addresses much much more but we can store any arbitrary text value this could be a verifiable credential this could be proof that you're over 21 this could be your profile picture this could be you name it your pronouns you put them there it's that one right there the Avatar one remember that sweet there's a ton of them that standardized but you could technically speaking use whatever you want and so long as apps want to load the information and care they can do so obviously we recommend you write a standard so that everybody can build tooling and everybody can enjoy but you're more than welcome to make up your own records as you go a couple example of some cool records are the display record in case your name is multiple phrase multiple syllables long or something along those lines you'd like custom capitalization um the Avatar record to set your avatar this can be an ipfs Hash a swarm hash an R weave Hash a uname name it anything anything of the sorts or just a link to your Twitter profile picture um a description keywords email you name it you can put it in ANS name sweet another cool one is for example the dm3 profile you can store info about where to people can reach out to you where people can encrypt messages with and much more the header so you can store a banner image the time zone because everybody should be in UTC come on guys what is this no I'm joking but um the time zone so you can store your time zone um whatever other thing you can imagine a CK proof for age or anything of the sorts a color scheme but light mode should be the only option but whatever some people disagree um com. Twitter your Twitter username com. GitHub your GitHub username telegram basically whatever you want your app. hello got it cool sweet so where can I get one where can I use them identity ens on the enss app will show all your records nicely as well as on any other app you can imagine so here's some of my beautiful records here's a screenshot of snapshot so let's say you're dealing with governance nobody wants to see 0 x225 f13 712 blah blah blah blah blah blah voting yes or no everyone wants to see names because names are nice and names are human readable and names give us identity immutable records Unis swap is phenomenal and they use subnames to be able to keep track of where deployments are on certain chains Unis swap uses ens names for copyrights chain link uses subdomains to be able to keep track of data sources so if you want to get the usdc eth price on mainnet you can just look up the chain link name decentralized protocols such as forecast or letting you s a profile picture and an avatar and a name web three messaging like coinbase with XMP as well as many others and just letting users enter names any text box a user can enter an address a user should be able to enter a name because it's so much easier to claim a poop to luke.

eth than it is to claim a poop to zerox okay I'll stop I'm sorry oh what did I do all right it's really that simple so you want one I get it if you want a d e second layer uh Luke d e Anthony D Etc you can go to .a and it'll be $5 a year worth of eth plus some gas fees we understand this might be high so there's many other options Unis swap is one of these they issue subnames using the Unis swap wallet coinbase is one of these if you want to cb. ID they use the coinbase wallet anybody that uses the coinbase wallet completely for free can enter in their information request a name and get a subname from coinbase and this you uses that same resolver logic I showed you before and it doesn't require anything else Argent with Argent xyc lens with lens. xyc GoDaddy recently added a tab where any web2 domain yourcash your Finance your fi your NL your co.uk you name it you go to the web 3 tab you enable it you type in your address and it magically works completely for free instantaneously or any other DNS provider um the steps there are one extra step you enable DNS SEC and you set the text record easy want to build your own naming system do it Implement ens and work everywhere not just in in Unis swap not just in a wallet but in any web3 application that supports enss we're an open protocol and anybody can build with it so let's build if you're building on enss super simple we built a design system because I suck at making things look good um so if you scan the QR code you can use pre-built components you don't have to worry about anything it'll look nice it'll work it'll be great I'll give you half a second to scan that don't worry there will be more enjs a library that lets you fetch any kind of information you could imagine when a name expires when it enters grace period and anything else oh sorry here you go don't worry they'll be at the end as well fresh documentation we just revamped our entire documentation so anybody can go to doc.

domains or and the lovely QR code and view our new docs that have dark mode ooh I hear people like that um I don't know I'm a light mode user um new documentation completely Rewritten from scratch containing anything and everything you might want to know about the protocol as well as guides to walk you through issuing subnames easy peasy here's the URL to the guide if this is something you want to build we have a couple hackathon prizes open I think we also have a hackathon uh Bounty set for adding some better support to a couple open Source libraries so if you're not feeling like building something new and you want to work on an existing Library make a contribution to open source and get those lovely green squares on GitHub and a sweet Bounty um we're here for that as well and we're happy to help and that was it or not take my disagrees that was not it but this is the end of my talk thank you for being here and I'll be at the en Booth all weekend so if you have any more questions I'm happy to help uh how about l2s like optimism base like how do you because if you have to pay gas fees on theum every time you want to update a record it's going to be really costly completely understandable so here's the deal ens allows you to store your data anywhere leveraging EIP 3668 don't worry it'll be in the docks otherwise known as ccip read you can load any information from any chain so if a user wants to whoa they could store their information on optimism arbitrum poon you name it we've built the evm Gateway which you'll also find in the docs which allows you to trustless load information from the mentioned um which means that users can now migrate their data and store it on other chains now obviously this is still something we're heavily in development with but at this point in time anybody could build a system that allows them to give out subnames on optimism or give out subnames on polygon or give out subnames completely for free off chain and the way that works is you write a resolver and then in your resolver function where you put that magic you revert with offchain lookup where it should load the data from or you use the evm Gateway right there and then it will load the data and it will work I just want to know does the resolver um the contract that you write does it work for test Nets also yep we've got deployments on heski Gurley uh spolia and I think all the other ones as well but you know testnets have a limited lifespan um but if you want to uh I think we also have a couple faucets that we're linking out to in the doc so if you need some test net tokens you'll be able to test out on there um but yeah all the deployments are on there and uh you can mess around with it for sure okay and the last question you um mentioned yeah very short um you mentioned um uh coinbase and um Unis swap um have a gast experience for um the building subnames yep um and is this um to the point you touched on that you can create your own resol on um l2s so that means they're hooking you up with the um smart wallet um accounts 4 337 is that how it works yep exactly so here's the steps write a contract deploy it to the L2 of your choice and it's super simple most likely if you're working with 43 C7 you'll have a factory contract that creates proxies right and then while you're doing your proxy creation just make sure that in some storage slot in your contract you store some funny name that the user prefers or that's still available and the address of where their contract got deployed to should be super simple to do add some view functions to the contract that allow it to become a resolver and allow it to look up information from that aforementioned storage slot of your choosing and then it will work and then you'll write a contract on mainnet resolver that reverts to Lo load from the L2 and then everything will work and hook up yeah sweet awesome much thank you [Applause] [Music]

Automatic transcript — names and jargon may be misspelled.