 My name is Igor Jovoi and I am a developer at Open Zeppelin. For those of you who don't know us, at Open Zeppelin we build developer tools and perform algorithms of decentralized systems which power multi-million dollars economies. We work with the Federal Foundation on the Solidity Compiler Audit and we created the most popular smart contracts library which has over one million downloads and over 180 contributors. As you can see we spend some time writing and auditing smart contracts and today I am excited and delighted to share my findings on how you can improve your Solidity developer experience with hot loader. But before we jump to the next slide, please raise your hand if you have ever written a smart contract in Solidity. Yes, developers, developers, developers. Okay, this is a compact disk. Back in the days developers used it to ship software and it was literally a mutable code. Once you ship it you can't change a single line on it. It affected the practices back then. Developers were really careful about testing and polishing their code because they knew once it's out you can't change it. Does it remind you something, something we do today? This is Internet Explorer 6. It's the first browser I ever used and it's the first browser I've written code for. Back in the day it was following, it was working the following way. You would edit your mix of JavaScript and HTML in external editor, then you save it and once you save it you go back to the browser and you refer to the page to see what has changed and if you have to change something else you have to do it again and does it remind you something? And what do you think how rich developers tools in the Explorer 6 had? The answer is no, it hasn't had any developers tools. And I'm here not to smash Internet Explorer 6, it was a great piece of technology at the time. You will see a lot of similarities about how developers tools were back then in the days and how developers tools are today, a real blockchain and blockchain in general. We're going to see a quick video, but before that I'm going to explain what's happening here. So I have a really simple smart contract, it's called counter. All it has is a simple, is a one state variable called count and you can go either up and down, basically the smart contract just counts up and down and has appropriate methods, increase counter, decrease counter which you can modify with state variable. And on the left there is a front-end presentation of the smart contract written in Create React app. It displays a contract address as well as the current value, which is 32 and we have two buttons to increase and decrease the counter by one and let's say we realize that increasing counter by amount is not good enough for business logic and we're only going to increase it by the number three. In this video I'm going to modify the smart contract to do that and it's going to be reflected on the front end. Let's see. So first I'm going to edit the smart contract itself and save it. Then I'm going to compile it with a compile command. Once it compiles, I'm going to deploy it, but because Ethereum blockchain is mutable every time you deploy it you have to initialize your new contract and my old contract has a value of 32 and now I have to provide a new value for the counter and initial value I'm going to go with one to three. And also because new contract has a new address, my Create React app can't pick up the files they're quite proficient, so I also have to restart my Create React app which takes some time, but you see how like I run all the things to save while it all happens. And let's say does it even work? Okay, so I'm going to press a button, metamask as usual. Yes, it works. It went from one to three to one to six. And so over a minute we achieved incredible things. We just changed the counter so now it adds three, right? And I really would agree with me that there's quite a lot of steps involved for something trivial. I call it one line change problem. Let's break it down quickly. In order to, at the minimum, change one line of smart contracts which is tied to some front-end app, you have to change a smart contract then compile it, then deploy it, then restore a state. And if you had some complex state, restoring state can be really non-trivial because once you deploy all the contracts, all your state is gone and if it was in the middle of debugging some issue and suddenly you have to re-roll everything, everything is gone and I experienced it personally and then you have to refresh the browser. But if you think about it, how it really should be? If you look at Internet Explorer 6, it's not like how we do things anymore. Now we have this luxury of development tools, like hot-loading on front-end, web-depth servers which just refresh everything for us, watch our files. You just type code in your editor, hit save and everything works in web development. And I believe it should be the same experience when you develop applications for Ethereum. Excited to present to you Sality Hot Loader. Sality Hot Loader addresses this problem. We're going to see in another video, it has the same setup. There is a counter contract which you now familiar with and the same front-end on the left. But right now initial value is 28, there is a console at the bottom and we're going to repeat the same steps as just we did before. But at this time we've sality hot-loader enabled. I'm going to change the file and save it. As you can see, it says to compile things in the console while I'm randomly clicking everywhere. Suddenly our front-end does refresh and if I press the increase button, it does increase it by free. But as you can see the state of account has stayed the same, which is strange because the state, if you deploy your contract should change. You will think, why? How? How is this possible? Let's quickly break down what Sality Hot Loader does for you. Compiles are just smart contracts. Essentially writing a compile command for you so you don't need to type anything. Then it deploys a new binary code to the local node such as Ganesh which is a tricky step. And then it refresh the browser page for you. Let's dig into how exactly it deploys a new code in the way you preserve your state and address. That is upgradability. Behind the scenes Sality Hot Loader revise on upgradability pattern which allows you to change implementation of a smart contract without losing its state or address. Sality Hot Loader uses limitation by Open Zeppelin SDK. It's called upgrades and I'm going to give a quick explanation how it works. But if you want to know more go to openzeppelin.com.slash SDK and you'll find everything you want to know about it with far more examples and better detailed explanation. So how it works? It's a proxy contract which pretends to be your contract and handles all the calls. And it is delegated call instructions to redirect the function calls to contracts which contain the implementation logic while the proxy contract calls all the state and address. In that way we always interact with the proxy contract that is why our state and address is preserved at all times. And then we change the call and hit save in our editor. What happens is the new bytecode gets compiled and uploaded to the blockchain and proxy address implementation is changed to the new contract implementation. And all the calls after you upgrade it go to the new implementation. In that way you can shift frictionless transition from old call to new one where you preserve the state and your address which is placed nice, really well with front end tools. Yep, ability to be great and awesome for many cases not always works for every project, every environment, every setup. And I was thinking, can we do better? We create some solution which will be a silver bullet for seamless development in any environment with any framework or library. We have to talk a bit about Ganesh before, as you all know, Ganesh is Ethereum RBC client which is really good for development and testing has slightly used and has quite a few features to help you with testing and development. And in particular it has its custom methods EVM snapshot, EVM revert, EVM in Christine and mine. They allow you to do things which are not possible on production ready nodes such as parity and gap. For example, EVM snapshot allows you to take a snapshot of your blockchain do some stuff and then go back to this state which is not possible on mainnet, I guess unless it's DDAL but then it's expensive. And with other commands which is increased time allows you to jump in time forward to really helpful with testing and EVM mine allows you to mine the block. You can see something similar to these commands is that they allow you to do things which are not possible on mainnet yet it's extremely valuable and helpful during testing and development. I was asking myself, is there any missing commands for our test development film clients? I want to suggest the present the EVM update command just to be absolutely clear this is on the state of an idea proposal and research at this moment. The idea behind this command is it would allow you to upgrade smart contracts in a really hard way without mining logs or altering anything else essentially just solving the limitation of one implementation of a smart contract with another implementation. So I'm going to give a quick example of how it's going to work. Let's say we have the same smart contract counter which you know we have expert knowledge on and the original implementation just improves the count by one but you want to allow this to be increased by any arbitrary amount on the left a series of calls from top to bottom and to start we're going to call getCounter which we return 32 is the initial state of our contract and then we're going to call EVM update to update the smart contract with a new bytecode which will be bytecode allowing to increase it by any amount. We're going to call increaseCounter method increasing by three but this call is not going to fail because now our contract has a new implementation and after that we're going to call getCounter method which returns now the value of 35 in that way not only we upgraded our smart contract we also preserved the state and address which is really important for developers tools because you want to hide all the complexity from the user a developer and to hide it inside the dev tools it is approach as it might be a huge surface an opportunity for other developers tools as well where ability just to modify any modify implementation of any smart contract of course not going to happen on the black chain anywhere anytime but again it's very valuable for developer tools and will enable all sorts of tricks which will create a huge value for the development process in the end I want to talk a bit of future of free dev tools in the way that I believe the future is not predefined there are many many possible features and as you all know almost a century ago gas cars were competing with electric cars but for some reason electric cars lost the battle to the gas cars and only right now electric cars starting to get some traction and in this way blockchain doesn't particularly has to happen where like other futures where it happens in 100 years but I personally don't want it to happen in 100 years because I want to see it happen that if our developers tools will stay on the level of Internet Explorer 6 it's going to be hard to bring new developers to the free market system because the expectations right now for developers so high they've been like super spoiled and unless we make this awesome where free developers tools happen I would say it's going to be incredibly hard developer adoption I urge you all to try to upload it today do it just run NPEX CLI unpack tutorial command and by the way this is the slide where you take a picture but if you're a security concerned person and don't want to run random calls on your machine you can just go to our open zeppelin you have a count and clone start your tutorial this is a tutorial which has hotloader there enabled so you can play with it it also has upgradability in CLI so you get more than just hotloader to play with and it's rather polished experience thank you very much for the time and attention it was a pleasure