0xMiden / 0xMiden/protocol

Search account component procedure by name

Ouverte
#2,185 1 commentaire 0 réactions 0 personnes assignées Voir sur GitHub
Langage dominant
Rust
Étoiles
132
Forks
167
Merge moyen
1 j 23 h
PR mergées (30 j)
110

Description

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.

Guide de contribution

Ouvrir le guide de contribution

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.