Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
7ea77ed
bump language and compact version
andrew-fleming Sep 5, 2025
d055cf0
use multi const declaration
andrew-fleming Sep 5, 2025
78b412d
update tests
andrew-fleming Sep 5, 2025
f0405a0
fix comments in build
andrew-fleming Sep 5, 2025
d44dfd8
add formatter
andrew-fleming Sep 6, 2025
d51afd8
update turbo and yarn.lock
andrew-fleming Sep 6, 2025
f84e861
add formatter cmds
andrew-fleming Sep 6, 2025
7fc8fb4
fmt all .compact files
andrew-fleming Sep 6, 2025
e5ecac7
improve design
andrew-fleming Sep 7, 2025
6074183
fix import, remove traling space
andrew-fleming Sep 8, 2025
f864153
fix output bug
andrew-fleming Sep 9, 2025
de1f426
add BaseServices tests
andrew-fleming Sep 9, 2025
8fc5118
refactor compiler tests
andrew-fleming Sep 9, 2025
590f8b5
fix fmt
andrew-fleming Sep 10, 2025
8ab1d18
refactor runCompiler tests
andrew-fleming Sep 10, 2025
2be014f
fix import
andrew-fleming Sep 10, 2025
cb1051e
turn off lit key error
andrew-fleming Sep 10, 2025
543eef0
fix fmt
andrew-fleming Sep 10, 2025
0f68ac6
rename fmt-and-lint -> check
andrew-fleming Sep 10, 2025
8b0cbc3
update CI with rename and compact fmt
andrew-fleming Sep 10, 2025
4877d04
rename fmt-and-lint -> check
andrew-fleming Sep 10, 2025
d802c54
update readme
andrew-fleming Sep 10, 2025
119feac
make default format readonly
andrew-fleming Sep 10, 2025
d4431e8
improve error handling, fix success msg
andrew-fleming Sep 10, 2025
8f1c67a
remove execute method
andrew-fleming Sep 10, 2025
5a015b3
fix format task
andrew-fleming Sep 10, 2025
05f3bf3
add formatter tests
andrew-fleming Sep 10, 2025
279cd4b
tidy up tests
andrew-fleming Sep 10, 2025
2b066df
fix fmt
andrew-fleming Sep 10, 2025
2f1082e
improve base services docs
andrew-fleming Sep 10, 2025
a149745
update and improve docs
andrew-fleming Sep 10, 2025
bef4b34
improve runCompiler and runFormatter docs
andrew-fleming Sep 10, 2025
9801f3a
add formatter docs
andrew-fleming Sep 11, 2025
041e2f0
simplify formatter
andrew-fleming Sep 11, 2025
64bb99f
improve docs
andrew-fleming Sep 11, 2025
0feb0bb
update tests
andrew-fleming Sep 11, 2025
6623ae8
fix fmt
andrew-fleming Sep 11, 2025
2f8eaf6
add runFormatter tests
andrew-fleming Sep 11, 2025
862fd30
move format:check before compile in CI
andrew-fleming Sep 11, 2025
2525b7c
fix bin path
andrew-fleming Sep 11, 2025
bd67116
update yarn.lock
andrew-fleming Sep 11, 2025
b357c80
fix fmt check
andrew-fleming Sep 11, 2025
c5d48f1
fix conflicts
andrew-fleming Sep 11, 2025
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
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/01_bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ body:
label: Version
description: What version of Compact are you running?
options:
- 0.24.0 (Default)
- 0.25.0 (Default)
default: 0
validations:
required: true
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ jobs:
uses: ./.github/actions/setup

- name: Format & Lint
run: turbo fmt-and-lint:ci
run: turbo check:ci
7 changes: 5 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ on:

env:
TURBO_TELEMETRY_DISABLED: 1
COMPILER_VERSION: "0.24.0"
LANGUAGE_VERSION: "0.16.0"
COMPILER_VERSION: "0.25.0"
LANGUAGE_VERSION: "0.17.0"

jobs:
run-suite:
Expand Down Expand Up @@ -61,6 +61,9 @@ jobs:
fi
echo "✅ Language version matches: $COMPUTED_LANGUAGE_VERSION"

- name: Run Compact format check
run: turbo format

