0xMiden / 0xMiden/protocol

Search account component procedure by name

未關閉
#2,185 1 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
主要語言
Rust
星號
132
分支
167
平均合併
1 天 23 小時
30 天內合併 PR
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 摘要。