-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #65 from onflow/ianthpun/migration-guides
add staging migration guide
- Loading branch information
Showing
1 changed file
with
38 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
--- | ||
title: How to migrate your smart contracts to Cadence 1.0 | ||
sidebar_label: Migrate smart contracts to Cadence 1.0 | ||
description: Guide to migrating your cadence 1.0 compatible smart contracts | ||
sidebar_position: 6 | ||
--- | ||
|
||
:::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. | ||
|
||
For more information about Cadence 1.0, please visit https://flow.com/upgrade/crescendo/cadence-1. | ||
|
||
## 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. | ||
|
||
```bash | ||
flow 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 has been staged | ||
|
||
To confirm that your contract is ready for migration and has been successfully staged, execute the following command: | ||
|
||
```bash | ||
flow 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. |