Skip to content

Commit

Permalink
Merge pull request #67 from onflow/ianthpun/migration-doc-updates
Browse files Browse the repository at this point in the history
title and sidebar to correct format for staging migration guide
  • Loading branch information
ianthpun authored Mar 14, 2024
2 parents ec6e7b0 + 0e3b1e3 commit ffd749e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
11 changes: 6 additions & 5 deletions docs/cadence_migration_guide/emulator-state-migration-guide.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
title: Migrating Emulator state to Cadence 1.0
title: Migrate Emulator State To Cadence 1.0
sidebar_label: Emulator State Migration Guide
description: How to locally test storage migration and staged contract upgrades on Emulator
sidebar_position: 7
---
Expand All @@ -24,13 +25,14 @@ Such contracts are required for the migration.
**To get an emulator state with Flow CLI `1.14.0`:**

- Start the emulator with the `--persist` flag.

```shell
flow emulator --persist
```

- Deploy the pre-1.0 project/contracts to the emulator
- Run transactions if there are any.
- Stop the emulator (Ctrl-C on *nix platforms, and Ctrl-Break or Ctrl-Pause on Windows).
- Stop the emulator (Ctrl-C on \*nix platforms, and Ctrl-Break or Ctrl-Pause on Windows).
**It is important to make sure the emulator is stopped before taking the snapshot,
so that any pending in-memory data would be written to the persisted state properly.**
- Locate the persisted state `./flowdb/emulator.sqlite` file, from the project root.
Expand Down Expand Up @@ -70,16 +72,15 @@ _Note: Any existing previous Flow CLI installation will still remain available v
**Note that, the paths to these updated contracts and their deployed addresses must be specified in the `flow.json` file.**
For example, assuming the contract was deployed in the `test` account in the emulator,
and assuming the updated contract is in the `./updated_test_contract.cdc` file, the `flow.json` should include:

```json
{
"contracts": {
"Test": "./updated_test_contract.cdc"
},
"deployments": {
"emulator": {
"test": [
"Test"
]
"test": ["Test"]
}
}
}
Expand Down
8 changes: 3 additions & 5 deletions docs/cadence_migration_guide/staging-guide.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: How to migrate your smart contracts to Cadence 1.0
sidebar_label: Migrate smart contracts to Cadence 1.0
title: Cadence Migrate Smart Contracts To Cadence 1.0
sidebar_label: Smart Contract Migration Guide
description: Guide to migrating your cadence 1.0 compatible smart contracts
sidebar_position: 6
---
Expand All @@ -13,9 +13,7 @@ This guide aims to simplify the migration process to Cadence 1.0, making it acce

## 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.
[Cadence 1.0](https://flow.com/upgrade/crescendo/cadence-1) 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

Expand Down

0 comments on commit ffd749e

Please sign in to comment.