Skip to content

Commit b930e16

Browse files
Merge pull request #120 from darwinia-network/bear-cleanup-crab
Refactor documentation to remove references to Crab network
2 parents 85fccc2 + 0d1a3a4 commit b930e16

23 files changed

Lines changed: 69 additions & 151 deletions

docs/build/ethereum-tools/interact-with-ethersjs.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ npm install ethers@6.13.0
4242
## Contract Interaction
4343

4444
!!! note
45-
The network provider used in this tutorial is the [Crab testnet](../getting-started/networks/crab.md). However, the concepts and techniques covered in this tutorial are applicable to other Darwinia networks as well.
45+
The network provider used in this tutorial is the [Darwinia network](../getting-started/networks/darwinia.md). The concepts and techniques covered here are applicable to other networks as well.
4646

4747
### Prepare Contract
4848

@@ -156,7 +156,7 @@ const accountFrom = {
156156
privateKey: "0xd5cef12c5641455ad949c3ce8f9056478eeda53dcbade335b06467e8d6b2accc",
157157
}
158158

159-
const provider = new JsonRpcProvider('https://crab-rpc.darwinia.network');
159+
const provider = new JsonRpcProvider('https://rpc.darwinia.network');
160160
const wallet = new ethers.Wallet(accountFrom.privateKey, provider);
161161
const abi = contractMetadata.contracts["storage.sol:Storage"].abi;
162162
const bin = contractMetadata.contracts["storage.sol:Storage"].bin;
@@ -216,7 +216,7 @@ const accountFrom = {
216216
privateKey:
217217
"0xd5cef12c5641455ad949c3ce8f9056478eeda53dcbade335b06467e8d6b2accc",
218218
};
219-
const provider = new JsonRpcProvider("https://crab-rpc.darwinia.network");
219+
const provider = new JsonRpcProvider("https://rpc.darwinia.network");
220220
const wallet = new ethers.Wallet(accountFrom.privateKey, provider);
221221
const abi = contractMetadata.contracts["storage.sol:Storage"].abi;
222222

@@ -265,7 +265,7 @@ const contractMetadata = require("./metadata.json");
265265
// The contract address deployed in last step
266266
const contractAddress = '0x24e263941c13bD12EEaAdba64531385e83103908';
267267