- name: Compile contracts (with retry on hash mismatch)
shell: bash
run: |
Expand Down
34 changes: 20 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[![Generic badge](https://img.shields.io/badge/Compact%20Compiler-0.24.0-1abc9c.svg)](https://docs.midnight.network/relnotes/compact)
[![Generic badge](https://img.shields.io/badge/Compact%20Compiler-0.25.0-1abc9c.svg)](https://docs.midnight.network/relnotes/compact)
[![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-2.1-4baaaa.svg)](CODE_OF_CONDUCT.md)

# OpenZeppelin Contracts for Compact
Expand All @@ -20,8 +20,8 @@ Follow Midnight's [Compact Developer Tools installation guide](https://docs.midn
```bash
$ compact compile --version

Compactc version: 0.24.0
0.24.0
Compactc version: 0.25.0
0.25.0
```

## Set up the project
Expand Down Expand Up @@ -56,29 +56,29 @@ $ turbo compact

(...)
✔ [COMPILE] [1/2] Compiled FungibleToken.compact
@openzeppelin-compact/fungible-token:compact: Compactc version: 0.24.0
@openzeppelin-compact/fungible-token:compact: Compactc version: 0.25.0
@openzeppelin-compact/fungible-token:compact:
✔ [COMPILE] [1/6] Compiled Initializable.compact
@openzeppelin-compact/utils:compact: Compactc version: 0.24.0
@openzeppelin-compact/utils:compact: Compactc version: 0.25.0
@openzeppelin-compact/utils:compact:
✔ [COMPILE] [2/6] Compiled Pausable.compact
@openzeppelin-compact/utils:compact: Compactc version: 0.24.0
@openzeppelin-compact/utils:compact: Compactc version: 0.25.0
@openzeppelin-compact/utils:compact:
✔ [COMPILE] [3/6] Compiled Utils.compact
@openzeppelin-compact/utils:compact: Compactc version: 0.24.0
@openzeppelin-compact/utils:compact: Compactc version: 0.25.0
@openzeppelin-compact/utils:compact:
✔ [COMPILE] [4/6] Compiled test/mocks/MockInitializable.compact
@openzeppelin-compact/utils:compact: Compactc version: 0.24.0
@openzeppelin-compact/utils:compact: Compactc version: 0.25.0
@openzeppelin-compact/utils:compact: Compiling 3 circuits:
✔ [COMPILE] [5/6] Compiled test/mocks/MockPausable.compact
@openzeppelin-compact/utils:compact: Compactc version: 0.24.0
@openzeppelin-compact/utils:compact: Compactc version: 0.25.0
@openzeppelin-compact/utils:compact: Compiling 5 circuits:
✔ [COMPILE] [6/6] Compiled test/mocks/MockUtils.compact
@openzeppelin-compact/utils:compact: Compactc version: 0.24.0
@openzeppelin-compact/utils:compact: Compactc version: 0.25.0
@openzeppelin-compact/utils:compact:

✔ [COMPILE] [2/2] Compiled test/mocks/MockFungibleToken.compact
@openzeppelin-compact/fungible-token:compact: Compactc version: 0.24.0
@openzeppelin-compact/fungible-token:compact: Compactc version: 0.25.0
@openzeppelin-compact/fungible-token:compact: Compiling 15 circuits:


Expand All @@ -104,15 +104,21 @@ SKIP_ZK=true turbo compact
turbo test
```

### Format and lint files
### Format and lint ts files

```bash
turbo fmt-and-lint:fix
turbo check:fix
```

### Format Compact files

```bash
turbo format:fix
```

### All together now!
```bash
turbo compact test fmt-and-lint:fix
turbo compact test check:fix
```

## Security
Expand Down
3 changes: 3 additions & 0 deletions biome.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@
"useExhaustiveDependencies": "off",
"useJsxKeyInIterable": "off"
},
"complexity": {
"useLiteralKeys": "off"
},
"performance": {
"noBarrelFile": "error",
"noReExportAll": "error",
Expand Down
3 changes: 2 additions & 1 deletion compact/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
},
"bin": {
"compact-builder": "dist/runBuilder.js",
"compact-compiler": "dist/runCompiler.js"
"compact-compiler": "dist/runCompiler.js",
"compact-formatter": "dist/runFormatter.js"
},
"scripts": {
"build": "tsc -p .",
Expand Down
Loading
Loading