Infura 🛠Getting Started with Infura - Francesco Andreoli
ETHGlobal·Mon, Oct 9, 2023, 12:00 AM
Join Francesco Andreoli from Infura for a workshop titled "Getting Started with Infura". And that wraps up 2022! ETHIndia 2022⎯the biggest Ethereum hackathon to this date with over 459 projects built within 36 hours. 🫂 2000 attendees from 🌆 321 cities that were 🌱 44% new to web3... ...joined forces in Bengaluru to write history. Thank you for taking part in it 🫶🔥 ----------------- Follow us: https://twitter.com/ETHGlobal​ Check us out: https://ethglobal.co​m Email us at: hello@ethglobal.com
Transcript
foreign [Applause] [Music] yeah welcome everybody let's uh let's see let's do a quick round are you guys excited I want to hear some voice yeah are you are you guys excited awesome awesome even if we are doing a silent keynote uh looks like we are here but that's great I see some uh some laptops here but um yeah the idea was having a workshop of one hour and I think we have only 30 minutes uh how many of uh people know in Fiora or deployed already dap uh awesome awesome cool cool yeah this is like literally uh some getting started guide and uh um yeah uh yeah basically I'm Francesco I'm doing devrel for consensus mostly doing uh mitama snaps lately but I'm excited that uh yeah this hackathon we have not just uh snaps Bounty but we also have a specific infuria if you guys went to get some swag on infuria we are uh we are I think on the on the full right side yeah so the idea of this Workshop is literally like trying to get an idea on on what how adapt look like what's the review what's the structure and the infrastructure that you want to do an intro to infuria and uh and then basically do it for for basic operations sanding and reading and ethereum transactions we are doing an rpfs ipfs transaction when we are storing uh an image that's quite excited and and then if we have time I don't think we have time but uh but I will definitely send you uh the resources uh deploying an entity on on mainnet and mean 10 nft on uh on mainnet uh cool so uh depreview so I guess everybody how many of you are hacking this weekend we just want to try to understand okay everybody's hacking and I guess also like you have an idea to use in fewer hour or or build a snap so that's quite cool but uh and the anatomy is quite simple right we have a our own front-end HTML CSS JavaScript web3.js where you inject uh ethereum uh ethereum um truffle ganache for testing is a smart contract how many of you like test your smart contract with uh um truffle normally we use some other tools okay cool cool cool um and then obviously like on a lower level we're defining our smart contract we can take some some uh pre um pre-built templates uh from uh from open zap link uh yeah so basically like some react web 3.js travel for testing and lower end open sapling and and the solidity so let's do a quick intro like uh where so where in fewer is actually playing uh playing the role like in all in all your anatomy of the depth you're obviously like connecting to to to metamask when you're doing your transaction but if you don't want to basically deploy your dab locally when you're testing and you want to deploy it on on Main Network on testnet you can use basically the infuri RPC right and uh and basically it's an old you know provider that is injecting in between metamask and and ethereum yeah that's uh that's kind of the high level of obviously like you guys if for the for the people that raise their hands you know a little bit already we also launched the decentralizing fura node Network I don't know in Berlin that's super exciting and uh and yeah so the idea is not just deploying your depth locally uh and testing it but having an efficient and smart way to deploy on different networks ethereum networks is just an example but if you go and we will go on uh on the inferior website we can see also that you can deploy your dap on on different networks starknet is actually the latest so that's quite uh quite exciting uh why use blockchain infrastructure obviously like we are using effure because we don't want to like have and run our own node uh those I think like they were using that couple of months ago but a single full node requirements around 500 gigs and uh obviously like full archive I don't know if uh you were here like four years ago but I remember like I was doing some full archive stuff and it was taking like three weeks and now it's probably even more three four weeks uh like I think like around eight to think uh and download all the the ethereum blockchain distributed system or art so there are basically different things that's why we're going through uh um an RPC provider like uh like infuro cool so you are on your own node and user provider and you can rely um exclusively on on your provider and I think like the the the most powerful things that I see in the future is that with this decentralized infuria we can literally have uh full uh distributed node ownership and at the same time rely on the uptime uh time for for having different nodes intro interest cable IP ethereum on ipfs layer Tools near Aurora those are just the main one and uh it's uh it's uh yeah it's basically an infrastructure provider where you can actually create different instant connection to ethereum and ipfs you have your set of apis you have different features like node archive and uh interesting is analytics and Matrix so you can see how many transactions you're doing and you can see also like different there are different tiers obviously but I think like the main one it's like hundred thousand uh transaction per per day yeah I mean yeah thousand developers application trust in Fiora like I don't know like obviously metamask but there is bunch of like other cool uh providers like I don't know if you know uni swap is using fura and comedy wallet 0x Opera although like some people don't know like Opera they're also like running a wallet but but uh that is quite quite interesting those are the top five method call right obviously like the the get the the get Block uh my number they get price the syncing and the logs uh and uh and basically what you see when you have in your account on on the bottom right you see your bandwidth usage on a peak and on average usage so that's quite uh that's quite interesting uh inferior infrastructure overview yeah this is a little bit going deeper uh but basically what's happening there are two ways that is uh is talking on the architecture level but Gateway is speaking directly with the RPC system or through websocket and uh um and uh and it's basically diving into the the performance cache and there is the data reconciliation uh part happening directly to the the RPC system yeah this is another Deep dive a little bit on the on the backhand side but the most important part are the two uh are the two like the transaction service and they know the Management Service basically where you can have your your Watcher the nodes and the the peer-to-peer connector and on the transaction side you have the broadcaster and the pool and then optimization index store are specific tooling that you can record different uh different specific features that's also quite quite interesting cool uh yeah so the idea of this Workshop was not me running only through slides I have also a couple of colleagues here the cut support but the idea was actually doing uh doing something just for purpose of time um I can run Icon run through already a pre-build tutorial but the idea is that I can also provide these resources that you can go home and uh and uh and do do it yourself afterwards but uh yeah so obviously we sell metamask I'm using flask how many of you know flask yeah it's basically is the canary version of metamask where there are a bunch of like uh settings and developer part uh like for snaps for example when you're building a snap you can deploy and use a flask I'm just using flask it's easier but but it doesn't really like change anything so let's assume that you're going through the metamask phase uh we have also getting some girly test net uh it's not my favorite but Paradigm is working well also ask me later if you need some some girly happy happy to provide some and uh yeah sign up in Fiora it's like it's literally I can we can go through but I can show you directly my uh my inferior uh let's see if there is internet so basically that's the that's the normal so I already created an account this is just a test account with three sample projects so what you can see here uh is uh when you create a new key basically you can create a new project but these are previous projects that I built this is for eth India we have also truffle and then it in the ipfs basically when you create a new key you can select the network right web free API ipfs or or Phi coin and and based on that you can create a name and and get your uh get your basically like keys for uh for uh for talking with uh with the with the EnV file uh but uh yeah basically like assume that you registered probably you guys want to do it afterwards but that's basically what I see on on my let's say on my project and when you create the project you can go on on uh on the on the manage apis and you can see basically all the endpoints that are provided so API key obviously so this is like a test account so you can copy and do everything as you want but this is just for purpose of testing interesting you can see obviously we got started with uh with ether but you can also like deploying on uh skating and side Chain Solutions like polygon arbitrum Avalanche near and starknet this is like the newest uh let's say family member that that you can deploy to and it's quite exciting you can also have so different settings and specific like security settings when when you're accessing your uh your secret uh secret recovery uh yeah that's uh that's a little bit so mostly what we are we will use is basically on the API key and when we basically like do and and deploy our dub we can go in statistic and see how many calls actually happens in the past 24 hours and this is basically the limit of 100 000 uh calls uh every 24 hours and obviously if you need if you need more although like if you look at different RPC provider like 10 000 100 000 uh calls for 24 hours are quite uh are quite uh it's quite good yeah you see also which requests volume and which network request of volume obviously we did mainnet we did mainnet today cool uh oh yeah this is just an example like what you can do is uh is using it is using the curl let me just get uh we can try it out but basically what uh what you can see here is I already added my oh I need to see the I need to get in the folder in the getting started what you can do is we can just would you just do that but basically what's uh what's Happening Here is let's see where the oh yeah it's on the right but basically what happens is when you're calling uh uh if you are with your API key you can basically see a resort like Json RPC 2.0 the ID is basically the uh the chain where you are and the result 0x uh yeah so the idea was basically going through like the the getting started uh guide with infuria and that's basically this one here already already basically down download it for you uh we were following those uh and after I put also some QR codes that you can you can go through but uh let's uh let's uh let's just see what's going on here so we are but what happens basically is uh already run through this so I have updated the terminal so so we installed we go to our project directory we start the dependencies uh we we basically go through the the template TN VM and this is basically the this one here the dot tnv so the structure that is let me just do it a little bit bigger so basically the structure of the getting started is yes you have a bunch of like components you have the the two contracts they might the migration and the Nifty contract they have different pages for the uh for the for the react part and here you have the dot NV that basically you can you can Define on sending the transaction variable in the ipfs variable and those uh those you will get from from the from the infuri provider here uh the one that we saw it uh before so you go on your project and you manage manage key and it's basically the one that you see here uh yeah so I did already this before so basically we installed dot EnV you go through this this change you put your uh your uh your key and basically now we are running it and basically what's happening is I deployed that locally and this is basically what look like Let me refresh uh that's basically like uh a normal uh yeah a normal depth that we deployed now locally what you can do is is connect you see okay this is my uh this is my flask account uh and what we're doing here we're just doing uh a transaction right we can do like I don't know like zero zero one of something probably spending even more gas fee right now but uh uh and basically this is where the send transaction is happening we just did the the transfer if and yeah and basically we did the the first sample uh project if you want to Deep dive a little bit in the code there is this blog post that we wrote and you can see exactly where those uh um transaction code implementation are are implemented so the transaction the transaction inside is in this one here where we basically you import you send the function and you basically do the the web3 provider HTTP provider and uh uh yeah and uh getting your your current uh heat balance this is basically normal using a web3 JS part uh uh that's basically like not not the best but it's the common the most common one and yeah those are basically all the parts that that are happening that every time that you are clicking uh clicking on the dab and we are connecting the wallet where you're basically getting the the balance value and when you broadcast the transaction basically you are using the the transfer it's basically this one on line that's a good question line 130 or something this one here yeah so that's uh that's basically it for the the the first part um and by the way if you have any questions like shoot because it's uh it's a long tutorial it should take at least at least one hour to do it and uh yeah that's basically it so what's what's now we did is we send a transaction with the DAP and we saw like the structure the anatomy how it looks like and where you're actually like in doing the the specific injection and uh yeah and uh that's uh that's uh that's a little bit so basically what's happening is the other things that we can do is oh that's a review of the transaction and you see the review uh the transaction summary so this is the second part I already pre-run the for uh for you basically what's happening is where uh we're upload uploading our documents on uh on on ipfs and it will take I will basically take this time this is what we did so we set up the environment variable so endpoints project idea project secret this as before we go through the uh through the ipfs project so what you're doing is basically creating the the ipfs project you manage key and these are basically the idea the secret and the the endpoint are you guys following just okay cool and uh and uh we we run it so I basically already run it and what we are doing is uh we can upload uh I don't know like an image or something something like that this is the QR code for uh for our inferior survey uh we can just do it tests in Fiora we can also those are those are attributes that are optional but we can put uh number one and number two so what's happening here is we're basically uploading the documents on ipfs Boom it worked and we have also the ipfs ash that we are copying it for the next uh the next step what's here happening is basically we preview like Summers the ipfs Explorer that is uh that is happening we are just submitting and boom we have the the display uh the display uh file they're going to check it so yeah so basically here what's happening is we are yeah we upload an image to ipfs and uh and uh what we can do right now is uh checking uh checking code we can actually think even like display on localhost yeah the we did that already so and this is basically what happening is we upload that upload successful this is the ash this is where it's displayed uh yeah okay so running a little bit through through the code oh yeah we are we're almost done almost yeah it's basically running through code is we are we're doing the file upload part and that's you will find in the upload form uh typescript we do uh yeah we do this one we file we've also basically those are default file with the attributes then we do the upload operation where the Json the Json package is uh uh is uh is there we upload and uh yeah and basically what's happening is uh we we are running through the the ipfs node for the upload part and then we are displaying it in the in the second uh in the second part yeah so that's uh that's a little bit let me go back to the presentation what we did so the blog post that you saw is here so if you want to run this through um at home that's uh that's a useful uh that's a useful um uh resource uh for the next step we need to use truffle for for testing our smart contract but you can get uh getting started here this is less important you can also find it online [Applause] and uh yeah we're basically going through what uh what I did uh right now we pull out the code we touch the the NVA file and we set it up locally we started the uh the DAP we run through uh the localhost right now we send a transaction we upload through ipfs this is basically the next step right the minting nft and uh and yeah and then here I put some additional resources this QR code is the survey that we're doing we can send also when you're doing the survey like though this presentation if you're interested to take like three four minutes and it's also helping us to trying to understand which network you want us to deploy next for uh for inferior purposes yeah I mentioned before the the decentralized infuria and if you guys are a node provider or you're interested to be part of like you can apply directly uh through uh through this I also added the QR code I think uh I think uh we are uh we are there uh you can obviously follow infurah and we have a bunch of videos from our Deborah friends at infuria and uh yeah you can find our booth there if you're interested in also acting on metama snaps we are around for the next uh yeah three days we have 10 000 in bounties and uh and yeah also like uh feel free to uh yeah to stop me wherever uh you see me and uh awesome awesome to be here in India thanks guys
Automatic transcript — names and jargon may be misspelled.