Skip to content

fix(N-10): unnecessary option destruction#162

Merged
ericnordelo merged 2 commits intorelease-v1.0.0from
fix/audit-N-10
Feb 23, 2026
Merged

fix(N-10): unnecessary option destruction#162
ericnordelo merged 2 commits intorelease-v1.0.0from
fix/audit-N-10

Conversation

@immrsd
Copy link
Copy Markdown
Collaborator

@immrsd immrsd commented Feb 17, 2026

Fixes #150

@immrsd immrsd requested review from 0xNeshi and qalisander February 17, 2026 15:42
@immrsd immrsd self-assigned this Feb 17, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Feb 17, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/audit-N-10

Comment @coderabbitai help to get the list of available commands and usage tips.

@bidzyyys bidzyyys removed the request for review from qalisander February 17, 2026 17:25
@bidzyyys bidzyyys linked an issue Feb 17, 2026 that may be closed by this pull request
Comment thread contracts/access/sources/ownership_transfer/delayed.move
@codecov
Copy link
Copy Markdown

codecov Bot commented Feb 19, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.97%. Comparing base (30ad84e) to head (1448428).
⚠️ Report is 6 commits behind head on release-v1.0.0.

Additional details and impacted files
@@                Coverage Diff                 @@
##           release-v1.0.0     #162      +/-   ##
==================================================
- Coverage           94.98%   94.97%   -0.01%     
==================================================
  Files                  13       13              
  Lines                1236     1235       -1     
  Branches              366      367       +1     
==================================================
- Hits                 1174     1173       -1     
  Misses                 45       45              
  Partials               17       17              
