 The ones who are back from lunch. I'm Hudson Jamison. I work for the foundation doing DevOps documentation, kind of adapt developer, just kind of organizing DevCon, doing all that stuff. So I'm really excited to be here. And if you've seen me online, my nickname is Supertacular on there. And then Piper, you can go ahead. Sure. I'm Piper Mariam. Some of you met me yesterday at the end of the day. I maintain a lot of the Python tooling for Ethereum. I've worked with Vitalik a bit on proof of concept implementations for Casper, and just kind of general Ethereum developer. All right. Well, let's get started. We're going to teach you about Solidity today. So Solidity is a high level language for Ethereum contracts. So what that means is so we don't have to go and do like ones and zeros or like low level assembly code or things like that, we have a high level language that makes it much easier for humans to be able to code at a level they understand and then put it through the compiler into what will come out into the Ethereum network. Solidity looks a lot like JavaScript, but with types. It's sort of this interesting amalgamation of the two. This is a very simple Solidity contract. The highest level thing that we reason about in Solidity is the contract object. You can think of a contract kind of like a class if you're used to object oriented programming. And the contracts expose some number of functions. So the code is compiled to the Ethereum virtual machine. Y'all have probably been hearing about that a lot today. Pretty much it's just like it takes the human readable code and then puts it into a bunch of gargling like ones and zeros and makes it so that the Ethereum network can read it in a way that the computer can understand. Once it's on the EVM, it's completely isolated. So that's something a lot of people forget, but once contract code is on the Ethereum network, it can't do things like go and ping the weather.com and get the latest weather. They have to have a human intermediary because it is isolated. There's no outside network or other types of connections. And the reason for that isolation is that everything that executes in the EVM has to be completely deterministic, which is why you can't generate random numbers easily inside of the EVM. It requires some outside interaction. Contracts are very easy to write, but they're very difficult to write securely, especially if you need to house value or other people's funds. This is a pretty straightforward looking function. We've got a withdrawal function for some wallet contract. It checks to make sure that there is enough in the account to withdraw. It sends the funds that they asked to withdraw and then it sets the balance to the new balance. This will let somebody completely drain this contract of funds. This is exactly what happened to the DAO. I have this line underlined because what actually happens here is that this executes, can execute code on the address this is sending to. And since the account balance is only deducted on the next line, that means that that contract can call back into the withdrawal method, which will execute that line again, and it can do this circularly, at least until it runs out of gas, which means that if it can get through 100 loops of doing this, it means it can withdraw 100 times the amount that it has. Oh, yeah, I guess this is amazing. Public functions, let's go over these. They're callable by anybody. So you have this wallet that has an asset on it and you're like, I'm gonna make a Hudson coin, Hudson coin, and you go in there and you're like, I want anybody who has access to Hudson coins to be able to check their balance. So you make that function public. That means anyone can call it. As we'll see in a second, internal functions are only callable from inside the contract. So as you can see, there's a lot of parallels to many other programming languages here. Internal functions are good for things that you only want other functions to call so that people can't manipulate them and do weird things with them. Cool. Your public functions are the API that you expose to the world. You can think of these as your API endpoints. They're the things that you allow outside actors to interact with your contract with. One of the interesting things that is happening right now is that some standards are beginning to emerge for how we write contracts. You can think of these like HTTP web standards. This is the ERC-20 standard. This is the standard interface that token contracts should implement. There's this small set of functions, but this interface is implemented across all of the major token contracts that are live on the network right now, and that common interface that standard that has emerged is allowing some pretty awesome things to happen. So if anyone's been to the EtherScan website, it's a very popular Ethereum blockchain explorer. You can go there and they actually have a search feature where if any other contract is using the ERC-20 standard, you can search for tokens within that contract. It'll, you'll just be able to put the contract address and it'll tell you, you know, your balance and give you everything you need because it's a standard that's set across any smart contract that implements it. It's very interesting. What we have right here is actually maker tokens, I believe, as because they implemented the ERC-20 interface. And there's some variations people use to do different things with ERC-20, but for the most part, it's pretty standardized. A lot of people are using the same standard which is great that the community can come together and do something like that. One of the cool things that these kind of standards enable is this, which is a completely decentralized exchange where you can trade token pairs on the Ethereum blockchain. Yeah, so the cool thing about this, like why would we want something like EtherX? The reason is it doesn't have a middleman. It's instant settlement or instant, like pretty close to instant settlement and you control the assets. So a lot of the time you forget, you know, things like this happening. And the reason this happened was because it wasn't decentralized. They, Mt. Gox was a Bitcoin exchange. They had a lot of people's Bitcoin and then they got hacked and the Bitcoin stolen. If we were using something like EtherX right here, that is less likely to happen because the contracts just all talk to each other autonomously within the Ethereum network. Let's see. Oh, so solidity is about two years old and since then the communities come together and made a ton of tools. You've seen a lot of these today from other presenters and you're going to see more. What we have here on the left is some integrated development environments. So some of the more popular ones are browser solidity. That's a compiler and basically full solidity suite for debugging and everything within your browser. We also have Ethereum Studio and Visual Studio which are IDEs and plugins. And then if you look at the bottom, if you recognize any of those symbols, that means that your text editor has support for solidity syntax or solidity compilation or things like that. If you look at the right, we have tools. Rain earlier today went over Solgraph which is a really, really powerful tool. We also have Solinium which is a Linter, Truffle, Dappel, Populus and Embark which are frameworks for building Dapps. So really you have a ton of different tools to come in and help you learn because it can be a rough ride at first. So yeah, go ahead. So this is browser solidity. This is magic. You can go to this in your browser right now if you can get the internet to work. And write a contract, compile it here in your browser without any tooling on your machine, deploy it to a test EVM running in your browser without you needing to install anything on your machine and interact with it right here on this website. The browser solidity is an amazing, amazing tool and it is a really easy way to get started tinkering around with Ethereum contracts. Yeah, definitely. So I was gonna put a list of resources like, okay, I'm out there in the audience or watching online. I wanna get started, what do I do? What we've done is you go to the Ethereum subreddit. It's like an online form. There's a post that's at the top of the homepage of the Ethereum subreddit and it has all kinds of links. It has a getting started guide. Some of the things that people are gonna be familiar with and that are real easy to use. We have our own stack exchange. So if you're a developer with different languages and you use stack exchange, Ethereum has its own stack exchange that actually has over 3,000, I believe 3,500 questions answered. We also have ethdocs.org, which is a community-built documentation site. We're looking all the time for people to come in, help out with that effort. And we also have, of course, ethereum.org, which has a short getting started. And then on top of that, we have plans in the future to expand on maybe things like examples, tutorials, and then of course, for solidity, there is a solidity documentation that is constantly updated with every release. So it's very, very good resource. On top of all that, you're in there. It's gonna be kind of a hectic at first if you've never used solidity. There's a little bit of a learning curve. So come to our Gitter chat rooms and that's gonna be, I think, gitter.im slash ethereum. We have developers and different channels there at all times that'll be happy to help you get started with Ethereum. So I think with that, the only other thing I have to remind you guys, go ahead and talk about your thing. So I've signed up about 10% of the conference for DevCon 2 Identities. I'd love to get a much deeper sign up. So send me your information. I don't know if we can get the slide. Yeah, this slide can come up. But I will say this, if you walked out early yesterday, you missed the most amazing announcement because what we have here is a memento on the Ethereum blockchain that you can pull up or you can like... So I am issuing one of these to every person here that wants one. They won't be issuable after Thursday morning at 8 a.m. And the idea is this is an experiment to see what can we do with the ability to let people interact with something knowing that they were here at this conference. There are some interesting ideas that I have for what you could build on top of this. One of them might be if there's another hard fork proposal at some point, we could use this as the permissions for voting in one vote to see what this community thinks about that idea as opposed to the entire community of people who own Ether. Might be interesting to see what the difference between those two votes are. That is really interesting, yeah. All you have to do is send me your information. Yeah, Piper's camped out like outside at a desk with some stickers. And if you come over there with your Ethereum address, you'll be in a once in a lifetime opportunity smart contract to be able to provide your input in future events potentially. So, super exciting stuff. I'm really excited about Solidity. If you need any help with it, find me on Reddit. My name is Supertacular on there. It's a great name, it's my, yeah. And then Piper's on there as a... Piper Mariam. Piper Mariam, find him on there too. He's super helpful. We're nice guys, come see us. Thank you.