Skip to content

Commit a50f597

Browse files
committed
Update rust installation and local contracts node
1 parent ae3d446 commit a50f597

File tree

5 files changed

+45
-89
lines changed

5 files changed

+45
-89
lines changed

.snippets/code/develop/parachains/get-started/install-polkadot-sdk/termynal-2.html

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,9 @@
44
<br />
55
<span data-ty>active toolchain</span>
66
<span data-ty>----------------</span>
7-
<br />
8-
<span data-ty>stable-x86_64-apple-darwin (default)</span>
9-
<span data-ty>rustc 1.81.0 (eeb90cda1 2024-09-04)</span>
10-
<br />
11-
<span data-ty>...</span>
12-
<br />
13-
<span data-ty>active toolchain</span>
14-
<span data-ty>----------------</span>
15-
<br />
16-
<span data-ty>nightly-x86_64-apple-darwin (overridden by +toolchain on the command line)</span>
17-
<span data-ty>rustc 1.83.0-nightly (6c6d21008 2024-09-22)</span>
7+
<span data-ty>name: stable-aarch64-apple-darwin</span>
8+
<span data-ty>active because: it's the default toolchain</span>
9+
<span data-ty>installed targets:</span>
10+
<span data-ty> aarch64-apple-darwin</span>
11+
<span data-ty> wasm32-unknown-unknown</span>
1812
</div>

develop/parachains/install-polkadot-sdk.md

Lines changed: 9 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -95,19 +95,12 @@ To install `openssl` and the Rust toolchain on macOS:
9595
rustup default stable
9696
rustup update
9797
rustup target add wasm32-unknown-unknown
98+
rustup component add rust-src
9899
```
99100

100-
8. Add the `nightly` release and the `nightly` Wasm targets to your development
101-
environment by running the following commands:
101+
8. [Verify your installation](#verifying-installation)
102102

103-
```bash
104-
rustup update nightly
105-
rustup target add wasm32-unknown-unknown --toolchain nightly
106-
```
107-
108-
9. [Verify your installation](#verifying-installation)
109-
110-
10. Install `cmake` using the following command:
103+
9. Install `cmake` using the following command:
111104

112105
```bash
113106
brew install cmake
@@ -201,16 +194,11 @@ To install the Rust toolchain on Linux:
201194
```bash
202195
rustup default stable
203196
rustup update
197+
rustup target add wasm32-unknown-unknown
198+
rustup component add rust-src
204199
```
205200

