Skip to content

Commit e87ddd3

Browse files
committed
fix: snip12 guide
1 parent 532fa66 commit e87ddd3

10 files changed

Lines changed: 25 additions & 25 deletions

File tree

content/contracts-cairo/1.0.0/accounts.mdx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -80,12 +80,12 @@ interoperability with the ecosystem.
8080
The Starknet protocol uses a few entrypoints for abstracting the accounts. We already mentioned the first two
8181
as part of the ISRC6 interface, and both are required for enabling accounts to be used for executing transactions. The rest are optional:
8282

83-
1. `\\__validate__` verifies the validity of the transaction to be executed. This is usually used to validate signatures,
83+
1. `_validate__` verifies the validity of the transaction to be executed. This is usually used to validate signatures,
8484
but the entrypoint implementation can be customized to feature any validation mechanism [with some limitations](https://docs.starknet.io/architecture-and-concepts/accounts/account-functions/#limitations_of_validation).
85-
2. `\\__execute__` executes the transaction if the validation is successful.
86-
3. `\\__validate_declare__` optional entrypoint similar to `\\__validate__` but for transactions
85+
2. `_execute__` executes the transaction if the validation is successful.
86+
3. `_validate_declare__` optional entrypoint similar to `_validate__` but for transactions
8787
meant to declare other contracts.
88-
4. `\\__validate_deploy__` optional entrypoint similar to `\\__validate__` but meant for [counterfactual deployments](/guides/deployment).
88+
4. `_validate_deploy__` optional entrypoint similar to `_validate__` but meant for [counterfactual deployments](/guides/deployment).
8989

9090
<Callout>
9191
Although these entrypoints are available to the protocol for its regular transaction flow, they can also be called like any other method.
@@ -275,7 +275,7 @@ wraps and exposes the `deploy_syscall` to provide arbitrary deployments through
275275
But if you don’t have an account to invoke it, you will probably want to use the latter.
276276

277277
To do counterfactual deployments, you need to implement another protocol-level entrypoint named
278-
`\\__validate_deploy__`. Check the [counterfactual deployments](/guides/deployment) guide to learn how.
278+
`_validate_deploy__`. Check the [counterfactual deployments](/guides/deployment) guide to learn how.
279279

280280
## Sending transactions
281281

content/contracts-cairo/1.0.0/guides/deployment.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Note that the `class_hash` must be previously declared for the deployment to suc
1818
2. Send funds to the `contract_address`. Usually you will estimate the fee of the transaction first. Existing
1919
tools usually do this for you.
2020
3. Send a `DeployAccount` type transaction to the network.
21-
4. The protocol will then validate the transaction with the `\\__validate_deploy__` entrypoint of the contract to be deployed.
21+
4. The protocol will then validate the transaction with the `_validate_deploy__` entrypoint of the contract to be deployed.
2222
5. If the validation succeeds, the protocol will charge the fee and then register the contract as deployed.
2323

2424
<Callout>
@@ -27,7 +27,7 @@ Although this method is very popular to deploy accounts, this works for any kind
2727

2828
## Deployment validation
2929

30-
To be counterfactually deployed, the deploying contract must implement the `\\__validate_deploy__` entrypoint,
30+
To be counterfactually deployed, the deploying contract must implement the `_validate_deploy__` entrypoint,
3131
called by the protocol when a `DeployAccount` transaction is sent to the network.
3232

3333
```cairo

content/contracts-cairo/2.0.0/accounts.mdx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -80,12 +80,12 @@ interoperability with the ecosystem.
8080
The Starknet protocol uses a few entrypoints for abstracting the accounts. We already mentioned the first two
8181
as part of the ISRC6 interface, and both are required for enabling accounts to be used for executing transactions. The rest are optional:
8282

83-
1. `\\__validate__` verifies the validity of the transaction to be executed. This is usually used to validate signatures,
83+
1. `_validate__` verifies the validity of the transaction to be executed. This is usually used to validate signatures,
8484
but the entrypoint implementation can be customized to feature any validation mechanism [with some limitations](https://docs.starknet.io/architecture-and-concepts/accounts/account-functions/#limitations_of_validation).
85-
2. `\\__execute__` executes the transaction if the validation is successful.
86-
3. `\\__validate_declare__` optional entrypoint similar to `\\__validate__` but for transactions
85+
2. `_execute__` executes the transaction if the validation is successful.
86+
3. `_validate_declare__` optional entrypoint similar to `_validate__` but for transactions
8787
meant to declare other contracts.
88-
4. `\\__validate_deploy__` optional entrypoint similar to `\\__validate__` but meant for [counterfactual deployments](/guides/deployment).
88+
4. `_validate_deploy__` optional entrypoint similar to `_validate__` but meant for [counterfactual deployments](/guides/deployment).
8989

9090
<Callout>
9191
Although these entrypoints are available to the protocol for its regular transaction flow, they can also be called like any other method.
@@ -275,7 +275,7 @@ wraps and exposes the `deploy_syscall` to provide arbitrary deployments through
275275
But if you don’t have an account to invoke it, you will probably want to use the latter.
276276

277277
To do counterfactual deployments, you need to implement another protocol-level entrypoint named
278-
`\\__validate_deploy__`. Check the [counterfactual deployments](/guides/deployment) guide to learn how.
278+
`_validate_deploy__`. Check the [counterfactual deployments](/guides/deployment) guide to learn how.
279279

280280
## Sending transactions
281281

content/contracts-cairo/2.0.0/guides/deployment.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Note that the `class_hash` must be previously declared for the deployment to suc
1818
2. Send funds to the `contract_address`. Usually you will estimate the fee of the transaction first. Existing
1919
tools usually do this for you.
2020
3. Send a `DeployAccount` type transaction to the network.
21-
4. The protocol will then validate the transaction with the `\\__validate_deploy__` entrypoint of the contract to be deployed.
21+
4. The protocol will then validate the transaction with the `_validate_deploy__` entrypoint of the contract to be deployed.
2222
5. If the validation succeeds, the protocol will charge the fee and then register the contract as deployed.
2323

2424
<Callout>
@@ -27,7 +27,7 @@ Although this method is very popular to deploy accounts, this works for any kind
2727

2828
## Deployment validation
2929

30-
To be counterfactually deployed, the deploying contract must implement the `\\__validate_deploy__` entrypoint,
30+
To be counterfactually deployed, the deploying contract must implement the `_validate_deploy__` entrypoint,
3131
called by the protocol when a `DeployAccount` transaction is sent to the network.
3232

3333
```cairo

content/contracts-cairo/accounts.mdx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -80,12 +80,12 @@ interoperability with the ecosystem.
8080
The Starknet protocol uses a few entrypoints for abstracting the accounts. We already mentioned the first two
8181
as part of the ISRC6 interface, and both are required for enabling accounts to be used for executing transactions. The rest are optional:
8282

83-
1. `\\__validate__` verifies the validity of the transaction to be executed. This is usually used to validate signatures,
83+
1. `_validate__` verifies the validity of the transaction to be executed. This is usually used to validate signatures,
8484
but the entrypoint implementation can be customized to feature any validation mechanism [with some limitations](https://docs.starknet.io/architecture-and-concepts/accounts/account-functions/#limitations_of_validation).
85-
2. `\\__execute__` executes the transaction if the validation is successful.
86-
3. `\\__validate_declare__` optional entrypoint similar to `\\__validate__` but for transactions
85+
2. `_execute__` executes the transaction if the validation is successful.
86+
3. `_validate_declare__` optional entrypoint similar to `_validate__` but for transactions
8787
meant to declare other contracts.
88-
4. `\\__validate_deploy__` optional entrypoint similar to `\\__validate__` but meant for [counterfactual deployments](/guides/deployment).
88+
4. `_validate_deploy__` optional entrypoint similar to `_validate__` but meant for [counterfactual deployments](/guides/deployment).
8989

9090
<Callout>
9191
Although these entrypoints are available to the protocol for its regular transaction flow, they can also be called like any other method.
@@ -275,7 +275,7 @@ wraps and exposes the `deploy_syscall` to provide arbitrary deployments through
275275
But if you don’t have an account to invoke it, you will probably want to use the latter.
276276

277277
To do counterfactual deployments, you need to implement another protocol-level entrypoint named
278-
`\\__validate_deploy__`. Check the [counterfactual deployments](/guides/deployment) guide to learn how.
278+
`_validate_deploy__`. Check the [counterfactual deployments](/guides/deployment) guide to learn how.
279279

280280
## Sending transactions
281281

content/contracts-cairo/guides/deployment.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Note that the `class_hash` must be previously declared for the deployment to suc
1818
2. Send funds to the `contract_address`. Usually you will estimate the fee of the transaction first. Existing
1919
tools usually do this for you.
2020
3. Send a `DeployAccount` type transaction to the network.
21-
4. The protocol will then validate the transaction with the `\\__validate_deploy__` entrypoint of the contract to be deployed.
21+
4. The protocol will then validate the transaction with the `_validate_deploy__` entrypoint of the contract to be deployed.
2222
5. If the validation succeeds, the protocol will charge the fee and then register the contract as deployed.
2323

2424
<Callout>
@@ -27,7 +27,7 @@ Although this method is very popular to deploy accounts, this works for any kind
2727

2828
## Deployment validation
2929

30-
To be counterfactually deployed, the deploying contract must implement the `\\__validate_deploy__` entrypoint,
30+
To be counterfactually deployed, the deploying contract must implement the `_validate_deploy__` entrypoint,
3131
called by the protocol when a `DeployAccount` transaction is sent to the network.
3232

3333
```rust

content/contracts-cairo/guides/snip12.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,8 +230,8 @@ Finally, the full implementation of the `CustomERC20` contract looks like this:
230230

231231
<Callout>
232232
We are using the [`ISRC6Dispatcher`](/api/account#ISRC6) to verify the signature,
233-
</Callout>
234233
and the [`NoncesComponent`](/api/utilities#NoncesComponent) to handle nonces to prevent replay attacks.
234+
</Callout>
235235

236236
```rust
237237
use core::hash::{HashStateExTrait, HashStateTrait};

content/upgrades-plugins/writing-upgradeable.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -386,7 +386,7 @@ Then the variable `base2` would be assigned the slot that `child` had in the pre
386386

387387
Storage gaps are a convention for reserving storage slots in a base contract, allowing future versions of that contract to use up those slots without affecting the storage layout of child contracts.
388388

389-
To create a storage gap, declare a fixed-size array in the base contract with an initial number of slots. This can be an array of `uint256` so that each element reserves a 32 byte slot. Use the name `\\__gap` or a name starting with `__gap_` for the array so that OpenZeppelin Upgrades will recognize the gap:
389+
To create a storage gap, declare a fixed-size array in the base contract with an initial number of slots. This can be an array of `uint256` so that each element reserves a 32 byte slot. Use the name `_gap` or a name starting with `__gap_` for the array so that OpenZeppelin Upgrades will recognize the gap:
390390

391391
```solidity
392392
contract Base

scripts/convert-adoc.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ async function convertAdocFiles(directory, apiRoute = "contracts/5.x/api") {
135135
"<Callout type='warn'>\n$2\n</Callout>",
136136
);
137137

138-
// Fix xref patterns with complex anchors like xref:#ISRC6-\\__execute__[...]
138+
// Fix xref patterns with complex anchors like xref:#ISRC6-_execute__[...]
139139
mdContent = mdContent.replace(
140140
/xref:#([^[\]]+)\[([^\]]+)\]/g,
141141
"[$2](#$1)",

scripts/process-mdx.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ async function processMdxFiles(directory) {
101101
"<Callout type='warn'>\n$2\n</Callout>",
102102
);
103103

104-
// Fix xref patterns with complex anchors like xref:#ISRC6-\\__execute__[...]
104+
// Fix xref patterns with complex anchors like xref:#ISRC6-_execute__[...]
105105
content = content.replace(/xref:#([^[\]]+)\[([^\]]+)\]/g, "[$2](#$1)");
106106

107107
// Fix simple xref patterns

0 commit comments

Comments
 (0)