Skip to content
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

Sunset Koi testnet #117

Merged
merged 4 commits into from
Jan 15, 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
8 changes: 4 additions & 4 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 [Koi testnet](../getting-started/networks/koi.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 [Crab testnet](../getting-started/networks/crab.md). However, the concepts and techniques covered in this tutorial are applicable to other Darwinia networks as well.

### Prepare Contract

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

const provider = new JsonRpcProvider('https://koi-rpc.darwinia.network');
const provider = new JsonRpcProvider('https://crab-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://koi-rpc.darwinia.network");
const provider = new JsonRpcProvider("https://crab-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://koi-rpc.darwinia.network');
const provider = new JsonRpcProvider('https://crab-rpc.darwinia.network');
const abi = contractMetadata.contracts["storage.sol:Storage"].abi;
const retrieve = async () => {
// Construct the contract instance
Expand Down
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 [Koi TestNet](../getting-started/networks/koi.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 [Crab testnet](../getting-started/networks/crab.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 Koi 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 Crab testnet. However, the concepts and techniques covered in this tutorial are applicable to other Darwinia 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://koi-rpc.darwinia.network --private-key 0xd5cef12c5641455ad949c3ce8f9056478eeda53dcbade335b06467e8d6b2accc src/storage.sol:Storage
forge create --rpc-url https://crab-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://koi-rpc.darwinia.network 0x0De784894D8FfE792EA7cF108E96f6e4451D066E "store(uint256)" 3
cast send --private-key 0xd5cef12c5641455ad949c3ce8f9056478eeda53dcbade335b06467e8d6b2accc --rpc-url https://crab-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://koi-rpc.darwinia.network
cast call 0x0De784894D8FfE792EA7cF108E96f6e4451D066E "retrieve()" --rpc-url https://crab-rpc.darwinia.network
```

The output:
Expand Down
16 changes: 8 additions & 8 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 [Koi Testnet](../getting-started/networks/koi.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 [Crab testnet](../getting-started/networks/crab.md). However, the concepts and techniques covered in this tutorial are applicable to other Darwinia 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 Koi 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 Crab 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: "koi",
defaultNetwork: "crab",
networks: {
koi: {
url: "https://koi-rpc.darwinia.network",
crab: {
url: "https://crab-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 Koi 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 Crab 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 koi scripts/deploy.js
npx hardhat run --network crab scripts/deploy.js
```

The output like this:
Expand Down Expand Up @@ -206,7 +206,7 @@ ContractTransactionResponse {
_initializingPromise: [Promise],
provider: [BackwardsCompatibilityProviderAdapter]
},
_networkName: 'koi',
_networkName: 'crab',
_blockListeners: [],
_transactionHashListeners: Map(0) {},
_eventListeners: []
Expand Down
8 changes: 4 additions & 4 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 [Koi testnet](../getting-started/networks/koi.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 [Crab testnet](../getting-started/networks/crab.md). However, the concepts and techniques covered in this tutorial are applicable to other Darwinia networks as well.

### Prepare Contract

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

const web3 = new Web3('https://koi-rpc.darwinia.network');
const web3 = new Web3('https://crab-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://koi-rpc.darwinia.network');
const web3 = new Web3('https://crab-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://koi-rpc.darwinia.network');
const web3 = new Web3('https://crab-rpc.darwinia.network');
const abi = contractMetadata.contracts["storage.sol:Storage"].abi;

const retrieve = async () => {
Expand Down
7 changes: 2 additions & 5 deletions docs/build/getting-started/networks/crab.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
# Crab Chain

Crab serves as Darwinia's incentivized testnet network with genuine economic significance, akin to how Kusama functions for Polkadot.

Crab is now a [parachain of Kusama](https://kusama.subscan.io/parachain/2105).
# Crab Chain(Testnet)
The Crab, a [parachain of Kusama](https://kusama.subscan.io/parachain/2105), now serves as Darwinia’s primary test network. It is officially maintained to ensure that new and innovative features are thoroughly tested before being deployed to the main production network.

## Connect Wallet Automatically

Expand Down
Loading
Loading