Skip to content

Releases: OpenZeppelin/cairo-contracts

v0.20.0

06 Dec 22:09
Compare
Choose a tag to compare

Summary

Added

  • SRC9 (Outside Execution) integration to account presets (#1201)
  • SNIP12HashSpanImpl to openzeppelin_utils::cryptography::snip12 (#1180)
  • GovernorComponent with the following extensions: (#1180)
    • GovernorCoreExecutionComponent
    • GovernorCountingSimpleComponent
    • GovernorSettingsComponent
    • GovernorTimelockExecutionComponent
    • GovernorVotesQuorumFractionComponent
    • GovernorVotesComponent
  • is_tx_version_valid utility function to openzeppelin_account::utils (#1224)

Changed

  • Remove mut from data param in compute_hash_on_elements (#1206)
  • Remove mut from calls param in __execute__ function of Account and EthAccount components (#1224)
  • Remove mut from calls param in __validate__ function of Account and EthAccount components (#1224)

Changed (Breaking)

  • Bump snforge_std to v0.34.0 (#1239)
  • Bump scarb to v2.9.1 (#1239)
  • The initializer in OwnableComponent now checks that owner is not the zero address (#1221)
  • Add verifying_contract member to the Delegation struct used in Votes delegate_by_sig (#1214)
    use crate::votes::VotesComponent::VotingUnitsTrait;
  • VotingUnitsTrait moved from openzeppelin_governance::votes::votes to openzeppelin_governance::votes::VotesComponent (#1214)
  • VestingComponent release function won't emit an event or attempt to transfer when the amount is zero (#1209)
  • Bump snforge_std to v0.33.0 (#1203)

Fixed

  • Scarb manifest dependencies (#1249):
    • Move openzeppelin_utils from dev dep to dep in governance manifest
    • Remove openzeppelin_utils as dep in access package
    • Change openzeppelin_account to crate in src9.cairo

Full Changes List

New Contributors

Full Changelog: v0.19.0...v0.20.0

v0.20.0-rc.0

20 Nov 15:38
3fdef27
Compare
Choose a tag to compare
v0.20.0-rc.0 Pre-release
Pre-release

Summary

Added

  • SRC9 (Outside Execution) integration to account presets (#1201)
  • SNIP12HashSpanImpl to openzeppelin_utils::cryptography::snip12 (#1180)
  • GovernorComponent with the following extensions: (#1180)
    • GovernorCoreExecutionComponent
    • GovernorCountingSimpleComponent
    • GovernorSettingsComponent
    • GovernorTimelockExecutionComponent
    • GovernorVotesQuorumFractionComponent
    • GovernorVotesComponent
  • is_tx_version_valid utility function to openzeppelin_account::utils (#1224)

Changed

  • Remove mut from data param in compute_hash_on_elements (#1206)
  • Remove mut from calls param in __execute__ function of Account and EthAccount components (#1224)
  • Remove mut from calls param in __validate__ function of Account and EthAccount components (#1224)

Changed (Breaking)

  • The initializer in OwnableComponent now checks that owner is not the zero address (#1221)
  • Add verifying_contract member to the Delegation struct used in Votes delegate_by_sig (#1214)
    use crate::votes::VotesComponent::VotingUnitsTrait;
  • VotingUnitsTrait moved from openzeppelin_governance::votes::votes to openzeppelin_governance::votes::VotesComponent (#1214)
  • VestingComponent release function won't emit an event or attempt to transfer when the amount is zero (#1209)
  • Bump snforge_std to v0.33.0 (#1203)

Full Changes List

New Contributors

Full Changelog: v0.19.0...v0.20.0-rc.0

v0.19.0

08 Nov 16:55
Compare
Choose a tag to compare

Summary

Added

  • Multisig component (#1193)
  • is_valid_p256_signature utility function to openzeppelin_account::utils::signature (#1189)
  • Secp256r1KeyPair type and helpers to openzeppelin_testing::signing (#1189)
  • all_tokens_of_owner function to ERC721EnumerableComponent fetching all owner's tokens in a single call (#1196)
  • Embeddable impls for ERC2981 component (#1173)
    • ERC2981Info with read functions for discovering the component's state
    • ERC2981AdminOwnable providing admin functions for a token that implements Ownable component
    • ERC2981AdminAccessControl providing admin functions for a token that implements AccessControl component

Changed (Breaking)

  • Refactor openzeppelin_account::utils::secp256k1 module to openzeppelin_account::utils::secp256_point (#1189)
    • Secp256k1PointStorePacking replaced by a generic Secp256PointStorePacking
    • Secp256k1PointPartialEq replaced by a generic Secp256PointPartialEq
    • DebugSecp256k1Point replaced by a generic DebugSecp256Point
  • Apply underscore pattern to the internal functions of ERC2981Component to prevent collisions
    with new external functions (#1173)
  • Move Hash and PartialEq impls of Call struct from openzeppelin_governance::timelock::utils to openzeppelin_governance::utils (#1193)

Full Changes List

Full Changelog: v0.18.0...v0.19.0

v0.18.0

18 Oct 06:06
Compare
Choose a tag to compare

Summary

Added

  • VotesComponent with implementation for ERC721 and ERC20 tokens (#1114)
  • IUpgradeAndCall interface (#1148)
  • upgrade_and_call function in UpgradeableComponent's InternalImpl (#1148)
  • ERC20Permit impl for ERC20Component facilitating token approvals via off-chain signatures (#1140)
  • ISNIP12Metadata interface for discovering name and version of a SNIP-12 impl (#1140)
  • SNIP12MetadataExternal impl of ISNIP12Metadata interface for ERC20Component (#1140)

Changed

  • Bump scarb to v2.8.4 (#1146)

Changed (Breaking)

  • Remove ERC20Votes component in favor of VotesComponent (#1114)
    • Trace is now declared as a storage_node and now uses Vec instead of StorageArray.
    • delegate_by_sig signature param in the IVotes interface updated from Array<felt252> to Span<felt252>.
  • Remove StorageArray from openzeppelin_utils (#1114)
  • Bump snforge to 0.31.0
  • Remove openzeppelin_utils::selectors (#1163)
  • Remove DualCase dispatchers (#1163)
    • Remove try_selector_with_fallback from openzeppelin_utils
    • Remove unwrap_and_cast module from openzeppelin_utils
    • Remove openzeppelin_access::accesscontrol::dual_accesscontrol
    • Remove openzeppelin_access::ownable::dual_ownable
    • Remove openzeppelin_account::dual_account
    • Remove openzeppelin_account::dual_eth_account
    • Remove openzeppelin_token::erc20::dual20
    • Remove openzeppelin_token::erc721::dual721
    • Remove openzeppelin_token::erc721::dual721_receiver
    • Remove openzeppelin_token::erc1155::dual1155
    • Remove openzeppelin_token::erc1155::dual1155_receiver
  • SRC9Component now uses ISRC6Dispatcher instead of DualCaseAccount (#1163)
  • ERC20VotesComponent now uses ISRC6Dispatcher instead of DualCaseAccount (#1163)
  • ERC721Component now uses IERC721ReceiverDispatcher instead of DualCaseERC721Receiver (#1163)
  • ERC1155Component now uses IERC1155ReceiverDispatcher instead of DualCaseERC1155Receiver (#1163)

Full Changes List

Full Changelog: v0.17.0...v0.18.0

v0.17.0

23 Sep 19:16
bf5d02c
Compare
Choose a tag to compare

Summary

Added

  • into_base_16_string_no_padding function to the test helpers (#1137)
  • SRC9 (OutsideExecution) component (#1150)
  • Vesting component and VestingWallet preset (#1116)

Changed (Breaking)

  • Bump scarb to v2.8.2 (#1137)
  • Bump snforge to 0.30.0 (#1137)
  • declare_class, declare_and_deploy, and declare_and_deploy_at will skip declaration if the contract is already declared (#1137)
  • Bump edition to 2024_07 (#1138)
  • execute_calls function from account utils (#1150)
    • calls param type changed from Array<Call> to Span<Call>

Deprecated

  • DualCase dispatchers

Full Changes List

Full Changelog: v0.16.0...v0.17.0

v0.16.0

30 Aug 19:48
ba00ce7
Compare
Choose a tag to compare

Summary

Added

  • ERC721Enumerable component (#996)
  • ERC2981 (NFT Royalty Standard) component (#1091)
  • merkle_tree package with utilities to verify proofs and multi proofs (#1101)

Changed

  • Bump snforge to v0.27.0 (#1107)
  • Bump scarb to v2.8.0 (#1120)

Changed (Breaking)

  • Changed ABI suffix to Trait in dual case account and eth account modules (#1096)
    • DualCaseAccountABI renamed to DualCaseAccountTrait
    • DualCaseEthAccountABI renamed to DualCaseEthAccountTrait
  • Removed _accept_ownership from OwnableComponent::InternalImpl

Fixed

  • OwnableTwoStep allowing a pending owner to accept ownership after the original owner has renounced ownership (#1119)

Full Changes List

v0.15.1

14 Aug 16:47
Compare
Choose a tag to compare

Summary

Changed

  • Remove unused imports
  • Update docsite links
  • Remove token dependency from account package

Full Changes List

New Contributors

Full Changelog: v0.15.0...v0.15.1

v0.15.0

08 Aug 21:18
Compare
Choose a tag to compare

Summary

Added

  • TimelockController component (#996)
  • HashCall implementation (#996)
  • Separate package for each submodule (#1065)
    • openzeppelin_access
    • openzeppelin_account
    • openzeppelin_governance
    • openzeppelin_introspection
    • openzeppelin_presets
    • openzeppelin_security
    • openzeppelin_token
    • openzeppelin_upgrades
    • openzeppelin_utils
  • Separate packages intended as [dev-dependencies] (#1084)
    • openzeppelin_testing
    • openzeppelin_test_common

Changed

  • Bump scarb to v2.7.0 (#1065)
  • Trace, Checkpoint, and StorageArray structs made public (#1021).

Changed (Breaking)

  • Test utilities moved out of the utils module (#1084).
  • Test utilities refactored to match the snforge test runner (#1084).
  • Removed num_checkpoints and checkpoints from ERC20VotesABI (#1021).

Full Changes List

New Contributors

Full Changelog: v0.14.0...v0.15.0

v0.15.0-rc.0

10 Jul 10:10
6869190
Compare
Choose a tag to compare
v0.15.0-rc.0 Pre-release
Pre-release

Summary

Changed

  • Trace, Checkpoint, and StorageArray structs made public.

Changed (Breaking)

  • Removed num_checkpoints and checkpoints from ERC20VotesABI.

Full Changes List

Full Changelog: v0.14.0...v0.15.0-rc.0

v0.14.0

15 Jun 00:11
Compare
Choose a tag to compare

Summary

Changed (Breaking)

  • Migrate to the 2023_11 edition (#995):

    • Component implementations annotated with #[embeddable_as()] (e.g: AccessControlComponent::AccessControl) are not public anymore. Note that the embeddable versions are still public (e.g: AccessControlComponent::AccessControlImpl).
    • Implementations that can be compiler-derived from traits are not public anymore (e.g: DualCaseAccessControlImpl is not public while DualCaseAccessControlTrait is).
    • Secp256k1PointPartialEq and DebugSecp256k1Point are not public anymore.
    • account::utils::execute_single_call is not public anymore.
    • Presets are not public anymore, since they should be copied into projects, and not directly imported.
    • Trace and Checkpoint structs are not public anymore, since they are intended to be used in ERC20Votes, and not as generic utilities.
    • StorageArray is not public anymore, since this implementation is specific to ERC20Votes, and is not intended as a generic utility, but as a temporary solution until Starknet native implementation arrives.
  • Apply underscore pattern to modules (#993)

    • AccessControlComponent
      • _set_role_admin function renamed to set_role_admin
    • PausableComponent
      • _pause function renamed to pause
      • _unpause function renamed to unpause
    • UpgradeableComponent
      • _upgrade function renamed to upgrade
    • ERC20Component:
      • _mint function renamed to mint
      • _burn function renamed to burn
      • _update function renamed to update
    • ERC721Component:
      • _safe_transfer function renamed to safe_transfer
      • _safe_mint function renamed to safe_mint
      • _mint function renamed to mint
      • _transfer function renamed to transfer
      • _burn function renamed to burn
      • _update function renamed to update
    • ERC1155Component:
      • set_base_uri function renamed to _set_base_uri
  • Bump Scarb to v2.6.5 (#1014)

Full Changes List

Full Changelog: v0.13.0...v0.14.0