Build Scalable Web3 Applications on Hashgraph_Ed Marquez
Ethereum Denver·Sun, Oct 9, 2022, 12:00 AM
Transcript
[Applause] well it's great to have everyone on board my name is ed marcus this is waylon jepsen we're from the hedera hashgraph team we work on death rail and i know you've seen quite a bit of qr codes throughout this conference we're about to see a few more but these are the slides so if you want to get those watch the slides at a later time or maybe follow along as we talk feel free to to get those we all have some code examples so that's another thing so we're sponsoring some bounties we're gonna have some code examples in the slides so that's if you want to take a look at those and kind of see some demos that's a good place that's right and to give you a second as well i also want to get a sense for the room how many of you haven't heard about hedera before this show of hands daniel all right very cool this is the session and in the next 20 minutes you're gonna learn how the hedera network functions how you can start development you're going to see how to deploy a very simple smart contract it's not just going to be death by powerpoint there's going to be code and you're going to see where to learn more so let's start by understanding the hedera network so hedera is a third generation public distributed ledger and it's built from the ground up to run applications at the scale that the web needs and so you're familiar with bitcoin it introduced decentralized trust and programmable money back in 2009 the second generation was ethereum and that introduced programmable smart contracts and also digital assets and hedera being third generation provides some of these benefits right the space and the technology have has evolved to the point where a layer one can provide 10 000 real user transactions per second at a fraction of a cent per transaction and also finality or consensus finality from three to five seconds and so if we keep looking under the hood what has made this these improvements possible is the algorithm powering the hedera network which is the hashgraph consensus algorithm so traditional blockchains you know like ethereum bitcoin they're proof of work they typically require heavy electrical and computational requirements the consensus is probabilistic right so it's just a good enough probability that your transaction is not going to be rolled back and it's somewhat inefficient because you're constantly pruning the branches you right you only want a single chain of blocks and so for those reasons it can be somewhat difficult to scale these traditional blockchains hedera on the other hand uses a hashgraph right that's an open source consensus algorithm and data structure it's a dag a directed acyclic graph and it basically uses two inventions uh that are novel which are gossip about gossip and also virtual voting and right now hedera supports the ten transactions ten thousand transactions per second um and also finality between three to five seconds if you did not understand anything i said or maybe you just spaced out this is another way to think about it right uh two different ways to solve a similar problem blockchains are usually chopping branches with the hashgraph there's no chopping everything is just weaved into the growth of the ledger and if you're trying to understand how the hedera network functions this is the engine right the hashgraph consensus algorithm and then on top of that there are network services for different use cases like the consensus service if you need a messaging decentralized messaging bus to log transactions immutably cheaply and at a very high throughput there's also also the token service for tokenizing everything from shoes to software licenses vaccines art you name it so you can create fungible and non-fungible tokens at the native layer and also evm compatible smart contracts for those use cases that need more flexibility and programmability the hedera governing council is what governs the operations of the network and i'm going to talk more about that in the next slide and on top of that foundation is where the use cases for data integrity tokenization decentralized identity supply chain payments and more that's where those use cases are built and so that's where the individuals the small teams the startups the enterprises governments even iot devices can build and add value and so this is the hedera governing council it's formed by 39 up to 39 leading global organizations diversified through different geographies continents markets even cloud infrastructure and also diversified through time because they can only serve for two three-year terms each member has equal influence in in the network so it's a 139th vote and there are different committees that provide transparency and document all the meeting minutes so that these discussions are made public and these are the companies and and universities running the network notes as well so some of the and they're also building use cases they're not just governing the direction they're also building use cases so it's companies like google ibm fpos the london school of economics ubisoft and many more so if we look at the hedera network today in terms of adoption and network activity it's not just for the big players right these are we also have a huge ecosystem of smaller players individuals small team startups building very interesting applications and we're happy to talk more about these if you stop by at our booth and so these are some of the metrics also of the adoption of the hedera network so as of yesterday we have processed more than 2.1 billion real user submitted transactions over half a million user accounts and there are more than 8 000 active developers with over 4 million transactions being processed each day and then in terms of network growth if we look at our path to decentralization this is something that is going to happen in phases right we want the stake of the network and the nodes to be distributed uh throughout the world so that no one party controls uh too much and this is going to happen in phases so in the first phase the nodes are run by the 39 governing council members in phase 2 we open the network and that's this is bound to happen this year we open the network to kyc'd community nodes and then the next step or phase three is opening the network to permissionless and anonymous nodes so that is the path to decentralization we want to build a network and a company that is around for 100 years plus and so we want to make sure we get this right so now that you know a little bit more about hedera and what it does i want to introduce wayland to show us how to start developing on the network and maybe how to start deploying a simple smart contract awesome thanks ed hey everybody my name is waylon i'm happy to be here i've been doing some devrel work for hadera and i do a lot of research on mathematics and consensus stability because i'm still a grad student so some of the research problems relevant to our our greater industry so i'm going to walk through some examples of how we can use maybe the javascript sdk to deploy some smart contracts on the hedera network we do have ten thousand dollars worth of bounties here on hedera so happy to talk more if you guys have questions just feel free to reach out to me or ed and we're happy to help show you guys how to use some of these development tools so to deploy a smart contract on hadera there's four steps we got to go through first of which we are going to need to compile the smart contract into bytecode this can be done with any solidity compiler i definitely recommend the soul c compiler because it's uh integrated into a lot of different tools and there's a soul cjs version as well there's a lot of a lot of good tools we know solidity development community is rich and thriving and there's a lot of amazing ecosystem tools there the next thing we need to do is store the bytecode of this smart contract in the hedera file service and this kind of is like the initiation code so files on hedera network actually aren't entirely immutable but once you deploy a contract from the file service your contract of course is immutable so your file the hedera file service has a variety of different use cases one of which is being leveraged to deploy your contracts to the network so after we have our smart contracts byte code stored in the hedera file service we make an api call and create our smart contract once our smart contract is deployed we can interact with it uh using different api calls uh accessing maybe some getter setter methods and playing with all sorts of different programmability that's fun and available from using smart contracts so let's take a look at an example of what some of these look like so this is just an example contract it kind of resembles a phone book it just has some gutter and setter of some information something super simple we just wanted to provide some elementary examples before we get too technical and how we would we would compile this with the soul c compiler and then read the byte code into a variable here in the javascript sdk and this is step one after this you're done the next thing you're going to need to do is you're going to use the hashgraph sdk to store the byte code in the hedera file service this is an example of how that looks it's fairly fairly simple you of course sign your transactions with your keys if you have any questions about this again feel free to reach out afterwards i'm happy to talk more about the different parameters in the sdk and some of the tools that we make available so after we upload our contract to the hedera file service we can use the contract create api call and here is where we actually deploy the contract to the network from the file service and if we have constructor parameters in our contract this is also where we would need to pass the constructor parameters as well after we have a contract deployed we can use the contract id to call the contract and interact with the contracts public viewable functions and that's about it here's some examples of calling rsetter and getter with our mobile phone book example contract and if you have any questions feel free to reach out and with that i'll i'll give it back to ed here and then the output of this example is you know what those pieces of code would uh log to the console right so for step two you show the bytecode file id so the file that you created on the network containing that bytecode then step three you basically show the smart contract id now on the hedera network and that also has an equivalent as a solidity address format and then the last step is basically getting the results of the functions of the smart contract that you're executing so for example with the constructor function you passed alice's phone number which was the one one one one right and then you queried that information so that's the first line that you see there in the step four the second step is you know making sure that that call was successful and then also outputting bob's number which is the two to two there that you see so that is a simple getter setter smart contract you know if you want um to deploy smart contracts that interact with hedera tokens we also have examples and tutorials to do that and with that i want to go into the last section for today which is getting resources to learn more about the hedera network and also web3 so you're going to get these slides and you'll have access to these links but i certainly recommend going to the hedera get started it's for developers and non-technical folks to learn more also the hedera learning center has great information about web3 and also hedera related concepts i encourage you to join the developer discord there's a ton of great technical discussions happening there and then great information on our documentation and also the hedera youtube channel in terms of tutorials and conceptual overviews even of our co-founder dr lehmann baird explaining many of these concepts but before you start you know building make sure you get a free testnet account you can scan this qr code now or once you get the slides but obviously that's a free account that gets recharged with 10 000 fake hbar for you to play and try and test out your applications as you develop them all right so hopefully in these last 20 minutes you learn about the hedera network how it works how you can start developing a simple smart contract or applications and also where to learn more about web3 and the hedera network with that i think we have a few more minutes for questions but we want to thank you for your attention
Automatic transcript — names and jargon may be misspelled.