You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: www/docs/guides/L1message.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@ sidebar_position: 13
7
7
You can exchange messages between L1 & L2 networks:
8
8
9
9
- L2 Starknet mainnet ↔️ L1 Ethereum.
10
-
- L2 Starknet testnet ↔️ L1 Goerli ETH testnet.
10
+
- L2 Starknet testnet ↔️ L1 Sepolia ETH testnet.
11
11
- L2 local Starknet devnet ↔️ L1 local ETH testnet (Ganache, ...).
12
12
13
13
You can find an explanation of the global mechanism [here](https://docs.starknet.io/documentation/architecture_and_concepts/L1-L2_Communication/messaging-mechanism/).
@@ -35,8 +35,8 @@ function sendMessageToL2(
35
35
You have to pay in the L1 an extra fee when invoking `sendMessageToL2` (of course paid with the L1 fee TOKEN), to pay the L2 part of the messaging mechanism. You can estimate this fee with this function:
36
36
37
37
```typescript
38
-
import { SequencerProvider } from'starknet';
39
-
const provider =newSequencerProvider({ baseUrl: constants.BaseUrl.SN_GOERLI }); // for testnet
38
+
import { RpcProvider, constants } from'starknet';
39
+
const provider =newRpcProvider({ nodeUrl: constants.NetworkName.SN_SEPOLIA }); // for testnet
Copy file name to clipboardExpand all lines: www/docs/guides/migrate.md
+20-9Lines changed: 20 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,23 +8,34 @@ This document only covers the features present in v5 which have changed in some
8
8
9
9
If you encounter any missing changes, please let us know and we will update this guide.
10
10
11
-
## Transaction response
11
+
## Transaction receipt
12
12
13
-
When sending a transaction, the response type has changed.
14
-
15
-
Previously, the response was just the transaction hash value. Now, the response is an object including many other data.
16
-
This has an impact on `provider.waitForTransaction()`:
13
+
When sending a transaction, the receipt type has changed.
14
+
In V5, it's an object that can have varied definitions, depending of the status and the type of transaction.
15
+
In V6, this object is in `TxR.value`, and several helpers are available (`.statusReceipt`, `isSuccess()`, `isRejected()`, `isReverted()`, `.isError()`, `match`, ...)
> See this [guide](./interact.md#transaction-receipt-response)
38
+
28
39
## Long strings
29
40
30
41
Starknet.js v6 is compatible with Cairo v2.4.0. It means that long strings (>31 characters) are automatically handled and converted to the Cairo `ByteArray` type.
name: 'myDapp', // put the name of your dapp to ensure that the signatures will not be used by other DAPP
146
146
version: '1',
147
-
chainId: shortString.encodeShortString('SN_GOERLI'), // shortString of 'SN_GOERLI' (or 'SN_MAIN'), to be sure that signature can't be used by other network.
147
+
chainId: shortString.encodeShortString('SN_SEPOLIA'), // shortString of 'SN_SEPOLIA' (or 'SN_MAIN'), to be sure that signature can't be used by other network.
0 commit comments