0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Create Emulator Snapshot

Last updated at Posted at 2024-12-16

Previous << Deploy a Project
Next >> Execute a Script

Flow CLIには、エミュレータのスナップショットを作成するコマンドが用意されています。スナップショットはブロックチェーンの履歴における特定の時点であり、後でその時点の状態にリセットすることができます。これは、初期状態を設定してテストを実行し、初期状態に戻すテストを行う場合に便利です。

コマンドの構文は以下です。

flow emulator snapshot create|load|list {name}

Example Usage

Create a new snapshot

現在のブロックに、myInitialStateという名前で新しいエミュレータのスナップショットを作成します。

> flow emulator snapshot create myInitialState

Load an existing snapshot

以前に作成したスナップショットにジャンプするには、loadコマンドと名前を組み合わせて使用します。

> flow emulator snapshot load myInitialState

List all existing snapshots

以前に作成し、ロードが可能なすべての既存のスナップショットをリストアップするには、次のコマンドを実行します。

> flow emulator list

エミュレータの使用方法についてさらに詳しく知りたい場合は、リポジトリのREADMEをご覧ください。

Flags

Emulator Flags

ここにあるエミュレータのフラグを何でも指定できます。指定したフラグはエミュレータのサービスに適用されます。

Configuration

  • Flag: --config-path
  • Short Flag: -f
  • Valid inputs: valid filename

設定ファイルのファイル名を指定します。-f フラグを複数回使用することで、複数の設定ファイルを指定することができます。

Version Check

  • Flag: --skip-version-check
  • Default: false

低速な接続を避けて処理を高速化するために、起動時のバージョンチェックをスキップします。

Last updated on Dec 6, 2024 by Alex Ni

翻訳元


Previous << Deploy a Project

Flow BlockchainのCadence version1.0ドキュメント (Create Emulator Snapshot)

Next >> Execute a Script

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?