Skip to content

Releases: OpenZeppelin/contracts-sui

v1.1.0-rc.0

10 Mar 12:48
8787180

Choose a tag to compare

v1.1.0-rc.0 Pre-release
Pre-release

Summary

openzeppelin_fp_math

Added

  • UD30x9 fixed-point type with: (#129)
    • Core: wrap, unwrap
    • Arithmetic: add, sub, mul, div, pow, unchecked_add, unchecked_sub, mod
    • Comparison: eq, neq, gt, gte, lt, lte, is_zero
    • Bitwise: and, and2, or, xor, not, lshift, rshift
  • SD29x9 fixed-point type with: (#129)
    • Constants: zero, min, max
    • Core: wrap, unwrap
    • Arithmetic: add, sub, mul, div, pow, unchecked_add, unchecked_sub, mod
    • Comparison: eq, neq, gt, gte, lt, lte, is_zero
    • Bitwise: and, and2, or, xor, not, lshift, rshift
  • casting_u128 helpers for UD30x9 and SD29x9. (#129)

openzeppelin_math

Added

  • is_power_of_ten helpers for u8, u16, u32, u64, u128, and u256. (#125)

Full Changes List

New Contributors

Full Changelog: v1.0.0...v1.1.0-rc.0

v1.0.0

09 Mar 13:24
9b5b807

Choose a tag to compare

Summary

openzeppelin_access

Added

  • Add missing event emissions on state changes (#159)
  • two_step_transfer::request_borrow_val and request_return_val for borrowing the wrapper and its inner object during a pending transfer.
  • two_step_transfer::RequestBorrow hot potato to guarantee wrapper return after request_borrow_val.

Changed (Breaking)

  • Redesigned two_step_transfer from a requester-initiated to an owner-initiated flow using shared PendingOwnershipTransfer and TTO.
    • request, transfer, and reject replaced by initiate_transfer, accept_transfer, and cancel_transfer.
  • Renamed two_step_transfer events: OwnershipRequestedTransferInitiated, OwnershipTransferredTransferAccepted, OwnershipTransferRejectedTransferCancelled.
  • All events in two_step_transfer and delayed_transfer now carry phantom T for type-specific indexing.
  • two_step_transfer::unwrap now accepts an additional &mut TxContext param (#159)
  • delayed_transfer::wrap now takes an explicit recipient and transfers the wrapper to that address instead of returning DelayedTransferWrapper<T>.
  • delayed_transfer::schedule_transfer and schedule_unwrap now derive current_owner from ctx.sender() instead of accepting it as a parameter (#174)
  • Emit dedicated UnwrapExecuted event on delayed_transfer::unwrap instead of OwnershipTransferred (#168)

openzeppelin_math

Fixed

  • Preserve the remainder for u512::div_rem_u256 even when the quotient overflows, preventing incorrect results in mul_mod for large operands (#151)

Full Changes List

  • fix(H-01): reminder issue in div_rem by @ericnordelo in #151
  • fix(N-01): Missing Event Emission on State Change by @0xNeshi in #159
  • fix: use &mut TxContext in two_step_transfer::unwrap by @0xNeshi in #169
  • build(ci): trigger CI jobs on release branches by @bidzyyys in #173
  • ci: triggers no longer apply to v* branches by @0xNeshi in #176
  • fix(L-01): inaccurate data emitted in events by @bidzyyys in #174
  • fix(L-02): Emit Dedicated UnwrapExecuted Event on delayed > unwrap by @0xNeshi in #168
  • fix(N-08): unhandled overflow in safe_downcast_balance by @bidzyyys in #172
  • fix(N-09): multiple calls to macro params by @immrsd in #161
  • fix(N-10): unnecessary option destruction by @immrsd in #162
  • fix(N-06): Incorrect Documentation by @ericnordelo in #187
  • fix(N-03): code convention improvements by @immrsd in #163
  • docs(N-04): add missing docs + fix existing docs by @0xNeshi in #175
  • fix(N-05): Code and Documentation Inconsistencies by @ericnordelo in #188
  • ref: Two Step Transfer (and Delayed) improvements by @ericnordelo in #183
  • Add v1.0.0 release info by @ericnordelo in #210

Full Changelog: v1.0.0-rc.1...v1.0.0

v1.0.0-rc.1

19 Dec 12:42
30de819

Choose a tag to compare

v1.0.0-rc.1 Pre-release
Pre-release

Summary

openzeppelin_math

Changed

  • Rename coin_utils module to decimal_scaling (#123)

All Packages

Fixed

  • Add #[test_only] attribute to test modules (#122)

Full Changes List

New Contributors

Full Changelog: v1.0.0-rc.0...v1.0.0-rc.1

v1.0.0-rc.0

19 Dec 12:33
8b4af8c

Choose a tag to compare

v1.0.0-rc.0 Pre-release
Pre-release

Summary

openzeppelin_math

Added

  • rounding::RoundingMode enum plus helpers for expressing Down/Up/Nearest behavior reused across all arithmetic APIs.
  • public u8, u16, u32, u64, u128, and u256 modules exposing averaged computations, checked shifting, configurable mul_div and mul_shr, logarithms, square roots, and modular math helpers tailored to each bit width.
  • u512 wide integer type that supports splitting, multiplication, and division helpers to safely handle 512-bit intermediates needed by the narrow modules.
  • coin_utils helpers that upcast or downcast balances between decimal domains (up to 24 decimals) with overflow checks and explicit truncation semantics.

openzeppelin_access

Added

  • two_step_transfer module that wraps a key + store capability behind a request/approve flow.
  • delayed_transfer module that enforces configurable, clock-based delays before transferring or unwrapping a capability.

Full Changes List

New Contributors

Full Changelog: https://github.com/OpenZeppelin/contracts-sui/commits/v1.0.0-rc.0