Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backport doc fixes to release-v0.8.1 #884

Merged
merged 3 commits into from
Jan 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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}.
martriay marked this conversation as resolved.
Show resolved Hide resolved

|===
| 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]
martriay marked this conversation as resolved.
Show resolved Hide resolved

// 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]