Skip to content

Add Pausable module#2291

Open
afa7789 wants to merge 6 commits into0xMiden:nextfrom
afa7789:openzeppelin/pausable
Open

Add Pausable module#2291
afa7789 wants to merge 6 commits into0xMiden:nextfrom
afa7789:openzeppelin/pausable

Conversation

@afa7789
Copy link
Contributor

@afa7789 afa7789 commented Jan 16, 2026

This pull request centers on the introduction and integration of the PAUSABLE.masm module, enabling crucial pause and unpause functionality for the regulated network fungible faucet. This foundational module significantly enhances operational control and security within the system.

The changes involve implementing pausable capabilities for the RegulatedNetworkFungibleFaucet using PAUSABLE.masm, alongside refining existing module references and improving overall code hygiene.

To ensure its reliability, comprehensive tests have been added specifically for the pause/unpause flow of the regulated network fungible faucet, confirming PAUSABLE.masm correctly manages its operational state.

Waiting for the other PR to be merged, so we can see that the files on this are only related to pausable.

@afa7789 afa7789 force-pushed the openzeppelin/pausable branch from 53ab657 to c9821c4 Compare January 16, 2026 12:51
@afa7789 afa7789 changed the title Add reusable Pausable module and creation of regulated network fungible faucet. Add Pausable module Jan 16, 2026
@afa7789 afa7789 force-pushed the openzeppelin/pausable branch 3 times, most recently from 35b42fe to 0b8fdc3 Compare January 19, 2026 15:46
@afa7789
Copy link
Contributor Author

afa7789 commented Jan 28, 2026

#2241 (comment) I have to also review myself to see if I have to implement it with user-defined objects. Not so sure yet.

@bobbinth
Copy link
Contributor

#2241 (comment) I have to also review myself to see if I have to implement it with user-defined objects.

No, user-defined objects (or as we call them "programmable assets") is something we are implementing on our end (primarily by @PhilippGackstatter).

@mmagician mmagician added the pr-from-maintainers PRs that come from internal contributors or integration partners. They should be given priority label Feb 9, 2026
@bobbinth
Copy link
Contributor

bobbinth commented Mar 6, 2026

@afa7789 - I believe this needs to be rebased.

@afa7789
Copy link
Contributor Author

afa7789 commented Mar 6, 2026

@afa7789 - I believe this needs to be rebased.

It does, but I think it's better to merge metadata and ownable2steps first. After that, I'll update this PR accordingly.

I'll also adjust it for the other features that were changed in the project. ok? @bobbinth

@bobbinth
Copy link
Contributor

bobbinth commented Mar 6, 2026

It does, but I think it's better to merge metadata and ownable2steps first. After that, I'll update this PR accordingly.

Yes - makes sense!

afa7789 added 2 commits March 9, 2026 17:05
…nality with comprehensive tests

- Added note scripts for pausing and unpausing the regulated network fungible faucet.
- Implemented tests to verify the pause and unpause procedures, including state checks and error handling for unauthorized access.
- Ensured that distribution operations fail when the faucet is paused and succeed when unpaused.
- Verified that the faucet starts in an unpaused state and correctly reflects state changes after pause/unpause operations.
- Included tests for non-owner attempts to pause and unpause the faucet, ensuring proper error handling.
@afa7789 afa7789 force-pushed the openzeppelin/pausable branch from 202d92d to 84db04d Compare March 9, 2026 20:16
afa7789 added 2 commits March 9, 2026 17:26
- Update MASM to use ownable instead of network_fungible re-exports
- Update distribute signature (remove aux/execution_hint)
- Use AccountComponentMetadata for component creation
- Fix procedure_digest macro calls with NAME constant
- Fix include path for regulated faucet masl
- Fix RpoRandomCoin import path (crypto::random::RpoRandomCoin)
- Replace create_mint_note/MintNoteInputs with MintNote::create/MintNoteStorage
- Fix create_p2id_note_exact import path
- Remove FieldElement import (no longer re-exported)
- Replace amount.into() with amount.as_canonical_u64()
- Replace as_int() with as_canonical_u64()
- Replace NetworkFungibleFaucet::owner_config_slot() with Ownable2Step::slot_name()
@afa7789 afa7789 force-pushed the openzeppelin/pausable branch from 84db04d to dbb6302 Compare March 9, 2026 20:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-from-maintainers PRs that come from internal contributors or integration partners. They should be given priority

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants