Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
54af3bb
Initialize npm dependencies, hardhat js project
markhoangcll Dec 10, 2025
d49ae6c
Update submodules to separate directory
markhoangcll Dec 10, 2025
997312a
Add two standalone deployments and example deployment test. Test fail…
markhoangcll Dec 18, 2025
6889ebd
Rename file to showcase standalone deployment, add example deployment…
markhoangcll Dec 19, 2025
08435b8
Merge branch 'main' into feature/integration-chainlink-ace
markhoangcll Dec 19, 2025
e1f62d7
Add hardhat to package.json, update solidity version and config
rya-sge Dec 19, 2025
36ee24d
Merge pull request #3 from CMTA/fix
markhoangcll Dec 22, 2025
5a658b6
test works
rya-sge Jan 19, 2026
d04ddf8
Update CMTAT to v3.2.0-rc0, remove duplicate modules, update test
rya-sge Jan 22, 2026
ddf33f8
Add call to policy protected unchained and fix compilation warning
rya-sge Jan 22, 2026
c5cf3af
Merge pull request #4 from CMTA/adapt-test
markhoangcll Jan 27, 2026
fa893f4
remove chainlink-ace submodule, add npm dependency
markhoangcll Mar 2, 2026
233f336
remove ace submodule tag
markhoangcll Mar 2, 2026
7a8786b
Change code references to new chainlink npm package
markhoangcll Mar 3, 2026
bc80e99
CM-1350 Change inheritance of Ownable contract, fix deployment scripts
markhoangcll Mar 6, 2026
3618ef0
Create compilable implementations for standard, lite and upgradeable …
markhoangcll Mar 9, 2026
01f2f6e
Change inheritance of Ownable contract, fix deployment scripts
markhoangcll Mar 6, 2026
a2278ff
Create compilable implementations for standard, lite and upgradeable …
markhoangcll Mar 9, 2026
c21a016
add deployment scripts for other token versions, add hardhat-foundry …
markhoangcll Mar 23, 2026
5fd289d
Merge branch 'feature/integration-chainlink-ace' of github.com:CMTA/C…
markhoangcll Mar 23, 2026
51dc44e
remove unnecessary scripts
markhoangcll Mar 23, 2026
579ab22
remove transfer validation policy prototype
markhoangcll Mar 23, 2026
e9d962d
Change branch to master for CMTAT submodule, delete no neccessary dep…
markhoangcll Mar 24, 2026
0718b16
Add _msgSender() for forward sender passthrough
markhoangcll Mar 25, 2026
60e9cd4
Remove unused imports, fix solidity docs
markhoangcll Mar 25, 2026
48f644a
Add missing context clear
markhoangcll Mar 25, 2026
6de8d55
Add transfer validation policy and mock rules, add more tests
markhoangcll Apr 14, 2026
7ac2959
Update README
markhoangcll Apr 15, 2026
ce10f88
Create CMTAT base test module to test unchanged CMTAT functionality, …
markhoangcll Apr 15, 2026
0f02683
Add snapshot and document engines to tokens, change tests and optimiz…
markhoangcll Apr 15, 2026
0a1f5dc
Add formatting and linting for js and solidity. Lint and prettify who…
markhoangcll Apr 15, 2026
435f974
Update readme and fix lint unused var
markhoangcll Apr 15, 2026
724ab3d
add authorization clause in PolicyProtected attachPolicyEngine, delet…
markhoangcll Apr 15, 2026
46a56d2
Remove ERC-2771 support for CMTAT+ACE
markhoangcll Apr 16, 2026
a84968a
Change docs and licence
markhoangcll Apr 16, 2026
dfa172a
Correct docs and update storage slot for example TransferValidationPo…
markhoangcll Apr 21, 2026
a5da8da
CM-1215 Update submodules and correct docs
markhoangcll Apr 21, 2026
22c8482
Update submodules and correct docs
markhoangcll Apr 21, 2026
294c0f1
Merge branch 'feature/integration-chainlink-ace' of github.com:CMTA/C…
markhoangcll Apr 21, 2026
e05b31b
Add github workflow
rya-sge Apr 30, 2026
aa86f1e
docs(readme): clarify Standard variant runtime dependency on Chainlin…
rya-sge May 8, 2026
c7c0fd3
docs: clarify runPolicy context cleanup semantics on revert in README…
rya-sge May 8, 2026
0b875b1
docs(contracts): clarify runPolicy context cleanup behavior on revert…
rya-sge May 8, 2026
db91035
refactor(contracts): remove unused imports (keeping intentional Demo/…
rya-sge May 8, 2026
e21f1d3
refactor(mocks): make RestrictedAddressRule owner immutable to reduce…
rya-sge May 8, 2026
0582831
Update CMTAT to v3.2.0
rya-sge May 8, 2026
60432db
refactor(policy): switch transfer validation to RuleEngine IRule, ali…
rya-sge May 8, 2026
ec7dba9
feat(contract,test,docs): emit RulesUpdated in TransferValidationPoli…
rya-sge May 8, 2026
121ca33
Improve README and add slither/aderyn report
rya-sge May 11, 2026
6f4a00a
Update readme
rya-sge May 11, 2026
e96ce4c
Align deployment test suites across standard/lite variants and expand…
rya-sge May 12, 2026
abf4a80
Update github workflow to install foundry
rya-sge May 12, 2026
751bf0c
test(coverage): stabilize snapshot timing under coverage and add targ…
rya-sge May 12, 2026
8f587a2
Pin library to specific version (no floating pragma) + install covera…
rya-sge May 12, 2026
96588e5
Add coverage files
rya-sge May 12, 2026
5c44488
Add mock contracts for testing purpose
rya-sge May 12, 2026
ce1ab80
Update gitignore
rya-sge May 12, 2026
fa8d2c9
Update readme
rya-sge May 12, 2026
26f0d7c
Add Changelog
rya-sge May 23, 2026
99c9e24
Merge pull request #9 from CMTA/update-doc
rya-sge May 23, 2026
a717708
Fix input parameter validation on transfer policy
markhoangcll Jun 15, 2026
c7a5863
Integrate Chainlink-ACE v1.1.1 into CMTAT, update tests, update gener…
markhoangcll Jun 15, 2026
2119073
Run format
markhoangcll Jun 15, 2026
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
36 changes: 36 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Hardhat CI

on:
push:
branches: [dev, master, main]
pull_request:
branches: [dev, master, main]

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 #v4.2

- name: Install Foundry
uses: foundry-rs/foundry-toolchain@de808b1eea699e761c404bda44ba8f21aba30b2c #v1.3.1
with:
version: nightly

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

- name: Show NodeJS version
run: npm --version

- name: Checkout submodules
run: git submodule update --init --recursive

- name: Install Project Dependencies
run: npm install

- name: Run Hardhat Test
run: npx hardhat test
32 changes: 28 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ lerna-debug.log*
# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json

# Slither reports (keep directory via .gitkeep)
reports/*
!reports/.gitkeep

# Runtime data
pids
*.pid
Expand All @@ -18,10 +22,6 @@ pids
# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage
*.lcov

# nyc test coverage
.nyc_output

Expand All @@ -41,6 +41,9 @@ build/Release
node_modules/
jspm_packages/

# Python virtual environment
cct/

# Snowpack dependency directory (https://snowpack.dev/)
web_modules/

Expand Down Expand Up @@ -137,3 +140,24 @@ dist
# Vite logs files
vite.config.js.timestamp-*
vite.config.ts.timestamp-*

node_modules
.env

# Hardhat files
/cache
/artifacts

# TypeChain files
/typechain
/typechain-types

# Hardhat Ignition default folder for deployments against a local node
ignition/deployments/chain-31337

# Foudry files
/cache_hardhat

# custom local directory
history
.codex
8 changes: 6 additions & 2 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
[submodule "CMTAT"]
path = CMTAT
[submodule "submodules/CMTAT"]
path = submodules/CMTAT
url = https://github.com/CMTA/CMTAT
branch = master
[submodule "submodules/RuleEngine"]
path = submodules/RuleEngine
url = https://github.com/CMTA/RuleEngine
6 changes: 6 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
node_modules/
submodules/
artifacts/
cache_hardhat/
typechain-types/
doc/
22 changes: 22 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"semi": true,
"singleQuote": true,
"trailingComma": "all",
"tabWidth": 2,
"printWidth": 100,
"plugins": ["prettier-plugin-solidity"],
"overrides": [
{
"files": "*.sol",
"options": {
"parser": "slang",
"printWidth": 120,
"tabWidth": 4,
"useTabs": false,
"singleQuote": false,
"bracketSpacing": false,
"compiler": "0.8.20"
}
}
]
}
13 changes: 13 additions & 0 deletions .solcover.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
const fs = require('fs');
const path = require('path');

module.exports = {
istanbulFolder: 'doc/coverage',
skipFiles: ['modules/chainlink-ace/mocks/PolicyProtectedUpgradeableMocks.sol'],
onIstanbulComplete: async function () {
const rootCoverageJson = path.join(process.cwd(), 'coverage.json');
if (fs.existsSync(rootCoverageJson)) {
fs.unlinkSync(rootCoverageJson);
}
},
};
30 changes: 30 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# AGENTS Guidelines

## Sync Policy (Mandatory)

- `AGENTS.md` and `CLAUDE.md` must always contain exactly the same content.
- Any edit to one file must be mirrored in the other file in the same change.

## Testing Policy (Mandatory)

- Always add or update automated tests for every new feature, behavior change, bug fix, or security hardening change.
- A code change is not complete unless tests validating the change are included in the same PR/commit series.
- At minimum, include:
- positive-path test(s),
- negative-path/revert test(s) when applicable,
- event assertion(s) when state changes emit events.
- Run relevant tests locally before finalizing changes. If a full suite cannot be run, clearly state what was run and what was skipped.

## Codebase Summary

- This repository integrates **CMTA CMTAT** token modules with **Chainlink ACE PolicyEngine**.
- There are two deployment variants:
- **Standard**: policy-authoritative access/compliance via ACE (`runPolicy`) with `OwnableUpgradeable`.
- **Lite**: keeps CMTAT role-based module access control and uses ACE mainly for transfer validation.
- Core custom contracts are under:
- `contracts/modules/standard/`
- `contracts/modules/lite/`
- `contracts/modules/chainlink-ace/custom/`
- `contracts/modules/chainlink-ace/modified/`
- Tests are primarily under `test/`, with transfer-policy coverage in `test/custom/transferValidationPolicy.test.js`.
- External dependencies are vendored as git submodules in `submodules/` (notably `CMTAT`, `chainlink-ace`, and `RuleEngine`).
46 changes: 46 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# CHANGELOG

All notable changes to this project will be documented in this file.

Please follow [https://changelog.md](https://changelog.md) conventions and the other conventions below

## Semantic Version 2.0.0

Given a version number MAJOR.MINOR.PATCH, increment the:

1. MAJOR version when the new version makes:
- Incompatible proxy **storage** change internally or through the upgrade of an external library (OpenZeppelin)
- A significant change in external APIs (public/external functions) or in the internal architecture
2. MINOR version when the new version adds functionality in a backward compatible manner
3. PATCH version when the new version makes backward compatible bug fixes

See [https://semver.org](https://semver.org)

## Type of changes

- `Added` for new features.
- `Changed` for changes in existing functionality.
- `Deprecated` for soon-to-be removed features.
- `Removed` for now removed features.
- `Fixed` for any bug fixes.
- `Security` in case of vulnerabilities.

Reference: [keepachangelog.com/en/1.1.0/](https://keepachangelog.com/en/1.1.0/)

Custom changelog tag: `Dependencies`, `Documentation`, `Testing`

## [0.1.0] -

### Added

- Initial release of **CMTAT-ACE**, integrating CMTAT modules with Chainlink ACE PolicyEngine.
- Two deployment variants:
- **Standard**: policy-authoritative access and compliance through ACE `runPolicy`.
- **Lite**: CMTAT role-based module access control with ACE-based transfer validation.
- Core tokenization and compliance modules under:
- `contracts/modules/standard/`
- `contracts/modules/lite/`
- `contracts/modules/chainlink-ace/custom/`
- `contracts/modules/chainlink-ace/modified/`
- Deployment flows for standalone, upgradeable, and UUPS variants.
- Automated test suite covering deployment, policy integration, and transfer validation behavior.
30 changes: 30 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# AGENTS Guidelines

## Sync Policy (Mandatory)

- `AGENTS.md` and `CLAUDE.md` must always contain exactly the same content.
- Any edit to one file must be mirrored in the other file in the same change.

## Testing Policy (Mandatory)

- Always add or update automated tests for every new feature, behavior change, bug fix, or security hardening change.
- A code change is not complete unless tests validating the change are included in the same PR/commit series.
- At minimum, include:
- positive-path test(s),
- negative-path/revert test(s) when applicable,
- event assertion(s) when state changes emit events.
- Run relevant tests locally before finalizing changes. If a full suite cannot be run, clearly state what was run and what was skipped.

## Codebase Summary

- This repository integrates **CMTA CMTAT** token modules with **Chainlink ACE PolicyEngine**.
- There are two deployment variants:
- **Standard**: policy-authoritative access/compliance via ACE (`runPolicy`) with `OwnableUpgradeable`.
- **Lite**: keeps CMTAT role-based module access control and uses ACE mainly for transfer validation.
- Core custom contracts are under:
- `contracts/modules/standard/`
- `contracts/modules/lite/`
- `contracts/modules/chainlink-ace/custom/`
- `contracts/modules/chainlink-ace/modified/`
- Tests are primarily under `test/`, with transfer-policy coverage in `test/custom/transferValidationPolicy.test.js`.
- External dependencies are vendored as git submodules in `submodules/` (notably `CMTAT`, `chainlink-ace`, and `RuleEngine`).
1 change: 0 additions & 1 deletion CMTAT
Submodule CMTAT deleted from 9c96c8
Loading
Loading