Skip to main content
Version: 0.42

Staging Guide

info

Encountering problems along the way? Visit the migrate section in the Flow CLI documentation for additional tools designed to help your migration to Cadence 1.0.

This guide aims to simplify the migration process to Cadence 1.0, making it accessible and straightforward for developers at all skill levels.

What is Cadence 1.0?​

Cadence 1.0 is the latest version of the Cadence smart contract programming language. The stable release of Cadence 1.0 represents a significant milestone in the language’s maturity, delivering a comprehensive suite of improvements that increase speed, security and efficiency. With Cadence 1.0, developers gain access to over 20 new features and enhancements. Each change is thoughtfully designed to streamline workflows, reduce duplication and improve code readability, making writing and understanding smart contracts much easier.

Staging a Contract​

In order to migrate your updated smart contract to Cadence 1.0, it's crucial to stage it on the Testnet network. This preliminary step not only verifies the contract's compatibility and syntactical correctness but also ensures a seamless transition to the new environment.


_10
flow-c1 migrate stage-contract HelloWorld --network=testnet

Ensure that HelloWorld accurately reflects the name of your contract as specified in your flow.json configuration file.

Confirm the Contract is Staged​

To confirm that your contract is ready for migration and has been successfully staged, execute the following command:


_10
flow-c1 migrate is-staged HelloWorld --network=testnet

A response of true indicates that your contract has been approved by the Flow Blockchain Testnet network and is ready for the migration process.

Validate your contract​

To validate your contract, execute the following command:


_10
flow-c1 migrate is-validated HelloWorld --network=testnet

A response of true indicates that your contract has been successfully staged and validated. Validation passes if the contract was successfully migrated over in the last emulated migration.

You can view all currently staged contracts and see reports on migration status through the Migrations Data Repository.

Mainnet Migrations​

Once your contract has been successfully staged and validated on the Testnet network, you can proceed with the migration process to the Mainnet network. Execute the following command to migrate your contract to the Mainnet network when ready:


_10
flow-c1 migrate stage-contract HelloWorld --network=mainnet