Add support for generating metadata from runtime wasm files (#1720)

closes #1660
This commit is contained in:
Pavlo Khrystenko
2024-09-02 11:07:50 +02:00
committed by GitHub
parent 290bee3486
commit 3866737b29
14 changed files with 1075 additions and 73 deletions
@@ -1,4 +1,4 @@
error: One of 'runtime_metadata_path' or 'runtime_metadata_insecure_url' must be provided
error: At least one of 'runtime_metadata_path', 'runtime_metadata_insecure_url' or 'runtime_path` can be provided
--> src/incorrect/need_url_or_path.rs:1:1
|
1 | #[subxt::subxt()]
@@ -4,4 +4,11 @@
)]
pub mod node_runtime {}
#[subxt::subxt(
runtime_metadata_path = "../../../../artifacts/polkadot_metadata_tiny.scale",
runtime_metadata_insecure_url = "wss://rpc.polkadot.io:443",
runtime_path = "../../../../artifacts/westend_runtime.wasm"
)]
pub mod node_runtime2 {}
fn main() {}
@@ -1,4 +1,4 @@
error: Only one of 'runtime_metadata_path' or 'runtime_metadata_insecure_url' can be provided
error: Only one of 'runtime_metadata_path', 'runtime_metadata_insecure_url' or 'runtime_path` can be provided
--> src/incorrect/url_and_path_provided.rs:1:1
|
1 | / #[subxt::subxt(
@@ -8,3 +8,15 @@ error: Only one of 'runtime_metadata_path' or 'runtime_metadata_insecure_url' ca
| |__^
|
= note: this error originates in the attribute macro `subxt::subxt` (in Nightly builds, run with -Z macro-backtrace for more info)
error: Only one of 'runtime_metadata_path', 'runtime_metadata_insecure_url' or `runtime_path` must be provided
--> src/incorrect/url_and_path_provided.rs:7:1
|
7 | / #[subxt::subxt(
8 | | runtime_metadata_path = "../../../../artifacts/polkadot_metadata_tiny.scale",
9 | | runtime_metadata_insecure_url = "wss://rpc.polkadot.io:443",
10 | | runtime_path = "../../../../artifacts/westend_runtime.wasm"
11 | | )]
| |__^
|
= note: this error originates in the attribute macro `subxt::subxt` (in Nightly builds, run with -Z macro-backtrace for more info)