Flag Coverage Δ
contracts/access 51.60% <ø> (-0.18%) ⬇️
math/core 94.31% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ericnordelo ericnordelo merged commit 2d368fd into release-v1.0.0 Feb 23, 2026
12 checks passed
@ericnordelo ericnordelo deleted the fix/audit-N-10 branch February 23, 2026 14:01
ericnordelo added a commit that referenced this pull request Mar 5, 2026
* ref: naming and receiver syntax (#123)

* Add test flag to test files (#122)

* Add test flah to test files

* Add #[test_only] tag in test modules

---------

Co-authored-by: Daniel Bigos <daniel.bigos@icloud.com>

* fix(H-01): reminder issue in div_rem (#151)

* fix: reminder issue in div_rem

* fix: docstring

* ref: apply suggestions from code review

Co-authored-by: immrsd <103599616+immrsd@users.noreply.github.com>

* fix: fmt

* ref: apply suggestions from code review

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: immrsd <103599616+immrsd@users.noreply.github.com>

* Remove explicit u256 type

* feat: update CHANGELOG

---------

Co-authored-by: Daniel Bigos <daniel.bigos@openzeppelin.com>
Co-authored-by: immrsd <103599616+immrsd@users.noreply.github.com>
Co-authored-by: Daniel Bigos <daniel.bigos@icloud.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: immrsd <immrsd.eth@gmail.com>

* fix(N-01): Missing Event Emission on State Change (#159)

* emit objectwrapped on wrap

* emit objectunwrapped on unwrap

* requester to owner

* emit OwnershipTransferRejected on reject

* call uid_to_inner on id directly

* tests: fix

* test: add ObjectUnwrapped assertions

* test: include wrap flow in unwrap test

* test: corrent event in reject_destroys_request

* ref: remove Published.toml

* feat: emit PendingTransferCancelled on cancel_schedule

* fix: new event doc

* feat: emit ObjectWrapped on delayed_transfer::wrap

* ref: formatting

* doc: fix comment above OwnershipTransferRejected

* test: assert exact PendingTransferCancelled event data in cancel_allows_reschedule

* ref: move ObjectWrapped to events section

* test: add ObjectWrapped data assertion to wrap_emits_events

* test: extract inlined code into local variable expected_event

* ref: reorder objectwrapped events

* feat: remove current_owner from OwnershipTransferRejected

* test: ref wrap_emits_events

* feat: remove ctx from two_step_transfer::reject

* chore: update changelog

* fix: rename ObjectWrapped->WrapExecuted & ObjectUnwrapped->UnwrapExecuted

* fix: use &mut TxContext in two_step_transfer::unwrap (#169)

* build: set explicit default prettier move values

* build: gitignore .vscode

* build: add comment about why vscode is ignored

* test: rename test_new_object_wrapped->test_new_wrap_executed

* test: rename test_new_object_unwrapped->test_new_unwrap_executed

* build: add missing newline to .prettierrc

* Revert "build: add missing newline to .prettierrc"

This reverts commit 2f84812.

* Revert "build: add comment about why vscode is ignored"

This reverts commit 37948ab.

* Revert "build: gitignore .vscode"

This reverts commit c5e1c30.

* Revert "build: set explicit default prettier move values"

This reverts commit 1674a18.

* fix: use &mut TxContext in unwrap

* build: revert .prettierrc

* chore: add missing changelog entry

* build(ci): trigger CI jobs on release branches (#173)

* build(ci): trigger CI jobs on release branches

* fix: lint after N-01 fix

* build(ci): update Sui version in CI jobs

* fix: apply linter suggestions

* ref: Update math/core/tests/macros_tests.move

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* ci: triggers no longer apply to v* branches (#176)

* fix(L-01): inaccurate data emitted in events (#174)

* fix(L-02): Emit Dedicated UnwrapExecuted Event on delayed > unwrap (#168)

* feat: emit UnwrapExecuted on delayed > unwrap

* test: rename test_new_object_wrapped->test_new_wrap_executed

* Revert "test: rename test_new_object_wrapped->test_new_wrap_executed"

This reverts commit 7b3129a.

* chore: changelog

* feat: add object_id to UnwrapExecuted

* ref: revert change to prettierrc

* fix: linter

* chore: Move changelog entry to Breaking Changes

* chore: Update CHANGELOG title name for breaking change

Co-authored-by: Eric Nordelo <eric.nordelo39@gmail.com>

* ref: invoke uid_to_inner as a method on struct

---------

Co-authored-by: Daniel Bigos <daniel.bigos@openzeppelin.com>
Co-authored-by: Daniel Bigos <daniel.bigos@icloud.com>
Co-authored-by: Eric Nordelo <eric.nordelo39@gmail.com>

* fix(N-08): unhandled overflow in safe_downcast_balance (#172)

* fix(N-08): unhandled overflow in safe_downcast_balance

* ref: apply suggestions from code review

Co-authored-by: Nenad <nenad.misic@openzeppelin.com>

---------

Co-authored-by: Nenad <nenad.misic@openzeppelin.com>

* Fix N-09 audit issue (#161)

Co-authored-by: Daniel Bigos <daniel.bigos@openzeppelin.com>

* Remove unnecessary destroy_none call (#162)

Co-authored-by: Daniel Bigos <daniel.bigos@openzeppelin.com>

* fix(N-06): Incorrect Documentation (#187)

* fix: doc comments

* Update math/core/sources/u512.move

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* fix(N-03): code convention improvements (#163)

* Fix function params order in delayed module

* Fix error codes in two_step module

* Support function params order changes in tests

---------

Co-authored-by: Daniel Bigos <daniel.bigos@icloud.com>

* docs(N-04): add missing docs + fix existing docs (#175)

* docs: add missing docs + fix existing

* docs: add missing doc update to u256::mul_div

* build: revert prettier change

* docs: align u16 module docs

* docs: align all inv_mod docs

* docs: remove term 'helper' for math functions

* docs: align formatting in u16.move

---------

Co-authored-by: Eric Nordelo <eric.nordelo39@gmail.com>
Co-authored-by: Daniel Bigos <daniel.bigos@openzeppelin.com>

* fix(N-05): Code and Documentation Inconsistencies (#188)

* fix: doc comments consistency

* feat: apply review suggestions

* fix: coderabbit suggestions

* feat: remove double empty lines

* feat: update doc comment

* ref: Two Step Transfer (and Delayed) improvements (#183)

* feat: add main logic and doc entries

* feat: update wording around caps

* feat: use string literals

* fix: typos

* feat: apply review updates

* feat: rename struct member

* feat: use doc comment format for the library

* feat: add ability constraints to pending request

* feat: add security notes for shared object missue

* feat: format files

* feat: apply review updates

---------

Co-authored-by: Daniel Bigos <daniel.bigos@icloud.com>

* feat: add relase info

* Add v1.0.0 release info (#210)

* feat: add relase info

* feat: apply review uppdates

* feat: update version

* feat: update SECURITY

* docs: unify docs for math library (#212)

* feat: update locks

* feat: apply coderabbit suggestions

---------

Co-authored-by: Bridgerz <bridgerzoske@gmail.com>
Co-authored-by: Cove Marquis-Bortoli <44323490+CoveMB@users.noreply.github.com>
Co-authored-by: Daniel Bigos <daniel.bigos@icloud.com>
Co-authored-by: Daniel Bigos <daniel.bigos@openzeppelin.com>
Co-authored-by: immrsd <103599616+immrsd@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: immrsd <immrsd.eth@gmail.com>
Co-authored-by: Nenad <nenad.misic@openzeppelin.com>
bidzyyys added a commit that referenced this pull request Mar 10, 2026
* ref: naming and receiver syntax (#123)

* Add test flag to test files (#122)

* Add test flah to test files

* Add #[test_only] tag in test modules

---------

Co-authored-by: Daniel Bigos <daniel.bigos@icloud.com>

* fix(H-01): reminder issue in div_rem (#151)

* fix: reminder issue in div_rem

* fix: docstring

* ref: apply suggestions from code review

Co-authored-by: immrsd <103599616+immrsd@users.noreply.github.com>

* fix: fmt

* ref: apply suggestions from code review

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: immrsd <103599616+immrsd@users.noreply.github.com>

* Remove explicit u256 type

* feat: update CHANGELOG

---------

Co-authored-by: Daniel Bigos <daniel.bigos@openzeppelin.com>
Co-authored-by: immrsd <103599616+immrsd@users.noreply.github.com>
Co-authored-by: Daniel Bigos <daniel.bigos@icloud.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: immrsd <immrsd.eth@gmail.com>

* fix(N-01): Missing Event Emission on State Change (#159)

* emit objectwrapped on wrap

* emit objectunwrapped on unwrap

* requester to owner

* emit OwnershipTransferRejected on reject

* call uid_to_inner on id directly

* tests: fix

* test: add ObjectUnwrapped assertions

* test: include wrap flow in unwrap test

* test: corrent event in reject_destroys_request

* ref: remove Published.toml

* feat: emit PendingTransferCancelled on cancel_schedule

* fix: new event doc

* feat: emit ObjectWrapped on delayed_transfer::wrap

* ref: formatting

* doc: fix comment above OwnershipTransferRejected

* test: assert exact PendingTransferCancelled event data in cancel_allows_reschedule

* ref: move ObjectWrapped to events section

* test: add ObjectWrapped data assertion to wrap_emits_events

* test: extract inlined code into local variable expected_event

* ref: reorder objectwrapped events

* feat: remove current_owner from OwnershipTransferRejected

* test: ref wrap_emits_events

* feat: remove ctx from two_step_transfer::reject

* chore: update changelog

* fix: rename ObjectWrapped->WrapExecuted & ObjectUnwrapped->UnwrapExecuted

* fix: use &mut TxContext in two_step_transfer::unwrap (#169)

* build: set explicit default prettier move values

* build: gitignore .vscode

* build: add comment about why vscode is ignored

* test: rename test_new_object_wrapped->test_new_wrap_executed

* test: rename test_new_object_unwrapped->test_new_unwrap_executed

* build: add missing newline to .prettierrc

* Revert "build: add missing newline to .prettierrc"

This reverts commit 2f84812.

* Revert "build: add comment about why vscode is ignored"

This reverts commit 37948ab.

* Revert "build: gitignore .vscode"

This reverts commit c5e1c30.

* Revert "build: set explicit default prettier move values"

This reverts commit 1674a18.

* fix: use &mut TxContext in unwrap

* build: revert .prettierrc

* chore: add missing changelog entry

* build(ci): trigger CI jobs on release branches (#173)

* build(ci): trigger CI jobs on release branches

* fix: lint after N-01 fix

* build(ci): update Sui version in CI jobs

* fix: apply linter suggestions

* ref: Update math/core/tests/macros_tests.move

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* ci: triggers no longer apply to v* branches (#176)

* fix(L-01): inaccurate data emitted in events (#174)

* fix(L-02): Emit Dedicated UnwrapExecuted Event on delayed > unwrap (#168)

* feat: emit UnwrapExecuted on delayed > unwrap

* test: rename test_new_object_wrapped->test_new_wrap_executed

* Revert "test: rename test_new_object_wrapped->test_new_wrap_executed"

This reverts commit 7b3129a.

* chore: changelog

* feat: add object_id to UnwrapExecuted

* ref: revert change to prettierrc

* fix: linter

* chore: Move changelog entry to Breaking Changes

* chore: Update CHANGELOG title name for breaking change

Co-authored-by: Eric Nordelo <eric.nordelo39@gmail.com>

* ref: invoke uid_to_inner as a method on struct

---------

Co-authored-by: Daniel Bigos <daniel.bigos@openzeppelin.com>
Co-authored-by: Daniel Bigos <daniel.bigos@icloud.com>
Co-authored-by: Eric Nordelo <eric.nordelo39@gmail.com>

* fix(N-08): unhandled overflow in safe_downcast_balance (#172)

* fix(N-08): unhandled overflow in safe_downcast_balance

* ref: apply suggestions from code review

Co-authored-by: Nenad <nenad.misic@openzeppelin.com>

---------

Co-authored-by: Nenad <nenad.misic@openzeppelin.com>

* Fix N-09 audit issue (#161)

Co-authored-by: Daniel Bigos <daniel.bigos@openzeppelin.com>

* Remove unnecessary destroy_none call (#162)

Co-authored-by: Daniel Bigos <daniel.bigos@openzeppelin.com>

* fix(N-06): Incorrect Documentation (#187)

* fix: doc comments

* Update math/core/sources/u512.move

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* fix(N-03): code convention improvements (#163)

* Fix function params order in delayed module

* Fix error codes in two_step module

* Support function params order changes in tests

---------

Co-authored-by: Daniel Bigos <daniel.bigos@icloud.com>

* docs(N-04): add missing docs + fix existing docs (#175)

* docs: add missing docs + fix existing

* docs: add missing doc update to u256::mul_div

* build: revert prettier change

* docs: align u16 module docs

* docs: align all inv_mod docs

* docs: remove term 'helper' for math functions

* docs: align formatting in u16.move

---------

Co-authored-by: Eric Nordelo <eric.nordelo39@gmail.com>
Co-authored-by: Daniel Bigos <daniel.bigos@openzeppelin.com>

* fix(N-05): Code and Documentation Inconsistencies (#188)

* fix: doc comments consistency

* feat: apply review suggestions

* fix: coderabbit suggestions

* feat: remove double empty lines

* feat: update doc comment

* ref: Two Step Transfer (and Delayed) improvements (#183)

* feat: add main logic and doc entries

* feat: update wording around caps

* feat: use string literals

* fix: typos

* feat: apply review updates

* feat: rename struct member

* feat: use doc comment format for the library

* feat: add ability constraints to pending request

* feat: add security notes for shared object missue

* feat: format files

* feat: apply review updates

---------

Co-authored-by: Daniel Bigos <daniel.bigos@icloud.com>

* Add v1.0.0 release info (#210)

* feat: add relase info

* feat: apply review uppdates

* feat: update version

* feat: update SECURITY

* Add target to delayed wrapping (#238)

* feat: add relase info

* feat: add target to wrapping

* feat: update comment

* feat: add another test

* feat: add new reports

* feat: add published info

* feat: update CHANGELOG

---------

Co-authored-by: Bridgerz <bridgerzoske@gmail.com>
Co-authored-by: Cove Marquis-Bortoli <44323490+CoveMB@users.noreply.github.com>
Co-authored-by: Daniel Bigos <daniel.bigos@icloud.com>
Co-authored-by: Daniel Bigos <daniel.bigos@openzeppelin.com>
Co-authored-by: immrsd <103599616+immrsd@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: immrsd <immrsd.eth@gmail.com>
Co-authored-by: Nenad <nenad.misic@openzeppelin.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

N-10: Unnecessary Option Destruction

4 participants