Draft
Conversation
…horizedPolicy Extract shared infrastructure from AOAPolicy into a new abstract base SingleExecutorPolicy, allowing optional executor (address(0) = no consensus required). The existing always-require-signature behavior is preserved in SingleExecutorAuthorizedPolicy which inherits SingleExecutorPolicy. - SingleExecutorPolicy: owns SingleExecutorConfig, SingleExecutorExecutionData, EIP-712 typehashes (EXECUTION_TYPEHASH, EXECUTION_DATA_TYPEHASH, SINGLE_EXECUTOR_UNINSTALL_TYPEHASH), storage, and all shared helpers (_storeConfigHash, _requireConfigHash, _decodeSingleExecutorConfig, _consumeNonce, _isValidExecutorSig, _validateAndConsumeExecutionIntent, cancelNonces [virtual], setPolicyManager, pause/unpause) - SingleExecutorAuthorizedPolicy: inherits SingleExecutorPolicy; enforces ZeroExecutor at install; requires executor sig on every execution - MorphoLendPolicy, MorphoLoanProtectionPolicy: updated to inherit SingleExecutorAuthorizedPolicy with renamed hook methods - Docs: aoa-policies.md → single-executor-policies.md with full terminology update - Tests: renamed test dir and updated all references; 272 tests pass Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Introduces MoiraiDelegate, a one-shot policy that executes a fixed calldata payload on behalf of an account under at least one of two configurable conditions: a time-lock (unlockTimestamp) and/or an executor-signed intent. Key design decisions: - Inherits SingleExecutorPolicy directly (not SingleExecutorAuthorizedPolicy) so executor is optional (zero address = no consensus required) - Config encoded as flat abi.encode(MoiraiConfig), not the nested (SingleExecutorConfig, bytes) pattern, to avoid redundant nesting - Single-execution guard via _executed[policyId] mapping - cancelNonces overridden to decode MoiraiConfig (incompatible with base class's (SingleExecutorConfig, bytes) decoding) - Empty executionData is a documented no-op that does NOT consume the one-shot lock Includes full test suite (22 tests) covering install, execute, and uninstall behavior. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… tests Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
df4a712 to
d147eee
Compare
df80654 to
24beccd
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.
No description provided.