-
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.
Merge pull request #42 from CMTA/dev
Dev
- Loading branch information
Showing
177 changed files
with
7,939 additions
and
5,132 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
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
<mxfile host="Electron" modified="2024-06-10T15:08:23.006Z" agent="5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) draw.io/20.6.2 Chrome/106.0.5249.199 Electron/21.3.3 Safari/537.36" etag="ZhdH9EA9LXOtab_TQP2a" version="20.6.2" type="device"><diagram id="zM64sRnQbgzkaFHiXnTb" name="RuleWhitelistWrapper">7VrLcpswFP0als3whizj2Eln2k4zzSJJdwrIoKmMPEJ+5esrjMBIsmPsxpgk3STcowfo3MO90sWGcz1Z3lIwTX+QGGLDNuOl4QwN2w4vTf63AFYl4PthCSQUxSVkbYB79AIFKMYlMxTDXOrICMEMTWUwIlkGIyZhgFKykLuNCZbvOgUJ1ID7CGAdfUAxS0vUdhx/0/AVoiStbu17btkyAVVvsZQ8BTFZNCBnZDjXlBBWXk2W1xAX5FXElONudrTWT0ZhxtoMYDcvz7d+bOY2+j0fWZgFafrFLmeZAzwTK/41w3CUJSiD4rHZqiIjX6AJBrzBGSxSxOD9FERF04K7nmMpm2BuWfxyTDImnGmF3NafVTz+HFIGlw1IPPstJBPI6Ip3qaQkaBRCcipaFw23mAJLGx6pQSCkkNRTb8jiF4KvA7hzNO4eClYwytkDZ2QKad4vCl23dxy6uznkMOVa5P+sftEYWjKN4dlZ9DQWFzqLdr9Z7IEY/TY0Zv2m0XfPTmOg0ahRBrP4qsjO3IowyHMUyURRMstiWNzE5BZcIvYoWorrpwK/8IQ1XDa6DVeVkfGlPDaNxqjC3AxbW9W41i7KyYxGcH9qZYAmkO1PIzCWdiK6wxsO9bb4s8IoxIChubx/2eZjcYc7gjK20ZPjy3pyPUUm5brFqOZ2Q5nIVYTpqnoridEmWkuuXvbxKgy7UaF9nAzt7nTotNSh2ysdBmp6cI/UYaAI2r7sVoeX/6PhISr0+qVCRwliqnhaq1A5vriqnE+swuptOq0MrQ8iQr9XIvQ9ZYvnHCtCU57ICzsWoV5teCMRmlIsDF4Phm+np36lTH/X8f5QnWgTdZwyLb2yYgQDRrlh8xnNMcA5NIKhLh7uiO/gGWJZMwCjJCsExR0MKQeK4xWKAL4SDRMUx8UcAwpz9AKe1/MVUpkWS1wv2hsY3rCVeF6Xvnqwq0uX4q5Gszi47cBnXlhB6Mn++Tf5VF3IeJzD0zhUL/Oc48WvE5AlJ6CguwzktcxA/ToUhrayhz52M66msq4PhZZeKXv3kaV6tz5nZNFrdmeNLM1gUu+IO4ks/oeILK66JT12z+JZHUeWLVXP9x5Zqnfrc0aWwwqIGVl/AIhBnq5DiSW7s8DvAOOuzNaIbToczRklf+oPy/buWFSXd56a0WdfKOp5JOpXqScM9hyO20aiSyWkeepx/dSRaEvFMRj8/MYhQgu+uWLp+h2O9U/8n2MX3rYOZPdKoY63J8W1/jSj1IFc/60Uys3ND1rK7pufBTmjvw==</diagram></mxfile> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+4.43 KB
(110%)
doc/surya/surya_graph/surya_graph_IRuleEngineValidation.sol.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-121 KB
(19%)
doc/surya/surya_graph/surya_graph_RuleEngineValidation.sol.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+4.38 KB
(170%)
doc/surya/surya_inheritance/surya_inheritance_IRuleEngineValidation.sol.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+6.49 KB
(120%)
doc/surya/surya_inheritance/surya_inheritance_RuleEngineValidation.sol.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+25.3 KB
doc/surya/surya_inheritance/surya_inheritance_RuleEngineValidationCommon.sol.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+30.2 KB
doc/surya/surya_inheritance/surya_inheritance_RuleWhitelistWrapper.sol.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
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
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
36 changes: 36 additions & 0 deletions
36
doc/surya/surya_report/surya_report_RuleEngineValidationCommon.sol.md
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 |
---|---|---|
@@ -0,0 +1,36 @@ | ||
## Sūrya's Description Report | ||
|
||
### Files Description Table | ||
|
||
|
||
| File Name | SHA-1 Hash | | ||
|-------------|--------------| | ||
| ./modules/RuleEngineValidationCommon.sol | 9c992d27ccef264c7cb0c3137f384541590f9bfd | | ||
|
||
|
||
### Contracts Description Table | ||
|
||
|
||
| Contract | Type | Bases | | | | ||
|:----------:|:-------------------:|:----------------:|:----------------:|:---------------:| | ||
| └ | **Function Name** | **Visibility** | **Mutability** | **Modifiers** | | ||
|||||| | ||
| **RuleEngineValidationCommon** | Implementation | AccessControl, RuleInternal, IRuleEngineValidationCommon ||| | ||
| └ | setRulesValidation | Public ❗️ | 🛑 | onlyRole | | ||
| └ | clearRulesValidation | Public ❗️ | 🛑 | onlyRole | | ||
| └ | _clearRulesValidation | Internal 🔒 | 🛑 | | | ||
| └ | addRuleValidation | Public ❗️ | 🛑 | onlyRole | | ||
| └ | removeRuleValidation | Public ❗️ | 🛑 | onlyRole | | ||
| └ | _removeRuleValidation | Internal 🔒 | 🛑 | | | ||
| └ | rulesCountValidation | External ❗️ | |NO❗️ | | ||
| └ | getRuleIndexValidation | External ❗️ | |NO❗️ | | ||
| └ | ruleValidation | External ❗️ | |NO❗️ | | ||
| └ | rulesValidation | External ❗️ | |NO❗️ | | ||
|
||
|
||
### Legend | ||
|
||
| Symbol | Meaning | | ||
|:--------:|-----------| | ||
| 🛑 | Function can modify state | | ||
| 💵 | Function is payable | |
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
33 changes: 33 additions & 0 deletions
33
doc/surya/surya_report/surya_report_RuleWhitelistWrapper.sol.md
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 |
---|---|---|
@@ -0,0 +1,33 @@ | ||
## Sūrya's Description Report | ||
|
||
### Files Description Table | ||
|
||
|
||
| File Name | SHA-1 Hash | | ||
|-------------|--------------| | ||
| ./rules/validation/RuleWhitelistWrapper.sol | bf329dec00b1249add78824aa85a9dcdd49a8342 | | ||
|
||
|
||
### Contracts Description Table | ||
|
||
|
||
| Contract | Type | Bases | | | | ||
|:----------:|:-------------------:|:----------------:|:----------------:|:---------------:| | ||
| └ | **Function Name** | **Visibility** | **Mutability** | **Modifiers** | | ||
|||||| | ||
| **RuleWhitelistWrapper** | Implementation | RuleEngineValidationCommon, MetaTxModuleStandalone, RuleValidateTransfer, RuleWhitelistInvariantStorage ||| | ||
| └ | <Constructor> | Public ❗️ | 🛑 | MetaTxModuleStandalone | | ||
| └ | detectTransferRestriction | Public ❗️ | |NO❗️ | | ||
| └ | canReturnTransferRestrictionCode | External ❗️ | |NO❗️ | | ||
| └ | messageForTransferRestriction | External ❗️ | |NO❗️ | | ||
| └ | _msgSender | Internal 🔒 | | | | ||
| └ | _msgData | Internal 🔒 | | | | ||
| └ | _contextSuffixLength | Internal 🔒 | | | | ||
|
||
|
||
### Legend | ||
|
||
| Symbol | Meaning | | ||
|:--------:|-----------| | ||
| 🛑 | Function can modify state | | ||
| 💵 | Function is payable | |
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
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 |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# Rule Whitelist Wrapper | ||
|
||
[TOC] | ||
|
||
This rule allows to have several different whitelist rules, managed by different operators. | ||
|
||
The rule will call each whitelist rule to know if during a transfer the address `from`or the address `to`is in the whitelist. | ||
If this is the case, the rule return 0 (transfer valid) or an error otherwise. | ||
|
||
## Schema | ||
|
||
### Architecture | ||
|
||
![ruleWhitelistWrapper.drawio](../schema/rule/ruleWhitelistWrapper.drawio.png) | ||
|
||
### Graph | ||
|
||
![surya_graph_Whitelist](../surya/surya_graph/surya_graph_RuleWhitelistWrapper.sol.png) | ||
|
||
### Inheritance | ||
|
||
![surya_inheritance_RuleWhitelistWrapper.sol](../surya/surya_inheritance/surya_inheritance_RuleWhitelistWrapper.sol.png) | ||
|
||
## Details | ||
|
||
### Architecture | ||
|
||
This rule inherits from `RuleEngineValidationCommon`. Thus the whitelist rules are managed with the same architecture and code than for the ruleEngine. For example, rules are added with the functions `setRulesValidation` or `addRuleValidation`. | ||
|
||
### Admin | ||
|
||
The default admin is the address put in argument(`admin`) inside the constructor. It is set in the constructor when the contract is deployed. |
Oops, something went wrong.