Add support for unlimited and timed fungible faucets#2459
Draft
afa7789 wants to merge 10 commits into0xMiden:nextfrom
Draft
Add support for unlimited and timed fungible faucets#2459afa7789 wants to merge 10 commits into0xMiden:nextfrom
afa7789 wants to merge 10 commits into0xMiden:nextfrom
Conversation
- Introduced `UnlimitedFungibleFaucet` for unrestricted token minting, suitable for testnets or inflationary models. - Implemented `TimedFungibleFaucet` with time-based constraints on token distribution, allowing minting until a specified block and optional burn-only mode post-distribution. - Updated account component interfaces to include new faucet types. - Enhanced documentation to cover new faucet functionalities and usage examples.
… enhanced error handling and metadata management
- Replaced the flexible_supply component with supply_limits in the timed_fungible faucet contract to unify supply management. - Removed the fixed_supply and flexible_supply components as they are no longer needed. - Updated the timed_fungible faucet implementation to utilize the new supply_limits component for minting and burning operations. - Adjusted error handling and supply checks to align with the new supply_limits logic. - Updated references to the supply configuration storage slot in the timed_fungible and unlimited_fungible faucet implementations. - Cleaned up unused error messages related to supply cap validation.
Contributor
Author
|
Waiting for the review and merge of this #2439, for a rebase and final structure to convert this from draft to ready for review. AS the way I'm implementing this depends on metadata extension to get clear approach. |
- Simplified supply limits management in `supply_limits.masm` by removing unnecessary checks and consolidating procedures for minting and burning tokens. - Updated `TimedFungibleFaucet` and `UnlimitedFungibleFaucet` to include owner account management, allowing for ownership checks and ownership transfer functionality. - Removed deprecated error messages related to supply checks and burn restrictions, replacing them with more relevant error handling for timed distribution periods. - Adjusted tests to reflect changes in ownership management and updated assertions accordingly.
…e code formatting
… update error messages
… and burn procedures
…edundant error constant
…cet components making the code easier to review and more correct.
bobbinth
reviewed
Feb 26, 2026
Contributor
There was a problem hiding this comment.
I've only glanced through this PR, but I wonder if the approach should be more along the lines I described in OpenZeppelin/miden-confidential-contracts#39 (reply in thread). Basically, we have a single network fungible faucet component, but we can customize mint policies using procedures stored in account storage. These policies could be under miden::standards::faucet::network_fungible::mint_policies or something like that.
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.
Adding a supporting concise miden + rust files that will allow us to componentize supply ( could be moved somewhere else depending on review ).
This will allow us to cap issuance to max_supply + time frame of minting, where it can extend max supply.