Skip to content

Commit

Permalink
Backport doc fixes to release-v0.8.1 (#884)
Browse files Browse the repository at this point in the history
* Address versioning and presets issues (#879)

* fix cairo version

* update class hashes

* fix scarb.toml version number

* add presets explainer

* update wording

* fix wording

* fix word
  • Loading branch information
martriay authored Jan 31, 2024
1 parent 5c7a022 commit eb2d321
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 17 deletions.
32 changes: 17 additions & 15 deletions docs/modules/ROOT/pages/presets.adoc
Original file line number Diff line number Diff line change
@@ -1,20 +1,29 @@
: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. 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`.

: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]
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}.

|===
| Name | Compiled Class Hash
| Name | Sierra Class Hash

| `{account}`
| `{account-class-hash}`
Expand All @@ -26,11 +35,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.
TIP: {starkli} class-hash command can be used to compute the class hash from a Sierra artifact.
4 changes: 2 additions & 2 deletions docs/modules/ROOT/pages/utils/_class_hashes.adoc
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
// 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.1[cairo 2.4.1]

// Class Hashes
:account-class-hash: 0x061dac032f228abef9c6626f995015233097ae253a7f72d68552db02f2971b8f
:erc20-class-hash: 0x046ded64ae2dead6448e247234bab192a9c483644395b66f2155f2614e5804b0
:erc721-class-hash: 0x05e5a302b02eca41819fe263420eb8dc96bfb9770a90f55847c4c1337b551635

// Presets page
:presets-page: xref:presets.adoc[Compiled class hash]
:presets-page: xref:presets.adoc[Sierra class hash]

0 comments on commit eb2d321

Please sign in to comment.