-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* docs: remove`WETH` from summary * docs: update the getting started page * docs: add discord link * docs: delete an extra page * docs: review the framework page * docs: review oracle description * docs: review Module documentation * docs: update module descriptions * docs: review all modules * docs: review extensions * docs: sequential resolution module * docs: remove sequential resolution from docs * docs: wording improvements Co-authored-by: moebius <[email protected]> --------- Co-authored-by: moebius <[email protected]>
- Loading branch information
Showing
29 changed files
with
126 additions
and
166 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,14 @@ | ||
# Module | ||
|
||
See [IModule.sol](/solidity/interfaces/IModule.sol/interface.IModule.md) for more details. | ||
See [IModule.sol](/solidity/interfaces/core/IModule.sol/interface.IModule.md) for more details. | ||
|
||
## 1. Introduction | ||
`Module` is an abstract contract that defines common functions and modifiers. A module is supposed to inherit the abstract contract and implement specific logic in one of the hooks, for example `finalizeRequest`. All public functions in the contract are callable only by the oracle, and there are internal functions ensuring the integrity of the data being passed around, such as `_validateResponse` and `_validateDispute`. | ||
|
||
`Module` is an abstract contract that defines common functions and modifiers. A module is supposed to inherit the abstract contract and implement specific logic in one of the hooks, for example `_afterSetupRequest`. | ||
In addition to the abstract contact, we've created interfaces for each type of module: | ||
- [IRequestModule](/solidity/interfaces/core/modules/request/IRequestModule.sol/interface.IRequestModule.md) | ||
- [IResponseModule](/solidity/interfaces/core/modules/response/IResponseModule.sol/interface.IResponseModule.md) | ||
- [IDisputeModule](/solidity/interfaces/core/modules/dispute/IDisputeModule.sol/interface.IDisputeModule.md) | ||
- [IResolutionModule](/solidity/interfaces/core/modules/resolution/IResolutionModule.sol/interface.IResolutionModule.md) | ||
- [IFinalityModule](/solidity/interfaces/core/modules/finality/IFinalityModule.sol/interface.IFinalityModule.md) | ||
|
||
## 2. Contract Details | ||
|
||
### Key Methods | ||
|
||
All public functions in the abstract contract are callable only by the oracle. | ||
|
||
- `setupRequest` is a hook executed on request creation. Apart from saving the request data in the module, it can run can run validations, bond funds or perform any other action specified in the `_afterSetupRequest` function. | ||
- `finalizeRequest` is a hook executed on request finalization. It's vital to remember that there are [2 ways of finalizing a request](oracle.md#finalization) and this function must handle both of them. | ||
|
||
## 3. Key Mechanisms & Concepts | ||
|
||
### Request Data | ||
|
||
The `requestData` is a mapping that associates each request's unique identifier (`requestId`) with its corresponding parameters. This mapping is public, allowing for the data of any request to be accessed using its ID. | ||
|
||
## 4. Gotchas | ||
|
||
It's worth noting that if a module does not implement a hook, it will still be called by the oracle. | ||
Each of them inherits the `IModule` interface and adds additional functions specific to the module type. |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.