Skip to content

Commit 28348c5

Browse files
authored
Merge pull request #53 from CMTA/dev
RC1
2 parents 461d32f + 8a24d07 commit 28348c5

403 files changed

Lines changed: 19483 additions & 23466 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/ci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,17 @@ jobs:
1111
runs-on: ubuntu-latest
1212

1313
steps:
14-
- uses: actions/checkout@v3
14+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 #v4.2
1515
- name: Install Foundry
16-
uses: foundry-rs/foundry-toolchain@v1
16+
uses: foundry-rs/foundry-toolchain@de808b1eea699e761c404bda44ba8f21aba30b2c #v1.3.1
1717
with:
1818
version: nightly
1919

2020
- name: Run Forge install
2121
run: forge install
2222

2323
- name: Setup NodeJS 20.5.0
24-
uses: actions/setup-node@v3
24+
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 #v4.4.0
2525
with:
2626
node-version: 20.5.0
2727

CHANGELOG.md

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,24 @@ Please follow [https://changelog.md/](https://changelog.md/) conventions.
1717
- Update surya doc by running the 3 scripts in [./doc/script](./doc/script)
1818
- Update changelog
1919

20+
## v3.0.0-rc1
2021

22+
- Rule contracts, requires to perform compliance check, have now their own dedicated [GitHub repository](https://github.com/CMTA/Rules). It means that these contract will be developed and audited separately from the `RuleEngine`. This provides more flexibility and makes it easier to manage audits.
23+
24+
- There is now only one type of rule (read-write rules). Before that:
25+
- First RuleEngine version (audited) had only one type of rule, read-only (whitelist, blacklist)
26+
- A second RuleEngine version (not audited) had two types of rules: operation (read-write) and validation (read-only). A read-write rule is typically a ConditionalTransfer check which require each transfer must be pre-approved.
27+
- Implement ERC-3643 compliance interface, which means that the RuleEngine can be also used with an ERC-3643 token to perform supplementary compliance check on transfer.
28+
- Technical:
29+
- Use [EnumerableSet](https://docs.openzeppelin.com/contracts/5.x/api/utils#EnumerableSet) from OpenZeppelin to store rules, which reduce the whole contract code size.
30+
- Rename several abstract contract
31+
- `RuleEngineOperation`-> `RulesManagementModule`
32+
- `MetaTxModuleStandalone` -> `ERC2771ModuleStandalone`
33+
34+
## v3.0.0-rc0
35+
36+
- Improve test
37+
- Move rules contracts to a dedicated repository, only keep some rules as mock contracts for testing purpose
2138

2239
## v2.1.0
2340

@@ -126,4 +143,4 @@ Whitelist
126143
- Improve integration test with CMTAT
127144

128145
## 1.0.0 - 20221114
129-
- 🎉 first release!
146+
- 🎉 first release!<

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ There are many ways to contribute to RuleEngine Contracts.
44

55
## Opening an issue
66

7-
You can [open an issue] to suggest a feature, a difficulty you have or report a minor bug. For serious bugs in an audited version please do not open an issue, instead refer to our [security policy] for appropriate steps. See [SECURITY.md](./SECURITY.MD) in CMTAT project.
7+
You can [open an issue] to suggest a feature, a difficulty you have or report a minor bug. For serious bugs in an audited version please do not open an issue, instead refer to our [security policy] for appropriate steps. See [SECURITY.md](https://github.com/CMTA/CMTAT/blob/master/SECURITY.md) in CMTAT project.
88

99
Before opening an issue, be sure to search through the existing open and closed issues, and consider posting a comment in one of those instead.
1010

README.md

Lines changed: 1109 additions & 66 deletions
Large diffs are not rendered by default.

doc/TOOLCHAIN.md

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -74,38 +74,37 @@ npm run-script uml:test
7474

7575
Or only specified contracts
7676

77-
RuleEngine
78-
7977
```
8078
npx sol2uml class -i -c src/RuleEngine.sol
8179
```
8280

83-
Whitelist
84-
85-
```
86-
npx sol2uml class src/Whitelist.sol
87-
```
88-
8981
The related component can be installed with `npm install` (see [package.json](./package.json)).
9082

83+
> To avoid the error "Maximum call stack size exceeded", you can flatten the contract before
84+
>
85+
> forge flatten src/RuleEngine.sol > RuleEngineFlatten.sol
86+
9187
### [Surya](https://github.com/ConsenSys/surya)
9288

93-
#### Graph
89+
To generate documentation with surya, you can call the three bash scripts in `doc/script`
9490

95-
To generate graphs with Surya, you can run the following command
91+
| Task | Script |
92+
| -------------------- | ----------------------------- |
93+
| Generate graph | `script_surya_graph.sh` |
94+
| Generate inheritance | `script_surya_inheritance.sh` |
95+
| Generate report | `script_surya_report.sh` |
96+
97+
In the report, the path for the different files are indicated in absolute. You have to remove the part which correspond to your local filesystem.
9698

97-
```bash
98-
npm run-script surya:graph
99-
```
10099

101-
OR
102100

103-
- RuleWhitelist
101+
#### Graph
102+
103+
To generate graphs with Surya, you can run the following command
104104

105105
```bash
106-
npx surya graph src/RuleWhitelist.sol | dot -Tpng > surya_graph_Whitelist.png
106+
npm run-script surya:graph
107107
```
108-
- RuleEngine
109108

110109
```bash
111110
npx surya graph src/RuleEngine.sol | dot -Tpng > surya_graph_RuleEngine.png

doc/codelist.md

Lines changed: 0 additions & 20 deletions
This file was deleted.

doc/compilation/contract-size.png

121 KB
Loading

0 commit comments

Comments
 (0)