feat: initial protocol manager interface + CredibleSafeGuard integration - #95
Merged
makemake-kbo merged 5 commits intoJul 27, 2026
Conversation
mateo-mro
reviewed
Jul 27, 2026
…ct base Expose the intended Credible Layer protocol manager on the protected contract itself so the state oracle can set it without manual review. - IInitialProtocolManager: read interface the state oracle calls - InitialProtocolManager: abstract base fixing the manager immutably at deployment, with a zero-address guard
Inherit InitialProtocolManager so a deployed guard declares the address allowed to manage its assertions in the Credible Layer. The state oracle reads initialProtocolManager() during onboarding, so deploying the guard is itself the ownership proof — no manual review round. - CredibleSafeGuard constructor takes the manager address and forwards it to the base (non-zero enforced there) - Deploy script + example wiring read INITIAL_PROTOCOL_MANAGER - Add InitialProtocolManager base test (construction, fuzz, interface conformance) and a guard interface-conformance test
Dedicated guard-level coverage that the guard implements IInitialProtocolManager correctly: - returns the constructor value (fuzzed over registry/threshold/manager) - stored independently of the registry and threshold immutables - per-deployment, not shared state - stable across calls - readable through the IInitialProtocolManager interface type
makemake-kbo
force-pushed
the
makemake/eng-4072-faetstd-add-initial-protocol-manager-interface-to-std
branch
from
July 27, 2026 10:00
6c75625 to
39f0797
Compare
makemake-kbo
marked this pull request as ready for review
July 27, 2026 10:01
ENG-4072 specifies the public import as credible-std/protection/credible_block/IInitialProtocolManager.sol and asks for the usage example in that module's README. Relocate the interface, the abstract base, and their test into protection/credible_block, and fold the docs into the existing credible_block README instead of a separate module README.
lean-apple
approved these changes
Jul 27, 2026
makemake-kbo
deleted the
makemake/eng-4072-faetstd-add-initial-protocol-manager-interface-to-std
branch
July 27, 2026 10:43
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.
What
Adds the initial protocol manager primitive to
credible-stdand wires it intoCredibleSafeGuard.A protected contract exposes
initialProtocolManager()to declare the address allowed to manage its assertions in the Credible Layer. The state oracle reads it when the protocol is initialized, so deploying the contract is the ownership proof — no separate manual review/claim round.Changes
New primitive (
src/protection/initial_protocol_manager/)IInitialProtocolManager— the read interface the state oracle calls.InitialProtocolManager— abstract base fixing the manager immutably at deployment, with a zero-address guard.CredibleSafeGuard integration (
src/protection/safe/CredibleSafeGuard.sol)is ITransactionGuard, InitialProtocolManager; constructor takes the manager address and forwards it to the base.INITIAL_PROTOCOL_MANAGERenv var.Tests
InitialProtocolManager.t.sol— construction, fuzz over non-zero managers, and interface conformance (readable through theIInitialProtocolManagertype).CredibleSafeGuard.t.sol— asserts the getter, zero-manager revert, and interface conformance.Verification
forge build: compiles (pre-existing lint notes only).safe-guardsuites: 20 passed.