Integrate everything! Data APIs: ERC6551, ERC721, ERC1155, ERC20, Lens, Farcaster, POAP, XMTP, more
ETHGlobal·Mon, Oct 9, 2023, 12:00 AM
Join Jason Goldberg and Rishi Thakkar from Airstack for a workshop titled "Integrate everything! Data APIs: ERC6551, ERC721, ERC1155, ERC20, Lens, Farcaster, POAP, XMTP, more". Learn how to use Airstack APIs to easily query ERC6551, ERC721, ERC1155, ERC20, Lens, Farcaster, POAPs, XMTP, and build integrated composable applications. Airstack is the easiest way to integrate your app with the Ethereum ecosystem. - 6551 Token Bound Accounts - Token Balances - Token Holders - Resolvers: ENS, Farcaster, Lens, XMTP - Social & Identity: Lens, Farcaster, POAP, ENS - Onchain footprints: POAPs, Token Holders - Snapshots: Holders and Balances at specific dates in time Query with 🤖 Airstack AI or use our SDKs or GraphQL! Thank you to everyone who joined us for ETHGlobal Paris 2023! Paris is the city of light and birthplace of many revolutions. Therefore we were thrilled to be back in one of the most buzzing and free-spirited cities in Europe for ETHGlobal Paris 2023. A lot has changed in the European ecosystem since the last time we hosted a hackathon in 2019. ----------------- Follow us: https://twitter.com/ETHGlobal Check us out: https://ethglobal.com Email us at: hello@ethglobal.com
Transcript
foreign [Music] I'm Jason Goldberg founder and CEO of airstack and I'm here with Rishi Tucker I'm one of our senior developers today we're going to give you a overview of airstack Rishi is going to show you how to write some more complex queries I'm going to first provide an overview of the apis that we provide and then I'll show you how you can use our AI engine to write your queries give you a glimpse of our new explorer that we launched yesterday so it's a graphical interface on top of our AI as top of our apis and then I'll head over to Rishi to go into some of the some of the queries um first of all uh we want to make it as easy as possible for you to integrate any web3 on-chain related off-chain data into your apps the whole mission of the company is just make it easier and easier for developers to integrate with the things outside of the wraps so you can focus on your app use our apis to get the data about everything else and so everything we do on our roadmap is all about how do we make it easier and easier so that you don't even have to run any back-end infrastructure if you don't want to to be able to bring data in about your users about the wrong chain activities and things that increase relevance so first I'll just show everyone really quick the apis that we have let me go here so air stack offers a number of apis uh today then just from a company strategy standpoint we decided to go really deep on ethereum and polygons so rather than doing like 10 chains and doing a little bit on each we decided to go really deep on these two chains we also have po-offs and gnosis but really deep out there in the polygon and offering features and API access especially around social and identity that you don't find anywhere else and helping solves very specific use cases and then we'll take all that uh in the coming months to other chains um going on the left hand side we provide apis for tokens erc20 721 1155 every transaction since the Genesis block and new transactions within seconds are coming through our nodes um very strong obviously and also in nfts we also offer resized nft images inside of our API so you don't have to go out to ipfs and fetch images it's all right there in our apis which we'll show you in a second we also are the first and only indexer right now of erc6551 token bound accounts uh rishu will show uh some examples of that and we're thrilled to work with uh this the tokenbound working group um very close to the team there and a lot of developers building on 6551 see huge potential in that and we'd love to work with you if you're thinking about building on 6551 here in Paris um you can also use airstat to get all token balances token transfers of users and then as I said we're especially strong in identity so we have a fully indexed ens ens subdomains and regular EMS domains lens and forecaster when it comes to social co-ops all six and a half million po-offs that have ever been handed to anyone we have inside of airstack and new within seconds and also as of yesterday we also indexed xmtp um and so xmtp you might be familiar with is a messaging protocol enables you to miss a messages from one zero X address to another at airstack is the only way today you can find out who has xmtp so you could query does this forecaster address or this lens or this ens or does the whole who in this co-ops has xmdp so we enable that as well as a benefit with inside of air stack um and the other thing that we do also with related to xmdp that's really interesting is we act as the universal resolver for xmtp right so with xmdp you can message from a Xerox address to another Xerox address but I don't know Rishi Xerox address but I do know his forecaster name and he might know my lens handle and with airstack the messages get through because we help developers resolve those so all you need to know is the name of the person that they have whether it's their ens or their forecast or lens and we help devs resolve that we'll show you in a second and then we have a lot on nft sales and marketplaces um in our apis as well so let me go back here and there we go here so okay so one second sorry let me show you all right um so when you go to air stack the first thing you'll see is that once you run a query and airstack if you want to you can share with the community if you want to really start to jump in and learn about the apis one of the things you can do is just browse queries other people have done so you can see there's a query someone did that has 374 runs and four Forks so I've got all the erc20 721 tokens of co-ops nfts of someone or a bulk check if a Xerox address have xmtp and primary ens I think research can actually show how to write this query today and you can just see also there's by different tags you can see queries that people have done about socials and you can just dive into any one of these and you can see the graphql query that's that that's uh that the user did to get this right um and so I'm just giving an overview we'll walk into some of these and work through some of these in detail in a second but the first thing I want to show you is the cheat codes so the cheat codes is we want everyone obviously to learn our graphql schemas and our apis but you don't you can also get started using our AI engine our AI engine is built with gpd4 we've been working on it for seven months now it's fully trained on the air stack apis it's over 99.9 percent accurate so if anything is in our apis it can help you write the query so I'm going to show you for instance I'm going to show you two queries here first I'm going to pick on my friend Shane Mack who's the CEO of xmtp I'm gonna say show all nfts tokens socials ens and xmtp for Shane mac.e and I'm going to ask the AI to generate this for me pretty complex query I mean this is basically saying nfts across ethereum and polygon tokens across ethereum polygon socials is both far caster and lens uh ens and uh and not even providing a Xerox address or providing a z and S that it's going to resolve and there he goes there's the result um and uh here you can see his forecaster name machine Mac his lens is Shane mac.lens here's other domains that he has here says tokens here you can see we also bring back the images of those tokens um all here in a single pair in response so you can create all sorts of amazing user experiences with this just from a single API call obviously you could also do this in multiple API calls but the AI helps you learn this and just to show you an example here I mentioned we built an explorer that we launched yesterday and this Explorer is a front end to the the apis I'm going to do the exact same query so I'm just going to type in Shane mac.e and there's the results um and the Explorer is designed in a way where this is entirely forkable you can grab sdks for the for this from with the react uh and uh JavaScript and python we have the code is available for the front edge here you can get it from our GitHub and then for any of these queries that you do like the one I just did from the front end Explorer you can also just jump right back into the graphql and get the API so here I'm going to go right back in and get the API for that uh that query right there that made the front end so very easy to learn it either way you can use the AI or you can use the uh the Explorer front end something else I'll show you from the Explorer real quick is we also not just wallet balances but also token holders uh here's an example this is very current this is eth6 there's we have aggregated counts of the token holders you can see the socials how many have ens forecasts or lens pretty impressive actually the 570 people from the 1136 have signed a transactional polygon and got a lens address just clean um and uh here you can see all the token holders and then same thing again if I go to the graphql here you can get that exact query um right there and as I said before you can also see that the images are resized so you can literally just call our apis and get whatever size you need and plug it right into your application so you can build something like uh and explore but you can also do all sorts of other things um and just to show you real quickly in our docs we have a number of different use cases we have specific around tokenbound 6551 has xmtp resolving identities we've also done a lot with contact recommendations so we've done work with with forecaster and with lens and with xmtp to help recommend people that you know based on your on-chain behaviors so people that you send tokens to are sent to you uh you have like nfts in common or something you've been to together we also there's a lens playground we built so happy to share if anyone's interested can show you some of that and lots of other use cases as well that you can dive into in our docs lots of tutorials here as well all right uh over to you Rishi to get into more that was the the fast overview and the breach is going to details thanks Jason hi everyone so let's get started with some pretty interesting queries all right so um for the first one let's try and get all the people that hold the Bob for each CC Paris and let's see what extra information we can get after we get those owners so for that we can use our poab API over here we need to pass the event ID I have that here and we can see the owners and their addresses we can see more things about the event such as which country City yep and let's go right so we got that this is a yeah this is like the Bob event for HCC uh Paris we've got the metadata we have some description associated with it and yeah this is the owner for this particular uh token ID so now uh supposing you met somebody here at uh HCC and you wanted to reach out to them say on xmtp so you can quickly check with xmtp whether they have xmtp enabled or not and let me right so for whomever it is so for example this address xmtp is enabled this act as xmtp is enabled so you can directly reach out to them and we can even get their primary domain as well as their different social handles and voila so for example this user has xmtp enabled here's the ens here's their profiles as well so this is one uh pretty cool query that we have um moving on yeah so for the next one uh let's look in let's look more into erc6551 and um let's try to form a pretty cool query so we have the accounts here so this account represents like the account which is the which the nft is uh owning and let's say we want to get all the it started getting all the uh erc650 phone accounts you can get the address the token address token ID some information about the nft as well all right yeah right so here we have the um right so this is the address of the of the contract deployed this is the address of the nft and like because this is a wallet so we can get other information about it as well like whether it has any ens or any lens accounts and here we have the nft and there's some metadata related to it for Eid so we can take a specific token address and token ID and we can add it into our filters so token enters here and an ID right so um yeah so here we have uh for that particular nft we have the address of the deployed contract and we also have the uh token address of the nft which is owning that account and say we want to get that particu the owner of that nft as well so you basically have the account then the nft and then the owner of that nft so you get the like the true owner of the entire uh sort of uh tree here for that we just need to go into nfts we have token balances and here we get owner and after that we get the addresses yeah so now we get this particular address here so this is the externally owned account which owns uh for this particular token address and this token ID he owns this nft and this nft is what is owning the account so just putting that together uh we have a pretty complex query here and using this there can be ways to get like um for a given a counter a given set of nfts we can get all the um yeah all the ERC 6551 accounts related to that and as well as the owners for it so it could be a way to kind of get the total balance of a particular nft because if you have uh this nft and each erc6551 can hold multiple nfts and those nfts again can have six five five one so you get like a complete tree so yeah we can get that all through our stack and for the last query we can get we I can show you how to use variables so uh rather than entering everything uh in the UI we can just take a bunch of variables here so these are a bunch of addresses uh that I have and I'm building a query now where we can get a given uh owners for each address you can get the ens name as well as their whether they have xmtp enabled or not if you can go through token balance uh how we add a variable in the UI is we select uh the owner and then we just earn this dollar sign here add the variable yeah and here we can just pass addresses get their owner we have their socials domains so let's start by getting there ens names file names and xmtp is enabled right so here you can just uh summarize like we have a array of addresses which we're going to pass as a variable and we're getting all this different information about the these particular addresses right let me add a few more yeah so I didn't get tabular form might be a bit better here so we can see like for this particular address um there's socials so this particular uh user has two socials one is CR which will be on forecaster the other is lens uh the domains which he has he has three yet for a couple of uh at least 10 EMS names here and like this particular address has xmtp enabled so yeah that's really powerful because in a single query um you're able to get um the owners and their uh socials xmtp status as well as their domain information and we can even add token addresses as well here so you can get for a particular nft um all the owners and their particular social handles and other identity fields right yeah um so we'll take questions in a second uh just if you're interested in six five five one definitely recommend reading through the docs that we have on 6551 and also the 6551 Founders are in our Dev chat and they're on standby if anyone needs anyhow deploy your 6551 our team can help somewhat and they they're standing by to help um and in particular in the in our Dev in our Dev docs we also have some some queries you can just kind of like replicate on six five five one one of the very interesting ones is you can just say show the last you know 10 where you need to show all six five five ones either deployed on ethereum or polygon and if you just add in at the end and all the assets in them you'll see the whole tree of every asset the images of the entities that those six five one accounts uh own uh obviously we can go into a lot more we also can answer any questions one-on-one or come to our booth and if you're not in our telegram chat yet please join because our whole team is standing by to answer questions and we have six minutes to answer questions now good please yeah so air stack is completely free until September 1st um starting September 1st we will have a generous free tier and that'll be charged based on usage but for now it's entirely free um there is a rate limit if you need a rate limit increase we have five additional free plans right now so just let us know what your needs are and we'll give you a rate limit increase so you can just request on our team uh yeah so uh ethereum mainnet polygon mainnet um and so we do recommend hackathons like we don't need an X squarely right now we know a lot of folks you know would like us to so if you need to Matic to use on polygon just let us know we'll send you some all right so um new transactions uh I think you're asking how fast are things in there stack a new transaction in a theory or polygons should be an air stack within a couple seconds um we've tested over and over again for performance it's the very very low latency it's not real time but it should be just a couple seconds foreign we run our own IP best nodes right now ipfs um we have a couple other off-chain data sources we use for descriptions and metadata uh we're not we're not right now unfortunately not indexing where we get cool yeah but um yeah so yeah so uh basically the yeah so the token URI which is there in the contact like if it's an airb URL or an ipfs URL like we're making the call to the nodes getting the data storing it and you wouldn't have to add any extra like effort from your site to fetch it like it's all on air stack even though I learned something new time um so it does say like are we you know the other way and we have two minutes left anyone all right thank you everyone appreciate it thanks and care
Automatic transcript — names and jargon may be misspelled.