Skip to content

Fix typos #1393

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

Merged
merged 4 commits into from
May 14, 2025
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions www/docs/guides/L1message.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ Starknet.js proposes 2 functions to calculate hashes related to a L1 ➡️ L2 m
// l1ToL2MessageHash = '0x2e350fa9d830482605cb68be4fdb9f0cb3e1f95a0c51623ac1a5d1bd997c2090'
```

Can be verified here : https://sepolia.starkscan.co/message/0x2e350fa9d830482605cb68be4fdb9f0cb3e1f95a0c51623ac1a5d1bd997c2090#messagelogs
Can be verified here: https://sepolia.starkscan.co/message/0x2e350fa9d830482605cb68be4fdb9f0cb3e1f95a0c51623ac1a5d1bd997c2090#messagelogs

- The L2 transaction hash:
For the same message:
Expand All @@ -92,13 +92,13 @@ Starknet.js proposes 2 functions to calculate hashes related to a L1 ➡️ L2 m
);
// l1ToL2TransactionHash = '0x67d959200d65d4ad293aa4b0da21bb050a1f669bce37d215c6edbf041269c07'
```
Can be verified here : https://sepolia.starkscan.co/tx/0x067d959200d65d4ad293aa4b0da21bb050a1f669bce37d215c6edbf041269c07
Can be verified here: https://sepolia.starkscan.co/tx/0x067d959200d65d4ad293aa4b0da21bb050a1f669bce37d215c6edbf041269c07

## L2 ➡️ L1 messages

To send a message to L1, you will just invoke a Cairo contract function, paying a fee that will pay all the processes (in L1 & L2).
To send a message to L1, you will just invoke a Cairo contract function, paying a fee that will pay for all the processes (in L1 & L2).

If necessary you can estimate this fee with the generic `estimateInvokeFee` function:
If necessary, you can estimate this fee with the generic `estimateInvokeFee` function:

```typescript
const { suggestedMaxFee: estimatedFee1 } = await account0.estimateInvokeFee({
Expand All @@ -120,4 +120,4 @@ const l1MessageHash = await provider.getL1MessageHash(l2TransactionHash);
// l1MessageHash = '0x55b3f8b6e607fffd9b4d843dfe8f9b5c05822cd94fcad8797deb01d77805532a'
```

Can be verified here : https://sepolia.voyager.online/tx/0x28dfc05eb4f261b37ddad451ff22f1d08d4e3c24dc646af0ec69fa20e096819#messages
Can be verified here: https://sepolia.voyager.online/tx/0x28dfc05eb4f261b37ddad451ff22f1d08d4e3c24dc646af0ec69fa20e096819#messages
4 changes: 2 additions & 2 deletions www/docs/guides/events.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Some cases:
- When a specific value is reached in a contract, an event can be created to store the fact that this value has been reached at a specific block number.
- When the L1 network has triggered the execution of a L2 contract, you can store in the event some results and when it occurs.

An event can be useful also when you invoke a contract. When you invoke a Cairo function (meaning to write in the network), the API does not authorize any response (only call functions can provide an answer). To generate an event in the code is a way to provide a response (for example for the creation of an account, an event is generated to return the account address).
An event can also be useful when you invoke a contract. When you invoke a Cairo function (meaning to write in the network), the API does not authorize any response (only call functions can provide an answer). To generate an event in the code is a way to provide a response (for example for the creation of an account, an event is generated to return the account address).

## With the Transaction hash

Expand Down Expand Up @@ -146,7 +146,7 @@ If you don't want to filter by key, you can either remove the `keys` parameter,
:::

:::warning CAUTION
An event can be nested in a Cairo component (See the Cairo code of the contract to verify). In this case, the array of keys will start with additional hashes, and you will have to adapt your code in consequence ; in this example, we have to skip one hash :
An event can be nested in a Cairo component (See the Cairo code of the contract to verify). In this case, the array of keys will start with additional hashes, and you will have to adapt your code in consequence; in this example, we have to skip one hash :

```typescript
const keyFilter = [[], [num.toHex(hash.starknetKeccak('EventPanic'))]];
Expand Down
2 changes: 1 addition & 1 deletion www/docs/guides/interact.md
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ await provider.waitForTransaction(tx1.transaction_hash);

In a Starknet transaction, you can include several invoke operations. It will be performed with `account.execute`.

We will later see this case more in detail in this dedicated [guide](multiCall.md), but in summary, you use this command with the following parameters:
We will later see this case in more detail in this dedicated [guide](multiCall.md), but in summary, you use this command with the following parameters:

- address of the contract to invoke
- name of the function to invoke
Expand Down