Skip to content
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 docs/build/ethereum-tools/interact-with-ethersjs.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ npm install ethers@6.13.0
## Contract Interaction

!!! note
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.
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.

### Prepare Contract

Expand Down Expand Up @@ -156,7 +156,7 @@ const accountFrom = {
privateKey: "0xd5cef12c5641455ad949c3ce8f9056478eeda53dcbade335b06467e8d6b2accc",
}

const provider = new JsonRpcProvider('https://crab-rpc.darwinia.network');
const provider = new JsonRpcProvider('https://rpc.darwinia.network');
const wallet = new ethers.Wallet(accountFrom.privateKey, provider);
const abi = contractMetadata.contracts["storage.sol:Storage"].abi;
const bin = contractMetadata.contracts["storage.sol:Storage"].bin;
Expand Down Expand Up @@ -216,7 +216,7 @@ const accountFrom = {
privateKey:
"0xd5cef12c5641455ad949c3ce8f9056478eeda53dcbade335b06467e8d6b2accc",
};
const provider = new JsonRpcProvider("https://crab-rpc.darwinia.network");
const provider = new JsonRpcProvider("https://rpc.darwinia.network");
const wallet = new ethers.Wallet(accountFrom.privateKey, provider);
const abi = contractMetadata.contracts["storage.sol:Storage"].abi;

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

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

```bash
The current number stored is: 3
```
```
10 changes: 5 additions & 5 deletions docs/build/ethereum-tools/interact-with-foundry.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ The four main tools in Foundry are:
- [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.
- [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.

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

## Prerequisites

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

!!! note
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.
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.

### Prepare And Compile Contract

Expand Down Expand Up @@ -106,7 +106,7 @@ Compiler run successful!
Start the deployment by running the command:

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

The output like this:
Expand All @@ -126,7 +126,7 @@ Transaction hash: 0x8a9089e9aaf1569807cf3bae0f525370a490444fb6c55702aee46aaad70e
Run the command:

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

The output:
Expand All @@ -152,7 +152,7 @@ type 2
Run the command:

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

The output:
Expand Down
20 changes: 10 additions & 10 deletions docs/build/ethereum-tools/interact-with-hardhat.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ These are the default paths for a Hardhat project.
## Contract Interaction

!!! note
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.
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.


### Prepare And Compile Contract
Expand Down Expand Up @@ -114,25 +114,25 @@ Compiled 1 Solidity file successfully

### Update Hardhat Config

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:
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:

```jsx linenums="1" title="hardhat.config"
require("@nomicfoundation/hardhat-toolbox");

