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

Loading player…

Optimism 🛠 Getting Started with Optimism - Ori Pomerantz

ETHGlobalSun, Oct 9, 2022, 12:00 AM

Welcome Ori Pomerantz from Optimism for a workshop titled "Getting Started with Optimism". ETHOnline is our biggest event of the year! Collaborate with thousands of developers and creatives from around the world and win over $300k+ in prizes! We're bringing in 30+ of the biggest teams in web3 to give you access like never before. Learn from ecosystem leaders and build your biggest ideas as the merge nears reality. The future of Ethereum is being written right now, and it's time to make your mark. --------------------------------------------------- Follow us: https://twitter.com/ETHGlobal​ Check us out: https://ethglobal.co​m Email us at: hello@ethglobal.com

Transcript

[Applause] [Music] well yeah hello everyone good morning i'm craig from the global team and with us uh we have ori from optimism um he is gonna do a workshop on getting started with optimism so yeah super stoked um just wanna know if you have any questions feel free to drop them in the chat or i will try to answer them as they come in um but then if there's any left uh will do with them at the end if there is time um but if you're shy like me you always have the optimism discord chat to put your questions in so yeah or feel free to take it away whenever you're ready and yeah have a fun workshop everyone okay hi everybody um i hope you don't you're not disappointed this workshop is going to be pretty much quick and easy because optimism is pretty much quick and easy can you see my screen okay good we'll start with how to use optim with how to deploy to optimism and i am going to use foundry for that just because it doesn't really matter just because i use foundry okay let's go to let's first deploy a contract and here you can see the command line forge create mnemonic path and the name of the mnemonic this is all completely standard the one exception is the rpc url this is our test network our main network you can go to as https mainnet.optimism.io or you could or if you don't want to use a rate limited uh end point you can always go to get one from one of our many many node providers anyway we now deployed the un optimism useless token out for and we deployed it to this address now let's interact with it okay first let's ask what's the balance zero then we send this to the we send we use this command to send the four set and now we look at the balance and we have a thousand of them okay let's look at this in ether scan so we can actually see what was happening you go to girly optimism after scan io and it functions just like the normal magnet ether scan except it's connected to our network here you can see what take what a contract we deployed normally you would have to upload it but i already uploaded the exactly same contract when i was getting ready for this the same reads the same rights this one just happens to have a faucet on it that you can write to and then the faucet sends you a thousand tokens for testing purposes anyway now you're go any questions on these if not then the next issue oh the github link for it there isn't really but but if you want to see the source code then you can just use this link here and for the scripts let's let me just put them in here although there's nothing really smart about them this is the deploy and this is an example of the of calling something okay now you're going to tell me but ori this is all very well but this is for people who use foundry we use truffle or hard hat or something else what do you expect us to do switch just so we can use your network well of course not if you look at our uh github ethereum optim oh if you look at our tutorial and you can see it in this link or if you don't if you don't have access to the chat for some reason you can also scan this qr code here you will see that our we have getting started also for hard hat truffle remix if you prefer to use the ide of course foundry waff and waffle i'm still working on one for python but other than that we've got most of them covered next question you might ask me is ori this is great wonderful now where do we now where are we going to get our a test if from i'm glad you asked there's this faucet optimism faucet xyz and again here is a qr code for it and you just need to put now you need to have at least to follow at least five people to be able to use it not to have five followers which could be a pain but to just follow five people hey you just follow five people and you get it and you can get it uh let me you need of course an address if you want to receive tokens okay since my metamask is having issues let's just use this test address here we'll copy it claim and we get it in them in a few minutes this isn't the only solution though another possibility is to use the optimism bridge you could connect your wallet or you could if it worked okay and if your wallet is on the go early test network you can transfer to optimism go early and this is another way that you can get tests if if for some reason the faucet isn't working for you just use a any girly faucet okay now you're going to say yes sorry that's nice and if we were just using oh i forgot for this one i didn't have time to create a qr code so here's the url you're going to say all right this is great if we want to only use the optimism network but we don't we're trying to do something a lot more sophisticated that requires inter-layer communication how do we do that i'm glad you asked you go to our tutorials and here we have several tutorials we have crossdom.com this one is how to communicate between trustlessly between contracts and optimism and ethereum here let me give you again the url and we also have cross domain bridge this one tells us how to this one is going to tell us how to transfer if and i'm going to it's when the when a pull request that i submitted last week gets accepted the name would change to dash dash if because the new oops sorry because the new there's another one going to be there for erc20 assets we don't have one yet for nfts the nft bridge is pretty new but we have people working on it okay uh this almost everything you see in optimism is evm equivalent it's almost the same as what you would see on ethereum so this is going to be a relatively short lecture in fact we're almost done with it but a one thing that's different is the way that gas calculation works oops i forgot the cd the reason that gas calculations are different is that we have two expenses first is the execution fee which is the cost of using the optimism network there is a tiny bit of cost it's really not much but the real cost of using optimism is that we still need to write your transaction to l1 this is the major cost at least it is on mainnet on girly maybe not and therefore we need to [Music] and you need to also have enough if for that let's run this okay here we see that the estimate was for the l1 gas cost to be about 73 000 way the l to 27 way the actual costs were pretty similar and there was a difference of 14 gas but okay 14 gas on l2 doesn't cost much even if we were on main net this would only cost you like a 0.014 way not too bad and of course and now you're saying yes sorry that's nice but the fact that you have a script that tells us something isn't going to help us we need to know how to do it well it's part of our tutorial oh i'm afraid you can't do that a test coven and test girly are completely disconnected you can't transfer anything from one to the other you will need to just start accumulating test go if go early on optimism go early if you need a sta if 0.

