Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

CLI command to transform contract code to hex with imports replaced

オープン
#1,157 コメント 3 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
35/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
go
領域
blockchain, cli

調査の方向性

まず、Flow CLIに既存するimport構文の置換処理と、issueで言及されているネットワークエイリアスの処理を見つけます。./contracts/Foo.cdcのようなコントラクトファイルを中心に新しいコマンドの引数と出力を定義し、--network emulatorによって、そのネットワークのエイリアスに従ってimportが置換された16進コードが生成されることを確認します。

索引モデルが issue の本文から書いたものです。

説明

Feature Feedback
Issue To Be Solved

I'm working on contract to aid in delegated contract updates, and this includes storing contract code in onchain resources. The easiest way to pass around contract code is as a hex string and convert it to a byte array in the transaction. However, hexifying the .cdc file contents with non-native utils means I need to explicitly state the import addresses.

It would be really helpful if I could tap into Flow CLI's import syntax replacement to handle this for me.

Suggest A Solution

Add a flow command that takes a contract file location and returns the code as a hex string, something like

flow hexify ./contracts/Foo.cdc --network emulator # returns 70756...0a7d

Where the CLI replaces import addresses in Foo according to the aliases set for the specified network and returns the resulting contract code as hex.

Context

Mentioned above

主要言語
Go
スター
209
フォーク
88
PR マージ指標
30日以内にマージされた PR はありません

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

onflow/flow-cli のほかの issue

onflow/flow-cli の issue をすべて見る

似ている issue

Go の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。