0xMiden / 0xMiden/protocol

Search account component procedure by name

オープン
#2,185 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
Rust
スター
132
フォーク
167
平均マージ
1日 23時間
マージ済み PR(30日)
110

説明

Our current implementation of the procedures searching requires to provide an absolute path of the procedure we want to get. This results in situations like that:

```Rust
procedure_digest!(
BASIC_FUNGIBLE_FAUCET_DISTRIBUTE,
BasicFungibleFaucet::DISTRIBUTE_PROC_NAME,
basic_fungible_faucet_library
);
```

Where `BasicFungibleFaucet::DISTRIBUTE_PROC_NAME` is an absolute path of this procedure, i.e. `"basic_fungible_faucet::distribute"`.

It would be much more convenient to somehow get the library (or module in that case) name from the `AccountComponent` itself (internally its `Library`) instead of providing it along with the procedure name.

In theory we can do so using the `exports` map of the `Library` inside the `AccountComponent`, obtaining the first part of the export procedures paths, but maybe there is a much more simple and robust way to get it.

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

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

評価

この issue はまだ評価されていません。

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

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