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

Loading player…

Build a dapp with Virtual TestNets - SuperHack 2024

ETHGlobalWed, Oct 9, 2024, 12:00 AM

Join us for a workshop with Nenad Vitorovic titled, "Build a dapp with Virtual TestNets" This workshop is part of Superhack 2024, an async hackathon that takes place from Aug 02 – Aug 16, 2024. ----------------- Follow us: https://x.com/ethglobal Check us out: https://ethglobal.com/ Email us at: hello@ethglobal.com

Transcript

hey there my name is nanad and I will tell you a little bit about our hackathon Bounty as well as virtual test Nets that are the centerpiece of that Bounty so let's dive in first of all virtual testnets are essentially Forks of Manet uh that give you the historical mayet data access and they're actually located on tenderly infrastructure making them sharable you to connect with existing protocols and contracts it allows you to access the actual state of contracts using something called Liv sync so when you create a test net you can opt in for Liv sync which essentially means that uh the state changes that are happening on the Manet will become visible on your virtual testnet on your working copy so let's suppose that I'm sending a transaction here and it depends on the the value of an oracle um from mayet I will get the latest updated value if I try to query it here now virtual test Nets also come with a little bit of convenience you get an unlimited faucet allowing you to fund native and erc20 tokens to arbitrary amounts and the latter the erc20 tokens it actually works with absolutely any erc20 compliant contract whether or not verified uh you can just give it an address and an amount and you get a whole lot of tokens these convenience methods alongside with some other methods for a network State manipulation are included in Virtual test Nets admin RPC so it's the ultimate manipulation of your virtual test Nets State you can change time block number you can change any story slot you can even U Place code on arbitrary addresses on Virtual test Nets okay so now that we know what virtual test Nets are let's F let's explore a couple ways that you can utilize them so the first way would be uh to Stage hackathon submissions and we made this very easy uh by creating a fork of scaffold eth so you can just clone the Repository that's written that's linked here and you can stage your entire project on the virtual test net from the getco this means that you can deploy your contracts to it you can build your UI you can use tenderly debugger and transaction Trace to debug your smart contracts or transactions and essentially after you're finished building in this manner you can just keep your dap staged on that virtual test net and simply share a public block Explorer uh for judging of course this works only if you're not explicitly required to deploy to a specific Network all right next in line we can make this um a little more challenging uh so you can actually build your uis and back ends using uh whatever you'd like not only scaffold e what's necessary there is just to well adapt client libraries and U UI libraries uh to talk to the virtual test Nets RPC you can still use the unlimited faucet uh pretty much everything like in the previous step but you have all the control uh of connecting your offchain components uh UI and backend namely to the virtual testnet and now that we covered this part and mentioned offchain components let's talk a little bit about that so we can of course uh talk about other offchain components that need an RPC indexers bridg Bridges uh or whatever you guys come up with so if you have any ideas feel free to share or surprise us so that's the offchain part and another bit of inspiration that you can uh use is actually adding the simulation RPC so this is um handy if you see a chance to uh add some preventive security measures in your d uh because with simulation RPC you can pretty much get well a simulation of a transaction and see the token transfers see the gas usage you can see the entire Trace uh the entire call Trace uh between your contracts and in that way show more information to the user or bake in some uh preventive security measures in your D and last but not least something Innovative so something regarding virtual test Nets that we haven't thought of yet so whatever that is you can share it or you can uh just surprise us with your bug Bounty or you can just surprise us or you can just surprise us with your hackathon submission those were some ideas with what you can do with virtual test Nets and what's also important is to check out this section because there's uh a simple staging document uh that uh there's a simple staging howto that uses scff to that I mentioned there's the virtual test n quick start there's a more complex staging uh tutorial then stuff around sending transactions to the virtual test net because it is an RPC uh and so on and so on and in this section you will find a document on how to activate your tender Le all right that's about it for me have fun and surprise us with some cool projects

Automatic transcript — names and jargon may be misspelled.