Skip to content
Draft
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
2 changes: 2 additions & 0 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[target.wasm32-unknown-unknown]
rustflags = ["--cfg", "substrate_runtime"]
22 changes: 11 additions & 11 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -214,3 +214,7 @@ _In alphabetical order_

A: When specifying your own state query, you must provide the return type of the state you're trying to retrieve. This is because the api-client only gets bytes from the node and must be able to deserialize these properly. That is not possible without knowing the type to decode to. This type may be for example a simple `u64` for retrieving the `Balance` of an account. But careful: If you're looking at the pallet code and its return type, don't forget to take the Query type into consideration. The `OptionQuery` for example automatically wraps the return type into an `Option` (see the [substrate docs "Handling query return values"](https://docs.substrate.io/build/runtime-storage/) for more information). Alternatively, you can always double check via [polkadot.js](https://polkadot.js.org/).
If you're importing a value directly from the runtime, as it's done in this [example](https://github.com/scs/substrate-api-client/blob/fb108a7d1994705bbca50233e3bc66cec3726523/examples/examples/subscribe_events.rs#L25-L27), remember to adapt it to the node you are querying from.

4. Q: I get a compilation error when compiling for `no-std` or `wasm`. For example "unresolved import `sp_core::storage::Storage`" in `sp-state-machine`. What is wrong?

A: You might have to specify `RUSTFLAGS` for compilation. See the [substrate documentation](https://github.com/paritytech/polkadot-sdk?tab=readme-ov-file#wasm). If you still get an error like `error[E0308]: mismatched types` in `sp-io` you might have to switch to the `master` branch (instead of using a release branch). This is a temporary issue do to incompatible versions being published on crates.io and should be fixed in the future.
2 changes: 1 addition & 1 deletion api-client/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "substrate-api-client"
version = "1.21.0"
version = "1.22.0"
authors = ["Supercomputing Systems AG <info@scs.ch>"]
license = "Apache-2.0"
edition = "2021"
Expand Down
2 changes: 1 addition & 1 deletion compose-macros/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ac-compose-macros"
version = "1.21.0"
version = "1.22.0"
authors = ["Supercomputing Systems AG <info@scs.ch>"]
license = "Apache-2.0"
edition = "2021"
Expand Down
2 changes: 1 addition & 1 deletion examples/async/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ac-examples-async"
version = "1.21.0"
version = "1.22.0"
license = "Apache-2.0"
edition = "2021"

Expand Down
2 changes: 1 addition & 1 deletion examples/sync/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ac-examples-sync"
version = "1.21.0"
version = "1.22.0"
license = "Apache-2.0"
edition = "2021"

Expand Down
2 changes: 1 addition & 1 deletion examples/wasm/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ac-examples-wasm"
version = "1.21.0"
version = "1.22.0"
license = "Apache-2.0"
edition = "2021"

Expand Down
2 changes: 1 addition & 1 deletion keystore/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ac-keystore"
version = "1.21.0"
version = "1.22.0"
authors = ["Supercomputing Systems AG <info@scs.ch>"]
license = "Apache-2.0"
edition = "2021"
Expand Down
2 changes: 1 addition & 1 deletion node-api/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ac-node-api"
version = "1.21.0"
version = "1.22.0"
authors = ["Supercomputing Systems AG <info@scs.ch>"]
license = "Apache-2.0"
edition = "2021"
Expand Down
2 changes: 1 addition & 1 deletion primitives/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ac-primitives"
version = "1.21.0"
version = "1.22.0"
authors = ["Supercomputing Systems AG <info@scs.ch>"]
license = "Apache-2.0"
edition = "2021"
Expand Down
2 changes: 1 addition & 1 deletion test-no-std/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "test-no-std"
version = "1.21.0"
version = "1.22.0"
authors = ["Supercomputing Systems AG <info@scs.ch>"]
license = "Apache-2.0"
edition = "2021"
Expand Down
2 changes: 1 addition & 1 deletion testing/async/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ac-testing-async"
version = "1.21.0"
version = "1.22.0"
authors = ["Supercomputing Systems AG <info@scs.ch>"]
license = "Apache-2.0"
edition = "2021"
Expand Down
2 changes: 1 addition & 1 deletion testing/sync/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ac-testing-sync"
version = "1.21.0"
version = "1.22.0"
authors = ["Supercomputing Systems AG <info@scs.ch>"]
license = "Apache-2.0"
edition = "2021"
Expand Down
Loading