/** @type import('hardhat/config').HardhatUserConfig */
module.exports = {
solidity: "0.8.19",
defaultNetwork: "crab",
defaultNetwork: "darwinia",
networks: {
crab: {
url: "https://crab-rpc.darwinia.network",
darwinia: {
url: "https://rpc.darwinia.network",
accounts: ["0xd5cef12c5641455ad949c3ce8f9056478eeda53dcbade335b06467e8d6b2accc"]
}
}
};
```

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

### Deploy Storage Contract

Expand All @@ -158,7 +158,7 @@ main().catch((error) => {
Start the deployment by running the command:

```jsx
npx hardhat run --network crab scripts/deploy.js
npx hardhat run --network darwinia scripts/deploy.js
```

The output like this:
Expand Down Expand Up @@ -206,7 +206,7 @@ ContractTransactionResponse {
_initializingPromise: [Promise],
provider: [BackwardsCompatibilityProviderAdapter]
},
_networkName: 'crab',
_networkName: 'darwinia',
_blockListeners: [],
_transactionHashListeners: Map(0) {},
_eventListeners: []
Expand All @@ -225,7 +225,7 @@ ContractTransactionResponse {
maxFeePerGas: 182721978177n,
data: '0x6057361d0000000000000000000000000000000000000000000000000000000000000003',
value: 0n,
chainId: 43n,
chainId: 46n,
signature: Signature { r: "0x191e493eed26c34426522a9e29d913dd0c5a94ae62b44e398b8e0eb72d597b90", s: "0x474e5f1b1f363047b9a7c8c99bdd9f9429946a12acb876c8741ac5ce04a77438", yParity: 0, networkV: null },
accessList: []
}
Expand All @@ -242,4 +242,4 @@ The output:

```bash
3n
```
```
10 changes: 5 additions & 5 deletions docs/build/ethereum-tools/interact-with-web3js.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ npm install web3@4.9.0"


!!! note
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.
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.

### Prepare Contract

Expand Down Expand Up @@ -157,7 +157,7 @@ const accountFrom = {
privateKey: "0xd5cef12c5641455ad949c3ce8f9056478eeda53dcbade335b06467e8d6b2accc",
}

const web3 = new Web3('https://crab-rpc.darwinia.network');
const web3 = new Web3('https://rpc.darwinia.network');
const abi = contractMetadata.contracts["storage.sol:Storage"].abi;
const bin = contractMetadata.contracts["storage.sol:Storage"].bin;

Expand Down Expand Up @@ -232,7 +232,7 @@ const accountFrom = {
address: "0x6Bc9543094D17f52CF6b419FB692797E48d275d0",
privateKey: "0xd5cef12c5641455ad949c3ce8f9056478eeda53dcbade335b06467e8d6b2accc",
}
const web3 = new Web3('https://crab-rpc.darwinia.network');
const web3 = new Web3('https://rpc.darwinia.network');
const abi = contractMetadata.contracts["storage.sol:Storage"].abi;

const store = async () => {
Expand Down Expand Up @@ -283,7 +283,7 @@ const contractMetadata = require("./metadata.json");
// The contract address deployed in last step
const contractAddress = '0x677163264bcb88A6f8F71E2B7D88F51d54325AB1';

const web3 = new Web3('https://crab-rpc.darwinia.network');
const web3 = new Web3('https://rpc.darwinia.network');
const abi = contractMetadata.contracts["storage.sol:Storage"].abi;

const retrieve = async () => {
Expand All @@ -307,4 +307,4 @@ The output:

```sh
The current number stored is: 3
```
```
6 changes: 3 additions & 3 deletions docs/build/ethereum-tools/verify-contract.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

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.

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

## Verify Contracts

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

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

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`.
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`.
24 changes: 0 additions & 24 deletions docs/build/getting-started/networks/crab.md

This file was deleted.

18 changes: 9 additions & 9 deletions docs/build/getting-started/networks/dev-node.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Run Development Testnet

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

## Compile darwinia node

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

## Start the development node

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

To start the local Crab testnet node:
To start the local development node:

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

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

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

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:

```bash
2025-01-14 17:46:13 darwinia
2025-01-14 17:46:13 ✌️ version 6.8.1-8476af2e40e
2025-01-14 17:46:13 ❤️ by Darwinia Network <hello@darwinia.network>, 2018-2025
2025-01-14 17:46:13 📋 Chain specification: Crab2 D
2025-01-14 17:46:13 📋 Chain specification: Development
2025-01-14 17:46:13 🏷 Node name: Alice
2025-01-14 17:46:13 👤 Role: AUTHORITY
2025-01-14 17:46:13 💾 Database: RocksDb at /tmp/substraterhaReX/chains/crab2-d/db/full
2025-01-14 17:46:13 🪪 Parachain id: Id(2105)
2025-01-14 17:46:13 💾 Database: RocksDb at /tmp/substraterhaReX/chains/dev/db/full
2025-01-14 17:46:13 🪪 Parachain id: Id(2046)
2025-01-14 17:46:13 🧾 Parachain Account: 5Ec4AhNxga1JYLioRBNxfRnovheDELVbZTRSnKMgvSVPvNcN
2025-01-14 17:46:13 ✍️ Is collating: yes
2025-01-14 17:46:14 assembling new collators for new session 0 at #0
Expand Down Expand Up @@ -141,4 +141,4 @@ To start the local Crab testnet node:
}
```

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.
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.
3 changes: 1 addition & 2 deletions docs/build/getting-started/networks/overview.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
# Overview

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

| Chain | Introduction |
| :-------------------------------: | :---------------------------------------------------------------------------------------------------------------------------------------------------------: |
| **[Darwinia](./darwinia.md)** | EVM-compatible blockchain using the Substrate framework, featuring cross-chain capabilities. |
| **[Crab](./crab.md)** | Incentivized testnet network for Darwinia, similar to Kusama for Polkadot, designed to expect and handle chaos. |
3 changes: 1 addition & 2 deletions docs/build/indexer/envio.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Designed to optimize the developer experience, Envio offers automatic code gener

**Envio HyperSync**

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

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.

Expand Down Expand Up @@ -97,7 +97,6 @@ Choosing `Local ABI` option will allow you to point to a JSON file containing th
optimism
base
bsc
crab
darwinia
v polygon
[↑↓ to move, enter to select, type to filter]
Expand Down
Loading
Loading