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