Skip to content

Commit

Permalink
Merge pull request #65 from onflow/ianthpun/migration-guides
Browse files Browse the repository at this point in the history
add staging migration guide
  • Loading branch information
ianthpun committed Mar 13, 2024
2 parents fa8d854 + 1bca72c commit bf3a09b
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions docs/cadence_migration_guide/staging-guide.mdx
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.

0 comments on commit bf3a09b

Please sign in to comment.