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

Loading player…

Metabolism Technical Summit - Introduction to the ZORA API

ETHGlobalSun, Oct 9, 2022, 12:00 AM

Join Isabella Smallcombe of Zora for a talk titled, "Introduction to the ZORA API", part of our Metabolism technical summit. Zora’s Metabolism hackathon is a virtual space for creative experimentation, bringing together some of the world’s best creators from a broad variety of categories and inviting them to design new digital spaces, on-chain tools, artistic experiments and more. Web3 is both one of the biggest paradigm shifts since the advent of the internet age and an ever-evolving inquiry into the societal possibilities of creative technology: no matter if you are a developer, an engineer, an architect, a musician, a theorist or seasoned NFT artist - we invite you to build hyperstructures with us with focus on NFTs, on-chain music ecosystems, a new generation of DAOs and Zora’s vast ecosystem of tools and smart contracts. Let’s build. Let’s create. Let’s imagine - together. From August 4 — 10th, 2022 we invite you to build the future creative on-chain ecosystem with the ZORA Protocol and ETHGlobal ---------------------------------------------------- Follow us: https://twitter.com/ETHGlobal​ Check us out: https://ethglobal.co​m Email us at: hello@ethglobal.com

Transcript

[Applause] [Music] well excited to announce uh our next talk um which i think is maybe even the newest product uh that zora has put out for developers out there which is the zora api um so i'm going to introduce isabella from the zorya team feel free to come on up and unmute and share your video um who's going to do an intro to the to the new api that they put out recently and it's uh it's super powerful so i think i am really excited to see um what people build with this and without further ado i'll uh stop my screenshot here so that isabelle can share hers if she'd like and yeah welcome to uh to the show isabella thank you so much for being here yeah thank you for inviting me i'm excited to kick this off uh let me share my screen cool um just gonna present and yeah it's just checking cool okay cool uh yeah so i'm isabella i work on the backend team at sora and today i'm going to be giving a brief intro to the zora api so what does the api do i know api sounds scary but i promise you it's not and if you've never used an api before it can be a little intimidating but we're going to walk through it together and break it down so it's super simple and so you can get started at its simplest it indexes ethereum events and it turns us into readable data and you can access this readable data via graphql through something such as our api playground so what data can i find in the api we're always adding new data so every time you check the api there might be some new stuff it's like a little treasure chest you know every time you check uh we'll just go through the list some of the things you can find are sales so we have sales events from different marketplaces such as seaport foundation super rare etc mint events so if there's like a new token project that has been minted you can pick up those mint events so for a collection if you wanted to query all the recent tokens that have been minted that's possible uh we also support multi-chain so currently we're mainly supporting ethereum main net but as of right now we have rinky type of chain going so by tip of chain i mean it's pulling like the most recent blocks of ring b we haven't done a complete wrinky backfill of all the wrinkly due to history uh but you can start playing with that we have events so events are basically every event signature that we want to index we emit an event we not admit event we pick up emitted events and we index this into our api so for example if you wanted an auction bid an auction settled an auction created event those are types of events you could find in the events endpoint and for markets markets is kind of the final state so for example if a auction was created and then an auction was bid and then an auction was settled if you create the market endpoint you would see that the auction settled event and you would see the auction in its final state we also support search so if you wanted to query across different collections and tokens and you wanted to search say something like zorbs you would see a bunch of collections and tokens populate that are sort related uh we also support token queries so if you wanted to query for different tokens based off of transaction hashes or you know like token ids across multiple collections that's possible as well we're also starting to support off chain orders so if you use our api you can go see that we're supporting seaport off chain orders so these are orders that are not on chain so if someone's put a listing up and you're able to execute these orders through the call data and we also support media encoding so media encoding is really useful for example if you find a collection and all the tokens are say 4k images and you want to load this on your website your website's probably not going to have a good time and it's going to be very slow but if you use something like media encoding you can create performant images so we can basically convert the images into a different size so we support things like svgs jpegs pngs videos and gifs and there's a whole bunch of different media encoding types that we support but i think the best place to find more information on that would be our docs so what are some of the contracts we index we index a lot of contracts and this is always changing as well and if there are contracts that we're not currently supporting that you want to see supported like cme dm anyone and so our back end and we'll try and get it in but some of the contracts we support are seaport sales seaport off chain orders foundation sales uh wyvern sales nouns we actually support all nouns events so such such like uh like a bid a saddle a you know a auction created et cetera and we support that for little nouns as well so you can get really data rich nouns and little nouns auction event history super rare we support super sales crypto punks we support crypto funk's sales across the marketplace uh we obviously support zora we v1 zara v2 and server v3 uh we also support looks rare sales and loads more and we're continuing continuing to add like new contracts every day so if there's something you want and you're not seeing it here let us know uh how do we index events so this is an example of going from something you'd see on etherscan to the actual data in the api so as you can see this is a nouns auction event and it's a bid so you can see that the sender has placed a bid of this is the raw ethereum value and you can see it here as well and you can see the sender and you can see that it was extended so here what we would do to get it into the state is we would be picking up recent blocks on ethereum we would say oh this matches our event signatures that we want to track we would label it through our classification process which would basically say you know when we're attaching a label it's basically saying like oh this is interesting and this is something you know we want to extract and get into the api later and then we would extract it which means converting the raw byte code into something that you know is readable and something you can actually query in the api so there's a bunch of steps but essentially we're taking all these raw you know event logs on ethereum and getting it into the api into something that you can query using graphql uh so together we're going to build a query so i'm going to walk you through our api playground and we're going to build a query together so as you can see we're going to head to strawberry and we're going to do so to do the same thing if you wanted to follow along you can go to api.zor.com backslash graphql and this is our playground so together i thought it'd be fun if we did a little sales query so there's all sorts of filters and things you can do and i'm just going to show you how easy it is to build a query really fast so sales types i want to do a nouns auction sale and i would like to get information about the token id i always like transaction hashes for me because i can put it up on ether scan as well i'd like the um price i want to know so we have for special prices we support a lot of pricing data so such as like chain token price which is the ethereum native price use uh ucsd price at you know the time of the event so you can get a lot of really specialized data so we query this you can see cool so you can see a bunch of nouns auctions that are populating so these are auction completed so you can see that noun's id 325 this is the raw value this is the price in usd yeah that's how you build a sales query really fast and you can quickly change this for you know different different collections different contracts and it's really easy to build something that's super powerful very quickly cool so ideas for building with the api i think the api is really fun and it's fun to just i love playing around with it on graphql just to get a feel of what's out there i am finding new bits of data every day that i didn't even realize was happening on the blockchain so i really encourage you guys to just even just get started by playing with it uh some ideas to help with your brainstorm are something like sales bots collection dashboards auction marketplaces nft art galleries uh even trending collections and you know minted token trackers the possibilities are really endless and i think if the thing i'd like to nail is just you know just get started with the api to start playing around i'm sure as you're acquiring data these ideas are going to come to you yeah uh where can you find more information so api.store.com is the best place to go that's where our api landing page is and if you do backslash graphql that's where you're going to find all of the that's where you're going to find the playgrounds and docs.

