Skip to content

Commit

Permalink
Merge pull request #20 from onflow/testnet-deployment
Browse files Browse the repository at this point in the history
Update flow.json & README with deployment info
  • Loading branch information
sisyphusSmiling authored Feb 12, 2024
2 parents 3f7f1da + ece5b8b commit 3f0a82a
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 12 deletions.
29 changes: 17 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ Cadence 1.0 is a momentous milestone, introducing many advanced features to the
which will require changes to all contracts on the network. This makes crossing that milestone a coordinated effort,
read on for how to prepare.

![Path to Cadence 1.0](./resources/path_to_cadence_1.png)

Your contract's path to Cadence 1.0 can be broken down into the following four high-level phases:

1. **Updated:** Update your code, validating refactored contracts, transactions and scripts via local testing and
Expand All @@ -25,22 +23,28 @@ Your contract's path to Cadence 1.0 can be broken down into the following four h
your code and stage it again.
4. **Migrated:** all core and staged contracts are updated via state migration

![Path to Cadence 1.0](./resources/path_to_cadence_1.png)

Steps 1 & 2 require your effort and execution - you must update your contract and execute a transaction to stage it for
migration. Step 3 is an asynchronous feedback loop between Flow and contract owners where staged contracts are migrated
in an emulated environment offchain, the results of which will be submitted to the staging contract on a set interval
(TBD). Step 4 will be completed by the network, executed as an HCU.

This process will need to be completed for all contracts on all networks, with a number of opportunities to collectively
practice on Crescendo Migration Testnet (CMT) before the HCU on Testnet and Mainnet.

> :mag: This repo addresses steps 2 & 3 above, providing a central coordination point for contract updates to be staged,
code and staging status to be retrieved, and offchain validation results to be committed, queried and broadcast. Focus
on reaching validated status across all of your contracts before the HCU, giving you confidence your contract updates
will be successful.
> code and staging status to be retrieved, and offchain validation results to be committed, queried and broadcast. Focus
> on reaching validated status across all of your contracts before the HCU, giving you confidence your contract updates
> will be successful.
## Overview

> :information_source: This document proceeds with an emphasis on the `MigrationContractStaging` contract, which will be
> used for the upcoming Cadence 1.0 network migration. Any contracts currently on Mainnet **WILL** need to be updated
> via state migration on the Cadence 1.0 milestone. This means you **MUST** stage your contract updates before the
> milestone for your contract to continue functioning. Keep reading to understand how to stage your contract update.
> used for the upcoming Cadence 1.0 network migration. Any contracts currently deployed on Testnet & Mainnet **WILL**
> need to be updated via state migration on the Cadence 1.0 milestone. This means you **MUST** stage your contract
> updates before the milestone for your contract to continue functioning. Keep reading to understand how to stage your
> contract update.
The `MigrationContractStaging` contract provides a mechanism for staging contract updates onchain in preparation for
Cadence 1.0. Once you have refactored your existing contracts to be Cadence 1.0 compatible, you will need to stage your
Expand All @@ -52,10 +56,11 @@ Coordinated Upgrade.
> :information_source: The `MigrationContractStaging` contract is not yet deployed. Its deployment address will be added
> here once it has been deployed.
| Network | Address |
| ------- | ------- |
| Testnet | TBD |
| Mainnet | TBD |
| Network | Address |
| --------------------------- | ------------------------------------------------------------------------------------------------------------------------- |
| Crescendo Migration Testnet | [0x27b2302520211b67](https://crescendo.flowdiver.io/contract/A.27b2302520211b67.MigrationContractStaging?tab=deployments) |
| Testnet | [0x2ceae959ed1a7e7a](https://contractbrowser.com/A.2ceae959ed1a7e7a.MigrationContractStaging) |
| Mainnet | TBD |

### Pre-Requisites

Expand Down
34 changes: 34 additions & 0 deletions flow.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@
}
},
"networks": {
"crescendo": "access.crescendo.nodes.onflow.org: 9000",
"emulator": "127.0.0.1:3569",
"mainnet": "access.mainnet.nodes.onflow.org:9000",
"sandboxnet": "access.sandboxnet.nodes.onflow.org:9000",
Expand Down Expand Up @@ -98,9 +99,37 @@
"foo": {
"address": "01cf0e2f2f715450",
"key": "e9b7b36e9d16f47501db73e84c68e441609475ee482ee808411b2fe0bd2329da"
},
"migration-contract-staging-crescendo": {
"address": "27b2302520211b67",
"key": {
"type": "google-kms",
"hashAlgorithm": "SHA2_256",
"resourceID": "projects/dl-flow-admin/locations/global/keyRings/migration-contract-staging-testnet/cryptoKeys/evm-storage-testnet-key/cryptoKeyVersions/1"
}
},
"migration-contract-staging-testnet": {
"address": "2ceae959ed1a7e7a",
"key": {
"type": "google-kms",
"hashAlgorithm": "SHA2_256",
"resourceID": "projects/dl-flow-admin/locations/global/keyRings/migration-contract-staging-testnet/cryptoKeys/evm-storage-testnet-key/cryptoKeyVersions/1"
}
},
"originator-crescendo": {
"address": "c3d589f831db1bb8",
"key": {
"type": "file",
"location": "crescendo-originator.pkey"
}
}
},
"deployments": {
"crescendo": {
"migration-contract-staging-crescendo": [
"MigrationContractStaging"
]
},
"emulator": {
"a-account": [
"A"
Expand All @@ -118,6 +147,11 @@
"foo": [
"Foo"
]
},
"testnet": {
"migration-contract-staging-testnet": [
"MigrationContractStaging"
]
}
}
}
Binary file modified resources/path_to_cadence_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 3f0a82a

Please sign in to comment.