From bb237a3f15c72daaf5324356d9bf2607de36338e Mon Sep 17 00:00:00 2001 From: Daan van der Plas Date: Mon, 30 Oct 2023 15:40:37 +0100 Subject: [PATCH] Simplify chain config --- examples/parachain-example/src/main.rs | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/examples/parachain-example/src/main.rs b/examples/parachain-example/src/main.rs index f195872a2d..71c774bed8 100644 --- a/examples/parachain-example/src/main.rs +++ b/examples/parachain-example/src/main.rs @@ -1,5 +1,5 @@ use subxt::{ - config::{Config, PolkadotConfig, DefaultExtrinsicParams, DefaultExtrinsicParamsBuilder}, + PolkadotConfig, utils::{AccountId32, MultiAddress}, OnlineClient, }; @@ -8,21 +8,9 @@ use subxt_signer::sr25519::dev::{self}; #[subxt::subxt(runtime_metadata_path = "statemint_metadata.scale")] pub mod statemint {} -/// Custom config that works with Statemint: -pub enum StatemintConfig {} - -impl Config for StatemintConfig { - type Hash = ::Hash; - type AccountId = ::AccountId; - type Address = ::Address; - type Signature = ::Signature; - type Hasher = ::Hasher; - type Header = ::Header; - type ExtrinsicParams = StatemintExtriniscParams; -} - -pub type StatemintExtriniscParams = DefaultExtrinsicParams; -pub type StatemintExtrinsicParamsBuilder = DefaultExtrinsicParamsBuilder; +// PolkadotConfig or SubstrateConfig will suffice for this example at the moment, +// but PolkadotConfig is a little more correct, having the right `Address` type. +type StatemintConfig = PolkadotConfig; #[tokio::main] pub async fn main() {