From 6fd2bed5cf709a6b468c33e143a65a99b978848f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mart=C3=ADn=20Triay?= Date: Tue, 30 Jan 2024 02:19:57 +0000 Subject: [PATCH 1/5] fix cairo version --- docs/modules/ROOT/pages/utils/_class_hashes.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/modules/ROOT/pages/utils/_class_hashes.adoc b/docs/modules/ROOT/pages/utils/_class_hashes.adoc index 837394e40..09596a1fa 100644 --- a/docs/modules/ROOT/pages/utils/_class_hashes.adoc +++ b/docs/modules/ROOT/pages/utils/_class_hashes.adoc @@ -1,5 +1,5 @@ // Version -:class-hash-cairo-version: https://crates.io/crates/cairo-lang-compiler/2.3.1[cairo 2.3.1] +:class-hash-cairo-version: https://crates.io/crates/cairo-lang-compiler/2.4.4[cairo 2.4.4] // Class Hashes :account-class-hash: 0x061dac032f228abef9c6626f995015233097ae253a7f72d68552db02f2971b8f From 098663a269bf22f44e2df704b5e8a29bf8f26501 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mart=C3=ADn=20Triay?= Date: Tue, 30 Jan 2024 03:22:46 +0000 Subject: [PATCH 2/5] update class hashes --- docs/modules/ROOT/pages/utils/_class_hashes.adoc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/modules/ROOT/pages/utils/_class_hashes.adoc b/docs/modules/ROOT/pages/utils/_class_hashes.adoc index 09596a1fa..102d5276b 100644 --- a/docs/modules/ROOT/pages/utils/_class_hashes.adoc +++ b/docs/modules/ROOT/pages/utils/_class_hashes.adoc @@ -2,9 +2,9 @@ :class-hash-cairo-version: https://crates.io/crates/cairo-lang-compiler/2.4.4[cairo 2.4.4] // Class Hashes -:account-class-hash: 0x061dac032f228abef9c6626f995015233097ae253a7f72d68552db02f2971b8f -:erc20-class-hash: 0x046ded64ae2dead6448e247234bab192a9c483644395b66f2155f2614e5804b0 -:erc721-class-hash: 0x05e5a302b02eca41819fe263420eb8dc96bfb9770a90f55847c4c1337b551635 +:account-class-hash: 0x07a711d70338e05d7008fdf553207adc791297461fe3464b450fdc5f26f836ae +:erc20-class-hash: 0x03af5816946625d3d2c94ea451225715784762050eba736f0b0ad9186685bced +:erc721-class-hash: 0x045c96d1b24c3dc060680e4bfd4bdc32161aefe8f8939cd4be3954c5d8688d75 // Presets page :presets-page: xref:presets.adoc[Compiled class hash] From db0025da9b910b34b27e3125102d654e67c750ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mart=C3=ADn=20Triay?= Date: Tue, 30 Jan 2024 03:23:58 +0000 Subject: [PATCH 3/5] fix scarb.toml version number --- Scarb.lock | 2 +- Scarb.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Scarb.lock b/Scarb.lock index e023bf036..b2c02f8ff 100644 --- a/Scarb.lock +++ b/Scarb.lock @@ -3,4 +3,4 @@ version = 1 [[package]] name = "openzeppelin" -version = "0.8.0" +version = "0.8.1" diff --git a/Scarb.toml b/Scarb.toml index 2b9288378..0f5ba460f 100644 --- a/Scarb.toml +++ b/Scarb.toml @@ -1,6 +1,6 @@ [package] name = "openzeppelin" -version = "0.8.0" +version = "0.8.1" edition = "2023_01" cairo-version = "2.4.4" authors = ["OpenZeppelin Community "] From be4cde5668a36e5833a8d9d813f407541bf28c67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mart=C3=ADn=20Triay?= Date: Tue, 30 Jan 2024 03:47:17 +0000 Subject: [PATCH 4/5] add presets explainer --- docs/modules/ROOT/pages/presets.adoc | 30 ++++++++++++++++------------ 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/docs/modules/ROOT/pages/presets.adoc b/docs/modules/ROOT/pages/presets.adoc index 02a3f442d..dae4835c5 100644 --- a/docs/modules/ROOT/pages/presets.adoc +++ b/docs/modules/ROOT/pages/presets.adoc @@ -1,15 +1,26 @@ -:scarb: https://docs.swmansion.com/scarb[scarb] +:account: xref:/api/account.adoc#Account[Account.cairo] +:erc20: xref:/api/erc20.adoc#ERC20[ERC20.cairo] +:erc721: xref:/api/erc721.adoc#ERC721[ERC721.cairo] +:sierra-class-hashes: https://docs.starknet.io/documentation/architecture_and_concepts/Smart_Contracts/class-hash[Sierra class hashes] +:starkli: https://book.starkli.rs/introduction[starkli] +:wizard: https://wizard.openzeppelin.com[Wizard for Cairo] + = Presets include::utils/_class_hashes.adoc[] -List of "ready-to-deploy" presets available and their corresponding class hashes. +Presets are ready-to-deploy contracts provided by the library. -:account: xref:/api/account.adoc#Account[Account.cairo] -:erc20: xref:/api/erc20.adoc#ERC20[ERC20.cairo] -:erc721: xref:/api/erc721.adoc#ERC721[ERC721.cairo] -:cairo-and-sierra: https://docs.starknet.io/documentation/architecture_and_concepts/Smart_Contracts/cairo-and-sierra/[Cairo and Sierra] +Presets are intended to be very simple and as generic as possible. +That's why we don't support custom or complex contracts such as `ERC20Pausable` or `ERC721Mintable`. + +TIP: For contract customization and combination of modules you can use {wizard}, our code-generation tool. + + +## Available presets + +List of available presets and their corresponding {sierra-class-hashes}. NOTE: Class hashes were computed using {class-hash-cairo-version}. @@ -26,11 +37,4 @@ NOTE: Class hashes were computed using {class-hash-cairo-version}. | `{erc721-class-hash}` |=== -:starkli: https://book.starkli.rs/introduction[starkli] - -To understand the compiled class hash term, check {cairo-and-sierra}. - TIP: {starkli} class-hash command can be used to compute the class hash from a compiled artifact. - -TIP: To obtain the artifact -using {scarb}, set the `casm = true` option under `\[[target.starknet-contract]]` in the `Scarb.toml` file. \ No newline at end of file From 5bda8919e7f51e17818348b16c4d45757245abfd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mart=C3=ADn=20Triay?= Date: Tue, 30 Jan 2024 03:49:34 +0000 Subject: [PATCH 5/5] update wording --- docs/modules/ROOT/pages/presets.adoc | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/docs/modules/ROOT/pages/presets.adoc b/docs/modules/ROOT/pages/presets.adoc index dae4835c5..e7c62214d 100644 --- a/docs/modules/ROOT/pages/presets.adoc +++ b/docs/modules/ROOT/pages/presets.adoc @@ -10,10 +10,8 @@ include::utils/_class_hashes.adoc[] -Presets are ready-to-deploy contracts provided by the library. - -Presets are intended to be very simple and as generic as possible. -That's why we don't support custom or complex contracts such as `ERC20Pausable` or `ERC721Mintable`. +Presets are ready-to-deploy contracts provided by the library. Since presets are intended to be very simple +and as generic as possible, there's no support for custom or complex contracts such as `ERC20Pausable` or `ERC721Mintable`. TIP: For contract customization and combination of modules you can use {wizard}, our code-generation tool.