A modular system for allowing smart contract users the ability to authorize third parties to take specific, well-defined, onchain actions via their account.
src/PolicyManager.sol: installs policy instances authorized by the account and executes policy-prepared calldata on the account.src/PolicyTypes.sol: shared type definitions (notablyPolicyTypes.PolicyBinding) used by the manager and policies.src/policies/: example policies (each policy defines its own authorization semantics viaauthorize(...)and constructs wallet calldata viaonExecute(...)).
This repo uses git submodules for dependencies (in lib/).
Clone with submodules:
git clone --recurse-submodules <repo>If you already cloned without submodules:
git submodule update --init --recursiveforge buildforge test --offlineforge fmt