Open
Conversation
167d588 to
e32af36
Compare
bobbinth
reviewed
Sep 21, 2025
TomasArrachea
commented
Feb 2, 2026
crates/faucet/src/lib.rs
Outdated
Comment on lines
+492
to
+498
| let faucet_sysdata = self | ||
| .client | ||
| .new_storage_reader(self.id.account_id) | ||
| .get_item(AccountStorage::faucet_sysdata_slot().clone()) | ||
| .await | ||
| .context("failed to get faucet sysdata slot")?; | ||
| let issuance_felt = faucet_sysdata[Account::ISSUANCE_ELEMENT_INDEX]; |
Collaborator
Author
There was a problem hiding this comment.
This will be improved once this issue is tackled in miden-base
bobbinth
reviewed
Feb 6, 2026
crates/faucet/src/lib.rs
Outdated
Comment on lines
505
to
507
| pub fn issuance(&self) -> &Arc<RwLock<AssetAmount>> { | ||
| &self.issuance | ||
| } |
Contributor
There was a problem hiding this comment.
Question: why do we need both issuance() and get_issuance()? Isn't the value in the store also updated after every transactions? Or can these diverge somehow?
Collaborator
Author
There was a problem hiding this comment.
The faucet keeps the issuance cached in-memory to expose it in the metadata endpoint. This way we avoid having to query the store on each request, and update it's value after each minting. The methods naming was a bit confusing though, refactored the API slightly in efd23da.
Collaborator
Author
There was a problem hiding this comment.
This will probably get replaced by #224 anyway
9f31dd4 to
efd23da
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Addresses #44.