Learning Flow Blockchain - Part1: Open World Builders program

(This is 2 parts blog series about my experience learning Flow Blockchain)

Previously, I wrote, “The Minimum Dapp Onboarding for L2/Eth friends” explaining the importance of Developer onboarding for any upcoming blockchains. One chain which does the onboarding right is Flow blockchain developed by Dapper Labs, the creator of CryptoKitties which is known for breaking Ethereum back in 2017. They created their own blockchain so that they can create Dapps such as https://www.nbatopshot.com which aiming to bring Blockchain and digital collectables to the mass. They are at the forefront of “eating your own dogfood”.

Open World Builders (OWB)

Unlike other EVM compatible chains, they created a brand new language called Cadance.

I was really intrigued by what the team came up with from the learning of creating one of the most popular Dapps on Ethereum, but learning a new language tends to have a steep learning curve. So when they announced the 8 weeks free blockchain learning course, I decided to jump in.

The course was the mixture of Tech and Product courses inviting guest speakers from NBA basketball stars to famous VC. You can read the syllabus outline here. It was great that I was able to ask questions to these superstars.

Based on these lectures, you form a team and come up with a capstone project where you have to come up with the business plan as well as the working code. One thing that excites me about the Flow blockchain is the fact that it gives me the chance to tap into a mass consumer brand like NBA and UFC so I came up with a few ideas to build on top of their smart contract.

In the end, I ended up creating a super simple Uniswap clone which I will explain in part 2.

Flow Playground

On the programming side, there are mainly two ways to do, the easiest one was to use Flow playground which you can try from browsers without any upfront setup. It was really convenient to play around.

When you interact with the deployed smart contract, it allows you to specify which user you can interact with, which is quite handy when you want to test the interaction with multiple parties.

Visual Studio Extension

Flow also comes with VS code extension which allows you to deploy smart contract from the editor itself.

Thanks to their strict typing, it does catch lots of errors and prompts me to fix them. It takes a while to fix all the problems but if you fix them all, in most cases the code worked correctly.

My first Flow blockchain program, inspired by famous Twitter hack asking to give 1000 Bitcoins

FCL, Flow’s version of web3.js

Flow partners with multiple wallet companies such as Magic(Formerly known as Fortmatic), Blocto, and their own Dapper Labs wallet using js library @onflow/fcl. Blocto has its own demo site using their wallet so you can play around at https://fcl-demo.portto.io/ . One thing interesting about Cadence is the notion of so-called Transaction and Script. They are a blob of Cadence code to interact with its smart contract but they don’t reside on-chain. Instead, users run by sending the code from the wallet. This will massively simplify the interaction between frontend and smart-contract reducing the need for users to sign transactions (the equivalent of the annoying Metamask popup) multiple times.

What’s next?

At part 2, I will walk through more detail about the flow programming language Cadance using my Uniswap clone app which I made as part of the OWB program capstone project.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store