Skip to content

Commit 51b694c

Browse files
authored
docs: goerli testnet deprecated (#1059)
1 parent 2c27daf commit 51b694c

File tree

8 files changed

+43
-50
lines changed

8 files changed

+43
-50
lines changed

src/utils/provider.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ export const getDefaultNodeUrl = (networkName?: NetworkName, mute: boolean = fal
7575
if (!mute)
7676
// eslint-disable-next-line no-console
7777
console.warn('Using default public node url, please provide nodeUrl in provider options!');
78-
const nodes = RPC_NODES[networkName ?? NetworkName.SN_GOERLI]; // TODO: when goerli deprecated switch default to sepolia
78+
const nodes = RPC_NODES[networkName ?? NetworkName.SN_SEPOLIA];
7979
const randIdx = Math.floor(Math.random() * nodes.length);
8080
return nodes[randIdx];
8181
};

www/docs/guides/L1message.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ sidebar_position: 13
77
You can exchange messages between L1 & L2 networks:
88

99
- L2 Starknet mainnet ↔️ L1 Ethereum.
10-
- L2 Starknet testnet ↔️ L1 Goerli ETH testnet.
10+
- L2 Starknet testnet ↔️ L1 Sepolia ETH testnet.
1111
- L2 local Starknet devnet ↔️ L1 local ETH testnet (Ganache, ...).
1212

1313
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(
3535
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:
3636

3737
```typescript
38-
import { SequencerProvider } from 'starknet';
39-
const provider = new SequencerProvider({ baseUrl: constants.BaseUrl.SN_GOERLI }); // for testnet
38+
import { RpcProvider, constants } from 'starknet';
39+
const provider = new RpcProvider({ nodeUrl: constants.NetworkName.SN_SEPOLIA }); // for testnet
4040

4141
const responseEstimateMessageFee = await provider.estimateMessageFee({
4242
from_address: L1address,

www/docs/guides/connect_network.md

Lines changed: 9 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ Then you need to select a node. A node is a safe way to connect with the Starkne
1818
Each node is communicating with Starknet.js using a rpc specification. Most of the nodes are able to use 2 rpc spec versions.
1919
For example, this node is compatible with v0.6.0 & v0.7.0, using the following entry points :
2020

21-
- "https://free-rpc.nethermind.io/goerli-juno/v0_6"
22-
- "https://free-rpc.nethermind.io/goerli-juno/v0_7"
21+
- "https://free-rpc.nethermind.io/sepolia-juno/v0_6"
22+
- "https://free-rpc.nethermind.io/sepolia-juno/v0_7"
2323

2424
From rpc spec v0.5.0, you can request the rpc spec version that uses a node address :
2525

@@ -36,8 +36,8 @@ On Starknet.js side, you have to select the proper version, to be in accordance
3636
| v0.4.0 | Starknet.js v5.21.1 |
3737
| v0.5.0 | Starknet.js v5.23.0 |
3838
| v0.5.1 | Starknet.js v5.29.0 & v6.1.0 |
39-
| v0.6.0 | Starknet.js v6.4.3 |
40-
| v0.7.0 | Starknet.js v6.4.3 |
39+
| v0.6.0 | Starknet.js v6.6.6 |
40+
| v0.7.0 | Starknet.js v6.6.6 |
4141

4242
[!NOTE] Each Starknet.js version 6.x.x is compatible with 3 rpc spec versions, and recognize automatically the spec version if not provided.
4343

@@ -54,10 +54,10 @@ import { RpcProvider } from 'starknet';
5454
If you don't want to use a specific node, or to handle an API key, you can use by default (using Rpc spec 0.7.0):
5555

5656
```typescript
57-
const myProvider = new RpcProvider({ nodeUrl: constants.NetworkName.SN_GOERLI });
57+
const myProvider = new RpcProvider({ nodeUrl: constants.NetworkName.SN_SEPOLIA });
5858
const myProvider = new RpcProvider({ nodeUrl: constants.NetworkName.SN_MAIN });
5959
// or
60-
const myProvider = new RpcProvider(); // Goerli
60+
const myProvider = new RpcProvider(); // Sepolia
6161
```
6262

6363
> when using this syntax, a random public node will be selected.
@@ -103,28 +103,9 @@ const providerLavaMainnet = new RpcProvider({
103103
104104
### Goerli Testnet
105105

106-
```typescript
107-
// Infura node rpc 0.5.1 for Goerli Testnet:
108-
const providerInfuraTestnet = new RpcProvider({
109-
nodeUrl: 'https://starknet-goerli.infura.io/v3/' + infuraKey,
110-
});
111-
// Blast node rpc 0.7.0 for Goerli Testnet (0.4, 0.5 & 0_6 also available) :
112-
const providerBlastTestnet = new RpcProvider({
113-
nodeUrl: 'https://starknet-testnet.blastapi.io/' + blastKey + '/rpc/v0_7',
114-
});
115-
// Alchemy node rpc 0.6.0 for Goerli Testnet:
116-
const providerAlchemyTestnet = new RpcProvider({
117-
nodeUrl: 'https://starknet-goerli.g.alchemy.com/starknet/version/rpc/v0_6/' + alchemyKey,
118-
});
119-
// Public Nethermind node rpc 0.7.0 for Goerli Testnet (0_6 also available) :
120-
const providerTestnetNethermindPublic = new RpcProvider({
121-
nodeUrl: 'https://free-rpc.nethermind.io/goerli-juno/v0_7',
122-
});
123-
// Public Blast node rpc 0.7.0 for Goerli Testnet (0.4, 0.5 & 0_6 also available) :
124-
const providerTestnetBlastPublic = new RpcProvider({
125-
nodeUrl: 'https://starknet-testnet.public.blastapi.io/rpc/v0_7',
126-
});
127-
```
106+
[!IMPORTANT]
107+
108+
> The Goerli testnet is no more in service.
128109
129110
### Sepolia Testnet
130111

www/docs/guides/create_account.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,14 @@ How to proceed is out of the scope of this guide, but you can for example:
5858

5959
- Transfer ETH from another wallet.
6060
- Bridge ETH to this Starknet address.
61-
- Use a faucet. (https://faucet.goerli.starknet.io/)
61+
- Use a faucet. (https://starknet-faucet.vercel.app/)
6262
- Mint ETH on starknet-devnet-rs, like so:
6363

6464
```bash
65-
curl -X POST http://127.0.0.1:5050/mint -d '{"address":"0x04a093c37ab61065d001550089b1089922212c60b34e662bb14f2f91faee2979","amount":50000000000000000000,"lite":true}' -H "Content-Type:application/json"
66-
// {"new_balance":50000000000000000000,"tx_hash":null,"unit":"wei"}
65+
// ETH
66+
curl -X POST http://127.0.0.1:5050/mint -d '{"address":"0x04a093c37ab61065d001550089b1089922212c60b34e662bb14f2f91faee2979","amount":50000000000000000000}' -H "Content-Type:application/json"
67+
// STRK
68+
curl -X POST http://127.0.0.1:5050/mint -d '{"address":"0x04a093c37ab61065d001550089b1089922212c60b34e662bb14f2f91faee2979","amount":50000000000000000000,"unit":"FRI"}' -H "Content-Type:application/json"
6769
```
6870

6971
### Deployment of the new account
@@ -150,7 +152,7 @@ More complicated, a Braavos account needs a proxy and a specific signature. Star
150152
We will deploy hereunder a Braavos account in devnet. So launch starknet-devnet with these parameters:
151153

152154
```bash
153-
starknet-devnet --seed 0 --fork-network alpha-goerli
155+
starknet-devnet --seed 0 --fork-network 'https://free-rpc.nethermind.io/sepolia-juno/v0_7'
154156
```
155157

156158
Initialization:
@@ -204,7 +206,6 @@ const { data: answer } = await axios.post(
204206
{
205207
address: BraavosProxyAddress,
206208
amount: 10_000_000_000_000_000_000,
207-
lite: true,
208209
},
209210
{ headers: { 'Content-Type': 'application/json' } }
210211
);

www/docs/guides/interact.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Once your provider, contract, and account are connected, you can interact with t
99
- you can read the memory of the contract, without fees.
1010
- you can write to memory, but you have to pay fees.
1111
- On Mainnet, you have to pay fees with a bridged ETH token.
12-
- On Testnets, you have to pay with a bridged Goerli or Sepolia ETH token.
12+
- On Testnet, you have to pay with a bridged Sepolia ETH token.
1313
- On devnet, you have to pay with a dummy ETH token.
1414

1515
Your account should be funded enough to pay fees (0.01 ETH should be enough to start).

www/docs/guides/migrate.md

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,23 +8,34 @@ This document only covers the features present in v5 which have changed in some
88

99
If you encounter any missing changes, please let us know and we will update this guide.
1010

11-
## Transaction response
11+
## Transaction receipt
1212

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`, ...)
1716

1817
```typescript
1918
const response = await ethContract.approve(swapContractAddress, cairo.uint256(100000));
19+
const transactionReceipt = await provider.waitForTransaction(response.transaction_hash);
2020

21-
// v5
22-
const transactionReceipt = await provider.waitForTransaction(response);
21+
// v5 : transactionReceipt is just an object
22+
{
23+
type: 'INVOKE',
24+
transaction_hash: '0x5286217518c621581ac85505a99ffe182ce1114abaa8fce8b418d2b27c3c04c',
25+
actual_fee: { unit: 'WEI', amount: '0x1c1902fe99800' },
26+
messages_sent: [],
27+
execution_status: 'SUCCEEDED',
28+
finality_status: 'ACCEPTED_ON_L2',
29+
// ...
30+
}
31+
// v6 : transactionReceipt is an object + helpers
32+
const receipt = transactionReceipt.value;
33+
const status: boolean = transactionReceipt.isSuccess();
2334

24-
// v6
25-
const transactionReceipt = await provider.waitForTransaction(response.transaction_hash);
2635
```
2736

37+
> See this [guide](./interact.md#transaction-receipt-response)
38+
2839
## Long strings
2940

3041
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.

www/docs/guides/signature.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ const typedDataValidate: TypedData = {
144144
domain: {
145145
name: 'myDapp', // put the name of your dapp to ensure that the signatures will not be used by other DAPP
146146
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.
148148
},
149149
message: {
150150
id: '0x0000004f000f',

www/docs/guides/what_s_starknet.js.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ Some important topics that have to be understood:
1515
- You can connect your DAPP to several networks:
1616

1717
- [Starknet mainnet](https://starkscan.co) (Layer 2 of [Ethereum network](https://etherscan.io/) ).
18-
- [Starknet testnet](https://testnet.starkscan.co/) (Layer 2 of [Goerli network](https://goerli.etherscan.io/) (testnet of Ethereum)).
19-
- [Starknet-devnet](https://shard-labs.github.io/starknet-devnet/docs/intro) (your local Starknet network, for developers).
18+
- [Starknet testnet](https://sepolia.starkscan.co/) (Layer 2 of [Sepolia network](https://sepolia.etherscan.io/) (testnet of Ethereum)).
19+
- [Starknet-devnet](https://github.com/0xSpaceShard/starknet-devnet-rs) (your local Starknet network, for developers).
2020

2121
and also to some more specific solutions:
2222

0 commit comments

Comments
 (0)