Flow Community Rewards are here. Earn points for engaging in the ecosystem, spend points on prizes. Learn more.
Developers
May 16, 2024
Introducing a new smart contract migration tool
Antoni Palazzolo
Introducing a new smart contract migration tool

What is Crescendo?

Crescendo marks a pivotal advancement in the Flow ecosystem, introducing EVM, network improvements to speed and efficiency and of course Cadence 1.0, the first stable release of this innovative programming language. As exciting as this is, it brings a host of breaking changes that could mean significant overhauls for existing smart contracts. Existing contracts need to be updated to Cadence 1.0, tested and staged. Staged contracts will replace deployments when Crescendo goes live on Testnet and Mainnet.

Over 220 contracts have already started their migration process to Cadence 1.0 and staged.  Throughout the migration process, the community has truly stepped up in offering each other support and tooling to make upgrading easier. Bluesign, a Flow veteran developer, has developed and open-sourced a tool that he has run on every mainnet contract doing the lion’s share of syntactic updates for you. 

How Does CadenceUpgrader Work?

cadenceUpgrader is a game-changer in adapting to these changes. Here’s a snapshot of how it functions:

1. Contract Fetching: Initially, the tool scans and fetches all smart contracts currently active on the Mainnet.

2. Automated Updates: It then crawls through each line using an AST that looks for code that needs to be changed, automating between 80-90% of the necessary updates, preparing your contracts for Crescendo compatibility.

3. Manual Adjustments: The updated contracts are then stored directly in a repository. All developers need to do is search for their deployer account address and copy the code locally. Although developers will still need to review and add changes to more complex aspects of their contracts like ensuring security controls are correct, and fleshing out capabilities/entitlements, the updated code is sure to save developers just starting to update their contracts tremendous time. 

This tool is essentially a static analysis powerhouse, diving deep into your code to pinpoint necessary revisions for Cadence 1.0 readiness. Think of it as a similar  form of the Cadence VSCode plugin’s linter, but supercharged for Crescendo and without the need for local installation.

Insights from The Builder, Bluesign

To get a deeper understanding of this innovative tool, we spoke with its creator, who shared insights on the motivation, optimal utilization, and their feelings about the Cadence 1.0 upgrade:

What motivated you to build it?

"I am always looking for something to build on Flow. There was some discussion on Discord about an automated tool to change pub identifiers to access(all). I first started with this, then extended it to all errors. Then, seeing some interest from people I shared with, like Bjarte, etc., I extended it more and more."

How can developers/projects best utilize it?

"I think the best way is to get their contract from GitHub (if the contract is on Mainnet). If not, they can just run the app with instructions available [here]. Just putting their code in some folder and running the app is enough in most cases."

How are you feeling about the Cadence 1.0 upgrade in general?

"I am excited about the 1.0 update; there are a lot of nice changes. Especially entitlements which will be very useful to developers."

Community contributions

Bluesign's proactive approach exemplifies the strength and collaborative spirit of the Flow community. By running the upgrader across every contract on the chain, they ensure that every developer has the opportunity to join the Crescendo wave smoothly and efficiently. This is not just a tool; it’s a testament to community-driven innovation, aiding a collective move forward without leaving anyone behind.

Crescendo: A Gateway to Enhanced Capabilities

Crescendo doesn’t just update Cadence; it opens a realm of possibilities for Solidity developers and app creators to explore the vibrant ecosystem of Flow. Known for its robust security, blazing-fast transactions , and lower gas fees, Flow is set to become even more attractive with Crescendo, facilitating seamless integration and interoperability across ecosystems.

Take Action!

Every contribution, big or small, plays a crucial role in the ecosystem’s growth. The cadenceUpgrader tool is a perfect example of how ingenuity and collaboration foster a thriving environment that benefits us all. Prepare your smart contracts, embrace the new features of Crescendo, and let’s make the blockchain world more efficient and interconnected.

Ready to dive in? Start by updating your contract using cadenceUpgrader and ride the crescendo to new heights!

Bluesign’s commitment and contribution are indeed commendable, but remember, this tool is a springboard, not a silver bullet. A personal touch is necessary to cross the finish line, ensuring your contracts perform flawlessly on this revolutionary platform.