Skip to content

base/account-policies

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

account-permissions

A modular system for allowing smart contract users the ability to authorize third parties to take specific, well-defined, onchain actions via their account.

How it works (high level)

  • src/PolicyManager.sol: installs policy instances authorized by the account and executes policy-prepared calldata on the account.
  • src/PolicyTypes.sol: shared type definitions (notably PolicyTypes.PolicyBinding) used by the manager and policies.
  • src/policies/: example policies (each policy defines its own authorization semantics via authorize(...) and constructs wallet calldata via onExecute(...)).

Setup

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 --recursive

Build

forge build

Test

forge test --offline

Format

forge fmt

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •