[Music] Hey everyone. So yeah, I'm BC Devil at the Flow Foundation and yeah, if you are hacking for E Global, which you obviously are, and want something that's fast, easy, and powerful, you've come to the right place. So in this workshop we're going to show you how to build a project on flow from scratch. Uh so whether you yeah experienced solidity dev or just totally new to web3 um this will work for you. Let's start with the obvious.
Why build on flow? Like why even care about flow when you have tons of chains to pick from? Um so why what does flow actually makes it worth your time? So let's show you that. Um, we should probably take a few step back and actually look at the past.
If you look at the past and look at like the there was actually a few onchain apps in the market and it was only up till one specific point where we see this massive spike. Um, can anyone guess what happened and caused this spike? Any guesses?
Yes, I heard CryptoKitties. So, CryptoKitties is the first like or was the first viral blockchain game. It was actually so viral that it broke the whole Ethereum network. So, all of a sudden like the future of finance what like was in danger. People were really really mad at our team for putting cats on chain because their apps would suddenly stop working on Ethereum.
Um but yeah, the Flow Foundation team is the same people who built CryptoKitties. So, we just knew something had to change. It didn't really make sense that you would spend $5 on a kitty and then have to pay $50 for gas fees. It also didn't make sense from a UX uh perspective to require the users to know what a web free wallet is, to go to an exchange, fund the wallet with Ethereum and then do a bunch of um transaction approvals. Another thing is also just from the developers spec perspective uh it doesn't make sense that you would have to like write your smart contract and then get it audited like pay thousands of dollars and then still ship it with bucks because that's literally what happened to the cryptokitties team.
We we had two different auditors and like paid them like thousands of dollars and when we shipped cryptokitties it still had bucks in the code and that's because solidity is just a very difficult smart contract language to use. Um so when major brands like NBA came uh and they wanted to work with the cryptokitties team we knew we needed some like a new type of network that could scale to the billions. So that's essentially why we built flow. We wanted to build something um that like would basically create value for real users like create real apps that solve real problems. So flow isn't just like some EVM clone or like yeah roll up uh it's actually built from the ground up to like for scale and speed and UX.
Um, on flow you get native account abstraction and you can create gaslet experiences and this is huge if you just think about it like you can create you can interact with a crypto app without actually knowing that it's built on the blockchain and we have great examples for that with Disney Pinnacles NBA Topsh Shot NFL all day all these on like mo mobile experiences where the users don't need to know about like blockchain and they don't need to fund their wallet. it. Um, we also have a soft finality that's less than 4 seconds and block times that's 800 milliseconds. This makes Flow the fastest L1 EVM chain. So, if you want to build something that's super performant, Flow is the right thing there.
Um, if you're a Solidity dev, Flow EVM just works. Like you can use any of your favorite EVM tools, Metam Mask, Remix, Hard Hat, or Foundry, and it will all just works out of the box. Um and if you want advanced smart contract lo logic you can use something like cadence to like step step it one more like level. Um basically cadence is a resourceoriented programming language that we have created um in order to solve the things that we simply couldn't do on solidity. Another great thing is that as flow has two environments cadence and EVM.
What you can do is then like use like advanced features on cadence whether it's like secure onchain randomness or nested resources you can then create those modules and make those accessible in solidity. Um and yeah so you can use like fully stress test solidity code and then get access to powerful cadence features. We're trusted by the best again um NBA Top Shot, NFL, Disney, Mattel. Most people don't know, but Ticket Master is like the largest NFT collection in the world with more than 100 million NFTts and those are all built on Flow. On Ethereum, that will cost billions of dollars to actually mint on Flow that cost pennies.
We're also MV resistant. So you don't like have to worry about users who are swapping and suddenly they lose like a large percentage of their funds. Um so how is flow actually able to achieve all this? To answer this question we kind of have to look at the blockchain trillemma. So the blockchain trlemma is something that vital baserin has like been very um vocal about which is for most blockchains you can you usually do a tradeoff.
you can only pick one. For Bitcoin and Ethereum, they chose to be like um decentralized and secure, but they couldn't really scale to the mainstream. And then we have something like Solana, which scales really well and is secure, but like it's actually very very centralized. Um and most chains simply just pick two. Um but for Flow, we actually managed to solve this.
We looked at the problem and we thought right now for most blockchains the node handles everything. What if we just gave them like separated the jobs. So instead we would have access nodes that's the data availability layer. We have like collection and consensus to handle sequencing and then execution nodes um to handle execution and that could basically be a specialized like data center which can then scale horizontally. And then we of course we also have settlement which is verification and consensus.
So that's basically how we did it just giving nodes different roles. For this weekend we are putting up 10k in bounties. So the first track is like the killer app and the other track is crosschain defi. So let's talk about both of them. For best killer app, what we basically define that as is is something that has the potential to onboard millions of users or create billions of dollars of market cap value.
And we have seen examples of that before. We have the CryptoKitties team, right? Like the CryptoKitties project, which ended up becoming like a 7 billion company, Staple Labs. It was the first one that like um did the NFT standard. like we are the co-author of this um like the ESC 721 which is widely used for NFTTS then we have unis swap um which created the automated market maker onchain and openc which like fun fact is actually openc um their NFT marketplace is heavily inspired by or on the initial one at least was heavily inspired by the cryptokitties marketplace.
So, uh, yeah, one could say that like everything traces back to the cats. But the thing is with these killer apps is that you don't have to always just invent the idea yourself. CryptoKitties was inspired by Pokemon cards and just the internet's obsession of cats and unis swap was actually initially inspired by noses. Um, so that's something that we want to help you guys like this weekend with ideating. So feel free to just jump like go to our booth and we'll help you there.
for best crosschain DeFi on flow. Well, we supported by the major like crosschain bridges lay zero which is also a sponsor. So you can do cross like cross bounties relay seller hyperlane axel. So if you want to do like um onflow different yield strategies you can do that because you have access to more powerful features. Uh you can also do better you like user experiences.
You can create 10x better experiences. Um for instance uh if you have tried to do yield farming you know that you have to do around five different steps like token approvals and transactions in order to finally farm yield on flow. You can do that in a single atomic transaction. So here's an example of using a more an advanced feature on flow which is actually super simple. What we have here is onchain randomness.
That's something that we have created on the cadence side and it's just a function call like get random number in a solidity contract and you can deploy that and then all of a sudden you have access to onchain randomness. Why do you want onchain randomness? Well, that's because then you don't need some kind of third-party uh off-chain verification like something like chain link uh provider to do randomness. You can actually just have it all on chain because flow is actually a really powerful computer. So for demo purposes, let's show you how we can create a onchain app using onchain randomness uh and call like randomness functions for your apps.
Yeah. So first off, we'll start with setting up your main mask. So if you're familiar with that, you just Google it and then you have a main mask account. And then you'll want to fund your wallet. So you can Google like flow test net to faucet and there you can then add your meta mask address and have it funded.
In order to have this these tokens displayed you'll need to go to developers.flow.com flow.com and go to EVM and then using flow EVM and there you can there there's a button to add the flow test network on metam mask so your tokens are displayed and then we can like deploy a smart contract um there you can use whatever you're familiar with uh on EVM so that can be like um yeah remix in this case where we just deploy a contract on remix so that's what we'll do here uh and This is the contract I just showed. So after it's been deployed on test net, you can now call the functions.
And here we're just going to call the get random uh number function. We give it a range from 1 to 10. Uh try it out and see if it works. We see it works and we see the randomness function is like seven in our case. So now you deployed a contract and called this function.
Next, we'll want to set up a front end. Here, you might use something like cursor AI. So, here we show you how to do a bit of vibe coding. You open your cursor, you copy your smart contract, give it some context that you want to build a front end to call a random random number from a contract. Uh, yeah.
And now we just let it like v code for a bit. But you can see the prompt here. I simply just ask, yeah, build a front end. Um I want to like I've deployed a contract on flow EVM test net uh and then I just let it get to work and yeah uh after that it'll show a front end. So what's very common when you v code is that you'll need to debug.
We didn't specify a contract address or chain ID. So basically what you'll need is find out okay where in the code is the contract address specified and where in the code is the chain ID specified and this is what we're doing here. Um and there we'll find okay the chain ID we as you can see and we can also see a contract address and we need to replace those things since we just called the randomness function before we can actually go to the transaction on EVM.flowcan flow scan and there you can find your contract address. Um, so we'll just replace that and then we'll also go to developers.
flow.com one more time to change the chain ID because that's that's the place where you'll find everything you need to just like change the RPC endpoint. Uh, so one again once again we go to the EVM page and then we find the chain ID for test net and replace it here. And now your application should basically work. So that's how you can go from zero to a onchain app on flow in less than three minutes.
And we see it's working. It's able to give us like randomness functions. So the resources are here. The links it's also on our ETH global uh page where you can find okay the RPC endpoints for you. Uh the blog explorer is evm.
flowscan.io. Uh the test net for faucet looks like this. But you can also just Google flow uh test net faucet. Again we supported by like the major tools alchemy gelato leazero everything should just work seamlessly for you.
Made mask privy which is also a sponsor. So if you want to have access to native account abstraction you can use privy. Uh and they're also giving out a b bounty um crosschain defi. There's a page here where we actually show all the DeFi contracts that are most common on flow. So you can actually build on top of existing uh smart contracts there and the liquidity.
Uh we'll also give you mainet tokens for those who want it who have joined our telegram group and yeah because then you can actually just work easily with layer zero and all the other things. Um and if you want to try out cadence you can also do that. We have given a project example there where we are doing um yeah different things like uh using magic link for better user experiences doing secure onchain randomness um doing um key rotation cycling where you can basically not it's very normal when you do a transactions that you can only do one transaction at a time but on flow you can actually do key rotation cycling to to scale transactions like having millions of transactions running from a single account. You know where to find us. Developer support, that's our Telegram group, developer docs, developers.
flow.com. This is all on our ETH uh global flow page. So there you'll find the resources as well. Uh our technical team is here, so you can just go to the flow booth whenever you need help.
Um we also really want to help you with like your idea and just like help you guys like win if that's you know what you're going for. So here I'm showing like different criterias that our judges are doing. Again the slides are you know resources. Uh but there are things like yeah technology completion um like do you have a live demo? Uh is it working or is it just a broken link protocol usage?
Do you use any features on flow like onchain randomness that I just showed or like the us u ux is it like a smooth intuitive experience to use your app and then adoption. um and originality. Right after the hackathon, we still want to like follow up with you. We have the grand now where we giving 50,000 flow uh per round. Um the deadline here is actually updated.
It's July 14. So, you actually have some time to uh join the grand. We're happy to help you there if you're interested in continuing your project or doing another project on flow. We want you to remember that yeah, CryptoKitties is actually a ETH global hackathon project and it ended up becoming a big success creating spinning off Dapper Labs and the flow blockchain. Um, so yeah, the people you're talking to here and from the flow team, it's the same team who actually like did cryptokitties.
So we're happy to help you. We want you to just go there, build something weird, cool ideally on flow and yeah, have fun with it. Happy hacking, guys. Yes. So, we have some time for questions.
Uh, if anyone has questions, there's a microphone over there. But, uh, any questions?
Okay. But yeah, otherwise we can just wrap it up. We are at the booth. Feel free if something pops up, be happy to help you. [Applause] [Music]
Automatic transcript — names and jargon may be misspelled.