CLI command to transform contract code to hex with imports replaced
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 35/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- go
- 領域
- blockchain, cli
調査の方向性
まず、Flow CLIに既存するimport構文の置換処理と、issueで言及されているネットワークエイリアスの処理を見つけます。./contracts/Foo.cdcのようなコントラクトファイルを中心に新しいコマンドの引数と出力を定義し、--network emulatorによって、そのネットワークのエイリアスに従ってimportが置換された16進コードが生成されることを確認します。
索引モデルが issue の本文から書いたものです。
説明
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 はありません
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
onflow/flow-cli のほかの issue
-
Simplify MCP contract sorting with slices helpers対応中かも @luangucun が 51 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
-
`flow cadence lint` lints imports対応中かも @holyfuchs が 190 日前に担当しました。 オープンBug Improvement
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
Bug
難易度 3/5 1〜2日 初心者へのやさしさ 48/100
-
flow test prints unreadable output対応中かも @holyfuchs が 189 日前に担当しました。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 55/100
-
Feature
難易度 3/5 1〜2日 初心者へのやさしさ 48/100
onflow/flow-cli の issue をすべて見る
似ている issue
-
compress: block buffers get re-zeroed on every call, and the zeroing is immediately overwrittenオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
ClickHouse/ch-go#1218 ·
メンテナーはふだん 13 日以内に返信
-
effort:s impact:low raised-by:reviewer risk:low
難易度 1/5 1時間未満 初心者へのやさしさ 84/100
medici-finance/assay#4251 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
automation models
難易度 1/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
golang-migrate/migrate#1457 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
メンテナーはふだん 1 日以内に返信