Skip to content

Commit

Permalink
merge from main
Browse files Browse the repository at this point in the history
  • Loading branch information
ggonzalez94 committed Aug 15, 2024
2 parents ab9436a + 329a218 commit 5f9d995
Show file tree
Hide file tree
Showing 92 changed files with 663 additions and 626 deletions.
14 changes: 14 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
version: 2
# Allow Dependabot to open PRs for security issues and general version updates.
# It checks github actions and npm packages (for docs).
# Unfortunately, this is not yet possible for Scarb packages (https://github.com/software-mansion/scarb/issues/1083)
updates:
- package-ecosystem: github-actions
directory: '/'
schedule:
interval: daily
# npm packages for docs
- package-ecosystem: 'npm'
directory: '/docs'
schedule:
interval: 'daily'
2 changes: 1 addition & 1 deletion .github/workflows/typos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ jobs:
uses: actions/checkout@v4

- name: Check for typos
uses: crate-ci/typos@bcafd462cb07ef7ba57e34abf458fe20767e808b
uses: crate-ci/typos@935271f0204ebdf61717cf6caac31d8d115f1c14
10 changes: 9 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,20 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## Unreleased

Check failure on line 10 in CHANGELOG.md

View workflow job for this annotation

GitHub Actions / Lint and test

Headings should be surrounded by blank lines

CHANGELOG.md:10 MD022/blanks-around-headings Headings should be surrounded by blank lines [Expected: 1; Actual: 0; Below] [Context: "## Unreleased"] https://github.com/DavidAnson/markdownlint/blob/v0.34.0/doc/md022.md

### Changed (Breaking)

Check failure on line 11 in CHANGELOG.md

View workflow job for this annotation

GitHub Actions / Lint and test

Headings should be surrounded by blank lines

CHANGELOG.md:11 MD022/blanks-around-headings Headings should be surrounded by blank lines [Expected: 1; Actual: 0; Above] [Context: "### Changed (Breaking)"] https://github.com/DavidAnson/markdownlint/blob/v0.34.0/doc/md022.md

