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

Loading player…

Prize-Worthy: An Ethereum Python Hackathon Guide by Marc Garreau | Devcon SEA

DevconTue, Oct 7, 2025, 12:00 AM

An interactive and beginner-friendly Ethereum Python Speedrun tailored for hackathons, hosted by the EF Python team. Quickly get up to speed with fundamental building blocks, then stack them into a live application. By the end of this workshop, you'll have a clear idea of how to get your own projects off the ground. Speaker(s): Marc Garreau Skill level: Beginner Track: Developer Experience Keywords: Tooling, DevEx, Open Source Software, solidity Follow us: https://twitter.com/efdevcon, https://twitter.com/ethereum, https://warpcast.com/devcon Learn more about devcon: https://www.devcon.org/ Learn more about ethereum: https://ethereum.org/ Visit the https://archive.devcon.org/ to gain access to the entire library of Devcon talks with the ease of filtering, playlists, personalized suggestions, decentralized access on Swarm, IPFS and more. Devcon is the Ethereum conference for developers, researchers, thinkers, and makers. Devcon SEA was held in Bangkok, Thailand on Nov 12 - Nov 15, 2024. Devcon is organized and presented by the Ethereum Foundation. To find out more, please visit https://ethereum.foundation/

Transcript

[Music] [Music] Showtime cool good morning everyone thanks for hanging around for a few extra minutes when you're ready switch over to slides please thanks very much um welcome everyone to prizeweek hackathon guide briefly some introductions I'm Mark or WM online uh joined the EF in 2017 and these days I'm here with my colleagues Carrie Stu Felipe and Paul and with our powers combined we form the EF python tooling team so what that means is uh we maintain web 3 pi and a collection of 20 odd other open source free and open libraries all in the python sphere and our team is focused on uh three Northstar goals for the next um foreseeable future at least early next year um relevant to us here I hope that something we do here today is in service of this educate and Inspire Builders uh goal here my hypothesis uh relevant to this week is that a hackathon is still the best way to to launch a career a product a company in this industry so my goal for you within this context is to give you bit of a a game plan a road map for how to make the most of python tools within a hackathon environment um and to have you feeling a bit excited about trying out some new tools in the python sphere um let's see if we can get anybody here a little bit of value right out of the gate um is anybody like up if you are attending eth Bangkok this weekend a smattering Cool Hand raised if you are potentially looking for a team or if you have a team and potentially may be looking to draft some more members to your team couple few okay this is who you need to meet at the conclusion of this Workshop job done okay why hackathons why is this still such a good use of your time um the obvious one is prizes uh but also very importantly uh mentorship is awesome at these hackathons you'll have staff level Engineers like waiting for you to uh walk up and ask them some questions similar vein you're likely to meet your next employer or investor at U one of these types of events um peer networking is actually fun and meaningful in this context if you share what you're doing you can build your own reputation as a builder uh learn new skills at the bleeding edge um undervalued uh skill in every industry is learning how to better present your ideas and if you're the entrepreneurial type you'll find out if anybody cares about what you're building all within a week in a lowrisk environment uh so so this pitch is kind of aimed at the a more newcomer audience but for those who've been around a while the same points apply I encourage you to get back out jump into a hackathon um have some fun and get out of your comfort zone once in a while and then oh yeah did I mention there's a lot of money on the table so game plan um what's in store today is uh we're actually going to air quotes build a prew worthy hackathon project here today or at least we're going to talk through it um I'm going to interject some personal Pro tips as well some that have crowd sourced around here as dadan says they call it a hackathon because you're literally hacking your way around a dark Forest of deprecated code unreleased features and out ofate docks and honestly I wouldn't have it any other way you're are kind of doing the industry of service here by battle testing the bleeding edge here and that's a good thing um and in this talk we're going to use a hackathon project that um a couple of my colleagues and I built at a recent hackathon um that went on to get recognized for at least a third price third place price prize uh in one of the optimism categories so prize worthy credibility established every hackathon begins with an idea or does it I encourage you actually just to sign up before you get to that point because it's a normal pattern everybody does it the tldrs you're going to figure it out or join somebody who has now that we've gotten that out of the way where do good ideas come from might be helpful to think about them in the context of different buckets these are most of the prizewinning projects I've seen come from either Dev tools consumer apps or this kind of catch all category data projects which could be described as um visualizing blockchain data in a way that's actionable or meaningful or sheds light in a new way um best case scenario though is you scratch your own itch so as you're doing your dayto day keep an eye out and log like apps and tools you wish existed pain points that you come across and then you can watch out for other people doing the same thing on social media here and then reference that log as you approach your next hackathon um eth Global has a project showcase page um some events include idea brainstorming and team formation events and then uh sponsors will tell you more or less exactly what they're looking for um participation opportunity here does anybody else like to find Opportunities or ideas somewhere else any ideas come to mind and I have a bribe I got some of these um snaky mix snake face pins they are NFC tag so if you scan with your phone it'll bring you to the web 3 docs web 3 Pi docs but you can reprogram them to your own thing going once nailed it somebody give him a pin any others good enough uh so you've got the colonel of an IDE um how do you know it's the right one just some first principles thinking here um who's it for start with the who always what's their goal what do they want to do um how do they get there today and how do they fall how do those options fall short and then now the big reveal is options that you could provide to improve the situation so if you apply this small framework and are honest with yourself about what you're building ask yourself some uh to the point questions you should have a good idea here does the user actually exist Does the problem actually exist uh does does your solution reduce some barrier to entry there and uh if you answer yes to those questions then I think you're you're good to roll um So Pro tip I think it's natural for people when they come across an idea that they're excited about uh to to guard it and potentially not share it in the fear that somebody might take it and run with it or something to that effect um but I'm here to tell you that the same types of ideas are built at every hackathon that's okay execution is everything it's likely that you're going to Pivot once you get out there anyway so get like let's make that happen earlier in the process and then if you share your idea out there you're likely to um number one potentially rally some teammates around you um but it's also an awesome idea to get the judge's radar even before you get cook in here so I love this Pro tip from Manny idate and validate right away get the idea in front of the judge and gauge the reaction if they're not loving it there's no amount of love you can give to this project to win get the judges on board so they're excited to see your project and you can do this before the hackathon even starts or right as the hackathon starts kind of thing um so that's the good stuff um if anyone's brave enough I was going to invite you to do it here here if anybody's got an idea they thinking about for this this weekend um or maybe a hackathon next this is a real on the spot thing is anybody feeling brave I don't blame you okay let's talk through it from popup faucet the uh the prize winner that my colleagues and I worked on so popup faucet um this is a scratching my own itch sort of situation as a workshop host I'm looking to make sure any attendees uh can get test net ether in order to participate in some event I'm trying to um help them through um so my goal is to efficiently get that test net ether into their hands and um as a as a host of a workshop I got a million other things I'm planning I need this to be simple easy reliable what are my current options um there's a variety of them out there I've seen people preed accounts like cut out physical QR codes to hand out to people um when I say faucet what's the first word or emotion that comes to mind pain pain is pain is the right answer yeah a test net faucet there's so much pain associated with that um so they're they're third like they're they're they're external points of failure right so some of them have daily limits you might exhaust um some of them might try to get you into like a marketing funnel where you have to create an account all this kind of stuff um a lot of them just suck um and then you got other options here um but for the rest of this Workshop we're going to try and talk talk through um those the solution that we came up with and um how python tooling makes it happen sound good this is my caffeine break all right the first obligatory uh image here for those of you whove been in tech for long enough you might hate this image this is from like the The Lean Startup movement and the whole motivation behind it is um to to discourage waterfall development so building a bunch of pieces in isolation putting it together at the end and hoping it works this is an especially bad strategy for a hackathon um the encouragement here is get to a get to a happy path as soon as you can working software needs to be in front of judges um when it comes to like a week weekend long hackathon like you got to basically focus on proof of concept here so you're delivering like the skateboard or the uh the scooter version of things in all likelihood um as Steph puts it um follow the keep it simple uh Stupid the kiss rule get a solid MVP or happy path for app before you start to hook in random bounties or get yourself in trouble elsewise um that that established let's chat through the the popup faucet um kind of mapping of the the diagram of of what we're going to be building here so starting from the UI um the question I asked myself is what's the least possible friction here as a workshop host what can I what can I get away with essentially and I would love to be able to just tell a system I I'm hosting this event give it like a unique event code and then send some um test net ether to an address and be done with the thing and attendee then can come along and use that event code as like a password of sorts and specify the address they want this test net ether sent to and that'd be the end of that story um knowing my users are are python developers I feel comfortable um meeting them in the command line via like a a CLI app and distributing that um getting it into their hands via python package and you know as important as what we're building is what we're not importing or not building um contract I want this to be accessible to um not just myself but anybody to come and spin up a faucet for so I'm looking to build one smart contract that can handle an arbitrary number of faucets it needs to at least have a couple of pieces of basic functionality creating faucets and attendees need to be able to drip from them and then that contract needs to keep track of essentially which faucets exist and how much funding is available for each of them to trip from and again we don't care about security or gas efficiency for um hackathons and doubly so because this is is a test net product um there's a missing piece here if I want to accomplish that level of user experience the contract interactions if I'm not going to have the workshop host or attendee do them themselves and I need to make that happen elsewhere so we're going to introduce this third server component a server can also handle some Secrets like um the admin private key if we're going to sponsor in effect those test net um drips and then we're connecting to an RPC URL we can stash that away too um this an important takeaway for this exercise is that um a common misconception is that you know in order to build adap every bit of the functionality needs to live within a smart contract um decentralization is a spectrum um This Server does not preclude anybody else from using the contract um I'm just introducing the server to give like to provide a nicer user experience should you choose to use it so for the visual Learners um starting with like the the user experience here it's as simple as a host uh entering into a command line app I want to create an event uh with a given name event one two3 the server responds back great send that test net ether to this particular address and then give you a sucess ESS response once you've done so then attendee will complete the loop basically by saying I want to drip from this particular faucet and here's the address I want that sent to and have it happen so as far as the users are concerned they don't have to care the rest can be magic um but for our sake here this is what the full Inplay um Can will end up looking like um so our server [Music] um the the takeaway here is that the the CLI can be um completely naive it doesn't have to know that a blockchain exists doesn't have to have an import of web 3 Pi or um much else for that matter it just needs to know where the server lives and what endpoints live the server then can have um will be blockchain aware basically it's got a web 3 Pi instance it knows where the contracts live are deployed and and um it it does that interaction between um the contract and the user so we'll get into some of the specifics here um as we go along um I think that's a sufficient starting point contract so we're going to start um by building the contract first um getting to some of the fun stuff here the next few um let's say three is chapters are going to be more code heavy we'll look at some examples um look at some some fun little bit of experimental tooling as well um but just a little bit of context here um this is liable to ruffle some feathers but in the context of a hackathon um a lot of cases like your stack choices aren't that important I'm going to skip to the the punch line which is just to be clear about your goals so if you come into a hackathon with a goal of learning a new technology say viper um do that if your goal is to ship a consumer product and try to win as many bounties as possible then in all likelihood the judges are uh not going to care anywhere to the nearest like to the same extent about uh what underpins that they're looking for the the user experience whether or not you delivered on on those promises that you set out to tackle um as Billy puts here um very few judges are actually checking the technical backend workings and take the project to face value Maybe dirty little secret but this is like just a practical consideration right every judge isn't going to go around and audit your smart contract because this it's impossible uh so focus on what matters presentation plays an important role here and we'll get into that a bit more as well well another Pro tip is to take shortcuts there's some awesome building blocks out there um in each language um this list of resources um there there is a companion blog post to this Workshop so um you can safely ignore this list and uh I will give you access um to all the resources in this this Workshop um there'll be a QR code at the end here but the point here is that it's not like plagiarizing to use these building blocks that's what they're there for um make sure you give them any appropriate shoutouts and respect whatever license they've got but um that's their intention to be used as building blocks um so we're going to do a little demo um May the live demo Gods be in our favor so we're going to talk about a couple tools first is um snco this is a tool um I've been hacking on a lot recently um it's it's we're going to use it to get off the ground basically it's a moving quickly tool and then we're going to graduate um so to speak into an ape um so let's let's see what happens um we are going to be using uh snco so this is a hackathon worthy project in its own right um You can download it yourself now it's available as a python package uh via pip install snco s n KO once it's on your Mach your machine uh you can either give it a uh path to open up some smart contracts within or just take the demo contracts that come out of uh as default um so this little app is uh made possible by this wild python package called textual it's a uh a Tui a terminal based interface or a text based uh like a text user interface so you can see that we're we're in a terminal here U but we've got some like hover States and clickable buttons and basically a graphical user interface um and what it accomplishes is basically uh lets you poke around at and hopefully understand contracts you're you're using you're referencing um enough to give you confidence in um kind of taking the next step and we'll talk about what next step means here um so we've got support for Viper and solidity in here uh there is code highlighting and compilation abilities in here and so what we're going to do is briefly walk through the puppet faucet contract and solidity here and then talk through the uh the features of snco um so real quick the the pop-up faucet contract is 63 lines in length and half of that is is uh the the functionality essentially that you need to care about so this contract popup faucet it's keeping track of a couple pieces of State um as we've mentioned in a previous slide or as I've I'm the only one up here turns out um we're keeping track of each of the event codes and how much funding are available in them and uh whether or not an event code is reserved um this contract will emit three events when things we care about happen a Constructor function just sets an initial owner for the contract and then um there is a piece here we haven't discussed yet which is uh the answer to the question like what prevents a bad actor out there from draining all of the available test net ether out there and the answer is that we are just referencing the hash of the event code whenever um we reference the event code so what that means is um this is just a helper function here um to take in an event code and give you the a 32 by hash of that event code so it's a unique identifier so to speak and these these hash functions are their purposes um to it's a it's a they cannot be reverse engineered right so um we take the hash of the event code and that's what we're going to reference whenever we are um creating or dripping from a faucet and hopefully if that's unclear it will become more clear uh next uh the create function this there we go um so when when a workshop host wants to create a faucet uh we are going to do a couple sense checks here we're going to make sure that they've provided ether to fund that faucet and then we're going to take the hash of the event code and make sure it uh is not already reserved uh we are oh sorry I'm going to leave that there and then just two pieces of functionality here to to to make it all happen um we are going to increment by whatever amount the whatever amount of ether the host sent in we're going to increment the available funds of that hashed event code and we will Reserve that event code or the hash of that event code uh emitting an event just makes it observable now the other side of the funnel here um when we come along to drip this is in hackathon fashion uh we've got a hard-coded drip amount here we do two cents checks to make sure that there are available funds to distribute and then we uh we do the reverse of the create right we decrement the the amount of funds that are available here uh in the hash devent code and then uh in also hackathon fashion call is the more efficient way to send or more safe way to send around but um we then distribute the funds to uh whichever recipient whatever address was specified here so this is that's the the bones like the the meat of um the contract right that that accomplishes effectively the the whole dance here we've got a topup function and a couple of uh convenience functions at the bottom here to look up whether or not a code an event code has been reserved or not and how much funding is available um so that's the contract I am going to collapse it now and show you the rest of the functionality here um when like if you want to interact with a contract or if you want to deploy a contract start first uh you're going to need some metadata um importantly the ABI and the bik code so snco gives you this compilation functionality built in here um but to go a step further um snco can help you understand what a contract is capable of using this little playground tab in the editor um so this is remix inspired um what you see Happening Here is there's a a a web 3 Pi based um test environment so we're using what's called eth tester in the background meaning we've got um 10 of these preceeded accounts and we can use them to for example deploy this contract in our local environment and uh you'll see the remix inspiration here um blue buttons are read functionality and orange buttons are WR so you can play with a contract help you understand what's happening here this is uh especially useful I think when you're inheriting a lot of functionality so if you've working with a token contract and you're inheriting tons of modules um you might like only for example have a init method in your contract itself um but this will reveal exactly how much functionality lies underneath so we can understand for example that if um like we create a Devcon or we're looking to create a Devcon event uh code here that it is available to reserve uh if we do so spelled correctly um we'll get an error saying that well basically we need to include some funding along the way um but you can see if we create this event our contract balance increments the the code is reserved now the funds available and you can complete the cycle with the the drip and um switch around accounts you can see that our balance here is decremented because we've used some gas to deploy the simulated contract um so that's that's what snco has to offer um the last piece of functionality here is is to kind of Kickstart the next leg of your journey by generating a a sample script um and or more robustly an ape project um so you click that button uh what is going to happen here as we generate a new directory and let's dig in to what happened there um so you'll get a little Remy to to explain basically how to get off the ground here um we're going to do a we're going to do like the the 2minute speedrun of of ape here and um my ape friends over here can tell me later about what I left out um so what you get uh when you click that generate eight project is a we poured over the contract so here's pop-up faucet contract um you get a scripts directory and a test directory and a config file so ape is a plug-in based smart contract development framework um it is extensible via these plugins which we specify here uh testing very good idea even if you're in hackathon mode just to build some confidence um make sure that if you introduce some new features you didn't uh include some egregious regression along the way um but testing in ape is all done via python you have the ability to specify fixtures that you want to use in any of the test files in this conf contest file the contract um so for example we have this deployed um instance of pop-up faucet that we can then reference as contract faucet in this test file here so in the event that you're testing the the faucet creation uh we can reference as an as an argument contract faucet and then jump right into using the create function um so these are this is a nice interface that ape provides to you um a little uh it strips out some of the the characters from what you might be doing directly within web 3 Pi anyway so contract faucet create we give it a a name and a an an amount we that we're seeding the faucet with and then assert that the available of funds is what we expect uh similar idea with drip uh and then finally a deploy script uh this is a simple get off the ground version uh this will need an address to set as the owner of the contract uh but we'll see this in action basically this there's a lot of fancy decorator stuff going on here um the things you need to care about is this select account function is is an awesome handy way to um bounce between accounts that you want to do any deploying or scripting with um the deploy function here will then um do as you expect and you'll get some confirmation that this happens so you can get more sophisticated than this but this is I would say uh a perfectly great starting point for hackathon in particular I am going to hopefully get to a more sane operating place here um but if we jump into here just to give you the the basic idea of what's what it's like to operate within an AP project um we'll see if the internet cooperates here so ape gives you this command line interface um [Music] we right so um making your way through ape you have uh you have the ape keyword that you can use to uh do the basic set of functionality which can be summarized as compiling uh testing and running scripts which includes deploying so you can ignore These Warnings here [Laughter] potentially um but eventually we get to a place where we where we compile there you go um then ape test and your terminal we'll run through those three examples there we had a smoke test a test of the creation of the faucet and the dripping of the of the the faucet and then any scripts can be uh executed with ap run so deploy is the name of that file in there and then we can specify uh in network but for these purposes I'm just going to deploy to a local e tester instance and it didn't respect that I updated this boom okay so at this point you have a deployed contract um we've simulated it but it looks uh identical give or take to deploying it to a test net right and so if we want the this contract deployed on um if we wanted to support multiple networks then of course you need to run this this exercise this this deploy script uh as many times as the networks you want it to live on um but we've accomplished the goal of getting our pop-up popup faucet contract deployed and ready for use uh from here we're going to look to do something with that contract right so we've got um as a result of compiling a contract we've got an ABI and uh that bik code um after deploying a contract we've still got the AP ABI but we've also got a deployed contract address uh so what happens next right um here we're going to detour a little bit we're going to do a speedrun of web 3 Pi um and then check out some we're going to go a little bit beyond the basics there for part two and then for part three we'll jump back into the popup faucet server to put it into action um so we will communicate with the contract at that point uh speedrun I want to emphasize that this is uh the goal here is not to have you feeling like you understood every line of code in here the goal is to make you aware of the scope of of the tool here um you'll yeah if I do this right you will know like effectively where to look up in the docs where what you need from here so if you know three basic concepts here within web3 Pi uh you're 90 some odd per of the way there uh provider configuration important part of part of this and then we're going to do some reading and writing to a blockchain so provider config uh the starting point for most people is to import the HTTP provider um give it an address where you're pointing at to uh a ethereum node or evm compatible node and you're often running so uh you can think of the the Prof provider as needing um two things right one is the um the networking protocol so either HTTP IPC or websockets and then you got to tell web3 Pi where the node lives either on your local machine or hosted elsewhere um if you're doing a lot of data lookups this is your nudge to to use one of the asynchronous uh providers because you're going to save a ton of time here another important takeaway here is that um you use the same web 3 Pi interface to connect to main ethereum a test net of ethereum uh an L2 or an L2 testet um effectively any node that implements the the ethereum Json RPC spec um as you saw in snco uh we made use of this eth tester provider so this is what's giving you in the background um some preceded accounts and some other um bits that make um that abstract away some of the message signing and uh signing and sending that kind of stuff and then finally i' like to give a nudge to the uh the the websocket provider which has received a a ton of investment in the last year this is uh you're only going to get some subsets of the functionality within web3 Pi via a these persistent um socket providers so for example you can use eth subscribe within this provider and react to real-time events as they occur so in this example we see um that occurring as new blocks are added to the chain you can listen for them and handle them as you see fit all right that's provider um read operations these are things that don't require a transaction gas whatever uh you're just querying your node at at no expense effectively so you can do things like look up balances get block and transaction data uh interact with contracts in a way that doesn't uh manipulate state of the blockchain and and parse event logs these are um in the pop-up faucet contract you saw that we emitted some events so get logs is the way that you can reference uh historical events on chain um again a plug for the websocket provider if you want to respond to these in real time uh you can build arbitrarily complex uh filters for that you can subscribe to events that match that functionality and then handle those uh events as they occur if you want to change the state of the world in a blockchain you need to send a transaction the simplest version of that is sending ether from one account to another uh you can write to a contract you just transact as used instead of uh call and you can deploy contracts so under the hood um this is what ape is saving you from doing but um yeah still a a framework like ape is preferable to to doing this just because you can build confidence using like an accompanying test Suite or any other scripting that you want to do um all right those are the basics the I've picked out a few other um components here that might be useful to you especially as a hackathon participant the first thing and I'm not going to include any code here is um that if you need web3 pi to do something more than it natively does you have a lot of options um primarily middleware or a custom method module or provider you can kind of reinvent any of these wheels here um good idea is to make your app more human readable so Leverage The ens module to for example resolve addresses to names in your app or you can also um like there is a bunch of other metadata that you can store along with an enss record so if you're building some kind of user profile you can grab any of that as well uh there's another kind of wacky um feature in here which is called ccip read where you can resolve addresses offchain if that's interesting to your use case then we've got a a blog post for that eth account so we're going to see this um we're actually going to use this within the the CLI but um you can access e account from within web3 Pi or individually it can be used to create accounts on the fly or load up um one that you've already got and then sign transactions or messages eth udal this is a huge library of helper methods basically so I'm just going to highlight a couple ones here um the ABI utilities and the the humanize utilities um so another big investment this year went into ABI utils here if you need to kind of dice up your ABI in any any uh any variety of ways and it's um this is this comes up pretty frequently in various use cases there's a whole library for that um shout out to Stu over here for that investment this year and then uh the humanize um module here is just a way to get more human readable versions of whatever data you're working with so convenient way to for example display uh whey amounts which are typically uh huge integer values all right let's put some of this into action within the server um this is our uh our part in the diagram in the middle there that connects the CLI and the contract um so our server is going to be uh a simple flas G or relatively simple I should say so just a few routes in here um at a minimum we need to be able to create and dri drip but there's some other uh convenience stuff in here um So within that flask app we can handle some um Secrets uh if as a result of compiling a contract um you you can get this uh artifacts or um I forget ape calls it the local Json file um so at any rate the result of your compilation of your contracts can produce a Json file with with the metadata you need um and effectively we can um set up our web three instance and contract that we care about here now this app handles multi Network support so the main takeaway here there's a lot of code on the screen the main takeaway is just that your web 3 or you need to create a separate web 3 instance for each chain you're interacting with um the rest of this file is basically setting up like a a helper function to you get this this dictionary of each uh Network then a helper function to parse out the network that you care about here so you can just call get W3 and contract subia and then get those that you're interested in and we'll go over two more code examples here one contract read and one contract write if we've got a in the server a an availability checking function um we can parse out uh the user will tell you right I want I want to operate on um op sapoia and I want to a host will try and register an event code so Devcon on Opia we'll parse out the right the appropriate web 3 instance and contract and then call the code available function on that contract and then return the value to the user so pretty straightforward it gets a little hairier on when you want to write to the contract um so I I omitted from the the speedrun here that if you want to do this uh if you want to write to the contract there's there's three steps um building a transaction signing a transaction and sending the transaction so you can see um same same idea just a couple more steps um I'll save this for for docs there's a nice page on on what it takes to send a transaction here um other takeaway here is that the life cycle of a transaction is such that you um you will send it and at the point it gets sent it becomes a pending transaction so you need to wait for it to be included into a block before you can um for example tell the user that your faucet creation was a success okay get into the home stretch here uh we've got our contract we've got our server and now the UI um just an encouragement to get a little creative here in the python side of things I think there's maybe a misconception that you who don't have that many options for user interfaces um you can get weird and I encourage you to so the CLI tooling we're about to look at for um for the UI Tui is um textual for example you saw that used in snco um but Discord and telegram Bots and so on and so forth you might also consider um a like a hackathon viable project could be a module that you build um as a developer tool within web 3 Pi um so if you want to um I don't have an example here if you want to do something weird and make it available to the world that could be a a way to to to go about it and then consider how you're going to get that thing into the hands of your users right so for for our example uh we're going to make popup faucet available as a python package so you can pip install it one more Pro tip and this is basically an unpaid plug for excal draw um I found it helpful to to think through what I was going to build in this this sort of diagram format the shapes are meaningless here but um we're going to build essentially um couple pieces of functionality uh create and drip can fail in certain ways and um it's helpful to think through that uh visually um okay so I've got a backup plan here but again if the demo Gods cooperate um let's take a look at um what popup faucet looks like um again available via pip install and once it's on your machine hopefully it is cool uh you can do a few commands which are available here in the the help screen so starting with the the admin the the the workshop host experience I want to tell her I want to create a network or a faucet excuse me I can specify an event code and it's off to the server to confirm that this doesn't already ex this is not already reserved in the contract and come back and say uh great it's available send your test net ether to this address and uh we will take care of the rest now I'm not in the process of sending any ether so we're just going to spin here and say no go but that is the uh create side of the experience then on the other end you can drip so I would have attendees pip installed pop-up faucet they can come along and say uh I would like to uh get a drip on Bas ofoia and I'll specify some given event code uh I'm just going to zero out this I'm going to basically burn a little bit of testet ether here but they'll come along give the event code and the address they want to receive e threat and that's that's the whole of the story uh there's a couple more pieces of functionality here but I think that serves our purposes um so let's talk about uh just a couple more code samples to explain what's Happening Here fortunately I don't have to show my backup plan uh okay so in this example we're going to use the concept of ephemeral accounts so we're going to uh import eth account on its own without web3 Pi we're in the the CLI app now this is separate from the server separate from the contract and um this is using click a command line interface Library um again this is another slide with a lot of code on it I'm going to just drill down to the heart of it so we're uh we're asking the user for that Network and um uh this is the create function we're asking the user for that that Network and event code they want to create we're going to um send it off to the server to ask is this available is this registered in the the contract and then if it's available then we say great let's generate an account on the Fly and I want you to I Want You Workshop host to send some ether to it so this account lives nowhere but within popup faucet the application the command line application um and then this this input at the very bottom here is just gonna just going to hang GNA wait for the the user to indicate they have sent um yeah last code sample um once I have indicated that I've sent The Ether to that address um we're going to verify that's true first of all and when it is we'll break out of that Loop and say um great we're now going to send the private key of that account we just created uh over to the server and the server will build sign and send uh that transaction to actually do the to you know to interact with the popup faucet contract and actually do the creation of the the faucet um so this this account exists only for uh well it exists in perpetude but as far as the the user is concerned it exists only for the lifetime of this creation of of a a faucet um I suspect um depending on how much I stumbled over my words this is this is an area where I I I could have lost some people um I'll pause now is is there any um question on um what the ephemeral account is or is doing or um could zoom out a little bit too and ask like why the server is necessary or what the separation of concerns are for the the CLI app in the server and if you don't feel comfortable asking now then come come poke me after okay I'll assume I'm just doing an awesome job okay a couple last tips um we're going to run through these real quick and then um wrap this thing up uh some presentation bits here so eth go asks for a two to four minute recorded video of your your functionality um the very good news here is that you've got the template of how to do this already if you went through the exercise at the beginning um so who what how and now basically what we did um as like for this demo is to to explain like um we're solving a problem uh for Workshop host that want to get test net ether into the hands of attendees in a reliable and non-spammy way and the options today look like X Y and Z uh what we can offer is this uh simplified experience um that is pop-up faucet uh and then demo the thing and um it's hard to understate like the importance of the presentation component in hackathons so start earlier than you think you need to at least 75% of the way or at Max 75% of the way through your like your time budget um it should be it it should be pretty polished right because this is all that the judges have to go on um Tony takes this to another extreme I would say and says like do the video and presentation first um even by using a a mockup so before you even build the actual thing um build the mockup and I don't know figma or whatever Tool uh you know how to use and then um spend the time like living up to that promise or pivoting if you can't get there I guess um final note is um just emphasizing that mvp process get to the Happy path as soon as you can but then you can balance the rest of your time with uh doing some iterative Loops either on the product or the presentation um chasing bounties adding Graphics uh making stuff pretty so in the pop-up faucet example some of the like uh subsequent Loops we made of Polish were um like loading animations colors bolds fonts in the CLI just reaching into like rich is a the library we use for most of that on the uh the python side and yeah doing doing some loops on that um that presentation uh that's that's the whole of it I think um for those of you hacking good luck this weekend um and we have uh a bit of time here so I'm going to leave the floor open for for any question but also if anybody out there um wants a snaky M snake face NFC tag pin if you want to check in and share either any um pakon Pro tips you have or maybe war war stories or horror stories from maons you've been in um if anybody wants to pitch an idea go through yeah please you said you to share that yeah let me um let me put that up first so this is the last slide here um there's a blog post on our snake Charmers do uh ethereum.org um blog and you'll find like the tldr of this workshop and I think most of the the resources that we've chatted about so I'll leave that up for a minute and then um leave the floor open at any rate please know walking down the show floor a lot of boost out here a lot of people and if you just talk to you get all kinds of ideas and you can just yeah sorry I'm rarely accused of not being able to be heard um you just just talked to people yesterday I had a great chat with the cursive folks downstairs and that just kicked off a whole series of ideas and there were about six of us just you know pinging off each other uh you can do that at lunch you can do that in the booths it's just it's fun and most of it may go nowhere but it's phenomenal hackathon material amen yeah I think this uh conferences in general Devcon maybe especially is especially right before a big um hackathon is is it's prime time for just bouncing ideas getting weird um kind of wondering out loud with people what's possible spitballing uh hearing people's like kind of wish lists for what they they wished exists or vague directions they're heading in but don't have all the answers to yet and yeah sometimes uh there's gold in there helping them figure out how to get to that that place please that cheers thanks for using it you know one thing that I interesting was you of almost like ining presentation you're uh incentivizing doing the presentation before the coding um and you know it's kind of interesting because sometimes it feels like there's teams that develop something that's truly amazing but they never like surface something in the visually and they kind of get outrun by somebody that just spends the time and you know kind of the nice Graphics so is there is it like any efforts to try to make it more like um you know in the sense of what really matters which is the uh kind of like kind of both matter to be honest like the presentation also matters but sometimes it feels a bit unfair that you know you got somebody that really good with Graphics but then doesn't have anything working at the back end they don't deploy they it's not working so is there anything we can do to make it more fair in that way yeah it's a great question I think um many or most hackathons do have uh criteria that you need to qualify for so it like uh I'm not sure the specifics of eth global but I believe you need to have deployed code and working code to qualify for some prices um that may not be used universally true I'm not sure of the circumstances but I do think yes there's an unfortunate disconnect between um developers doing really cool valuable work and not getting recognized in the ways they should because their presentation just doesn't live up to some of their competitors um I don't have a great answer to that but one of the things uh that I will be spending some of my efforts for in this like at the top of the talk we talked about um our team goals one of them being educate and Inspire Builders I think one of the things I'm going to spend some more effort on is like a better launching point potentially for helping um presentations get somewhere faster um I think the simplest version of that is just like slide deck templates honestly that give you a better heads up a better lean into like what judges want to hear um but I'm super curious about if anybody else in in the room and Beyond has ideas about how we can improve the ability for hackathon participants to present their ideas effectively thank you sure just speaking on that um obviously the the presentation itself is quite important but I suppose there could be some talking about talking to the judges and and sort of briefing or you having this idea of waiting utility uh rather than just uh you know a pretty new startup kind of product yeah I think you're under something there um some interface and maybe like one that happens earlier in the process um because time is obviously such a a constraint on in this process especially if you're doing like a weekend hackathon and you get like hundreds if not thousands of submissions kind of thing like some of the virtual hackathons have huge audiences um yeah so you are at the mercy as a as a hackathon project submitter you at the mercy of the process that um eth Global in this example facilitates and they've had a lot of iterations they do a lot of things really well but nothing will ever be perfect uh so you're at the mercy of their process and um the luck basically of whatever judges end up reviewing your project so not every judge reviews every project that's infeasible um so yeah man some of this comes down to like tough luck um but I do think you're on to something with ideating about how we can better inform judges to the real utility and um yeah of of those projects you got my you got my wheels turned in so thanks curious to chat about this more sure I'd be really curious to see your um ideation of like from now to the hackathon looking through the sponsors list you know what would be your thought process on um this is the type of things that I'd be doing and just you know give us a bit of a you know your idea of like well if it was me and I've got from now to there and this is where the money's coming from I'd be going to talk to this person this person this person I don't know if we've got enough time for that but um be very interested to get your let me do a time check we I don't know if anyone else interested in that okay so um great question I'm not super confident that I'll have answers that will really thrill and and inspire you here but okay probably be better than me um but let's run with it and if anybody I'm I'm going to like I'm going to see if I can multitask and think through this if anybody else um has ideas questions Etc feel free to jump in as well so eth Global um and you're talking specifically about this week for yeah we're going to the hackathon and you know F first time and um Ju Just wondering you know from the literature that's already there and the and the like um the other gentleman said talking to the people that's around and obviously they've got their sponsors list on this um page here somewhere like what what would your you how would you best use your time from now to there yeah is that something other people would find in the Stream so um this is an awesome question I am um I'm not going to pretend like I will be give you the best answer alone so I think this is like a great opportunity to sort of crowdsource the answer from the room um what I where as a starting point um my inclination and like what gets me excited is um scratching my own itch basically So like um pop-up faucet I wanted to see exist um because in the hackathon prior to the one we built this in or even during um we experienced the pain of using um testnet faucets and trying to rack up enough testnet ether to do a bunch of experimenting um so I really wanted to see popup faucet exist um and that was very motivating for me to go and just make it happen to like spec out the simplest way to get there and then start building um so that's always where I will encourage folks to start right if you are scratching your own your own itch then you you effectively have to do a lot less research on your target user right because what do you want um there's a million other approaches to this I would say one of the obvious approach um options is just to take a look at the prize list and um this is going to be like a more I think overwhelming exercise than many other um eth Global or other hackathon events because there are so many sponsors this year so it' be tough I would guess to to narrow down if you're if you're coming here with um no preconceived ideas of I want to do approximately X and I just start running through this list um sure I think you'll start to generate some ideas uh it is a strategy it might also be a little bit overwhelming to find a starting point in all of this so um you could spend ages like just looking up each of these companies trying to understand what they do looking at their docks to try to see if they're um intelligible straightforward actionable um but yeah let's let's uh well let's see yeah yeah it's a great Point um is there like a a pool of people who have specializations in certain things that you're looking for maybe there's a matchmaking sort of process yeah um if I may paraphrase um the the suggestion is is to use mentors effectively um uh you can bounce ideas off of them ask um other folks what they want to see what they're interested in um and again Devcon is a great place to just go kind of Booth to booth and talk about like Express that you're you're looking for a hack at on ideas that's a great like conversation starter and um yeah I suspect you get a lot of great food for thought at least in the back over here yeah thanks just following up on that question and because this was python oriented um which might not be the most the sort of uh used language in in the block space uh blockchain space so as for for a python oriented person where would you say that uh the most opportunities would be in terms of hacking um let us say where you you typically see the this Pon oriented person sort of approaching uh blockchain problems another great question short answer is um I don't know exactly but I could speculate that um chat Bots are probably a really popular Avenue to go down um telegram or Discord Bots because there are python libraries to build those out um and like our whole industry lives on Discord and telegram for better or worse so you can reach your audience that way that's my first thought anyway any other questions otherwise we can wrap it up all right thank everybody for your time

Automatic transcript — names and jargon may be misspelled.