Smart contract development is no different than other types of software development. Code is written to perform a certain task, and there are tools that help make this process easier. The Ethereum ecosystem contains many mature tools to help build Web3 projects, but what about a newer ecosystem, such as Flow?
If you’ve been following along with this series so far, you’ll know that the Flow blockchain is optimized for digital asset creation and management. Additionally, its smart contract language, Cadence, improves upon other languages’ pitfalls through its resource-based approach and a strong, static type system.
In this article, we’ll take a look at the essential tools smart contract developers can use to make building on Flow easier—tools such as CLIs, IDE extensions, client libraries, local networks, and more. We’ll also contrast these to Ethereum tools you may already be familiar with, so if you’re making the switch to Flow, you’ll know exactly what to expect.
Command-line interfaces (CLI) are the bread and butter of software development. They are intuitive for most developers and integrate easily with other software.
This easy integration applies to smart contract development as well. For example, if you need to quickly deploy a contract to test it or run it with different accounts, a CLI can help immensely. And later, when you want to add the deployment process to a CI/CD pipeline, you’ll be happy to have a simple CLI tool you can automate with shell scripts.
On EVM-compatible networks like Ethereum, Truffle and Hardhat both offer powerful tools for these tasks. The
Unlike Ethereum, where you would generate an address to interact with the blockchain, Flow requires you to have an account. This account holds your smart contracts, tokens, and keys, and is necessary for interacting with the blockchain. You can
Next, you want to write some code, and languages like Cadence and Solidity offer static type checking that gives you some helpful information about how your code will behave in your editor.
While Solidity comes with a fundamental type system that prevents you from mixing different number types, Cadence goes a few steps further and introduces the concept of ownership. You might know this from Rust, but the basic idea is that Cadence has resources, like NFTs, that can only be owned by one address. A Cadence IDE extension will notify you about issues with your NFT transactions right at the point when you’re writing the code, while also offering syntax highlighting, code completion, and type checking.
You might know linters from languages like JavaScript, where no static typing is available. In this context, a linter helps to prevent common errors and to aid developers in following best practices.
The same is true for
The Cadence language has a much more sophisticated type system and comes with more help than Solidity. A correctly typed Cadence smart contract is more secure than a correctly typed Solidity one.
The typical linter functionality is built right into the Cadence language itself through its type system, but if you want to run type checks on multiple Cadence files inside your CI/CD pipeline, the
A local network, or a network emulator, is a tool that will run a blockchain network on your development computer, so you can test in a clean environment and not risk pushing unfinished smart contracts to a live blockchain. A local network also has lower latency and allows you to control the block creation, so you can step through everything that happens when your smart contract executes.
When developing on the EVM, you probably know and use
Flow offers a similar feature called
With the
When developing smart contracts, you typically need crypto tokens to deploy and interact with your code. Otherwise, how will you test transactions?
Flow, just like Ethereum, has__a testnet__ that comes with
Additionally, Blocto Swap is a multi-use tool that makes creating an account on Flow simple for users. All one has to do is enter an email address. Blocto Swap allows users to easily exchange their tokens for different types to use in testing. This tool is also a handy way to get FUSD if that collection is not already initialized in the account.
Remember: tokens on a testnet hold no value outside of testing.
Cadence and Solidity both have test automation tools that allow you to write your tests in JavaScript.
The Hardhat development tools use the Chai test runner and supply you with
Cadence has
Another vital part of all blockchain networks is the block explorer—a tool that allows you to check out everything that happens on-chain.
For the Ethereum network, you might know
Flow comes with a much more powerful tool,
Flowser (Flow Browser) is a web application, but you can run it locally. It allows you to browse both the Flow mainnet and any local network you start with the Flow Emulator. It even comes with a GUI to configure and start an emulator and manage your development wallets.
However, if all you need to do is check transactions or browse on the Flow mainnet or testnet, then the traditional block explorer__Flowscan__ will suit your needs.
Additionally, the
To build a decentralized application (dapp) for your smart contract, you need a bridge between the blockchain network and the web. Flow and Ethereum both come with Webpack integrations to solve this problem.
Cadence offers similar features via its
Additionally, the
Being able to test your code in environments without having to invest the time in creating an entire project enables developers to quickly figure out what works and what doesn’t. To that end, Flow has the
Although Ethereum doesn’t have any projects exactly like the Flow Playground, there are a few you could take advantage of to create a similar experience. The online Solidity code editor,
Software development, and smart contract development in particular, is a complex process that consists of different vital steps. Planning, coding, testing, deploying, and maintenance are all important parts of the process, and having the proper tools at hand makes things easier.
Although Flow has a younger ecosystem compared to Ethereum, the tools and libraries available are mature enough to help speed up the development process. From command-line interfaces and IDE extensions to local networks and block explorers, Flow has all the tools an Ethereum developer might be expecting and more.
Additionally, the type system and built-in features of the Cadence smart contract language offer controls that Solidity can’t offer without additional tools such as linters. Even then, the value those Solidity tools delivers is inferior to the features Cadence provides natively.
Overall, the Flow ecosystem comes with
For a list of other great tools in the Flow ecosystem,
Have a really great day!