mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 19:17:58 +00:00
c8462defab
* add proper tests for custom values * remove try operators * use sustrate compat for import of hash * add license and hex * add script to artifacts.sh * custom values with ids not in metadata can be accessed in static interface * fmt and clippy * access bytes of custom values directly, even if type id wrong * final fixes * removing substrate-compat flag from ui tests * Update subxt/src/custom_values/custom_values_client.rs Co-authored-by: James Wilson <james@jsdw.me> * remove types access in type generator * 2 extra lines --------- Co-authored-by: James Wilson <james@jsdw.me>
18 lines
658 B
Rust
18 lines
658 B
Rust
// Copyright 2019-2023 Parity Technologies (UK) Ltd.
|
|
// This file is dual-licensed as Apache-2.0 or GPL-3.0.
|
|
// see LICENSE for license details.
|
|
|
|
use codec::Encode;
|
|
use std::io::{self, Write};
|
|
|
|
/// Creates some scale encoded metadata with custom values and writes it out to stdout (as raw bytes)
|
|
///
|
|
/// Can be called from the root of the project with: `cargo run --bin generate-custom-metadata > output.scale`.
|
|
fn main() -> io::Result<()> {
|
|
let metadata_prefixed = generate_custom_metadata::metadata_custom_values_foo();
|
|
let stdout = io::stdout();
|
|
let mut handle = stdout.lock();
|
|
handle.write_all(&metadata_prefixed.encode())?;
|
|
Ok(())
|
|
}
|