Metadata V16: Be more dynamic over which hasher is used. (#1974)

* Use DynamicHasher256 to support Blake2 or Keccack depending on chain

* remove Config::Hash associated type, replace with HashFor<Config> alias

* Fix doc links

* fix wasm tests

* Don't strip system pallet associated types. check System.Hashing, not Hash. Rename BlockHash trait to Hash

* Tweak comment

* fmt

* fix merge

* Fix typo
This commit is contained in:
James Wilson
2025-04-23 10:12:48 +01:00
committed by GitHub
parent a8ae55a61b
commit 21b3f52191
43 changed files with 573 additions and 371 deletions
@@ -12,7 +12,12 @@ use crate::{
subxt_test, test_context, TestClient, TestConfig, TestContext,
};
use subxt::ext::futures::StreamExt;
use subxt::{tx::TxProgress, utils::MultiAddress, Config, Error};
use subxt::{
config::{Config, HashFor},
tx::TxProgress,
utils::MultiAddress,
Error,
};
use subxt_signer::sr25519::{self, dev};
struct ContractsTestContext {
@@ -20,7 +25,7 @@ struct ContractsTestContext {
signer: sr25519::Keypair,
}
type Hash = <TestConfig as Config>::Hash;
type Hash = HashFor<TestConfig>;
type AccountId = <TestConfig as Config>::AccountId;
/// A dummy contract which does nothing at all.