Skip to content

Commit 2dab1bc

Browse files
authored
Update dependencies (#540)
* wip: update variables * Update subxt and related * More updates * Update omninode and chainspec builder
1 parent 4b197e9 commit 2dab1bc

File tree

8 files changed

+71
-67
lines changed

8 files changed

+71
-67
lines changed
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
[package]
2-
name = "my-project"
2+
name = "my_project"
33
version = "0.1.0"
44
edition = "2021"
55

66
[dependencies]
7-
subxt = "0.39.0"
8-
subxt-signer = "0.39.0"
9-
tokio = { version = "1.43.0", features = ["rt", "macros"] }
7+
subxt = "0.41.0"
8+
subxt-signer = "0.41.0"
9+
tokio = { version = "1.44.2", features = ["rt", "macros"] }

.snippets/code/develop/toolkit/interoperability/asset-transfer-api/reference/tx-result.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,6 @@ A promise containing the result of constructing the transaction.
133133

134134
The `ConstructedFormat` type is a conditional type that returns a specific type based on the value of the TxResult `format` field.
135135

136-
- **Payload format** - if the format field is set to `'payload'`, the `ConstructedFormat` type will return a [`GenericExtrinsicPayload`](https://github.com/polkadot-js/api/blob/{{ dependencies.repositories.polkadot_js_api.version}}/packages/types/src/extrinsic/ExtrinsicPayload.ts#L83){target=\_blank}
136+
- **Payload format** - if the format field is set to `'payload'`, the `ConstructedFormat` type will return a [`GenericExtrinsicPayload`](https://github.com/polkadot-js/api/blob/v15.8.1/packages/types/src/extrinsic/ExtrinsicPayload.ts#L87){target=\_blank}
137137
- **Call format** - if the format field is set to `'call'`, the `ConstructedFormat` type will return a hexadecimal string (`0x${string}`). This is the encoded representation of the extrinsic call
138-
- **Submittable format** - if the format field is set to `'submittable'`, the `ConstructedFormat` type will return a [`SubmittableExtrinsic`](https://github.com/polkadot-js/api/blob/{{ dependencies.repositories.polkadot_js_api.version}}/packages/api-base/src/types/submittable.ts#L56){target=\_blank}. This is a Polkadot.js type that represents a transaction that can be submitted to the blockchain
138+
- **Submittable format** - if the format field is set to `'submittable'`, the `ConstructedFormat` type will return a [`SubmittableExtrinsic`](https://github.com/polkadot-js/api/blob/v15.8.1/packages/api-base/src/types/submittable.ts#L56){target=\_blank}. This is a Polkadot.js type that represents a transaction that can be submitted to the blockchain

develop/toolkit/api-libraries/papi.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,17 @@ To instantiate the API, you can install the package by using the following comma
1919

2020
=== "npm"
2121
```bash
22-
npm i polkadot-api
22+
npm i polkadot-api@{{dependencies.javascript_packages.polkadot_api.version}}
2323
```
2424

2525
=== "pnpm"
2626
```bash
27-
pnpm add polkadot-api
27+
pnpm add polkadot-api@{{dependencies.javascript_packages.polkadot_api.version}}
2828
```
2929

3030
=== "yarn"
3131
```bash
32-
yarn add polkadot-api
32+
yarn add polkadot-api@{{dependencies.javascript_packages.polkadot_api.version}}
3333
```
3434

3535
Then, obtain the latest metadata from the target chain and generate the necessary types:

develop/toolkit/api-libraries/polkadot-js-api.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,21 +38,21 @@ The available methods and interfaces will automatically reflect what's possible
3838

3939
## Installation
4040

41-
To add the Polkadot.js API to your project, use the following command to install the latest stable release which supports any Polkadot SDK-based chain:
41+
To add the Polkadot.js API to your project, use the following command to install the version `{{ dependencies.javascript_packages.polkadot_js_api.version }}` which supports any Polkadot SDK-based chain:
4242

4343
=== "npm"
4444
```bash
45-
npm i @polkadot/api
45+
npm i @polkadot/api@{{ dependencies.javascript_packages.polkadot_js_api.version }}
4646
```
4747

4848
=== "pnpm"
4949
```bash
50-
pnpm add @polkadot/api
50+
pnpm add @polkadot/api@{{ dependencies.javascript_packages.polkadot_js_api.version }}
5151
```
5252

5353
=== "yarn"
5454
```bash
55-
yarn add @polkadot/api
55+
yarn add @polkadot/api@{{ dependencies.javascript_packages.polkadot_js_api.version }}
5656
```
5757

5858
For more detailed information about installation, see the [Installation](https://polkadot.js.org/docs/api/start/install/){target=\_blank} section in the official Polkadot.js API documentation.

develop/toolkit/api-libraries/subxt.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,27 +26,27 @@ To use subxt in your project, you must install the necessary dependencies. Each
2626
1. **Install the subxt CLI** - [`subxt-cli`](https://crates.io/crates/subxt-cli){target=\_blank} is a command-line tool that provides utilities for working with Polkadot SDK metadata. In the context of subxt, it is essential to download chain metadata, which is required to generate type-safe Rust interfaces for interacting with the blockchain. Install it using:
2727

2828
```bash
29-
cargo install subxt-cli
29+
cargo install subxt-cli@{{dependencies.crates.subxt_cli.version}}
3030
```
3131

3232
2. **Add core dependencies** - these dependencies are essential for interacting with the blockchain:
3333

3434
- **[subxt](https://crates.io/crates/subxt){target=\_blank}** - the main library for communicating with Polkadot SDK nodes. It handles RPC requests, encoding/decoding, and type generation
3535

3636
```bash
37-
cargo add subxt
37+
cargo add subxt@{{dependencies.crates.subxt.version}}
3838
```
3939

4040
- **[subxt-signer](https://crates.io/crates/subxt-signer){target=\_blank}** - provides cryptographic functionality for signing transactions. Without this, you can only read data but cannot submit transactions
4141

4242
```bash
43-
cargo add subxt-signer
43+
cargo add subxt-signer@{{dependencies.crates.subxt_signer.version}}
4444
```
4545

4646
- **[tokio](https://crates.io/crates/tokio){target=\_blank}** - an asynchronous runtime for Rust. Since blockchain operations are async, Tokio enables the efficient handling of network requests. The `rt` feature enables Tokio's runtime, including the current-thread single-threaded scheduler, which is necessary for async execution. The `macros` feature provides procedural macros like `#[tokio::main]` to simplify runtime setup
4747
4848
```bash
49-
cargo add tokio --features rt,macros
49+
cargo add tokio@{{dependencies.crates.tokio.version}} --features rt,macros
5050
```
5151
5252
After adding the dependencies, your `Cargo.toml` should look like this:

develop/toolkit/interoperability/asset-transfer-api/reference.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ description: Explore the Asset Transfer API Reference for comprehensive details
3232

3333
Holds open an API connection to a specified chain within the `ApiPromise` to help construct transactions for assets and estimate fees.
3434

35-
For a more in-depth explanation of the Asset Transfer API class structure, check the [source code](https://github.com/paritytech/asset-transfer-api/blob/{{dependencies.repositories.asset_transfer_api.version}}/src/AssetTransferApi.ts#L121){target=\_blank}.
35+
For a more in-depth explanation of the Asset Transfer API class structure, check the [source code](https://github.com/paritytech/asset-transfer-api/blob/{{dependencies.repositories.asset_transfer_api.version}}/src/AssetTransferApi.ts#L123){target=\_blank}.
3636

3737
### Methods
3838

@@ -43,7 +43,7 @@ Generates an XCM transaction for transferring assets between chains. It simplifi
4343
After obtaining the transaction, you must handle the signing and submission process separately.
4444

4545
```ts
46-
--8<-- 'https://raw.githubusercontent.com/paritytech/asset-transfer-api/refs/tags/{{dependencies.repositories.asset_transfer_api.version}}/src/AssetTransferApi.ts:184:190'
46+
--8<-- 'https://raw.githubusercontent.com/paritytech/asset-transfer-api/refs/tags/{{dependencies.repositories.asset_transfer_api.version}}/src/AssetTransferApi.ts:186:192'
4747
```
4848

4949
??? interface "Request parameters"
@@ -102,7 +102,7 @@ Creates a local XCM transaction to retrieve trapped assets. This function can be
102102

103103

104104
```ts
105-
--8<-- 'https://raw.githubusercontent.com/paritytech/asset-transfer-api/refs/tags/{{dependencies.repositories.asset_transfer_api.version}}/src/AssetTransferApi.ts:368:373'
105+
--8<-- 'https://raw.githubusercontent.com/paritytech/asset-transfer-api/refs/tags/{{dependencies.repositories.asset_transfer_api.version}}/src/AssetTransferApi.ts:370:375'
106106
```
107107

108108
??? interface "Request parameters"
@@ -153,7 +153,7 @@ Creates a local XCM transaction to retrieve trapped assets. This function can be
153153
Decodes the hex of an extrinsic into a string readable format.
154154

155155
```ts
156-
--8<-- 'https://raw.githubusercontent.com/paritytech/asset-transfer-api/refs/tags/{{dependencies.repositories.asset_transfer_api.version}}/src/AssetTransferApi.ts:529:529'
156+
--8<-- 'https://raw.githubusercontent.com/paritytech/asset-transfer-api/refs/tags/{{dependencies.repositories.asset_transfer_api.version}}/src/AssetTransferApi.ts:531:531'
157157
```
158158

159159
??? interface "Request parameters"
@@ -197,7 +197,7 @@ Decodes the hex of an extrinsic into a string readable format.
197197
Fetch estimated fee information for an extrinsic.
198198

199199
```ts
200-
--8<-- 'https://raw.githubusercontent.com/paritytech/asset-transfer-api/refs/tags/{{dependencies.repositories.asset_transfer_api.version}}/src/AssetTransferApi.ts:444:447'
200+
--8<-- 'https://raw.githubusercontent.com/paritytech/asset-transfer-api/refs/tags/{{dependencies.repositories.asset_transfer_api.version}}/src/AssetTransferApi.ts:446:449'
201201
```
202202

203203
??? interface "Request parameters"
@@ -214,9 +214,9 @@ Fetch estimated fee information for an extrinsic.
214214

215215
The `ConstructedFormat` type is a conditional type that returns a specific type based on the value of the TxResult `format` field.
216216

217-
- **Payload format** - if the format field is set to `'payload'`, the `ConstructedFormat` type will return a [`GenericExtrinsicPayload`](https://github.com/polkadot-js/api/blob/{{ dependencies.repositories.polkadot_js_api.version}}/packages/types/src/extrinsic/ExtrinsicPayload.ts#L83){target=\_blank}
217+
- **Payload format** - if the format field is set to `'payload'`, the `ConstructedFormat` type will return a [`GenericExtrinsicPayload`](https://github.com/polkadot-js/api/blob/{{ dependencies.javascript_packages.asset_transfer_api.polkadot_js_api_version}}/packages/types/src/extrinsic/ExtrinsicPayload.ts#L87){target=\_blank}
218218
- Call format - if the format field is set to `'call'`, the `ConstructedFormat` type will return a hexadecimal string (`0x${string}`). This is the encoded representation of the extrinsic call
219-
- **Submittable format** - if the format field is set to `'submittable'`, the `ConstructedFormat` type will return a [`SubmittableExtrinsic`](https://github.com/polkadot-js/api/blob/{{ dependencies.repositories.polkadot_js_api.version}}/packages/api-base/src/types/submittable.ts#L56){target=\_blank}. This is a Polkadot.js type that represents a transaction that can be submitted to the blockchain
219+
- **Submittable format** - if the format field is set to `'submittable'`, the `ConstructedFormat` type will return a [`SubmittableExtrinsic`](https://github.com/polkadot-js/api/blob/{{dependencies.javascript_packages.asset_transfer_api.polkadot_js_api_version}}/packages/api-base/src/types/submittable.ts#L56){target=\_blank}. This is a Polkadot.js type that represents a transaction that can be submitted to the blockchain
220220

221221
---
222222

@@ -246,7 +246,7 @@ Fetch estimated fee information for an extrinsic.
246246
}
247247
```
248248

249-
For more information on the underlying types and fields of `RuntimeDispatchInfo`, check the [`RuntimeDispatchInfo`](https://github.com/polkadot-js/api/blob/{{ dependencies.repositories.polkadot_js_api.version}}/packages/types/src/interfaces/payment/types.ts#L21){target=\_blank} source code.
249+
For more information on the underlying types and fields of `RuntimeDispatchInfo`, check the [`RuntimeDispatchInfo`](https://github.com/polkadot-js/api/blob/{{ dependencies.javascript_packages.asset_transfer_api.polkadot_js_api_version}}/packages/types/src/interfaces/payment/types.ts#L21){target=\_blank} source code.
250250

251251

252252
??? child "Type `RuntimeDispatchInfoV1`"
@@ -259,7 +259,7 @@ Fetch estimated fee information for an extrinsic.
259259
}
260260
```
261261

262-
For more information on the underlying types and fields of `RuntimeDispatchInfoV1`, check the [`RuntimeDispatchInfoV1`](https://github.com/polkadot-js/api/blob/{{ dependencies.repositories.polkadot_js_api.version}}/packages/types/src/interfaces/payment/types.ts#L28){target=\_blank} source code.
262+
For more information on the underlying types and fields of `RuntimeDispatchInfoV1`, check the [`RuntimeDispatchInfoV1`](https://github.com/polkadot-js/api/blob/{{dependencies.javascript_packages.asset_transfer_api.polkadot_js_api_version}}/packages/types/src/interfaces/payment/types.ts#L28){target=\_blank} source code.
263263

264264
??? interface "Example"
265265

0 commit comments

Comments
 (0)