Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs/access control #85

Merged
merged 4 commits into from
Nov 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Prophet Modules

[![Version](https://img.shields.io/npm/v/@defi-wonderland/prophet-modules-contracts?label=Version&tag=latest)](https://www.npmjs.com/package/@defi-wonderland/prophet-modules-contracts)
[![Version](https://img.shields.io/npm/v/@defi-wonderland/prophet-modules?label=Version&tag=latest)](https://www.npmjs.com/package/@defi-wonderland/prophet-modules)
[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://github.com/defi-wonderland/prophet-modules/blob/main/LICENSE)

⚠️ The code has not been audited yet, tread with caution.
Expand Down
1 change: 1 addition & 0 deletions docs/src/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

- [Oracle](content/core/oracle.md)
- [Module](content/core/module.md)
- [AccessControl](content/core/access_control.md)

- [Modules](content/modules/README.md)

Expand Down
21 changes: 21 additions & 0 deletions docs/src/content/core/access_control.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# AccessControl

The access control feature is designed to allow developers to write custom access control logic for users to interact with Prophet. Safeguarding interactions by ensuring only authorized entities can act on behalf of other users.

## IAccessModule
`IAccessModule` is the interface that defines the functions required for custom access modules.

See [IAccessModule.sol](/solidity/interfaces/core/modules/access/IAccessModule.sol/interface.IAccessModule.md) for more details.

## ModuleAccessController
`ModuleAccessController` provides the needed validation for AccessModules. It validates both the approval of the custom AccessModule by the user and that the entitie interacting on behalf of the user has the correct authorization. This abstract contract should be implemented by any module that wants to leverage custom access control functionality.

See [IModuleAccessController.sol](/solidity/interfaces/core/access/IModuleAccessController.sol/interface.IModuleAccessController.md) for more details.


## OracleAccessController
Notice: This contract should NOT be used in the context of Modules as it does provide the correct validation needed for them.

`OracleAccessController` introduces an easy to use modifier for the Oracle contract that validates authorization for interaction within the Oracle.

See [IOracleAccessController.sol](/solidity/interfaces/core/access/IOracleAccessController.sol/interface.IOracleAccessController.md) for more details.
Loading