Skip to content
Merged

RC1 #53

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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,17 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 #v4.2
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
uses: foundry-rs/foundry-toolchain@de808b1eea699e761c404bda44ba8f21aba30b2c #v1.3.1
with:
version: nightly

- name: Run Forge install
run: forge install

- name: Setup NodeJS 20.5.0
uses: actions/setup-node@v3
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 #v4.4.0
with:
node-version: 20.5.0

Expand Down
19 changes: 18 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,24 @@ Please follow [https://changelog.md/](https://changelog.md/) conventions.
- Update surya doc by running the 3 scripts in [./doc/script](./doc/script)
- Update changelog

## v3.0.0-rc1

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

- There is now only one type of rule (read-write rules). Before that:
- First RuleEngine version (audited) had only one type of rule, read-only (whitelist, blacklist)
- 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.
- 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.
- Technical:
- Use [EnumerableSet](https://docs.openzeppelin.com/contracts/5.x/api/utils#EnumerableSet) from OpenZeppelin to store rules, which reduce the whole contract code size.
- Rename several abstract contract
- `RuleEngineOperation`-> `RulesManagementModule`
- `MetaTxModuleStandalone` -> `ERC2771ModuleStandalone`

## v3.0.0-rc0

- Improve test
- Move rules contracts to a dedicated repository, only keep some rules as mock contracts for testing purpose

## v2.1.0

Expand Down Expand Up @@ -126,4 +143,4 @@ Whitelist
- Improve integration test with CMTAT

## 1.0.0 - 20221114
- 🎉 first release!
- 🎉 first release!<
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ There are many ways to contribute to RuleEngine Contracts.

## Opening an issue

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

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.

Expand Down
1,175 changes: 1,109 additions & 66 deletions README.md

Large diffs are not rendered by default.

33 changes: 16 additions & 17 deletions doc/TOOLCHAIN.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,38 +74,37 @@ npm run-script uml:test

Or only specified contracts

RuleEngine

```
npx sol2uml class -i -c src/RuleEngine.sol
```

Whitelist

```
npx sol2uml class src/Whitelist.sol
```

The related component can be installed with `npm install` (see [package.json](./package.json)).

> To avoid the error "Maximum call stack size exceeded", you can flatten the contract before
>
> forge flatten src/RuleEngine.sol > RuleEngineFlatten.sol

### [Surya](https://github.com/ConsenSys/surya)

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

To generate graphs with Surya, you can run the following command
| Task | Script |
| -------------------- | ----------------------------- |
| Generate graph | `script_surya_graph.sh` |
| Generate inheritance | `script_surya_inheritance.sh` |
| Generate report | `script_surya_report.sh` |

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.

```bash
npm run-script surya:graph
```

OR

- RuleWhitelist
#### Graph

To generate graphs with Surya, you can run the following command

```bash
npx surya graph src/RuleWhitelist.sol | dot -Tpng > surya_graph_Whitelist.png
npm run-script surya:graph
```
- RuleEngine

```bash
npx surya graph src/RuleEngine.sol | dot -Tpng > surya_graph_RuleEngine.png
Expand Down
20 changes: 0 additions & 20 deletions doc/codelist.md

This file was deleted.

Binary file added doc/compilation/contract-size.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading