Skip to main content
A token issuer requires approved callers for its mint and transfer entry points. This template checks those callers against a configured registry.

Behavior

OnlyAccreditedCanMintAssertion registers the example’s mint and transfer selectors. It scans successful CALL frames to the adopter, up to 32 matches per selector, and checks each immediate caller’s accreditation.

Configuration

Pass the registry address to the constructor. Replace the example interface with the token’s exact selectors and confirm that the registry implements the expected lookup. Decide whether accreditation applies to the operator, recipient, sender, or all three before adapting the policy.
The source calls the registry directly. Adapt that lookup to an explicit snapshot read with ph.staticcallAt before using it in the isolated assertion runtime. The table describes the intended caller policy once that lookup is available.

Scenarios

Coverage limits

The template does not check recipients or the original transaction sender. Its CALL filter and bounded scan are not complete coverage of arbitrary proxy or batch traces. Test the deployed call structure, including batches above the scan bound. For address-argument screening, see the Cap example.

Source

The reviewed source is a teaching template. The example setup guide provides the pinned checkout and test procedure.