Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
283 commits
Select commit Hold shift + click to select a range
540ea84
remove contract dir
andrew-fleming Apr 7, 2025
e55f902
re-add erc20
andrew-fleming Apr 7, 2025
c9644c4
use utils zero address check in erc20
andrew-fleming Apr 7, 2025
873d3a4
fix sim export
andrew-fleming Apr 7, 2025
2ff7e0e
remove unused type
andrew-fleming Apr 7, 2025
9905ed5
add line
andrew-fleming Apr 7, 2025
b40d038
Restructure workspace to match ERC20, adds working tests
emnul Apr 8, 2025
09b50b5
WIP impl transferFrom and its dependent private functions
emnul Apr 8, 2025
e6f63f1
erc20 unshielded (#1)
andrew-fleming Apr 8, 2025
43f5eac
refactor _requireOwned
emnul Apr 9, 2025
958fcf1
adds safeTransferFrom function signatures
emnul Apr 9, 2025
c8ada57
updates `_approve` signature
emnul Apr 9, 2025
b5b78dd
Add setApprovalForAll fn
emnul Apr 9, 2025
87d364d
adds getApproved fn
emnul Apr 9, 2025
e30440d
add approve fn
emnul Apr 9, 2025
ea7a727
Add tokenURI fn
emnul Apr 9, 2025
531acbf
Adds _increaseBalance fn
emnul Apr 9, 2025
a0ca096
Fix compile error in `_update`
emnul Apr 9, 2025
b9f1eff
adds _mint fn
emnul Apr 9, 2025
6de8a59
Add _safeMint fn
emnul Apr 9, 2025
717215c
Add _burn fn
emnul Apr 9, 2025
14b4aa6
Add _transfer fn
emnul Apr 9, 2025
b627dbe
Fix compiler errors
emnul Apr 10, 2025
2a3d27f
reorg code
emnul Apr 10, 2025
abdf0dc
Adds `baseURI` witness to interface
emnul Apr 10, 2025
9cdc660
export circuits for testing
emnul Apr 10, 2025
30e8b93
reorg code
emnul Apr 10, 2025
5d9b2eb
Add all mock functions
emnul Apr 10, 2025
0177c0f
Fix top-level export error
emnul Apr 10, 2025
9e46999
Fix name bug
emnul Apr 10, 2025
68c43fa
add yarn.lock
emnul Apr 10, 2025
9aa56ce
Adds new Util function
emnul Apr 25, 2025
12fcb11
Adds tests for isKeyOrAddressEqual
emnul Apr 25, 2025
7a5ad93
Update witness function signature
emnul Apr 25, 2025
882d54d
write boilerplate fns for testing, function impl consistency, add mis…
emnul Apr 25, 2025
5037cf7
Add development section to readme (#21)
andrew-fleming Apr 10, 2025
fc79731
tidy up code (#23)
andrew-fleming Apr 11, 2025
d11abf3
Add pausable (#22)
andrew-fleming Apr 26, 2025
2b0e0ab
Bump midnight-js, transition to biome, basic improvements (#35)
andrew-fleming Apr 29, 2025
7e12f04
Add PR and issue templates (#43)
andrew-fleming May 7, 2025
d026103
Add security doc (#42)
andrew-fleming May 7, 2025
25cadf0
chore: add code owners (#53)
0xisk May 9, 2025
e4c01a6
Improve compact scripts (#41)
andrew-fleming May 14, 2025
c4d7031
migrate to vitest, bump compact-runtime
andrew-fleming May 16, 2025
ef8d5bf
use vitest run, remove vitest ui dep
andrew-fleming May 17, 2025
a9df304
add vitest imports for testing
andrew-fleming May 17, 2025
22aa2ca
remove vitest ui
andrew-fleming May 17, 2025
2fbb088
bump compact-runtime to 0.8.1
andrew-fleming May 17, 2025
ed6f759
set vitest reporters to verbose
andrew-fleming May 17, 2025
e1f6f72
fix fmt
andrew-fleming May 18, 2025
397f5e4
fix lint
andrew-fleming May 18, 2025
4a63222
remove unused dep
andrew-fleming May 19, 2025
474921a
Update pragma to new version, import path
emnul May 19, 2025
8907206
Add vitest config
emnul May 19, 2025
728b6ad
Fix biome lints
emnul May 19, 2025
b94dd81
Update pragma to latest version
emnul May 19, 2025
a0fd350
Add license (#44)
andrew-fleming May 19, 2025
0c548bc
Support compact 0.23.0, migrate to vitest (#68)
andrew-fleming May 19, 2025
4d0593f
Update .nvmrc (#73)
andrew-fleming May 20, 2025
b9f4c04
Remove Either from public function signatures
emnul May 20, 2025
28426bc
Remove _safeMint and _safeTransfer functions
emnul May 20, 2025
3d69160
Remove _safe fns and update fn signatures in simulator
emnul May 20, 2025
13b2dc2
update erc721 tests
emnul May 20, 2025
7509414
Fix typo
emnul May 20, 2025
35f35b3
Add member checks to Map accesses, fix logic bug, update test
emnul May 21, 2025
6aeb483
fix conflicts
andrew-fleming May 17, 2025
49fc02c
update yarnlock
andrew-fleming May 19, 2025
aff73f4
change field to uint<128>
andrew-fleming May 19, 2025
7ac0058
fix simulator methods
andrew-fleming May 19, 2025
7c5e40a
update package.json and yarnlock
andrew-fleming May 19, 2025
038d939
add vitest imports to test
andrew-fleming May 19, 2025
7b5c1b0
remove barrel files
andrew-fleming May 19, 2025
59ba06f
fix fmt and lint
andrew-fleming May 19, 2025
f938354
add vitest config, remove eslint and jest from erc721
andrew-fleming May 19, 2025
3b30b97
fix fmt
andrew-fleming May 19, 2025
dc15375
Apply suggestions from code review
andrew-fleming May 22, 2025
4d6a7ed
Fixes some merge conflicts from most recent changes (#77)
emnul May 22, 2025
c5077d9
Set private prop to true in package.json (#84)
andrew-fleming May 27, 2025
e8df634
Set up antora and overview page (#83)
andrew-fleming May 27, 2025
3f0920f
Improve readme (#80)
andrew-fleming May 27, 2025
c8f8bda
Use burn_address function to generate 0 address
emnul May 27, 2025
c2e1c43
Fix JSDoc syntax
emnul May 28, 2025
4dc110d
Revert previous change
emnul May 28, 2025
715e7a6
Add isZeroKey utility function
emnul May 28, 2025
01d73c5
Update witness file
emnul May 29, 2025
074424c
Improve readability
emnul May 29, 2025
2e04281
Standardize Zero Address Structure (#90)
emnul May 29, 2025
778c7b8
Add isContractAddress utils function
emnul Jun 4, 2025
ec11c2f
fmt files
emnul Jun 4, 2025
505436c
Create and test uninitialized mock contract
emnul Jun 6, 2025
b0a51f9
Remove License from Mock
emnul Jun 12, 2025
4025202
fmt MockUninitializedERC721.compact
emnul Jun 12, 2025
8774876
Add formatting recommendations from code review
emnul Jun 12, 2025
c2a0f16
Update CODEOWNERS with OpenZeppelin team (#91)
emnul Jun 5, 2025
2e1fd4e
Add extensibility section (#86)
andrew-fleming Jun 6, 2025
d42f19f
fmt biome.json
emnul Jun 12, 2025
06e7b67
Fix issue with formatting files in project root
emnul Jun 12, 2025
033a625
Fix redundant compact turbo task calls
emnul Jun 12, 2025
1fa5bd1
Adds build step to compact workspace
emnul Jun 12, 2025
5a2ea43
Updates turbo.json
emnul Jun 12, 2025
a0a6c2b
fmt package.json
emnul Jun 12, 2025
36182fd
Remove old file
emnul Jun 12, 2025
5711f2a
Configure composite action
emnul Jun 12, 2025
83ff44d
Configure workflow to check for lints and formatting
emnul Jun 12, 2025
3a458d8
Configure CodeQL workflow
emnul Jun 12, 2025
6e6a63f
Configure workflow to test compact compiler install
emnul Jun 12, 2025
91e25fd
Add skip-compile input
emnul Jun 12, 2025
dcbc249
Add contracts build workflow
emnul Jun 12, 2025
c321c56
Add contracts compile workflow
emnul Jun 12, 2025
2bdd1b0
Add contracts test workflow
emnul Jun 12, 2025
3f3fece
Refator workflows
emnul Jun 12, 2025
f1edf7a
Use different ref
emnul Jun 12, 2025
f457350
Update fetch depth
emnul Jun 12, 2025
364b8a7
revert change
emnul Jun 12, 2025
3ec89a6
Update caching
emnul Jun 12, 2025
2b0e5e9
Add dependabot.yml
emnul Jun 12, 2025
6a8699e
Add fmt:ci turbo task
emnul Jun 12, 2025
76cc118
Remove file
emnul Jun 12, 2025
1d1cd4e
Disable telemetry
emnul Jun 12, 2025
98853b7
Remove file
emnul Jun 12, 2025
1a24649
Add no-errors-on-unmatched flag to fmt:ci task
emnul Jun 12, 2025
e615127
Update module resolution configs
emnul Jun 12, 2025
e95e915
Bump @types/node pkg
emnul Jun 12, 2025
9df6ad9
Fix issue with formatting files in project root
emnul Jun 12, 2025
81f3554
Updates turbo.json
emnul Jun 12, 2025
adc3938
Configure composite action
emnul Jun 12, 2025
f3794eb
Configure CodeQL workflow
emnul Jun 12, 2025
22a1111
Configure workflow to test compact compiler install
emnul Jun 12, 2025
b316272
Add contracts build workflow
emnul Jun 12, 2025
5c50712
Add contracts compile workflow
emnul Jun 12, 2025
15d737e
Refator workflows
emnul Jun 12, 2025
b9d1294
Use different ref
emnul Jun 12, 2025
0a5f69d
Update fetch depth
emnul Jun 12, 2025
c8c1370
revert change
emnul Jun 12, 2025
f781165
Add fmt:ci turbo task
emnul Jun 12, 2025
7c7a91e
Remove file
emnul Jun 12, 2025
bd6faa0
Update Setup Composite Action, Introduce Compact Test Suite Workflow
emnul Jun 13, 2025
5eb8f87
Update workflow trigger for testing
emnul Jun 13, 2025
6a622c3
Update test suite
emnul Jun 13, 2025
880d798
Consolidate Contracts Tests in Single Test Suite
emnul Jun 13, 2025
89892be
Update checks workflow, remove unneccessary scripts
emnul Jun 13, 2025
c86bfec
fmt file
emnul Jun 13, 2025
4e4d3cc
Update turbo caching
emnul Jun 13, 2025
045eeec
Update format and lint script
emnul Jun 13, 2025
e9c9713
Simplify biome tooling
emnul Jun 13, 2025
0fe7dc8
Update turbo.json, Bump @types/node deps
emnul Jun 14, 2025
ad0599d
Fix missing double-quote
emnul Jun 14, 2025
da12b42
Move type checks to contracts test suite
emnul Jun 14, 2025
b790aea
Add paths, update ubuntu version
emnul Jun 14, 2025
4f75e11
Update action.yml
emnul Jun 14, 2025
fcd9dc2
Rename erc721 package and files, update tsconfigs
emnul Jun 14, 2025
769b9a4
Add C2C Migration Plan to Module Docs
emnul Jun 14, 2025
a4a9b45
Fmt Missing Features
emnul Jun 14, 2025
e447672
Git naming fix
emnul Jun 14, 2025
61a351e
Update method documentation with Requirements sections
emnul Jun 14, 2025
27eefc2
Split requirement
emnul Jun 14, 2025
2cd1ab4
Remove duplicate code
emnul Jun 14, 2025
c012cb0
Remove export from _update, reorg code
emnul Jun 14, 2025
cd09a91
Fix compiler error
emnul Jun 14, 2025
1587541
Add NonFungibleTesting file
emnul Jun 14, 2025
576f64a
fmt Utils
emnul Jun 14, 2025
11bc821
Add test
emnul Jun 15, 2025
259b90a
Rename TOKENID, create NON_EXISTENT_TOKEN, reword tests for consistency
emnul Jun 15, 2025
36406ed
fmt files
emnul Jun 15, 2025
7e53fde
fmt file
emnul Jun 15, 2025
c622503
Update NonFungibleToken tests
emnul Jun 15, 2025
c25918f
fmt file
emnul Jun 15, 2025
49d0103
Reduce duplicate code
emnul Jun 16, 2025
bc56a95
Update tokenURI behavior, add tests, update mocks, add emptyString()
emnul Jun 16, 2025
aa2ff34
Move test to correct test block, remove code that doesn't need testing
emnul Jun 16, 2025
fcb182b
fmt file
emnul Jun 16, 2025
e24419b
Add additional behavior checks for 'should revoke approval after tran…
emnul Jun 16, 2025
0cd917b
Remove redundant assertion
emnul Jun 17, 2025
02a4768
fmt NonFungibleToken.compact
emnul Jun 17, 2025
b7dc865
Improve test readability
emnul Jun 17, 2025
d0d11f3
Improve Test Readability
emnul Jun 17, 2025
84076ae
test(nonfungibletoken): Add transfer token without approvers or opera…
emnul Jun 18, 2025
2c3384a
test(nonfungibletoken): Fix broken test
emnul Jun 18, 2025
9d0d826
test(nonfungibletoken): Add additional expectation to test
emnul Jun 18, 2025
6a7e037
tests(nonfungibletoken): Add happy path tests for _checkAuthorized
emnul Jun 18, 2025
d4c98fc
tests(nonfungibletoken): Add test for _getApproved
emnul Jun 18, 2025
5e63189
tests(nonfungibletoken): Add assertion to _unsafeMint
emnul Jun 18, 2025
6c9faa2
tests(nonfungibletoken): Reduce boilerplate code, improve readability…
emnul Jun 18, 2025
3652651
tests(nonfungibletoken): Add tests to _unsafeTransferFrom
emnul Jun 18, 2025
3df252a
tests(nonfungibletoken): Refactor Uninitialized tests
emnul Jun 18, 2025
ebc3c4f
fmt file
emnul Jun 18, 2025
3092d21
tests(utils): Add stricter equality checks
emnul Jun 18, 2025
82db2a0
Update method docs with @circuitInfo
emnul Jun 18, 2025
7770d1b
Add legal language to security policy (#105)
emnul Jun 12, 2025
93ef757
Adds CI Tests, Lints, Compile, Build (#113)
emnul Jun 18, 2025
d6d7d95
Update Yarn.lock
emnul Jun 18, 2025
d74724f
Document storage vars
emnul Jun 18, 2025
9254a5c
Fmt method signature
emnul Jun 18, 2025
3aa2a16
Add extensibility section (#86)
andrew-fleming Jun 6, 2025
56e03c7
Adds CI Tests, Lints, Compile, Build (#113)
emnul Jun 18, 2025
3c49aae
Update yarn.lock
emnul Jun 18, 2025
abe3863
Move emptyString to Utils contract
emnul Jun 18, 2025
fafbd51
Update yarn.lock
emnul Jun 18, 2025
7fc45e1
Reorganize code
emnul Jun 18, 2025
a4fe4c0
Update contracts/nonFungibleToken/src/test/mocks/NonFungibleTokenTest…
emnul Jun 18, 2025
856de2f
Update contracts/nonFungibleToken/src/test/mocks/MockNonFungibleToken…
emnul Jun 18, 2025
20f57cf
Adds CI Tests, Lints, Compile, Build (#113)
emnul Jun 18, 2025
5e1f694
update yarn.lock
emnul Jun 18, 2025
4348a50
Update Compiler Install Script
emnul Jun 18, 2025
f9cc45b
update yarn.lock
emnul Jun 18, 2025
17ac85e
Update CI workflow
emnul Jun 18, 2025
9a7eab6
Fix `Hash mismatch` error in CI (#148)
andrew-fleming Jun 23, 2025
657d34b
Fix fmt issue (#143)
andrew-fleming Jun 23, 2025
72f5037
Update fungible token (#125)
andrew-fleming Jun 25, 2025
314d2e9
Update yarn.lock
emnul Jun 26, 2025
41dc60b
Fmt file
emnul Jun 26, 2025
e9b38a3
File extension required with nodenext
emnul Jun 26, 2025
f4d38bf
Remove deleted import, reorganize code, improve readability, remove _…
emnul Jun 26, 2025
f43c4f6
Delete files
emnul Jun 26, 2025
8e5f9db
Fix import, add docs to constructor, add condition init, remove _update
emnul Jun 26, 2025
f218a6a
Update constructor, remove _update,
emnul Jun 26, 2025
7fca850
Fmt docs
emnul Jun 26, 2025
f55949c
Add toHexPadded method
emnul Jun 26, 2025
54ca72f
Remove duplicate code
emnul Jun 26, 2025
373af66
fix rebase issues
emnul Jun 26, 2025
7aecaf7
fmt file
emnul Jun 26, 2025
fe55c87
Fix build issues
emnul Jun 26, 2025
fd7b0dd
add utils package
andrew-fleming Apr 4, 2025
0c437af
add utils contract
andrew-fleming Apr 4, 2025
1d8480c
fix structure
andrew-fleming Apr 4, 2025
13bf2d8
improve circuit name
andrew-fleming Apr 4, 2025
0bfdee6
add mock
andrew-fleming Apr 4, 2025
3a3e494
fix simulator
andrew-fleming Apr 4, 2025
34ab0fd
add witnesses dir
andrew-fleming Apr 4, 2025
68369b1
add testing pattern
andrew-fleming Apr 4, 2025
80ca657
improve comments
andrew-fleming Apr 4, 2025
62eeae9
tidy up simulator
andrew-fleming Apr 4, 2025
d11e381
erc20 unshielded (#1)
andrew-fleming Apr 8, 2025
76cf6bd
tidy up code (#23)
andrew-fleming Apr 11, 2025
5450cde
Add pausable (#22)
andrew-fleming Apr 26, 2025
2257d61
Bump midnight-js, transition to biome, basic improvements (#35)
andrew-fleming Apr 29, 2025
7195d01
Add security doc (#42)
andrew-fleming May 7, 2025
94bdfba
chore: add code owners (#53)
0xisk May 9, 2025
cafc086
Improve compact scripts (#41)
andrew-fleming May 14, 2025
8875d9e
Support compact 0.23.0, migrate to vitest (#68)
andrew-fleming May 19, 2025
eb4ebfd
Set private prop to true in package.json (#84)
andrew-fleming May 27, 2025
8b2d43d
Set up antora and overview page (#83)
andrew-fleming May 27, 2025
828fcf4
Improve readme (#80)
andrew-fleming May 27, 2025
0c99b1a
Add extensibility section (#86)
andrew-fleming Jun 6, 2025
7d6f3e9
Adds CI Tests, Lints, Compile, Build (#113)
emnul Jun 18, 2025
52a285d
Fix fmt issue (#143)
andrew-fleming Jun 23, 2025
c248397
Update fungible token (#125)
andrew-fleming Jun 25, 2025
01ffba6
Update yarn.lock
emnul Jun 26, 2025
4256f72
Merge
emnul Jun 26, 2025
15b9c63
Merge branch 'main' into erc721-unshielded
emnul Jun 26, 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/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@

# Global:

* @OpenZeppelin/contracts-midnight-maintainers
* @OpenZeppelin/contracts-midnight-maintainers
21 changes: 21 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,27 @@ Usage: compactc.bin <flag> ... <source-pathname> <target-directory-pathname>
> - [turbo](https://turborepo.com/docs/getting-started/installation)
> - [compact](https://docs.midnight.network/develop/tutorial/building/#midnight-compact-compiler)

Make sure you have [nvm](https://github.com/nvm-sh/nvm) and [yarn](https://yarnpkg.com/getting-started/install) installed on your machine.

Follow Midnight's [compact installation guide](https://docs.midnight.network/develop/tutorial/building/#midnight-compact-compiler) and confirm that `compactc` is in the `PATH` env variable.

```bash
$ compactc

Compactc version: 0.23.0
Usage: compactc.bin <flag> ... <source-pathname> <target-directory-pathname>
--help displays detailed usage information
```

## Set up the project

> ### Requirements
>
> - [node](https://nodejs.org/)
> - [yarn](https://yarnpkg.com/getting-started/install)
> - [turbo](https://turborepo.com/docs/getting-started/installation)
> - [compact](https://docs.midnight.network/develop/tutorial/building/#midnight-compact-compiler)

Clone the repository:

```bash
Expand Down
2 changes: 1 addition & 1 deletion SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ Security vulnerabilities should be disclosed to the project maintainers by email

## Legal

Blockchain is a nascent technology and carries a high level of risk and uncertainty. OpenZeppelin makes certain software available under open source licenses, which disclaim all warranties in relation to the project and which limits the liability of OpenZeppelin. Subject to any particular licensing terms, your use of the project is governed by the terms found at [www.openzeppelin.com/tos](https://www.openzeppelin.com/tos) (the "Terms"). As set out in the Terms, you are solely responsible for any use of the project and you assume all risks associated with any such use. This Security Policy in no way evidences or represents an ongoing duty by any contributor, including OpenZeppelin, to correct any issues or vulnerabilities or alert you to all or any of the risks of utilizing the project.
Blockchain is a nascent technology and carries a high level of risk and uncertainty. OpenZeppelin makes certain software available under open source licenses, which disclaim all warranties in relation to the project and which limits the liability of OpenZeppelin. Subject to any particular licensing terms, your use of the project is governed by the terms found at [www.openzeppelin.com/tos](https://www.openzeppelin.com/tos) (the "Terms"). As set out in the Terms, you are solely responsible for any use of the project and you assume all risks associated with any such use. This Security Policy in no way evidences or represents an ongoing duty by any contributor, including OpenZeppelin, to correct any issues or vulnerabilities or alert you to all or any of the risks of utilizing the project.
6 changes: 4 additions & 2 deletions biome.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@
"formatter": {
"enabled": true,
"indentStyle": "space",
"ignore": ["package.json"]
"ignore": [
"package.json"
]
},
"organizeImports": {
"enabled": true
Expand Down Expand Up @@ -87,4 +89,4 @@
"indentStyle": "space"
}
}
}
}
3 changes: 3 additions & 0 deletions compact/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@
"scripts": {
"build": "tsc -p .",
"types": "tsc -p tsconfig.json --noEmit",
"fmt-and-lint": "biome check . --changed",
"fmt-and-lint:fix": "biome check . --changed --fix",
"fmt-and-lint:ci": "biome ci --changed --no-errors-on-unmatched",
"clean": "git clean -fXd"
},
"devDependencies": {
Expand Down
48 changes: 25 additions & 23 deletions compact/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,25 +1,27 @@
{
"compilerOptions": {
"outDir": "dist",
"rootDir": "src",
"declaration": true,
"lib": ["es2023"],
"module": "nodenext",
"target": "es2022",
"strict": true,
"esModuleInterop": true,
"skipLibCheck": true,
"moduleResolution": "node16",
"sourceMap": true,
"rewriteRelativeImportExtensions": true,
"erasableSyntaxOnly": true,
"verbatimModuleSyntax": true
},
"include": [
"src/**/*"
"compilerOptions": {
"outDir": "dist",
"rootDir": "src",
"declaration": true,
"lib": [
"es2022"
],
"exclude": [
"node_modules",
"dist"
]
}
"module": "nodenext",
"target": "es2022",
"strict": true,
"esModuleInterop": true,
"skipLibCheck": true,
"moduleResolution": "nodenext",
"sourceMap": true,
"rewriteRelativeImportExtensions": true,
"erasableSyntaxOnly": true,
"verbatimModuleSyntax": true
},
"include": [
"src/**/*"
],
"exclude": [
"node_modules",
"dist"
]
}
19 changes: 14 additions & 5 deletions compact/turbo.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,21 @@
{
"$schema": "https://turbo.build/schema.json",
"extends": ["//"],
"extends": [
"//"
],
"tasks": {
"build": {
"outputs": ["dist/**"],
"inputs": ["src/**/*.ts", "tsconfig.json"],
"env": ["COMPACT_HOME"],
"outputs": [
"dist/**"
],
"inputs": [
"src/**/*.ts",
"tsconfig.json"
],
"env": [
"COMPACT_HOME"
],
"cache": true
}
}
}
}
3 changes: 3 additions & 0 deletions contracts/fungibleToken/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@
"build": "compact-builder && tsc",
"test": "vitest run",
"types": "tsc -p tsconfig.json --noEmit",
"fmt-and-lint": "biome check . --changed",
"fmt-and-lint:fix": "biome check . --changed --fix",
"fmt-and-lint:ci": "biome ci --changed --no-errors-on-unmatched",
"clean": "git clean -fXd"
},
"dependencies": {
Expand Down
1 change: 0 additions & 1 deletion contracts/fungibleToken/src/FungibleToken.compact
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ module FungibleToken {
export sealed ledger _name: Opaque<"string">;
export sealed ledger _symbol: Opaque<"string">;
export sealed ledger _decimals: Uint<8>;

/**
* @description Initializes the contract by setting the name, symbol, and decimals.
* @dev This MUST be called in the implementing contract's constructor. Failure to do so
Expand Down
4 changes: 2 additions & 2 deletions contracts/fungibleToken/src/test/FungibleToken.test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { CoinPublicKey } from '@midnight-ntwrk/compact-runtime';
import { afterEach, beforeEach, describe, expect, it } from 'vitest';
import { FungibleTokenSimulator } from './simulators/FungibleTokenSimulator';
import * as utils from './utils/address';
import { FungibleTokenSimulator } from './simulators/FungibleTokenSimulator.js';
import * as utils from './utils/address.js';

// Metadata
const EMPTY_STRING = '';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,16 @@ import {
import {
type FungibleTokenPrivateState,
FungibleTokenWitnesses,
} from '../../witnesses/FungibleTokenWitnesses';
import type { IContractSimulator } from '../types/test';
} from '../../witnesses/FungibleTokenWitnesses.js';
import type { IContractSimulator } from '../types/test.js';

/**
* @description A simulator implementation of a FungibleToken contract for testing purposes.
* @template P - The private state type, fixed to FungibleTokenPrivateState.
* @template L - The ledger type, fixed to Contract.Ledger.
*/
export class FungibleTokenSimulator
implements IContractSimulator<FungibleTokenPrivateState, Ledger>
{
implements IContractSimulator<FungibleTokenPrivateState, Ledger> {
/** @description The underlying contract instance managing contract logic. */
readonly contract: MockFungibleToken<FungibleTokenPrivateState>;

Expand Down
2 changes: 1 addition & 1 deletion contracts/fungibleToken/src/test/utils/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
QueryContext,
emptyZswapLocalState,
} from '@midnight-ntwrk/compact-runtime';
import type { IContractSimulator } from '../types/test';
import type { IContractSimulator } from '../types/test.js';

/**
* Constructs a `CircuitContext` from the given state and sender information.
Expand Down
14 changes: 9 additions & 5 deletions contracts/fungibleToken/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
{
"include": ["src/**/*.ts"],
"include": [
"src/**/*.ts"
],
"compilerOptions": {
"rootDir": "src",
"outDir": "dist",
"declaration": true,
"lib": ["ESNext"],
"lib": [
"ES2022"
],
"target": "ES2022",
"module": "ESNext",
"moduleResolution": "node",
"module": "nodenext",
"moduleResolution": "nodenext",
"allowJs": true,
"forceConsistentCasingInFileNames": true,
"noImplicitAny": true,
Expand All @@ -18,4 +22,4 @@
"esModuleInterop": true,
"skipLibCheck": true
}
}
}
9 changes: 9 additions & 0 deletions contracts/fungibleToken/turbo.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"$schema": "https://turbo.build/schema.json",
"extends": ["//"],
"tasks": {
"build": {
"dependsOn": ["^build", "compact"]
}
}
}
36 changes: 36 additions & 0 deletions contracts/nonFungibleToken/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"name": "@openzeppelin-midnight/non-fungible-token",
"private": true,
"type": "module",
"main": "dist/index.js",
"module": "dist/index.js",
"types": "./dist/index.d.ts",
"exports": {
".": {
"types": "./dist/index.d.ts",
"require": "./dist/index.js",
"import": "./dist/index.js",
"default": "./dist/index.js"
}
},
"scripts": {
"compact": "compact-compiler",
"build": "compact-builder && tsc",
"test": "vitest run",
"types": "tsc -p tsconfig.json --noEmit",
"fmt-and-lint": "biome check . --changed",
"fmt-and-lint:fix": "biome check . --changed --fix",
"fmt-and-lint:ci": "biome ci --changed --no-errors-on-unmatched",
"clean": "git clean -fXd"
},
"dependencies": {
"@openzeppelin-midnight/compact": "workspace:^"
},
"devDependencies": {
"@biomejs/biome": "1.9.4",
"@types/node": "22.14.0",
"ts-node": "^10.9.2",
"typescript": "^5.2.2",
"vitest": "^3.1.3"
}
}
Loading