mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-30 22:27:56 +00:00
Support v16 metadata and use it by default if it's available (#1999)
* Support v16 metadata and use it by default if it's available * lockfile * fix blocks test; new transaction extension in kitchensink runtime * Bump scale-typegen to 0.11.1 to cater for Duration prelude type * fmt * Fix no-std test building * Cargo update and bump substrate deps * Update test and no-std deps * fmt * fix test
This commit is contained in:
@@ -333,6 +333,7 @@ async fn decode_transaction_extensions_from_blocks() {
|
||||
assert_eq!(tip2, tip2_static);
|
||||
|
||||
let expected_transaction_extensions = [
|
||||
"AuthorizeCall",
|
||||
"CheckNonZeroSender",
|
||||
"CheckSpecVersion",
|
||||
"CheckTxVersion",
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
// see LICENSE for license details.
|
||||
|
||||
use crate::{
|
||||
node_runtime::{self, balances, runtime_types, system},
|
||||
node_runtime::{self, balances, system},
|
||||
subxt_test, test_context,
|
||||
};
|
||||
use codec::Decode;
|
||||
@@ -282,30 +282,10 @@ async fn storage_total_issuance() {
|
||||
|
||||
#[subxt_test]
|
||||
async fn storage_balance_lock() -> Result<(), subxt::Error> {
|
||||
let bob_signer = dev::bob();
|
||||
let bob: AccountId32 = dev::bob().public_key().into();
|
||||
let ctx = test_context().await;
|
||||
let api = ctx.client();
|
||||
|
||||
let tx = node_runtime::tx().staking().bond(
|
||||
100_000_000_000_000,
|
||||
runtime_types::pallet_staking::RewardDestination::Stash,
|
||||
);
|
||||
|
||||
let signed_extrinsic = api
|
||||
.tx()
|
||||
.create_signed(&tx, &bob_signer, Default::default())
|
||||
.await?;
|
||||
|
||||
signed_extrinsic
|
||||
.submit_and_watch()
|
||||
.await
|
||||
.unwrap()
|
||||
.wait_for_finalized_success()
|
||||
.await?
|
||||
.find_first::<system::events::ExtrinsicSuccess>()?
|
||||
.expect("No ExtrinsicSuccess Event found");
|
||||
|
||||
let holds_addr = node_runtime::storage().balances().holds(bob);
|
||||
|
||||
let holds = api
|
||||
@@ -318,7 +298,7 @@ async fn storage_balance_lock() -> Result<(), subxt::Error> {
|
||||
|
||||
// There is now a hold on the balance being staked
|
||||
assert_eq!(holds.len(), 1);
|
||||
assert_eq!(holds[0].amount, 100_000_000_000_000);
|
||||
assert_eq!(holds[0].amount, 327_000_000_000_000);
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
// Copyright 2019-2025 Parity Technologies (UK) Ltd.
|
||||
// This file is dual-licensed as Apache-2.0 or GPL-3.0.
|
||||
// see LICENSE for license details.
|
||||
|
||||
// TODO: Re-enable these once V16 is stable in Substrate nightlies,
|
||||
// and test-runtime is updated to pull in V16 metadata by default.
|
||||
/*
|
||||
use crate::{subxt_test, test_context};
|
||||
use test_runtime::node_runtime_unstable;
|
||||
|
||||
@@ -58,3 +65,4 @@ async fn call_view_function_dynamically() -> Result<(), subxt::Error> {
|
||||
|
||||
Ok(())
|
||||
}
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user