graphprotocol / graphprotocol/graph-node

unknown import: `ethereum::ethereum.call` has not been defined

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

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

offchain
主要言語
Rust
スター
3.2k
フォーク
1.1k
平均マージ
4日 1時間
マージ済み PR(30日)
1

説明

Summary

This happens when a file data source handler uses contract calls directly or is in the same AssemblyScript file as other handlers which use contract calls. If the contract call is done by a different handler in the same file, this can be fixed by putting the file data source handler in its own file, which is best practice.

Potential Fix

Contract calls in file data source handlers could be enabled by somehow passing the ethereum.call host fn when instantiating an offchain data source, relevant code:
https://github.com/graphprotocol/graph-node/blob/92670f27d93ed08a6e83805ad644d9004d4d77ee/runtime/wasm/src/host.rs#L137-L141

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

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

調査の方向性

runtime/wasm/src/host.rs の 137〜141 行付近から始め、offchain データソースがどのようにインスタンス化されるかを追跡します。欠落している ethereum.call host 関数がファイルデータソースのハンドラーにどのような影響を与えるかを確認し、その後、インスタンス化時に渡せるかどうかを判断します。説明されているハンドラーのシナリオで、コントラクト呼び出しが unknown import エラーを生成しなくなれば完了です。

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

評価

技術スタック
rust, wasm
領域
backend-api-design, blockchain
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

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

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