2 for a day which is what the faucet would give you is not enough tell us explain why and we'll be able to get you a larger amount anyway here it says how it works exactly dot and config and this is the trend and we'll we create the transaction we use the sdk etc it's easy it's simple if it's if this is not simple enough please yell at me since i wrote it okay now where do we go from here we have these tutorials for you and if you want to see our documentation we have community.optimism.io which is our documentation our main documentation website the parts that are relevant to you are probably going to be guides and dev docs well getting started in dev docs alter another thing that you can do is you can go on our discord if you have any problems go here and then you can get into our discord ask questions people will answer you if they don't know the answer they will tag someone in most likelihood me and i'll see if i can answer you there is also the if global discord there's a channel there for every sponsor we're one of the sponsors so you can also ask there for the duration of this i'll try to answer it and any any other questions anything i can help you with yes i know this is supposed to be a 30 minute workshop and it's only been 15 minutes and you demand the refund well hey i'm willing to give you back half of what you paid for this free workshop and b it is so short because of evm equivalence optim we built up optimism is built on the springs on several principles one of them is a i.t should be seen and not heard uh you the more you we're like plum the plumbing for web three the more you the less you have to think about us and the more we just work the better it is okay amazing just a few questions one how would you compare optimism with other l2 networks i'm not going to compare optimism with other l2 networks the reason that i'm not going to compare them is because i don't think it's i don't know the other networks all that great next sorry i'm doing them from last to first because it's easiest for me can i meet nfts on optimism yes depends on what you need to mean for if what you're meeting for is testing purposes then you go here to getting started testing on optimistic test networks and you go to this address and you wait some more sorry okay meanwhile is there any database public good retracting funding experiment yes there is a you'll need to look in the docs i'm not sure where it is anyway but for this one you can go to right contract and uh here you can call the faucet and that way you can get yourself an nft if you want to mint a real nft you can either deploy your own software or you could alternatively a well and of course you need to approve it in metamask and all that or alternate oops we are correct we need to go to optimism go early which makes sense if you think about them about it so let's change this to oh i don't have optimism go early on this browser never mind it's here and you will be able to see that it and you'll be able to use it and if you want to do actual nfts and you don't want to deploy your own contract then kishotik has infrastructure for you okay and public goods exp funding experiment we have it i just don't remember where okay let's go to head to our user docs at health.optimism.

io the optimism foundation no it's not here okay then it must be under the governance docs actually here um vitalik has has an answer for you okay any other questions i think that might be it but yeah if you do have any questions or you just think of them later um drop them into the optimism discord channel um ori and the team will be there um to help you and yeah thanks so much ori that was yeah super super informative and yeah optimism's like so easy to use i love it so no worries on the short workshop it makes sense yes well thank you very much and oh i forgot if you have any we also have a youtube channel there's an explanation there of how optimism works if you want it cool yeah you too sweet all right thanks for joining everyone see you in the next workshop okay bye [Music]

Automatic transcript — names and jargon may be misspelled.