206-
9. Add the `nightly` release and the `nightly` Wasm targets to your development environment by running the following commands:
207-
208-
```bash
209-
rustup update nightly
210-
rustup target add wasm32-unknown-unknown --toolchain nightly
211-
```
212-
213-
10. [Verify your installation](#verifying-installation)
201+
9. [Verify your installation](#verifying-installation)
214202

215203
## Windows (WSL)
216204

@@ -311,24 +299,18 @@ To install the Rust toolchain on WSL:
311299
```bash
312300
rustup default stable
313301
rustup update
302+
rustup target add wasm32-unknown-unknown
303+
rustup component add rust-src
314304
```
315305

316-
11. Add the `nightly` version of the toolchain and the `nightly` Wasm target to your development environment by running the following commands:
317-
318-
```bash
319-
rustup update nightly
320-
rustup target add wasm32-unknown-unknown --toolchain nightly
321-
```
322-
323-
12. [Verify your installation](#verifying-installation)
306+
11. [Verify your installation](#verifying-installation)
324307

325308
## Verifying Installation
326309

327310
Verify the configuration of your development environment by running the following command:
328311

329312
```bash
330313
rustup show
331-
rustup +nightly show
332314
```
333315

334316
The command displays output similar to the following:

develop/smart-contracts/local-development-node.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Before getting started, ensure you have done the following:
2525
The Polkadot SDK repository contains both the [Substrate node](https://github.com/paritytech/polkadot-sdk/tree/master/substrate/bin/node){target=\_blank} implementation and the [ETH-RPC adapter](https://github.com/paritytech/polkadot-sdk/tree/master/substrate/frame/revive/rpc){target=\_blank} required for Ethereum compatibility. Start by cloning the repository and navigating to the project directory:
2626

2727
```bash
28-
git clone https://github.com/paritytech/polkadot-sdk.git
28+
git clone -b {{dependencies.repositories.polkadot_sdk_contracts_node.version}} https://github.com/paritytech/polkadot-sdk.git
2929
cd polkadot-sdk
3030
```
3131

llms.txt

Lines changed: 26 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -4989,19 +4989,12 @@ To install `openssl` and the Rust toolchain on macOS:
49894989
rustup default stable
49904990
rustup update
49914991
rustup target add wasm32-unknown-unknown
4992+
rustup component add rust-src
49924993
```
49934994

4994-
8. Add the `nightly` release and the `nightly` Wasm targets to your development
4995-
environment by running the following commands:
4995+
8. [Verify your installation](#verifying-installation)
49964996

4997-
```bash
4998-
rustup update nightly
4999-
rustup target add wasm32-unknown-unknown --toolchain nightly
5000-
```
5001-
5002-
9. [Verify your installation](#verifying-installation)
5003-
5004-
10. Install `cmake` using the following command:
4997+
9. Install `cmake` using the following command:
50054998

50064999
```bash
50075000
brew install cmake
@@ -5095,16 +5088,11 @@ To install the Rust toolchain on Linux:
50955088
```bash
50965089
rustup default stable
50975090
rustup update
5091+
rustup target add wasm32-unknown-unknown
5092+
rustup component add rust-src
50985093
```
50995094

5100-
9. Add the `nightly` release and the `nightly` Wasm targets to your development environment by running the following commands:
5101-
5102-
```bash
5103-
rustup update nightly
5104-
rustup target add wasm32-unknown-unknown --toolchain nightly
5105-
```
5106-
5107-
10. [Verify your installation](#verifying-installation)
5095+
9. [Verify your installation](#verifying-installation)
51085096

51095097
## Windows (WSL)
51105098

@@ -5205,24 +5193,18 @@ To install the Rust toolchain on WSL:
52055193
```bash
52065194
rustup default stable
52075195
rustup update
5196+
rustup target add wasm32-unknown-unknown
5197+
rustup component add rust-src
52085198
```
52095199

5210-
11. Add the `nightly` version of the toolchain and the `nightly` Wasm target to your development environment by running the following commands:
5211-
5212-
```bash
5213-
rustup update nightly
5214-
rustup target add wasm32-unknown-unknown --toolchain nightly
5215-
```
5216-
5217-
12. [Verify your installation](#verifying-installation)
5200+
11. [Verify your installation](#verifying-installation)
52185201

52195202
## Verifying Installation
52205203

52215204
Verify the configuration of your development environment by running the following command:
52225205

52235206
```bash
52245207
rustup show
5225-
rustup +nightly show
52265208
```
52275209

52285210
The command displays output similar to the following:
@@ -5233,17 +5215,11 @@ The command displays output similar to the following:
52335215
<br />
52345216
<span data-ty>active toolchain</span>
52355217
<span data-ty>----------------</span>
5236-
<br />
5237-
<span data-ty>stable-x86_64-apple-darwin (default)</span>
5238-
<span data-ty>rustc 1.81.0 (eeb90cda1 2024-09-04)</span>
5239-
<br />
5240-
<span data-ty>...</span>
5241-
<br />
5242-
<span data-ty>active toolchain</span>
5243-
<span data-ty>----------------</span>
5244-
<br />
5245-
<span data-ty>nightly-x86_64-apple-darwin (overridden by +toolchain on the command line)</span>
5246-
<span data-ty>rustc 1.83.0-nightly (6c6d21008 2024-09-22)</span>
5218+
<span data-ty>name: stable-aarch64-apple-darwin</span>
5219+
<span data-ty>active because: it's the default toolchain</span>
5220+
<span data-ty>installed targets:</span>
5221+
<span data-ty> aarch64-apple-darwin</span>
5222+
<span data-ty> wasm32-unknown-unknown</span>
52475223
</div>
52485224

52495225
## Where to Go Next
@@ -10686,7 +10662,7 @@ Before getting started, ensure you have done the following:
1068610662
The Polkadot SDK repository contains both the [Substrate node](https://github.com/paritytech/polkadot-sdk/tree/master/substrate/bin/node){target=\_blank} implementation and the [ETH-RPC adapter](https://github.com/paritytech/polkadot-sdk/tree/master/substrate/frame/revive/rpc){target=\_blank} required for Ethereum compatibility. Start by cloning the repository and navigating to the project directory:
1068710663

1068810664
```bash
10689-
git clone https://github.com/paritytech/polkadot-sdk.git
10665+
git clone -b {{dependencies.repositories.polkadot_sdk_contracts_node.version}} https://github.com/paritytech/polkadot-sdk.git
1069010666
cd polkadot-sdk
1069110667
```
1069210668

@@ -35569,7 +35545,7 @@ import { JsonRpcProvider } from 'ethers';
3556935545
export const PASSET_HUB_CONFIG = {
3557035546
name: 'Passet Hub',
3557135547
rpc: 'https://testnet-passet-hub-eth-rpc.polkadot.io/', // Passet Hub testnet RPC
35572-
chainId: 420420421, // Passet Hub testnet chainId
35548+
chainId: 420420422, // Passet Hub testnet chainId
3557335549
blockExplorer: 'https://blockscout-passet-hub.parity-testnet.parity.io/',
3557435550
};
3557535551

@@ -35637,7 +35613,7 @@ import { Contract } from 'ethers';
3563735613
import { getProvider } from './ethers';
3563835614
import StorageABI from '../../abis/Storage.json';
3563935615

35640-
export const CONTRACT_ADDRESS = '0xabBd46Ef74b88E8B1CDa49BeFb5057710443Fd29';
35616+
export const CONTRACT_ADDRESS = '0x58053f0e8ede1a47a1af53e43368cd04ddcaf66f';
3564135617

3564235618
export const CONTRACT_ABI = StorageABI;
3564335619

@@ -35661,7 +35637,7 @@ Next, let's create a component to handle wallet connections. Create a new file c
3566135637
'use client';
3566235638

3566335639
import React, { useState, useEffect } from 'react';
35664-
import { ASSET_HUB_CONFIG } from '../utils/ethers';
35640+
import { PASSET_HUB_CONFIG } from '../utils/ethers';
3566535641

3566635642
const WalletConnect = ({ onConnect }) => {
3566735643
const [account, setAccount] = useState(null);
@@ -35736,7 +35712,7 @@ const WalletConnect = ({ onConnect }) => {
3573635712
setChainId(currentChainId);
3573735713

3573835714
// Prompt user to switch networks if needed
35739-
if (currentChainId !== ASSET_HUB_CONFIG.chainId) {
35715+
if (currentChainId !== PASSET_HUB_CONFIG.chainId) {
3574035716
await switchNetwork();
3574135717
}
3574235718

@@ -35751,7 +35727,7 @@ const WalletConnect = ({ onConnect }) => {
3575135727
try {
3575235728
await window.ethereum.request({
3575335729
method: 'wallet_switchEthereumChain',
35754-
params: [{ chainId: `0x${ASSET_HUB_CONFIG.chainId.toString(16)}` }],
35730+
params: [{ chainId: `0x${PASSET_HUB_CONFIG.chainId.toString(16)}` }],
3575535731
});
3575635732
} catch (switchError) {
3575735733
// Error 4902 means the chain hasn't been added to MetaMask
@@ -35761,10 +35737,10 @@ const WalletConnect = ({ onConnect }) => {
3576135737
method: 'wallet_addEthereumChain',
3576235738
params: [
3576335739
{
35764-
chainId: `0x${ASSET_HUB_CONFIG.chainId.toString(16)}`,
35765-
chainName: ASSET_HUB_CONFIG.name,
35766-
rpcUrls: [ASSET_HUB_CONFIG.rpc],
35767-
blockExplorerUrls: [ASSET_HUB_CONFIG.blockExplorer],
35740+
chainId: `0x${PASSET_HUB_CONFIG.chainId.toString(16)}`,
35741+
chainName: PASSET_HUB_CONFIG.name,
35742+
rpcUrls: [PASSET_HUB_CONFIG.rpc],
35743+
blockExplorerUrls: [PASSET_HUB_CONFIG.blockExplorer],
3576835744
},
3576935745
],
3577035746
});
@@ -35804,7 +35780,7 @@ const WalletConnect = ({ onConnect }) => {
3580435780
>
3580535781
Disconnect
3580635782
</button>
35807-
{chainId !== ASSET_HUB_CONFIG.chainId && (
35783+
{chainId !== PASSET_HUB_CONFIG.chainId && (
3580835784
<button
3580935785
onClick={switchNetwork}
3581035786
className="mt-3 w-full bg-yellow-500 hover:bg-yellow-600 text-white font-bold py-2 px-4 rounded-lg transition"
@@ -36224,7 +36200,7 @@ const transport = http('https://testnet-passet-hub-eth-rpc.polkadot.io')
3622436200

3622536201
// Configure the Passet Hub chain
3622636202
export const passetHub = {
36227-
id: 420420421,
36203+
id: 420420422,
3622836204
name: 'Passet Hub',
3622936205
network: 'passet-hub',
3623036206
nativeCurrency: {

variables.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ dependencies:
2323
open_zeppelin_contracts:
2424
repository_url: https://github.com/OpenZeppelin/openzeppelin-contracts
2525
version: v5.0.0
26+
polkadot_sdk_contracts_node:
27+
repository_url: https://github.com/paritytech/polkadot-sdk
28+
version: polkadot-stable2503-6
29+
ignore_updates: true
2630
crates:
2731
subxt:
2832
name: subxt

0 commit comments

Comments
 (0)