co is where you're going to find all of our docs which has really detailed information on queries you can make how to make a query with curl what types of media encoding we support um what contracts we support and more so it i really if you're lost or you just want to learn how to get started i would head to docs as the first thing to do um yeah other than that like i think if there are things that you want to see and you have feedback or you know you want to help index i'd say hit us up my dms are always open and yeah we'd love to get feedback and continue improving yeah with that uh do we want to go through questions yeah let's see um if anybody has any questions feel free to drop them in the chat um while we kind of wait for that uh i think it would be maybe helpful to just go through on the um [Music] maybe just explore a little bit more as we have some we have a decent amount of extra time just like explore sort of what's possible on the playground yeah if that works for you like maybe that would make sense just sort of like jump through some of the different options and what's available there yeah yeah so we can head back to the playground um so what i love it's really easy to just like take away queries and start playing new queries uh really quickly so if you wanted to search for a token and you wanted to you know see all event types for a token that's possible um for mints we could do a mint query so you can see collection address you can see here like you can get into images and as well so you can do a lot of different fun queries um so if you just wanted to see like recent mints doing some upgrades at the moment so the queries might be a little slow um you can see a bunch of tokens that have been recently minted and we could actually continue to expand upon that so we could look into transaction info so you want to look at block number so you can see all of the recent transactions we can order this in different directions as well so there's different filters for orderings you could sort in different directions um there's ways to do aggregate stats across collections as well so you could do um across floor price across a collection so if we had a collection address i don't have one off top of my head but if we had one we could do a aggregate stat with the full price for a collection as well and you could do similarly you can do nft account you could do owners by count uh sales volume as well so if you want to do sales volume across a collection that's possible too i forget attributes you're able to do different aggregations here search this is where we're able to do different search queries so if you wanted to search for zorb with an entity oops too many things um um basically what what fields we can use uh we can search on basically so what like what fields do does search use to find matches was a specific question yeah so search is like continually still being developed and like this is i think v1 of search um we do matching i believe off description and collection address names and i think this is still like growing in development um but yeah it's still it's still being developed essentially awesome okay well thank you so much appreciate you yeah thank you thank you for having me

Automatic transcript — names and jargon may be misspelled.