- Changed ABI suffix to Trait in dual case account and eth account modules (#1096).
- `DualCaseAccountABI` renamed to `DualCaseAccountTrait`
- `DualCaseEthAccountABI` renamed to `DualCaseEthAccountTrait`

## 0.15.1 (2024-08-13)

### Changed

- Remove token dependency from account package (#1100)
- Fix docsite links (#1094)


Check failure on line 24 in CHANGELOG.md

View workflow job for this annotation

GitHub Actions / Lint and test

Multiple consecutive blank lines

CHANGELOG.md:24 MD012/no-multiple-blanks Multiple consecutive blank lines [Expected: 1; Actual: 2] https://github.com/DavidAnson/markdownlint/blob/v0.34.0/doc/md012.md

Check failure on line 25 in CHANGELOG.md

View workflow job for this annotation

GitHub Actions / Lint and test

Multiple consecutive blank lines

CHANGELOG.md:25 MD012/no-multiple-blanks Multiple consecutive blank lines [Expected: 1; Actual: 3] https://github.com/DavidAnson/markdownlint/blob/v0.34.0/doc/md012.md
## 0.15.0 (2024-08-08)

Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,14 @@ Edit `scarb.toml` and add:

```toml
[dependencies]
openzeppelin = { git = "https://github.com/OpenZeppelin/cairo-contracts.git", tag = "v0.15.0" }
openzeppelin = { git = "https://github.com/OpenZeppelin/cairo-contracts.git", tag = "v0.15.1" }
```

The previous example would import the entire library. we can also add each package as a separated dependency to improve the time for building by not including modules that won't be used:

```toml
[dependencies]
openzeppelin_token = { git = "https://github.com/OpenZeppelin/cairo-contracts.git", tag = "v0.15.0" }
openzeppelin_token = { git = "https://github.com/OpenZeppelin/cairo-contracts.git", tag = "v0.15.1" }
```

Build the project to download it:
Expand Down Expand Up @@ -113,7 +113,7 @@ mod MyToken {

### Unsupported

[`DualCase` dispatchers](https://docs.openzeppelin.com/contracts-cairo/0.15.0/interfaces#dualcase_dispatchers) rely on Sierra's ability to catch a revert to resume execution. Currently, Starknet live chains (testnets and mainnet) don't implement that behavior. Starknet's testing framework does support it.
[`DualCase` dispatchers](https://docs.openzeppelin.com/contracts-cairo/0.15.1/interfaces#dualcase_dispatchers) rely on Sierra's ability to catch a revert to resume execution. Currently, Starknet live chains (testnets and mainnet) don't implement that behavior. Starknet's testing framework does support it.

## Learn

Expand Down
25 changes: 12 additions & 13 deletions Scarb.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ version = 1

[[package]]
name = "openzeppelin"
version = "0.15.0"
version = "0.15.1"
dependencies = [
"openzeppelin_access",
"openzeppelin_account",
Expand All @@ -21,7 +21,7 @@ dependencies = [

[[package]]
name = "openzeppelin_access"
version = "0.15.0"
version = "0.15.1"
dependencies = [
"openzeppelin_introspection",
"openzeppelin_test_common",
Expand All @@ -32,19 +32,18 @@ dependencies = [

[[package]]
name = "openzeppelin_account"
version = "0.15.0"
version = "0.15.1"
dependencies = [
"openzeppelin_introspection",
"openzeppelin_test_common",
"openzeppelin_testing",
"openzeppelin_token",
"openzeppelin_utils",
"snforge_std",
]

[[package]]
name = "openzeppelin_governance"
version = "0.15.0"
version = "0.15.1"
dependencies = [
"openzeppelin_access",
"openzeppelin_introspection",
Expand All @@ -54,14 +53,14 @@ dependencies = [

[[package]]
name = "openzeppelin_introspection"
version = "0.15.0"
version = "0.15.1"
dependencies = [
"snforge_std",
]

[[package]]
name = "openzeppelin_presets"
version = "0.15.0"
version = "0.15.1"
dependencies = [
"openzeppelin_access",
"openzeppelin_account",
Expand All @@ -75,15 +74,15 @@ dependencies = [

[[package]]
name = "openzeppelin_security"
version = "0.15.0"
version = "0.15.1"
dependencies = [
"openzeppelin_testing",
"snforge_std",
]

[[package]]
name = "openzeppelin_test_common"
version = "0.15.0"
version = "0.15.1"
dependencies = [
"openzeppelin_access",
"openzeppelin_account",
Expand All @@ -96,14 +95,14 @@ dependencies = [

[[package]]
name = "openzeppelin_testing"
version = "0.15.0"
version = "0.15.1"
dependencies = [
"snforge_std",
]

[[package]]
name = "openzeppelin_token"
version = "0.15.0"
version = "0.15.1"
dependencies = [
"openzeppelin_account",
"openzeppelin_governance",
Expand All @@ -115,7 +114,7 @@ dependencies = [

[[package]]
name = "openzeppelin_upgrades"
version = "0.15.0"
version = "0.15.1"
dependencies = [
"openzeppelin_test_common",
"openzeppelin_testing",
Expand All @@ -124,7 +123,7 @@ dependencies = [

[[package]]
name = "openzeppelin_utils"
version = "0.15.0"
version = "0.15.1"
dependencies = [
"openzeppelin_testing",
"snforge_std",
Expand Down
2 changes: 1 addition & 1 deletion Scarb.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ name = "openzeppelin"
version.workspace = true

[workspace.package]
version = "0.15.0"
version = "0.15.1"
edition = "2023_11"
cairo-version = "2.7.0"
scarb-version = "2.7.0"
Expand Down
2 changes: 1 addition & 1 deletion docs/antora.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: contracts-cairo
title: Contracts for Cairo
version: 0.15.0
version: 0.15.1
nav:
- modules/ROOT/nav.adoc
asciidoc:
Expand Down
6 changes: 3 additions & 3 deletions docs/modules/ROOT/pages/api/access.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ assigned each to multiple accounts.

[.contract]
[[OwnableComponent]]
=== `++OwnableComponent++` link:https://github.com/OpenZeppelin/cairo-contracts/blob/release-v0.15.0/packages/access/src/ownable/ownable.cairo[{github-icon},role=heading-link]
=== `++OwnableComponent++` link:https://github.com/OpenZeppelin/cairo-contracts/blob/release-v0.15.1/packages/access/src/ownable/ownable.cairo[{github-icon},role=heading-link]

```cairo
use openzeppelin::access::ownable::OwnableComponent;
Expand Down Expand Up @@ -267,7 +267,7 @@ Emitted when the ownership is transferred.

[.contract]
[[IAccessControl]]
=== `++IAccessControl++` link:https://github.com/OpenZeppelin/cairo-contracts/blob/release-v0.15.0/packages/access/src/accesscontrol/interface.cairo[{github-icon},role=heading-link]
=== `++IAccessControl++` link:https://github.com/OpenZeppelin/cairo-contracts/blob/release-v0.15.1/packages/access/src/accesscontrol/interface.cairo[{github-icon},role=heading-link]

:grant_role: xref:#IAccessControl-grant_role[grant_role]
:revoke_role: xref:#IAccessControl-revoke_role[revoke_role]
Expand Down Expand Up @@ -400,7 +400,7 @@ Emitted when `account` is revoked `role`.

[.contract]
[[AccessControlComponent]]
=== `++AccessControlComponent++` link:https://github.com/OpenZeppelin/cairo-contracts/blob/release-v0.15.0/packages/access/src/accesscontrol/accesscontrol.cairo[{github-icon},role=heading-link]
=== `++AccessControlComponent++` link:https://github.com/OpenZeppelin/cairo-contracts/blob/release-v0.15.1/packages/access/src/accesscontrol/accesscontrol.cairo[{github-icon},role=heading-link]

:assert_only_role: xref:#AccessControlComponent-assert_only_role
:grant_role: xref:#AccessControlComponent-grant_role[grant_role]
Expand Down
10 changes: 5 additions & 5 deletions docs/modules/ROOT/pages/api/account.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ include::../utils/_common.adoc[]

[.contract]
[[ISRC6]]
=== `++ISRC6++` link:https://github.com/OpenZeppelin/cairo-contracts/blob/release-v0.15.0/packages/account/src/interface.cairo[{github-icon},role=heading-link]
=== `++ISRC6++` link:https://github.com/OpenZeppelin/cairo-contracts/blob/release-v0.15.1/packages/account/src/interface.cairo[{github-icon},role=heading-link]

```cairo
use openzeppelin::account::interface::ISRC6;
Expand Down Expand Up @@ -65,7 +65,7 @@ Returns the short string `'VALID'` if valid, otherwise it reverts.

[.contract]
[[AccountComponent]]
=== `++AccountComponent++` link:https://github.com/OpenZeppelin/cairo-contracts/blob/release-v0.15.0/packages/account/src/account.cairo[{github-icon},role=heading-link]
=== `++AccountComponent++` link:https://github.com/OpenZeppelin/cairo-contracts/blob/release-v0.15.1/packages/account/src/account.cairo[{github-icon},role=heading-link]

:OwnerAdded: xref:AccountComponent-OwnerAdded[OwnerAdded]
:OwnerRemoved: xref:AccountComponent-OwnerRemoved[OwnerRemoved]
Expand Down Expand Up @@ -315,7 +315,7 @@ Emitted when a `public_key` is removed.

[.contract]
[[EthAccountComponent]]
=== `++EthAccountComponent++` link:https://github.com/OpenZeppelin/cairo-contracts/blob/release-v0.15.0/packages/account/src/eth_account.cairo[{github-icon},role=heading-link]
=== `++EthAccountComponent++` link:https://github.com/OpenZeppelin/cairo-contracts/blob/release-v0.15.1/packages/account/src/eth_account.cairo[{github-icon},role=heading-link]

:OwnerAdded: xref:EthAccountComponent-OwnerAdded[OwnerAdded]
:OwnerRemoved: xref:EthAccountComponent-OwnerRemoved[OwnerRemoved]
Expand Down Expand Up @@ -570,7 +570,7 @@ Emitted when a `public_key` is removed.

[.contract]
[[AccountUpgradeable]]
=== `++AccountUpgradeable++` link:https://github.com/OpenZeppelin/cairo-contracts/blob/release-v0.15.0/packages/presets/src/account.cairo[{github-icon},role=heading-link]
=== `++AccountUpgradeable++` link:https://github.com/OpenZeppelin/cairo-contracts/blob/release-v0.15.1/packages/presets/src/account.cairo[{github-icon},role=heading-link]

```cairo
use openzeppelin::presets::AccountUpgradeable;
Expand Down Expand Up @@ -631,7 +631,7 @@ Requirements:

[.contract]
[[EthAccountUpgradeable]]
=== `++EthAccountUpgradeable++` link:https://github.com/OpenZeppelin/cairo-contracts/blob/release-v0.15.0/packages/presets/src/eth_account.cairo[{github-icon},role=heading-link]
=== `++EthAccountUpgradeable++` link:https://github.com/OpenZeppelin/cairo-contracts/blob/release-v0.15.1/packages/presets/src/eth_account.cairo[{github-icon},role=heading-link]

```cairo
use openzeppelin::presets::EthAccountUpgradeable;
Expand Down
12 changes: 6 additions & 6 deletions docs/modules/ROOT/pages/api/erc1155.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ TIP: For an overview of ERC1155, read our xref:erc1155.adoc[ERC1155 guide].

[.contract]
[[IERC1155]]
=== `++IERC1155++` link:https://github.com/OpenZeppelin/cairo-contracts/blob/release-v0.15.0/packages/token/src/erc1155/interface.cairo[{github-icon},role=heading-link]
=== `++IERC1155++` link:https://github.com/OpenZeppelin/cairo-contracts/blob/release-v0.15.1/packages/token/src/erc1155/interface.cairo[{github-icon},role=heading-link]

[.hljs-theme-dark]
```cairo
Expand Down Expand Up @@ -126,7 +126,7 @@ Emitted when the token URI is updated to `value` for the `id` token.

[.contract]
[[IERC1155MetadataURI]]
=== `++IERC1155MetadataURI++` link:https://github.com/OpenZeppelin/cairo-contracts/blob/release-v0.15.0/packages/token/src/erc1155/interface.cairo[{github-icon},role=heading-link]
=== `++IERC1155MetadataURI++` link:https://github.com/OpenZeppelin/cairo-contracts/blob/release-v0.15.1/packages/token/src/erc1155/interface.cairo[{github-icon},role=heading-link]

[.hljs-theme-dark]
```cairo
Expand Down Expand Up @@ -156,7 +156,7 @@ Returns the Uniform Resource Identifier (URI) for the `token_id` token.

[.contract]
[[ERC1155Component]]
=== `++ERC1155Component++` link:https://github.com/OpenZeppelin/cairo-contracts/blob/release-v0.15.0/packages/token/src/erc1155/erc1155.cairo[{github-icon},role=heading-link]
=== `++ERC1155Component++` link:https://github.com/OpenZeppelin/cairo-contracts/blob/release-v0.15.1/packages/token/src/erc1155/erc1155.cairo[{github-icon},role=heading-link]

[.hljs-theme-dark]
```cairo
Expand Down Expand Up @@ -543,7 +543,7 @@ See <<IERC1155-URI,IERC1155::URI>>.

[.contract]
[[IERC1155Receiver]]
=== `++IERC1155Receiver++` link:https://github.com/OpenZeppelin/cairo-contracts/blob/release-v0.15.0/packages/token/src/erc1155/interface.cairo[{github-icon},role=heading-link]
=== `++IERC1155Receiver++` link:https://github.com/OpenZeppelin/cairo-contracts/blob/release-v0.15.1/packages/token/src/erc1155/interface.cairo[{github-icon},role=heading-link]

[.hljs-theme-dark]
```cairo
Expand Down Expand Up @@ -583,7 +583,7 @@ via <<IERC1155-safe_batch_transfer_from,IERC1155::safe_batch_transfer_from>> by

[.contract]
[[ERC1155ReceiverComponent]]
=== `++ERC1155ReceiverComponent++` link:https://github.com/OpenZeppelin/cairo-contracts/blob/release-v0.15.0/packages/token/src/erc1155/erc1155_receiver.cairo[{github-icon},role=heading-link]
=== `++ERC1155ReceiverComponent++` link:https://github.com/OpenZeppelin/cairo-contracts/blob/release-v0.15.1/packages/token/src/erc1155/erc1155_receiver.cairo[{github-icon},role=heading-link]

[.hljs-theme-dark]
```cairo
Expand Down Expand Up @@ -660,7 +660,7 @@ Registers the `IERC1155Receiver` interface ID as supported through introspection

[.contract]
[[ERC1155Upgradeable]]
=== `++ERC1155Upgradeable++` link:https://github.com/OpenZeppelin/cairo-contracts/blob/release-v0.15.0/packages/presets/src/erc1155.cairo[{github-icon},role=heading-link]
=== `++ERC1155Upgradeable++` link:https://github.com/OpenZeppelin/cairo-contracts/blob/release-v0.15.1/packages/presets/src/erc1155.cairo[{github-icon},role=heading-link]

```cairo
use openzeppelin::presets::ERC1155;
Expand Down
10 changes: 5 additions & 5 deletions docs/modules/ROOT/pages/api/erc20.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ TIP: For an overview of ERC20, read our {erc20-guide}.

[.contract]
[[IERC20]]
=== `++IERC20++` link:https://github.com/OpenZeppelin/cairo-contracts/blob/release-v0.15.0/packages/token/src/erc20/interface.cairo[{github-icon},role=heading-link]
=== `++IERC20++` link:https://github.com/OpenZeppelin/cairo-contracts/blob/release-v0.15.1/packages/token/src/erc20/interface.cairo[{github-icon},role=heading-link]

[.hljs-theme-dark]
```cairo
Expand Down Expand Up @@ -114,7 +114,7 @@ Emitted when the allowance of a `spender` for an `owner` is set.

[.contract]
[[IERC20Metadata]]
=== `++IERC20Metadata++` link:https://github.com/OpenZeppelin/cairo-contracts/blob/release-v0.15.0/packages/token/src/erc20/interface.cairo#L19[{github-icon},role=heading-link]
=== `++IERC20Metadata++` link:https://github.com/OpenZeppelin/cairo-contracts/blob/release-v0.15.1/packages/token/src/erc20/interface.cairo#L19[{github-icon},role=heading-link]

[.hljs-theme-dark]
```cairo
Expand Down Expand Up @@ -162,7 +162,7 @@ NOTE: This information is only used for _display_ purposes: it in no way affects

[.contract]
[[ERC20Component]]
=== `++ERC20Component++` link:https://github.com/OpenZeppelin/cairo-contracts/blob/release-v0.15.0/packages/token/src/erc20/erc20.cairo[{github-icon},role=heading-link]
=== `++ERC20Component++` link:https://github.com/OpenZeppelin/cairo-contracts/blob/release-v0.15.1/packages/token/src/erc20/erc20.cairo[{github-icon},role=heading-link]

[.hljs-theme-dark]
```cairo
Expand Down Expand Up @@ -460,7 +460,7 @@ See <<IERC20-Approval,IERC20::Approval>>.

[.contract]
[[ERC20VotesComponent]]
=== `++ERC20VotesComponent++` link:https://github.com/OpenZeppelin/cairo-contracts/blob/release-v0.15.0/packages/token/src/erc20/extensions/erc20_votes.cairo[{github-icon},role=heading-link]
=== `++ERC20VotesComponent++` link:https://github.com/OpenZeppelin/cairo-contracts/blob/release-v0.15.1/packages/token/src/erc20/extensions/erc20_votes.cairo[{github-icon},role=heading-link]

```cairo
use openzeppelin::token::extensions::ERC20VotesComponent;
Expand Down Expand Up @@ -655,7 +655,7 @@ Emitted when `delegate` votes are updated from `previous_votes` to `new_votes`.

[.contract]
[[ERC20Upgradeable]]
=== `++ERC20Upgradeable++` link:https://github.com/OpenZeppelin/cairo-contracts/blob/release-v0.15.0/packages/presets/src/erc20.cairo[{github-icon},role=heading-link]
=== `++ERC20Upgradeable++` link:https://github.com/OpenZeppelin/cairo-contracts/blob/release-v0.15.1/packages/presets/src/erc20.cairo[{github-icon},role=heading-link]

```cairo
use openzeppelin::presets::ERC20Upgradeable;
Expand Down
Loading

0 comments on commit 5f9d995

Please sign in to comment.