268-
const provider = new JsonRpcProvider('https://crab-rpc.darwinia.network');
268+
const provider = new JsonRpcProvider('https://rpc.darwinia.network');
269269
const abi = contractMetadata.contracts["storage.sol:Storage"].abi;
270270
const retrieve = async () => {
271271
// Construct the contract instance
@@ -288,4 +288,4 @@ The output:
288288

289289
```bash
290290
The current number stored is: 3
291-
```
291+
```

docs/build/ethereum-tools/interact-with-foundry.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ The four main tools in Foundry are:
1212
- [Anvil](https://github.com/foundry-rs/foundry/blob/master/crates/anvil): Anvil is a local TestNet node that can be used for development purposes. It has the ability to fork preexisting networks.
1313
- [Chisel](https://github.com/foundry-rs/foundry/blob/master/crates/chisel): Chisel is a Solidity REPL (Read-Eval-Print Loop) that allows for quick testing of Solidity snippets.
1414

15-
This guide will provide instructions on how to use Foundry's Forge and Cast tools to interact with Ethereum smart contracts on the Darwinia [Crab testnet](../getting-started/networks/crab.md).
15+
This guide will provide instructions on how to use Foundry's Forge and Cast tools to interact with Ethereum smart contracts on the [Darwinia network](../getting-started/networks/darwinia.md).
1616

1717
## Prerequisites
1818

@@ -43,7 +43,7 @@ In addition to these three folders, a git project will also be created along wit
4343
## Contract Interaction
4444

4545
!!! note
46-
The network provider used in this tutorial is the Crab testnet. However, the concepts and techniques covered in this tutorial are applicable to other Darwinia networks as well.
46+
The network provider used in this tutorial is the Darwinia network. However, the concepts and techniques covered in this tutorial are applicable to other networks as well.
4747

4848
### Prepare And Compile Contract
4949

@@ -106,7 +106,7 @@ Compiler run successful!
106106
Start the deployment by running the command:
107107

108108
```bash
109-
forge create --rpc-url https://crab-rpc.darwinia.network --private-key 0xd5cef12c5641455ad949c3ce8f9056478eeda53dcbade335b06467e8d6b2accc src/storage.sol:Storage
109+
forge create --rpc-url https://rpc.darwinia.network --private-key 0xd5cef12c5641455ad949c3ce8f9056478eeda53dcbade335b06467e8d6b2accc src/storage.sol:Storage
110110
```
111111

112112
The output like this:
@@ -126,7 +126,7 @@ Transaction hash: 0x8a9089e9aaf1569807cf3bae0f525370a490444fb6c55702aee46aaad70e
126126
Run the command:
127127

128128
```bash
129-
cast send --private-key 0xd5cef12c5641455ad949c3ce8f9056478eeda53dcbade335b06467e8d6b2accc --rpc-url https://crab-rpc.darwinia.network 0x0De784894D8FfE792EA7cF108E96f6e4451D066E "store(uint256)" 3
129+
cast send --private-key 0xd5cef12c5641455ad949c3ce8f9056478eeda53dcbade335b06467e8d6b2accc --rpc-url https://rpc.darwinia.network 0x0De784894D8FfE792EA7cF108E96f6e4451D066E "store(uint256)" 3
130130
```
131131

132132
The output:
@@ -152,7 +152,7 @@ type 2
152152
Run the command:
153153

154154
```bash
155-
cast call 0x0De784894D8FfE792EA7cF108E96f6e4451D066E "retrieve()" --rpc-url https://crab-rpc.darwinia.network
155+
cast call 0x0De784894D8FfE792EA7cF108E96f6e4451D066E "retrieve()" --rpc-url https://rpc.darwinia.network
156156
```
157157

158158
The output:

docs/build/ethereum-tools/interact-with-hardhat.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ These are the default paths for a Hardhat project.
5858
## Contract Interaction
5959
6060
!!! note
61-
The network provider used in this tutorial is the [Crab testnet](../getting-started/networks/crab.md). However, the concepts and techniques covered in this tutorial are applicable to other Darwinia networks as well.
61+
The network provider used in this tutorial is the [Darwinia network](../getting-started/networks/darwinia.md). However, the concepts and techniques covered in this tutorial are applicable to other networks as well.
6262
6363
6464
### Prepare And Compile Contract
@@ -114,25 +114,25 @@ Compiled 1 Solidity file successfully
114114
115115
### Update Hardhat Config
116116
117-
Before working with the contracts, there are a few basic configurations that need to be set up. Replace the default **`hardhat.config`** file with the following content. This configuration includes the Crab network RPC information and adds a test account:
117+
Before working with the contracts, there are a few basic configurations that need to be set up. Replace the default **`hardhat.config`** file with the following content. This configuration includes the Darwinia network RPC information and adds a test account:
118118
119119
```jsx linenums="1" title="hardhat.config"
120120
require("@nomicfoundation/hardhat-toolbox");
121121
122122
/** @type import('hardhat/config').HardhatUserConfig */
123123
module.exports = {
124124
solidity: "0.8.19",
125-
defaultNetwork: "crab",
125+
defaultNetwork: "darwinia",
126126
networks: {
127-
crab: {
128-
url: "https://crab-rpc.darwinia.network",
127+
darwinia: {
128+
url: "https://rpc.darwinia.network",
129129
accounts: ["0xd5cef12c5641455ad949c3ce8f9056478eeda53dcbade335b06467e8d6b2accc"]
130130
}
131131
}
132132
};
133133
```
134134
135-
By updating the **`hardhat.config`** file with this content, you will have the necessary configurations in place to interact with the Crab network and use the test account for testing purposes.
135+
By updating the **`hardhat.config`** file with this content, you will have the necessary configurations in place to interact with the Darwinia network and use the test account for testing purposes.
136136
137137
### Deploy Storage Contract
138138
@@ -158,7 +158,7 @@ main().catch((error) => {
158158
Start the deployment by running the command:
159159
160160
```jsx
161-
npx hardhat run --network crab scripts/deploy.js
161+
npx hardhat run --network darwinia scripts/deploy.js
162162
```
163163
164164
The output like this:
@@ -206,7 +206,7 @@ ContractTransactionResponse {
206206
_initializingPromise: [Promise],
207207
provider: [BackwardsCompatibilityProviderAdapter]
208208
},
209-
_networkName: 'crab',
209+
_networkName: 'darwinia',
210210
_blockListeners: [],
211211
_transactionHashListeners: Map(0) {},
212212
_eventListeners: []
@@ -225,7 +225,7 @@ ContractTransactionResponse {
225225
maxFeePerGas: 182721978177n,
226226
data: '0x6057361d0000000000000000000000000000000000000000000000000000000000000003',
227227
value: 0n,
228-
chainId: 43n,
228+
chainId: 46n,
229229
signature: Signature { r: "0x191e493eed26c34426522a9e29d913dd0c5a94ae62b44e398b8e0eb72d597b90", s: "0x474e5f1b1f363047b9a7c8c99bdd9f9429946a12acb876c8741ac5ce04a77438", yParity: 0, networkV: null },
230230
accessList: []
231231
}
@@ -242,4 +242,4 @@ The output:
242242
243243
```bash
244244
3n
245-
```
245+
```

docs/build/ethereum-tools/interact-with-web3js.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ npm install web3@4.9.0"
4343
4444
4545
!!! note
46-
The network provider used in this tutorial is the [Crab testnet](../getting-started/networks/crab.md). However, the concepts and techniques covered in this tutorial are applicable to other Darwinia networks as well.
46+
The network provider used in this tutorial is the [Darwinia network](../getting-started/networks/darwinia.md). However, the concepts and techniques covered in this tutorial are applicable to other networks as well.
4747
4848
### Prepare Contract
4949
@@ -157,7 +157,7 @@ const accountFrom = {
157157
privateKey: "0xd5cef12c5641455ad949c3ce8f9056478eeda53dcbade335b06467e8d6b2accc",
158158
}
159159
160-
const web3 = new Web3('https://crab-rpc.darwinia.network');
160+
const web3 = new Web3('https://rpc.darwinia.network');
161161
const abi = contractMetadata.contracts["storage.sol:Storage"].abi;
162162
const bin = contractMetadata.contracts["storage.sol:Storage"].bin;
163163
@@ -232,7 +232,7 @@ const accountFrom = {
232232
address: "0x6Bc9543094D17f52CF6b419FB692797E48d275d0",
233233
privateKey: "0xd5cef12c5641455ad949c3ce8f9056478eeda53dcbade335b06467e8d6b2accc",
234234
}
235-
const web3 = new Web3('https://crab-rpc.darwinia.network');
235+
const web3 = new Web3('https://rpc.darwinia.network');
236236
const abi = contractMetadata.contracts["storage.sol:Storage"].abi;
237237
238238
const store = async () => {
@@ -283,7 +283,7 @@ const contractMetadata = require("./metadata.json");
283283
// The contract address deployed in last step
284284
const contractAddress = '0x677163264bcb88A6f8F71E2B7D88F51d54325AB1';
285285
286-
const web3 = new Web3('https://crab-rpc.darwinia.network');
286+
const web3 = new Web3('https://rpc.darwinia.network');
287287
const abi = contractMetadata.contracts["storage.sol:Storage"].abi;
288288
289289
const retrieve = async () => {
@@ -307,4 +307,4 @@ The output:
307307
308308
```sh
309309
The current number stored is: 3
310-
```
310+
```

docs/build/ethereum-tools/verify-contract.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22

33
Verifying smart/token contracts is a crucial step in development, as it allows developers to ensure the contracts' correctness and security. Once verified, the contract's source code is made public, enabling independent verification, which fosters trust and transparency. This reassures users that the contracts operate as intended without any malicious code. It also simplifies the process for other developers to engage with your smart contracts.
44

5-
For Darwinia chains, Subscan is the most commonly used explorer, offering contract verification services for both the Darwinia and Crab networks. This tutorial will guide you through the contract verification steps
5+
For Darwinia, Subscan is the most commonly used explorer, offering contract verification services for the network. This tutorial will guide you through the contract verification steps.
66

77
## Verify Contracts
88

9-
1. Navigate to the appropriate [Subscan](../getting-started/networks/crab.md#network-info) explorer, using the Crab chain as an example. Once there, open the contract page as demonstrated in the screenshot below.
9+
1. Navigate to the [Darwinia Subscan](../getting-started/networks/darwinia.md#network-information) explorer. Once there, open the contract page as demonstrated in the screenshot below.
1010

1111
![evm-tutorial-verify-contract-1](../../images/evm-tutorial-verify-contract-1.png)
1212

13-
2. Verify the contract by submitting the concrete contract information or [standard input JSON](https://github.com/subscan-explorer/sourcify/blob/feat/doc/docs/Standard-Input-JSON.md), similar to the process used on Etherscan, then click `Verify & Publish`.
13+
2. Verify the contract by submitting the concrete contract information or [standard input JSON](https://github.com/subscan-explorer/sourcify/blob/feat/doc/docs/Standard-Input-JSON.md), similar to the process used on Etherscan, then click `Verify & Publish`.

docs/build/getting-started/networks/crab.md

Lines changed: 0 additions & 24 deletions
This file was deleted.

docs/build/getting-started/networks/dev-node.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Run Development Testnet
22

3-
While there is an established test network, namely the [Crab network](./crab.md), which serves as an ideal sandbox for your applications, eliminating any concern about initiating and connecting nodes, among other things. The official test network is designed to fulfill application developers' requirements. However, there may be scenarios where you want to perform low-level tasks. In such cases, creating your own development network can significantly enhance your development, testing, or debugging efficiency. This guide will walk you through the process of establishing a single-node development network.
3+
Darwinia no longer maintains a public testnet, so spinning up a local development network is the best way to experiment without risking production funds. Creating your own development network significantly enhances your ability to test or debug low-level features. This guide walks you through the process of establishing a single-node development network.
44

55
## Compile darwinia node
66

@@ -61,29 +61,29 @@ While there is an established test network, namely the [Crab network](./crab.md)
6161

6262
## Start the development node
6363

64-
After your node compiles, you are ready to start exploring what it does using the darwinia development node.
64+
After your node compiles, you are ready to start exploring what it does using the Darwinia development node.
6565

66-
To start the local Crab testnet node:
66+
To start the local development node:
6767

6868
1. In the same terminal where you compiled your node, you can now start the node in development mode by running the following command:
6969

7070
```bash
71-
./target/release/darwinia --chain crab-dev --alice --tmp --rpc-external --rpc-cors all --unsafe-force-node-key-generation
71+
./target/release/darwinia --dev --alice --tmp --rpc-external --rpc-cors all --unsafe-force-node-key-generation
7272
```
7373

74-
The darwinia command-line options specify how you want the running node to operate. In this case, the `--chain crab-dev` option specifies that the node runs in development mode using the predefined Crab development chain specification. By default, this option also deletes all active data—such as keys, the blockchain database, and networking information—when you stop the node by pressing Ctrl-C. Using the `--tmp` option ensures that you have a clean working state any time you stop and restart the node.
74+
The darwinia command-line options specify how you want the running node to operate. In this case, the `--dev` option runs an ephemeral single-node network with predefined accounts. By default, this option also deletes all active data—such as keys, the blockchain database, and networking information—when you stop the node by pressing Ctrl-C. Using the `--tmp` option ensures that you have a clean working state any time you stop and restart the node.
7575

7676
2. Verify your node is up and running successfully by reviewing the output displayed in the terminal. The terminal should display output similar to this:
7777

7878
```bash
7979
2025-01-14 17:46:13 darwinia
8080
2025-01-14 17:46:13 ✌️ version 6.8.1-8476af2e40e
8181
2025-01-14 17:46:13 ❤️ by Darwinia Network <hello@darwinia.network>, 2018-2025
82-
2025-01-14 17:46:13 📋 Chain specification: Crab2 D
82+
2025-01-14 17:46:13 📋 Chain specification: Development
8383
2025-01-14 17:46:13 🏷 Node name: Alice
8484
2025-01-14 17:46:13 👤 Role: AUTHORITY
85-
2025-01-14 17:46:13 💾 Database: RocksDb at /tmp/substraterhaReX/chains/crab2-d/db/full
86-
2025-01-14 17:46:13 🪪 Parachain id: Id(2105)
85+
2025-01-14 17:46:13 💾 Database: RocksDb at /tmp/substraterhaReX/chains/dev/db/full
86+
2025-01-14 17:46:13 🪪 Parachain id: Id(2046)
8787
2025-01-14 17:46:13 🧾 Parachain Account: 5Ec4AhNxga1JYLioRBNxfRnovheDELVbZTRSnKMgvSVPvNcN
8888
2025-01-14 17:46:13 ✍️ Is collating: yes
8989
2025-01-14 17:46:14 assembling new collators for new session 0 at #0
@@ -141,4 +141,4 @@ To start the local Crab testnet node:
141141
}
142142
```
143143
144-
Once the node is up and producing new blocks, you can connect to node to explore more advanced features, such as token transfer and contract development.
144+
Once the node is up and producing new blocks, you can connect to node to explore more advanced features, such as token transfer and contract development.
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
# Overview
22

3-
The Darwinia ecosystem consists of four official long-term networks:
3+
The Darwinia ecosystem currently focuses on the following long-term network:
44

55
| Chain | Introduction |
66
| :-------------------------------: | :---------------------------------------------------------------------------------------------------------------------------------------------------------: |
77
| **[Darwinia](./darwinia.md)** | EVM-compatible blockchain using the Substrate framework, featuring cross-chain capabilities. |
8-
| **[Crab](./crab.md)** | Incentivized testnet network for Darwinia, similar to Kusama for Polkadot, designed to expect and handle chaos. |

docs/build/indexer/envio.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Designed to optimize the developer experience, Envio offers automatic code gener
1212

1313
**Envio HyperSync**
1414

15-
Envio [HyperSync](https://docs.envio.dev/docs/hypersync) is supported on Darwinia Chain and Crab Chain.
15+
Envio [HyperSync](https://docs.envio.dev/docs/hypersync) is supported on the Darwinia chain.
1616

1717
HyperSync is a real-time data query layer for Darwinia Network, providing APIs that bypass traditional JSON-RPC for up to 1000x faster syncing of historical data. HyperSync is used by default in Envio's indexing framework (HyperIndex), with RPC being optional for data retrieval.
1818

@@ -97,7 +97,6 @@ Choosing `Local ABI` option will allow you to point to a JSON file containing th
9797
optimism
9898
base
9999
bsc
100-
crab
101100
darwinia
102101
v polygon
103102
[↑↓ to move, enter to select, type to filter]

0 commit comments

Comments
 (0)